From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 0389E7803E3 for ; Thu, 21 Mar 2024 16:00:45 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=OvQkpJMYtTw50OxWHeMgeWKm99Evdill8O0NC2Qih6g=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20240206; t=1711036844; v=1; b=Y6Tw+nX8bKnaliHs7yIs6jwfqv/92UtHUIqzKu5QUI5lEqFSqv4/fzUGb1l/ag7oRSfItcJY PDs9qOuOrYAMiG5u2+AIxtAiz7MM7+dNPvsDVMX+7Ob9cU3f6kOyqxZKTUHC0ZswOlN9eZpM9Iq 5qqTnvfPf39mAXcHz6tdSaY4IH9ypTth3Xpj7z4/KfsAb5LBWd8QI1C8hwfUK8DKKA1Hb6vFHOA AsFbKM/uG6gEWaj77jHVHn9vg0TYtI2cUpOS7yS/qXtL9NyiDlXszucFiKNMu2csVSymGGRrns/ MNgZUW8cQXVQ7/UPbQ/tBzlueTnW+zbwh5QNC8qW9nh4A== X-Received: by 127.0.0.2 with SMTP id RjJpYY7687511xAufg1nDQYg; Thu, 21 Mar 2024 09:00:44 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.617.1711036844043625860 for ; Thu, 21 Mar 2024 09:00:44 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 03D9F1007; Thu, 21 Mar 2024 09:01:18 -0700 (PDT) X-Received: from e126645.nice.arm.com (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 106BD3F67D; Thu, 21 Mar 2024 09:00:40 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Pierre Gondois , Sami Mujawar , Pierre Gondois , Yeo Reum Yun , Sunil V L , AbdulLateef Attar , Jeshua Smith , Jeff Brasen , Girish Mahadevan , Leif Lindholm , Meenakshi Aggarwal Subject: [edk2-devel] [PATCH 09/19] DynamicTablesPkg: Rename GicCToken field in Processor Hierarchy Info Date: Thu, 21 Mar 2024 16:59:14 +0100 Message-Id: <20240321155924.707272-10-pierre.gondois@arm.com> In-Reply-To: <20240321155924.707272-1-pierre.gondois@arm.com> References: <20240321155924.707272-1-pierre.gondois@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Thu, 21 Mar 2024 09:00:44 -0700 Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: xfAT6rM5yaxhJQG3eUHs8zYQx7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=Y6Tw+nX8; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io From: Sami Mujawar 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 Cc: Yeo Reum Yun Cc: AbdulLateef Attar Cc: Jeshua Smith Cc: Jeff Brasen Cc: Girish Mahadevan Cc: Leif Lindholm Cc: Meenakshi Aggarwal Signed-off-by: Sami Mujawar Signed-off-by: Pierre Gondois --- .../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/DynamicTables= Pkg/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 proces= sor=0D /// topology. A value of CM_NULL_TOKEN means this node has no parent.=0D CM_OBJECT_TOKEN ParentToken;=0D - /// Token of the associated CM_ARM_GICC_INFO object which has the=0D - /// corresponding ACPI Processor ID. A value of CM_NULL_TOKEN means this= =0D - /// node represents a group of associated processors and it does not hav= e an=0D - /// associated GIC CPU interface.=0D - CM_OBJECT_TOKEN GicCToken;=0D + /// Token of the associated object which has the corresponding ACPI Proc= essor=0D + /// ID, e.g. for Arm systems this is a reference to CM_ARM_GICC_INFO obj= ect.=0D + /// A value of CM_NULL_TOKEN means this node represents a group of assoc= iated=0D + /// processors and it does not have an associated CPU interface.=0D + CM_OBJECT_TOKEN AcpiIdObjectToken;=0D /// Number of resources private to this Node=0D UINT32 NoOfPrivateResources;=0D /// Token of the array which contains references to the resources privat= e to=0D 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 debuggi= ng=0D purposes.=0D =0D - @retval TRUE Object1 and Object2 have the same GicCToken.= =0D - @retval FALSE Object1 and Object2 have different GicCToken= s.=0D + @retval TRUE Object1 and Object2 have the same=0D + AcpiIdObjectToken.=0D + @retval FALSE Object1 and Object2 have different=0D + AcpiIdObjectTokens.=0D **/=0D BOOLEAN=0D EFIAPI=0D -IsGicCTokenEqual (=0D +IsAcpiIdObjectTokenEqual (=0D IN CONST VOID *Object1,=0D IN CONST VOID *Object2,=0D IN UINTN Index1,=0D @@ -426,18 +428,18 @@ IsGicCTokenEqual ( =0D if (IS_ACPI_PROC_ID_VALID (ProcNode1) &&=0D IS_ACPI_PROC_ID_VALID (ProcNode2) &&=0D - (ProcNode1->GicCToken !=3D CM_NULL_TOKEN) &&=0D - (ProcNode2->GicCToken !=3D CM_NULL_TOKEN) &&=0D - (ProcNode1->GicCToken =3D=3D ProcNode2->GicCToken))=0D + (ProcNode1->AcpiIdObjectToken !=3D CM_NULL_TOKEN) &&=0D + (ProcNode2->AcpiIdObjectToken !=3D CM_NULL_TOKEN) &&=0D + (ProcNode1->AcpiIdObjectToken =3D=3D ProcNode2->AcpiIdObjectToken))= =0D {=0D DEBUG ((=0D DEBUG_ERROR,=0D "ERROR: PPTT: Two Processor Hierarchy Info objects (%d and %d) map t= o " \=0D - "the same GICC Info object. ACPI Processor IDs are not unique. " \=0D - "GicCToken =3D %p.\n",=0D + "the same ACPI ID reference object. ACPI Processor IDs are not uniqu= e. " \=0D + "AcpiIdObjectToken =3D %p.\n",=0D Index1,=0D Index2,=0D - ProcNode1->GicCToken=0D + ProcNode1->AcpiIdObjectToken=0D ));=0D return TRUE;=0D }=0D @@ -474,7 +476,7 @@ AddProcHierarchyNodes ( EFI_STATUS Status;=0D EFI_ACPI_6_4_PPTT_STRUCTURE_PROCESSOR *ProcStruct;=0D UINT32 *PrivateResources;=0D - BOOLEAN IsGicCTokenDuplicated;=0D + BOOLEAN IsAcpiIdObjectTokenDuplicated;=0D =0D CM_ARM_GICC_INFO *GicCInfoList;=0D UINT32 GicCInfoCount;=0D @@ -500,15 +502,15 @@ AddProcHierarchyNodes ( NodeCount =3D Generator->ProcHierarchyNodeCount;=0D =0D // Check if every GICC Object is referenced by onlu one Proc Node=0D - IsGicCTokenDuplicated =3D FindDuplicateValue (=0D - ProcNodeIterator,=0D - NodeCount,=0D - sizeof (PPTT_NODE_INDEXER),=0D - IsGicCTokenEqual=0D - );=0D + IsAcpiIdObjectTokenDuplicated =3D FindDuplicateValue (=0D + ProcNodeIterator,=0D + NodeCount,=0D + sizeof (PPTT_NODE_INDEXER),=0D + IsAcpiIdObjectTokenEqual=0D + );=0D // Duplicate GIC CPU Interface Token was found so two PPTT Processor Hie= rarchy=0D // Nodes map to the same MADT GICC structure=0D - if (IsGicCTokenDuplicated) {=0D + if (IsAcpiIdObjectTokenDuplicated) {=0D return EFI_INVALID_PARAMETER;=0D }=0D =0D @@ -602,14 +604,14 @@ AddProcHierarchyNodes ( if (!IS_ACPI_PROC_ID_VALID (ProcInfoNode)) {=0D // Default invalid ACPI Processor ID to 0=0D ProcStruct->AcpiProcessorId =3D 0;=0D - } else if (ProcInfoNode->GicCToken =3D=3D CM_NULL_TOKEN) {=0D + } else if (ProcInfoNode->AcpiIdObjectToken =3D=3D CM_NULL_TOKEN) {=0D Status =3D EFI_INVALID_PARAMETER;=0D DEBUG ((=0D DEBUG_ERROR,=0D - "ERROR: PPTT: The 'ACPI Processor ID valid' flag is set but no GIC= C " \=0D - "structure token was provided. GicCToken =3D %p. RequestorToken = =3D %p. " \=0D - "Status =3D %r\n",=0D - ProcInfoNode->GicCToken,=0D + "ERROR: PPTT: The 'ACPI Processor ID valid' flag is set but no " \= =0D + "ACPI ID Reference object token was provided. " \=0D + "AcpiIdObjectToken =3D %p. RequestorToken =3D %p. Status =3D %r\n"= ,=0D + ProcInfoNode->AcpiIdObjectToken,=0D ProcInfoNode->Token,=0D Status=0D ));=0D @@ -617,17 +619,17 @@ AddProcHierarchyNodes ( } else {=0D Status =3D GetEArmObjGicCInfo (=0D CfgMgrProtocol,=0D - ProcInfoNode->GicCToken,=0D + ProcInfoNode->AcpiIdObjectToken,=0D &GicCInfoList,=0D &GicCInfoCount=0D );=0D if (EFI_ERROR (Status)) {=0D DEBUG ((=0D DEBUG_ERROR,=0D - "ERROR: PPTT: Failed to get GICC structure. ACPI Processor ID " = \=0D - "can't be populated. GicCToken =3D %p. RequestorToken =3D %p. " = \=0D - "Status =3D %r\n",=0D - ProcInfoNode->GicCToken,=0D + "ERROR: PPTT: Failed to get ACPI ID Reference object token. " \= =0D + "ACPI Processor ID can't be populated. " \=0D + "AcpiIdObjectToken =3D %p. RequestorToken =3D %p. Status =3D %r\= n",=0D + ProcInfoNode->AcpiIdObjectToken,=0D ProcInfoNode->Token,=0D Status=0D ));=0D @@ -640,10 +642,10 @@ AddProcHierarchyNodes ( DEBUG_ERROR,=0D "ERROR: PPTT: Failed to find a unique GICC structure. " \=0D "ACPI Processor ID can't be populated. " \=0D - "GICC Structure Count =3D %d. GicCToken =3D %p. RequestorToken = =3D %p " \=0D + "GICC Structure Count =3D %d. AcpiIdObjectToken =3D %p. Requesto= rToken =3D %p " \=0D "Status =3D %r\n",=0D GicCInfoCount,=0D - ProcInfoNode->GicCToken,=0D + ProcInfoNode->AcpiIdObjectToken,=0D ProcInfoNode->Token,=0D Status=0D ));=0D diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/Ss= dtCpuTopologyGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTop= ologyLibArm/SsdtCpuTopologyGenerator.c index 6ce7b71fac8b..5a5bfefd894e 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTo= pologyGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTo= pologyGenerator.c @@ -894,11 +894,11 @@ CreateAmlCpuFromProcHierarchy ( ASSERT (CfgMgrProtocol !=3D NULL);=0D ASSERT (ParentNode !=3D NULL);=0D ASSERT (ProcHierarchyNodeInfo !=3D NULL);=0D - ASSERT (ProcHierarchyNodeInfo->GicCToken !=3D CM_NULL_TOKEN);=0D + ASSERT (ProcHierarchyNodeInfo->AcpiIdObjectToken !=3D CM_NULL_TOKEN);=0D =0D Status =3D GetEArmObjGicCInfo (=0D CfgMgrProtocol,=0D - ProcHierarchyNodeInfo->GicCToken,=0D + ProcHierarchyNodeInfo->AcpiIdObjectToken,=0D &GicCInfo,=0D NULL=0D );=0D @@ -1170,9 +1170,9 @@ CreateAmlCpuTopologyTree ( // Find the children of the CM_ARM_PROC_HIERARCHY_INFO=0D // currently being handled (i.e. ParentToken =3D=3D NodeToken).=0D if (Generator->ProcNodeList[Index].ParentToken =3D=3D NodeToken) {=0D - // Only Cpus (leaf nodes in this tree) have a GicCToken.=0D + // Only Cpus (leaf nodes in this tree) have a AcpiIdObjectToken.=0D // Create a Cpu node.=0D - if (Generator->ProcNodeList[Index].GicCToken !=3D CM_NULL_TOKEN) {=0D + if (Generator->ProcNodeList[Index].AcpiIdObjectToken !=3D CM_NULL_TO= KEN) {=0D Status =3D CheckProcNode (=0D Generator->ProcNodeList[Index].Flags,=0D TRUE,=0D diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationMa= nagerObjectParser.c b/DynamicTablesPkg/Library/Common/TableHelperLib/Config= urationManagerObjectParser.c index 050cd04d09c2..17388b183554 100644 --- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerOb= jectParser.c +++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerOb= jectParser.c @@ -328,7 +328,7 @@ STATIC CONST CM_OBJ_PARSER CmArmProcHierarchyInfoParse= r[] =3D { { "Token", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }= ,=0D { "Flags", 4, "0x%x", NULL }= ,=0D { "ParentToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }= ,=0D - { "GicCToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }= ,=0D + { "AcpiIdObjectToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }= ,=0D { "NoOfPrivateResources", 4, "0x%x", NULL }= ,=0D { "PrivateResourcesArrayToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }= ,=0D { "LpiToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }= ,=0D --=20 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] -=-=-=-=-=-=-=-=-=-=-=-