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 EArchCommonObjConsolePortInfo, ///< 3 - Serial Console Port Info
EArchCommonObjSerialDebugPortInfo, ///< 4 - Serial Debug Port Info EArchCommonObjSerialDebugPortInfo, ///< 4 - Serial Debug Port Info
EArchCommonObjHypervisorVendorIdentity, ///< 5 - Hypervisor Vendor Id EArchCommonObjHypervisorVendorIdentity, ///< 5 - Hypervisor Vendor Id
EArchCommonObjFixedFeatureFlags, ///< 6 - Fixed feature flags for FADT
EArchCommonObjMax EArchCommonObjMax
} EARCH_COMMON_OBJECT_ID; } EARCH_COMMON_OBJECT_ID;
@ -86,6 +87,16 @@ typedef struct CmArchCommonHypervisorVendorIdentity {
UINT64 HypervisorVendorId; UINT64 HypervisorVendorId;
} CM_ARCH_COMMON_HYPERVISOR_VENDOR_ID; } 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() #pragma pack()
#endif // ARCH_COMMON_NAMESPACE_OBJECTS_H_ #endif // ARCH_COMMON_NAMESPACE_OBJECTS_H_

View File

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

View File

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

View File

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

View File

@ -199,9 +199,9 @@ STATIC CONST CM_OBJ_PARSER CmArchCommonHypervisorVendorIdentityParser[] = {
{ "HypervisorVendorId", 8, "0x%llx", NULL } { "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 } { "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 (EArchCommonObjConsolePortInfo, CmArchCommonSerialPortInfoParser),
CM_PARSER_ADD_OBJECT (EArchCommonObjSerialDebugPortInfo, CmArchCommonSerialPortInfoParser), CM_PARSER_ADD_OBJECT (EArchCommonObjSerialDebugPortInfo, CmArchCommonSerialPortInfoParser),
CM_PARSER_ADD_OBJECT (EArchCommonObjHypervisorVendorIdentity, CmArchCommonHypervisorVendorIdentityParser), CM_PARSER_ADD_OBJECT (EArchCommonObjHypervisorVendorIdentity, CmArchCommonHypervisorVendorIdentityParser),
CM_PARSER_ADD_OBJECT (EArchCommonObjFixedFeatureFlags, CmArchCommonFixedFeatureFlagsParser),
CM_PARSER_ADD_OBJECT_RESERVED (EArchCommonObjMax) 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 (EArmObjGTBlockTimerFrameInfo, CmArmGTBlockTimerFrameInfoParser),
CM_PARSER_ADD_OBJECT (EArmObjPlatformGenericWatchdogInfo, CmArmGenericWatchdogInfoParser), CM_PARSER_ADD_OBJECT (EArmObjPlatformGenericWatchdogInfo, CmArmGenericWatchdogInfoParser),
CM_PARSER_ADD_OBJECT (EArmObjPciConfigSpaceInfo, CmArmPciConfigSpaceInfoParser), CM_PARSER_ADD_OBJECT (EArmObjPciConfigSpaceInfo, CmArmPciConfigSpaceInfoParser),
CM_PARSER_ADD_OBJECT (EArmObjFixedFeatureFlags, CmArmFixedFeatureFlagsParser),
CM_PARSER_ADD_OBJECT (EArmObjItsGroup, CmArmItsGroupNodeParser), CM_PARSER_ADD_OBJECT (EArmObjItsGroup, CmArmItsGroupNodeParser),
CM_PARSER_ADD_OBJECT (EArmObjNamedComponent, CmArmNamedComponentNodeParser), CM_PARSER_ADD_OBJECT (EArmObjNamedComponent, CmArmNamedComponentNodeParser),
CM_PARSER_ADD_OBJECT (EArmObjRootComplex, CmArmRootComplexNodeParser), 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 | | | 9 | Generic Timer Block Frame Info | |
| 10 | Platform Generic Watchdog | | | 10 | Platform Generic Watchdog | |
| 11 | PCI Configuration Space Info | Move to Arch Common NS | | 11 | PCI Configuration Space Info | Move to Arch Common NS |
| 12 | Fixed feature flags for FADT | Move to Arch Common NS | | 12 | ITS Group | |
| 13 | ITS Group | | | 13 | Named Component | |
| 14 | Named Component | | | 14 | Root Complex | |
| 15 | Root Complex | | | 15 | SMMUv1 or SMMUv2 | |
| 16 | SMMUv1 or SMMUv2 | | | 16 | SMMUv3 | |
| 17 | SMMUv3 | | | 17 | PMCG | |
| 18 | PMCG | | | 18 | GIC ITS Identifier Array | |
| 19 | GIC ITS Identifier Array | | | 19 | ID Mapping Array | |
| 20 | ID Mapping Array | | | 20 | SMMU Interrupt Array | |
| 21 | SMMU Interrupt Array | | | 21 | Processor Hierarchy Info | Move to Arch Common NS |
| 22 | Processor Hierarchy Info | Move to Arch Common NS | | 22 | Cache Info | Move to Arch Common NS |
| 23 | Cache Info | Move to Arch Common NS | | 23 | CM Object Reference | Move to Arch Common NS |
| 24 | CM Object Reference | Move to Arch Common NS | | 24 | Memory Affinity Info | Move to Arch Common NS |
| 25 | Memory Affinity Info | Move to Arch Common NS | | 25 | Device Handle Acpi | Move to Arch Common NS |
| 26 | Device Handle Acpi | Move to Arch Common NS | | 26 | Device Handle PCI | Move to Arch Common NS |
| 27 | Device Handle PCI | Move to Arch Common NS | | 27 | Generic Initiator Affinity Info | Move to Arch Common NS |
| 28 | Generic Initiator Affinity Info | Move to Arch Common NS | | 28 | CMN 600 Info | |
| 29 | CMN 600 Info | | | 29 | Low Power Idle State Info | Move to Arch Common NS |
| 30 | Low Power Idle State Info | Move to Arch Common NS | | 30 | PCI Address Map Info | Move to Arch Common NS |
| 31 | PCI Address Map Info | Move to Arch Common NS | | 31 | PCI Interrupt Map Info | Move to Arch Common NS |
| 32 | PCI Interrupt Map Info | Move to Arch Common NS | | 32 | Reserved Memory Range Node | |
| 33 | Reserved Memory Range Node | | | 33 | Memory Range Descriptor | |
| 34 | Memory Range Descriptor | | | 34 | Continuous Performance Control Info | Move to Arch Common NS |
| 35 | Continuous Performance Control Info | Move to Arch Common NS | | 35 | Pcc Subspace Type 0 Info | Move to Arch Common NS |
| 36 | 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 1 Info | Move to Arch Common NS | | 37 | Pcc Subspace Type 2 Info | Move to Arch Common NS |
| 38 | 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 3 Info | Move to Arch Common NS | | 39 | Pcc Subspace Type 4 Info | Move to Arch Common NS |
| 40 | Pcc Subspace Type 4 Info | Move to Arch Common NS | | 40 | Pcc Subspace Type 5 Info | Move to Arch Common NS |
| 41 | Pcc Subspace Type 5 Info | Move to Arch Common NS | | 41 | Embedded Trace Extension/Module Info | |
| 42 | Embedded Trace Extension/Module Info | | | 42 | P-State Dependency (PSD) Info | Move to Arch Common NS |
| 43 | 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,4 +495,5 @@ The CM_OBJECT_ID type is used to identify the Configuration Manager
| 3 | Serial Console Port Info | | | 3 | Serial Console Port Info | |
| 4 | Serial Debug Port Info | | | 4 | Serial Debug Port Info | |
| 5 | Hypervisor Vendor Id | | | 5 | Hypervisor Vendor Id | |
| 6 | Fixed feature flags for FADT | |
| `*` | All other values are reserved. | | | `*` | All other values are reserved. | |