From e3992e40c7d79f27fa8f923e8a1b0251eb69d7d7 Mon Sep 17 00:00:00 2001 From: Pierre Gondois Date: Thu, 25 Jan 2024 16:18:43 +0100 Subject: DynamicTablesPkg: Rename AmlCpcInfo.h to AcpiObjects.h The DynamicTables framework uses the AmlLib to generate some Aml objects. It is done by using structured known by both frameworks, e.g. the AML_CPC_INFO/CM_ARM_CPC_INFO structures. To prepare adding similar structures (e.g. representing _PSD information), rename AmlCpcInfo.h to AcpiObjects.h. This new file will contain all the structures used by the AmlLib and the DynamicTables framework. Reviewed-by: Sami Mujawar Signed-off-by: Pierre Gondois --- DynamicTablesPkg/Include/AcpiObjects.h | 124 +++++++++++++++++++++ DynamicTablesPkg/Include/AmlCpcInfo.h | 124 --------------------- DynamicTablesPkg/Include/ArmNameSpaceObjects.h | 2 +- DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h | 2 +- .../Library/Common/AmlLib/CodeGen/AmlCodeGen.c | 2 +- 5 files changed, 127 insertions(+), 127 deletions(-) create mode 100644 DynamicTablesPkg/Include/AcpiObjects.h delete mode 100644 DynamicTablesPkg/Include/AmlCpcInfo.h (limited to 'DynamicTablesPkg') diff --git a/DynamicTablesPkg/Include/AcpiObjects.h b/DynamicTablesPkg/Include/AcpiObjects.h new file mode 100644 index 0000000..8981c22 --- /dev/null +++ b/DynamicTablesPkg/Include/AcpiObjects.h @@ -0,0 +1,124 @@ +/** @file + + Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#ifndef AML_CPC_INFO_H_ +#define AML_CPC_INFO_H_ + +#include + +#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_ diff --git a/DynamicTablesPkg/Include/AmlCpcInfo.h b/DynamicTablesPkg/Include/AmlCpcInfo.h deleted file mode 100644 index 8981c22..0000000 --- a/DynamicTablesPkg/Include/AmlCpcInfo.h +++ /dev/null @@ -1,124 +0,0 @@ -/** @file - - Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
- - SPDX-License-Identifier: BSD-2-Clause-Patent -**/ - -#ifndef AML_CPC_INFO_H_ -#define AML_CPC_INFO_H_ - -#include - -#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_ diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h index 8c00bda..453cc3f 100644 --- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h @@ -13,7 +13,7 @@ #ifndef ARM_NAMESPACE_OBJECTS_H_ #define ARM_NAMESPACE_OBJECTS_H_ -#include +#include #include #pragma pack(1) diff --git a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h b/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h index 043ec3d..01e37b0 100644 --- a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h +++ b/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h @@ -37,7 +37,7 @@ @} */ -#include +#include #include #ifndef AML_HANDLE diff --git a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c index 949aee2..9040192 100644 --- a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c +++ b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include #include -- cgit v1.1