]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg: Add ACPI Low Power Idle Table (LPIT) definitions
authorGiri P Mudusuru <giri.p.mudusuru@intel.com>
Tue, 18 Oct 2016 11:18:11 +0000 (04:18 -0700)
committerGiri P Mudusuru <giri.p.mudusuru@intel.com>
Fri, 21 Oct 2016 05:19:38 +0000 (22:19 -0700)
ACPI Low Power Idle Table (LPIT) Revision 001, dated July 2014
http://www.uefi.org/sites/default/files/resources/ACPI_Low_Power_Idle_Table.pdf

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
MdePkg/Include/IndustryStandard/LowPowerIdleTable.h [new file with mode: 0644]

diff --git a/MdePkg/Include/IndustryStandard/LowPowerIdleTable.h b/MdePkg/Include/IndustryStandard/LowPowerIdleTable.h
new file mode 100644 (file)
index 0000000..29ad42b
--- /dev/null
@@ -0,0 +1,82 @@
+/** @file\r
+  ACPI Low Power Idle Table (LPIT) definitions\r
+\r
+  Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this distribution.  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+  @par Revision Reference:\r
+    - ACPI Low Power Idle Table (LPIT) Revision 001, dated July 2014\r
+      http://www.uefi.org/sites/default/files/resources/ACPI_Low_Power_Idle_Table.pdf\r
+\r
+  @par Glossary:\r
+    - GAS - Generic Address Structure\r
+    - LPI - Low Power Idle\r
+**/\r
+#ifndef _LOW_POWER_IDLE_TABLE_H_\r
+#define _LOW_POWER_IDLE_TABLE_H_\r
+\r
+#include <IndustryStandard/Acpi.h>\r
+\r
+#pragma pack(1)\r
+\r
+///\r
+/// LPI Structure Types\r
+///\r
+#define ACPI_LPI_STRUCTURE_TYPE_NATIVE_CSTATE     0x00\r
+\r
+///\r
+/// Low Power Idle (LPI) State Flags\r
+///\r
+typedef union {\r
+  struct {\r
+    UINT32 Disabled           : 1;  ///< If set, LPI state is not used\r
+    /**\r
+      If set, Residency counter is not available for this LPI state and\r
+      Residency Counter Frequency is invalid\r
+    **/\r
+    UINT32 CounterUnavailable : 1;\r
+    UINT32 Reserved           : 30; ///< Reserved for future use. Must be zero\r
+  } Bits;\r
+  UINT32 Data32;\r
+} ACPI_LPI_STATE_FLAGS;\r
+\r
+///\r
+/// Low Power Idle (LPI) structure with Native C-state instruction entry trigger descriptor\r
+///\r
+typedef struct {\r
+  UINT32                                  Type;   ///< LPI State descriptor Type 0\r
+  UINT32                                  Length; ///< Length of LPI state Descriptor Structure\r
+  ///\r
+  /// Unique LPI state identifier: zero based, monotonically increasing identifier\r
+  ///\r
+  UINT16                                  UniqueId;\r
+  UINT8                                   Reserved[2];  ///< Must be Zero\r
+  ACPI_LPI_STATE_FLAGS                    Flags;        ///< LPI state flags\r
+  /**\r
+    The LPI entry trigger, matching an existing _CST.Register object, represented as a\r
+    Generic Address Structure. All processors must request this state or deeper to trigger.\r
+  **/\r
+  EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE  EntryTrigger;\r
+  UINT32                                  Residency;  ///< Minimum residency or break-even in uSec\r
+  UINT32                                  Latency;    ///< Worst case exit latency in uSec\r
+  /**\r
+    [optional] Residency counter, represented as a Generic Address Structure.\r
+    If not present, Flags[1] bit should be set.\r
+  **/\r
+  EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE  ResidencyCounter;\r
+  /**\r
+    [optional] Residency counter frequency in cycles per second. Value 0 indicates that\r
+    counter runs at TSC frequency. Valid only if Residency Counter is present.\r
+  **/\r
+  UINT64                                  ResidencyCounterFrequency;\r
+} ACPI_LPI_NATIVE_CSTATE_DESCRIPTOR;\r
+\r
+#pragma pack()\r
+\r
+#endif\r