X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/d1b1c8d9119229dbeed06cd252917e54a1cb77f6..bdc143a7aa3f51a46eceec62b0b364599533fa21:/lunaix-os/kernel/kinit.c diff --git a/lunaix-os/kernel/kinit.c b/lunaix-os/kernel/kinit.c index c74f8b3..24550cf 100644 --- a/lunaix-os/kernel/kinit.c +++ b/lunaix-os/kernel/kinit.c @@ -43,14 +43,9 @@ kernel_bootstrap(struct boot_handoff* bhctx) /* Begin kernel bootstrapping sequence */ boot_begin(bhctx); - tty_init(ioremap(0xB8000, PAGE_SIZE)); - /* Setup kernel memory layout and services */ kmem_init(bhctx); - // FIXME this goes to hal/gfxa - tty_set_theme(VGA_COLOR_WHITE, VGA_COLOR_BLACK); - boot_parse_cmdline(bhctx); /* Prepare stack trace environment */ @@ -92,7 +87,6 @@ kernel_bootstrap(struct boot_handoff* bhctx) * and start geting into uspace */ boot_end(bhctx); - boot_cleanup(); spawn_lunad(); } @@ -122,9 +116,16 @@ void 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) @@ -134,7 +135,7 @@ kmem_init(struct boot_handoff* bhctx) #else assert(mklft(ptep++, 0, KERNEL_DATA)); #endif - } while (ptep_vfn(ptep) < MAX_PTEN - 2); + } while (++i < MAX_PTEN); // allocators cake_init();