DynamicTablesPkg: Move FADT Fixed Features Flags to Arch Common

Move FADT Fixed Features Flags object from Arm Namespace to the
Arch Common namespace.

Correspondingly also update the following modules to reflect the
changes introduced by the move:
  - FADT 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-06 11:00:12 +00:00 committed by mergify[bot]
parent 87a53216e7
commit 8e9ece1234
6 changed files with 113 additions and 114 deletions

View File

@ -26,6 +26,7 @@ typedef enum ArchCommonObjectID {
EArchCommonObjConsolePortInfo, ///< 3 - Serial Console Port Info
EArchCommonObjSerialDebugPortInfo, ///< 4 - Serial Debug Port Info
EArchCommonObjHypervisorVendorIdentity, ///< 5 - Hypervisor Vendor Id
EArchCommonObjFixedFeatureFlags, ///< 6 - Fixed feature flags for FADT
EArchCommonObjMax
} EARCH_COMMON_OBJECT_ID;
@ -86,6 +87,16 @@ typedef struct CmArchCommonHypervisorVendorIdentity {
UINT64 HypervisorVendorId;
} CM_ARCH_COMMON_HYPERVISOR_VENDOR_ID;
/** A structure that describes the
Fixed feature flags for the Platform.
ID: EArchCommonObjFixedFeatureFlags
*/
typedef struct CmArchCommonFixedFeatureFlags {
/// The Fixed feature flags
UINT32 Flags;
} CM_ARCH_COMMON_FIXED_FEATURE_FLAGS;
#pragma pack()
#endif // ARCH_COMMON_NAMESPACE_OBJECTS_H_

View File

