WIP: modules

This commit is contained in:
karina
2026-05-03 15:49:40 +04:00
parent 2c7396353c
commit 08248e3f3c
13 changed files with 539 additions and 62 deletions
+7
View File
@@ -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");
}