mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-30 00:54:06 +02:00
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>
This commit is contained in:
parent
ead3b42391
commit
d7a47297cd
@ -657,11 +657,11 @@ typedef struct CmArmProcHierarchyInfo {
|
|||||||
/// Token for the parent CM_ARM_PROC_HIERARCHY_INFO object in the processor
|
/// 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.
|
/// topology. A value of CM_NULL_TOKEN means this node has no parent.
|
||||||
CM_OBJECT_TOKEN ParentToken;
|
CM_OBJECT_TOKEN ParentToken;
|
||||||
/// Token of the associated CM_ARM_GICC_INFO object which has the
|
/// Token of the associated object which has the corresponding ACPI Processor
|
||||||
/// corresponding ACPI Processor ID. A value of CM_NULL_TOKEN means this
|
/// ID, e.g. for Arm systems this is a reference to CM_ARM_GICC_INFO object.
|
||||||
/// node represents a group of associated processors and it does not have an
|
/// A value of CM_NULL_TOKEN means this node represents a group of associated
|
||||||
/// associated GIC CPU interface.
|
/// processors and it does not have an associated CPU interface.
|
||||||
CM_OBJECT_TOKEN GicCToken;
|
CM_OBJECT_TOKEN AcpiIdObjectToken;
|
||||||
/// Number of resources private to this Node
|
/// Number of resources private to this Node
|
||||||
UINT32 NoOfPrivateResources;
|
UINT32 NoOfPrivateResources;
|
||||||
/// Token of the array which contains references to the resources private to
|
/// Token of the array which contains references to the resources private to
|
||||||
|
@ -397,12 +397,14 @@ AddPrivateResources (
|
|||||||
@param [in] Index2 Index of Object2 to be displayed for debugging
|
@param [in] Index2 Index of Object2 to be displayed for debugging
|
||||||
purposes.
|
purposes.
|
||||||
|
|
||||||
@retval TRUE Object1 and Object2 have the same GicCToken.
|
@retval TRUE Object1 and Object2 have the same
|
||||||
@retval FALSE Object1 and Object2 have different GicCTokens.
|
AcpiIdObjectToken.
|
||||||
|
@retval FALSE Object1 and Object2 have different
|
||||||
|
AcpiIdObjectTokens.
|
||||||
**/
|
**/
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
EFIAPI
|
EFIAPI
|
||||||
IsGicCTokenEqual (
|
IsAcpiIdObjectTokenEqual (
|
||||||
IN CONST VOID *Object1,
|
IN CONST VOID *Object1,
|
||||||
IN CONST VOID *Object2,
|
IN CONST VOID *Object2,
|
||||||
IN UINTN Index1,
|
IN UINTN Index1,
|
||||||
@ -426,18 +428,18 @@ IsGicCTokenEqual (
|
|||||||
|
|
||||||
if (IS_ACPI_PROC_ID_VALID (ProcNode1) &&
|
if (IS_ACPI_PROC_ID_VALID (ProcNode1) &&
|
||||||
IS_ACPI_PROC_ID_VALID (ProcNode2) &&
|
IS_ACPI_PROC_ID_VALID (ProcNode2) &&
|
||||||
(ProcNode1->GicCToken != CM_NULL_TOKEN) &&
|
(ProcNode1->AcpiIdObjectToken != CM_NULL_TOKEN) &&
|
||||||
(ProcNode2->GicCToken != CM_NULL_TOKEN) &&
|
(ProcNode2->AcpiIdObjectToken != CM_NULL_TOKEN) &&
|
||||||
(ProcNode1->GicCToken == ProcNode2->GicCToken))
|
(ProcNode1->AcpiIdObjectToken == ProcNode2->AcpiIdObjectToken))
|
||||||
{
|
{
|
||||||
DEBUG ((
|
DEBUG ((
|
||||||
DEBUG_ERROR,
|
DEBUG_ERROR,
|
||||||
"ERROR: PPTT: Two Processor Hierarchy Info objects (%d and %d) map to " \
|
"ERROR: PPTT: Two Processor Hierarchy Info objects (%d and %d) map to " \
|
||||||
"the same GICC Info object. ACPI Processor IDs are not unique. " \
|
"the same ACPI ID reference object. ACPI Processor IDs are not unique. " \
|
||||||
"GicCToken = %p.\n",
|
"AcpiIdObjectToken = %p.\n",
|
||||||
Index1,
|
Index1,
|
||||||
Index2,
|
Index2,
|
||||||
ProcNode1->GicCToken
|
ProcNode1->AcpiIdObjectToken
|
||||||
));
|
));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -474,7 +476,7 @@ AddProcHierarchyNodes (
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_ACPI_6_4_PPTT_STRUCTURE_PROCESSOR *ProcStruct;
|
EFI_ACPI_6_4_PPTT_STRUCTURE_PROCESSOR *ProcStruct;
|
||||||
UINT32 *PrivateResources;
|
UINT32 *PrivateResources;
|
||||||
BOOLEAN IsGicCTokenDuplicated;
|
BOOLEAN IsAcpiIdObjectTokenDuplicated;
|
||||||
|
|
||||||
CM_ARM_GICC_INFO *GicCInfoList;
|
CM_ARM_GICC_INFO *GicCInfoList;
|
||||||
UINT32 GicCInfoCount;
|
UINT32 GicCInfoCount;
|
||||||
@ -500,15 +502,15 @@ AddProcHierarchyNodes (
|
|||||||
NodeCount = Generator->ProcHierarchyNodeCount;
|
NodeCount = Generator->ProcHierarchyNodeCount;
|
||||||
|
|
||||||
// Check if every GICC Object is referenced by onlu one Proc Node
|
// Check if every GICC Object is referenced by onlu one Proc Node
|
||||||
IsGicCTokenDuplicated = FindDuplicateValue (
|
IsAcpiIdObjectTokenDuplicated = FindDuplicateValue (
|
||||||
ProcNodeIterator,
|
ProcNodeIterator,
|
||||||
NodeCount,
|
NodeCount,
|
||||||
sizeof (PPTT_NODE_INDEXER),
|
sizeof (PPTT_NODE_INDEXER),
|
||||||
IsGicCTokenEqual
|
IsAcpiIdObjectTokenEqual
|
||||||
);
|
);
|
||||||
// Duplicate GIC CPU Interface Token was found so two PPTT Processor Hierarchy
|
// Duplicate GIC CPU Interface Token was found so two PPTT Processor Hierarchy
|
||||||
// Nodes map to the same MADT GICC structure
|
// Nodes map to the same MADT GICC structure
|
||||||
if (IsGicCTokenDuplicated) {
|
if (IsAcpiIdObjectTokenDuplicated) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -602,14 +604,14 @@ AddProcHierarchyNodes (
|
|||||||
if (!IS_ACPI_PROC_ID_VALID (ProcInfoNode)) {
|
if (!IS_ACPI_PROC_ID_VALID (ProcInfoNode)) {
|
||||||
// Default invalid ACPI Processor ID to 0
|
// Default invalid ACPI Processor ID to 0
|
||||||
ProcStruct->AcpiProcessorId = 0;
|
ProcStruct->AcpiProcessorId = 0;
|
||||||
} else if (ProcInfoNode->GicCToken == CM_NULL_TOKEN) {
|
} else if (ProcInfoNode->AcpiIdObjectToken == CM_NULL_TOKEN) {
|
||||||
Status = EFI_INVALID_PARAMETER;
|
Status = EFI_INVALID_PARAMETER;
|
||||||
DEBUG ((
|
DEBUG ((
|
||||||
DEBUG_ERROR,
|
DEBUG_ERROR,
|
||||||
"ERROR: PPTT: The 'ACPI Processor ID valid' flag is set but no GICC " \
|
"ERROR: PPTT: The 'ACPI Processor ID valid' flag is set but no " \
|
||||||
"structure token was provided. GicCToken = %p. RequestorToken = %p. " \
|
"ACPI ID Reference object token was provided. " \
|
||||||
"Status = %r\n",
|
"AcpiIdObjectToken = %p. RequestorToken = %p. Status = %r\n",
|
||||||
ProcInfoNode->GicCToken,
|
ProcInfoNode->AcpiIdObjectToken,
|
||||||
ProcInfoNode->Token,
|
ProcInfoNode->Token,
|
||||||
Status
|
Status
|
||||||
));
|
));
|
||||||
@ -617,17 +619,17 @@ AddProcHierarchyNodes (
|
|||||||
} else {
|
} else {
|
||||||
Status = GetEArmObjGicCInfo (
|
Status = GetEArmObjGicCInfo (
|
||||||
CfgMgrProtocol,
|
CfgMgrProtocol,
|
||||||
ProcInfoNode->GicCToken,
|
ProcInfoNode->AcpiIdObjectToken,
|
||||||
&GicCInfoList,
|
&GicCInfoList,
|
||||||
&GicCInfoCount
|
&GicCInfoCount
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((
|
DEBUG ((
|
||||||
DEBUG_ERROR,
|
DEBUG_ERROR,
|
||||||
"ERROR: PPTT: Failed to get GICC structure. ACPI Processor ID " \
|
"ERROR: PPTT: Failed to get ACPI ID Reference object token. " \
|
||||||
"can't be populated. GicCToken = %p. RequestorToken = %p. " \
|
"ACPI Processor ID can't be populated. " \
|
||||||
"Status = %r\n",
|
"AcpiIdObjectToken = %p. RequestorToken = %p. Status = %r\n",
|
||||||
ProcInfoNode->GicCToken,
|
ProcInfoNode->AcpiIdObjectToken,
|
||||||
ProcInfoNode->Token,
|
ProcInfoNode->Token,
|
||||||
Status
|
Status
|
||||||
));
|
));
|
||||||
@ -640,10 +642,10 @@ AddProcHierarchyNodes (
|
|||||||
DEBUG_ERROR,
|
DEBUG_ERROR,
|
||||||
"ERROR: PPTT: Failed to find a unique GICC structure. " \
|
"ERROR: PPTT: Failed to find a unique GICC structure. " \
|
||||||
"ACPI Processor ID can't be populated. " \
|
"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",
|
"Status = %r\n",
|
||||||
GicCInfoCount,
|
GicCInfoCount,
|
||||||
ProcInfoNode->GicCToken,
|
ProcInfoNode->AcpiIdObjectToken,
|
||||||
ProcInfoNode->Token,
|
ProcInfoNode->Token,
|
||||||
Status
|
Status
|
||||||
));
|
));
|
||||||
|
@ -894,11 +894,11 @@ CreateAmlCpuFromProcHierarchy (
|
|||||||
ASSERT (CfgMgrProtocol != NULL);
|
ASSERT (CfgMgrProtocol != NULL);
|
||||||
ASSERT (ParentNode != NULL);
|
ASSERT (ParentNode != NULL);
|
||||||
ASSERT (ProcHierarchyNodeInfo != NULL);
|
ASSERT (ProcHierarchyNodeInfo != NULL);
|
||||||
ASSERT (ProcHierarchyNodeInfo->GicCToken != CM_NULL_TOKEN);
|
ASSERT (ProcHierarchyNodeInfo->AcpiIdObjectToken != CM_NULL_TOKEN);
|
||||||
|
|
||||||
Status = GetEArmObjGicCInfo (
|
Status = GetEArmObjGicCInfo (
|
||||||
CfgMgrProtocol,
|
CfgMgrProtocol,
|
||||||
ProcHierarchyNodeInfo->GicCToken,
|
ProcHierarchyNodeInfo->AcpiIdObjectToken,
|
||||||
&GicCInfo,
|
&GicCInfo,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
@ -1175,9 +1175,9 @@ CreateAmlCpuTopologyTree (
|
|||||||
// Find the children of the CM_ARM_PROC_HIERARCHY_INFO
|
// Find the children of the CM_ARM_PROC_HIERARCHY_INFO
|
||||||
// currently being handled (i.e. ParentToken == NodeToken).
|
// currently being handled (i.e. ParentToken == NodeToken).
|
||||||
if (Generator->ProcNodeList[Index].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.
|
// Create a Cpu node.
|
||||||
if (Generator->ProcNodeList[Index].GicCToken != CM_NULL_TOKEN) {
|
if (Generator->ProcNodeList[Index].AcpiIdObjectToken != CM_NULL_TOKEN) {
|
||||||
Status = CheckProcNode (
|
Status = CheckProcNode (
|
||||||
Generator->ProcNodeList[Index].Flags,
|
Generator->ProcNodeList[Index].Flags,
|
||||||
TRUE,
|
TRUE,
|
||||||
|
@ -328,7 +328,7 @@ STATIC CONST CM_OBJ_PARSER CmArmProcHierarchyInfoParser[] = {
|
|||||||
{ "Token", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
|
{ "Token", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
|
||||||
{ "Flags", 4, "0x%x", NULL },
|
{ "Flags", 4, "0x%x", NULL },
|
||||||
{ "ParentToken", sizeof (CM_OBJECT_TOKEN), "0x%p", 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 },
|
{ "NoOfPrivateResources", 4, "0x%x", NULL },
|
||||||
{ "PrivateResourcesArrayToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
|
{ "PrivateResourcesArrayToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
|
||||||
{ "LpiToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
|
{ "LpiToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user