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 09/19] DynamicTablesPkg: Rename GicCToken field in Processor Hierarchy Info
Date: Thu, 21 Mar 2024 16:59:14 +0100 [thread overview]
Message-ID: <20240321155924.707272-10-pierre.gondois@arm.com> (raw)
In-Reply-To: <20240321155924.707272-1-pierre.gondois@arm.com>
From: Sami Mujawar <sami.mujawar@arm.com>
The GicCToken field in the CM_ARM_PROC_HIERARCHY_INFO structure is
a reference to the associated object which has the corresponding
ACPI Processor ID, e.g. for Arm systems this is a reference to the
CM_ARM_GICC_INFO object.
For other architecture this may be a reference to a similar object
that has the ACPI Processor ID.
Therefore, rename the GicCToken field to a more generic name like
AcpiIdObjectToken.
Correspondingly also update the following modules to reflect the
changes introduced by this renaming:
- PPTT generator
- SSDT CPu topology generator
- ConfigurationManagerObjectParser.
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/ArmNameSpaceObjects.h | 10 ++--
.../Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c | 60 ++++++++++---------
.../SsdtCpuTopologyGenerator.c | 8 +--
.../ConfigurationManagerObjectParser.c | 2 +-
4 files changed, 41 insertions(+), 39 deletions(-)
diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
index e019323c1fcd..da50f581fa25 100644
--- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
+++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
@@ -657,11 +657,11 @@ typedef struct CmArmProcHierarchyInfo {
/// Token for the parent CM_ARM_PROC_HIERARCHY_INFO object in the processor
/// topology. A value of CM_NULL_TOKEN means this node has no parent.
CM_OBJECT_TOKEN ParentToken;
- /// Token of the associated CM_ARM_GICC_INFO object which has the
- /// corresponding ACPI Processor ID. A value of CM_NULL_TOKEN means this
- /// node represents a group of associated processors and it does not have an
- /// associated GIC CPU interface.
- CM_OBJECT_TOKEN GicCToken;
+ /// Token of the associated object which has the corresponding ACPI Processor
+ /// ID, e.g. for Arm systems this is a reference to CM_ARM_GICC_INFO object.
+ /// A value of CM_NULL_TOKEN means this node represents a group of associated
+ /// processors and it does not have an associated CPU interface.
+ CM_OBJECT_TOKEN AcpiIdObjectToken;
/// Number of resources private to this Node
UINT32 NoOfPrivateResources;
/// Token of the array which contains references to the resources private to
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c
index c237f7ff9386..f2f2a834116e 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c
@@ -397,12 +397,14 @@ AddPrivateResources (
@param [in] Index2 Index of Object2 to be displayed for debugging
purposes.
- @retval TRUE Object1 and Object2 have the same GicCToken.
- @retval FALSE Object1 and Object2 have different GicCTokens.
+ @retval TRUE Object1 and Object2 have the same
+ AcpiIdObjectToken.
+ @retval FALSE Object1 and Object2 have different
+ AcpiIdObjectTokens.
**/
BOOLEAN
EFIAPI
-IsGicCTokenEqual (
+IsAcpiIdObjectTokenEqual (
IN CONST VOID *Object1,
IN CONST VOID *Object2,
IN UINTN Index1,
@@ -426,18 +428,18 @@ IsGicCTokenEqual (
if (IS_ACPI_PROC_ID_VALID (ProcNode1) &&
IS_ACPI_PROC_ID_VALID (ProcNode2) &&
- (ProcNode1->GicCToken != CM_NULL_TOKEN) &&
- (ProcNode2->GicCToken != CM_NULL_TOKEN) &&
- (ProcNode1->GicCToken == ProcNode2->GicCToken))
+ (ProcNode1->AcpiIdObjectToken != CM_NULL_TOKEN) &&
+ (ProcNode2->AcpiIdObjectToken != CM_NULL_TOKEN) &&
+ (ProcNode1->AcpiIdObjectToken == ProcNode2->AcpiIdObjectToken))
{
DEBUG ((
DEBUG_ERROR,
"ERROR: PPTT: Two Processor Hierarchy Info objects (%d and %d) map to " \
- "the same GICC Info object. ACPI Processor IDs are not unique. " \
- "GicCToken = %p.\n",
+ "the same ACPI ID reference object. ACPI Processor IDs are not unique. " \
+ "AcpiIdObjectToken = %p.\n",
Index1,
Index2,
- ProcNode1->GicCToken
+ ProcNode1->AcpiIdObjectToken
));
return TRUE;
}
@@ -474,7 +476,7 @@ AddProcHierarchyNodes (
EFI_STATUS Status;
EFI_ACPI_6_4_PPTT_STRUCTURE_PROCESSOR *ProcStruct;
UINT32 *PrivateResources;
- BOOLEAN IsGicCTokenDuplicated;
+ BOOLEAN IsAcpiIdObjectTokenDuplicated;
CM_ARM_GICC_INFO *GicCInfoList;
UINT32 GicCInfoCount;
@@ -500,15 +502,15 @@ AddProcHierarchyNodes (
NodeCount = Generator->ProcHierarchyNodeCount;
// Check if every GICC Object is referenced by onlu one Proc Node
- IsGicCTokenDuplicated = FindDuplicateValue (
- ProcNodeIterator,
- NodeCount,
- sizeof (PPTT_NODE_INDEXER),
- IsGicCTokenEqual
- );
+ IsAcpiIdObjectTokenDuplicated = FindDuplicateValue (
+ ProcNodeIterator,
+ NodeCount,
+ sizeof (PPTT_NODE_INDEXER),
+ IsAcpiIdObjectTokenEqual
+ );
// Duplicate GIC CPU Interface Token was found so two PPTT Processor Hierarchy
// Nodes map to the same MADT GICC structure
- if (IsGicCTokenDuplicated) {
+ if (IsAcpiIdObjectTokenDuplicated) {
return EFI_INVALID_PARAMETER;
}
@@ -602,14 +604,14 @@ AddProcHierarchyNodes (
if (!IS_ACPI_PROC_ID_VALID (ProcInfoNode)) {
// Default invalid ACPI Processor ID to 0
ProcStruct->AcpiProcessorId = 0;
- } else if (ProcInfoNode->GicCToken == CM_NULL_TOKEN) {
+ } else if (ProcInfoNode->AcpiIdObjectToken == CM_NULL_TOKEN) {
Status = EFI_INVALID_PARAMETER;
DEBUG ((
DEBUG_ERROR,
- "ERROR: PPTT: The 'ACPI Processor ID valid' flag is set but no GICC " \
- "structure token was provided. GicCToken = %p. RequestorToken = %p. " \
- "Status = %r\n",
- ProcInfoNode->GicCToken,
+ "ERROR: PPTT: The 'ACPI Processor ID valid' flag is set but no " \
+ "ACPI ID Reference object token was provided. " \
+ "AcpiIdObjectToken = %p. RequestorToken = %p. Status = %r\n",
+ ProcInfoNode->AcpiIdObjectToken,
ProcInfoNode->Token,
Status
));
@@ -617,17 +619,17 @@ AddProcHierarchyNodes (
} else {
Status = GetEArmObjGicCInfo (
CfgMgrProtocol,
- ProcInfoNode->GicCToken,
+ ProcInfoNode->AcpiIdObjectToken,
&GicCInfoList,
&GicCInfoCount
);
if (EFI_ERROR (Status)) {
DEBUG ((
DEBUG_ERROR,
- "ERROR: PPTT: Failed to get GICC structure. ACPI Processor ID " \
- "can't be populated. GicCToken = %p. RequestorToken = %p. " \
- "Status = %r\n",
- ProcInfoNode->GicCToken,
+ "ERROR: PPTT: Failed to get ACPI ID Reference object token. " \
+ "ACPI Processor ID can't be populated. " \
+ "AcpiIdObjectToken = %p. RequestorToken = %p. Status = %r\n",
+ ProcInfoNode->AcpiIdObjectToken,
ProcInfoNode->Token,
Status
));
@@ -640,10 +642,10 @@ AddProcHierarchyNodes (
DEBUG_ERROR,
"ERROR: PPTT: Failed to find a unique GICC structure. " \
"ACPI Processor ID can't be populated. " \
- "GICC Structure Count = %d. GicCToken = %p. RequestorToken = %p " \
+ "GICC Structure Count = %d. AcpiIdObjectToken = %p. RequestorToken = %p " \
"Status = %r\n",
GicCInfoCount,
- ProcInfoNode->GicCToken,
+ ProcInfoNode->AcpiIdObjectToken,
ProcInfoNode->Token,
Status
));
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c
index 6ce7b71fac8b..5a5bfefd894e 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c
@@ -894,11 +894,11 @@ CreateAmlCpuFromProcHierarchy (
ASSERT (CfgMgrProtocol != NULL);
ASSERT (ParentNode != NULL);
ASSERT (ProcHierarchyNodeInfo != NULL);
- ASSERT (ProcHierarchyNodeInfo->GicCToken != CM_NULL_TOKEN);
+ ASSERT (ProcHierarchyNodeInfo->AcpiIdObjectToken != CM_NULL_TOKEN);
Status = GetEArmObjGicCInfo (
CfgMgrProtocol,
- ProcHierarchyNodeInfo->GicCToken,
+ ProcHierarchyNodeInfo->AcpiIdObjectToken,
&GicCInfo,
NULL
);
@@ -1170,9 +1170,9 @@ CreateAmlCpuTopologyTree (
// Find the children of the CM_ARM_PROC_HIERARCHY_INFO
// currently being handled (i.e. ParentToken == NodeToken).
if (Generator->ProcNodeList[Index].ParentToken == NodeToken) {
- // Only Cpus (leaf nodes in this tree) have a GicCToken.
+ // Only Cpus (leaf nodes in this tree) have a AcpiIdObjectToken.
// Create a Cpu node.
- if (Generator->ProcNodeList[Index].GicCToken != CM_NULL_TOKEN) {
+ if (Generator->ProcNodeList[Index].AcpiIdObjectToken != CM_NULL_TOKEN) {
Status = CheckProcNode (
Generator->ProcNodeList[Index].Flags,
TRUE,
diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
index 050cd04d09c2..17388b183554 100644
--- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
+++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
@@ -328,7 +328,7 @@ STATIC CONST CM_OBJ_PARSER CmArmProcHierarchyInfoParser[] = {
{ "Token", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
{ "Flags", 4, "0x%x", NULL },
{ "ParentToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
- { "GicCToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
+ { "AcpiIdObjectToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
{ "NoOfPrivateResources", 4, "0x%x", NULL },
{ "PrivateResourcesArrayToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
{ "LpiToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
--
2.25.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116987): https://edk2.groups.io/g/devel/message/116987
Mute This Topic: https://groups.io/mt/105068161/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 ` [edk2-devel] [PATCH 05/19] DynamicTablesPkg: Move ACPI device Handle object " PierreGondois
2024-03-21 15:59 ` [edk2-devel] [PATCH 06/19] DynamicTablesPkg: Move PCI " 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 ` PierreGondois [this message]
2024-03-21 15:59 ` [edk2-devel] [PATCH 10/19] DynamicTablesPkg: Move Processor hierarchy info " 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-10-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