DynamicTablesPkg: Move PCC Type 3 & 4 info to Arch Common

Move the PCC Subspace Type 3 & 4 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>
This commit is contained in:
Sami Mujawar 2024-03-11 15:38:58 +00:00 committed by mergify[bot]
parent 78b77d9ec4
commit e8119798b1
6 changed files with 72 additions and 74 deletions

View File

@ -42,6 +42,8 @@ typedef enum ArchCommonObjectID {
EArchCommonObjPccSubspaceType0Info, ///< 19 - Pcc Subspace Type 0 Info EArchCommonObjPccSubspaceType0Info, ///< 19 - Pcc Subspace Type 0 Info
EArchCommonObjPccSubspaceType1Info, ///< 20 - Pcc Subspace Type 1 Info EArchCommonObjPccSubspaceType1Info, ///< 20 - Pcc Subspace Type 1 Info
EArchCommonObjPccSubspaceType2Info, ///< 21 - Pcc Subspace Type 2 Info EArchCommonObjPccSubspaceType2Info, ///< 21 - Pcc Subspace Type 2 Info
EArchCommonObjPccSubspaceType3Info, ///< 22 - Pcc Subspace Type 3 Info
EArchCommonObjPccSubspaceType4Info, ///< 23 - Pcc Subspace Type 4 Info
EArchCommonObjMax EArchCommonObjMax
} EARCH_COMMON_OBJECT_ID; } EARCH_COMMON_OBJECT_ID;
@ -570,6 +572,44 @@ typedef struct CmArchCommonPccSubspaceType2Info {
PCC_MAILBOX_REGISTER_INFO PlatIrqAckReg; PCC_MAILBOX_REGISTER_INFO PlatIrqAckReg;
} CM_ARCH_COMMON_PCC_SUBSPACE_TYPE2_INFO; } CM_ARCH_COMMON_PCC_SUBSPACE_TYPE2_INFO;
/** A structure that describes a
PCC Subspace of type 3 (Extended)
ID: EArchCommonObjPccSubspaceType3Info
*/
typedef struct CmArchCommonPccSubspaceType3Info {
/** 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;
/// Command Complete Check Register.
/// The WriteMask field is not used.
PCC_MAILBOX_REGISTER_INFO CmdCompleteCheckReg;
/// Command Complete Update Register.
PCC_MAILBOX_REGISTER_INFO CmdCompleteUpdateReg;
/// Error Status Register.
/// The WriteMask field is not used.
PCC_MAILBOX_REGISTER_INFO ErrorStatusReg;
} CM_ARCH_COMMON_PCC_SUBSPACE_TYPE3_INFO;
/** A structure that describes a
PCC Subspace of type 4 (Extended)
ID: EArchCommonObjPccSubspaceType4Info
*/
typedef CM_ARCH_COMMON_PCC_SUBSPACE_TYPE3_INFO CM_ARCH_COMMON_PCC_SUBSPACE_TYPE4_INFO;
#pragma pack() #pragma pack()
#endif // ARCH_COMMON_NAMESPACE_OBJECTS_H_ #endif // ARCH_COMMON_NAMESPACE_OBJECTS_H_

View File

@ -51,11 +51,9 @@ typedef enum ArmObjectID {
EArmObjCmn600Info, ///< 20 - CMN-600 Info EArmObjCmn600Info, ///< 20 - CMN-600 Info
EArmObjRmr, ///< 21 - Reserved Memory Range Node EArmObjRmr, ///< 21 - Reserved Memory Range Node
EArmObjMemoryRangeDescriptor, ///< 22 - Memory Range Descriptor EArmObjMemoryRangeDescriptor, ///< 22 - Memory Range Descriptor
EArmObjPccSubspaceType3Info, ///< 23 - Pcc Subspace Type 3 Info EArmObjPccSubspaceType5Info, ///< 23 - Pcc Subspace Type 5 Info
EArmObjPccSubspaceType4Info, ///< 24 - Pcc Subspace Type 4 Info EArmObjEtInfo, ///< 24 - Embedded Trace Extension/Module Info
EArmObjPccSubspaceType5Info, ///< 25 - Pcc Subspace Type 5 Info EArmObjPsdInfo, ///< 25 - P-State Dependency (PSD) Info
EArmObjEtInfo, ///< 26 - Embedded Trace Extension/Module Info
EArmObjPsdInfo, ///< 27 - P-State Dependency (PSD) Info
EArmObjMax EArmObjMax
} EARM_OBJECT_ID; } EARM_OBJECT_ID;
@ -711,44 +709,6 @@ typedef struct CmArmRmrDescriptor {
UINT64 Length; UINT64 Length;
} CM_ARM_MEMORY_RANGE_DESCRIPTOR; } CM_ARM_MEMORY_RANGE_DESCRIPTOR;
/** A structure that describes a
PCC Subspace of type 3 (Extended)
ID: EArmObjPccSubspaceType3Info
*/
typedef struct CmArmPccSubspaceType3Info {
/** 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;
/// Command Complete Check Register.
/// The WriteMask field is not used.
PCC_MAILBOX_REGISTER_INFO CmdCompleteCheckReg;
/// Command Complete Update Register.
PCC_MAILBOX_REGISTER_INFO CmdCompleteUpdateReg;
/// Error Status Register.
/// The WriteMask field is not used.
PCC_MAILBOX_REGISTER_INFO ErrorStatusReg;
} CM_ARM_PCC_SUBSPACE_TYPE3_INFO;
/** A structure that describes a
PCC Subspace of type 4 (Extended)
ID: EArmObjPccSubspaceType4Info
*/
typedef CM_ARM_PCC_SUBSPACE_TYPE3_INFO CM_ARM_PCC_SUBSPACE_TYPE4_INFO;
/** A structure that describes a /** A structure that describes a
PCC Subspace of type 5 (HW-Registers). PCC Subspace of type 5 (HW-Registers).

View File

@ -32,8 +32,8 @@ Requirements:
- EArchCommonObjPccSubspaceType0Info - EArchCommonObjPccSubspaceType0Info
- EArchCommonObjPccSubspaceType1Info - EArchCommonObjPccSubspaceType1Info
- EArchCommonObjPccSubspaceType2Info - EArchCommonObjPccSubspaceType2Info
- EArmObjPccSubspaceType3Info - EArchCommonObjPccSubspaceType3Info
- EArmObjPccSubspaceType4Info - EArchCommonObjPccSubspaceType4Info
- EArmObjPccSubspaceType5Info - EArmObjPccSubspaceType5Info
*/ */
@ -68,18 +68,18 @@ GET_OBJECT_LIST (
Subspace of Type 3 Information from the Configuration Manager. Subspace of Type 3 Information from the Configuration Manager.
*/ */
GET_OBJECT_LIST ( GET_OBJECT_LIST (
EObjNameSpaceArm, EObjNameSpaceArchCommon,
EArmObjPccSubspaceType3Info, EArchCommonObjPccSubspaceType3Info,
CM_ARM_PCC_SUBSPACE_TYPE3_INFO CM_ARCH_COMMON_PCC_SUBSPACE_TYPE3_INFO
); );
/** This macro expands to a function that retrieves the PCC /** This macro expands to a function that retrieves the PCC
Subspace of Type 4 Information from the Configuration Manager. Subspace of Type 4 Information from the Configuration Manager.
*/ */
GET_OBJECT_LIST ( GET_OBJECT_LIST (
EObjNameSpaceArm, EObjNameSpaceArchCommon,
EArmObjPccSubspaceType4Info, EArchCommonObjPccSubspaceType4Info,
CM_ARM_PCC_SUBSPACE_TYPE4_INFO CM_ARCH_COMMON_PCC_SUBSPACE_TYPE4_INFO
); );
/** This macro expands to a function that retrieves the PCC /** This macro expands to a function that retrieves the PCC
@ -256,11 +256,11 @@ MapPccSubspaceId (
break; break;
case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_3_EXTENDED_PCC: case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_3_EXTENDED_PCC:
CmObjSize = sizeof (CM_ARM_PCC_SUBSPACE_TYPE3_INFO); CmObjSize = sizeof (CM_ARCH_COMMON_PCC_SUBSPACE_TYPE3_INFO);
break; break;
case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC: case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC:
CmObjSize = sizeof (CM_ARM_PCC_SUBSPACE_TYPE4_INFO); CmObjSize = sizeof (CM_ARCH_COMMON_PCC_SUBSPACE_TYPE4_INFO);
break; break;
case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_5_HW_REGISTERS_COMMUNICATIONS: case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_5_HW_REGISTERS_COMMUNICATIONS:
@ -489,7 +489,7 @@ STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
AddSubspaceStructType34 ( AddSubspaceStructType34 (
IN CM_ARM_PCC_SUBSPACE_TYPE3_INFO *PccCmObj, IN CM_ARCH_COMMON_PCC_SUBSPACE_TYPE3_INFO *PccCmObj,
IN EFI_ACPI_6_4_PCCT_SUBSPACE_3_EXTENDED_PCC *PccAcpi IN EFI_ACPI_6_4_PCCT_SUBSPACE_3_EXTENDED_PCC *PccAcpi
) )
{ {
@ -734,7 +734,7 @@ PopulatePcctTable (
case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_3_EXTENDED_PCC: case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_3_EXTENDED_PCC:
Status = AddSubspaceStructType34 ( Status = AddSubspaceStructType34 (
(CM_ARM_PCC_SUBSPACE_TYPE3_INFO *)CurrentPccSubspace, (CM_ARCH_COMMON_PCC_SUBSPACE_TYPE3_INFO *)CurrentPccSubspace,
(EFI_ACPI_6_4_PCCT_SUBSPACE_3_EXTENDED_PCC *)PccBuffer (EFI_ACPI_6_4_PCCT_SUBSPACE_3_EXTENDED_PCC *)PccBuffer
); );
@ -743,7 +743,7 @@ PopulatePcctTable (
case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC: case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC:
Status = AddSubspaceStructType34 ( Status = AddSubspaceStructType34 (
(CM_ARM_PCC_SUBSPACE_TYPE4_INFO *)CurrentPccSubspace, (CM_ARCH_COMMON_PCC_SUBSPACE_TYPE4_INFO *)CurrentPccSubspace,
(EFI_ACPI_6_4_PCCT_SUBSPACE_4_EXTENDED_PCC *)PccBuffer (EFI_ACPI_6_4_PCCT_SUBSPACE_4_EXTENDED_PCC *)PccBuffer
); );
@ -830,9 +830,9 @@ BuildPcctTable (
UINT32 PccType1Count; UINT32 PccType1Count;
CM_ARCH_COMMON_PCC_SUBSPACE_TYPE2_INFO *PccType2; CM_ARCH_COMMON_PCC_SUBSPACE_TYPE2_INFO *PccType2;
UINT32 PccType2Count; UINT32 PccType2Count;
CM_ARM_PCC_SUBSPACE_TYPE3_INFO *PccType3; CM_ARCH_COMMON_PCC_SUBSPACE_TYPE3_INFO *PccType3;
UINT32 PccType3Count; UINT32 PccType3Count;
CM_ARM_PCC_SUBSPACE_TYPE4_INFO *PccType4; CM_ARCH_COMMON_PCC_SUBSPACE_TYPE4_INFO *PccType4;
UINT32 PccType4Count; UINT32 PccType4Count;
CM_ARM_PCC_SUBSPACE_TYPE5_INFO *PccType5; CM_ARM_PCC_SUBSPACE_TYPE5_INFO *PccType5;
UINT32 PccType5Count; UINT32 PccType5Count;
@ -898,7 +898,7 @@ BuildPcctTable (
goto error_handler; goto error_handler;
} }
Status = GetEArmObjPccSubspaceType3Info ( Status = GetEArchCommonObjPccSubspaceType3Info (
CfgMgrProtocol, CfgMgrProtocol,
CM_NULL_TOKEN, CM_NULL_TOKEN,
&PccType3, &PccType3,
@ -909,7 +909,7 @@ BuildPcctTable (
goto error_handler; goto error_handler;
} }
Status = GetEArmObjPccSubspaceType4Info ( Status = GetEArchCommonObjPccSubspaceType4Info (
CfgMgrProtocol, CfgMgrProtocol,
CM_NULL_TOKEN, CM_NULL_TOKEN,
&PccType4, &PccType4,

View File

@ -166,11 +166,9 @@ CM_OBJECT_TOKEN_FIXER TokenFixer[EArmObjMax] = {
NULL, ///< 20 - CMN-600 Info NULL, ///< 20 - CMN-600 Info
NULL, ///< 21 - Reserved Memory Range Node NULL, ///< 21 - Reserved Memory Range Node
NULL, ///< 22 - Memory Range Descriptor NULL, ///< 22 - Memory Range Descriptor
NULL, ///< 23 - Pcc Subspace Type 3 Info NULL, ///< 23 - Pcc Subspace Type 5 Info
NULL, ///< 24 - Pcc Subspace Type 4 Info NULL, ///< 24 - Embedded Trace Extension/Module Info
NULL, ///< 25 - Pcc Subspace Type 5 Info NULL ///< 25 - P-State Dependency (PSD) Info
NULL, ///< 26 - Embedded Trace Extension/Module Info
NULL ///< 27 - P-State Dependency (PSD) Info
}; };
/** CmObj token fixer. /** CmObj token fixer.

View File

@ -613,9 +613,9 @@ STATIC CONST CM_OBJ_PARSER CmArchCommonPccSubspaceType2InfoParser[] = {
ARRAY_SIZE (CmArmMailboxRegisterInfoParser) }, ARRAY_SIZE (CmArmMailboxRegisterInfoParser) },
}; };
/** A parser for EArmObjPccSubspaceType3Info or EArmObjPccSubspaceType4Info. /** A parser for EArchCommonObjPccSubspaceType3Info or EArchCommonObjPccSubspaceType4Info.
*/ */
STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType34InfoParser[] = { STATIC CONST CM_OBJ_PARSER CmArchCommonPccSubspaceType34InfoParser[] = {
{ "GenericPccInfo", sizeof (PCC_SUBSPACE_GENERIC_INFO), { "GenericPccInfo", sizeof (PCC_SUBSPACE_GENERIC_INFO),
NULL, NULL, CmArchCommonPccSubspaceType0InfoParser, NULL, NULL, CmArchCommonPccSubspaceType0InfoParser,
ARRAY_SIZE (CmArchCommonPccSubspaceType0InfoParser) }, ARRAY_SIZE (CmArchCommonPccSubspaceType0InfoParser) },
@ -692,6 +692,8 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArchCommonNamespaceObjectParser[] = {
CM_PARSER_ADD_OBJECT (EArchCommonObjPccSubspaceType0Info, CmArchCommonPccSubspaceType0InfoParser), CM_PARSER_ADD_OBJECT (EArchCommonObjPccSubspaceType0Info, CmArchCommonPccSubspaceType0InfoParser),
CM_PARSER_ADD_OBJECT (EArchCommonObjPccSubspaceType1Info, CmArchCommonPccSubspaceType1InfoParser), CM_PARSER_ADD_OBJECT (EArchCommonObjPccSubspaceType1Info, CmArchCommonPccSubspaceType1InfoParser),
CM_PARSER_ADD_OBJECT (EArchCommonObjPccSubspaceType2Info, CmArchCommonPccSubspaceType2InfoParser), CM_PARSER_ADD_OBJECT (EArchCommonObjPccSubspaceType2Info, CmArchCommonPccSubspaceType2InfoParser),
CM_PARSER_ADD_OBJECT (EArchCommonObjPccSubspaceType3Info, CmArchCommonPccSubspaceType34InfoParser),
CM_PARSER_ADD_OBJECT (EArchCommonObjPccSubspaceType4Info, CmArchCommonPccSubspaceType34InfoParser),
CM_PARSER_ADD_OBJECT_RESERVED (EArchCommonObjMax) CM_PARSER_ADD_OBJECT_RESERVED (EArchCommonObjMax)
}; };
@ -721,8 +723,6 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArmNamespaceObjectParser[] = {
CM_PARSER_ADD_OBJECT (EArmObjCmn600Info, CmArmCmn600InfoParser), CM_PARSER_ADD_OBJECT (EArmObjCmn600Info, CmArmCmn600InfoParser),
CM_PARSER_ADD_OBJECT (EArmObjRmr, CmArmRmrInfoParser), CM_PARSER_ADD_OBJECT (EArmObjRmr, CmArmRmrInfoParser),
CM_PARSER_ADD_OBJECT (EArmObjMemoryRangeDescriptor, CmArmMemoryRangeDescriptorInfoParser), CM_PARSER_ADD_OBJECT (EArmObjMemoryRangeDescriptor, CmArmMemoryRangeDescriptorInfoParser),
CM_PARSER_ADD_OBJECT (EArmObjPccSubspaceType3Info, CmArmPccSubspaceType34InfoParser),
CM_PARSER_ADD_OBJECT (EArmObjPccSubspaceType4Info, CmArmPccSubspaceType34InfoParser),
CM_PARSER_ADD_OBJECT (EArmObjPccSubspaceType5Info, CmArmPccSubspaceType5InfoParser), CM_PARSER_ADD_OBJECT (EArmObjPccSubspaceType5Info, CmArmPccSubspaceType5InfoParser),
CM_PARSER_ADD_OBJECT (EArmObjEtInfo, CmArmEtInfo), CM_PARSER_ADD_OBJECT (EArmObjEtInfo, CmArmEtInfo),
CM_PARSER_ADD_OBJECT (EArmObjPsdInfo, CmArmPsdInfoParser), CM_PARSER_ADD_OBJECT (EArmObjPsdInfo, CmArmPsdInfoParser),

View File

@ -463,11 +463,9 @@ The CM_OBJECT_ID type is used to identify the Configuration Manager
| 20 | CMN 600 Info | | | 20 | CMN 600 Info | |
| 21 | Reserved Memory Range Node | | | 21 | Reserved Memory Range Node | |
| 22 | Memory Range Descriptor | | | 22 | Memory Range Descriptor | |
| 23 | Pcc Subspace Type 3 Info | Move to Arch Common NS | | 23 | Pcc Subspace Type 5 Info | Move to Arch Common NS |
| 24 | Pcc Subspace Type 4 Info | Move to Arch Common NS | | 24 | Embedded Trace Extension/Module Info | |
| 25 | Pcc Subspace Type 5 Info | Move to Arch Common NS | | 25 | P-State Dependency (PSD) 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. | | | `*` | All other values are reserved. | |
#### Object ID's in the Arch Common Namespace: #### Object ID's in the Arch Common Namespace:
@ -496,5 +494,7 @@ The CM_OBJECT_ID type is used to identify the Configuration Manager
| 19 | Pcc Subspace Type 0 Info | | | 19 | Pcc Subspace Type 0 Info | |
| 20 | Pcc Subspace Type 1 Info | | | 20 | Pcc Subspace Type 1 Info | |
| 21 | Pcc Subspace Type 2 Info | | | 21 | Pcc Subspace Type 2 Info | |
| 22 | Pcc Subspace Type 3 Info | |
| 23 | Pcc Subspace Type 4 Info | |
| `*` | All other values are reserved. | | | `*` | All other values are reserved. | |