GIC Private Peripheral Interrupts (PPI) are defined as GIC INTID 16-31.
As in, PPI0 is INTID16 .. PPI15 is INTID31.
Arm's Base System Architecture specification (BSA) lists the mandated and
recommended private interrupt IDs by INTID, not by PPI index. But current
definitions in qemu define them by PPI index, complicating cross
referencing.
Meanwhile, the PPI(x) macro counterintuitively adds 16 to the input value,
converting a PPI index to an INTID.
Resolve this by redefining the BSA-allocated PPIs by their INTIDs,
inverting the logic of the PPI(x) macro and flipping where it is used.
Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
---
hw/arm/virt-acpi-build.c | 4 ++--
hw/arm/virt.c | 9 +++++----
include/hw/arm/bsa.h | 14 +++++++-------
3 files changed, 14 insertions(+), 13 deletions(-)