DynamicTablesPkg: Move LPI info object to Arch Common

Move the LPI info object from Arm Namespace to the
Arch Common namespace.

Correspondingly also update the following modules to reflect the
changes introduced by the move:
 - SSDT Cpu Topology 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 12:59:07 +00:00 committed by mergify[bot]
parent 0b5abcb90e
commit ead3b42391
7 changed files with 118 additions and 118 deletions

View File

@ -35,6 +35,7 @@ typedef enum ArchCommonObjectID {
EArchCommonObjDeviceHandleAcpi, ///< 12 - Device Handle Acpi
EArchCommonObjDeviceHandlePci, ///< 13 - Device Handle Pci
EArchCommonObjGenericInitiatorAffinityInfo, ///< 14 - Generic Initiator Affinity
EArchCommonObjLpiInfo, ///< 15 - Lpi Info
EArchCommonObjMax
} EARCH_COMMON_OBJECT_ID;
@ -295,6 +296,69 @@ typedef struct CmArchCommonGenericInitiatorAffinityInfo {
CM_OBJECT_TOKEN DeviceHandleToken;
} CM_ARCH_COMMON_GENERIC_INITIATOR_AFFINITY_INFO;
/** A structure that describes the Lpi information.
The Low Power Idle states are described in DSDT/SSDT and associated
to cpus/clusters in the cpu topology.
ID: EArchCommonObjLpiInfo
*/
typedef struct CmArchCommonLpiInfo {
/** Minimum Residency. Time in microseconds after which a
state becomes more energy efficient than any shallower state.
*/
UINT32 MinResidency;
/** Worst case time in microseconds from a wake interrupt
being asserted to the return to a running state
*/
UINT32 WorstCaseWakeLatency;
/** Flags.
*/
UINT32 Flags;
/** Architecture specific context loss flags.
*/
UINT32 ArchFlags;
/** Residency counter frequency in cycles-per-second (Hz).
*/
UINT32 ResCntFreq;
/** Every shallower power state in the parent is also enabled.
*/
UINT32 EnableParentState;
/** The EntryMethod _LPI field can be described as an integer
or in a Register resource data descriptor.
If IsInteger is TRUE, the IntegerEntryMethod field is used.
If IsInteger is FALSE, the RegisterEntryMethod field is used.
*/
BOOLEAN IsInteger;
/** EntryMethod described as an Integer.
*/
UINT64 IntegerEntryMethod;
/** EntryMethod described as a EFI_ACPI_GENERIC_REGISTER_DESCRIPTOR.
*/
EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE RegisterEntryMethod;
/** Residency counter register.
*/
EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE ResidencyCounterRegister;
/** Usage counter register.
*/
EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE UsageCounterRegister;
/** String representing the Lpi state
*/
CHAR8 StateName[16];
} CM_ARCH_COMMON_LPI_INFO;
#pragma pack()
#endif // ARCH_COMMON_NAMESPACE_OBJECTS_H_

View File

