mirror of https://github.com/acidanthera/audk.git
DynamicTablesPkg: Add CM_ARM_CPC_INFO object
Introduce the CM_ARM_CPC_INFO CmObj in the ArmNameSpaceObjects. This allows to describe CPC information, as described in ACPI 6.4, s8.4.7.1 "_CPC (Continuous Performance Control)". Signed-off-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
parent
953438e466
commit
09c90532e7
|
@ -0,0 +1,124 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.<BR>
|
||||
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
**/
|
||||
|
||||
#ifndef AML_CPC_INFO_H_
|
||||
#define AML_CPC_INFO_H_
|
||||
|
||||
#include <IndustryStandard/Acpi.h>
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
/** A structure that describes the Cpc information.
|
||||
|
||||
Continuous Performance Control is described in DSDT/SSDT and associated
|
||||
to cpus/clusters in the cpu topology.
|
||||
|
||||
Unsupported Optional registers should be encoded with NULL resource
|
||||
Register {(SystemMemory, 0, 0, 0, 0)}
|
||||
|
||||
For values that support Integer or Buffer, integer will be used
|
||||
if buffer is NULL resource.
|
||||
If resource is not NULL then Integer must be 0
|
||||
|
||||
Cf. ACPI 6.4, s8.4.7.1 _CPC (Continuous Performance Control)
|
||||
|
||||
**/
|
||||
|
||||
typedef struct AmlCpcInfo {
|
||||
/// The revision number of the _CPC package format.
|
||||
UINT32 Revision;
|
||||
|
||||
/// Indicates the highest level of performance the processor
|
||||
/// is theoretically capable of achieving.
|
||||
EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE HighestPerformanceBuffer;
|
||||
UINT32 HighestPerformanceInteger;
|
||||
|
||||
/// Indicates the highest sustained performance level of the processor.
|
||||
EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE NominalPerformanceBuffer;
|
||||
UINT32 NominalPerformanceInteger;
|
||||
|
||||
/// Indicates the lowest performance level of the processor with non-linear power savings.
|
||||
EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE LowestNonlinearPerformanceBuffer;
|
||||
UINT32 LowestNonlinearPerformanceInteger;
|
||||
|
||||
/// Indicates the lowest performance level of the processor..
|
||||
EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE LowestPerformanceBuffer;
|
||||
UINT32 LowestPerformanceInteger;
|
||||
|
||||
/// Guaranteed Performance Register Buffer.
|
||||
/// Optional
|
||||
EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE GuaranteedPerformanceRegister;
|
||||
|
||||
/// Desired Performance Register Buffer.
|
||||
EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE DesiredPerformanceRegister;
|
||||
|
||||
/// Minimum Performance Register Buffer.
|
||||
/// Optional
|
||||
EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE MinimumPerformanceRegister;
|
||||
|
||||
/// Maximum Performance Register Buffer.
|
||||
/// Optional
|
||||
EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE MaximumPerformanceRegister;
|
||||
|
||||
/// Performance Reduction Tolerance Register.
|
||||
/// Optional
|
||||
EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE PerformanceReductionToleranceRegister;
|
||||
|
||||
/// Time Window Register.
|
||||
/// Optional
|
||||
EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE TimeWindowRegister;
|
||||
|
||||
/// Counter Wraparound Time
|
||||
/// Optional
|
||||
EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE CounterWraparoundTimeBuffer;
|
||||
UINT32 CounterWraparoundTimeInteger;
|
||||
|
||||
/// Reference Performance Counter Register
|
||||
EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE ReferencePerformanceCounterRegister;
|
||||
|
||||
/// Delivered Performance Counter Register
|
||||
EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE DeliveredPerformanceCounterRegister;
|
||||
|
||||
/// Performance Limited Register
|
||||
EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE PerformanceLimitedRegister;
|
||||
|
||||
/// CPPC EnableRegister
|
||||
/// Optional
|
||||
EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE CPPCEnableRegister;
|
||||
|
||||
/// Autonomous Selection Enable
|
||||
/// Optional
|
||||
EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE AutonomousSelectionEnableBuffer;
|
||||
UINT32 AutonomousSelectionEnableInteger;
|
||||
|
||||
/// AutonomousActivity-WindowRegister
|
||||
/// Optional
|
||||
EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE AutonomousActivityWindowRegister;
|
||||
|
||||
/// EnergyPerformance-PreferenceRegister
|
||||
/// Optional
|
||||
EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE EnergyPerformancePreferenceRegister;
|
||||
|
||||
/// Reference Performance
|
||||
/// Optional
|
||||
EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE ReferencePerformanceBuffer;
|
||||
UINT32 ReferencePerformanceInteger;
|
||||
|
||||
/// Lowest Frequency
|
||||
/// Optional
|
||||
EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE LowestFrequencyBuffer;
|
||||
UINT32 LowestFrequencyInteger;
|
||||
|
||||
/// Nominal Frequency
|
||||
/// Optional
|
||||
EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE NominalFrequencyBuffer;
|
||||
UINT32 NominalFrequencyInteger;
|
||||
} AML_CPC_INFO;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif //AML_CPC_INFO_H_
|
|
@ -13,6 +13,7 @@
|
|||
#ifndef ARM_NAMESPACE_OBJECTS_H_
|
||||
#define ARM_NAMESPACE_OBJECTS_H_
|
||||
|
||||
#include <AmlCpcInfo.h>
|
||||
#include <StandardNameSpaceObjects.h>
|
||||
|
||||
#pragma pack(1)
|
||||
|
@ -63,6 +64,7 @@ typedef enum ArmObjectID {
|
|||
EArmObjPciInterruptMapInfo, ///< 39 - Pci Interrupt Map Info
|
||||
EArmObjRmr, ///< 40 - Reserved Memory Range Node
|
||||
EArmObjMemoryRangeDescriptor, ///< 41 - Memory Range Descriptor
|
||||
EArmObjCpcInfo, ///< 42 - Continuous Performance Control Info
|
||||
EArmObjMax
|
||||
} EARM_OBJECT_ID;
|
||||
|
||||
|
@ -190,6 +192,11 @@ typedef struct CmArmGicCInfo {
|
|||
in the SRAT table.
|
||||
*/
|
||||
UINT32 AffinityFlags;
|
||||
|
||||
/** Optional field: Reference Token for the Cpc info of this processor.
|
||||
i.e. a token referencing a CM_ARM_CPC_INFO object.
|
||||
*/
|
||||
CM_OBJECT_TOKEN CpcToken;
|
||||
} CM_ARM_GICC_INFO;
|
||||
|
||||
/** A structure that describes the
|
||||
|
@ -1070,6 +1077,24 @@ typedef struct CmArmRmrDescriptor {
|
|||
UINT64 Length;
|
||||
} CM_ARM_MEMORY_RANGE_DESCRIPTOR;
|
||||
|
||||
/** A structure that describes the Cpc information.
|
||||
|
||||
Continuous Performance Control is described in DSDT/SSDT and associated
|
||||
to cpus/clusters in the cpu topology.
|
||||
|
||||
Unsupported Optional registers should be encoded with NULL resource
|
||||
Register {(SystemMemory, 0, 0, 0, 0)}
|
||||
|
||||
For values that support Integer or Buffer, integer will be used
|
||||
if buffer is NULL resource.
|
||||
If resource is not NULL then Integer must be 0
|
||||
|
||||
Cf. ACPI 6.4, s8.4.7.1 _CPC (Continuous Performance Control)
|
||||
|
||||
ID: EArmObjCpcInfo
|
||||
*/
|
||||
typedef AML_CPC_INFO CM_ARM_CPC_INFO;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif // ARM_NAMESPACE_OBJECTS_H_
|
||||
|
|
|
@ -50,7 +50,8 @@ STATIC CONST CM_OBJ_PARSER CmArmGicCInfoParser[] = {
|
|||
{ "SpeOverflowInterrupt", 2, "0x%x", NULL },
|
||||
{ "ProximityDomain", 4, "0x%x", NULL },
|
||||
{ "ClockDomain", 4, "0x%x", NULL },
|
||||
{ "AffinityFlags", 4, "0x%x", NULL }
|
||||
{ "AffinityFlags", 4, "0x%x", NULL },
|
||||
{ "CpcToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }
|
||||
};
|
||||
|
||||
/** A parser for EArmObjGicDInfo.
|
||||
|
@ -423,6 +424,84 @@ STATIC CONST CM_OBJ_PARSER CmPciInterruptMapInfoParser[] = {
|
|||
ARRAY_SIZE (CmArmGenericInterruptParser) },
|
||||
};
|
||||
|
||||
/** A parser for EArmObjCpcInfo.
|
||||
*/
|
||||
STATIC CONST CM_OBJ_PARSER CmArmCpcInfoParser[] = {
|
||||
{ "Revision", 4, "0x%lx", NULL },
|
||||
{ "HighestPerformanceBuffer", sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE),
|
||||
NULL, NULL, AcpiGenericAddressParser,
|
||||
ARRAY_SIZE (AcpiGenericAddressParser) },
|
||||
{ "HighestPerformanceInteger", 4, "0x%lx", NULL },
|
||||
{ "NominalPerformanceBuffer", sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE),
|
||||
NULL, NULL, AcpiGenericAddressParser,
|
||||
ARRAY_SIZE (AcpiGenericAddressParser) },
|
||||
{ "NominalPerformanceInteger", 4, "0x%lx", NULL },
|
||||
{ "LowestNonlinearPerformanceBuffer", sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE),
|
||||
NULL, NULL, AcpiGenericAddressParser,
|
||||
ARRAY_SIZE (AcpiGenericAddressParser) },
|
||||
{ "LowestNonlinearPerformanceInteger", 4, "0x%lx", NULL },
|
||||
{ "LowestPerformanceBuffer", sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE),
|
||||
NULL, NULL, AcpiGenericAddressParser,
|
||||
ARRAY_SIZE (AcpiGenericAddressParser) },
|
||||
{ "LowestPerformanceInteger", 4, "0x%lx", NULL },
|
||||
{ "GuaranteedPerformanceRegister", sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE),
|
||||
NULL, NULL, AcpiGenericAddressParser,
|
||||
ARRAY_SIZE (AcpiGenericAddressParser) },
|
||||
{ "DesiredPerformanceRegister", sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE),
|
||||
NULL, NULL, AcpiGenericAddressParser,
|
||||
ARRAY_SIZE (AcpiGenericAddressParser) },
|
||||
{ "MinimumPerformanceRegister", sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE),
|
||||
NULL, NULL, AcpiGenericAddressParser,
|
||||
ARRAY_SIZE (AcpiGenericAddressParser) },
|
||||
{ "MaximumPerformanceRegister", sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE),
|
||||
NULL, NULL, AcpiGenericAddressParser,
|
||||
ARRAY_SIZE (AcpiGenericAddressParser) },
|
||||
{ "PerformanceReductionToleranceRegister", sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE),
|
||||
NULL, NULL, AcpiGenericAddressParser,
|
||||
ARRAY_SIZE (AcpiGenericAddressParser) },
|
||||
{ "TimeWindowRegister", sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE),
|
||||
NULL, NULL, AcpiGenericAddressParser,
|
||||
ARRAY_SIZE (AcpiGenericAddressParser) },
|
||||
{ "CounterWraparoundTimeBuffer", sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE),
|
||||
NULL, NULL, AcpiGenericAddressParser,
|
||||
ARRAY_SIZE (AcpiGenericAddressParser) },
|
||||
{ "CounterWraparoundTimeInteger", 4, "0x%lx", NULL },
|
||||
{ "ReferencePerformanceCounterRegister", sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE),
|
||||
NULL, NULL, AcpiGenericAddressParser,
|
||||
ARRAY_SIZE (AcpiGenericAddressParser) },
|
||||
{ "DeliveredPerformanceCounterRegister", sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE),
|
||||
NULL, NULL, AcpiGenericAddressParser,
|
||||
ARRAY_SIZE (AcpiGenericAddressParser) },
|
||||
{ "PerformanceLimitedRegister", sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE),
|
||||
NULL, NULL, AcpiGenericAddressParser,
|
||||
ARRAY_SIZE (AcpiGenericAddressParser) },
|
||||
{ "CPPCEnableRegister", sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE),
|
||||
NULL, NULL, AcpiGenericAddressParser,
|
||||
ARRAY_SIZE (AcpiGenericAddressParser) },
|
||||
{ "AutonomousSelectionEnableBuffer", sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE),
|
||||
NULL, NULL, AcpiGenericAddressParser,
|
||||
ARRAY_SIZE (AcpiGenericAddressParser) },
|
||||
{ "AutonomousSelectionEnableInteger", 4, "0x%lx", NULL },
|
||||
{ "AutonomousActivityWindowRegister", sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE),
|
||||
NULL, NULL, AcpiGenericAddressParser,
|
||||
ARRAY_SIZE (AcpiGenericAddressParser) },
|
||||
{ "EnergyPerformancePreferenceRegister", sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE),
|
||||
NULL, NULL, AcpiGenericAddressParser,
|
||||
ARRAY_SIZE (AcpiGenericAddressParser) },
|
||||
{ "ReferencePerformanceBuffer", sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE),
|
||||
NULL, NULL, AcpiGenericAddressParser,
|
||||
ARRAY_SIZE (AcpiGenericAddressParser) },
|
||||
{ "ReferencePerformanceInteger", 4, "0x%lx", NULL },
|
||||
{ "LowestFrequencyBuffer", sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE),
|
||||
NULL, NULL, AcpiGenericAddressParser,
|
||||
ARRAY_SIZE (AcpiGenericAddressParser) },
|
||||
{ "LowestFrequencyInteger", 4, "0x%lx", NULL },
|
||||
{ "NominalFrequencyBuffer", sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE),
|
||||
NULL, NULL, AcpiGenericAddressParser,
|
||||
ARRAY_SIZE (AcpiGenericAddressParser) },
|
||||
{ "NominalFrequencyInteger", 4, "0x%lx", NULL },
|
||||
};
|
||||
|
||||
/** A parser for Arm namespace objects.
|
||||
*/
|
||||
STATIC CONST CM_OBJ_PARSER_ARRAY ArmNamespaceObjectParser[] = {
|
||||
|
@ -501,6 +580,8 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArmNamespaceObjectParser[] = {
|
|||
ARRAY_SIZE (CmArmPciAddressMapInfoParser) },
|
||||
{ "EArmObjPciInterruptMapInfo", CmPciInterruptMapInfoParser,
|
||||
ARRAY_SIZE (CmPciInterruptMapInfoParser) },
|
||||
{ "EArmObjCpcInfo", CmArmCpcInfoParser,
|
||||
ARRAY_SIZE (CmArmCpcInfoParser) },
|
||||
{ "EArmObjMax", NULL, 0 },
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue