audk/ArmPkg/Drivers
Alexei Fedorov 7989300df7 ArmPkg/ArmGicDxe: Fix double GIC EIOR write per interrupt
This commit fixes a bug in the GIC v2 and v3 drivers where the GICC_EOIR
(End Of Interrupt Register) is written twice for a single interrupt.
GicV(2|3)IrqInterruptHandler() calls the Interrupt Handler and then
GicV(2|3)EndOfInterrupt() on exit:

 InterruptHandler = gRegisteredInterruptHandlers[GicInterrupt];
 if (InterruptHandler != NULL) {
   // Call the registered interrupt handler.
   InterruptHandler (GicInterrupt, SystemContext);
 } else {
   DEBUG ((EFI_D_ERROR, "Spurious GIC interrupt: 0x%x\n", GicInterrupt));
 }

 GicV2EndOfInterrupt (&gHardwareInterruptV2Protocol, GicInterrupt);

although gInterrupt->EndOfInterrupt() can be expected to have already
been called by InterruptHandler() [which is the case for the primary
in-tree handler in TimerDxe]

The fix moves the EndOfInterrupt() call inside the else case for
unregistered/spurious interrupts. This removes a potential race
condition that might have lost interrupts.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Alexei Fedorov <alexei.fedorov@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2016-08-08 15:46:00 +02:00
..
ArmCpuLib ArmPkg: apply Cortex-A57 errata 2016-03-25 07:09:49 +01:00
ArmGic ArmPkg/ArmGicDxe: Fix double GIC EIOR write per interrupt 2016-08-08 15:46:00 +02:00
ArmPciCpuIo2Dxe ArmPkg: implement CpuIo2 protocol driver specific for PCI 2016-04-29 18:04:25 +02:00
CpuDxe ArmPkg: Fix typos in comments 2016-07-11 10:29:44 +08:00
CpuPei ArmPkg: Rectify file modes 2016-01-30 12:25:59 +00:00
GenericWatchdogDxe ArmPkg/GenericWatchdogDxe: add missing VOID* cast 2015-08-10 07:54:47 +00:00
TimerDxe ArmPkg: allow HYP timer interrupt to be omitted 2015-02-28 20:24:57 +00:00