// MIT License, Copyright (c) 2020 Marvin Borner #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include PROTECTED extern u32 __stack_chk_guard; PROTECTED u32 __stack_chk_guard; int kernel_main(u32 magic, u32 addr); // Decl int kernel_main(u32 magic, u32 addr) { // Serial connection serial_install(); serial_print("\nKernel was compiled at " __TIME__ " on " __DATE__ "\n"); serial_print("Serial connected. LOOPING!\n"); multiboot_init(magic, addr); while (1) ; memory_install(); memory_switch_dir(virtual_kernel_dir()); cpu_enable_features(); cpu_print(); srand(rtc_stamp()); __stack_chk_guard = rand(); // Install drivers vfs_install(); ata_install(); pci_install(); interrupts_install(); io_install(); // Enable drivers sti(); syscall_init(); proc_init(); return 1; }