diff options
author | Marvin Borner | 2019-10-30 16:02:10 +0100 |
---|---|---|
committer | Marvin Borner | 2019-10-30 16:02:10 +0100 |
commit | 118898807865ba11f5d7754f6f0572a0403f8512 (patch) | |
tree | 0b69c881089d659ebb214c409b699cc06323ab3d /src/kernel/kernel.c | |
parent | fd4f0a11126a20e75d72f8f2e6d418598fd5f37d (diff) |
Started implementation of initrd based vfs
Diffstat (limited to 'src/kernel/kernel.c')
-rw-r--r-- | src/kernel/kernel.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/kernel/kernel.c b/src/kernel/kernel.c index 75867a8..cba4f6e 100644 --- a/src/kernel/kernel.c +++ b/src/kernel/kernel.c @@ -6,6 +6,8 @@ #include <kernel/paging/paging.h> #include <kernel/input/input.h> #include <kernel/acpi/acpi.h> +#include <kernel/mutliboot.h> +#include <kernel/fs/initrd.h> void init() { vga_log("Installing basic features of Melvix...", 0); @@ -25,9 +27,19 @@ void init() { asm volatile ("sti"); } -void kernel_main(void) { +void kernel_main(struct multiboot *mboot_ptr) { init(); + info("Kernel size in KiB: "); + vesa_draw_number((int) end >> 10); + + assert(mboot_ptr->mods_count > 0); + uint32_t initrd_location = *((uint32_t *) mboot_ptr->mods_addr); + uint32_t initrd_end = *(uint32_t *) (mboot_ptr->mods_addr + 4); + // Don't trample our module with placement accesses, please! + // placement_address = initrd_end; + fs_root = initialise_initrd(initrd_location); + // asm volatile ("div %0" :: "r"(0)); // Exception testing x/0 loop: asm volatile ("hlt"); |