From: Alexei Alexei.Fedorov@arm.com
Declaration of MULTIPLE_APIC_DESCRIPTION_TABLE used for building the MADT table for ACPI revision 5.1 or higher includes the stucture EFI_ACPI_5_0_GIC_DISTRIBUTOR_STRUCTURE type. EFI_ACPI_5_0_GIC_DISTRIBUTOR_STRUCTURE is not compatible with EFI_ACPI_5_1_GIC_DISTRIBUTOR_STRUCTURE and EFI_ACPI_6_0_GIC_DISTRIBUTOR_STRUCTURE types which both have GicVersion field added: UINT8 GicVersion; UINT8 Reserved2[3]; compared with 5.0 revision table which has 4 bytes reserved: UINT32 Reserved2;
This commit changes the structure EFI_ACPI_5_0_GIC_DISTRIBUTOR_STRUCTURE type to EFI_ACPI_5_1_GIC_DISTRIBUTOR_STRUCTURE and replaces the GIC Distributor initialisation macro EFI_ACPI_5_0_GIC_DISTRIBUTOR_INIT() with EFI_ACPI_6_0_GIC_DISTRIBUTOR_INIT() setting GicVersion to 2 (GICv2)
The name EFI_ACPI_6_0_GIC_DISTRIBUTOR_INIT() is used for ACPI 5.1 builds because there is no definition of a relevant EFI_ACPI_5_1_GIC_DISTRIBUTOR_INIT() in EmbeddedPkg\Include\Library\AcpiLib.h but the GIC Distributor structures of 5.1 and 6.0 are identical.
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 --- Platforms/ARM/Juno/AcpiTables/Madt.aslc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Platforms/ARM/Juno/AcpiTables/Madt.aslc b/Platforms/ARM/Juno/AcpiTables/Madt.aslc index 37c06dae0fe1b307673b6b1033167f89866f814d..78531d2982875a3c535e5e30a2b9af7029956306 100644 --- a/Platforms/ARM/Juno/AcpiTables/Madt.aslc +++ b/Platforms/ARM/Juno/AcpiTables/Madt.aslc @@ -70,7 +70,7 @@ typedef struct { EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER Header; EFI_ACPI_5_1_GIC_STRUCTURE GicInterfaces[FixedPcdGet32 (PcdCoreCount)]; - EFI_ACPI_5_0_GIC_DISTRIBUTOR_STRUCTURE GicDistributor; + EFI_ACPI_5_1_GIC_DISTRIBUTOR_STRUCTURE GicDistributor; EFI_ACPI_6_0_GIC_MSI_FRAME_STRUCTURE MsiFrame; } MULTIPLE_APIC_DESCRIPTION_TABLE;
@@ -118,7 +118,7 @@ 1, 5, GET_MPID(0, 1), EFI_ACPI_5_0_GIC_ENABLED, 38, FixedPcdGet32 (PcdGicInterruptInterfaceBase), 0x2C06F000, 0x2C04F000, 25, 0 /* GicRBase */), }, - EFI_ACPI_5_0_GIC_DISTRIBUTOR_INIT(0, FixedPcdGet32 (PcdGicDistributorBase), 0), + EFI_ACPI_6_0_GIC_DISTRIBUTOR_INIT(0, FixedPcdGet32 (PcdGicDistributorBase), 0, 2), // Format: EFI_ACPI_6_0_GIC_MSI_FRAME_INIT(GicMsiFrameId, PhysicalBaseAddress, Flags, SPICount, SPIBase) EFI_ACPI_6_0_GIC_MSI_FRAME_INIT(0, ARM_JUNO_GIV2M_MSI_BASE, 0, ARM_JUNO_GIV2M_MSI_SPI_COUNT, ARM_JUNO_GIV2M_MSI_SPI_BASE) };