mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 23:44:35 +00:00
TODO
This commit is contained in:
parent
bcca1e9b6c
commit
e1036d0ff5
19
Kernel.cpp
19
Kernel.cpp
@ -13,10 +13,21 @@
|
|||||||
|
|
||||||
#include "Core/smbios.hpp"
|
#include "Core/smbios.hpp"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fennix Kernel
|
* 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:
|
* Bugs:
|
||||||
* - [ ] Kernel crashes when receiving interrupts for drivers only if the system has one core and the tasking is running.
|
* - [ ] 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);
|
Display->SetBuffer(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
EXTERNC __no_instrument_function void AfterEntry(BootInfo *Info)
|
EXTERNC __no_instrument_function void Main(BootInfo *Info)
|
||||||
{
|
{
|
||||||
BootClock = Time::ReadClock();
|
BootClock = Time::ReadClock();
|
||||||
bInfo = (BootInfo *)KernelAllocator.RequestPages(TO_PAGES(sizeof(BootInfo)));
|
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);
|
InitializeMemoryManagement(Info);
|
||||||
EnableProfiler = true;
|
EnableProfiler = true;
|
||||||
AfterEntry(Info);
|
Main(Info);
|
||||||
}
|
}
|
||||||
|
|
||||||
EXTERNC __no_stack_protector __no_instrument_function void BeforeShutdown()
|
EXTERNC __no_stack_protector __no_instrument_function void BeforeShutdown()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user