]> xenbits.xensource.com Git - people/aperard/ovmf.git/commitdiff
DynamicTablesPkg: Rename AmlCpcInfo.h to AcpiObjects.h
authorPierre Gondois <pierre.gondois@arm.com>
Thu, 25 Jan 2024 15:18:43 +0000 (16:18 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 29 Jan 2024 16:47:03 +0000 (16:47 +0000)
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 <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
DynamicTablesPkg/Include/AcpiObjects.h [new file with mode: 0644]
DynamicTablesPkg/Include/AmlCpcInfo.h [deleted file]
DynamicTablesPkg/Include/ArmNameSpaceObjects.h
DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h
DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c

diff --git a/DynamicTablesPkg/Include/AcpiObjects.h b/DynamicTablesPkg/Include/AcpiObjects.h
new file mode 100644 (file)
index 0000000..8981c22
--- /dev/null
@@ -0,0 +1,124 @@
+/** @file\r
+\r
+  Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.<BR>\r
+\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
+**/\r
+\r
+#ifndef AML_CPC_INFO_H_\r
+#define AML_CPC_INFO_H_\r
+\r
+#include <IndustryStandard/Acpi.h>\r
+\r
+#pragma pack(1)\r
+\r
+/** A structure that describes the Cpc information.\r
+\r
+  Continuous Performance Control is described in DSDT/SSDT and associated\r
+  to cpus/clusters in the cpu topology.\r
+\r
+  Unsupported Optional registers should be encoded with NULL resource\r
+  Register {(SystemMemory, 0, 0, 0, 0)}\r
+\r
+  For values that support Integer or Buffer, integer will be used\r
+  if buffer is NULL resource.\r
+  If resource is not NULL then Integer must be 0\r
+\r
+  Cf. ACPI 6.4, s8.4.7.1 _CPC (Continuous Performance Control)\r
+\r
+**/\r
+\r
+typedef struct AmlCpcInfo {\r
+  /// The revision number of the _CPC package format.\r
+  UINT32                                    Revision;\r
+\r
+  /// Indicates the highest level of performance the processor\r
+  /// is theoretically capable of achieving.\r
+  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    HighestPerformanceBuffer;\r
+  UINT32                                    HighestPerformanceInteger;\r
+\r
+  /// Indicates the highest sustained performance level of the processor.\r
+  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    NominalPerformanceBuffer;\r
+  UINT32                                    NominalPerformanceInteger;\r
+\r
+  /// Indicates the lowest performance level of the processor with non-linear power savings.\r
+  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    LowestNonlinearPerformanceBuffer;\r
+  UINT32                                    LowestNonlinearPerformanceInteger;\r
+\r
+  /// Indicates the lowest performance level of the processor..\r
+  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    LowestPerformanceBuffer;\r
+  UINT32                                    LowestPerformanceInteger;\r
+\r
+  /// Guaranteed Performance Register Buffer.\r
+  /// Optional\r
+  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    GuaranteedPerformanceRegister;\r
+\r
+  /// Desired Performance Register Buffer.\r
+  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    DesiredPerformanceRegister;\r
+\r
+  /// Minimum Performance Register Buffer.\r
+  /// Optional\r
+  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    MinimumPerformanceRegister;\r
+\r
+  /// Maximum Performance Register Buffer.\r
+  /// Optional\r
+  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    MaximumPerformanceRegister;\r
+\r
+  /// Performance Reduction Tolerance Register.\r
+  /// Optional\r
+  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    PerformanceReductionToleranceRegister;\r
+\r
+  /// Time Window Register.\r
+  /// Optional\r
+  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    TimeWindowRegister;\r
+\r
+  /// Counter Wraparound Time\r
+  /// Optional\r
+  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    CounterWraparoundTimeBuffer;\r
+  UINT32                                    CounterWraparoundTimeInteger;\r
+\r
+  /// Reference Performance Counter Register\r
+  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    ReferencePerformanceCounterRegister;\r
+\r
+  /// Delivered Performance Counter Register\r
+  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    DeliveredPerformanceCounterRegister;\r
+\r
+  /// Performance Limited Register\r
+  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    PerformanceLimitedRegister;\r
+\r
+  /// CPPC EnableRegister\r
+  /// Optional\r
+  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    CPPCEnableRegister;\r
+\r
+  /// Autonomous Selection Enable\r
+  /// Optional\r
+  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    AutonomousSelectionEnableBuffer;\r
+  UINT32                                    AutonomousSelectionEnableInteger;\r
+\r
+  /// AutonomousActivity-WindowRegister\r
+  /// Optional\r
+  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    AutonomousActivityWindowRegister;\r
+\r
+  /// EnergyPerformance-PreferenceRegister\r
+  /// Optional\r
+  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    EnergyPerformancePreferenceRegister;\r
+\r
+  /// Reference Performance\r
+  /// Optional\r
+  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    ReferencePerformanceBuffer;\r
+  UINT32                                    ReferencePerformanceInteger;\r
+\r
+  /// Lowest Frequency\r
+  /// Optional\r
+  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    LowestFrequencyBuffer;\r
+  UINT32                                    LowestFrequencyInteger;\r
+\r
+  /// Nominal Frequency\r
+  /// Optional\r
+  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    NominalFrequencyBuffer;\r
+  UINT32                                    NominalFrequencyInteger;\r
+} AML_CPC_INFO;\r
+\r
+#pragma pack()\r
+\r
+#endif //AML_CPC_INFO_H_\r
diff --git a/DynamicTablesPkg/Include/AmlCpcInfo.h b/DynamicTablesPkg/Include/AmlCpcInfo.h
deleted file mode 100644 (file)
index 8981c22..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/** @file\r
-\r
-  Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.<BR>\r
-\r
-  SPDX-License-Identifier: BSD-2-Clause-Patent\r
-**/\r
-\r
-#ifndef AML_CPC_INFO_H_\r
-#define AML_CPC_INFO_H_\r
-\r
-#include <IndustryStandard/Acpi.h>\r
-\r
-#pragma pack(1)\r
-\r
-/** A structure that describes the Cpc information.\r
-\r
-  Continuous Performance Control is described in DSDT/SSDT and associated\r
-  to cpus/clusters in the cpu topology.\r
-\r
-  Unsupported Optional registers should be encoded with NULL resource\r
-  Register {(SystemMemory, 0, 0, 0, 0)}\r
-\r
-  For values that support Integer or Buffer, integer will be used\r
-  if buffer is NULL resource.\r
-  If resource is not NULL then Integer must be 0\r
-\r
-  Cf. ACPI 6.4, s8.4.7.1 _CPC (Continuous Performance Control)\r
-\r
-**/\r
-\r
-typedef struct AmlCpcInfo {\r
-  /// The revision number of the _CPC package format.\r
-  UINT32                                    Revision;\r
-\r
-  /// Indicates the highest level of performance the processor\r
-  /// is theoretically capable of achieving.\r
-  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    HighestPerformanceBuffer;\r
-  UINT32                                    HighestPerformanceInteger;\r
-\r
-  /// Indicates the highest sustained performance level of the processor.\r
-  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    NominalPerformanceBuffer;\r
-  UINT32                                    NominalPerformanceInteger;\r
-\r
-  /// Indicates the lowest performance level of the processor with non-linear power savings.\r
-  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    LowestNonlinearPerformanceBuffer;\r
-  UINT32                                    LowestNonlinearPerformanceInteger;\r
-\r
-  /// Indicates the lowest performance level of the processor..\r
-  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    LowestPerformanceBuffer;\r
-  UINT32                                    LowestPerformanceInteger;\r
-\r
-  /// Guaranteed Performance Register Buffer.\r
-  /// Optional\r
-  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    GuaranteedPerformanceRegister;\r
-\r
-  /// Desired Performance Register Buffer.\r
-  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    DesiredPerformanceRegister;\r
-\r
-  /// Minimum Performance Register Buffer.\r
-  /// Optional\r
-  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    MinimumPerformanceRegister;\r
-\r
-  /// Maximum Performance Register Buffer.\r
-  /// Optional\r
-  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    MaximumPerformanceRegister;\r
-\r
-  /// Performance Reduction Tolerance Register.\r
-  /// Optional\r
-  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    PerformanceReductionToleranceRegister;\r
-\r
-  /// Time Window Register.\r
-  /// Optional\r
-  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    TimeWindowRegister;\r
-\r
-  /// Counter Wraparound Time\r
-  /// Optional\r
-  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    CounterWraparoundTimeBuffer;\r
-  UINT32                                    CounterWraparoundTimeInteger;\r
-\r
-  /// Reference Performance Counter Register\r
-  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    ReferencePerformanceCounterRegister;\r
-\r
-  /// Delivered Performance Counter Register\r
-  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    DeliveredPerformanceCounterRegister;\r
-\r
-  /// Performance Limited Register\r
-  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    PerformanceLimitedRegister;\r
-\r
-  /// CPPC EnableRegister\r
-  /// Optional\r
-  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    CPPCEnableRegister;\r
-\r
-  /// Autonomous Selection Enable\r
-  /// Optional\r
-  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    AutonomousSelectionEnableBuffer;\r
-  UINT32                                    AutonomousSelectionEnableInteger;\r
-\r
-  /// AutonomousActivity-WindowRegister\r
-  /// Optional\r
-  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    AutonomousActivityWindowRegister;\r
-\r
-  /// EnergyPerformance-PreferenceRegister\r
-  /// Optional\r
-  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    EnergyPerformancePreferenceRegister;\r
-\r
-  /// Reference Performance\r
-  /// Optional\r
-  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    ReferencePerformanceBuffer;\r
-  UINT32                                    ReferencePerformanceInteger;\r
-\r
-  /// Lowest Frequency\r
-  /// Optional\r
-  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    LowestFrequencyBuffer;\r
-  UINT32                                    LowestFrequencyInteger;\r
-\r
-  /// Nominal Frequency\r
-  /// Optional\r
-  EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE    NominalFrequencyBuffer;\r
-  UINT32                                    NominalFrequencyInteger;\r
-} AML_CPC_INFO;\r
-\r
-#pragma pack()\r
-\r
-#endif //AML_CPC_INFO_H_\r
index 8c00bdac20bb1323d8dbd17f671e0e61886ad269..453cc3fe83fa54ea8a4bda159fd46d38b916b3ff 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef ARM_NAMESPACE_OBJECTS_H_\r
 #define ARM_NAMESPACE_OBJECTS_H_\r
 \r
-#include <AmlCpcInfo.h>\r
+#include <AcpiObjects.h>\r
 #include <StandardNameSpaceObjects.h>\r
 \r
 #pragma pack(1)\r
index 043ec3d8428fdcb3776ec77c9388891831b93867..01e37b089897e32f9cdb3882c540d60a4e1b382e 100644 (file)
@@ -37,7 +37,7 @@
   @}\r
 */\r
 \r
-#include <AmlCpcInfo.h>\r
+#include <AcpiObjects.h>\r
 #include <IndustryStandard/Acpi.h>\r
 \r
 #ifndef AML_HANDLE\r
index 949aee2f6961fe9c4c66963f761e02e4f40c8e60..9040192f8c3cebead7c880cf77ecc48dbcf40980 100644 (file)
@@ -12,7 +12,7 @@
 #include <AcpiTableGenerator.h>\r
 \r
 #include <AmlCoreInterface.h>\r
-#include <AmlCpcInfo.h>\r
+#include <AcpiObjects.h>\r
 #include <AmlEncoding/Aml.h>\r
 #include <Api/AmlApiHelper.h>\r
 #include <CodeGen/AmlResourceDataCodeGen.h>\r