#include "hal/hal.h" #include "drivers/drivers.h" #include #include #include #include #include #include #include extern uint32 _end; extern void luxInitrdInstall (MultibootInfo* info); void k_main(MultibootInfo* info, uint32 initial_stack) { TaskingSetInitialStack(initial_stack); uint32 KernelEnd = (uint32)&_end; // Find kernel's end if (info->Flags & 0x8) { uint32 i = 0; MultibootModule* modules = (MultibootModule*) info->ModulesAddress; for (i = 0; i < info->ModulesCount; i++) KernelEnd = Max(KernelEnd, modules[i].ModuleEnd); } ConsoleClear(); MemoryTempInitialize(KernelEnd); MemoryInitialize(info); TaskingInitialize(); HalInitialize(); luxInitrdInstall(info); DriversInstall(); // Set up memory manager Log("Console", "All ready. Starting console...\n\n"); ConsoleMain(); }