diff options
author | Danny Holman <dholman@gymli.org> | 2025-01-12 01:17:36 -0600 |
---|---|---|
committer | Danny Holman <dholman@gymli.org> | 2025-01-12 01:19:11 -0600 |
commit | 95cd78840f0891e60f5ebecc8a8eb4fbaf3c2ebf (patch) | |
tree | c8c35347b50477929727fa5be9f5d0f55cbe18fd /arch/i386/kernel/multiboot.c | |
parent | 5e166f3042a8e7b3031aae4da7006f80caa53ecc (diff) |
PROJECT RESTRUCTURING
Move the entire kernel into its own directory. Create new directories
for system commands, libraries and other required essentials for a
complete Unix-like operating system.
Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'arch/i386/kernel/multiboot.c')
-rw-r--r-- | arch/i386/kernel/multiboot.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/arch/i386/kernel/multiboot.c b/arch/i386/kernel/multiboot.c deleted file mode 100644 index dedf163..0000000 --- a/arch/i386/kernel/multiboot.c +++ /dev/null @@ -1,49 +0,0 @@ -#include <kernel/multiboot.h> -#include <kernel/asm.h> -#include <kernel/gdt.h> -#include <kernel/idt.h> -#include <kernel/pic.h> -#include <kernel/paging.h> -#include <kernel/pmem.h> -#include <kernel/timer.h> -#include <kernel/panic.h> -#include <kernel/vmem.h> -#include <kernel/video/framebuffer.h> -#include <libk/io.h> -#include <libk/string.h> -#include <libk/kmalloc.h> - -void kernel_main(char *cmdline); - -void i386_entry(uint32_t mboot_magic, struct mboot_info *header) { - map_page(0xB8000, (uintptr_t)VGA_MEMORY, PD_RW); - fb_init(); - - if (mboot_magic != MBOOT_LOADER_MAGIC) { - disable_ints(); - panic("Not booted with multiboot bootloader"); - } - - map_page(0x9000, 0x9000, PD_RW); - if (!(header->flags >> 6 & 0x1)) { - disable_ints(); - panic("Physical memory map not provided by bootloader"); - } - - char cmdline[4096]; - map_page(header->cmdline, PAGE_TMP_MAP, 0); - memcpy(cmdline, (char*)PAGE_TMP_MAP, strlen((char*)PAGE_TMP_MAP)); - unmap_page(PAGE_TMP_MAP); - pfa_init(header); - gdt_install(); - idt_install(); - paging_init(); - map_page(0xB8000, (uintptr_t)VGA_MEMORY, PD_RW); - pic_remap(); - timer_init(); - - enable_ints(); - kernel_main(cmdline); - - while (1); -} |