diff options
author | Sami Mujawar <sami.mujawar@arm.com> | 2024-03-11 18:26:56 +0300 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-07-29 16:44:55 +0300 |
commit | 78b77d9ec4114df1177185c4f69ad89da9610599 (patch) | |
tree | e813a7dd4e02f5802fe14225f9e068c68111b3a6 | |
parent | 870cf728ef82c398f1a4b1e2031046a699eadb6e (diff) | |
download | edk2-78b77d9ec4114df1177185c4f69ad89da9610599.tar.xz |
DynamicTablesPkg: Move PCC Type2 info to Arch Common
Move the PCC Subspace Type2 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>
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
6 files changed, 49 insertions, 50 deletions
diff --git a/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h b/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h index 583ea00891..817c07f40d 100644 --- a/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h @@ -41,6 +41,7 @@ typedef enum ArchCommonObjectID { EArchCommonObjCpcInfo, ///< 18 - Continuous Performance Control Info
EArchCommonObjPccSubspaceType0Info, ///< 19 - Pcc Subspace Type 0 Info
EArchCommonObjPccSubspaceType1Info, ///< 20 - Pcc Subspace Type 1 Info
+ EArchCommonObjPccSubspaceType2Info, ///< 21 - Pcc Subspace Type 2 Info
EArchCommonObjMax
} EARCH_COMMON_OBJECT_ID;
@@ -549,6 +550,26 @@ typedef struct CmArchCommonPccSubspaceType1Info { CM_ARCH_COMMON_GENERIC_INTERRUPT PlatIrq;
} CM_ARCH_COMMON_PCC_SUBSPACE_TYPE1_INFO;
+/** A structure that describes a
+ PCC Subspace of type 2 (HW-Reduced).
+
+ ID: EArchCommonObjPccSubspaceType2Info
+*/
+typedef struct CmArchCommonPccSubspaceType2Info {
+ /** 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;
+
+ /// Platform Interrupt Register.
+ PCC_MAILBOX_REGISTER_INFO PlatIrqAckReg;
+} CM_ARCH_COMMON_PCC_SUBSPACE_TYPE2_INFO;
+
#pragma pack()
#endif // ARCH_COMMON_NAMESPACE_OBJECTS_H_
diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h index 8a62d93862..c287a855da 100644 --- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h @@ -51,12 +51,11 @@ typedef enum ArmObjectID { EArmObjCmn600Info, ///< 20 - CMN-600 Info
EArmObjRmr, ///< 21 - Reserved Memory Range Node
EArmObjMemoryRangeDescriptor, ///< 22 - Memory Range Descriptor
- 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
+ EArmObjPccSubspaceType3Info, ///< 23 - Pcc Subspace Type 3 Info
+ EArmObjPccSubspaceType4Info, ///< 24 - Pcc Subspace Type 4 Info
+ EArmObjPccSubspaceType5Info, ///< 25 - Pcc Subspace Type 5 Info
+ EArmObjEtInfo, ///< 26 - Embedded Trace Extension/Module Info
+ EArmObjPsdInfo, ///< 27 - P-State Dependency (PSD) Info
EArmObjMax
} EARM_OBJECT_ID;
@@ -713,26 +712,6 @@ typedef struct CmArmRmrDescriptor { } CM_ARM_MEMORY_RANGE_DESCRIPTOR;
/** A structure that describes a
- PCC Subspace of type 2 (HW-Reduced).
-
- ID: EArmObjPccSubspaceType2Info
-*/
-typedef struct CmArmPccSubspaceType2Info {
- /** 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;
-
- /// Platform Interrupt Register.
- PCC_MAILBOX_REGISTER_INFO PlatIrqAckReg;
-} CM_ARM_PCC_SUBSPACE_TYPE2_INFO;
-
-/** A structure that describes a
PCC Subspace of type 3 (Extended)
ID: EArmObjPccSubspaceType3Info
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.c index 183d8cd221..552aca4af4 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.c @@ -31,7 +31,7 @@ Requirements: this Generator:
- EArchCommonObjPccSubspaceType0Info
- EArchCommonObjPccSubspaceType1Info
- - EArmObjPccSubspaceType2Info
+ - EArchCommonObjPccSubspaceType2Info
- EArmObjPccSubspaceType3Info
- EArmObjPccSubspaceType4Info
- EArmObjPccSubspaceType5Info
@@ -59,9 +59,9 @@ GET_OBJECT_LIST ( Subspace of Type 2 Information from the Configuration Manager.
*/
GET_OBJECT_LIST (
- EObjNameSpaceArm,
- EArmObjPccSubspaceType2Info,
- CM_ARM_PCC_SUBSPACE_TYPE2_INFO
+ EObjNameSpaceArchCommon,
+ EArchCommonObjPccSubspaceType2Info,
+ CM_ARCH_COMMON_PCC_SUBSPACE_TYPE2_INFO
);
/** This macro expands to a function that retrieves the PCC
@@ -252,7 +252,7 @@ MapPccSubspaceId ( break;
case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_2_HW_REDUCED_COMMUNICATIONS:
- CmObjSize = sizeof (CM_ARM_PCC_SUBSPACE_TYPE2_INFO);
+ CmObjSize = sizeof (CM_ARCH_COMMON_PCC_SUBSPACE_TYPE2_INFO);
break;
case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_3_EXTENDED_PCC:
@@ -418,7 +418,7 @@ STATIC EFI_STATUS
EFIAPI
AddSubspaceStructType2 (
- IN CM_ARM_PCC_SUBSPACE_TYPE2_INFO *PccCmObj,
+ IN CM_ARCH_COMMON_PCC_SUBSPACE_TYPE2_INFO *PccCmObj,
IN EFI_ACPI_6_4_PCCT_SUBSPACE_2_HW_REDUCED_COMMUNICATIONS *PccAcpi
)
{
@@ -725,7 +725,7 @@ PopulatePcctTable ( case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_2_HW_REDUCED_COMMUNICATIONS:
Status = AddSubspaceStructType2 (
- (CM_ARM_PCC_SUBSPACE_TYPE2_INFO *)CurrentPccSubspace,
+ (CM_ARCH_COMMON_PCC_SUBSPACE_TYPE2_INFO *)CurrentPccSubspace,
(EFI_ACPI_6_4_PCCT_SUBSPACE_2_HW_REDUCED_COMMUNICATIONS *)PccBuffer
);
@@ -828,7 +828,7 @@ BuildPcctTable ( UINT32 PccType0Count;
CM_ARCH_COMMON_PCC_SUBSPACE_TYPE1_INFO *PccType1;
UINT32 PccType1Count;
- CM_ARM_PCC_SUBSPACE_TYPE2_INFO *PccType2;
+ CM_ARCH_COMMON_PCC_SUBSPACE_TYPE2_INFO *PccType2;
UINT32 PccType2Count;
CM_ARM_PCC_SUBSPACE_TYPE3_INFO *PccType3;
UINT32 PccType3Count;
@@ -887,7 +887,7 @@ BuildPcctTable ( goto error_handler;
}
- Status = GetEArmObjPccSubspaceType2Info (
+ Status = GetEArchCommonObjPccSubspaceType2Info (
CfgMgrProtocol,
CM_NULL_TOKEN,
&PccType2,
diff --git a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c index 3a19870aad..b73d0ded95 100644 --- a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c +++ b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c @@ -166,12 +166,11 @@ CM_OBJECT_TOKEN_FIXER TokenFixer[EArmObjMax] = { NULL, ///< 20 - CMN-600 Info
NULL, ///< 21 - Reserved Memory Range Node
NULL, ///< 22 - Memory Range Descriptor
- NULL, ///< 23 - Pcc Subspace Type 2 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
+ NULL, ///< 23 - Pcc Subspace Type 3 Info
+ NULL, ///< 24 - Pcc Subspace Type 4 Info
+ NULL, ///< 25 - Pcc Subspace Type 5 Info
+ NULL, ///< 26 - Embedded Trace Extension/Module Info
+ NULL ///< 27 - 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 f8e277f180..c3e18b5a95 100644 --- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c +++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c @@ -600,9 +600,9 @@ STATIC CONST CM_OBJ_PARSER CmArchCommonPccSubspaceType1InfoParser[] = { ARRAY_SIZE (CmArchCommonGenericInterruptParser) },
};
-/** A parser for EArmObjPccSubspaceType2Info.
+/** A parser for EArchCommonObjPccSubspaceType2Info.
*/
-STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType2InfoParser[] = {
+STATIC CONST CM_OBJ_PARSER CmArchCommonPccSubspaceType2InfoParser[] = {
{ "GenericPccInfo", sizeof (PCC_SUBSPACE_GENERIC_INFO),
NULL, NULL, CmArchCommonPccSubspaceType0InfoParser,
ARRAY_SIZE (CmArchCommonPccSubspaceType0InfoParser) },
@@ -691,6 +691,7 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArchCommonNamespaceObjectParser[] = { CM_PARSER_ADD_OBJECT (EArchCommonObjCpcInfo, CmArchCommonCpcInfoParser),
CM_PARSER_ADD_OBJECT (EArchCommonObjPccSubspaceType0Info, CmArchCommonPccSubspaceType0InfoParser),
CM_PARSER_ADD_OBJECT (EArchCommonObjPccSubspaceType1Info, CmArchCommonPccSubspaceType1InfoParser),
+ CM_PARSER_ADD_OBJECT (EArchCommonObjPccSubspaceType2Info, CmArchCommonPccSubspaceType2InfoParser),
CM_PARSER_ADD_OBJECT_RESERVED (EArchCommonObjMax)
};
@@ -720,7 +721,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 (EArmObjPccSubspaceType2Info, CmArmPccSubspaceType2InfoParser),
CM_PARSER_ADD_OBJECT (EArmObjPccSubspaceType3Info, CmArmPccSubspaceType34InfoParser),
CM_PARSER_ADD_OBJECT (EArmObjPccSubspaceType4Info, CmArmPccSubspaceType34InfoParser),
CM_PARSER_ADD_OBJECT (EArmObjPccSubspaceType5Info, CmArmPccSubspaceType5InfoParser),
diff --git a/DynamicTablesPkg/Readme.md b/DynamicTablesPkg/Readme.md index 3fa3dd9af9..59b6f8d1ea 100644 --- a/DynamicTablesPkg/Readme.md +++ b/DynamicTablesPkg/Readme.md @@ -463,12 +463,11 @@ 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 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 |
+| 23 | Pcc Subspace Type 3 Info | Move to Arch Common NS |
+| 24 | Pcc Subspace Type 4 Info | Move to Arch Common NS |
+| 25 | Pcc Subspace Type 5 Info | Move to Arch Common NS |
+| 26 | Embedded Trace Extension/Module Info | |
+| 27 | 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 | 18 | Continuous Performance Control Info | |
| 19 | Pcc Subspace Type 0 Info | |
| 20 | Pcc Subspace Type 1 Info | |
+| 21 | Pcc Subspace Type 2 Info | |
| `*` | All other values are reserved. | |
|