public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
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 15/19] DynamicTablesPkg: Move PCC Type1 info to Arch Common
Date: Thu, 21 Mar 2024 16:59:20 +0100	[thread overview]
Message-ID: <20240321155924.707272-16-pierre.gondois@arm.com> (raw)
In-Reply-To: <20240321155924.707272-1-pierre.gondois@arm.com>

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

Move the PCC Subspace Type1 info object from Arm Namespace to
the Arch Common namespace.

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

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/ArchCommonNameSpaceObjects.h      | 18 +++++++++++
 .../Include/ArmNameSpaceObjects.h             | 30 ++++---------------
 .../Acpi/Arm/AcpiPcctLibArm/PcctGenerator.c   | 18 +++++------
 .../DynamicPlatRepoLib/CmObjectTokenFixer.c   | 11 ++++---
 .../ConfigurationManagerObjectParser.c        |  6 ++--
 DynamicTablesPkg/Readme.md                    | 14 ++++-----
 6 files changed, 48 insertions(+), 49 deletions(-)

diff --git a/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h b/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h
index 4ce2d7b48ebf..583ea0089146 100644
--- a/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h
+++ b/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h
@@ -40,6 +40,7 @@ typedef enum ArchCommonObjectID {
   EArchCommonObjCacheInfo,                      ///< 17 - Cache Info
   EArchCommonObjCpcInfo,                        ///< 18 - Continuous Performance Control Info
   EArchCommonObjPccSubspaceType0Info,           ///< 19 - Pcc Subspace Type 0 Info
+  EArchCommonObjPccSubspaceType1Info,           ///< 20 - Pcc Subspace Type 1 Info
   EArchCommonObjMax
 } EARCH_COMMON_OBJECT_ID;
 
