Subrata Banik | 20fe24b | 2021-12-09 02:46:38 +0530 | [diff] [blame] | 1 | /** @file |
| 2 | ACPI Low Power Idle Table (LPIT) definitions |
| 3 | |
| 4 | Copyright (c) 2016, Intel Corporation. All rights reserved.<BR> |
| 5 | SPDX-License-Identifier: BSD-2-Clause-Patent |
| 6 | |
| 7 | @par Revision Reference: |
| 8 | - ACPI Low Power Idle Table (LPIT) Revision 001, dated July 2014 |
| 9 | http://www.uefi.org/sites/default/files/resources/ACPI_Low_Power_Idle_Table.pdf |
| 10 | |
| 11 | @par Glossary: |
| 12 | - GAS - Generic Address Structure |
| 13 | - LPI - Low Power Idle |
| 14 | **/ |
| 15 | #ifndef _LOW_POWER_IDLE_TABLE_H_ |
| 16 | #define _LOW_POWER_IDLE_TABLE_H_ |
| 17 | |
| 18 | #include <IndustryStandard/Acpi.h> |
| 19 | |
| 20 | #pragma pack(1) |
| 21 | |
| 22 | /// |
| 23 | /// LPI Structure Types |
| 24 | /// |
| 25 | #define ACPI_LPI_STRUCTURE_TYPE_NATIVE_CSTATE 0x00 |
| 26 | |
| 27 | /// |
| 28 | /// Low Power Idle (LPI) State Flags |
| 29 | /// |
| 30 | typedef union { |
| 31 | struct { |
| 32 | UINT32 Disabled : 1; ///< If set, LPI state is not used |
| 33 | /** |
| 34 | If set, Residency counter is not available for this LPI state and |
| 35 | Residency Counter Frequency is invalid |
| 36 | **/ |
| 37 | UINT32 CounterUnavailable : 1; |
| 38 | UINT32 Reserved : 30; ///< Reserved for future use. Must be zero |
| 39 | } Bits; |
| 40 | UINT32 Data32; |
| 41 | } ACPI_LPI_STATE_FLAGS; |
| 42 | |
| 43 | /// |
| 44 | /// Low Power Idle (LPI) structure with Native C-state instruction entry trigger descriptor |
| 45 | /// |
| 46 | typedef struct { |
| 47 | UINT32 Type; ///< LPI State descriptor Type 0 |
| 48 | UINT32 Length; ///< Length of LPI state Descriptor Structure |
| 49 | /// |
| 50 | /// Unique LPI state identifier: zero based, monotonically increasing identifier |
| 51 | /// |
| 52 | UINT16 UniqueId; |
| 53 | UINT8 Reserved[2]; ///< Must be Zero |
| 54 | ACPI_LPI_STATE_FLAGS Flags; ///< LPI state flags |
| 55 | /** |
| 56 | The LPI entry trigger, matching an existing _CST.Register object, represented as a |
| 57 | Generic Address Structure. All processors must request this state or deeper to trigger. |
| 58 | **/ |
| 59 | EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE EntryTrigger; |
| 60 | UINT32 Residency; ///< Minimum residency or break-even in uSec |
| 61 | UINT32 Latency; ///< Worst case exit latency in uSec |
| 62 | /** |
| 63 | [optional] Residency counter, represented as a Generic Address Structure. |
| 64 | If not present, Flags[1] bit should be set. |
| 65 | **/ |
| 66 | EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE ResidencyCounter; |
| 67 | /** |
| 68 | [optional] Residency counter frequency in cycles per second. Value 0 indicates that |
| 69 | counter runs at TSC frequency. Valid only if Residency Counter is present. |
| 70 | **/ |
| 71 | UINT64 ResidencyCounterFrequency; |
| 72 | } ACPI_LPI_NATIVE_CSTATE_DESCRIPTOR; |
| 73 | |
| 74 | #pragma pack() |
| 75 | |
| 76 | #endif |