Platforms/ARM/Juno/ACPI: Fix MADT table

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>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
1 file changed