irqchip/gic-v3-its: Allow use of LPI tables in reserved memory
If the LPI tables have been reserved with the EFI reservation
mechanism, we assume that these tables are safe to use even
when we find the redistributors to have LPIs enabled at
boot time, meaning that kexec can now work with GICv3.
You're welcome.
Tested-by: Jeremy Linton <email address hidden>
Tested-by: Bhupesh Sharma <email address hidden>
Tested-by: Lei Zhang <email address hidden>
Signed-off-by: Marc Zyngier <email address hidden>
(cherry picked from commit 5e2c9f9a627772672accd80fa15359c0de6aa894)
Signed-off-by: Kamal Mostafa <email address hidden>
efi: honour memory reservations passed via a linux specific config table
In order to allow the OS to reserve memory persistently across a
kexec, introduce a Linux-specific UEFI configuration table that
points to the head of a linked list in memory, allowing each kernel
to add list items describing memory regions that the next kernel
should treat as reserved.
This is useful, e.g., for GICv3 based ARM systems that cannot disable
DMA access to the LPI tables, forcing them to reuse the same memory
region again after a kexec reboot.
Tested-by: Jeremy Linton <email address hidden>
Signed-off-by: Ard Biesheuvel <email address hidden>
(backported from commit 71e0940d52e107748b270213a01d3b1546657d74)
Signed-off-by: Kamal Mostafa <email address hidden>
irqchip/gic-v3-its: Allow use of pre-programmed LPI tables
In order to cope with kexec and GICv3, let's try and spot when
we're booting with LPIs already enabled, and the tables already
programmed into the redistributors.
This code is currently guarded by a predicate that is always false,
meaning this is not functionnal just yet.
Reviewed-by: Julien Thierry <email address hidden>
Tested-by: Jeremy Linton <email address hidden>
Tested-by: Bhupesh Sharma <email address hidden>
Tested-by: Lei Zhang <email address hidden>
Signed-off-by: Marc Zyngier <email address hidden>
(backported from commit c440a9d9d113b9b3cd99bb5096c4aa47d515e463)
Signed-off-by: Kamal Mostafa <email address hidden>
irqchip/gic-v3-its: Keep track of property table's PA and VA
We're currently only tracking the page allocated to contain the
property table by its struct page. In the future, it is going to
be convenient to track both PA and VA for that page instead. Let's
do that.
Tested-by: Jeremy Linton <email address hidden>
Tested-by: Bhupesh Sharma <email address hidden>
Tested-by: Lei Zhang <email address hidden>
Signed-off-by: Marc Zyngier <email address hidden>
(cherry picked from commit e1a2e2010ba9d3c765b2e37a7ae8b332564716f1)
Signed-off-by: Kamal Mostafa <email address hidden>
irqchip/gic-v3-its: Move pending table allocation to init time
Pending tables for the redistributors are currently allocated
one at a time as each CPU boots. This is causing some grief
for Linux/RT (allocation from within a CPU hotplug notifier is
frown upon).
Let's move this allocation to take place at init time, when we
only have a single CPU. It means we're allocating memory for CPUs
that are not online yet, but most system will boot all of their
CPUs anyway, so that's not completely wasted.
Tested-by: Jeremy Linton <email address hidden>
Tested-by: Bhupesh Sharma <email address hidden>
Tested-by: Lei Zhang <email address hidden>
Signed-off-by: Marc Zyngier <email address hidden>
(backported from commit 11e37d357f6ba7a9af850a872396082cc0a0001f)
Signed-off-by: Kamal Mostafa <email address hidden>