mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[HALX86/APIC] Read APIC Id from APIC instead of using initial Id
This is needed on some hardware systems, where the BIOS has modified the actual APIC IDs. The timer interrupt already did this, but in a broken way.
This commit is contained in:
@@ -385,7 +385,7 @@ HalpAllocateSystemInterrupt(
|
||||
ReDirReg.TriggerMode = APIC_TGM_Edge;
|
||||
ReDirReg.Mask = 1;
|
||||
ReDirReg.Reserved = 0;
|
||||
ReDirReg.Destination = 0;
|
||||
ReDirReg.Destination = ApicRead(APIC_ID) >> 24;
|
||||
|
||||
/* Initialize entry */
|
||||
ApicWriteIORedirectionEntry(Irq, ReDirReg);
|
||||
@@ -484,7 +484,7 @@ ApicInitializeIOApic(VOID)
|
||||
ReDirReg.TriggerMode = APIC_TGM_Edge;
|
||||
ReDirReg.Mask = 1;
|
||||
ReDirReg.Reserved = 0;
|
||||
ReDirReg.Destination = 0;
|
||||
ReDirReg.Destination = ApicRead(APIC_ID) >> 24;
|
||||
|
||||
/* Loop all table entries */
|
||||
for (Index = 0; Index < APIC_MAX_IRQ; Index++)
|
||||
@@ -505,7 +505,7 @@ ApicInitializeIOApic(VOID)
|
||||
ReDirReg.DestinationMode = APIC_DM_Physical;
|
||||
ReDirReg.TriggerMode = APIC_TGM_Level;
|
||||
ReDirReg.Mask = 1;
|
||||
ReDirReg.Destination = ApicRead(APIC_ID);
|
||||
ReDirReg.Destination = ApicRead(APIC_ID) >> 24;
|
||||
ApicWriteIORedirectionEntry(APIC_CLOCK_INDEX, ReDirReg);
|
||||
}
|
||||
|
||||
@@ -704,7 +704,7 @@ HalEnableSystemInterrupt(
|
||||
ReDirReg.Vector = Vector;
|
||||
ReDirReg.MessageType = APIC_MT_Fixed;
|
||||
ReDirReg.DestinationMode = APIC_DM_Physical;
|
||||
ReDirReg.Destination = KeGetCurrentPrcb()->InitialApicId;
|
||||
ReDirReg.Destination = ApicRead(APIC_ID) >> 24;
|
||||
ReDirReg.TriggerMode = (InterruptMode == LevelSensitive) ?
|
||||
APIC_TGM_Level : APIC_TGM_Edge;
|
||||
ReDirReg.Mask = FALSE;
|
||||
|
||||
Reference in New Issue
Block a user