#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include u32 stack_hold; void kernel_main(u32 magic, u32 addr, u32 esp) { multiboot_address = addr; stack_hold = esp; if (magic != MULTIBOOT_BOOTLOADER_MAGIC) { warn("Invalid boot magic!"); halt_loop(); } if (multiboot_address & 7) { warn("Unaligned mbi!"); halt_loop(); } info("Installing basic features of Melvix..."); // Install features bss_clean(); gdt_install(); serial_install(); idt_install(); isrs_install(); irq_install(); paging_install(); multiboot_parse(); // Install drivers timer_install(); mouse_install(); keyboard_install(); pci_remap(); network_install(); memory_print(); rtc_print(); ata_init(); ext2_init_fs(); load_binaries(); set_optimal_resolution(); log("Content of /etc/test: %s", read_file("/etc/test")); syscalls_install(); kexec("/bin/init"); // asm ("div %0" :: "r"(0)); // Exception testing x/0 }