audk/ArmPkg
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
..
Application/LinuxLoader ArmPkg: LinuxLoader: fix typo in help string 2016-01-20 14:55:58 +00:00
Drivers ArmPkg/ArmGicDxe: Fix double GIC EIOR write per interrupt 2016-08-08 15:46:00 +02:00
Filesystem/SemihostFs ArmPkg/SemihostFs: Implement SetInfo() and handle seeking past the end of a file 2014-10-27 10:42:51 +00:00
Include ArmPkg: Add Cortex-A72 CPU type 2016-07-28 15:27:53 +01:00
Library ArmPkg/CompilerIntrinsicsLib: make the default memset() weak 2016-08-05 16:32:36 +02:00
ArmPkg.dec ArmPkg: introduce ArmMmuLib library class 2016-07-07 14:33:47 +02:00
ArmPkg.dsc ArmPkg: ARM/AArch64 implementation of CpuExceptionHandlerLib 2016-03-16 12:19:58 +01:00
Contributions.txt */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
License.txt ArmPkg: Rectify file modes 2016-01-30 12:25:59 +00:00