From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.7115.1588683825897354084 for ; Tue, 05 May 2020 06:03:46 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: aditya.angadi@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9D7EE30E; Tue, 5 May 2020 06:03:45 -0700 (PDT) Received: from usa.arm.com (a073440-lin.blr.arm.com [10.162.16.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id AF9D53F68F; Tue, 5 May 2020 06:03:43 -0700 (PDT) From: "Aditya Angadi" To: devel@edk2.groups.io Cc: thomas.abraham@arm.com, ard.biesheuvel@arm.com, vijayenthiran.subramaniam@arm.com, leif@nuviainc.com, Aditya Angadi Subject: [PATCH v5][edk2-platforms 08/17] Platform/ARM/SgiPkg: Update SGI-575 MADT table to ACPI 6.2 Date: Tue, 5 May 2020 18:32:05 +0530 Message-Id: <20200505130214.25592-9-aditya.angadi@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200505130214.25592-1-aditya.angadi@arm.com> References: <20200505130214.25592-1-aditya.angadi@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Let the SGI-575 platform's MADT table be aligned with the MADT table of the other RD platforms supported in the SgiPkg. Signed-off-by: Aditya Angadi --- Platform/ARM/SgiPkg/AcpiTables/Sgi575/Madt.aslc | 130 +++++-------------= -- 1 file changed, 31 insertions(+), 99 deletions(-) diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Madt.aslc b/Platform/A= RM/SgiPkg/AcpiTables/Sgi575/Madt.aslc index dedabaaecdf4..f04b77929d71 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Madt.aslc +++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Madt.aslc @@ -17,147 +17,79 @@ #define CORES (FixedPcdGet32 (PcdClusterCount) * \ FixedPcdGet32 (PcdCoreCount)) =20 -// EFI_ACPI_6_1_GIC_STRUCTURE -#define EFI_ACPI_6_1_GICC_STRUCTURE_INIT(GicId, AcpiCpuUid, Mpidr, Flags= , \ - PmuIrq, GicBase, GicVBase, GicHBase, GsivId, GicRBase, Efficiency) = \ - { = \ - EFI_ACPI_6_1_GIC, /* Type */ = \ - sizeof (EFI_ACPI_6_1_GIC_STRUCTURE), /* Length */ = \ - EFI_ACPI_RESERVED_WORD, /* Reserved */ = \ - GicId, /* CPUInterfaceNumber */ = \ - AcpiCpuUid, /* AcpiProcessorUid */ = \ - Flags, /* Flags */ = \ - 0, /* ParkingProtocolVersion */ = \ - PmuIrq, /* PerformanceInterruptGsiv */= \ - 0, /* ParkedAddress */ = \ - GicBase, /* PhysicalBaseAddress */ = \ - GicVBase, /* GICV */ = \ - GicHBase, /* GICH */ = \ - GsivId, /* VGICMaintenanceInterrupt */= \ - GicRBase, /* GICRBaseAddress */ = \ - Mpidr, /* MPIDR */ = \ - Efficiency, /* ProcessorPowerEfficiencyCla= ss */ \ - { = \ - EFI_ACPI_RESERVED_BYTE, /* Reserved2[0] */ = \ - EFI_ACPI_RESERVED_BYTE, /* Reserved2[1] */ = \ - EFI_ACPI_RESERVED_BYTE /* Reserved2[2] */ = \ - } = \ - } - -// EFI_ACPI_6_1_GIC_DISTRIBUTOR_STRUCTURE -#define EFI_ACPI_6_1_GIC_DISTRIBUTOR_INIT(GicDistHwId, GicDistBase, = \ - GicDistVector, GicVersion) = \ - { = \ - EFI_ACPI_6_1_GICD, /* Type */ = \ - sizeof (EFI_ACPI_6_1_GIC_DISTRIBUTOR_STRUCTURE), = \ - EFI_ACPI_RESERVED_WORD, /* Reserved1 */ = \ - GicDistHwId, /* GicId */ = \ - GicDistBase, /* PhysicalBaseAddress */ = \ - GicDistVector, /* SystemVectorBase */ = \ - GicVersion, /* GicVersion */ = \ - { = \ - EFI_ACPI_RESERVED_BYTE, /* Reserved2[0] */ = \ - EFI_ACPI_RESERVED_BYTE, /* Reserved2[1] */ = \ - EFI_ACPI_RESERVED_BYTE, /* Reserved2[2] */ = \ - } = \ - } - -// EFI_ACPI_6_1_GICR_STRUCTURE -#define EFI_ACPI_6_1_GIC_REDISTRIBUTOR_INIT(RedisRegionAddr, RedisDiscLe= ngth) \ - { = \ - EFI_ACPI_6_1_GICR, /* Type */ = \ - sizeof (EFI_ACPI_6_1_GICR_STRUCTURE), /* Length */ = \ - EFI_ACPI_RESERVED_WORD, /* Reserved */ = \ - RedisRegionAddr, /* DiscoveryRangeBaseAddress *= / \ - RedisDiscLength /* DiscoveryRangeLength */ = \ - } - -// EFI_ACPI_6_1_GIC_ITS_STRUCTURE -#define EFI_ACPI_6_1_GIC_ITS_INIT(GicItsId, GicItsBase) = \ - { = \ - EFI_ACPI_6_1_GIC_ITS, /* Type */ = \ - sizeof (EFI_ACPI_6_1_GIC_ITS_STRUCTURE), = \ - EFI_ACPI_RESERVED_WORD, /* Reserved */ = \ - GicItsId, /* GicItsId */ = \ - GicItsBase, /* PhysicalBaseAddress */ = \ - EFI_ACPI_RESERVED_DWORD, /* DiscoveryRangeLength */ = \ - } - -// // Multiple APIC Description Table -// #pragma pack (1) =20 typedef struct { - EFI_ACPI_6_1_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER Header; - EFI_ACPI_6_1_GIC_STRUCTURE GicInterfaces[CO= RES]; - EFI_ACPI_6_1_GIC_DISTRIBUTOR_STRUCTURE GicDistributor; - EFI_ACPI_6_1_GICR_STRUCTURE GicRedistributor= ; - EFI_ACPI_6_1_GIC_ITS_STRUCTURE GicIts; -} EFI_ACPI_6_1_MULTIPLE_APIC_DESCRIPTION_TABLE; + EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER Header; + EFI_ACPI_6_2_GIC_STRUCTURE GicInterfaces[CO= RES]; + EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE GicDistributor; + EFI_ACPI_6_2_GICR_STRUCTURE GicRedistributor= ; + EFI_ACPI_6_2_GIC_ITS_STRUCTURE GicIts; +} EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE; =20 #pragma pack () =20 -STATIC EFI_ACPI_6_1_MULTIPLE_APIC_DESCRIPTION_TABLE Madt =3D { +STATIC EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE Madt =3D { { ARM_ACPI_HEADER ( - EFI_ACPI_6_1_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE, - EFI_ACPI_6_1_MULTIPLE_APIC_DESCRIPTION_TABLE, - EFI_ACPI_6_1_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION + EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE, + EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE, + EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION ), // MADT specific fields 0, // LocalApicAddress 0, // Flags }, { - // Format: EFI_ACPI_6_1_GICC_STRUCTURE_INIT(GicId, AcpiCpuUid, Mpidr= , Flags, + // Format: EFI_ACPI_6_2_GICC_STRUCTURE_INIT(GicId, AcpiCpuUid, Mpidr= , Flags, // PmuIrq, GicBase, GicVBas= e, // GicHBase, GsivId, GicRBa= se, // Efficiency) // Note: The GIC Structure of the primary CPU must be the first entr= y - // (see note in 5.2.12.14 GICC Structure of ACPI v6.1). - EFI_ACPI_6_1_GICC_STRUCTURE_INIT( // A75-0 - 0, 0, GET_MPID(0x0, 0x0), EFI_ACPI_6_1_GIC_ENABLED, 23, + // (see note in 5.2.12.14 GICC Structure of ACPI v6.2). + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // A75-0 + 0, 0, GET_MPID(0x0, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, FixedPcdGet32 (PcdGicDistributorBase), 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), - EFI_ACPI_6_1_GICC_STRUCTURE_INIT( // A75-1 - 0, 1, GET_MPID(0x0, 0x100), EFI_ACPI_6_1_GIC_ENABLED, 23, + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // A75-1 + 0, 1, GET_MPID(0x0, 0x100), EFI_ACPI_6_2_GIC_ENABLED, 23, FixedPcdGet32 (PcdGicDistributorBase), 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), - EFI_ACPI_6_1_GICC_STRUCTURE_INIT( // A75-2 - 0, 2, GET_MPID(0x0, 0x200), EFI_ACPI_6_1_GIC_ENABLED, 23, + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // A75-2 + 0, 2, GET_MPID(0x0, 0x200), EFI_ACPI_6_2_GIC_ENABLED, 23, FixedPcdGet32 (PcdGicDistributorBase), 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), - EFI_ACPI_6_1_GICC_STRUCTURE_INIT( // A75-3 - 0, 3, GET_MPID(0x0, 0x300), EFI_ACPI_6_1_GIC_ENABLED, 23, + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // A75-3 + 0, 3, GET_MPID(0x0, 0x300), EFI_ACPI_6_2_GIC_ENABLED, 23, FixedPcdGet32 (PcdGicDistributorBase), 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), =20 - EFI_ACPI_6_1_GICC_STRUCTURE_INIT( // A75-4 - 0, 4, GET_MPID(0x100, 0x00), EFI_ACPI_6_1_GIC_ENABLED, 23, + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // A75-4 + 0, 4, GET_MPID(0x100, 0x00), EFI_ACPI_6_2_GIC_ENABLED, 23, FixedPcdGet32 (PcdGicDistributorBase), 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), - EFI_ACPI_6_1_GICC_STRUCTURE_INIT( // A75-5 - 0, 5, GET_MPID(0x100, 0x100), EFI_ACPI_6_1_GIC_ENABLED, 23, + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // A75-5 + 0, 5, GET_MPID(0x100, 0x100), EFI_ACPI_6_2_GIC_ENABLED, 23, FixedPcdGet32 (PcdGicDistributorBase), 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), - EFI_ACPI_6_1_GICC_STRUCTURE_INIT( // A75-6 - 0, 6, GET_MPID(0x100, 0x200), EFI_ACPI_6_1_GIC_ENABLED, 23, + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // A75-6 + 0, 6, GET_MPID(0x100, 0x200), EFI_ACPI_6_2_GIC_ENABLED, 23, FixedPcdGet32 (PcdGicDistributorBase), 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), - EFI_ACPI_6_1_GICC_STRUCTURE_INIT( // A75-7 - 0, 7, GET_MPID(0x100, 0x300), EFI_ACPI_6_1_GIC_ENABLED, 23, + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // A75-7 + 0, 7, GET_MPID(0x100, 0x300), EFI_ACPI_6_2_GIC_ENABLED, 23, FixedPcdGet32 (PcdGicDistributorBase), 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), }, // GIC Distributor Entry - EFI_ACPI_6_1_GIC_DISTRIBUTOR_INIT(0, FixedPcdGet32 (PcdGicDistributorB= ase), + EFI_ACPI_6_2_GIC_DISTRIBUTOR_INIT(0, FixedPcdGet32 (PcdGicDistributorB= ase), 0, 3), // GIC Redistributor - EFI_ACPI_6_1_GIC_REDISTRIBUTOR_INIT(FixedPcdGet32 (PcdGicRedistributor= sBase), + EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(FixedPcdGet32 (PcdGicRedistributor= sBase), SIZE_1MB), // GIC ITS - EFI_ACPI_6_1_GIC_ITS_INIT(0, 0x30040000), + EFI_ACPI_6_2_GIC_ITS_INIT(0, 0x30040000), }; =20 // --=20 2.17.1