#include <lunaix/trace.h>
#include <lunaix/tty/tty.h>
#include <lunaix/owloysius.h>
-#include <lunaix/pcontext.h>
+#include <lunaix/hart_state.h>
#include <hal/acpi/acpi.h>
-#include <hal/intc.h>
#include <sys/abi.h>
#include <sys/mm/mm_defs.h>
/* Begin kernel bootstrapping sequence */
boot_begin(bhctx);
- tty_init(ioremap(0xB8000, PAGE_SIZE));
+ tty_init((void*)ioremap(0xB8000, PAGE_SIZE));
/* Setup kernel memory layout and services */
kmem_init(bhctx);
device_scan_drivers();
- invoke_init_function(on_earlyboot);
-
device_sysconf_load();
- /* Get intc online, this is the cornerstone when initing devices */
- intc_init();
+ invoke_init_function(on_earlyboot);
clock_init();
timer_init();
* and start geting into uspace
*/
boot_end(bhctx);
- boot_cleanup();
spawn_lunad();
}
kmem_init(struct boot_handoff* bhctx)
{
pte_t* ptep = mkptep_va(VMS_SELF, KERNEL_RESIDENT);
+
ptep = mkl0tep(ptep);
+ unsigned int i = ptep_vfn(ptep);
do {
+ if (l0tep_impile_vmnts(ptep)) {
+ ptep++;
+ continue;
+ }
+
#if LnT_ENABLED(1)
assert(mkl1t(ptep++, 0, KERNEL_DATA));
#elif LnT_ENABLED(2)
#else
assert(mklft(ptep++, 0, KERNEL_DATA));
#endif
- } while (ptep_vfn(ptep) < MAX_PTEN - 2);
+ } while (++i < MAX_PTEN);
// allocators
cake_init();