audk/ArmPkg/Drivers
Ard Biesheuvel 61a7b0ec63 ArmPkg/Gic: force GIC driver to run before CPU arch protocol driver
Currently, the GIC driver has a static dependency on the CPU arch protocol
driver, so it can register its IRQ handler at init time. This means there
is a window between dispatch of the CPU driver and dispatch of the GIC
driver where any unexpected GIC state may trigger an interrupt which we
are not set up to handle yet. Note that this is even the case if we enter
UEFI with interrupts disabled at the CPU, given that any TPL manipulation
involving TPL_HIGH_LEVEL will unconditionally enable IRQs at the CPU side
regardless of whether they were enabled to begin with (but only as soon as
the CPU arch protocol is actually installed)

So let's reorder the GIC driver with the CPU driver, and let it run its
initialization that puts the GIC into a known state before enabling
interrupts. Move its installation of its IRQ handler to a protocol notify
callback on the CPU arch protocol so that it runs as soon as it becomes
available.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Tested-by: Marc Zyngier <marc.zyngier@arm.com>
2018-02-06 18:59:34 +00:00
..
ArmCrashDumpDxe ArmPkg: add ArmCrashDumpDxe driver 2017-09-06 17:48:03 +01:00
ArmGic ArmPkg/Gic: force GIC driver to run before CPU arch protocol driver 2018-02-06 18:59:34 +00:00
ArmPciCpuIo2Dxe ArmPkg: implement CpuIo2 protocol driver specific for PCI 2016-04-29 18:04:25 +02:00
CpuDxe ArmPkg/Gic: force GIC driver to run before CPU arch protocol driver 2018-02-06 18:59:34 +00:00
CpuPei ArmPkg: Rectify file modes 2016-01-30 12:25:59 +00:00
GenericWatchdogDxe ArmPkg/GenericWatchdogDxe: Set Watchdog interrupt type 2017-10-05 21:23:39 +01:00
TimerDxe ArmPkg/ArmLib: remove indirection layer from timer register accessors 2017-01-20 15:51:34 +00:00