diff options
author | Sami Mujawar <sami.mujawar@arm.com> | 2024-03-11 13:17:13 +0000 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-07-29 13:44:55 +0000 |
commit | d7a47297cd003600c506de952bac9a9166733384 (patch) | |
tree | 41c946f483492fec1ad27ff8b96722e78d15b7c0 | |
parent | ead3b4239174e98c54696eecc6aeb11c990f5a6b (diff) | |
download | edk2-d7a47297cd003600c506de952bac9a9166733384.tar.gz edk2-d7a47297cd003600c506de952bac9a9166733384.tar.bz2 edk2-d7a47297cd003600c506de952bac9a9166733384.zip |
DynamicTablesPkg: Rename GicCToken field in Processor Hierarchy Info
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>
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
4 files changed, 41 insertions, 39 deletions
diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h index e019323c1f..da50f581fa 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 c237f7ff93..f2f2a83411 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 bfc3f2eb30..16e443b3fd 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
);
@@ -1175,9 +1175,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 050cd04d09..17388b1835 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 },
|