feat: GICv2 and timer

fix: TimerReset in GIC.c now uses kTimerFrequency
This commit is contained in:
karina
2026-04-29 08:46:13 +04:00
parent 270aae56b4
commit 7fcb50587e
10 changed files with 181 additions and 5 deletions
+28
View File
@@ -0,0 +1,28 @@
#pragma once
#include <Types.h>
#include <Arch/IO.h>
#include <Arch/Exceptions.h>
enum {
kGICDBaseAddress = 0x08000000,
kGICCBaseAddress = kGICDBaseAddress + 0x10000,
// GIC Distributor (GICD), offsets from GICD base
kGICDCTLR = 0x000, // control
kGICDTYPER = 0x004, // controller type
kGICDISENABLER = 0x100, // interrupt set-enable
kGICDICENABLER = 0x180, // interrupt clear-enable
kGICDICPENDR = 0x280, // interrupt clear-pending
kGICDIPRIORITYR = 0x400, // interrupt priority
kGICDITARGETSR = 0x800, // interrupt processor targets
// GIC CPU interface (GICC), offsets from CPU interface base
kGICCCTLR = 0x000, // CPU interface control
kGICCPMR = 0x004, // priority mask
kGICCIAR = 0x00C, // interrupt acknowledge
kGICCEOIR = 0x010, // end of interrupt
};
void GICInitialize(Pointer gicdVirtBase, Pointer giccVirtBase);
void GICEnableInterrupt(UInt32 irqID);
void GICDispatch(ExceptionsType type);