diff options
Diffstat (limited to 'arch/i386/kernel/multiboot.c')
-rw-r--r-- | arch/i386/kernel/multiboot.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/i386/kernel/multiboot.c b/arch/i386/kernel/multiboot.c index 87876f0..720866b 100644 --- a/arch/i386/kernel/multiboot.c +++ b/arch/i386/kernel/multiboot.c @@ -4,7 +4,7 @@ #include <kernel/idt.h> #include <kernel/pic.h> #include <kernel/paging.h> -#include <kernel/mem.h> +#include <kernel/pmem.h> #include <kernel/keyboard.h> #include <kernel/framebuffer.h> #include <kernel/timer.h> @@ -22,7 +22,6 @@ void i386_entry(uint32_t mboot_magic, struct mboot_info *header) { timer_init(); register_irq_handler(1, keyboard_handler); - enable_ints(); if (mboot_magic != MBOOT_LOADER_MAGIC) { fb_write("NOT BOOTED WITH MULTIBOOT BOOTLOADER\n", 37); @@ -30,6 +29,7 @@ void i386_entry(uint32_t mboot_magic, struct mboot_info *header) { disable_ints(); while (1); } + map_page(NULL, (uintptr_t)header, (uintptr_t)header, PD_PRES); if (!(header->flags >> 6 & 0x1)) { fb_write("NO MEMORY MAP FROM BOOTLOADER\n", 30); fb_write("RESET PC!\n", 10); @@ -37,6 +37,8 @@ void i386_entry(uint32_t mboot_magic, struct mboot_info *header) { while (1); } + pfa_init(header); + enable_ints(); kernel_main((char*)header->cmdline); while (1); |