audk/ArmPkg/Drivers/CpuDxe
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
..
AArch64 ArmPkg/CpuDxe: handle implied attributes in EfiAttributeToArmAttribute 2017-03-08 15:40:20 +01:00
Arm ArmPkg: move ARM version of SetMemoryAttributes to ArmMmuLib 2017-03-07 09:38:08 +01:00
CpuDxe.c ArmPkg/CpuDxe: ignore attribute changes during SyncCacheConfig() 2017-02-28 14:59:50 +00:00
CpuDxe.h ArmPkg: delete references to unused guids/Pcds from CpuDxe 2018-02-06 18:01:14 +00:00
CpuDxe.inf ArmPkg/Gic: force GIC driver to run before CPU arch protocol driver 2018-02-06 18:59:34 +00:00
CpuMmuCommon.c ArmPkg/ArmMmuLib: remove VirtualMask arg from ArmSetMemoryAttributes 2017-03-07 09:38:08 +01:00
CpuMpCore.c ARM Packages: Fixed missing braces (the warning was disabled by GCC) 2014-06-20 18:24:51 +00:00
Exception.c ArmPkg/CpuDxe: unmask SErrors in DEBUG builds 2016-07-01 13:24:50 +02:00