From: Sami Mujawar <sami.muja...@arm.com>

Move the Continuous perfformance control info object from Arm
Namespace to the Arch Common namespace.

Correspondingly also update the following modules to reflect the
changes introduced by the move:
 - SSDT CPU topology generator
 - ConfigurationManagerObjectParser
 - Dynamic Plat Repo TokenFixer map.

Cc: Pierre Gondois <pierre.gond...@arm.com>
Cc: Yeo Reum Yun <yeoreum....@arm.com>
Cc: AbdulLateef Attar <abdullateef.at...@amd.com>
Cc: Jeshua Smith <jesh...@nvidia.com>
Cc: Jeff Brasen <jbra...@nvidia.com>
Cc: Girish Mahadevan <gmahade...@nvidia.com>
Cc: Leif Lindholm <quic_llind...@quicinc.com>
Cc: Meenakshi Aggarwal <meenakshi.aggar...@nxp.com>
Signed-off-by: Sami Mujawar <sami.muja...@arm.com>
Signed-off-by: Pierre Gondois <pierre.gond...@arm.com>
---
 .../Include/ArchCommonNameSpaceObjects.h      | 19 ++++++
 .../Include/ArmNameSpaceObjects.h             | 37 +++---------
 .../SsdtCpuTopologyGenerator.c                | 12 ++--
 .../DynamicPlatRepoLib/CmObjectTokenFixer.c   | 15 +++--
 .../ConfigurationManagerObjectParser.c        |  6 +-
 DynamicTablesPkg/Readme.md                    | 60 +++++++++----------
 6 files changed, 74 insertions(+), 75 deletions(-)

diff --git a/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h 
b/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h
index 17cd552a3f74..63b24de2f2f1 100644
--- a/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h
+++ b/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h
@@ -38,6 +38,7 @@ typedef enum ArchCommonObjectID {
   EArchCommonObjLpiInfo,                        ///< 15 - Lpi Info
   EArchCommonObjProcHierarchyInfo,              ///< 16 - Processor Hierarchy 
Info
   EArchCommonObjCacheInfo,                      ///< 17 - Cache Info
+  EArchCommonObjCpcInfo,                        ///< 18 - Continuous 
Performance Control Info
   EArchCommonObjMax
 } EARCH_COMMON_OBJECT_ID;
 
@@ -432,6 +433,24 @@ typedef struct CmArchCommonCacheInfo {
   UINT32             CacheId;
 } CM_ARCH_COMMON_CACHE_INFO;
 
+/** A structure that describes the Cpc information.
+
+  Continuous Performance Control is described in DSDT/SSDT and associated
+  to cpus/clusters in the cpu topology.
+
+  Unsupported Optional registers should be encoded with NULL resource
+  Register {(SystemMemory, 0, 0, 0, 0)}
+
+  For values that support Integer or Buffer, integer will be used
+  if buffer is NULL resource.
+  If resource is not NULL then Integer must be 0
+
+  Cf. ACPI 6.4, s8.4.7.1 _CPC (Continuous Performance Control)
+
+  ID: EArchCommonObjCpcInfo
+*/
+typedef AML_CPC_INFO CM_ARCH_COMMON_CPC_INFO;
+
 #pragma pack()
 
 #endif // ARCH_COMMON_NAMESPACE_OBJECTS_H_
diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h 
b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
index eade2afcd028..b9d1202be365 100644
--- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
+++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
@@ -51,15 +51,14 @@ typedef enum ArmObjectID {
   EArmObjCmn600Info,                                           ///< 20 - 
CMN-600 Info
   EArmObjRmr,                                                  ///< 21 - 
Reserved Memory Range Node
   EArmObjMemoryRangeDescriptor,                                ///< 22 - 
Memory Range Descriptor
-  EArmObjCpcInfo,                                              ///< 23 - 
Continuous Performance Control Info
-  EArmObjPccSubspaceType0Info,                                 ///< 24 - Pcc 
Subspace Type 0 Info
-  EArmObjPccSubspaceType1Info,                                 ///< 25 - Pcc 
Subspace Type 2 Info
-  EArmObjPccSubspaceType2Info,                                 ///< 26 - Pcc 
Subspace Type 2 Info
-  EArmObjPccSubspaceType3Info,                                 ///< 27 - Pcc 
Subspace Type 3 Info
-  EArmObjPccSubspaceType4Info,                                 ///< 28 - Pcc 
Subspace Type 4 Info
-  EArmObjPccSubspaceType5Info,                                 ///< 29 - Pcc 
Subspace Type 5 Info
-  EArmObjEtInfo,                                               ///< 30 - 
Embedded Trace Extension/Module Info
-  EArmObjPsdInfo,                                              ///< 31 - 
P-State Dependency (PSD) Info
+  EArmObjPccSubspaceType0Info,                                 ///< 23 - Pcc 
Subspace Type 0 Info
+  EArmObjPccSubspaceType1Info,                                 ///< 24 - Pcc 
Subspace Type 2 Info
+  EArmObjPccSubspaceType2Info,                                 ///< 25 - Pcc 
Subspace Type 2 Info
+  EArmObjPccSubspaceType3Info,                                 ///< 26 - Pcc 
Subspace Type 3 Info
+  EArmObjPccSubspaceType4Info,                                 ///< 27 - Pcc 
Subspace Type 4 Info
+  EArmObjPccSubspaceType5Info,                                 ///< 28 - Pcc 
Subspace Type 5 Info
+  EArmObjEtInfo,                                               ///< 29 - 
Embedded Trace Extension/Module Info
+  EArmObjPsdInfo,                                              ///< 30 - 
P-State Dependency (PSD) Info
   EArmObjMax
 } EARM_OBJECT_ID;
 
