From: "PierreGondois" <pierre.gondois@arm.com>
To: devel@edk2.groups.io
Cc: Pierre Gondois <pierre.gondois@arm.com>,
Sami Mujawar <sami.mujawar@arm.com>,
Pierre Gondois <Pierre.Gondois@arm.com>,
Yeo Reum Yun <YeoReum.Yun@arm.com>,
Sunil V L <sunilvl@ventanamicro.com>,
AbdulLateef Attar <AbdulLateef.Attar@amd.com>,
Jeshua Smith <jeshuas@nvidia.com>,
Jeff Brasen <jbrasen@nvidia.com>,
Girish Mahadevan <gmahadevan@nvidia.com>,
Leif Lindholm <quic_llindhol@quicinc.com>,
Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Subject: [edk2-devel] [PATCH 05/19] DynamicTablesPkg: Move ACPI device Handle object to Arch Common
Date: Thu, 21 Mar 2024 16:59:10 +0100 [thread overview]
Message-ID: <20240321155924.707272-6-pierre.gondois@arm.com> (raw)
In-Reply-To: <20240321155924.707272-1-pierre.gondois@arm.com>
From: Sami Mujawar <sami.mujawar@arm.com>
Move the ACPI device Handle object from Arm Namespace to the
Arch Common namespace.
Correspondingly also update the following modules to reflect the
changes introduced by the move:
- SRAT generator
- ConfigurationManagerObjectParser
- Dynamic Plat Repo TokenFixer map.
Cc: Pierre Gondois <Pierre.Gondois@arm.com>
Cc: Yeo Reum Yun <YeoReum.Yun@arm.com>
Cc: AbdulLateef Attar <AbdulLateef.Attar@amd.com>
Cc: Jeshua Smith <jeshuas@nvidia.com>
Cc: Jeff Brasen <jbrasen@nvidia.com>
Cc: Girish Mahadevan <gmahadevan@nvidia.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
---
.../Include/ArchCommonNameSpaceObjects.h | 14 ++++++
.../Include/ArmNameSpaceObjects.h | 44 +++++++------------
.../Acpi/Arm/AcpiSratLibArm/SratGenerator.c | 12 ++---
.../DynamicPlatRepoLib/CmObjectTokenFixer.c | 29 ++++++------
.../ConfigurationManagerObjectParser.c | 6 +--
DynamicTablesPkg/Readme.md | 32 +++++++-------
6 files changed, 68 insertions(+), 69 deletions(-)
diff --git a/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h b/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h
index 86d751bdfaaa..0b450e8f99c2 100644
--- a/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h
+++ b/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h
@@ -32,6 +32,7 @@ typedef enum ArchCommonObjectID {
EArchCommonObjPciAddressMapInfo, ///< 9 - Pci Address Map Info
EArchCommonObjPciInterruptMapInfo, ///< 10 - Pci Interrupt Map Info
EArchCommonObjMemoryAffinityInfo, ///< 11 - Memory Affinity Info
+ EArchCommonObjDeviceHandleAcpi, ///< 12 - Device Handle Acpi
EArchCommonObjMax
} EARCH_COMMON_OBJECT_ID;
@@ -242,6 +243,19 @@ typedef struct CmArchCommonMemoryAffinityInfo {
UINT32 Flags;
} CM_ARCH_COMMON_MEMORY_AFFINITY_INFO;
+/** A structure that describes the ACPI Device Handle (Type 0) in the
+ Generic Initiator Affinity structure in SRAT
+
+ ID: EArchCommonObjDeviceHandleAcpi
+*/
+typedef struct CmArchCommonDeviceHandleAcpi {
+ /// Hardware ID
+ UINT64 Hid;
+
+ /// Unique Id
+ UINT32 Uid;
+} CM_ARCH_COMMON_DEVICE_HANDLE_ACPI;
+
#pragma pack()
#endif // ARCH_COMMON_NAMESPACE_OBJECTS_H_
diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
index 7905152114a7..64c5f2677246 100644
--- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
+++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
@@ -50,22 +50,21 @@ typedef enum ArmObjectID {
EArmObjSmmuInterruptArray, ///< 19 - SMMU Interrupt Array
EArmObjProcHierarchyInfo, ///< 20 - Processor Hierarchy Info
EArmObjCacheInfo, ///< 21 - Cache Info
- EArmObjDeviceHandleAcpi, ///< 22 - Device Handle Acpi
- EArmObjDeviceHandlePci, ///< 23 - Device Handle Pci
- EArmObjGenericInitiatorAffinityInfo, ///< 24 - Generic Initiator Affinity
- EArmObjCmn600Info, ///< 25 - CMN-600 Info
- EArmObjLpiInfo, ///< 26 - Lpi Info
- EArmObjRmr, ///< 27 - Reserved Memory Range Node
- EArmObjMemoryRangeDescriptor, ///< 28 - Memory Range Descriptor
- EArmObjCpcInfo, ///< 29 - Continuous Performance Control Info
- EArmObjPccSubspaceType0Info, ///< 30 - Pcc Subspace Type 0 Info
- EArmObjPccSubspaceType1Info, ///< 31 - Pcc Subspace Type 2 Info
- EArmObjPccSubspaceType2Info, ///< 32 - Pcc Subspace Type 2 Info
- EArmObjPccSubspaceType3Info, ///< 33 - Pcc Subspace Type 3 Info
- EArmObjPccSubspaceType4Info, ///< 34 - Pcc Subspace Type 4 Info
- EArmObjPccSubspaceType5Info, ///< 35 - Pcc Subspace Type 5 Info
- EArmObjEtInfo, ///< 36 - Embedded Trace Extension/Module Info
- EArmObjPsdInfo, ///< 37 - P-State Dependency (PSD) Info
+ EArmObjDeviceHandlePci, ///< 22 - Device Handle Pci
+ EArmObjGenericInitiatorAffinityInfo, ///< 23 - Generic Initiator Affinity
+ EArmObjCmn600Info, ///< 24 - CMN-600 Info
+ EArmObjLpiInfo, ///< 25 - Lpi Info
+ EArmObjRmr, ///< 26 - Reserved Memory Range Node
+ EArmObjMemoryRangeDescriptor, ///< 27 - Memory Range Descriptor
+ EArmObjCpcInfo, ///< 28 - Continuous Performance Control Info
+ EArmObjPccSubspaceType0Info, ///< 29 - Pcc Subspace Type 0 Info
+ EArmObjPccSubspaceType1Info, ///< 30 - Pcc Subspace Type 2 Info
+ EArmObjPccSubspaceType2Info, ///< 31 - Pcc Subspace Type 2 Info
+ EArmObjPccSubspaceType3Info, ///< 32 - Pcc Subspace Type 3 Info
+ EArmObjPccSubspaceType4Info, ///< 33 - Pcc Subspace Type 4 Info
+ EArmObjPccSubspaceType5Info, ///< 34 - Pcc Subspace Type 5 Info
+ EArmObjEtInfo, ///< 35 - Embedded Trace Extension/Module Info
+ EArmObjPsdInfo, ///< 36 - P-State Dependency (PSD) Info
EArmObjMax
} EARM_OBJECT_ID;
@@ -720,19 +719,6 @@ typedef struct CmArmCacheInfo {
UINT32 CacheId;
} CM_ARM_CACHE_INFO;
-/** A structure that describes the ACPI Device Handle (Type 0) in the
- Generic Initiator Affinity structure in SRAT
-
- ID: EArmObjDeviceHandleAcpi
-*/
-typedef struct CmArmDeviceHandleAcpi {
- /// Hardware ID
- UINT64 Hid;
-
- /// Unique Id
- UINT32 Uid;
-} CM_ARM_DEVICE_HANDLE_ACPI;
-
/** A structure that describes the PCI Device Handle (Type 1) in the
Generic Initiator Affinity structure in SRAT
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/SratGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/SratGenerator.c
index 3ba2448f2384..c65a28cd142a 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/SratGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/SratGenerator.c
@@ -34,7 +34,7 @@
- EArmObjGicItsInfo (OPTIONAL)
- EArchCommonObjMemoryAffinityInfo (OPTIONAL)
- EArmObjGenericInitiatorAffinityInfo (OPTIONAL)
- - EArmObjDeviceHandleAcpi (OPTIONAL)
+ - EArchCommonObjDeviceHandleAcpi (OPTIONAL)
- EArmObjDeviceHandlePci (OPTIONAL)
*/
@@ -82,9 +82,9 @@ GET_OBJECT_LIST (
information from the Configuration Manager.
*/
GET_OBJECT_LIST (
- EObjNameSpaceArm,
- EArmObjDeviceHandleAcpi,
- CM_ARM_DEVICE_HANDLE_ACPI
+ EObjNameSpaceArchCommon,
+ EArchCommonObjDeviceHandleAcpi,
+ CM_ARCH_COMMON_DEVICE_HANDLE_ACPI
);
/**
@@ -301,7 +301,7 @@ AddGenericInitiatorAffinity (
{
EFI_STATUS Status;
EFI_ACPI_6_3_GENERIC_INITIATOR_AFFINITY_STRUCTURE *GenInitAff;
- CM_ARM_DEVICE_HANDLE_ACPI *DeviceHandleAcpi;
+ CM_ARCH_COMMON_DEVICE_HANDLE_ACPI *DeviceHandleAcpi;
CM_ARM_DEVICE_HANDLE_PCI *DeviceHandlePci;
UINT32 DeviceHandleCount;
@@ -331,7 +331,7 @@ AddGenericInitiatorAffinity (
}
if (GenInitAffInfo->DeviceHandleType == EFI_ACPI_6_3_ACPI_DEVICE_HANDLE) {
- Status = GetEArmObjDeviceHandleAcpi (
+ Status = GetEArchCommonObjDeviceHandleAcpi (
CfgMgrProtocol,
GenInitAffInfo->DeviceHandleToken,
&DeviceHandleAcpi,
diff --git a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c
index 654686a0125a..43aae423814f 100644
--- a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c
+++ b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c
@@ -165,22 +165,21 @@ CM_OBJECT_TOKEN_FIXER TokenFixer[EArmObjMax] = {
NULL, ///< 19 - SMMU Interrupt Array
TokenFixerNotImplemented, ///< 20 - Processor Hierarchy Info
TokenFixerNotImplemented, ///< 21 - Cache Info
- NULL, ///< 22 - Device Handle Acpi
- NULL, ///< 23 - Device Handle Pci
- NULL, ///< 24 - Generic Initiator Affinity
- NULL, ///< 25 - CMN-600 Info
- NULL, ///< 26 - Lpi Info
- NULL, ///< 27 - Reserved Memory Range Node
- NULL, ///< 28 - Memory Range Descriptor
- NULL, ///< 29 - Continuous Performance Control Info
- NULL, ///< 30 - Pcc Subspace Type 0 Info
+ NULL, ///< 22 - Device Handle Pci
+ NULL, ///< 23 - Generic Initiator Affinity
+ NULL, ///< 24 - CMN-600 Info
+ NULL, ///< 25 - Lpi Info
+ NULL, ///< 26 - Reserved Memory Range Node
+ NULL, ///< 27 - Memory Range Descriptor
+ NULL, ///< 28 - Continuous Performance Control Info
+ NULL, ///< 29 - Pcc Subspace Type 0 Info
+ NULL, ///< 30 - Pcc Subspace Type 2 Info
NULL, ///< 31 - Pcc Subspace Type 2 Info
- NULL, ///< 32 - Pcc Subspace Type 2 Info
- NULL, ///< 33 - Pcc Subspace Type 3 Info
- NULL, ///< 34 - Pcc Subspace Type 4 Info
- NULL, ///< 35 - Pcc Subspace Type 5 Info
- NULL, ///< 36 - Embedded Trace Extension/Module Info
- NULL ///< 37 - P-State Dependency (PSD) Info
+ NULL, ///< 32 - Pcc Subspace Type 3 Info
+ NULL, ///< 33 - Pcc Subspace Type 4 Info
+ NULL, ///< 34 - Pcc Subspace Type 5 Info
+ NULL, ///< 35 - Embedded Trace Extension/Module Info
+ NULL ///< 36 - P-State Dependency (PSD) Info
};
/** CmObj token fixer.
diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
index b2fe74cd4f9b..9326ea639351 100644
--- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
+++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
@@ -365,9 +365,9 @@ STATIC CONST CM_OBJ_PARSER CmArchCommonMemoryAffinityInfoParser[] = {
{ "Flags", 4, "0x%x", NULL }
};
-/** A parser for EArmObjDeviceHandleAcpi.
+/** A parser for EArchCommonObjDeviceHandleAcpi.
*/
-STATIC CONST CM_OBJ_PARSER CmArmDeviceHandleAcpiParser[] = {
+STATIC CONST CM_OBJ_PARSER CmArchCommonDeviceHandleAcpiParser[] = {
{ "Hid", 8, "0x%llx", NULL },
{ "Uid", 4, "0x%x", NULL }
};
@@ -682,6 +682,7 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArchCommonNamespaceObjectParser[] = {
CM_PARSER_ADD_OBJECT (EArchCommonObjPciAddressMapInfo, CmArchCommonPciAddressMapInfoParser),
CM_PARSER_ADD_OBJECT (EArchCommonObjPciInterruptMapInfo, CmArchCommonPciInterruptMapInfoParser),
CM_PARSER_ADD_OBJECT (EArchCommonObjMemoryAffinityInfo, CmArchCommonMemoryAffinityInfoParser),
+ CM_PARSER_ADD_OBJECT (EArchCommonObjDeviceHandleAcpi, CmArchCommonDeviceHandleAcpiParser),
CM_PARSER_ADD_OBJECT_RESERVED (EArchCommonObjMax)
};
@@ -710,7 +711,6 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArmNamespaceObjectParser[] = {
CM_PARSER_ADD_OBJECT (EArmObjSmmuInterruptArray, CmArchCommonGenericInterruptParser),
CM_PARSER_ADD_OBJECT (EArmObjProcHierarchyInfo, CmArmProcHierarchyInfoParser),
CM_PARSER_ADD_OBJECT (EArmObjCacheInfo, CmArmCacheInfoParser),
- CM_PARSER_ADD_OBJECT (EArmObjDeviceHandleAcpi, CmArmDeviceHandleAcpiParser),
CM_PARSER_ADD_OBJECT (EArmObjDeviceHandlePci, CmArmDeviceHandlePciParser),
CM_PARSER_ADD_OBJECT (EArmObjGenericInitiatorAffinityInfo,CmArmGenericInitiatorAffinityInfoParser),
CM_PARSER_ADD_OBJECT (EArmObjCmn600Info, CmArmCmn600InfoParser),
diff --git a/DynamicTablesPkg/Readme.md b/DynamicTablesPkg/Readme.md
index 55311fd4cef5..f82c37f4afeb 100644
--- a/DynamicTablesPkg/Readme.md
+++ b/DynamicTablesPkg/Readme.md
@@ -462,22 +462,21 @@ The CM_OBJECT_ID type is used to identify the Configuration Manager
| 19 | SMMU Interrupt Array | |
| 20 | Processor Hierarchy Info | Move to Arch Common NS |
| 21 | Cache Info | Move to Arch Common NS |
-| 22 | Device Handle Acpi | Move to Arch Common NS |
-| 23 | Device Handle PCI | Move to Arch Common NS |
-| 24 | Generic Initiator Affinity Info | Move to Arch Common NS |
-| 25 | CMN 600 Info | |
-| 26 | Low Power Idle State Info | Move to Arch Common NS |
-| 27 | Reserved Memory Range Node | |
-| 28 | Memory Range Descriptor | |
-| 29 | Continuous Performance Control Info | Move to Arch Common NS |
-| 30 | Pcc Subspace Type 0 Info | Move to Arch Common NS |
-| 31 | Pcc Subspace Type 1 Info | Move to Arch Common NS |
-| 32 | Pcc Subspace Type 2 Info | Move to Arch Common NS |
-| 33 | Pcc Subspace Type 3 Info | Move to Arch Common NS |
-| 34 | Pcc Subspace Type 4 Info | Move to Arch Common NS |
-| 35 | Pcc Subspace Type 5 Info | Move to Arch Common NS |
-| 36 | Embedded Trace Extension/Module Info | |
-| 37 | P-State Dependency (PSD) Info | Move to Arch Common NS |
+| 22 | Device Handle PCI | Move to Arch Common NS |
+| 23 | Generic Initiator Affinity Info | Move to Arch Common NS |
+| 24 | CMN 600 Info | |
+| 25 | Low Power Idle State Info | Move to Arch Common NS |
+| 26 | Reserved Memory Range Node | |
+| 27 | Memory Range Descriptor | |
+| 28 | Continuous Performance Control Info | Move to Arch Common NS |
+| 29 | Pcc Subspace Type 0 Info | Move to Arch Common NS |
+| 30 | Pcc Subspace Type 1 Info | Move to Arch Common NS |
+| 31 | Pcc Subspace Type 2 Info | Move to Arch Common NS |
+| 32 | Pcc Subspace Type 3 Info | Move to Arch Common NS |
+| 33 | Pcc Subspace Type 4 Info | Move to Arch Common NS |
+| 34 | Pcc Subspace Type 5 Info | Move to Arch Common NS |
+| 35 | Embedded Trace Extension/Module Info | |
+| 36 | P-State Dependency (PSD) Info | Move to Arch Common NS |
| `*` | All other values are reserved. | |
#### Object ID's in the Arch Common Namespace:
@@ -496,4 +495,5 @@ The CM_OBJECT_ID type is used to identify the Configuration Manager
| 9 | PCI Address Map Info | |
| 10 | PCI Interrupt Map Info | |
| 11 | Memory Affinity Info | |
+| 12 | Device Handle Acpi | |
| `*` | All other values are reserved. | |
--
2.25.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116983): https://edk2.groups.io/g/devel/message/116983
Mute This Topic: https://groups.io/mt/105068153/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2024-03-21 16:00 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-21 15:59 [edk2-devel] [PATCH 00/19] DynamicTablesPkg: Move objects to Arch Common NameSpace (second) PierreGondois
2024-03-21 15:59 ` [edk2-devel] [PATCH 01/19] DynamicTablesPkg: Move Pci Address Map Info to Arch Common PierreGondois
2024-03-21 15:59 ` [edk2-devel] [PATCH 02/19] DynamicTablesPkg: Move CM_ARM_GENERIC_INTERRUPT struct " PierreGondois
2024-03-21 15:59 ` [edk2-devel] [PATCH 03/19] DynamicTablesPkg: Move Pci Interrupt Map Info " PierreGondois
2024-03-21 15:59 ` [edk2-devel] [PATCH 04/19] DynamicTablesPkg: Move Mem Affinity " PierreGondois
2024-03-21 15:59 ` PierreGondois [this message]
2024-03-21 15:59 ` [edk2-devel] [PATCH 06/19] DynamicTablesPkg: Move PCI device Handle object " PierreGondois
2024-03-21 15:59 ` [edk2-devel] [PATCH 07/19] DynamicTablesPkg: Move Generic Initiator affinity info " PierreGondois
2024-03-21 15:59 ` [edk2-devel] [PATCH 08/19] DynamicTablesPkg: Move LPI info object " PierreGondois
2024-03-21 15:59 ` [edk2-devel] [PATCH 09/19] DynamicTablesPkg: Rename GicCToken field in Processor Hierarchy Info PierreGondois
2024-03-21 15:59 ` [edk2-devel] [PATCH 10/19] DynamicTablesPkg: Move Processor hierarchy info to Arch Common PierreGondois
2024-03-21 15:59 ` [edk2-devel] [PATCH 11/19] DynamicTablesPkg: Move Cache " PierreGondois
2024-03-21 15:59 ` [edk2-devel] [PATCH 12/19] DynamicTablesPkg: Move Continuous perf control " PierreGondois
2024-03-21 15:59 ` [edk2-devel] [PATCH 13/19] DynamicTablesPkg: Move PCC structure definitions " PierreGondois
2024-03-21 15:59 ` [edk2-devel] [PATCH 14/19] DynamicTablesPkg: Move PCC Type0 info " PierreGondois
2024-03-21 15:59 ` [edk2-devel] [PATCH 15/19] DynamicTablesPkg: Move PCC Type1 " PierreGondois
2024-03-21 15:59 ` [edk2-devel] [PATCH 16/19] DynamicTablesPkg: Move PCC Type2 " PierreGondois
2024-03-21 15:59 ` [edk2-devel] [PATCH 17/19] DynamicTablesPkg: Move PCC Type 3 & 4 " PierreGondois
2024-03-21 15:59 ` [edk2-devel] [PATCH 18/19] DynamicTablesPkg: Move PCC Type 5 " PierreGondois
2024-03-21 15:59 ` [edk2-devel] [PATCH 19/19] DynamicTablesPkg: Move PSD " PierreGondois
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=20240321155924.707272-6-pierre.gondois@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