@ -51,18 +51,17 @@ typedef enum ArmObjectID {
EArmObjProcHierarchyInfo, ///< 20 - Processor Hierarchy Info
EArmObjCacheInfo, ///< 21 - Cache Info
EArmObjCmn600Info, ///< 22 - CMN-600 Info
EArmObjLpiInfo, ///< 23 - Lpi Info
EArmObjRmr, ///< 24 - Reserved Memory Range Node
EArmObjMemoryRangeDescriptor, ///< 25 - Memory Range Descriptor
EArmObjCpcInfo, ///< 26 - Continuous Performance Control Info
EArmObjPccSubspaceType0Info, ///< 27 - Pcc Subspace Type 0 Info
EArmObjPccSubspaceType1Info, ///< 28 - Pcc Subspace Type 2 Info
EArmObjPccSubspaceType2Info, ///< 29 - Pcc Subspace Type 2 Info
EArmObjPccSubspaceType3Info, ///< 30 - Pcc Subspace Type 3 Info
EArmObjPccSubspaceType4Info, ///< 31 - Pcc Subspace Type 4 Info
EArmObjPccSubspaceType5Info, ///< 32 - Pcc Subspace Type 5 Info
EArmObjEtInfo, ///< 33 - Embedded Trace Extension/Module Info
EArmObjPsdInfo, ///< 34 - P-State Dependency (PSD) Info
EArmObjRmr, ///< 23 - Reserved Memory Range Node
EArmObjMemoryRangeDescriptor, ///< 24 - Memory Range Descriptor
EArmObjCpcInfo, ///< 25 - Continuous Performance Control Info
EArmObjPccSubspaceType0Info, ///< 26 - Pcc Subspace Type 0 Info
EArmObjPccSubspaceType1Info, ///< 27 - Pcc Subspace Type 2 Info
EArmObjPccSubspaceType2Info, ///< 28 - Pcc Subspace Type 2 Info
EArmObjPccSubspaceType3Info, ///< 29 - Pcc Subspace Type 3 Info
EArmObjPccSubspaceType4Info, ///< 30 - Pcc Subspace Type 4 Info
EArmObjPccSubspaceType5Info, ///< 31 - Pcc Subspace Type 5 Info
EArmObjEtInfo, ///< 32 - Embedded Trace Extension/Module Info
EArmObjPsdInfo, ///< 33 - P-State Dependency (PSD) Info
EArmObjMax
} EARM_OBJECT_ID;
@ -672,7 +671,7 @@ typedef struct CmArmProcHierarchyInfo {
CM_OBJECT_TOKEN PrivateResourcesArrayToken;
/// Optional field: Reference Token for the Lpi state of this processor.
/// Token identifying a CM_ARCH_COMMON_OBJ_REF structure, itself referencing
/// CM_ARM_LPI_INFO objects.
/// CM_ARCH_COMMON_LPI_INFO objects.
CM_OBJECT_TOKEN LpiToken;
/// Set to TRUE if UID should override index for name and _UID
/// for processor container nodes and name of processors.
@ -749,69 +748,6 @@ typedef struct CmArmCmn600Info {
CM_ARM_EXTENDED_INTERRUPT DtcInterrupt[4];
} CM_ARM_CMN_600_INFO;
/** A structure that describes the Lpi information.
The Low Power Idle states are described in DSDT/SSDT and associated
to cpus/clusters in the cpu topology.
ID: EArmObjLpiInfo
*/
typedef struct CmArmLpiInfo {
/** Minimum Residency. Time in microseconds after which a
state becomes more energy efficient than any shallower state.
*/
UINT32 MinResidency;
/** Worst case time in microseconds from a wake interrupt
being asserted to the return to a running state
*/
UINT32 WorstCaseWakeLatency;
/** Flags.
*/
UINT32 Flags;
/** Architecture specific context loss flags.
*/
UINT32 ArchFlags;
/** Residency counter frequency in cycles-per-second (Hz).
*/
UINT32 ResCntFreq;
/** Every shallower power state in the parent is also enabled.
*/
UINT32 EnableParentState;
/** The EntryMethod _LPI field can be described as an integer
or in a Register resource data descriptor.
If IsInteger is TRUE, the IntegerEntryMethod field is used.
If IsInteger is FALSE, the RegisterEntryMethod field is used.
*/
BOOLEAN IsInteger;
/** EntryMethod described as an Integer.
*/
UINT64 IntegerEntryMethod;
/** EntryMethod described as a EFI_ACPI_GENERIC_REGISTER_DESCRIPTOR.
*/
EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE RegisterEntryMethod;
/** Residency counter register.
*/
EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE ResidencyCounterRegister;
/** Usage counter register.
*/
EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE UsageCounterRegister;
/** String representing the Lpi state
*/
CHAR8 StateName[16];
} CM_ARM_LPI_INFO;
/** A structure that describes the
RMR node for the Platform.

View File

@ -40,7 +40,7 @@ Requirements:
- EArmObjGicCInfo
- EArmObjProcHierarchyInfo (OPTIONAL) along with
- EArchCommonObjCmRef (OPTIONAL)
- EArmObjLpiInfo (OPTIONAL)
- EArchCommonObjLpiInfo (OPTIONAL)
- GetEArmObjEtInfo (OPTIONAL)
- EArmObjPsdInfo (OPTIONAL)
*/
@ -79,9 +79,9 @@ GET_OBJECT_LIST (
information from the Configuration Manager.
*/
GET_OBJECT_LIST (
EObjNameSpaceArm,
EArmObjLpiInfo,
CM_ARM_LPI_INFO
EObjNameSpaceArchCommon,
EArchCommonObjLpiInfo,
CM_ARCH_COMMON_LPI_INFO
);
/**
@ -118,7 +118,7 @@ GET_OBJECT_LIST (
One entry should be allocated for each CM_ARM_PROC_HIERARCHY_INFO
structure of the platform. The TokenTable allows to have a mapping:
Index <-> CM_OBJECT_TOKEN (to CM_ARM_LPI_INFO structures).
Index <-> CM_OBJECT_TOKEN (to CM_ARCH_COMMON_LPI_INFO structures).
There will always be less sets of Lpi states (CM_ARCH_COMMON_OBJ_REF)
than the number of cpus/clusters (CM_ARM_PROC_HIERARCHY_INFO).
@ -696,12 +696,12 @@ GenerateLpiStates (
UINT32 Index;
UINT32 LastIndex;
AML_OBJECT_NODE_HANDLE LpiNode;
CM_ARCH_COMMON_OBJ_REF *LpiRefInfo;
UINT32 LpiRefInfoCount;
UINT32 LpiRefIndex;
CM_ARM_LPI_INFO *LpiInfo;
CHAR8 AslName[AML_NAME_SEG_SIZE + 1];
AML_OBJECT_NODE_HANDLE LpiNode;
CM_ARCH_COMMON_OBJ_REF *LpiRefInfo;
UINT32 LpiRefInfoCount;
UINT32 LpiRefIndex;
CM_ARCH_COMMON_LPI_INFO *LpiInfo;
CHAR8 AslName[AML_NAME_SEG_SIZE + 1];
ASSERT (Generator != NULL);
ASSERT (Generator->TokenTable.Table != NULL);
@ -739,8 +739,9 @@ GenerateLpiStates (
}
for (LpiRefIndex = 0; LpiRefIndex < LpiRefInfoCount; LpiRefIndex++) {
// For each CM_ARM_LPI_INFO referenced by the token, add an Lpi state.
Status = GetEArmObjLpiInfo (
// For each CM_ARCH_COMMON_LPI_INFO referenced by the token,
// add an Lpi state.
Status = GetEArchCommonObjLpiInfo (
CfgMgrProtocol,
LpiRefInfo[LpiRefIndex].ReferenceToken,
&LpiInfo,

View File

@ -70,7 +70,7 @@
/** A structure used to handle the Lpi structures referencing.
A CM_ARM_PROC_HIERARCHY_INFO structure references a CM_ARCH_COMMON_OBJ_REF.
This CM_ARCH_COMMON_OBJ_REF references CM_ARM_LPI_INFO structures.
This CM_ARCH_COMMON_OBJ_REF references CM_ARCH_COMMON_LPI_INFO structures.
Example:
(Cpu0) (Cpu1)
@ -86,7 +86,7 @@
| |
v v
(A first Lpi state) (A second Lpi state)
CM_ARM_LPI_INFO[0] CM_ARM_LPI_INFO[1]
CM_ARCH_COMMON_LPI_INFO[0] CM_ARCH_COMMON_LPI_INFO[1]
Here, Cpu0 and Cpu1 have the same Lpi states. Both CM_ARM_PROC_HIERARCHY_INFO
structures reference the same CM_ARCH_COMMON_OBJ_REF. An entry is created in the
@ -118,7 +118,7 @@
*/
typedef struct TokenTable {
/// TokenTable, a table allowing to map:
/// Index <-> CM_OBJECT_TOKEN (to CM_ARM_LPI_INFO structures).
/// Index <-> CM_OBJECT_TOKEN (to CM_ARCH_COMMON_LPI_INFO structures).
CM_OBJECT_TOKEN *Table;
/// Last used index of the TokenTable.

View File

@ -166,18 +166,17 @@ CM_OBJECT_TOKEN_FIXER TokenFixer[EArmObjMax] = {
TokenFixerNotImplemented, ///< 20 - Processor Hierarchy Info
TokenFixerNotImplemented, ///< 21 - Cache Info
NULL, ///< 22 - CMN-600 Info
NULL, ///< 23 - Lpi Info
NULL, ///< 24 - Reserved Memory Range Node
NULL, ///< 25 - Memory Range Descriptor
NULL, ///< 26 - Continuous Performance Control Info
NULL, ///< 27 - Pcc Subspace Type 0 Info
NULL, ///< 23 - Reserved Memory Range Node
NULL, ///< 24 - Memory Range Descriptor
NULL, ///< 25 - Continuous Performance Control Info
NULL, ///< 26 - Pcc Subspace Type 0 Info
NULL, ///< 27 - Pcc Subspace Type 2 Info
NULL, ///< 28 - Pcc Subspace Type 2 Info
NULL, ///< 29 - Pcc Subspace Type 2 Info
NULL, ///< 30 - Pcc Subspace Type 3 Info
NULL, ///< 31 - Pcc Subspace Type 4 Info
NULL, ///< 32 - Pcc Subspace Type 5 Info
NULL, ///< 33 - Embedded Trace Extension/Module Info
NULL ///< 34 - P-State Dependency (PSD) Info
NULL, ///< 29 - Pcc Subspace Type 3 Info
NULL, ///< 30 - Pcc Subspace Type 4 Info
NULL, ///< 31 - Pcc Subspace Type 5 Info
NULL, ///< 32 - Embedded Trace Extension/Module Info
NULL ///< 33 - P-State Dependency (PSD) Info
};
/** CmObj token fixer.

View File

@ -417,9 +417,9 @@ STATIC CONST CM_OBJ_PARSER AcpiGenericAddressParser[] = {
{ "Address", 8, "0x%llx", NULL },
};
/** A parser for EArmObjLpiInfo.
/** A parser for EArchCommonObjLpiInfo.
*/
STATIC CONST CM_OBJ_PARSER CmArmLpiInfoParser[] = {
STATIC CONST CM_OBJ_PARSER CmArchCommonLpiInfoParser[] = {
{ "MinResidency", 4, "0x%x", NULL },
{ "WorstCaseWakeLatency", 4, "0x%x", NULL },
{ "Flags", 4, "0x%x", NULL },
@ -685,6 +685,7 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArchCommonNamespaceObjectParser[] = {
CM_PARSER_ADD_OBJECT (EArchCommonObjDeviceHandleAcpi, CmArchCommonDeviceHandleAcpiParser),
CM_PARSER_ADD_OBJECT (EArchCommonObjDeviceHandlePci, CmArchCommonDeviceHandlePciParser),
CM_PARSER_ADD_OBJECT (EArchCommonObjGenericInitiatorAffinityInfo,CmArchCommonGenericInitiatorAffinityInfoParser),
CM_PARSER_ADD_OBJECT (EArchCommonObjLpiInfo, CmArchCommonLpiInfoParser),
CM_PARSER_ADD_OBJECT_RESERVED (EArchCommonObjMax)
};
@ -714,7 +715,6 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArmNamespaceObjectParser[] = {
CM_PARSER_ADD_OBJECT (EArmObjProcHierarchyInfo, CmArmProcHierarchyInfoParser),
CM_PARSER_ADD_OBJECT (EArmObjCacheInfo, CmArmCacheInfoParser),
CM_PARSER_ADD_OBJECT (EArmObjCmn600Info, CmArmCmn600InfoParser),
CM_PARSER_ADD_OBJECT (EArmObjLpiInfo, CmArmLpiInfoParser),
CM_PARSER_ADD_OBJECT (EArmObjRmr, CmArmRmrInfoParser),
CM_PARSER_ADD_OBJECT (EArmObjMemoryRangeDescriptor, CmArmMemoryRangeDescriptorInfoParser),
CM_PARSER_ADD_OBJECT (EArmObjCpcInfo, CmArmCpcInfoParser),

View File

@ -463,18 +463,17 @@ The CM_OBJECT_ID type is used to identify the Configuration Manager
| 20 | Processor Hierarchy Info | Move to Arch Common NS |
| 21 | Cache Info | Move to Arch Common NS |
| 22 | CMN 600 Info | |
| 23 | Low Power Idle State Info | Move to Arch Common NS |
| 24 | Reserved Memory Range Node | |
| 25 | Memory Range Descriptor | |
| 26 | Continuous Performance Control Info | Move to Arch Common NS |
| 27 | Pcc Subspace Type 0 Info | Move to Arch Common NS |
| 28 | Pcc Subspace Type 1 Info | Move to Arch Common NS |
| 29 | Pcc Subspace Type 2 Info | Move to Arch Common NS |
| 30 | Pcc Subspace Type 3 Info | Move to Arch Common NS |
| 31 | Pcc Subspace Type 4 Info | Move to Arch Common NS |
| 32 | Pcc Subspace Type 5 Info | Move to Arch Common NS |
| 33 | Embedded Trace Extension/Module Info | |
| 34 | P-State Dependency (PSD) Info | Move to Arch Common NS |
| 23 | Reserved Memory Range Node | |
| 24 | Memory Range Descriptor | |
| 25 | Continuous Performance Control Info | Move to Arch Common NS |
| 26 | Pcc Subspace Type 0 Info | Move to Arch Common NS |
| 27 | Pcc Subspace Type 1 Info | Move to Arch Common NS |
| 28 | Pcc Subspace Type 2 Info | Move to Arch Common NS |
| 29 | Pcc Subspace Type 3 Info | Move to Arch Common NS |
| 30 | Pcc Subspace Type 4 Info | Move to Arch Common NS |
| 31 | Pcc Subspace Type 5 Info | Move to Arch Common NS |
| 32 | Embedded Trace Extension/Module Info | |
| 33 | 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
| 12 | Device Handle Acpi | |
| 13 | Device Handle PCI | |
| 14 | Generic Initiator Affinity Info | |
| 15 | Low Power Idle State Info | |
| `*` | All other values are reserved. | |