@@ -531,6 +532,23 @@ typedef struct PccSubspaceGenericInfo {
 */
 typedef PCC_SUBSPACE_GENERIC_INFO CM_ARCH_COMMON_PCC_SUBSPACE_TYPE0_INFO;
 
+/** A structure that describes a
+    PCC Subspace of type 1 (HW-Reduced).
+
+    ID: EArchCommonObjPccSubspaceType1Info
+*/
+typedef struct CmArchCommonPccSubspaceType1Info {
+  /** Generic Pcc information.
+
+    The Subspace of Type0 contains information that can be re-used
+    in other Subspace types.
+  */
+  PCC_SUBSPACE_GENERIC_INFO           GenericPccInfo;
+
+  /// Platform Interrupt.
+  CM_ARCH_COMMON_GENERIC_INTERRUPT    PlatIrq;
+} CM_ARCH_COMMON_PCC_SUBSPACE_TYPE1_INFO;
+
 #pragma pack()
 
 #endif // ARCH_COMMON_NAMESPACE_OBJECTS_H_
diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
index a28415c77687..8a62d9386263 100644
--- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
+++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
@@ -51,13 +51,12 @@ typedef enum ArmObjectID {
   EArmObjCmn600Info,                                           ///< 20 - CMN-600 Info
   EArmObjRmr,                                                  ///< 21 - Reserved Memory Range Node
   EArmObjMemoryRangeDescriptor,                                ///< 22 - Memory Range Descriptor
-  EArmObjPccSubspaceType1Info,                                 ///< 23 - Pcc Subspace Type 2 Info
-  EArmObjPccSubspaceType2Info,                                 ///< 24 - Pcc Subspace Type 2 Info
-  EArmObjPccSubspaceType3Info,                                 ///< 25 - Pcc Subspace Type 3 Info
-  EArmObjPccSubspaceType4Info,                                 ///< 26 - Pcc Subspace Type 4 Info
-  EArmObjPccSubspaceType5Info,                                 ///< 27 - Pcc Subspace Type 5 Info
-  EArmObjEtInfo,                                               ///< 28 - Embedded Trace Extension/Module Info
-  EArmObjPsdInfo,                                              ///< 29 - P-State Dependency (PSD) Info
+  EArmObjPccSubspaceType2Info,                                 ///< 23 - Pcc Subspace Type 2 Info
+  EArmObjPccSubspaceType3Info,                                 ///< 24 - Pcc Subspace Type 3 Info
+  EArmObjPccSubspaceType4Info,                                 ///< 25 - Pcc Subspace Type 4 Info
+  EArmObjPccSubspaceType5Info,                                 ///< 26 - Pcc Subspace Type 5 Info
+  EArmObjEtInfo,                                               ///< 27 - Embedded Trace Extension/Module Info
+  EArmObjPsdInfo,                                              ///< 28 - P-State Dependency (PSD) Info
   EArmObjMax
 } EARM_OBJECT_ID;
 
@@ -713,23 +712,6 @@ typedef struct CmArmRmrDescriptor {
   UINT64    Length;
 } CM_ARM_MEMORY_RANGE_DESCRIPTOR;
 
-/** A structure that describes a
-    PCC Subspace of type 1 (HW-Reduced).
-
-    ID: EArmObjPccSubspaceType1Info
-*/
-typedef struct CmArmPccSubspaceType1Info {
-  /** Generic Pcc information.
-
-    The Subspace of Type0 contains information that can be re-used
-    in other Subspace types.
-  */
-  PCC_SUBSPACE_GENERIC_INFO           GenericPccInfo;
-
-  /// Platform Interrupt.
-  CM_ARCH_COMMON_GENERIC_INTERRUPT    PlatIrq;
-} CM_ARM_PCC_SUBSPACE_TYPE1_INFO;
-
 /** A structure that describes a
     PCC Subspace of type 2 (HW-Reduced).
 
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.c
index 575ab31f7ff2..183d8cd221bb 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.c
@@ -30,7 +30,7 @@ Requirements:
   The following Configuration Manager Object(s) are required by
   this Generator:
   - EArchCommonObjPccSubspaceType0Info
-  - EArmObjPccSubspaceType1Info
+  - EArchCommonObjPccSubspaceType1Info
   - EArmObjPccSubspaceType2Info
   - EArmObjPccSubspaceType3Info
   - EArmObjPccSubspaceType4Info
@@ -50,9 +50,9 @@ GET_OBJECT_LIST (
     Subspace of Type 1 Information from the Configuration Manager.
 */
 GET_OBJECT_LIST (
-  EObjNameSpaceArm,
-  EArmObjPccSubspaceType1Info,
-  CM_ARM_PCC_SUBSPACE_TYPE1_INFO
+  EObjNameSpaceArchCommon,
+  EArchCommonObjPccSubspaceType1Info,
+  CM_ARCH_COMMON_PCC_SUBSPACE_TYPE1_INFO
   );
 
 /** This macro expands to a function that retrieves the PCC
@@ -248,7 +248,7 @@ MapPccSubspaceId (
       break;
 
     case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_1_HW_REDUCED_COMMUNICATIONS:
-      CmObjSize = sizeof (CM_ARM_PCC_SUBSPACE_TYPE1_INFO);
+      CmObjSize = sizeof (CM_ARCH_COMMON_PCC_SUBSPACE_TYPE1_INFO);
       break;
 
     case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_2_HW_REDUCED_COMMUNICATIONS:
@@ -358,7 +358,7 @@ STATIC
 EFI_STATUS
 EFIAPI
 AddSubspaceStructType1 (
-  IN  CM_ARM_PCC_SUBSPACE_TYPE1_INFO                          *PccCmObj,
+  IN  CM_ARCH_COMMON_PCC_SUBSPACE_TYPE1_INFO                  *PccCmObj,
   IN  EFI_ACPI_6_4_PCCT_SUBSPACE_1_HW_REDUCED_COMMUNICATIONS  *PccAcpi
   )
 {
@@ -716,7 +716,7 @@ PopulatePcctTable (
 
       case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_1_HW_REDUCED_COMMUNICATIONS:
         Status = AddSubspaceStructType1 (
-                   (CM_ARM_PCC_SUBSPACE_TYPE1_INFO *)CurrentPccSubspace,
+                   (CM_ARCH_COMMON_PCC_SUBSPACE_TYPE1_INFO *)CurrentPccSubspace,
                    (EFI_ACPI_6_4_PCCT_SUBSPACE_1_HW_REDUCED_COMMUNICATIONS *)PccBuffer
                    );
 
@@ -826,7 +826,7 @@ BuildPcctTable (
 
   CM_ARCH_COMMON_PCC_SUBSPACE_TYPE0_INFO  *PccType0;
   UINT32                                  PccType0Count;
-  CM_ARM_PCC_SUBSPACE_TYPE1_INFO          *PccType1;
+  CM_ARCH_COMMON_PCC_SUBSPACE_TYPE1_INFO  *PccType1;
   UINT32                                  PccType1Count;
   CM_ARM_PCC_SUBSPACE_TYPE2_INFO          *PccType2;
   UINT32                                  PccType2Count;
@@ -876,7 +876,7 @@ BuildPcctTable (
     goto error_handler;
   }
 
-  Status = GetEArmObjPccSubspaceType1Info (
+  Status = GetEArchCommonObjPccSubspaceType1Info (
              CfgMgrProtocol,
              CM_NULL_TOKEN,
              &PccType1,
diff --git a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c
index 1691e6015bf8..3a19870aad34 100644
--- a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c
+++ b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c
@@ -167,12 +167,11 @@ CM_OBJECT_TOKEN_FIXER  TokenFixer[EArmObjMax] = {
   NULL,                             ///< 21 - Reserved Memory Range Node
   NULL,                             ///< 22 - Memory Range Descriptor
   NULL,                             ///< 23 - Pcc Subspace Type 2 Info
-  NULL,                             ///< 24 - Pcc Subspace Type 2 Info
-  NULL,                             ///< 25 - Pcc Subspace Type 3 Info
-  NULL,                             ///< 26 - Pcc Subspace Type 4 Info
-  NULL,                             ///< 27 - Pcc Subspace Type 5 Info
-  NULL,                             ///< 28 - Embedded Trace Extension/Module Info
-  NULL                              ///< 29 - P-State Dependency (PSD) Info
+  NULL,                             ///< 24 - Pcc Subspace Type 3 Info
+  NULL,                             ///< 25 - Pcc Subspace Type 4 Info
+  NULL,                             ///< 26 - Pcc Subspace Type 5 Info
+  NULL,                             ///< 27 - Embedded Trace Extension/Module Info
+  NULL                              ///< 28 - 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 e071fa460a40..f8e277f1805e 100644
--- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
+++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
@@ -589,9 +589,9 @@ STATIC CONST CM_OBJ_PARSER  CmArchCommonPccSubspaceType0InfoParser[] = {
     ARRAY_SIZE (CmArmPccSubspaceChannelTimingInfoParser) },
 };
 
-/** A parser for EArmObjPccSubspaceType1Info.
+/** A parser for EArchCommonObjPccSubspaceType1Info.
 */
-STATIC CONST CM_OBJ_PARSER  CmArmPccSubspaceType1InfoParser[] = {
+STATIC CONST CM_OBJ_PARSER  CmArchCommonPccSubspaceType1InfoParser[] = {
   { "GenericPccInfo", sizeof (PCC_SUBSPACE_GENERIC_INFO),
     NULL, NULL, CmArchCommonPccSubspaceType0InfoParser,
     ARRAY_SIZE (CmArchCommonPccSubspaceType0InfoParser) },
@@ -690,6 +690,7 @@ STATIC CONST CM_OBJ_PARSER_ARRAY  ArchCommonNamespaceObjectParser[] = {
   CM_PARSER_ADD_OBJECT (EArchCommonObjCacheInfo,                   CmArchCommonCacheInfoParser),
   CM_PARSER_ADD_OBJECT (EArchCommonObjCpcInfo,                     CmArchCommonCpcInfoParser),
   CM_PARSER_ADD_OBJECT (EArchCommonObjPccSubspaceType0Info,        CmArchCommonPccSubspaceType0InfoParser),
+  CM_PARSER_ADD_OBJECT (EArchCommonObjPccSubspaceType1Info,        CmArchCommonPccSubspaceType1InfoParser),
   CM_PARSER_ADD_OBJECT_RESERVED (EArchCommonObjMax)
 };
 
@@ -719,7 +720,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 (EArmObjPccSubspaceType1Info,       CmArmPccSubspaceType1InfoParser),
   CM_PARSER_ADD_OBJECT (EArmObjPccSubspaceType2Info,       CmArmPccSubspaceType2InfoParser),
   CM_PARSER_ADD_OBJECT (EArmObjPccSubspaceType3Info,       CmArmPccSubspaceType34InfoParser),
   CM_PARSER_ADD_OBJECT (EArmObjPccSubspaceType4Info,       CmArmPccSubspaceType34InfoParser),
diff --git a/DynamicTablesPkg/Readme.md b/DynamicTablesPkg/Readme.md
index 999422035984..3fa3dd9af948 100644
--- a/DynamicTablesPkg/Readme.md
+++ b/DynamicTablesPkg/Readme.md
@@ -463,13 +463,12 @@ 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   | Pcc Subspace Type 1 Info                  | Move to Arch Common NS |
-|  24   | Pcc Subspace Type 2 Info                  | Move to Arch Common NS |
-|  25   | Pcc Subspace Type 3 Info                  | Move to Arch Common NS |
-|  26   | Pcc Subspace Type 4 Info                  | Move to Arch Common NS |
-|  27   | Pcc Subspace Type 5 Info                  | Move to Arch Common NS |
-|  28   | Embedded Trace Extension/Module Info      | |
-|  29   | P-State Dependency (PSD) Info             | Move to Arch Common NS |
+|  23   | Pcc Subspace Type 2 Info                  | Move to Arch Common NS |
+|  24   | Pcc Subspace Type 3 Info                  | Move to Arch Common NS |
+|  25   | Pcc Subspace Type 4 Info                  | Move to Arch Common NS |
+|  26   | Pcc Subspace Type 5 Info                  | Move to Arch Common NS |
+|  27   | Embedded Trace Extension/Module Info      | |
+|  28   | P-State Dependency (PSD) Info             | Move to Arch Common NS |
 |  `*`  | All other values are reserved.            | |
 
 #### Object ID's in the Arch Common Namespace:
@@ -496,5 +495,6 @@ The CM_OBJECT_ID type is used to identify the Configuration Manager
 |  17   | Cache Info                                | |
 |  18   | Continuous Performance Control Info       | |
 |  19   | Pcc Subspace Type 0 Info                  | |
+|  20   | Pcc Subspace Type 1 Info                  | |
 |  `*`  | All other values are reserved.            | |
 
-- 
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116993): https://edk2.groups.io/g/devel/message/116993
Mute This Topic: https://groups.io/mt/105068171/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  parent reply	other threads:[~2024-03-21 16:01 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 ` [edk2-devel] [PATCH 09/19] DynamicTablesPkg: Rename GicCToken field in Processor Hierarchy Info PierreGondois
2024-03-21 15:59 ` [edk2-devel] [PATCH 10/19] DynamicTablesPkg: Move Processor hierarchy info to Arch Common 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 ` PierreGondois [this message]
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-16-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