summaryrefslogtreecommitdiffstats
path: root/DynamicTablesPkg
diff options
context:
space:
mode:
authorSami Mujawar <sami.mujawar@arm.com>2024-03-11 15:45:15 +0000
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-07-29 13:44:55 +0000
commit6466a6e63eb6d808ad9244803edcd2a483f7a121 (patch)
tree8a45d80084422c8e4674067d9476f0dc2188c77f /DynamicTablesPkg
parente8119798b189edb6e40cd9d472159d1db62e6ca5 (diff)
downloadedk2-6466a6e63eb6d808ad9244803edcd2a483f7a121.tar.gz
edk2-6466a6e63eb6d808ad9244803edcd2a483f7a121.tar.bz2
edk2-6466a6e63eb6d808ad9244803edcd2a483f7a121.zip
DynamicTablesPkg: Move PCC Type 5 info to Arch Common
Move the PCC Subspace Type 5 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>
Diffstat (limited to 'DynamicTablesPkg')
-rw-r--r--DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h32
-rw-r--r--DynamicTablesPkg/Include/ArmNameSpaceObjects.h36
-rw-r--r--DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.c22
-rw-r--r--DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.h4
-rw-r--r--DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c5
-rw-r--r--DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c6
-rw-r--r--DynamicTablesPkg/Readme.md6
7 files changed, 55 insertions, 56 deletions
diff --git a/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h b/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h
index d4de70af5a..58a137e905 100644
--- a/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h
+++ b/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h
@@ -44,6 +44,7 @@ typedef enum ArchCommonObjectID {
EArchCommonObjPccSubspaceType2Info, ///< 21 - Pcc Subspace Type 2 Info
EArchCommonObjPccSubspaceType3Info, ///< 22 - Pcc Subspace Type 3 Info
EArchCommonObjPccSubspaceType4Info, ///< 23 - Pcc Subspace Type 4 Info
+ EArchCommonObjPccSubspaceType5Info, ///< 24 - Pcc Subspace Type 5 Info
EArchCommonObjMax
} EARCH_COMMON_OBJECT_ID;
@@ -610,6 +611,37 @@ typedef struct CmArchCommonPccSubspaceType3Info {
*/
typedef CM_ARCH_COMMON_PCC_SUBSPACE_TYPE3_INFO CM_ARCH_COMMON_PCC_SUBSPACE_TYPE4_INFO;
+/** A structure that describes a
+ PCC Subspace of type 5 (HW-Registers).
+
+ ID: EArchCommonObjPccSubspaceType5Info
+*/
+typedef struct CmArchCommonPccSubspaceType5Info {
+ /** Generic Pcc information.
+
+ The Subspace of Type0 contains information that can be re-used
+ in other Subspace types.
+
+ MaximumPeriodicAccessRate doesn't need to be populated for
+ this structure.
+ */
+ PCC_SUBSPACE_GENERIC_INFO GenericPccInfo;
+
+ /// Version.
+ UINT16 Version;
+
+ /// Platform Interrupt.
+ CM_ARCH_COMMON_GENERIC_INTERRUPT PlatIrq;
+
+ /// Command Complete Check Register.
+ /// The WriteMask field is not used.
+ PCC_MAILBOX_REGISTER_INFO CmdCompleteCheckReg;
+
+ /// Error Status Register.
+ /// The WriteMask field is not used.
+ PCC_MAILBOX_REGISTER_INFO ErrorStatusReg;
+} CM_ARCH_COMMON_PCC_SUBSPACE_TYPE5_INFO;
+
#pragma pack()
#endif // ARCH_COMMON_NAMESPACE_OBJECTS_H_
diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
index 7977cef07a..724e614bb6 100644
--- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
+++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
@@ -51,9 +51,8 @@ typedef enum ArmObjectID {
EArmObjCmn600Info, ///< 20 - CMN-600 Info
EArmObjRmr, ///< 21 - Reserved Memory Range Node
EArmObjMemoryRangeDescriptor, ///< 22 - Memory Range Descriptor
- EArmObjPccSubspaceType5Info, ///< 23 - Pcc Subspace Type 5 Info
- EArmObjEtInfo, ///< 24 - Embedded Trace Extension/Module Info
- EArmObjPsdInfo, ///< 25 - P-State Dependency (PSD) Info
+ EArmObjEtInfo, ///< 23 - Embedded Trace Extension/Module Info
+ EArmObjPsdInfo, ///< 24 - P-State Dependency (PSD) Info
EArmObjMax
} EARM_OBJECT_ID;
@@ -709,37 +708,6 @@ typedef struct CmArmRmrDescriptor {
UINT64 Length;
} CM_ARM_MEMORY_RANGE_DESCRIPTOR;
-/** A structure that describes a
- PCC Subspace of type 5 (HW-Registers).
-
- ID: EArmObjPccSubspaceType5Info
-*/
-typedef struct CmArmPccSubspaceType5Info {
- /** Generic Pcc information.
-
- The Subspace of Type0 contains information that can be re-used
- in other Subspace types.
-
- MaximumPeriodicAccessRate doesn't need to be populated for
- this structure.
- */
- PCC_SUBSPACE_GENERIC_INFO GenericPccInfo;
-
- /// Version.
- UINT16 Version;
-
- /// Platform Interrupt.
- CM_ARCH_COMMON_GENERIC_INTERRUPT PlatIrq;
-
- /// Command Complete Check Register.
- /// The WriteMask field is not used.
- PCC_MAILBOX_REGISTER_INFO CmdCompleteCheckReg;
-
- /// Error Status Register.
- /// The WriteMask field is not used.
- PCC_MAILBOX_REGISTER_INFO ErrorStatusReg;
-} CM_ARM_PCC_SUBSPACE_TYPE5_INFO;
-
/** An enum describing the Arm Embedded Trace device type.
*/
typedef enum ArmEtType {
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.c
index 0df6429b0f..205c444057 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.c
@@ -34,7 +34,7 @@ Requirements:
- EArchCommonObjPccSubspaceType2Info
- EArchCommonObjPccSubspaceType3Info
- EArchCommonObjPccSubspaceType4Info
- - EArmObjPccSubspaceType5Info
+ - EArchCommonObjPccSubspaceType5Info
*/
/** This macro expands to a function that retrieves the PCC
@@ -86,9 +86,9 @@ GET_OBJECT_LIST (
Subspace of Type 5 Information from the Configuration Manager.
*/
GET_OBJECT_LIST (
- EObjNameSpaceArm,
- EArmObjPccSubspaceType5Info,
- CM_ARM_PCC_SUBSPACE_TYPE5_INFO
+ EObjNameSpaceArchCommon,
+ EArchCommonObjPccSubspaceType5Info,
+ CM_ARCH_COMMON_PCC_SUBSPACE_TYPE5_INFO
);
/** The Platform is capable of generating an interrupt
@@ -168,7 +168,7 @@ MappingTableFree (
@param [in] MappingTable The mapping table structure.
@param [in] PccSubspace A pointer to
- CM_[ARM|ARCH_COMMON]_PCC_SUBSPACE_TYPE[X]_INFO.
+ CM_ARCH_COMMON_PCC_SUBSPACE_TYPE[X]_INFO.
@param [in] Index Index at which PccSubspace must be added.
This is the Subspace Id.
@@ -209,7 +209,7 @@ MappingTableAdd (
@param [in] MappingTable The mapping table structure.
@param [in] CmPccArray Pointer to an array of
- CM_[ARM|ARCH_COMMON]_PCC_SUBSPACE_TYPE[X]_INFO.
+ CM_ARCH_COMMON_PCC_SUBSPACE_TYPE[X]_INFO.
@param [in] CmPccCount Count of objects in CmPccArray.
@retval EFI_SUCCESS Success.
@@ -264,7 +264,7 @@ MapPccSubspaceId (
break;
case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_5_HW_REGISTERS_COMMUNICATIONS:
- CmObjSize = sizeof (CM_ARM_PCC_SUBSPACE_TYPE5_INFO);
+ CmObjSize = sizeof (CM_ARCH_COMMON_PCC_SUBSPACE_TYPE5_INFO);
break;
default:
@@ -601,7 +601,7 @@ STATIC
EFI_STATUS
EFIAPI
AddSubspaceStructType5 (
- IN CM_ARM_PCC_SUBSPACE_TYPE5_INFO *PccCmObj,
+ IN CM_ARCH_COMMON_PCC_SUBSPACE_TYPE5_INFO *PccCmObj,
IN EFI_ACPI_6_4_PCCT_SUBSPACE_5_HW_REGISTERS_COMMUNICATIONS *PccAcpi
)
{
@@ -752,7 +752,7 @@ PopulatePcctTable (
case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_5_HW_REGISTERS_COMMUNICATIONS:
Status = AddSubspaceStructType5 (
- (CM_ARM_PCC_SUBSPACE_TYPE5_INFO *)CurrentPccSubspace,
+ (CM_ARCH_COMMON_PCC_SUBSPACE_TYPE5_INFO *)CurrentPccSubspace,
(EFI_ACPI_6_4_PCCT_SUBSPACE_5_HW_REGISTERS_COMMUNICATIONS *)PccBuffer
);
@@ -834,7 +834,7 @@ BuildPcctTable (
UINT32 PccType3Count;
CM_ARCH_COMMON_PCC_SUBSPACE_TYPE4_INFO *PccType4;
UINT32 PccType4Count;
- CM_ARM_PCC_SUBSPACE_TYPE5_INFO *PccType5;
+ CM_ARCH_COMMON_PCC_SUBSPACE_TYPE5_INFO *PccType5;
UINT32 PccType5Count;
ASSERT (This != NULL);
@@ -920,7 +920,7 @@ BuildPcctTable (
goto error_handler;
}
- Status = GetEArmObjPccSubspaceType5Info (
+ Status = GetEArchCommonObjPccSubspaceType5Info (
CfgMgrProtocol,
CM_NULL_TOKEN,
&PccType5,
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.h b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.h
index e1bca78c2f..b99bf91b41 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.h
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPcctLibArm/PcctGenerator.h
@@ -19,7 +19,7 @@
*/
typedef struct MappingTable {
/// Mapping table for Subspace Ids.
- /// Subspace ID/Index <-> CM_[ARM|ARCH_COMMON]_PCC_SUBSPACE_TYPE[X]_INFO pointer
+ /// Subspace ID/Index <-> CM_ARCH_COMMON_PCC_SUBSPACE_TYPE[X]_INFO pointer
VOID **Table;
/// Number of entries in the Table.
@@ -35,7 +35,7 @@ typedef struct AcpiPcctGenerator {
// Private fields are defined from here.
/// Table to map:
- /// Subspace ID/Index <-> CM_[ARM|ARCH_COMMON]_PCC_SUBSPACE_TYPE[X]_INFO pointer
+ /// Subspace ID/Index <-> CM_ARCH_COMMON_PCC_SUBSPACE_TYPE[X]_INFO pointer
MAPPING_TABLE MappingTable;
} ACPI_PCCT_GENERATOR;
diff --git a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c
index 112bef7151..05fbdadf15 100644
--- a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c
+++ b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c
@@ -166,9 +166,8 @@ 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 5 Info
- NULL, ///< 24 - Embedded Trace Extension/Module Info
- NULL ///< 25 - P-State Dependency (PSD) Info
+ NULL, ///< 23 - Embedded Trace Extension/Module Info
+ NULL ///< 24 - 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 5f08f514fa..da7901a2c4 100644
--- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
+++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
@@ -635,9 +635,9 @@ STATIC CONST CM_OBJ_PARSER CmArchCommonPccSubspaceType34InfoParser[] = {
ARRAY_SIZE (CmArmMailboxRegisterInfoParser) },
};
-/** A parser for EArmObjPccSubspaceType5Info.
+/** A parser for EArchCommonObjPccSubspaceType5Info.
*/
-STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType5InfoParser[] = {
+STATIC CONST CM_OBJ_PARSER CmArchCommonPccSubspaceType5InfoParser[] = {
{ "GenericPccInfo", sizeof (PCC_SUBSPACE_GENERIC_INFO),
NULL, NULL, CmArchCommonPccSubspaceType0InfoParser,
ARRAY_SIZE (CmArchCommonPccSubspaceType0InfoParser) },
@@ -694,6 +694,7 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArchCommonNamespaceObjectParser[] = {
CM_PARSER_ADD_OBJECT (EArchCommonObjPccSubspaceType2Info, CmArchCommonPccSubspaceType2InfoParser),
CM_PARSER_ADD_OBJECT (EArchCommonObjPccSubspaceType3Info, CmArchCommonPccSubspaceType34InfoParser),
CM_PARSER_ADD_OBJECT (EArchCommonObjPccSubspaceType4Info, CmArchCommonPccSubspaceType34InfoParser),
+ CM_PARSER_ADD_OBJECT (EArchCommonObjPccSubspaceType5Info, CmArchCommonPccSubspaceType5InfoParser),
CM_PARSER_ADD_OBJECT_RESERVED (EArchCommonObjMax)
};
@@ -723,7 +724,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 (EArmObjPccSubspaceType5Info, CmArmPccSubspaceType5InfoParser),
CM_PARSER_ADD_OBJECT (EArmObjEtInfo, CmArmEtInfo),
CM_PARSER_ADD_OBJECT (EArmObjPsdInfo, CmArmPsdInfoParser),
CM_PARSER_ADD_OBJECT_RESERVED (EArmObjMax)
diff --git a/DynamicTablesPkg/Readme.md b/DynamicTablesPkg/Readme.md
index 1e45bcd597..d4c95a3c42 100644
--- a/DynamicTablesPkg/Readme.md
+++ b/DynamicTablesPkg/Readme.md
@@ -463,9 +463,8 @@ 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 5 Info | Move to Arch Common NS |
-| 24 | Embedded Trace Extension/Module Info | |
-| 25 | P-State Dependency (PSD) Info | Move to Arch Common NS |
+| 23 | Embedded Trace Extension/Module Info | |
+| 24 | 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
| 21 | Pcc Subspace Type 2 Info | |
| 22 | Pcc Subspace Type 3 Info | |
| 23 | Pcc Subspace Type 4 Info | |
+| 24 | Pcc Subspace Type 5 Info | |
| `*` | All other values are reserved. | |