From e1036d0ff5469b23e6ad9d294002f28cea60ae70 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 21 Dec 2022 22:45:38 +0200 Subject: [PATCH] TODO --- Kernel.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/Kernel.cpp b/Kernel.cpp index 6c049d9..37d0b03 100644 --- a/Kernel.cpp +++ b/Kernel.cpp @@ -13,10 +13,21 @@ #include "Core/smbios.hpp" -/** +/** * Fennix Kernel * ------------- - * + * This is the main kernel file. It contains the main function and the kernel entry point. + * + * Loading procedure: + * [BOOT] -> [Bootloader] -> [Boot Info Parser] -> Entry() -> Main() -> KernelMainThread() + * - Bootloader + * - Entry() is the first function to be called by the boot info parser function after getting the boot info from the bootloader. + * - Main() is the first function to be called by Entry(). + * - KernelMainThread() is the first function to be called by the task manager. + * + * TODO: + * - [ ] Optimize SMP. + * * Bugs: * - [ ] Kernel crashes when receiving interrupts for drivers only if the system has one core and the tasking is running. */ @@ -71,7 +82,7 @@ EXTERNC void KPrint(const char *Format, ...) Display->SetBuffer(0); } -EXTERNC __no_instrument_function void AfterEntry(BootInfo *Info) +EXTERNC __no_instrument_function void Main(BootInfo *Info) { BootClock = Time::ReadClock(); bInfo = (BootInfo *)KernelAllocator.RequestPages(TO_PAGES(sizeof(BootInfo))); @@ -207,7 +218,7 @@ EXTERNC __no_stack_protector __no_instrument_function void Entry(BootInfo *Info) InitializeMemoryManagement(Info); EnableProfiler = true; - AfterEntry(Info); + Main(Info); } EXTERNC __no_stack_protector __no_instrument_function void BeforeShutdown()