Jonathan Zhang | 6d27778 | 2020-06-09 17:56:53 -0700 | [diff] [blame] | 1 | /** @file |
| 2 | ACPI Alert Standard Format Description Table ASF! as described in the ASF2.0 Specification |
| 3 | |
| 4 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> |
| 5 | SPDX-License-Identifier: BSD-2-Clause-Patent |
| 6 | **/ |
| 7 | |
| 8 | #ifndef _ALERT_STANDARD_FORMAT_TABLE_H_ |
| 9 | #define _ALERT_STANDARD_FORMAT_TABLE_H_ |
| 10 | |
| 11 | #include <IndustryStandard/Acpi.h> |
| 12 | |
| 13 | // |
| 14 | // Ensure proper structure formats |
| 15 | // |
| 16 | #pragma pack (1) |
| 17 | |
| 18 | /// |
| 19 | /// Information Record header that appears at the beginning of each record |
| 20 | /// |
| 21 | typedef struct { |
| 22 | UINT8 Type; |
| 23 | UINT8 Reserved; |
| 24 | UINT16 RecordLength; |
| 25 | } EFI_ACPI_ASF_RECORD_HEADER; |
| 26 | |
| 27 | /// |
| 28 | /// This structure contains information that identifies the system's type |
| 29 | /// and configuration |
| 30 | /// |
| 31 | typedef struct { |
| 32 | EFI_ACPI_ASF_RECORD_HEADER RecordHeader; |
| 33 | UINT8 MinWatchDogResetValue; |
| 34 | UINT8 MinPollingInterval; |
| 35 | UINT16 SystemID; |
| 36 | UINT32 IANAManufactureID; |
| 37 | UINT8 FeatureFlags; |
| 38 | UINT8 Reserved[3]; |
| 39 | } EFI_ACPI_ASF_INFO; |
| 40 | |
| 41 | /// |
| 42 | /// ASF Alert Data |
| 43 | /// |
| 44 | typedef struct { |
| 45 | UINT8 DeviceAddress; |
| 46 | UINT8 Command; |
| 47 | UINT8 DataMask; |
| 48 | UINT8 CompareValue; |
| 49 | UINT8 EventSenseType; |
| 50 | UINT8 EventType; |
| 51 | UINT8 EventOffset; |
| 52 | UINT8 EventSourceType; |
| 53 | UINT8 EventSeverity; |
| 54 | UINT8 SensorNumber; |
| 55 | UINT8 Entity; |
| 56 | UINT8 EntityInstance; |
| 57 | } EFI_ACPI_ASF_ALERTDATA; |
| 58 | |
| 59 | /// |
| 60 | /// Alert sensors definition |
| 61 | /// |
| 62 | typedef struct { |
| 63 | EFI_ACPI_ASF_RECORD_HEADER RecordHeader; |
| 64 | UINT8 AssertionEventBitMask; |
| 65 | UINT8 DeassertionEventBitMask; |
| 66 | UINT8 NumberOfAlerts; |
| 67 | UINT8 ArrayElementLength; ///< For ASF version 1.0 and later, this filed is set to 0x0C |
| 68 | /// |
| 69 | /// EFI_ACPI_ASF_ALERTDATA DeviceArray[ANYSIZE_ARRAY]; |
| 70 | /// |
| 71 | } EFI_ACPI_ASF_ALRT; |
| 72 | |
| 73 | /// |
| 74 | /// Alert Control Data |
| 75 | /// |
| 76 | typedef struct { |
| 77 | UINT8 Function; |
| 78 | UINT8 DeviceAddress; |
| 79 | UINT8 Command; |
| 80 | UINT8 DataValue; |
| 81 | } EFI_ACPI_ASF_CONTROLDATA; |
| 82 | |
| 83 | /// |
| 84 | /// Alert Remote Control System Actions |
| 85 | /// |
| 86 | typedef struct { |
| 87 | EFI_ACPI_ASF_RECORD_HEADER RecordHeader; |
| 88 | UINT8 NumberOfControls; |
| 89 | UINT8 ArrayElementLength; ///< For ASF version 1.0 and later, this filed is set to 0x4 |
| 90 | UINT16 RctlReserved; |
| 91 | /// |
| 92 | /// EFI_ACPI_ASF_CONTROLDATA; DeviceArray[ANYSIZE_ARRAY]; |
| 93 | /// |
| 94 | } EFI_ACPI_ASF_RCTL; |
| 95 | |
| 96 | |
| 97 | /// |
| 98 | /// Remote Control Capabilities |
| 99 | /// |
| 100 | typedef struct { |
| 101 | EFI_ACPI_ASF_RECORD_HEADER RecordHeader; |
| 102 | UINT8 RemoteControlCapabilities[7]; |
| 103 | UINT8 RMCPCompletionCode; |
| 104 | UINT32 RMCPIANA; |
| 105 | UINT8 RMCPSpecialCommand; |
| 106 | UINT8 RMCPSpecialCommandParameter[2]; |
| 107 | UINT8 RMCPBootOptions[2]; |
| 108 | UINT8 RMCPOEMParameters[2]; |
| 109 | } EFI_ACPI_ASF_RMCP; |
| 110 | |
| 111 | /// |
| 112 | /// SMBus Devices with fixed addresses |
| 113 | /// |
| 114 | typedef struct { |
| 115 | EFI_ACPI_ASF_RECORD_HEADER RecordHeader; |
| 116 | UINT8 SEEPROMAddress; |
| 117 | UINT8 NumberOfDevices; |
| 118 | /// |
| 119 | /// UINT8 FixedSmbusAddresses[ANYSIZE_ARRAY]; |
| 120 | /// |
| 121 | } EFI_ACPI_ASF_ADDR; |
| 122 | |
| 123 | /// |
| 124 | /// ASF! Description Table Header |
| 125 | /// |
| 126 | typedef EFI_ACPI_DESCRIPTION_HEADER EFI_ACPI_ASF_DESCRIPTION_HEADER; |
| 127 | |
| 128 | /// |
| 129 | /// The revision stored in ASF! DESCRIPTION TABLE as BCD value |
| 130 | /// |
| 131 | #define EFI_ACPI_2_0_ASF_DESCRIPTION_TABLE_REVISION 0x20 |
| 132 | |
| 133 | /// |
| 134 | /// "ASF!" ASF Description Table Signature |
| 135 | /// |
| 136 | #define EFI_ACPI_ASF_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32 ('A', 'S', 'F', '!') |
| 137 | |
| 138 | #pragma pack () |
| 139 | |
| 140 | #endif // _ALERT_STANDARD_FORMAT_TABLE_H |