From: "Aditya Angadi" <aditya.angadi@arm.com>
To: devel@edk2.groups.io
Cc: thomas.abraham@arm.com, ard.biesheuvel@arm.com,
vijayenthiran.subramaniam@arm.com, leif@nuviainc.com,
Aditya Angadi <aditya.angadi@arm.com>
Subject: [PATCH v5][edk2-platforms 05/17] Platform/ARM/SgiPkg: Let platform specify the ACPI tables to include
Date: Tue, 5 May 2020 18:32:02 +0530 [thread overview]
Message-ID: <20200505130214.25592-6-aditya.angadi@arm.com> (raw)
In-Reply-To: <20200505130214.25592-1-aditya.angadi@arm.com>
The last change in moving away from single binary for all SGI/RD
platforms to independent binary for each platform is to let the platform
select only the ACPI table module that is required for the platform.
Each platform dsc file specifies the ACPI table module to use. All the
platform specific ACPI table modules are assigned a common file guid
which is looked up by the platform dxe driver, thereby, removing the
need to lookup for a ACPI table module file guid using the platform
id hob.
Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
---
Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf | 2 +-
Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf | 2 +-
Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf | 2 +-
Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf | 2 +-
Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c | 69 +-------------------
Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf | 5 +-
Platform/ARM/SgiPkg/RdE1Edge/RdE1Edge.dsc | 8 +++
Platform/ARM/SgiPkg/RdN1Edge/RdN1Edge.dsc | 8 +++
Platform/ARM/SgiPkg/RdN1EdgeX2/RdN1EdgeX2.dsc | 8 +++
Platform/ARM/SgiPkg/Sgi575/Sgi575.dsc | 10 +++
Platform/ARM/SgiPkg/SgiPlatform.dec | 5 +-
Platform/ARM/SgiPkg/SgiPlatform.dsc.inc | 4 --
Platform/ARM/SgiPkg/SgiPlatform.fdf | 5 +-
13 files changed, 42 insertions(+), 88 deletions(-)
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
index 3a4d4e7b9502..e780698cdf57 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
@@ -10,7 +10,7 @@
[Defines]
INF_VERSION = 0x0001001A
BASE_NAME = RdE1EdgeAcpiTables
- FILE_GUID = 2af40815-a84e-4de9-8c38-9140b3544073
+ FILE_GUID = c712719a-0aaf-438c-9cdd-35ab4d60207d # gArmSgiAcpiTablesGuid
MODULE_TYPE = USER_DEFINED
VERSION_STRING = 1.0
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
index 58c33ecb8ec2..871697eab19e 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
@@ -10,7 +10,7 @@
[Defines]
INF_VERSION = 0x0001001A
BASE_NAME = RdN1EdgeAcpiTables
- FILE_GUID = 4b0b91d0-4a05-45c4-88a7-88e170e76694
+ FILE_GUID = c712719a-0aaf-438c-9cdd-35ab4d60207d # gArmSgiAcpiTablesGuid
MODULE_TYPE = USER_DEFINED
VERSION_STRING = 1.0
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
index 1b584b152455..61f17b3ee8ac 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
@@ -10,7 +10,7 @@
[Defines]
INF_VERSION = 0x0001001A
BASE_NAME = RdN1EdgeX2AcpiTables
- FILE_GUID = 82a34150-0fc6-45f4-8ea0-f0a4660cf35d
+ FILE_GUID = c712719a-0aaf-438c-9cdd-35ab4d60207d # gArmSgiAcpiTablesGuid
MODULE_TYPE = USER_DEFINED
VERSION_STRING = 1.0
diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
index 097ef854df42..466e0fb658eb 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
+++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
@@ -10,7 +10,7 @@
[Defines]
INF_VERSION = 0x0001001A
BASE_NAME = Sgi575AcpiTables
- FILE_GUID = c712719a-0aaf-438c-9cdd-35ab4d60207d # gSgi575AcpiTablesFileGuid
+ FILE_GUID = c712719a-0aaf-438c-9cdd-35ab4d60207d # gArmSgiAcpiTablesGuid
MODULE_TYPE = USER_DEFINED
VERSION_STRING = 1.0
diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
index 387397d74598..2f72e7152ff3 100644
--- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
+++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
@@ -11,43 +11,6 @@
#include <Library/HobLib.h>
#include <SgiPlatform.h>
-typedef struct {
- SGI_PLATFORM_DESCRIPTOR SgiPlafromDescriptor;
- CONST EFI_GUID* AcpiTableGuid;
-} SGI_PLATFORM_ACPI_TABLE_GUID_LOOKUP;
-
-// Macro to construct the SGI_PLATFORM_ACPI_TABLE_GUID_LOOKUP structure
-#define ACPI_GUID_LOOKUP(PART_NUM, CONFIG_NUM, MULTI_CHIP_MODE, GUID) \
-{ \
- { \
- PART_NUM, CONFIG_NUM, MULTI_CHIP_MODE \
- }, \
- GUID \
-} \
-
-STATIC SGI_PLATFORM_ACPI_TABLE_GUID_LOOKUP AcpiTableGuidLookup[] = {
- ACPI_GUID_LOOKUP (
- SGI575_PART_NUM,
- SGI575_CONF_NUM,
- MULTI_CHIP_MODE_DISABLED,
- &gSgi575AcpiTablesFileGuid),
- ACPI_GUID_LOOKUP (
- RD_N1E1_EDGE_PART_NUM,
- RD_N1_EDGE_CONF_ID,
- MULTI_CHIP_MODE_DISABLED,
- &gRdN1EdgeAcpiTablesFileGuid),
- ACPI_GUID_LOOKUP (
- RD_N1E1_EDGE_PART_NUM,
- RD_N1_EDGE_CONF_ID,
- MULTI_CHIP_MODE_ENABLED,
- &gRdN1EdgeX2AcpiTablesFileGuid),
- ACPI_GUID_LOOKUP (
- RD_N1E1_EDGE_PART_NUM,
- RD_E1_EDGE_CONF_ID,
- MULTI_CHIP_MODE_DISABLED,
- &gRdE1EdgeAcpiTablesFileGuid),
-};
-
VOID
InitVirtioDevices (
VOID
@@ -61,38 +24,8 @@ ArmSgiPkgEntryPoint (
)
{
EFI_STATUS Status;
- VOID *SystemIdHob;
- SGI_PLATFORM_DESCRIPTOR *HobData;
- UINTN Idx;
- UINT32 ConfigId;
- UINT32 PartNum;
- UINT32 MultiChipMode;
-
- SystemIdHob = GetFirstGuidHob (&gArmSgiPlatformIdDescriptorGuid);
- if (SystemIdHob == NULL) {
- DEBUG ((DEBUG_ERROR, "System ID HOB is NULL\n"));
- return EFI_INVALID_PARAMETER;
- }
-
- HobData = (SGI_PLATFORM_DESCRIPTOR *)GET_GUID_HOB_DATA (SystemIdHob);
-
- PartNum = HobData->PlatformId;
- ConfigId = HobData->ConfigId;
- MultiChipMode = HobData->MultiChipMode;
-
- Status = EFI_UNSUPPORTED;
-
- // Walk through the AcpiTableGuidLookup lookup array
- for (Idx = 0; Idx < ARRAY_SIZE (AcpiTableGuidLookup); Idx++) {
- if ((PartNum == AcpiTableGuidLookup[Idx].SgiPlafromDescriptor.PlatformId) &&
- (ConfigId == AcpiTableGuidLookup[Idx].SgiPlafromDescriptor.ConfigId) &&
- (MultiChipMode ==
- AcpiTableGuidLookup[Idx].SgiPlafromDescriptor.MultiChipMode)) {
- Status = LocateAndInstallAcpiFromFv (AcpiTableGuidLookup[Idx].AcpiTableGuid);
- break;
- }
- }
+ Status = LocateAndInstallAcpiFromFv (&gArmSgiAcpiTablesGuid);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Failed to install ACPI tables\n", __FUNCTION__));
return Status;
diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
index 741dcc75ed6a..9d89314a594e 100644
--- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
+++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
@@ -30,10 +30,7 @@ [LibraryClasses]
[Guids]
gArmSgiPlatformIdDescriptorGuid
- gSgi575AcpiTablesFileGuid
- gRdN1EdgeAcpiTablesFileGuid
- gRdN1EdgeX2AcpiTablesFileGuid
- gRdE1EdgeAcpiTablesFileGuid
+ gArmSgiAcpiTablesGuid
[FeaturePcd]
gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported
diff --git a/Platform/ARM/SgiPkg/RdE1Edge/RdE1Edge.dsc b/Platform/ARM/SgiPkg/RdE1Edge/RdE1Edge.dsc
index fefd0e35125f..a108b4eab0d8 100644
--- a/Platform/ARM/SgiPkg/RdE1Edge/RdE1Edge.dsc
+++ b/Platform/ARM/SgiPkg/RdE1Edge/RdE1Edge.dsc
@@ -41,3 +41,11 @@ [PcdsFixedAtBuild.common]
gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x300C0000
gArmSgiTokenSpaceGuid.PcdGicSize|0x100000
+################################################################################
+#
+# Components Section - list of all EDK II Modules needed by this Platform
+#
+################################################################################
+
+[Components.common]
+ Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
diff --git a/Platform/ARM/SgiPkg/RdN1Edge/RdN1Edge.dsc b/Platform/ARM/SgiPkg/RdN1Edge/RdN1Edge.dsc
index 71407f701af8..a59a6c5b8f3a 100644
--- a/Platform/ARM/SgiPkg/RdN1Edge/RdN1Edge.dsc
+++ b/Platform/ARM/SgiPkg/RdN1Edge/RdN1Edge.dsc
@@ -41,3 +41,11 @@ [PcdsFixedAtBuild.common]
gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x300C0000
gArmSgiTokenSpaceGuid.PcdGicSize|0x100000
+################################################################################
+#
+# Components Section - list of all EDK II Modules needed by this Platform
+#
+################################################################################
+
+[Components.common]
+ Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
diff --git a/Platform/ARM/SgiPkg/RdN1EdgeX2/RdN1EdgeX2.dsc b/Platform/ARM/SgiPkg/RdN1EdgeX2/RdN1EdgeX2.dsc
index 5bc286626bb1..6c9e30eadb95 100644
--- a/Platform/ARM/SgiPkg/RdN1EdgeX2/RdN1EdgeX2.dsc
+++ b/Platform/ARM/SgiPkg/RdN1EdgeX2/RdN1EdgeX2.dsc
@@ -41,3 +41,11 @@ [PcdsFixedAtBuild.common]
gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x300C0000
gArmSgiTokenSpaceGuid.PcdGicSize|0x100000
+################################################################################
+#
+# Components Section - list of all EDK II Modules needed by this Platform
+#
+################################################################################
+
+[Components.common]
+ Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
diff --git a/Platform/ARM/SgiPkg/Sgi575/Sgi575.dsc b/Platform/ARM/SgiPkg/Sgi575/Sgi575.dsc
index b5f39c4db3bc..bdfd69d0477c 100644
--- a/Platform/ARM/SgiPkg/Sgi575/Sgi575.dsc
+++ b/Platform/ARM/SgiPkg/Sgi575/Sgi575.dsc
@@ -41,3 +41,13 @@ [PcdsFixedAtBuild.common]
gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x300C0000
gArmSgiTokenSpaceGuid.PcdGicSize|0x100000
+
+################################################################################
+#
+# Components Section - list of all EDK II Modules needed by this Platform
+#
+################################################################################
+
+[Components.common]
+ Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
+
diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec b/Platform/ARM/SgiPkg/SgiPlatform.dec
index 4ac3dec91e3d..97c1e40349ea 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.dec
+++ b/Platform/ARM/SgiPkg/SgiPlatform.dec
@@ -26,10 +26,7 @@ [Guids.common]
# ARM Sgi Platform ID descriptor
gArmSgiPlatformIdDescriptorGuid = { 0xf56f152a, 0xad2a, 0x11e6, { 0xb1, 0xa7, 0x00, 0x50, 0x56, 0x3c, 0x44, 0xcc } }
gArmSgiTokenSpaceGuid = { 0x577d6941, 0xaea1, 0x40b4, { 0x90, 0x93, 0x2a, 0x86, 0x61, 0x72, 0x5a, 0x57 } }
- gSgi575AcpiTablesFileGuid = { 0xc712719a, 0x0aaf, 0x438c, { 0x9c, 0xdd, 0x35, 0xab, 0x4d, 0x60, 0x20, 0x7d } }
- gRdN1EdgeAcpiTablesFileGuid = { 0x4b0b91d0, 0x4a05, 0x45c4, { 0x88, 0xa7, 0x88, 0xe1, 0x70, 0xe7, 0x66, 0x94 } }
- gRdN1EdgeX2AcpiTablesFileGuid = { 0x82a34150, 0x0fc6, 0x45f4, { 0x8e, 0xa0, 0xf0, 0xa4, 0x66, 0x0c, 0xf3, 0x5d } }
- gRdE1EdgeAcpiTablesFileGuid = { 0x2af40815, 0xa84e, 0x4de9, { 0x8c, 0x38, 0x91, 0x40, 0xb3, 0x54, 0x40, 0x73 } }
+ gArmSgiAcpiTablesGuid = { 0xc712719a, 0x0aaf, 0x438c, { 0x9c, 0xdd, 0x35, 0xab, 0x4d, 0x60, 0x20, 0x7d } }
[PcdsFeatureFlag.common]
gArmSgiTokenSpaceGuid.PcdVirtioBlkSupported|FALSE|BOOLEAN|0x00000001
diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc b/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc
index ae5ef5a8d2ef..1f33557edf18 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc
+++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc
@@ -252,10 +252,6 @@ [Components.common]
# ACPI Support
#
MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
- Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
- Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
- Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
- Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
#
diff --git a/Platform/ARM/SgiPkg/SgiPlatform.fdf b/Platform/ARM/SgiPkg/SgiPlatform.fdf
index 3d13998015b9..9fc011a6d630 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.fdf
+++ b/Platform/ARM/SgiPkg/SgiPlatform.fdf
@@ -99,11 +99,8 @@ [FV.FvMain]
# ACPI Support
#
INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
- INF RuleOverride=ACPITABLE Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
- INF RuleOverride=ACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
- INF RuleOverride=ACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
- INF RuleOverride=ACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
+!include $(BOARD_DXE_FV_COMPONENTS)
# Required by PCI
INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
--
2.17.1
next prev parent reply other threads:[~2020-05-05 13:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-05 13:01 [PATCH v5][edk2-platforms 00/17] Platform/Arm/Sgi: Add platform support for RD-Daniel Aditya Angadi
2020-05-05 13:01 ` [PATCH v5][edk2-platforms 01/17] Platform/ARM/SgiPkg: Create platform specific dsc files Aditya Angadi
2020-05-05 13:01 ` [PATCH v5][edk2-platforms 02/17] Platform/ARM/SgiPkg: Let platforms define core and cluster count Aditya Angadi
2020-05-05 13:02 ` [PATCH v5][edk2-platforms 03/17] Platform/ARM/SgiPkg: Let platforms define GIC related PCD values Aditya Angadi
2020-05-05 13:02 ` [PATCH v5][edk2-platforms 04/17] Platform/ARM/SgiPkg: Create platform specific fd include file Aditya Angadi
2020-05-05 13:02 ` Aditya Angadi [this message]
2020-05-05 13:02 ` [PATCH v5][edk2-platforms 06/17] Platform/ARM/SgiPkg: Obtain rd-e1-edge platform core count from PCD Aditya Angadi
2020-05-05 13:02 ` [PATCH v5][edk2-platforms 07/17] Platform/ARM/SgiPkg: Refactor GIC related ACPI helper macros Aditya Angadi
2020-05-05 13:02 ` [PATCH v5][edk2-platforms 08/17] Platform/ARM/SgiPkg: Update SGI-575 MADT table to ACPI 6.2 Aditya Angadi
2020-05-05 13:02 ` [PATCH v5][edk2-platforms 09/17] Platform/ARM/SgiPkg: Move common platform description to SSDT Aditya Angadi
2020-05-05 13:02 ` [PATCH v5][edk2-platforms 10/17] Platform/ARM/SgiPkg: Add helper macros for SRAT table Aditya Angadi
2020-05-05 13:02 ` [PATCH v5][edk2-platforms 11/17] Platform/ARM/SgiPkg: Add support for remote numa memory nodes Aditya Angadi
2020-05-05 13:02 ` [PATCH v5][edk2-platforms 12/17] Platform/ARM/SgiPkg: Add SRAT table for RdN1Edge dual-chip platform Aditya Angadi
2020-05-05 13:02 ` [PATCH v5][edk2-platforms 13/17] Platform/ARM/SgiPkg: Use chip count constant on rdn1edgex2 platform Aditya Angadi
2020-05-05 13:02 ` [PATCH v5][edk2-platforms 14/17] Platform/ARM/SgiPkg: Add ACPI tables for Rd-Daniel Config-M Aditya Angadi
2020-05-05 13:02 ` [PATCH v5][edk2-platforms 15/17] Platform/ARM/SgiPkg: Add initial support for RD-Daniel Config-M platform Aditya Angadi
2020-05-05 13:02 ` [PATCH v5][edk2-platforms 16/17] Platform/ARM/SgiPkg: Add ACPI tables for RD-Daniel Config-XLR Aditya Angadi
2020-05-05 13:02 ` [PATCH v5][edk2-platforms 17/17] Platform/ARM/SgiPkg: Add initial support for RD-Daniel Config-XLR platform Aditya Angadi
2020-05-05 18:18 ` [edk2-devel] [PATCH v5][edk2-platforms 00/17] Platform/Arm/Sgi: Add platform support for RD-Daniel Ard Biesheuvel
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=20200505130214.25592-6-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