From: "Aditya Angadi" <aditya.angadi@arm.com>
To: devel@edk2.groups.io
Cc: Aditya Angadi <aditya.angadi@arm.com>,
Leif Lindholm <leif@nuviainc.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [edk2-platforms][PATCH v3 2/9] Platform/ARM/SgiPkg: move the GIC
Date: Wed, 25 Mar 2020 16:22:45 +0530 [thread overview]
Message-ID: <20200325105252.13905-3-aditya.angadi@arm.com> (raw)
In-Reply-To: <20200325105252.13905-1-aditya.angadi@arm.com>
Move the ACPI helper macros defines related to GIC structure,
distributor, redistributor and ITS to SgiAcpiHeader.h as these are
common across ARM SGI/RD platforms.
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
---
Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc | 68 +------------------
Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc | 68 +------------------
Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc | 57 +---------------
| 70 +++++++++++++++++++-
4 files changed, 72 insertions(+), 191 deletions(-)
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc b/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc
index 48e7a61478e8..987254928535 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc
@@ -1,7 +1,7 @@
/** @file
* Multiple APIC Description Table (MADT)
*
-* Copyright (c) 2018, ARM Limited. All rights reserved.
+* Copyright (c) 2018-2020, ARM Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*
@@ -14,72 +14,6 @@
#include <Library/PcdLib.h>
#include <IndustryStandard/Acpi.h>
-// EFI_ACPI_6_2_GIC_STRUCTURE
-#define EFI_ACPI_6_2_GICC_STRUCTURE_INIT(GicId, AcpiCpuUid, Mpidr, Flags, \
- PmuIrq, GicBase, GicVBase, GicHBase, GsivId, GicRBase, Efficiency) \
- { \
- EFI_ACPI_6_2_GIC, /* Type */ \
- sizeof (EFI_ACPI_6_2_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, /* ProcessorPowerEfficiencyClass */ \
- { \
- EFI_ACPI_RESERVED_BYTE, /* Reserved2[0] */ \
- EFI_ACPI_RESERVED_BYTE, /* Reserved2[1] */ \
- EFI_ACPI_RESERVED_BYTE /* Reserved2[2] */ \
- } \
- }
-
-// EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE
-#define EFI_ACPI_6_2_GIC_DISTRIBUTOR_INIT(GicDistHwId, GicDistBase, \
- GicDistVector, GicVersion) \
- { \
- EFI_ACPI_6_2_GICD, /* Type */ \
- sizeof (EFI_ACPI_6_2_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_2_GICR_STRUCTURE
-#define EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(RedisRegionAddr, RedisDiscLength) \
- { \
- EFI_ACPI_6_2_GICR, /* Type */ \
- sizeof (EFI_ACPI_6_2_GICR_STRUCTURE), /* Length */ \
- EFI_ACPI_RESERVED_WORD, /* Reserved */ \
- RedisRegionAddr, /* DiscoveryRangeBaseAddress */ \
- RedisDiscLength /* DiscoveryRangeLength */ \
- }
-
-// EFI_ACPI_6_2_GIC_ITS_STRUCTURE
-#define EFI_ACPI_6_2_GIC_ITS_INIT(GicItsId, GicItsBase) \
- { \
- EFI_ACPI_6_2_GIC_ITS, /* Type */ \
- sizeof (EFI_ACPI_6_2_GIC_ITS_STRUCTURE), \
- EFI_ACPI_RESERVED_WORD, /* Reserved */ \
- GicItsId, /* GicItsId */ \
- GicItsBase, /* PhysicalBaseAddress */ \
- EFI_ACPI_RESERVED_DWORD /* DiscoveryRangeLength */ \
- }
-
// Multiple APIC Description Table
#pragma pack (1)
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc b/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc
index 6312743a479c..05eb78c5616a 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc
@@ -1,7 +1,7 @@
/** @file
* Multiple APIC Description Table (MADT)
*
-* Copyright (c) 2018, ARM Limited. All rights reserved.
+* Copyright (c) 2018-2020, ARM Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*
@@ -17,72 +17,6 @@
#define CORE_CNT (FixedPcdGet32 (PcdClusterCount) * \
FixedPcdGet32 (PcdCoreCount))
-// EFI_ACPI_6_2_GIC_STRUCTURE
-#define EFI_ACPI_6_2_GICC_STRUCTURE_INIT(GicId, AcpiCpuUid, Mpidr, Flags, \
- PmuIrq, GicBase, GicVBase, GicHBase, GsivId, GicRBase, Efficiency) \
- { \
- EFI_ACPI_6_2_GIC, /* Type */ \
- sizeof (EFI_ACPI_6_2_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, /* ProcessorPowerEfficiencyClass */ \
- { \
- EFI_ACPI_RESERVED_BYTE, /* Reserved2[0] */ \
- EFI_ACPI_RESERVED_BYTE, /* Reserved2[1] */ \
- EFI_ACPI_RESERVED_BYTE /* Reserved2[2] */ \
- } \
- }
-
-// EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE
-#define EFI_ACPI_6_2_GIC_DISTRIBUTOR_INIT(GicDistHwId, GicDistBase, \
- GicDistVector, GicVersion) \
- { \
- EFI_ACPI_6_2_GICD, /* Type */ \
- sizeof (EFI_ACPI_6_2_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_2_GICR_STRUCTURE
-#define EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(RedisRegionAddr, RedisDiscLength) \
- { \
- EFI_ACPI_6_2_GICR, /* Type */ \
- sizeof (EFI_ACPI_6_2_GICR_STRUCTURE), /* Length */ \
- EFI_ACPI_RESERVED_WORD, /* Reserved */ \
- RedisRegionAddr, /* DiscoveryRangeBaseAddress */ \
- RedisDiscLength /* DiscoveryRangeLength */ \
- }
-
-// EFI_ACPI_6_2_GIC_ITS_STRUCTURE
-#define EFI_ACPI_6_2_GIC_ITS_INIT(GicItsId, GicItsBase) \
- { \
- EFI_ACPI_6_2_GIC_ITS, /* Type */ \
- sizeof (EFI_ACPI_6_2_GIC_ITS_STRUCTURE), \
- EFI_ACPI_RESERVED_WORD, /* Reserved */ \
- GicItsId, /* GicItsId */ \
- GicItsBase, /* PhysicalBaseAddress */ \
- EFI_ACPI_RESERVED_DWORD /* DiscoveryRangeLength */ \
- }
-
// Multiple APIC Description Table
#pragma pack (1)
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc
index d4538233d760..47368931e367 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc
@@ -1,7 +1,7 @@
/** @file
* Multiple APIC Description Table (MADT)
*
-* Copyright (c) 2019, ARM Limited. All rights reserved.
+* Copyright (c) 2019-2020, ARM Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*
@@ -19,61 +19,6 @@
#define CHIP_CNT 2
-// EFI_ACPI_6_2_GIC_STRUCTURE
-#define EFI_ACPI_6_2_GICC_STRUCTURE_INIT(GicId, AcpiCpuUid, Mpidr, Flags, \
- PmuIrq, GicBase, GicVBase, GicHBase, GsivId, GicRBase, Efficiency) \
- { \
- EFI_ACPI_6_2_GIC, /* Type */ \
- sizeof (EFI_ACPI_6_2_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, /* ProcessorPowerEfficiencyClass */ \
- { \
- EFI_ACPI_RESERVED_BYTE, /* Reserved2[0] */ \
- EFI_ACPI_RESERVED_BYTE, /* Reserved2[1] */ \
- EFI_ACPI_RESERVED_BYTE /* Reserved2[2] */ \
- } \
- }
-
-// EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE
-#define EFI_ACPI_6_2_GIC_DISTRIBUTOR_INIT(GicDistHwId, GicDistBase, \
- GicDistVector, GicVersion) \
- { \
- EFI_ACPI_6_2_GICD, /* Type */ \
- sizeof (EFI_ACPI_6_2_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_2_GICR_STRUCTURE
-#define EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(RedisRegionAddr, RedisDiscLength) \
- { \
- EFI_ACPI_6_2_GICR, /* Type */ \
- sizeof (EFI_ACPI_6_2_GICR_STRUCTURE), /* Length */ \
- EFI_ACPI_RESERVED_WORD, /* Reserved */ \
- RedisRegionAddr, /* DiscoveryRangeBaseAddress */ \
- RedisDiscLength /* DiscoveryRangeLength */ \
- }
-
// Multiple APIC Description Table
#pragma pack (1)
--git a/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h b/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h
index 5083dde15dd5..ecb0d4eccf24 100644
--- a/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h
+++ b/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h
@@ -1,6 +1,6 @@
/** @file
*
-* Copyright (c) 2018, ARM Limited. All rights reserved.
+* Copyright (c) 2018-2020, ARM Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*
@@ -9,6 +9,8 @@
#ifndef __SGI_ACPI_HEADER__
#define __SGI_ACPI_HEADER__
+#include <IndustryStandard/Acpi.h>
+
//
// ACPI table information used to initialize tables.
//
@@ -32,4 +34,70 @@
EFI_ACPI_ARM_CREATOR_REVISION /* UINT32 CreatorRevision */ \
}
+// EFI_ACPI_6_2_GIC_STRUCTURE
+#define EFI_ACPI_6_2_GICC_STRUCTURE_INIT(GicId, AcpiCpuUid, Mpidr, Flags, \
+ PmuIrq, GicBase, GicVBase, GicHBase, GsivId, GicRBase, Efficiency) \
+ { \
+ EFI_ACPI_6_2_GIC, /* Type */ \
+ sizeof (EFI_ACPI_6_2_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, /* ProcessorPowerEfficiencyClass */ \
+ { \
+ EFI_ACPI_RESERVED_BYTE, /* Reserved2[0] */ \
+ EFI_ACPI_RESERVED_BYTE, /* Reserved2[1] */ \
+ EFI_ACPI_RESERVED_BYTE /* Reserved2[2] */ \
+ } \
+ }
+
+// EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE
+#define EFI_ACPI_6_2_GIC_DISTRIBUTOR_INIT(GicDistHwId, GicDistBase, \
+ GicDistVector, GicVersion) \
+ { \
+ EFI_ACPI_6_2_GICD, /* Type */ \
+ sizeof (EFI_ACPI_6_2_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_2_GICR_STRUCTURE
+#define EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(RedisRegionAddr, RedisDiscLength) \
+ { \
+ EFI_ACPI_6_2_GICR, /* Type */ \
+ sizeof (EFI_ACPI_6_2_GICR_STRUCTURE), /* Length */ \
+ EFI_ACPI_RESERVED_WORD, /* Reserved */ \
+ RedisRegionAddr, /* DiscoveryRangeBaseAddress */ \
+ RedisDiscLength /* DiscoveryRangeLength */ \
+ }
+
+// EFI_ACPI_6_2_GIC_ITS_STRUCTURE
+#define EFI_ACPI_6_2_GIC_ITS_INIT(GicItsId, GicItsBase) \
+ { \
+ EFI_ACPI_6_2_GIC_ITS, /* Type */ \
+ sizeof (EFI_ACPI_6_2_GIC_ITS_STRUCTURE), \
+ EFI_ACPI_RESERVED_WORD, /* Reserved */ \
+ GicItsId, /* GicItsId */ \
+ GicItsBase, /* PhysicalBaseAddress */ \
+ EFI_ACPI_RESERVED_DWORD /* DiscoveryRangeLength */ \
+ }
+
#endif /* __SGI_ACPI_HEADER__ */
--
2.17.1
next prev parent reply other threads:[~2020-03-25 10:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-25 10:52 [edk2-platforms][PATCH v3 0/8] Add platform support for RD-Daniel Aditya Angadi
2020-03-25 10:52 ` [edk2-platforms][PATCH v3 1/9] Platform/ARM/SgiPkg: create individual Aditya Angadi
2020-03-31 10:33 ` Ard Biesheuvel
2020-03-31 10:42 ` Ard Biesheuvel
2020-04-13 12:31 ` [edk2-devel] " Aditya Angadi
2020-03-25 10:52 ` Aditya Angadi [this message]
2020-03-31 10:35 ` [edk2-platforms][PATCH v3 2/9] Platform/ARM/SgiPkg: move the GIC Ard Biesheuvel
2020-03-25 10:52 ` [edk2-platforms][PATCH v3 3/9] Platform/ARM/SgiPkg: move common Aditya Angadi
2020-03-31 10:36 ` Ard Biesheuvel
2020-03-25 10:52 ` [edk2-platforms][PATCH v3 4/9] Platform/ARM/SgiPkg: remove Aditya Angadi
2020-03-31 10:37 ` Ard Biesheuvel
2020-03-25 10:52 ` [edk2-platforms][PATCH v3 5/9] Platform/ARM/SgiPkg: add ACPI tables Aditya Angadi
2020-03-31 10:40 ` Ard Biesheuvel
2020-03-25 10:52 ` [edk2-platforms][PATCH v3 6/9] Platform/ARM/Sgi: add initial support Aditya Angadi
2020-03-31 10:39 ` Ard Biesheuvel
2020-03-25 10:52 ` [edk2-platforms][PATCH v3 7/9] Platform/ARM/SgiPkg: add ACPI tables Aditya Angadi
2020-03-31 10:45 ` Ard Biesheuvel
2020-03-25 10:52 ` [edk2-platforms][PATCH v3 8/9] Platform/ARM/Sgi: add initial support Aditya Angadi
2020-03-31 10:46 ` Ard Biesheuvel
2020-03-25 10:52 ` [edk2-platforms][PATCH v3 9/9] Maintainers.txt: Update Arm platform Aditya Angadi
2020-03-31 10:48 ` Ard Biesheuvel
2020-03-29 16:41 ` [edk2-devel] [edk2-platforms][PATCH v3 0/8] Add platform support for RD-Daniel Thomas Abraham
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200325105252.13905-3-aditya.angadi@arm.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox