From: Sami Mujawar <sami.muja...@arm.com> 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.gond...@arm.com> Cc: Yeo Reum Yun <yeoreum....@arm.com> Cc: AbdulLateef Attar <abdullateef.at...@amd.com> Cc: Jeshua Smith <jesh...@nvidia.com> Cc: Jeff Brasen <jbra...@nvidia.com> Cc: Girish Mahadevan <gmahade...@nvidia.com> Cc: Leif Lindholm <quic_llind...@quicinc.com> Cc: Meenakshi Aggarwal <meenakshi.aggar...@nxp.com> Signed-off-by: Sami Mujawar <sami.muja...@arm.com> Signed-off-by: Pierre Gondois <pierre.gond...@arm.com> --- .../Include/ArchCommonNameSpaceObjects.h | 11 +++ .../Include/ArmNameSpaceObjects.h | 73 ++++++++----------- .../Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c | 14 ++-- .../DynamicPlatRepoLib/CmObjectTokenFixer.c | 59 ++++++++------- .../ConfigurationManagerObjectParser.c | 6 +- DynamicTablesPkg/Readme.md | 64 ++++++++-------- 6 files changed, 113 insertions(+), 114 deletions(-) diff --git a/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h b/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h index 401a24b6a5cd..1030488f4561 100644 --- a/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h @@ -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_ diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h index 48e65a3cc0a5..66709c41fd69 100644 --- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h @@ -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. diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c index 868a974fed28..470f1acfd11f 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c @@ -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 )); diff --git a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c index 34ba9f26733f..aef818e77f0c 100644 --- a/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c +++ b/DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/CmObjectTokenFixer.c @@ -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. diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c index 1b3532f94088..3205cf87c8bf 100644 --- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c +++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c @@ -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), diff --git a/DynamicTablesPkg/Readme.md b/DynamicTablesPkg/Readme.md index 79ccd86e8558..5b9dda3e63d9 100644 --- a/DynamicTablesPkg/Readme.md +++ b/DynamicTablesPkg/Readme.md @@ -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. | | -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116975): https://edk2.groups.io/g/devel/message/116975 Mute This Topic: https://groups.io/mt/105067990/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-