Enable allocated APIC interrupt and validate IO APIC mapping
All checks were successful
Builds / ExectOS (amd64, debug) (push) Successful in -59m26s
Builds / ExectOS (amd64, release) (push) Successful in -59m28s
Builds / ExectOS (i686, debug) (push) Successful in -59m23s
Builds / ExectOS (i686, release) (push) Successful in -59m25s

This commit is contained in:
2026-05-06 19:50:54 +02:00
parent 3262ad78c1
commit 8107692d83

View File

@@ -52,7 +52,7 @@ HL::Pic::AllocateSystemInterrupt(IN UCHAR Irq,
Register.DeliveryStatus = 0;
Register.Destination = HL::Pic::ReadApicRegister(APIC_ID) >> 24;
Register.DestinationMode = APIC_DM_Physical;
Register.Mask = 1;
Register.Mask = 0;
Register.PinPolarity = ((Flags & 0x03) == 0x03) ? 1 : 0;
Register.RemoteIRR = 0;
Register.Reserved = 0;
@@ -483,10 +483,15 @@ HL::Pic::InitializeIOApic(VOID)
while(ControllerIndex < ControllerCount)
{
/* Map the I/O APIC controller memory into hardware space */
MM::HardwarePool::MapHardwareMemory(Controllers[ControllerIndex].PhysicalAddress,
1,
FALSE,
(PVOID*)&Controllers[ControllerIndex].VirtualAddress);
Status = MM::HardwarePool::MapHardwareMemory(Controllers[ControllerIndex].PhysicalAddress,
1,
FALSE,
(PVOID*)&Controllers[ControllerIndex].VirtualAddress);
if(Status != STATUS_SUCCESS || Controllers[ControllerIndex].VirtualAddress == 0)
{
DebugPrint(L"ERROR: Failed to map I/O APIC Controller\n");
KE::Crash::Panic(0x0E, 0x0, 0x0, 0x0, 0x0);
}
/* Perform a memory barrier */
AR::CpuFunc::MemoryBarrier();