feat: GICv2 and timer
fix: TimerReset in GIC.c now uses kTimerFrequency
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
#include "../Common/bootinfo.h"
|
||||
#include <Arch/DTB.h>
|
||||
#include <Arch/Timer.h>
|
||||
#include <Arch/CPU.h>
|
||||
#include <Arch/GIC.h>
|
||||
#include <VM/PMM.h>
|
||||
#include <VM/VMM.h>
|
||||
#include <VM/Heap.h>
|
||||
@@ -15,9 +18,17 @@ void KernelMain(Bootinfo* bootinfo) {
|
||||
VMBootMemoryMap bootMap = {0};
|
||||
bootMap.reservedCount = 0;
|
||||
DTBParse(bootinfo->dtb, &bootMap);
|
||||
|
||||
PMMInitialize(&bootMap);
|
||||
VMMInitialize(&bootMap, bootinfo);
|
||||
HeapInitialize();
|
||||
|
||||
GICInitialize(
|
||||
(Pointer)VMPhysToHHDM(bootMap.GIC.GICD.base),
|
||||
(Pointer)VMPhysToHHDM(bootMap.GIC.GICC.base)
|
||||
);
|
||||
TimerInitialize();
|
||||
CPUEnableInterrupts();
|
||||
|
||||
OSLog("Kernel initialized.\n");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user