WIP: modules
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <OS/Log.h>
|
||||
#include <OS/Panic.h>
|
||||
#include <OS/Scheduler.h>
|
||||
#include <OS/Modules.h>
|
||||
|
||||
void KernelMain(Bootinfo* bootinfo) {
|
||||
OSLog("Kernel started.\n");
|
||||
@@ -26,6 +27,7 @@ void KernelMain(Bootinfo* bootinfo) {
|
||||
DTBParse(bootinfo->dtb, &bootMap);
|
||||
PMMInitialize(&bootMap);
|
||||
VMMInitialize(&bootMap, bootinfo);
|
||||
bootinfo = (Bootinfo*)VMPhysToHHDM((Address)bootinfo);
|
||||
SerialUpdate(VMPhysToHHDM(bootMap.UART.base));
|
||||
HeapInitialize();
|
||||
|
||||
@@ -37,5 +39,10 @@ void KernelMain(Bootinfo* bootinfo) {
|
||||
CPUEnableInterrupts();
|
||||
SchedulerInitialize();
|
||||
|
||||
for (UInt32 i = 0; i < bootinfo->moduleCount; i++) {
|
||||
ModuleLoad(&bootinfo->modules[i]); // TODO: make some sort of priority of loading modules
|
||||
// like init first then uart then fb ...
|
||||
}
|
||||
|
||||
OSLog("Kernel initialized.\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user