@ -40,38 +40,37 @@ typedef enum ArmObjectID {
EArmObjGTBlockTimerFrameInfo, ///< 9 - Generic Timer Block Frame Info
EArmObjPlatformGenericWatchdogInfo, ///< 10 - Platform Generic Watchdog
EArmObjPciConfigSpaceInfo, ///< 11 - PCI Configuration Space Info
EArmObjFixedFeatureFlags, ///< 12 - Fixed feature flags for FADT
EArmObjItsGroup, ///< 13 - ITS Group
EArmObjNamedComponent, ///< 14 - Named Component
EArmObjRootComplex, ///< 15 - Root Complex
EArmObjSmmuV1SmmuV2, ///< 16 - SMMUv1 or SMMUv2
EArmObjSmmuV3, ///< 17 - SMMUv3
EArmObjPmcg, ///< 18 - PMCG
EArmObjGicItsIdentifierArray, ///< 19 - GIC ITS Identifier Array
EArmObjIdMappingArray, ///< 20 - ID Mapping Array
EArmObjSmmuInterruptArray, ///< 21 - SMMU Interrupt Array
EArmObjProcHierarchyInfo, ///< 22 - Processor Hierarchy Info
EArmObjCacheInfo, ///< 23 - Cache Info
EArmObjCmRef, ///< 24 - CM Object Reference
EArmObjMemoryAffinityInfo, ///< 25 - Memory Affinity Info
EArmObjDeviceHandleAcpi, ///< 26 - Device Handle Acpi
EArmObjDeviceHandlePci, ///< 27 - Device Handle Pci
EArmObjGenericInitiatorAffinityInfo, ///< 28 - Generic Initiator Affinity
EArmObjCmn600Info, ///< 29 - CMN-600 Info
EArmObjLpiInfo, ///< 30 - Lpi Info
EArmObjPciAddressMapInfo, ///< 31 - Pci Address Map Info
EArmObjPciInterruptMapInfo, ///< 32 - Pci Interrupt Map Info
EArmObjRmr, ///< 33 - Reserved Memory Range Node
EArmObjMemoryRangeDescriptor, ///< 34 - Memory Range Descriptor
EArmObjCpcInfo, ///< 35 - Continuous Performance Control Info
EArmObjPccSubspaceType0Info, ///< 36 - Pcc Subspace Type 0 Info
EArmObjPccSubspaceType1Info, ///< 37 - Pcc Subspace Type 2 Info
EArmObjPccSubspaceType2Info, ///< 38 - Pcc Subspace Type 2 Info
EArmObjPccSubspaceType3Info, ///< 39 - Pcc Subspace Type 3 Info
EArmObjPccSubspaceType4Info, ///< 40 - Pcc Subspace Type 4 Info
EArmObjPccSubspaceType5Info, ///< 41 - Pcc Subspace Type 5 Info
EArmObjEtInfo, ///< 42 - Embedded Trace Extension/Module Info
EArmObjPsdInfo, ///< 43 - P-State Dependency (PSD) Info
EArmObjItsGroup, ///< 12 - ITS Group
EArmObjNamedComponent, ///< 13 - Named Component
EArmObjRootComplex, ///< 14 - Root Complex
EArmObjSmmuV1SmmuV2, ///< 15 - SMMUv1 or SMMUv2
EArmObjSmmuV3, ///< 16 - SMMUv3
EArmObjPmcg, ///< 17 - PMCG
EArmObjGicItsIdentifierArray, ///< 18 - GIC ITS Identifier Array
EArmObjIdMappingArray, ///< 19 - ID Mapping Array
EArmObjSmmuInterruptArray, ///< 20 - SMMU Interrupt Array
EArmObjProcHierarchyInfo, ///< 21 - Processor Hierarchy Info
EArmObjCacheInfo, ///< 22 - Cache Info
EArmObjCmRef, ///< 23 - CM Object Reference
EArmObjMemoryAffinityInfo, ///< 24 - Memory Affinity Info
EArmObjDeviceHandleAcpi, ///< 25 - Device Handle Acpi
EArmObjDeviceHandlePci, ///< 26 - Device Handle Pci
EArmObjGenericInitiatorAffinityInfo, ///< 27 - Generic Initiator Affinity
EArmObjCmn600Info, ///< 28 - CMN-600 Info
EArmObjLpiInfo, ///< 29 - Lpi Info
EArmObjPciAddressMapInfo, ///< 30 - Pci Address Map Info
EArmObjPciInterruptMapInfo, ///< 31 - Pci Interrupt Map Info
EArmObjRmr, ///< 32 - Reserved Memory Range Node
EArmObjMemoryRangeDescriptor, ///< 33 - Memory Range Descriptor
EArmObjCpcInfo, ///< 34 - Continuous Performance Control Info
EArmObjPccSubspaceType0Info, ///< 35 - Pcc Subspace Type 0 Info
EArmObjPccSubspaceType1Info, ///< 36 - Pcc Subspace Type 2 Info
EArmObjPccSubspaceType2Info, ///< 37 - Pcc Subspace Type 2 Info
EArmObjPccSubspaceType3Info, ///< 38 - Pcc Subspace Type 3 Info
EArmObjPccSubspaceType4Info, ///< 39 - Pcc Subspace Type 4 Info
EArmObjPccSubspaceType5Info, ///< 40 - Pcc Subspace Type 5 Info
EArmObjEtInfo, ///< 41 - Embedded Trace Extension/Module Info
EArmObjPsdInfo, ///< 42 - P-State Dependency (PSD) Info
EArmObjMax
} EARM_OBJECT_ID;
@ -437,16 +436,6 @@ typedef struct CmArmPciConfigSpaceInfo {
CM_OBJECT_TOKEN InterruptMapToken;
} CM_ARM_PCI_CONFIG_SPACE_INFO;
/** A structure that describes the
Fixed feature flags for the Platform.
ID: EArmObjFixedFeatureFlags
*/
typedef struct CmArmFixedFeatureFlags {
/// The Fixed feature flags
UINT32 Flags;
} CM_ARM_FIXED_FEATURE_FLAGS;
/** A structure that describes the
ITS Group node for the Platform.

View File

@ -229,9 +229,9 @@ GET_OBJECT_LIST (
feature flags for the platform from the Configuration Manager.
*/
GET_OBJECT_LIST (
EObjNameSpaceArm,
EArmObjFixedFeatureFlags,
CM_ARM_FIXED_FEATURE_FLAGS
EObjNameSpaceArchCommon,
EArchCommonObjFixedFeatureFlags,
CM_ARCH_COMMON_FIXED_FEATURE_FLAGS
);
/** Update the Power Management Profile information in the FADT Table.
@ -420,13 +420,13 @@ FadtAddFixedFeatureFlags (
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol
)
{
EFI_STATUS Status;
CM_ARM_FIXED_FEATURE_FLAGS *FixedFeatureFlags;
EFI_STATUS Status;
CM_ARCH_COMMON_FIXED_FEATURE_FLAGS *FixedFeatureFlags;
ASSERT (CfgMgrProtocol != NULL);
// Get the Fixed feature flags from the Platform Configuration Manager
Status = GetEArmObjFixedFeatureFlags (
Status = GetEArchCommonObjFixedFeatureFlags (
CfgMgrProtocol,
CM_NULL_TOKEN,
&FixedFeatureFlags,
@ -453,7 +453,7 @@ FadtAddFixedFeatureFlags (
DEBUG ((
DEBUG_INFO,
"FADT: EArmObjFixedFeatureFlags = 0x%x\n",
"FADT: EArchCommonObjFixedFeatureFlags = 0x%x\n",
FixedFeatureFlags->Flags
));

View File

@ -155,38 +155,37 @@ CM_OBJECT_TOKEN_FIXER TokenFixer[EArmObjMax] = {
NULL, ///< 9 - Generic Timer Block Frame Info
NULL, ///< 10 - Platform Generic Watchdog
NULL, ///< 11 - PCI Configuration Space Info
NULL, ///< 12 - Fixed feature flags for FADT
TokenFixerItsGroup, ///< 13 - ITS Group
TokenFixerNamedComponentNode, ///< 14 - Named Component
TokenFixerRootComplexNode, ///< 15 - Root Complex
TokenFixerNotImplemented, ///< 16 - SMMUv1 or SMMUv2
TokenFixerSmmuV3Node, ///< 17 - SMMUv3
TokenFixerNotImplemented, ///< 18 - PMCG
NULL, ///< 19 - GIC ITS Identifier Array
NULL, ///< 20 - ID Mapping Array
NULL, ///< 21 - SMMU Interrupt Array
TokenFixerNotImplemented, ///< 22 - Processor Hierarchy Info
TokenFixerNotImplemented, ///< 23 - Cache Info
TokenFixerItsGroup, ///< 12 - ITS Group
TokenFixerNamedComponentNode, ///< 13 - Named Component
TokenFixerRootComplexNode, ///< 14 - Root Complex
TokenFixerNotImplemented, ///< 15 - SMMUv1 or SMMUv2
TokenFixerSmmuV3Node, ///< 16 - SMMUv3
TokenFixerNotImplemented, ///< 17 - PMCG
NULL, ///< 18 - GIC ITS Identifier Array
NULL, ///< 19 - ID Mapping Array
NULL, ///< 20 - SMMU Interrupt Array
TokenFixerNotImplemented, ///< 21 - Processor Hierarchy Info
TokenFixerNotImplemented, ///< 22 - Cache Info
NULL, ///< 23 - CM Object Reference
NULL, ///< 24 - Memory Affinity Info
NULL, ///< 25 - Memory Affinity Info
NULL, ///< 26 - Device Handle Acpi
NULL, ///< 27 - Device Handle Pci
NULL, ///< 28 - Generic Initiator Affinity
NULL, ///< 29 - CMN-600 Info
NULL, ///< 30 - Lpi Info
NULL, ///< 31 - Pci Address Map Info
NULL, ///< 32 - Pci Interrupt Map Info
NULL, ///< 33 - Reserved Memory Range Node
NULL, ///< 34 - Memory Range Descriptor
NULL, ///< 35 - Continuous Performance Control Info
NULL, ///< 36 - Pcc Subspace Type 0 Info
NULL, ///< 25 - Device Handle Acpi
NULL, ///< 26 - Device Handle Pci
NULL, ///< 27 - Generic Initiator Affinity
NULL, ///< 28 - CMN-600 Info
NULL, ///< 29 - Lpi Info
NULL, ///< 30 - Pci Address Map Info
NULL, ///< 31 - Pci Interrupt Map Info
NULL, ///< 32 - Reserved Memory Range Node
NULL, ///< 33 - Memory Range Descriptor
NULL, ///< 34 - Continuous Performance Control Info
NULL, ///< 35 - Pcc Subspace Type 0 Info
NULL, ///< 36 - Pcc Subspace Type 2 Info
NULL, ///< 37 - Pcc Subspace Type 2 Info
NULL, ///< 38 - Pcc Subspace Type 2 Info
NULL, ///< 39 - Pcc Subspace Type 3 Info
NULL, ///< 40 - Pcc Subspace Type 4 Info
NULL, ///< 41 - Pcc Subspace Type 5 Info
NULL, ///< 42 - Embedded Trace Extension/Module Info
NULL ///< 43 - P-State Dependency (PSD) Info
NULL, ///< 38 - Pcc Subspace Type 3 Info
NULL, ///< 39 - Pcc Subspace Type 4 Info
NULL, ///< 40 - Pcc Subspace Type 5 Info
NULL, ///< 41 - Embedded Trace Extension/Module Info
NULL ///< 42 - P-State Dependency (PSD) Info
};
/** CmObj token fixer.

View File

@ -199,9 +199,9 @@ STATIC CONST CM_OBJ_PARSER CmArchCommonHypervisorVendorIdentityParser[] = {
{ "HypervisorVendorId", 8, "0x%llx", NULL }
};
/** A parser for EArmObjFixedFeatureFlags.
/** A parser for EArchCommonObjFixedFeatureFlags.
*/
STATIC CONST CM_OBJ_PARSER CmArmFixedFeatureFlagsParser[] = {
STATIC CONST CM_OBJ_PARSER CmArchCommonFixedFeatureFlagsParser[] = {
{ "Flags", 4, "0x%x", NULL }
};
@ -676,6 +676,7 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArchCommonNamespaceObjectParser[] = {
CM_PARSER_ADD_OBJECT (EArchCommonObjConsolePortInfo, CmArchCommonSerialPortInfoParser),
CM_PARSER_ADD_OBJECT (EArchCommonObjSerialDebugPortInfo, CmArchCommonSerialPortInfoParser),
CM_PARSER_ADD_OBJECT (EArchCommonObjHypervisorVendorIdentity, CmArchCommonHypervisorVendorIdentityParser),
CM_PARSER_ADD_OBJECT (EArchCommonObjFixedFeatureFlags, CmArchCommonFixedFeatureFlagsParser),
CM_PARSER_ADD_OBJECT_RESERVED (EArchCommonObjMax)
};
@ -694,7 +695,6 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArmNamespaceObjectParser[] = {
CM_PARSER_ADD_OBJECT (EArmObjGTBlockTimerFrameInfo, CmArmGTBlockTimerFrameInfoParser),
CM_PARSER_ADD_OBJECT (EArmObjPlatformGenericWatchdogInfo, CmArmGenericWatchdogInfoParser),
CM_PARSER_ADD_OBJECT (EArmObjPciConfigSpaceInfo, CmArmPciConfigSpaceInfoParser),
CM_PARSER_ADD_OBJECT (EArmObjFixedFeatureFlags, CmArmFixedFeatureFlagsParser),
CM_PARSER_ADD_OBJECT (EArmObjItsGroup, CmArmItsGroupNodeParser),
CM_PARSER_ADD_OBJECT (EArmObjNamedComponent, CmArmNamedComponentNodeParser),
CM_PARSER_ADD_OBJECT (EArmObjRootComplex, CmArmRootComplexNodeParser),

View File

@ -452,38 +452,37 @@ The CM_OBJECT_ID type is used to identify the Configuration Manager
| 9 | Generic Timer Block Frame Info | |
| 10 | Platform Generic Watchdog | |
| 11 | PCI Configuration Space Info | Move to Arch Common NS |
| 12 | Fixed feature flags for FADT | Move to Arch Common NS |
| 13 | ITS Group | |
| 14 | Named Component | |
| 15 | Root Complex | |
| 16 | SMMUv1 or SMMUv2 | |
| 17 | SMMUv3 | |
| 18 | PMCG | |
| 19 | GIC ITS Identifier Array | |
| 20 | ID Mapping Array | |
| 21 | SMMU Interrupt Array | |
| 22 | Processor Hierarchy Info | Move to Arch Common NS |
| 23 | Cache Info | Move to Arch Common NS |
| 24 | CM Object Reference | Move to Arch Common NS |
| 25 | Memory Affinity Info | Move to Arch Common NS |
| 26 | Device Handle Acpi | Move to Arch Common NS |
| 27 | Device Handle PCI | Move to Arch Common NS |
| 28 | Generic Initiator Affinity Info | Move to Arch Common NS |
| 29 | CMN 600 Info | |
| 30 | Low Power Idle State Info | Move to Arch Common NS |
| 31 | PCI Address Map Info | Move to Arch Common NS |
| 32 | PCI Interrupt Map Info | Move to Arch Common NS |
| 33 | Reserved Memory Range Node | |
| 34 | Memory Range Descriptor | |
| 35 | Continuous Performance Control Info | Move to Arch Common NS |
| 36 | Pcc Subspace Type 0 Info | Move to Arch Common NS |
| 37 | Pcc Subspace Type 1 Info | Move to Arch Common NS |
| 38 | Pcc Subspace Type 2 Info | Move to Arch Common NS |
| 39 | Pcc Subspace Type 3 Info | Move to Arch Common NS |
| 40 | Pcc Subspace Type 4 Info | Move to Arch Common NS |
| 41 | Pcc Subspace Type 5 Info | Move to Arch Common NS |
| 42 | Embedded Trace Extension/Module Info | |
| 43 | P-State Dependency (PSD) Info | Move to Arch Common NS |
| 12 | ITS Group | |
| 13 | Named Component | |
| 14 | Root Complex | |
| 15 | SMMUv1 or SMMUv2 | |
| 16 | SMMUv3 | |
| 17 | PMCG | |
| 18 | GIC ITS Identifier Array | |
| 19 | ID Mapping Array | |
| 20 | SMMU Interrupt Array | |
| 21 | Processor Hierarchy Info | Move to Arch Common NS |
| 22 | Cache Info | Move to Arch Common NS |
| 23 | CM Object Reference | Move to Arch Common NS |
| 24 | Memory Affinity Info | Move to Arch Common NS |
| 25 | Device Handle Acpi | Move to Arch Common NS |
| 26 | Device Handle PCI | Move to Arch Common NS |
| 27 | Generic Initiator Affinity Info | Move to Arch Common NS |
| 28 | CMN 600 Info | |
| 29 | Low Power Idle State Info | Move to Arch Common NS |
| 30 | PCI Address Map Info | Move to Arch Common NS |
| 31 | PCI Interrupt Map Info | Move to Arch Common NS |
| 32 | Reserved Memory Range Node | |
| 33 | Memory Range Descriptor | |
| 34 | Continuous Performance Control Info | Move to Arch Common NS |
| 35 | Pcc Subspace Type 0 Info | Move to Arch Common NS |
| 36 | Pcc Subspace Type 1 Info | Move to Arch Common NS |
| 37 | Pcc Subspace Type 2 Info | Move to Arch Common NS |
| 38 | Pcc Subspace Type 3 Info | Move to Arch Common NS |
| 39 | Pcc Subspace Type 4 Info | Move to Arch Common NS |
| 40 | Pcc Subspace Type 5 Info | Move to Arch Common NS |
| 41 | Embedded Trace Extension/Module Info | |
| 42 | P-State Dependency (PSD) Info | Move to Arch Common NS |
| `*` | All other values are reserved. | |
#### Object ID's in the Arch Common Namespace:
@ -496,4 +495,5 @@ The CM_OBJECT_ID type is used to identify the Configuration Manager
| 3 | Serial Console Port Info | |
| 4 | Serial Debug Port Info | |
| 5 | Hypervisor Vendor Id | |
| 6 | Fixed feature flags for FADT | |
| `*` | All other values are reserved. | |