@@ -177,7 +176,7 @@ typedef struct CmArmGicCInfo {
   UINT32             AffinityFlags;
 
   /** Optional field: Reference Token for the Cpc info of this processor.
-      i.e. a token referencing a CM_ARM_CPC_INFO object.
+      i.e. a token referencing a CM_ARCH_COMMON_CPC_INFO object.
   */
   CM_OBJECT_TOKEN    CpcToken;
 
@@ -715,24 +714,6 @@ typedef struct CmArmRmrDescriptor {
   UINT64    Length;
 } CM_ARM_MEMORY_RANGE_DESCRIPTOR;
 
-/** A structure that describes the Cpc information.
-
-  Continuous Performance Control is described in DSDT/SSDT and associated
-  to cpus/clusters in the cpu topology.
-
-  Unsupported Optional registers should be encoded with NULL resource
-  Register {(SystemMemory, 0, 0, 0, 0)}
-
-  For values that support Integer or Buffer, integer will be used
-  if buffer is NULL resource.
-  If resource is not NULL then Integer must be 0
-
-  Cf. ACPI 6.4, s8.4.7.1 _CPC (Continuous Performance Control)
-
-  ID: EArmObjCpcInfo
-*/
-typedef AML_CPC_INFO CM_ARM_CPC_INFO;
-
 /** A structure that describes a
     PCC Mailbox Register.
 */
diff --git 
a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c
 
b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c
index 1bb90e114b16..21233a404a05 100644
--- 
a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c
+++ 
b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c
@@ -89,9 +89,9 @@ GET_OBJECT_LIST (
   information from the Configuration Manager.
 */
 GET_OBJECT_LIST (
-  EObjNameSpaceArm,
-  EArmObjCpcInfo,
-  CM_ARM_CPC_INFO
+  EObjNameSpaceArchCommon,
+  EArchCommonObjCpcInfo,
+  CM_ARCH_COMMON_CPC_INFO
   );
 
 /**
@@ -400,10 +400,10 @@ CreateAmlCpcNode (
   IN  AML_OBJECT_NODE_HANDLE                              *Node
   )
 {
-  EFI_STATUS       Status;
-  CM_ARM_CPC_INFO  *CpcInfo;
+  EFI_STATUS               Status;
+  CM_ARCH_COMMON_CPC_INFO  *CpcInfo;
 
-  Status = GetEArmObjCpcInfo (
+  Status = GetEArchCommonObjCpcInfo (
              CfgMgrProtocol,
              GicCInfo->CpcToken,
              &CpcInfo,
diff --git 
a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c 
b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c
index a162d614f9f0..68db478c5789 100644
--- a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c
+++ b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c
@@ -166,15 +166,14 @@ CM_OBJECT_TOKEN_FIXER  TokenFixer[EArmObjMax] = {
   NULL,                             ///< 20 - CMN-600 Info
   NULL,                             ///< 21 - Reserved Memory Range Node
   NULL,                             ///< 22 - Memory Range Descriptor
-  NULL,                             ///< 23 - Continuous Performance Control 
Info
-  NULL,                             ///< 24 - Pcc Subspace Type 0 Info
+  NULL,                             ///< 23 - Pcc Subspace Type 0 Info
+  NULL,                             ///< 24 - Pcc Subspace Type 2 Info
   NULL,                             ///< 25 - Pcc Subspace Type 2 Info
-  NULL,                             ///< 26 - Pcc Subspace Type 2 Info
-  NULL,                             ///< 27 - Pcc Subspace Type 3 Info
-  NULL,                             ///< 28 - Pcc Subspace Type 4 Info
-  NULL,                             ///< 29 - Pcc Subspace Type 5 Info
-  NULL,                             ///< 30 - Embedded Trace Extension/Module 
Info
-  NULL                              ///< 31 - P-State Dependency (PSD) Info
+  NULL,                             ///< 26 - Pcc Subspace Type 3 Info
+  NULL,                             ///< 27 - Pcc Subspace Type 4 Info
+  NULL,                             ///< 28 - Pcc Subspace Type 5 Info
+  NULL,                             ///< 29 - Embedded Trace Extension/Module 
Info
+  NULL                              ///< 30 - 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 5440f9993b67..54ecc66c5b40 100644
--- 
a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
+++ 
b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
@@ -479,9 +479,9 @@ STATIC CONST CM_OBJ_PARSER  
CmArmMemoryRangeDescriptorInfoParser[] = {
   { "Length",      8, "0x%llx", NULL },
 };
 
-/** A parser for EArmObjCpcInfo.
+/** A parser for EArchCommonObjCpcInfo.
 */
-STATIC CONST CM_OBJ_PARSER  CmArmCpcInfoParser[] = {
+STATIC CONST CM_OBJ_PARSER  CmArchCommonCpcInfoParser[] = {
   { "Revision",                              4,                                
               "0x%lx", NULL },
   { "HighestPerformanceBuffer",              sizeof 
(EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE),
     NULL, NULL, AcpiGenericAddressParser,
@@ -688,6 +688,7 @@ STATIC CONST CM_OBJ_PARSER_ARRAY  
ArchCommonNamespaceObjectParser[] = {
   CM_PARSER_ADD_OBJECT (EArchCommonObjLpiInfo,                     
CmArchCommonLpiInfoParser),
   CM_PARSER_ADD_OBJECT (EArchCommonObjProcHierarchyInfo,           
CmArchCommonProcHierarchyInfoParser),
   CM_PARSER_ADD_OBJECT (EArchCommonObjCacheInfo,                   
CmArchCommonCacheInfoParser),
+  CM_PARSER_ADD_OBJECT (EArchCommonObjCpcInfo,                     
CmArchCommonCpcInfoParser),
   CM_PARSER_ADD_OBJECT_RESERVED (EArchCommonObjMax)
 };
 
@@ -717,7 +718,6 @@ STATIC CONST CM_OBJ_PARSER_ARRAY  
ArmNamespaceObjectParser[] = {
   CM_PARSER_ADD_OBJECT (EArmObjCmn600Info,                 
CmArmCmn600InfoParser),
   CM_PARSER_ADD_OBJECT (EArmObjRmr,                        CmArmRmrInfoParser),
   CM_PARSER_ADD_OBJECT (EArmObjMemoryRangeDescriptor,      
CmArmMemoryRangeDescriptorInfoParser),
-  CM_PARSER_ADD_OBJECT (EArmObjCpcInfo,                    CmArmCpcInfoParser),
   CM_PARSER_ADD_OBJECT (EArmObjPccSubspaceType0Info,       
CmArmPccSubspaceType0InfoParser),
   CM_PARSER_ADD_OBJECT (EArmObjPccSubspaceType1Info,       
CmArmPccSubspaceType1InfoParser),
   CM_PARSER_ADD_OBJECT (EArmObjPccSubspaceType2Info,       
CmArmPccSubspaceType2InfoParser),
diff --git a/DynamicTablesPkg/Readme.md b/DynamicTablesPkg/Readme.md
index 7865731841d6..8ac9d126b834 100644
--- a/DynamicTablesPkg/Readme.md
+++ b/DynamicTablesPkg/Readme.md
@@ -463,38 +463,38 @@ The CM_OBJECT_ID type is used to identify the 
Configuration Manager
 |  20   | CMN 600 Info                              | |
 |  21   | Reserved Memory Range Node                | |
 |  22   | Memory Range Descriptor                   | |
-|  23   | Continuous Performance Control Info       | Move to Arch Common NS |
-|  24   | Pcc Subspace Type 0 Info                  | Move to Arch Common NS |
-|  25   | Pcc Subspace Type 1 Info                  | Move to Arch Common NS |
-|  26   | Pcc Subspace Type 2 Info                  | Move to Arch Common NS |
-|  27   | Pcc Subspace Type 3 Info                  | Move to Arch Common NS |
-|  28   | Pcc Subspace Type 4 Info                  | Move to Arch Common NS |
-|  29   | Pcc Subspace Type 5 Info                  | Move to Arch Common NS |
-|  30   | Embedded Trace Extension/Module Info      | |
-|  31   | P-State Dependency (PSD) Info             | Move to Arch Common NS |
+|  23   | Pcc Subspace Type 0 Info                  | Move to Arch Common NS |
+|  24   | Pcc Subspace Type 1 Info                  | Move to Arch Common NS |
+|  25   | Pcc Subspace Type 2 Info                  | Move to Arch Common NS |
+|  26   | Pcc Subspace Type 3 Info                  | Move to Arch Common NS |
+|  27   | Pcc Subspace Type 4 Info                  | Move to Arch Common NS |
+|  28   | Pcc Subspace Type 5 Info                  | Move to Arch Common NS |
+|  29   | Embedded Trace Extension/Module Info      | |
+|  30   | P-State Dependency (PSD) Info             | Move to Arch Common NS |
 |  `*`  | All other values are reserved.            | |
 
 #### Object ID's in the Arch Common Namespace:
 
-|  ID   |  Description                      | Comments |
-| ---:  | :--------------------------       | :---     |
-|   0   |  Reserved                         | |
-|   1   | Power Management Profile Info     | |
-|   2   | Serial Port Info                  | |
-|   3   | Serial Console Port Info          | |
-|   4   | Serial Debug Port Info            | |
-|   5   | Hypervisor Vendor Id              | |
-|   6   | Fixed feature flags for FADT      | |
-|   7   | CM Object Reference               | |
-|   8   | PCI Configuration Space Info      | |
-|   9   | PCI Address Map Info              | |
-|  10   | PCI Interrupt Map Info            | |
-|  11   | Memory Affinity Info              | |
-|  12   | Device Handle Acpi                | |
-|  13   | Device Handle PCI                 | |
-|  14   | Generic Initiator Affinity Info   | |
-|  15   | Low Power Idle State Info         | |
-|  16   | Processor Hierarchy Info          | |
-|  17   | Cache Info                        | |
-|  `*`  | All other values are reserved.    | |
+|  ID   |  Description                              | Comments |
+| ---:  | :--------------------------               | :---     |
+|   0   |  Reserved                                 | |
+|   1   | Power Management Profile Info             | |
+|   2   | Serial Port Info                          | |
+|   3   | Serial Console Port Info                  | |
+|   4   | Serial Debug Port Info                    | |
+|   5   | Hypervisor Vendor Id                      | |
+|   6   | Fixed feature flags for FADT              | |
+|   7   | CM Object Reference                       | |
+|   8   | PCI Configuration Space Info              | |
+|   9   | PCI Address Map Info                      | |
+|  10   | PCI Interrupt Map Info                    | |
+|  11   | Memory Affinity Info                      | |
+|  12   | Device Handle Acpi                        | |
+|  13   | Device Handle PCI                         | |
+|  14   | Generic Initiator Affinity Info           | |
+|  15   | Low Power Idle State Info                 | |
+|  16   | Processor Hierarchy Info                  | |
+|  17   | Cache Info                                | |
+|  18   | Continuous Performance Control Info       | |
+|  `*`  | All other values are reserved.            | |
 
-- 
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116990): https://edk2.groups.io/g/devel/message/116990
Mute This Topic: https://groups.io/mt/105068166/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to