xref: /freebsd/sys/contrib/edk2/Include/IndustryStandard/Acpi61.h (revision e985c628a0e4082d9b953897d6f56c81d177cea7)
1*e985c628SWarner Losh /** @file
2*e985c628SWarner Losh   ACPI 6.1 definitions from the ACPI Specification Revision 6.1 January, 2016.
3*e985c628SWarner Losh 
4*e985c628SWarner Losh   Copyright (c) 2016 - 2022, Intel Corporation. All rights reserved.<BR>
5*e985c628SWarner Losh  (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
6*e985c628SWarner Losh   Copyright (c) 2020, ARM Ltd. All rights reserved.<BR>
7*e985c628SWarner Losh   SPDX-License-Identifier: BSD-2-Clause-Patent
8*e985c628SWarner Losh **/
9*e985c628SWarner Losh 
10*e985c628SWarner Losh #ifndef _ACPI_6_1_H_
11*e985c628SWarner Losh #define _ACPI_6_1_H_
12*e985c628SWarner Losh 
13*e985c628SWarner Losh #include <IndustryStandard/Acpi60.h>
14*e985c628SWarner Losh 
15*e985c628SWarner Losh ///
16*e985c628SWarner Losh /// _PSD Revision for ACPI 6.1
17*e985c628SWarner Losh ///
18*e985c628SWarner Losh #define EFI_ACPI_6_1_AML_PSD_REVISION  0
19*e985c628SWarner Losh 
20*e985c628SWarner Losh ///
21*e985c628SWarner Losh /// _CPC Revision for ACPI 6.1
22*e985c628SWarner Losh ///
23*e985c628SWarner Losh #define EFI_ACPI_6_1_AML_CPC_REVISION  2
24*e985c628SWarner Losh 
25*e985c628SWarner Losh //
26*e985c628SWarner Losh // Ensure proper structure formats
27*e985c628SWarner Losh //
28*e985c628SWarner Losh #pragma pack(1)
29*e985c628SWarner Losh 
30*e985c628SWarner Losh ///
31*e985c628SWarner Losh /// ACPI 6.1 Generic Address Space definition
32*e985c628SWarner Losh ///
33*e985c628SWarner Losh typedef struct {
34*e985c628SWarner Losh   UINT8     AddressSpaceId;
35*e985c628SWarner Losh   UINT8     RegisterBitWidth;
36*e985c628SWarner Losh   UINT8     RegisterBitOffset;
37*e985c628SWarner Losh   UINT8     AccessSize;
38*e985c628SWarner Losh   UINT64    Address;
39*e985c628SWarner Losh } EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE;
40*e985c628SWarner Losh 
41*e985c628SWarner Losh //
42*e985c628SWarner Losh // Generic Address Space Address IDs
43*e985c628SWarner Losh //
44*e985c628SWarner Losh #define EFI_ACPI_6_1_SYSTEM_MEMORY                   0
45*e985c628SWarner Losh #define EFI_ACPI_6_1_SYSTEM_IO                       1
46*e985c628SWarner Losh #define EFI_ACPI_6_1_PCI_CONFIGURATION_SPACE         2
47*e985c628SWarner Losh #define EFI_ACPI_6_1_EMBEDDED_CONTROLLER             3
48*e985c628SWarner Losh #define EFI_ACPI_6_1_SMBUS                           4
49*e985c628SWarner Losh #define EFI_ACPI_6_1_PLATFORM_COMMUNICATION_CHANNEL  0x0A
50*e985c628SWarner Losh #define EFI_ACPI_6_1_FUNCTIONAL_FIXED_HARDWARE       0x7F
51*e985c628SWarner Losh 
52*e985c628SWarner Losh //
53*e985c628SWarner Losh // Generic Address Space Access Sizes
54*e985c628SWarner Losh //
55*e985c628SWarner Losh #define EFI_ACPI_6_1_UNDEFINED  0
56*e985c628SWarner Losh #define EFI_ACPI_6_1_BYTE       1
57*e985c628SWarner Losh #define EFI_ACPI_6_1_WORD       2
58*e985c628SWarner Losh #define EFI_ACPI_6_1_DWORD      3
59*e985c628SWarner Losh #define EFI_ACPI_6_1_QWORD      4
60*e985c628SWarner Losh 
61*e985c628SWarner Losh //
62*e985c628SWarner Losh // ACPI 6.1 table structures
63*e985c628SWarner Losh //
64*e985c628SWarner Losh 
65*e985c628SWarner Losh ///
66*e985c628SWarner Losh /// Root System Description Pointer Structure
67*e985c628SWarner Losh ///
68*e985c628SWarner Losh typedef struct {
69*e985c628SWarner Losh   UINT64    Signature;
70*e985c628SWarner Losh   UINT8     Checksum;
71*e985c628SWarner Losh   UINT8     OemId[6];
72*e985c628SWarner Losh   UINT8     Revision;
73*e985c628SWarner Losh   UINT32    RsdtAddress;
74*e985c628SWarner Losh   UINT32    Length;
75*e985c628SWarner Losh   UINT64    XsdtAddress;
76*e985c628SWarner Losh   UINT8     ExtendedChecksum;
77*e985c628SWarner Losh   UINT8     Reserved[3];
78*e985c628SWarner Losh } EFI_ACPI_6_1_ROOT_SYSTEM_DESCRIPTION_POINTER;
79*e985c628SWarner Losh 
80*e985c628SWarner Losh ///
81*e985c628SWarner Losh /// RSD_PTR Revision (as defined in ACPI 6.1 spec.)
82*e985c628SWarner Losh ///
83*e985c628SWarner Losh #define EFI_ACPI_6_1_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION  0x02 ///< ACPISpec (Revision 6.1) says current value is 2
84*e985c628SWarner Losh 
85*e985c628SWarner Losh ///
86*e985c628SWarner Losh /// Common table header, this prefaces all ACPI tables, including FACS, but
87*e985c628SWarner Losh /// excluding the RSD PTR structure
88*e985c628SWarner Losh ///
89*e985c628SWarner Losh typedef struct {
90*e985c628SWarner Losh   UINT32    Signature;
91*e985c628SWarner Losh   UINT32    Length;
92*e985c628SWarner Losh } EFI_ACPI_6_1_COMMON_HEADER;
93*e985c628SWarner Losh 
94*e985c628SWarner Losh //
95*e985c628SWarner Losh // Root System Description Table
96*e985c628SWarner Losh // No definition needed as it is a common description table header, the same with
97*e985c628SWarner Losh // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
98*e985c628SWarner Losh //
99*e985c628SWarner Losh 
100*e985c628SWarner Losh ///
101*e985c628SWarner Losh /// RSDT Revision (as defined in ACPI 6.1 spec.)
102*e985c628SWarner Losh ///
103*e985c628SWarner Losh #define EFI_ACPI_6_1_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION  0x01
104*e985c628SWarner Losh 
105*e985c628SWarner Losh //
106*e985c628SWarner Losh // Extended System Description Table
107*e985c628SWarner Losh // No definition needed as it is a common description table header, the same with
108*e985c628SWarner Losh // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
109*e985c628SWarner Losh //
110*e985c628SWarner Losh 
111*e985c628SWarner Losh ///
112*e985c628SWarner Losh /// XSDT Revision (as defined in ACPI 6.1 spec.)
113*e985c628SWarner Losh ///
114*e985c628SWarner Losh #define EFI_ACPI_6_1_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION  0x01
115*e985c628SWarner Losh 
116*e985c628SWarner Losh ///
117*e985c628SWarner Losh /// Fixed ACPI Description Table Structure (FADT)
118*e985c628SWarner Losh ///
119*e985c628SWarner Losh typedef struct {
120*e985c628SWarner Losh   EFI_ACPI_DESCRIPTION_HEADER               Header;
121*e985c628SWarner Losh   UINT32                                    FirmwareCtrl;
122*e985c628SWarner Losh   UINT32                                    Dsdt;
123*e985c628SWarner Losh   UINT8                                     Reserved0;
124*e985c628SWarner Losh   UINT8                                     PreferredPmProfile;
125*e985c628SWarner Losh   UINT16                                    SciInt;
126*e985c628SWarner Losh   UINT32                                    SmiCmd;
127*e985c628SWarner Losh   UINT8                                     AcpiEnable;
128*e985c628SWarner Losh   UINT8                                     AcpiDisable;
129*e985c628SWarner Losh   UINT8                                     S4BiosReq;
130*e985c628SWarner Losh   UINT8                                     PstateCnt;
131*e985c628SWarner Losh   UINT32                                    Pm1aEvtBlk;
132*e985c628SWarner Losh   UINT32                                    Pm1bEvtBlk;
133*e985c628SWarner Losh   UINT32                                    Pm1aCntBlk;
134*e985c628SWarner Losh   UINT32                                    Pm1bCntBlk;
135*e985c628SWarner Losh   UINT32                                    Pm2CntBlk;
136*e985c628SWarner Losh   UINT32                                    PmTmrBlk;
137*e985c628SWarner Losh   UINT32                                    Gpe0Blk;
138*e985c628SWarner Losh   UINT32                                    Gpe1Blk;
139*e985c628SWarner Losh   UINT8                                     Pm1EvtLen;
140*e985c628SWarner Losh   UINT8                                     Pm1CntLen;
141*e985c628SWarner Losh   UINT8                                     Pm2CntLen;
142*e985c628SWarner Losh   UINT8                                     PmTmrLen;
143*e985c628SWarner Losh   UINT8                                     Gpe0BlkLen;
144*e985c628SWarner Losh   UINT8                                     Gpe1BlkLen;
145*e985c628SWarner Losh   UINT8                                     Gpe1Base;
146*e985c628SWarner Losh   UINT8                                     CstCnt;
147*e985c628SWarner Losh   UINT16                                    PLvl2Lat;
148*e985c628SWarner Losh   UINT16                                    PLvl3Lat;
149*e985c628SWarner Losh   UINT16                                    FlushSize;
150*e985c628SWarner Losh   UINT16                                    FlushStride;
151*e985c628SWarner Losh   UINT8                                     DutyOffset;
152*e985c628SWarner Losh   UINT8                                     DutyWidth;
153*e985c628SWarner Losh   UINT8                                     DayAlrm;
154*e985c628SWarner Losh   UINT8                                     MonAlrm;
155*e985c628SWarner Losh   UINT8                                     Century;
156*e985c628SWarner Losh   UINT16                                    IaPcBootArch;
157*e985c628SWarner Losh   UINT8                                     Reserved1;
158*e985c628SWarner Losh   UINT32                                    Flags;
159*e985c628SWarner Losh   EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE    ResetReg;
160*e985c628SWarner Losh   UINT8                                     ResetValue;
161*e985c628SWarner Losh   UINT16                                    ArmBootArch;
162*e985c628SWarner Losh   UINT8                                     MinorVersion;
163*e985c628SWarner Losh   UINT64                                    XFirmwareCtrl;
164*e985c628SWarner Losh   UINT64                                    XDsdt;
165*e985c628SWarner Losh   EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE    XPm1aEvtBlk;
166*e985c628SWarner Losh   EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE    XPm1bEvtBlk;
167*e985c628SWarner Losh   EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE    XPm1aCntBlk;
168*e985c628SWarner Losh   EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE    XPm1bCntBlk;
169*e985c628SWarner Losh   EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE    XPm2CntBlk;
170*e985c628SWarner Losh   EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE    XPmTmrBlk;
171*e985c628SWarner Losh   EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE    XGpe0Blk;
172*e985c628SWarner Losh   EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE    XGpe1Blk;
173*e985c628SWarner Losh   EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE    SleepControlReg;
174*e985c628SWarner Losh   EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE    SleepStatusReg;
175*e985c628SWarner Losh   UINT64                                    HypervisorVendorIdentity;
176*e985c628SWarner Losh } EFI_ACPI_6_1_FIXED_ACPI_DESCRIPTION_TABLE;
177*e985c628SWarner Losh 
178*e985c628SWarner Losh ///
179*e985c628SWarner Losh /// FADT Version (as defined in ACPI 6.1 spec.)
180*e985c628SWarner Losh ///
181*e985c628SWarner Losh #define EFI_ACPI_6_1_FIXED_ACPI_DESCRIPTION_TABLE_REVISION        0x06
182*e985c628SWarner Losh #define EFI_ACPI_6_1_FIXED_ACPI_DESCRIPTION_TABLE_MINOR_REVISION  0x01
183*e985c628SWarner Losh 
184*e985c628SWarner Losh //
185*e985c628SWarner Losh // Fixed ACPI Description Table Preferred Power Management Profile
186*e985c628SWarner Losh //
187*e985c628SWarner Losh #define EFI_ACPI_6_1_PM_PROFILE_UNSPECIFIED         0
188*e985c628SWarner Losh #define EFI_ACPI_6_1_PM_PROFILE_DESKTOP             1
189*e985c628SWarner Losh #define EFI_ACPI_6_1_PM_PROFILE_MOBILE              2
190*e985c628SWarner Losh #define EFI_ACPI_6_1_PM_PROFILE_WORKSTATION         3
191*e985c628SWarner Losh #define EFI_ACPI_6_1_PM_PROFILE_ENTERPRISE_SERVER   4
192*e985c628SWarner Losh #define EFI_ACPI_6_1_PM_PROFILE_SOHO_SERVER         5
193*e985c628SWarner Losh #define EFI_ACPI_6_1_PM_PROFILE_APPLIANCE_PC        6
194*e985c628SWarner Losh #define EFI_ACPI_6_1_PM_PROFILE_PERFORMANCE_SERVER  7
195*e985c628SWarner Losh #define EFI_ACPI_6_1_PM_PROFILE_TABLET              8
196*e985c628SWarner Losh 
197*e985c628SWarner Losh //
198*e985c628SWarner Losh // Fixed ACPI Description Table Boot Architecture Flags
199*e985c628SWarner Losh // All other bits are reserved and must be set to 0.
200*e985c628SWarner Losh //
201*e985c628SWarner Losh #define EFI_ACPI_6_1_LEGACY_DEVICES        BIT0
202*e985c628SWarner Losh #define EFI_ACPI_6_1_8042                  BIT1
203*e985c628SWarner Losh #define EFI_ACPI_6_1_VGA_NOT_PRESENT       BIT2
204*e985c628SWarner Losh #define EFI_ACPI_6_1_MSI_NOT_SUPPORTED     BIT3
205*e985c628SWarner Losh #define EFI_ACPI_6_1_PCIE_ASPM_CONTROLS    BIT4
206*e985c628SWarner Losh #define EFI_ACPI_6_1_CMOS_RTC_NOT_PRESENT  BIT5
207*e985c628SWarner Losh 
208*e985c628SWarner Losh //
209*e985c628SWarner Losh // Fixed ACPI Description Table Arm Boot Architecture Flags
210*e985c628SWarner Losh // All other bits are reserved and must be set to 0.
211*e985c628SWarner Losh //
212*e985c628SWarner Losh #define EFI_ACPI_6_1_ARM_PSCI_COMPLIANT  BIT0
213*e985c628SWarner Losh #define EFI_ACPI_6_1_ARM_PSCI_USE_HVC    BIT1
214*e985c628SWarner Losh 
215*e985c628SWarner Losh //
216*e985c628SWarner Losh // Fixed ACPI Description Table Fixed Feature Flags
217*e985c628SWarner Losh // All other bits are reserved and must be set to 0.
218*e985c628SWarner Losh //
219*e985c628SWarner Losh #define EFI_ACPI_6_1_WBINVD                                BIT0
220*e985c628SWarner Losh #define EFI_ACPI_6_1_WBINVD_FLUSH                          BIT1
221*e985c628SWarner Losh #define EFI_ACPI_6_1_PROC_C1                               BIT2
222*e985c628SWarner Losh #define EFI_ACPI_6_1_P_LVL2_UP                             BIT3
223*e985c628SWarner Losh #define EFI_ACPI_6_1_PWR_BUTTON                            BIT4
224*e985c628SWarner Losh #define EFI_ACPI_6_1_SLP_BUTTON                            BIT5
225*e985c628SWarner Losh #define EFI_ACPI_6_1_FIX_RTC                               BIT6
226*e985c628SWarner Losh #define EFI_ACPI_6_1_RTC_S4                                BIT7
227*e985c628SWarner Losh #define EFI_ACPI_6_1_TMR_VAL_EXT                           BIT8
228*e985c628SWarner Losh #define EFI_ACPI_6_1_DCK_CAP                               BIT9
229*e985c628SWarner Losh #define EFI_ACPI_6_1_RESET_REG_SUP                         BIT10
230*e985c628SWarner Losh #define EFI_ACPI_6_1_SEALED_CASE                           BIT11
231*e985c628SWarner Losh #define EFI_ACPI_6_1_HEADLESS                              BIT12
232*e985c628SWarner Losh #define EFI_ACPI_6_1_CPU_SW_SLP                            BIT13
233*e985c628SWarner Losh #define EFI_ACPI_6_1_PCI_EXP_WAK                           BIT14
234*e985c628SWarner Losh #define EFI_ACPI_6_1_USE_PLATFORM_CLOCK                    BIT15
235*e985c628SWarner Losh #define EFI_ACPI_6_1_S4_RTC_STS_VALID                      BIT16
236*e985c628SWarner Losh #define EFI_ACPI_6_1_REMOTE_POWER_ON_CAPABLE               BIT17
237*e985c628SWarner Losh #define EFI_ACPI_6_1_FORCE_APIC_CLUSTER_MODEL              BIT18
238*e985c628SWarner Losh #define EFI_ACPI_6_1_FORCE_APIC_PHYSICAL_DESTINATION_MODE  BIT19
239*e985c628SWarner Losh #define EFI_ACPI_6_1_HW_REDUCED_ACPI                       BIT20
240*e985c628SWarner Losh #define EFI_ACPI_6_1_LOW_POWER_S0_IDLE_CAPABLE             BIT21
241*e985c628SWarner Losh 
242*e985c628SWarner Losh ///
243*e985c628SWarner Losh /// Firmware ACPI Control Structure
244*e985c628SWarner Losh ///
245*e985c628SWarner Losh typedef struct {
246*e985c628SWarner Losh   UINT32    Signature;
247*e985c628SWarner Losh   UINT32    Length;
248*e985c628SWarner Losh   UINT32    HardwareSignature;
249*e985c628SWarner Losh   UINT32    FirmwareWakingVector;
250*e985c628SWarner Losh   UINT32    GlobalLock;
251*e985c628SWarner Losh   UINT32    Flags;
252*e985c628SWarner Losh   UINT64    XFirmwareWakingVector;
253*e985c628SWarner Losh   UINT8     Version;
254*e985c628SWarner Losh   UINT8     Reserved0[3];
255*e985c628SWarner Losh   UINT32    OspmFlags;
256*e985c628SWarner Losh   UINT8     Reserved1[24];
257*e985c628SWarner Losh } EFI_ACPI_6_1_FIRMWARE_ACPI_CONTROL_STRUCTURE;
258*e985c628SWarner Losh 
259*e985c628SWarner Losh ///
260*e985c628SWarner Losh /// FACS Version (as defined in ACPI 6.1 spec.)
261*e985c628SWarner Losh ///
262*e985c628SWarner Losh #define EFI_ACPI_6_1_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION  0x02
263*e985c628SWarner Losh 
264*e985c628SWarner Losh ///
265*e985c628SWarner Losh /// Firmware Control Structure Feature Flags
266*e985c628SWarner Losh /// All other bits are reserved and must be set to 0.
267*e985c628SWarner Losh ///
268*e985c628SWarner Losh #define EFI_ACPI_6_1_S4BIOS_F                BIT0
269*e985c628SWarner Losh #define EFI_ACPI_6_1_64BIT_WAKE_SUPPORTED_F  BIT1
270*e985c628SWarner Losh 
271*e985c628SWarner Losh ///
272*e985c628SWarner Losh /// OSPM Enabled Firmware Control Structure Flags
273*e985c628SWarner Losh /// All other bits are reserved and must be set to 0.
274*e985c628SWarner Losh ///
275*e985c628SWarner Losh #define EFI_ACPI_6_1_OSPM_64BIT_WAKE_F  BIT0
276*e985c628SWarner Losh 
277*e985c628SWarner Losh //
278*e985c628SWarner Losh // Differentiated System Description Table,
279*e985c628SWarner Losh // Secondary System Description Table
280*e985c628SWarner Losh // and Persistent System Description Table,
281*e985c628SWarner Losh // no definition needed as they are common description table header, the same with
282*e985c628SWarner Losh // EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block.
283*e985c628SWarner Losh //
284*e985c628SWarner Losh #define EFI_ACPI_6_1_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION  0x02
285*e985c628SWarner Losh #define EFI_ACPI_6_1_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION       0x02
286*e985c628SWarner Losh 
287*e985c628SWarner Losh ///
288*e985c628SWarner Losh /// Multiple APIC Description Table header definition.  The rest of the table
289*e985c628SWarner Losh /// must be defined in a platform specific manner.
290*e985c628SWarner Losh ///
291*e985c628SWarner Losh typedef struct {
292*e985c628SWarner Losh   EFI_ACPI_DESCRIPTION_HEADER    Header;
293*e985c628SWarner Losh   UINT32                         LocalApicAddress;
294*e985c628SWarner Losh   UINT32                         Flags;
295*e985c628SWarner Losh } EFI_ACPI_6_1_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
296*e985c628SWarner Losh 
297*e985c628SWarner Losh ///
298*e985c628SWarner Losh /// MADT Revision (as defined in ACPI 6.1 spec.)
299*e985c628SWarner Losh ///
300*e985c628SWarner Losh #define EFI_ACPI_6_1_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION  0x04
301*e985c628SWarner Losh 
302*e985c628SWarner Losh ///
303*e985c628SWarner Losh /// Multiple APIC Flags
304*e985c628SWarner Losh /// All other bits are reserved and must be set to 0.
305*e985c628SWarner Losh ///
306*e985c628SWarner Losh #define EFI_ACPI_6_1_PCAT_COMPAT  BIT0
307*e985c628SWarner Losh 
308*e985c628SWarner Losh //
309*e985c628SWarner Losh // Multiple APIC Description Table APIC structure types
310*e985c628SWarner Losh // All other values between 0x0D and 0x7F are reserved and
311*e985c628SWarner Losh // will be ignored by OSPM. 0x80 ~ 0xFF are reserved for OEM.
312*e985c628SWarner Losh //
313*e985c628SWarner Losh #define EFI_ACPI_6_1_PROCESSOR_LOCAL_APIC           0x00
314*e985c628SWarner Losh #define EFI_ACPI_6_1_IO_APIC                        0x01
315*e985c628SWarner Losh #define EFI_ACPI_6_1_INTERRUPT_SOURCE_OVERRIDE      0x02
316*e985c628SWarner Losh #define EFI_ACPI_6_1_NON_MASKABLE_INTERRUPT_SOURCE  0x03
317*e985c628SWarner Losh #define EFI_ACPI_6_1_LOCAL_APIC_NMI                 0x04
318*e985c628SWarner Losh #define EFI_ACPI_6_1_LOCAL_APIC_ADDRESS_OVERRIDE    0x05
319*e985c628SWarner Losh #define EFI_ACPI_6_1_IO_SAPIC                       0x06
320*e985c628SWarner Losh #define EFI_ACPI_6_1_LOCAL_SAPIC                    0x07
321*e985c628SWarner Losh #define EFI_ACPI_6_1_PLATFORM_INTERRUPT_SOURCES     0x08
322*e985c628SWarner Losh #define EFI_ACPI_6_1_PROCESSOR_LOCAL_X2APIC         0x09
323*e985c628SWarner Losh #define EFI_ACPI_6_1_LOCAL_X2APIC_NMI               0x0A
324*e985c628SWarner Losh #define EFI_ACPI_6_1_GIC                            0x0B
325*e985c628SWarner Losh #define EFI_ACPI_6_1_GICD                           0x0C
326*e985c628SWarner Losh #define EFI_ACPI_6_1_GIC_MSI_FRAME                  0x0D
327*e985c628SWarner Losh #define EFI_ACPI_6_1_GICR                           0x0E
328*e985c628SWarner Losh #define EFI_ACPI_6_1_GIC_ITS                        0x0F
329*e985c628SWarner Losh 
330*e985c628SWarner Losh //
331*e985c628SWarner Losh // APIC Structure Definitions
332*e985c628SWarner Losh //
333*e985c628SWarner Losh 
334*e985c628SWarner Losh ///
335*e985c628SWarner Losh /// Processor Local APIC Structure Definition
336*e985c628SWarner Losh ///
337*e985c628SWarner Losh typedef struct {
338*e985c628SWarner Losh   UINT8     Type;
339*e985c628SWarner Losh   UINT8     Length;
340*e985c628SWarner Losh   UINT8     AcpiProcessorUid;
341*e985c628SWarner Losh   UINT8     ApicId;
342*e985c628SWarner Losh   UINT32    Flags;
343*e985c628SWarner Losh } EFI_ACPI_6_1_PROCESSOR_LOCAL_APIC_STRUCTURE;
344*e985c628SWarner Losh 
345*e985c628SWarner Losh ///
346*e985c628SWarner Losh /// Local APIC Flags.  All other bits are reserved and must be 0.
347*e985c628SWarner Losh ///
348*e985c628SWarner Losh #define EFI_ACPI_6_1_LOCAL_APIC_ENABLED  BIT0
349*e985c628SWarner Losh 
350*e985c628SWarner Losh ///
351*e985c628SWarner Losh /// IO APIC Structure
352*e985c628SWarner Losh ///
353*e985c628SWarner Losh typedef struct {
354*e985c628SWarner Losh   UINT8     Type;
355*e985c628SWarner Losh   UINT8     Length;
356*e985c628SWarner Losh   UINT8     IoApicId;
357*e985c628SWarner Losh   UINT8     Reserved;
358*e985c628SWarner Losh   UINT32    IoApicAddress;
359*e985c628SWarner Losh   UINT32    GlobalSystemInterruptBase;
360*e985c628SWarner Losh } EFI_ACPI_6_1_IO_APIC_STRUCTURE;
361*e985c628SWarner Losh 
362*e985c628SWarner Losh ///
363*e985c628SWarner Losh /// Interrupt Source Override Structure
364*e985c628SWarner Losh ///
365*e985c628SWarner Losh typedef struct {
366*e985c628SWarner Losh   UINT8     Type;
367*e985c628SWarner Losh   UINT8     Length;
368*e985c628SWarner Losh   UINT8     Bus;
369*e985c628SWarner Losh   UINT8     Source;
370*e985c628SWarner Losh   UINT32    GlobalSystemInterrupt;
371*e985c628SWarner Losh   UINT16    Flags;
372*e985c628SWarner Losh } EFI_ACPI_6_1_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
373*e985c628SWarner Losh 
374*e985c628SWarner Losh ///
375*e985c628SWarner Losh /// Platform Interrupt Sources Structure Definition
376*e985c628SWarner Losh ///
377*e985c628SWarner Losh typedef struct {
378*e985c628SWarner Losh   UINT8     Type;
379*e985c628SWarner Losh   UINT8     Length;
380*e985c628SWarner Losh   UINT16    Flags;
381*e985c628SWarner Losh   UINT8     InterruptType;
382*e985c628SWarner Losh   UINT8     ProcessorId;
383*e985c628SWarner Losh   UINT8     ProcessorEid;
384*e985c628SWarner Losh   UINT8     IoSapicVector;
385*e985c628SWarner Losh   UINT32    GlobalSystemInterrupt;
386*e985c628SWarner Losh   UINT32    PlatformInterruptSourceFlags;
387*e985c628SWarner Losh   UINT8     CpeiProcessorOverride;
388*e985c628SWarner Losh   UINT8     Reserved[31];
389*e985c628SWarner Losh } EFI_ACPI_6_1_PLATFORM_INTERRUPT_APIC_STRUCTURE;
390*e985c628SWarner Losh 
391*e985c628SWarner Losh //
392*e985c628SWarner Losh // MPS INTI flags.
393*e985c628SWarner Losh // All other bits are reserved and must be set to 0.
394*e985c628SWarner Losh //
395*e985c628SWarner Losh #define EFI_ACPI_6_1_POLARITY      (3 << 0)
396*e985c628SWarner Losh #define EFI_ACPI_6_1_TRIGGER_MODE  (3 << 2)
397*e985c628SWarner Losh 
398*e985c628SWarner Losh ///
399*e985c628SWarner Losh /// Non-Maskable Interrupt Source Structure
400*e985c628SWarner Losh ///
401*e985c628SWarner Losh typedef struct {
402*e985c628SWarner Losh   UINT8     Type;
403*e985c628SWarner Losh   UINT8     Length;
404*e985c628SWarner Losh   UINT16    Flags;
405*e985c628SWarner Losh   UINT32    GlobalSystemInterrupt;
406*e985c628SWarner Losh } EFI_ACPI_6_1_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
407*e985c628SWarner Losh 
408*e985c628SWarner Losh ///
409*e985c628SWarner Losh /// Local APIC NMI Structure
410*e985c628SWarner Losh ///
411*e985c628SWarner Losh typedef struct {
412*e985c628SWarner Losh   UINT8     Type;
413*e985c628SWarner Losh   UINT8     Length;
414*e985c628SWarner Losh   UINT8     AcpiProcessorUid;
415*e985c628SWarner Losh   UINT16    Flags;
416*e985c628SWarner Losh   UINT8     LocalApicLint;
417*e985c628SWarner Losh } EFI_ACPI_6_1_LOCAL_APIC_NMI_STRUCTURE;
418*e985c628SWarner Losh 
419*e985c628SWarner Losh ///
420*e985c628SWarner Losh /// Local APIC Address Override Structure
421*e985c628SWarner Losh ///
422*e985c628SWarner Losh typedef struct {
423*e985c628SWarner Losh   UINT8     Type;
424*e985c628SWarner Losh   UINT8     Length;
425*e985c628SWarner Losh   UINT16    Reserved;
426*e985c628SWarner Losh   UINT64    LocalApicAddress;
427*e985c628SWarner Losh } EFI_ACPI_6_1_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE;
428*e985c628SWarner Losh 
429*e985c628SWarner Losh ///
430*e985c628SWarner Losh /// IO SAPIC Structure
431*e985c628SWarner Losh ///
432*e985c628SWarner Losh typedef struct {
433*e985c628SWarner Losh   UINT8     Type;
434*e985c628SWarner Losh   UINT8     Length;
435*e985c628SWarner Losh   UINT8     IoApicId;
436*e985c628SWarner Losh   UINT8     Reserved;
437*e985c628SWarner Losh   UINT32    GlobalSystemInterruptBase;
438*e985c628SWarner Losh   UINT64    IoSapicAddress;
439*e985c628SWarner Losh } EFI_ACPI_6_1_IO_SAPIC_STRUCTURE;
440*e985c628SWarner Losh 
441*e985c628SWarner Losh ///
442*e985c628SWarner Losh /// Local SAPIC Structure
443*e985c628SWarner Losh /// This struct followed by a null-terminated ASCII string - ACPI Processor UID String
444*e985c628SWarner Losh ///
445*e985c628SWarner Losh typedef struct {
446*e985c628SWarner Losh   UINT8     Type;
447*e985c628SWarner Losh   UINT8     Length;
448*e985c628SWarner Losh   UINT8     AcpiProcessorId;
449*e985c628SWarner Losh   UINT8     LocalSapicId;
450*e985c628SWarner Losh   UINT8     LocalSapicEid;
451*e985c628SWarner Losh   UINT8     Reserved[3];
452*e985c628SWarner Losh   UINT32    Flags;
453*e985c628SWarner Losh   UINT32    ACPIProcessorUIDValue;
454*e985c628SWarner Losh } EFI_ACPI_6_1_PROCESSOR_LOCAL_SAPIC_STRUCTURE;
455*e985c628SWarner Losh 
456*e985c628SWarner Losh ///
457*e985c628SWarner Losh /// Platform Interrupt Sources Structure
458*e985c628SWarner Losh ///
459*e985c628SWarner Losh typedef struct {
460*e985c628SWarner Losh   UINT8     Type;
461*e985c628SWarner Losh   UINT8     Length;
462*e985c628SWarner Losh   UINT16    Flags;
463*e985c628SWarner Losh   UINT8     InterruptType;
464*e985c628SWarner Losh   UINT8     ProcessorId;
465*e985c628SWarner Losh   UINT8     ProcessorEid;
466*e985c628SWarner Losh   UINT8     IoSapicVector;
467*e985c628SWarner Losh   UINT32    GlobalSystemInterrupt;
468*e985c628SWarner Losh   UINT32    PlatformInterruptSourceFlags;
469*e985c628SWarner Losh } EFI_ACPI_6_1_PLATFORM_INTERRUPT_SOURCES_STRUCTURE;
470*e985c628SWarner Losh 
471*e985c628SWarner Losh ///
472*e985c628SWarner Losh /// Platform Interrupt Source Flags.
473*e985c628SWarner Losh /// All other bits are reserved and must be set to 0.
474*e985c628SWarner Losh ///
475*e985c628SWarner Losh #define EFI_ACPI_6_1_CPEI_PROCESSOR_OVERRIDE  BIT0
476*e985c628SWarner Losh 
477*e985c628SWarner Losh ///
478*e985c628SWarner Losh /// Processor Local x2APIC Structure Definition
479*e985c628SWarner Losh ///
480*e985c628SWarner Losh typedef struct {
481*e985c628SWarner Losh   UINT8     Type;
482*e985c628SWarner Losh   UINT8     Length;
483*e985c628SWarner Losh   UINT8     Reserved[2];
484*e985c628SWarner Losh   UINT32    X2ApicId;
485*e985c628SWarner Losh   UINT32    Flags;
486*e985c628SWarner Losh   UINT32    AcpiProcessorUid;
487*e985c628SWarner Losh } EFI_ACPI_6_1_PROCESSOR_LOCAL_X2APIC_STRUCTURE;
488*e985c628SWarner Losh 
489*e985c628SWarner Losh ///
490*e985c628SWarner Losh /// Local x2APIC NMI Structure
491*e985c628SWarner Losh ///
492*e985c628SWarner Losh typedef struct {
493*e985c628SWarner Losh   UINT8     Type;
494*e985c628SWarner Losh   UINT8     Length;
495*e985c628SWarner Losh   UINT16    Flags;
496*e985c628SWarner Losh   UINT32    AcpiProcessorUid;
497*e985c628SWarner Losh   UINT8     LocalX2ApicLint;
498*e985c628SWarner Losh   UINT8     Reserved[3];
499*e985c628SWarner Losh } EFI_ACPI_6_1_LOCAL_X2APIC_NMI_STRUCTURE;
500*e985c628SWarner Losh 
501*e985c628SWarner Losh ///
502*e985c628SWarner Losh /// GIC Structure
503*e985c628SWarner Losh ///
504*e985c628SWarner Losh typedef struct {
505*e985c628SWarner Losh   UINT8     Type;
506*e985c628SWarner Losh   UINT8     Length;
507*e985c628SWarner Losh   UINT16    Reserved;
508*e985c628SWarner Losh   UINT32    CPUInterfaceNumber;
509*e985c628SWarner Losh   UINT32    AcpiProcessorUid;
510*e985c628SWarner Losh   UINT32    Flags;
511*e985c628SWarner Losh   UINT32    ParkingProtocolVersion;
512*e985c628SWarner Losh   UINT32    PerformanceInterruptGsiv;
513*e985c628SWarner Losh   UINT64    ParkedAddress;
514*e985c628SWarner Losh   UINT64    PhysicalBaseAddress;
515*e985c628SWarner Losh   UINT64    GICV;
516*e985c628SWarner Losh   UINT64    GICH;
517*e985c628SWarner Losh   UINT32    VGICMaintenanceInterrupt;
518*e985c628SWarner Losh   UINT64    GICRBaseAddress;
519*e985c628SWarner Losh   UINT64    MPIDR;
520*e985c628SWarner Losh   UINT8     ProcessorPowerEfficiencyClass;
521*e985c628SWarner Losh   UINT8     Reserved2[3];
522*e985c628SWarner Losh } EFI_ACPI_6_1_GIC_STRUCTURE;
523*e985c628SWarner Losh 
524*e985c628SWarner Losh ///
525*e985c628SWarner Losh /// GIC Flags.  All other bits are reserved and must be 0.
526*e985c628SWarner Losh ///
527*e985c628SWarner Losh #define EFI_ACPI_6_1_GIC_ENABLED                            BIT0
528*e985c628SWarner Losh #define EFI_ACPI_6_1_PERFORMANCE_INTERRUPT_MODEL            BIT1
529*e985c628SWarner Losh #define EFI_ACPI_6_1_VGIC_MAINTENANCE_INTERRUPT_MODE_FLAGS  BIT2
530*e985c628SWarner Losh 
531*e985c628SWarner Losh ///
532*e985c628SWarner Losh /// GIC Distributor Structure
533*e985c628SWarner Losh ///
534*e985c628SWarner Losh typedef struct {
535*e985c628SWarner Losh   UINT8     Type;
536*e985c628SWarner Losh   UINT8     Length;
537*e985c628SWarner Losh   UINT16    Reserved1;
538*e985c628SWarner Losh   UINT32    GicId;
539*e985c628SWarner Losh   UINT64    PhysicalBaseAddress;
540*e985c628SWarner Losh   UINT32    SystemVectorBase;
541*e985c628SWarner Losh   UINT8     GicVersion;
542*e985c628SWarner Losh   UINT8     Reserved2[3];
543*e985c628SWarner Losh } EFI_ACPI_6_1_GIC_DISTRIBUTOR_STRUCTURE;
544*e985c628SWarner Losh 
545*e985c628SWarner Losh ///
546*e985c628SWarner Losh /// GIC Version
547*e985c628SWarner Losh ///
548*e985c628SWarner Losh #define EFI_ACPI_6_1_GIC_V1  0x01
549*e985c628SWarner Losh #define EFI_ACPI_6_1_GIC_V2  0x02
550*e985c628SWarner Losh #define EFI_ACPI_6_1_GIC_V3  0x03
551*e985c628SWarner Losh #define EFI_ACPI_6_1_GIC_V4  0x04
552*e985c628SWarner Losh 
553*e985c628SWarner Losh ///
554*e985c628SWarner Losh /// GIC MSI Frame Structure
555*e985c628SWarner Losh ///
556*e985c628SWarner Losh typedef struct {
557*e985c628SWarner Losh   UINT8     Type;
558*e985c628SWarner Losh   UINT8     Length;
559*e985c628SWarner Losh   UINT16    Reserved1;
560*e985c628SWarner Losh   UINT32    GicMsiFrameId;
561*e985c628SWarner Losh   UINT64    PhysicalBaseAddress;
562*e985c628SWarner Losh   UINT32    Flags;
563*e985c628SWarner Losh   UINT16    SPICount;
564*e985c628SWarner Losh   UINT16    SPIBase;
565*e985c628SWarner Losh } EFI_ACPI_6_1_GIC_MSI_FRAME_STRUCTURE;
566*e985c628SWarner Losh 
567*e985c628SWarner Losh ///
568*e985c628SWarner Losh /// GIC MSI Frame Flags.  All other bits are reserved and must be 0.
569*e985c628SWarner Losh ///
570*e985c628SWarner Losh #define EFI_ACPI_6_1_SPI_COUNT_BASE_SELECT  BIT0
571*e985c628SWarner Losh 
572*e985c628SWarner Losh ///
573*e985c628SWarner Losh /// GICR Structure
574*e985c628SWarner Losh ///
575*e985c628SWarner Losh typedef struct {
576*e985c628SWarner Losh   UINT8     Type;
577*e985c628SWarner Losh   UINT8     Length;
578*e985c628SWarner Losh   UINT16    Reserved;
579*e985c628SWarner Losh   UINT64    DiscoveryRangeBaseAddress;
580*e985c628SWarner Losh   UINT32    DiscoveryRangeLength;
581*e985c628SWarner Losh } EFI_ACPI_6_1_GICR_STRUCTURE;
582*e985c628SWarner Losh 
583*e985c628SWarner Losh ///
584*e985c628SWarner Losh /// GIC Interrupt Translation Service Structure
585*e985c628SWarner Losh ///
586*e985c628SWarner Losh typedef struct {
587*e985c628SWarner Losh   UINT8     Type;
588*e985c628SWarner Losh   UINT8     Length;
589*e985c628SWarner Losh   UINT16    Reserved;
590*e985c628SWarner Losh   UINT32    GicItsId;
591*e985c628SWarner Losh   UINT64    PhysicalBaseAddress;
592*e985c628SWarner Losh   UINT32    Reserved2;
593*e985c628SWarner Losh } EFI_ACPI_6_1_GIC_ITS_STRUCTURE;
594*e985c628SWarner Losh 
595*e985c628SWarner Losh ///
596*e985c628SWarner Losh /// Smart Battery Description Table (SBST)
597*e985c628SWarner Losh ///
598*e985c628SWarner Losh typedef struct {
599*e985c628SWarner Losh   EFI_ACPI_DESCRIPTION_HEADER    Header;
600*e985c628SWarner Losh   UINT32                         WarningEnergyLevel;
601*e985c628SWarner Losh   UINT32                         LowEnergyLevel;
602*e985c628SWarner Losh   UINT32                         CriticalEnergyLevel;
603*e985c628SWarner Losh } EFI_ACPI_6_1_SMART_BATTERY_DESCRIPTION_TABLE;
604*e985c628SWarner Losh 
605*e985c628SWarner Losh ///
606*e985c628SWarner Losh /// SBST Version (as defined in ACPI 6.1 spec.)
607*e985c628SWarner Losh ///
608*e985c628SWarner Losh #define EFI_ACPI_6_1_SMART_BATTERY_DESCRIPTION_TABLE_REVISION  0x01
609*e985c628SWarner Losh 
610*e985c628SWarner Losh ///
611*e985c628SWarner Losh /// Embedded Controller Boot Resources Table (ECDT)
612*e985c628SWarner Losh /// The table is followed by a null terminated ASCII string that contains
613*e985c628SWarner Losh /// a fully qualified reference to the name space object.
614*e985c628SWarner Losh ///
615*e985c628SWarner Losh typedef struct {
616*e985c628SWarner Losh   EFI_ACPI_DESCRIPTION_HEADER               Header;
617*e985c628SWarner Losh   EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE    EcControl;
618*e985c628SWarner Losh   EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE    EcData;
619*e985c628SWarner Losh   UINT32                                    Uid;
620*e985c628SWarner Losh   UINT8                                     GpeBit;
621*e985c628SWarner Losh } EFI_ACPI_6_1_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE;
622*e985c628SWarner Losh 
623*e985c628SWarner Losh ///
624*e985c628SWarner Losh /// ECDT Version (as defined in ACPI 6.1 spec.)
625*e985c628SWarner Losh ///
626*e985c628SWarner Losh #define EFI_ACPI_6_1_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION  0x01
627*e985c628SWarner Losh 
628*e985c628SWarner Losh ///
629*e985c628SWarner Losh /// System Resource Affinity Table (SRAT).  The rest of the table
630*e985c628SWarner Losh /// must be defined in a platform specific manner.
631*e985c628SWarner Losh ///
632*e985c628SWarner Losh typedef struct {
633*e985c628SWarner Losh   EFI_ACPI_DESCRIPTION_HEADER    Header;
634*e985c628SWarner Losh   UINT32                         Reserved1; ///< Must be set to 1
635*e985c628SWarner Losh   UINT64                         Reserved2;
636*e985c628SWarner Losh } EFI_ACPI_6_1_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER;
637*e985c628SWarner Losh 
638*e985c628SWarner Losh ///
639*e985c628SWarner Losh /// SRAT Version (as defined in ACPI 6.1 spec.)
640*e985c628SWarner Losh ///
641*e985c628SWarner Losh #define EFI_ACPI_6_1_SYSTEM_RESOURCE_AFFINITY_TABLE_REVISION  0x03
642*e985c628SWarner Losh 
643*e985c628SWarner Losh //
644*e985c628SWarner Losh // SRAT structure types.
645*e985c628SWarner Losh // All other values between 0x04 an 0xFF are reserved and
646*e985c628SWarner Losh // will be ignored by OSPM.
647*e985c628SWarner Losh //
648*e985c628SWarner Losh #define EFI_ACPI_6_1_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY  0x00
649*e985c628SWarner Losh #define EFI_ACPI_6_1_MEMORY_AFFINITY                      0x01
650*e985c628SWarner Losh #define EFI_ACPI_6_1_PROCESSOR_LOCAL_X2APIC_AFFINITY      0x02
651*e985c628SWarner Losh #define EFI_ACPI_6_1_GICC_AFFINITY                        0x03
652*e985c628SWarner Losh 
653*e985c628SWarner Losh ///
654*e985c628SWarner Losh /// Processor Local APIC/SAPIC Affinity Structure Definition
655*e985c628SWarner Losh ///
656*e985c628SWarner Losh typedef struct {
657*e985c628SWarner Losh   UINT8     Type;
658*e985c628SWarner Losh   UINT8     Length;
659*e985c628SWarner Losh   UINT8     ProximityDomain7To0;
660*e985c628SWarner Losh   UINT8     ApicId;
661*e985c628SWarner Losh   UINT32    Flags;
662*e985c628SWarner Losh   UINT8     LocalSapicEid;
663*e985c628SWarner Losh   UINT8     ProximityDomain31To8[3];
664*e985c628SWarner Losh   UINT32    ClockDomain;
665*e985c628SWarner Losh } EFI_ACPI_6_1_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE;
666*e985c628SWarner Losh 
667*e985c628SWarner Losh ///
668*e985c628SWarner Losh /// Local APIC/SAPIC Flags.  All other bits are reserved and must be 0.
669*e985c628SWarner Losh ///
670*e985c628SWarner Losh #define EFI_ACPI_6_1_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED  (1 << 0)
671*e985c628SWarner Losh 
672*e985c628SWarner Losh ///
673*e985c628SWarner Losh /// Memory Affinity Structure Definition
674*e985c628SWarner Losh ///
675*e985c628SWarner Losh typedef struct {
676*e985c628SWarner Losh   UINT8     Type;
677*e985c628SWarner Losh   UINT8     Length;
678*e985c628SWarner Losh   UINT32    ProximityDomain;
679*e985c628SWarner Losh   UINT16    Reserved1;
680*e985c628SWarner Losh   UINT32    AddressBaseLow;
681*e985c628SWarner Losh   UINT32    AddressBaseHigh;
682*e985c628SWarner Losh   UINT32    LengthLow;
683*e985c628SWarner Losh   UINT32    LengthHigh;
684*e985c628SWarner Losh   UINT32    Reserved2;
685*e985c628SWarner Losh   UINT32    Flags;
686*e985c628SWarner Losh   UINT64    Reserved3;
687*e985c628SWarner Losh } EFI_ACPI_6_1_MEMORY_AFFINITY_STRUCTURE;
688*e985c628SWarner Losh 
689*e985c628SWarner Losh //
690*e985c628SWarner Losh // Memory Flags.  All other bits are reserved and must be 0.
691*e985c628SWarner Losh //
692*e985c628SWarner Losh #define EFI_ACPI_6_1_MEMORY_ENABLED        (1 << 0)
693*e985c628SWarner Losh #define EFI_ACPI_6_1_MEMORY_HOT_PLUGGABLE  (1 << 1)
694*e985c628SWarner Losh #define EFI_ACPI_6_1_MEMORY_NONVOLATILE    (1 << 2)
695*e985c628SWarner Losh 
696*e985c628SWarner Losh ///
697*e985c628SWarner Losh /// Processor Local x2APIC Affinity Structure Definition
698*e985c628SWarner Losh ///
699*e985c628SWarner Losh typedef struct {
700*e985c628SWarner Losh   UINT8     Type;
701*e985c628SWarner Losh   UINT8     Length;
702*e985c628SWarner Losh   UINT8     Reserved1[2];
703*e985c628SWarner Losh   UINT32    ProximityDomain;
704*e985c628SWarner Losh   UINT32    X2ApicId;
705*e985c628SWarner Losh   UINT32    Flags;
706*e985c628SWarner Losh   UINT32    ClockDomain;
707*e985c628SWarner Losh   UINT8     Reserved2[4];
708*e985c628SWarner Losh } EFI_ACPI_6_1_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE;
709*e985c628SWarner Losh 
710*e985c628SWarner Losh ///
711*e985c628SWarner Losh /// GICC Affinity Structure Definition
712*e985c628SWarner Losh ///
713*e985c628SWarner Losh typedef struct {
714*e985c628SWarner Losh   UINT8     Type;
715*e985c628SWarner Losh   UINT8     Length;
716*e985c628SWarner Losh   UINT32    ProximityDomain;
717*e985c628SWarner Losh   UINT32    AcpiProcessorUid;
718*e985c628SWarner Losh   UINT32    Flags;
719*e985c628SWarner Losh   UINT32    ClockDomain;
720*e985c628SWarner Losh } EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE;
721*e985c628SWarner Losh 
722*e985c628SWarner Losh ///
723*e985c628SWarner Losh /// GICC Flags.  All other bits are reserved and must be 0.
724*e985c628SWarner Losh ///
725*e985c628SWarner Losh #define EFI_ACPI_6_1_GICC_ENABLED  (1 << 0)
726*e985c628SWarner Losh 
727*e985c628SWarner Losh ///
728*e985c628SWarner Losh /// System Locality Distance Information Table (SLIT).
729*e985c628SWarner Losh /// The rest of the table is a matrix.
730*e985c628SWarner Losh ///
731*e985c628SWarner Losh typedef struct {
732*e985c628SWarner Losh   EFI_ACPI_DESCRIPTION_HEADER    Header;
733*e985c628SWarner Losh   UINT64                         NumberOfSystemLocalities;
734*e985c628SWarner Losh } EFI_ACPI_6_1_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER;
735*e985c628SWarner Losh 
736*e985c628SWarner Losh ///
737*e985c628SWarner Losh /// SLIT Version (as defined in ACPI 6.1 spec.)
738*e985c628SWarner Losh ///
739*e985c628SWarner Losh #define EFI_ACPI_6_1_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_REVISION  0x01
740*e985c628SWarner Losh 
741*e985c628SWarner Losh ///
742*e985c628SWarner Losh /// Corrected Platform Error Polling Table (CPEP)
743*e985c628SWarner Losh ///
744*e985c628SWarner Losh typedef struct {
745*e985c628SWarner Losh   EFI_ACPI_DESCRIPTION_HEADER    Header;
746*e985c628SWarner Losh   UINT8                          Reserved[8];
747*e985c628SWarner Losh } EFI_ACPI_6_1_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_HEADER;
748*e985c628SWarner Losh 
749*e985c628SWarner Losh ///
750*e985c628SWarner Losh /// CPEP Version (as defined in ACPI 6.1 spec.)
751*e985c628SWarner Losh ///
752*e985c628SWarner Losh #define EFI_ACPI_6_1_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION  0x01
753*e985c628SWarner Losh 
754*e985c628SWarner Losh //
755*e985c628SWarner Losh // CPEP processor structure types.
756*e985c628SWarner Losh //
757*e985c628SWarner Losh #define EFI_ACPI_6_1_CPEP_PROCESSOR_APIC_SAPIC  0x00
758*e985c628SWarner Losh 
759*e985c628SWarner Losh ///
760*e985c628SWarner Losh /// Corrected Platform Error Polling Processor Structure Definition
761*e985c628SWarner Losh ///
762*e985c628SWarner Losh typedef struct {
763*e985c628SWarner Losh   UINT8     Type;
764*e985c628SWarner Losh   UINT8     Length;
765*e985c628SWarner Losh   UINT8     ProcessorId;
766*e985c628SWarner Losh   UINT8     ProcessorEid;
767*e985c628SWarner Losh   UINT32    PollingInterval;
768*e985c628SWarner Losh } EFI_ACPI_6_1_CPEP_PROCESSOR_APIC_SAPIC_STRUCTURE;
769*e985c628SWarner Losh 
770*e985c628SWarner Losh ///
771*e985c628SWarner Losh /// Maximum System Characteristics Table (MSCT)
772*e985c628SWarner Losh ///
773*e985c628SWarner Losh typedef struct {
774*e985c628SWarner Losh   EFI_ACPI_DESCRIPTION_HEADER    Header;
775*e985c628SWarner Losh   UINT32                         OffsetProxDomInfo;
776*e985c628SWarner Losh   UINT32                         MaximumNumberOfProximityDomains;
777*e985c628SWarner Losh   UINT32                         MaximumNumberOfClockDomains;
778*e985c628SWarner Losh   UINT64                         MaximumPhysicalAddress;
779*e985c628SWarner Losh } EFI_ACPI_6_1_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_HEADER;
780*e985c628SWarner Losh 
781*e985c628SWarner Losh ///
782*e985c628SWarner Losh /// MSCT Version (as defined in ACPI 6.1 spec.)
783*e985c628SWarner Losh ///
784*e985c628SWarner Losh #define EFI_ACPI_6_1_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION  0x01
785*e985c628SWarner Losh 
786*e985c628SWarner Losh ///
787*e985c628SWarner Losh /// Maximum Proximity Domain Information Structure Definition
788*e985c628SWarner Losh ///
789*e985c628SWarner Losh typedef struct {
790*e985c628SWarner Losh   UINT8     Revision;
791*e985c628SWarner Losh   UINT8     Length;
792*e985c628SWarner Losh   UINT32    ProximityDomainRangeLow;
793*e985c628SWarner Losh   UINT32    ProximityDomainRangeHigh;
794*e985c628SWarner Losh   UINT32    MaximumProcessorCapacity;
795*e985c628SWarner Losh   UINT64    MaximumMemoryCapacity;
796*e985c628SWarner Losh } EFI_ACPI_6_1_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE;
797*e985c628SWarner Losh 
798*e985c628SWarner Losh ///
799*e985c628SWarner Losh /// ACPI RAS Feature Table definition.
800*e985c628SWarner Losh ///
801*e985c628SWarner Losh typedef struct {
802*e985c628SWarner Losh   EFI_ACPI_DESCRIPTION_HEADER    Header;
803*e985c628SWarner Losh   UINT8                          PlatformCommunicationChannelIdentifier[12];
804*e985c628SWarner Losh } EFI_ACPI_6_1_RAS_FEATURE_TABLE;
805*e985c628SWarner Losh 
806*e985c628SWarner Losh ///
807*e985c628SWarner Losh /// RASF Version (as defined in ACPI 6.1 spec.)
808*e985c628SWarner Losh ///
809*e985c628SWarner Losh #define EFI_ACPI_6_1_RAS_FEATURE_TABLE_REVISION  0x01
810*e985c628SWarner Losh 
811*e985c628SWarner Losh ///
812*e985c628SWarner Losh /// ACPI RASF Platform Communication Channel Shared Memory Region definition.
813*e985c628SWarner Losh ///
814*e985c628SWarner Losh typedef struct {
815*e985c628SWarner Losh   UINT32    Signature;
816*e985c628SWarner Losh   UINT16    Command;
817*e985c628SWarner Losh   UINT16    Status;
818*e985c628SWarner Losh   UINT16    Version;
819*e985c628SWarner Losh   UINT8     RASCapabilities[16];
820*e985c628SWarner Losh   UINT8     SetRASCapabilities[16];
821*e985c628SWarner Losh   UINT16    NumberOfRASFParameterBlocks;
822*e985c628SWarner Losh   UINT32    SetRASCapabilitiesStatus;
823*e985c628SWarner Losh } EFI_ACPI_6_1_RASF_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION;
824*e985c628SWarner Losh 
825*e985c628SWarner Losh ///
826*e985c628SWarner Losh /// ACPI RASF PCC command code
827*e985c628SWarner Losh ///
828*e985c628SWarner Losh #define EFI_ACPI_6_1_RASF_PCC_COMMAND_CODE_EXECUTE_RASF_COMMAND  0x01
829*e985c628SWarner Losh 
830*e985c628SWarner Losh ///
831*e985c628SWarner Losh /// ACPI RASF Platform RAS Capabilities
832*e985c628SWarner Losh ///
833*e985c628SWarner Losh #define EFI_ACPI_6_1_RASF_PLATFORM_RAS_CAPABILITY_HARDWARE_BASED_PATROL_SCRUB_SUPPOTED                          0x01
834*e985c628SWarner Losh #define EFI_ACPI_6_1_RASF_PLATFORM_RAS_CAPABILITY_HARDWARE_BASED_PATROL_SCRUB_SUPPOTED_AND_EXPOSED_TO_SOFTWARE  0x02
835*e985c628SWarner Losh 
836*e985c628SWarner Losh ///
837*e985c628SWarner Losh /// ACPI RASF Parameter Block structure for PATROL_SCRUB
838*e985c628SWarner Losh ///
839*e985c628SWarner Losh typedef struct {
840*e985c628SWarner Losh   UINT16    Type;
841*e985c628SWarner Losh   UINT16    Version;
842*e985c628SWarner Losh   UINT16    Length;
843*e985c628SWarner Losh   UINT16    PatrolScrubCommand;
844*e985c628SWarner Losh   UINT64    RequestedAddressRange[2];
845*e985c628SWarner Losh   UINT64    ActualAddressRange[2];
846*e985c628SWarner Losh   UINT16    Flags;
847*e985c628SWarner Losh   UINT8     RequestedSpeed;
848*e985c628SWarner Losh } EFI_ACPI_6_1_RASF_PATROL_SCRUB_PLATFORM_BLOCK_STRUCTURE;
849*e985c628SWarner Losh 
850*e985c628SWarner Losh ///
851*e985c628SWarner Losh /// ACPI RASF Patrol Scrub command
852*e985c628SWarner Losh ///
853*e985c628SWarner Losh #define EFI_ACPI_6_1_RASF_PATROL_SCRUB_COMMAND_GET_PATROL_PARAMETERS  0x01
854*e985c628SWarner Losh #define EFI_ACPI_6_1_RASF_PATROL_SCRUB_COMMAND_START_PATROL_SCRUBBER  0x02
855*e985c628SWarner Losh #define EFI_ACPI_6_1_RASF_PATROL_SCRUB_COMMAND_STOP_PATROL_SCRUBBER   0x03
856*e985c628SWarner Losh 
857*e985c628SWarner Losh ///
858*e985c628SWarner Losh /// Memory Power State Table definition.
859*e985c628SWarner Losh ///
860*e985c628SWarner Losh typedef struct {
861*e985c628SWarner Losh   EFI_ACPI_DESCRIPTION_HEADER    Header;
862*e985c628SWarner Losh   UINT8                          PlatformCommunicationChannelIdentifier;
863*e985c628SWarner Losh   UINT8                          Reserved[3];
864*e985c628SWarner Losh   // Memory Power Node Structure
865*e985c628SWarner Losh   // Memory Power State Characteristics
866*e985c628SWarner Losh } EFI_ACPI_6_1_MEMORY_POWER_STATUS_TABLE;
867*e985c628SWarner Losh 
868*e985c628SWarner Losh ///
869*e985c628SWarner Losh /// MPST Version (as defined in ACPI 6.1 spec.)
870*e985c628SWarner Losh ///
871*e985c628SWarner Losh #define EFI_ACPI_6_1_MEMORY_POWER_STATE_TABLE_REVISION  0x01
872*e985c628SWarner Losh 
873*e985c628SWarner Losh ///
874*e985c628SWarner Losh /// MPST Platform Communication Channel Shared Memory Region definition.
875*e985c628SWarner Losh ///
876*e985c628SWarner Losh typedef struct {
877*e985c628SWarner Losh   UINT32    Signature;
878*e985c628SWarner Losh   UINT16    Command;
879*e985c628SWarner Losh   UINT16    Status;
880*e985c628SWarner Losh   UINT32    MemoryPowerCommandRegister;
881*e985c628SWarner Losh   UINT32    MemoryPowerStatusRegister;
882*e985c628SWarner Losh   UINT32    PowerStateId;
883*e985c628SWarner Losh   UINT32    MemoryPowerNodeId;
884*e985c628SWarner Losh   UINT64    MemoryEnergyConsumed;
885*e985c628SWarner Losh   UINT64    ExpectedAveragePowerComsuned;
886*e985c628SWarner Losh } EFI_ACPI_6_1_MPST_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION;
887*e985c628SWarner Losh 
888*e985c628SWarner Losh ///
889*e985c628SWarner Losh /// ACPI MPST PCC command code
890*e985c628SWarner Losh ///
891*e985c628SWarner Losh #define EFI_ACPI_6_1_MPST_PCC_COMMAND_CODE_EXECUTE_MPST_COMMAND  0x03
892*e985c628SWarner Losh 
893*e985c628SWarner Losh ///
894*e985c628SWarner Losh /// ACPI MPST Memory Power command
895*e985c628SWarner Losh ///
896*e985c628SWarner Losh #define EFI_ACPI_6_1_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_POWER_STATE      0x01
897*e985c628SWarner Losh #define EFI_ACPI_6_1_MPST_MEMORY_POWER_COMMAND_SET_MEMORY_POWER_STATE      0x02
898*e985c628SWarner Losh #define EFI_ACPI_6_1_MPST_MEMORY_POWER_COMMAND_GET_AVERAGE_POWER_CONSUMED  0x03
899*e985c628SWarner Losh #define EFI_ACPI_6_1_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_ENERGY_CONSUMED  0x04
900*e985c628SWarner Losh 
901*e985c628SWarner Losh ///
902*e985c628SWarner Losh /// MPST Memory Power Node Table
903*e985c628SWarner Losh ///
904*e985c628SWarner Losh typedef struct {
905*e985c628SWarner Losh   UINT8    PowerStateValue;
906*e985c628SWarner Losh   UINT8    PowerStateInformationIndex;
907*e985c628SWarner Losh } EFI_ACPI_6_1_MPST_MEMORY_POWER_STATE;
908*e985c628SWarner Losh 
909*e985c628SWarner Losh typedef struct {
910*e985c628SWarner Losh   UINT8     Flag;
911*e985c628SWarner Losh   UINT8     Reserved;
912*e985c628SWarner Losh   UINT16    MemoryPowerNodeId;
913*e985c628SWarner Losh   UINT32    Length;
914*e985c628SWarner Losh   UINT64    AddressBase;
915*e985c628SWarner Losh   UINT64    AddressLength;
916*e985c628SWarner Losh   UINT32    NumberOfPowerStates;
917*e985c628SWarner Losh   UINT32    NumberOfPhysicalComponents;
918*e985c628SWarner Losh   // EFI_ACPI_6_1_MPST_MEMORY_POWER_STATE              MemoryPowerState[NumberOfPowerStates];
919*e985c628SWarner Losh   // UINT16                                            PhysicalComponentIdentifier[NumberOfPhysicalComponents];
920*e985c628SWarner Losh } EFI_ACPI_6_1_MPST_MEMORY_POWER_STRUCTURE;
921*e985c628SWarner Losh 
922*e985c628SWarner Losh #define EFI_ACPI_6_1_MPST_MEMORY_POWER_STRUCTURE_FLAG_ENABLE         0x01
923*e985c628SWarner Losh #define EFI_ACPI_6_1_MPST_MEMORY_POWER_STRUCTURE_FLAG_POWER_MANAGED  0x02
924*e985c628SWarner Losh #define EFI_ACPI_6_1_MPST_MEMORY_POWER_STRUCTURE_FLAG_HOT_PLUGGABLE  0x04
925*e985c628SWarner Losh 
926*e985c628SWarner Losh typedef struct {
927*e985c628SWarner Losh   UINT16    MemoryPowerNodeCount;
928*e985c628SWarner Losh   UINT8     Reserved[2];
929*e985c628SWarner Losh } EFI_ACPI_6_1_MPST_MEMORY_POWER_NODE_TABLE;
930*e985c628SWarner Losh 
931*e985c628SWarner Losh ///
932*e985c628SWarner Losh /// MPST Memory Power State Characteristics Table
933*e985c628SWarner Losh ///
934*e985c628SWarner Losh typedef struct {
935*e985c628SWarner Losh   UINT8     PowerStateStructureID;
936*e985c628SWarner Losh   UINT8     Flag;
937*e985c628SWarner Losh   UINT16    Reserved;
938*e985c628SWarner Losh   UINT32    AveragePowerConsumedInMPS0;
939*e985c628SWarner Losh   UINT32    RelativePowerSavingToMPS0;
940*e985c628SWarner Losh   UINT64    ExitLatencyToMPS0;
941*e985c628SWarner Losh } EFI_ACPI_6_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE;
942*e985c628SWarner Losh 
943*e985c628SWarner Losh #define EFI_ACPI_6_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_MEMORY_CONTENT_PRESERVED             0x01
944*e985c628SWarner Losh #define EFI_ACPI_6_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_ENTRY  0x02
945*e985c628SWarner Losh #define EFI_ACPI_6_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_EXIT   0x04
946*e985c628SWarner Losh 
947*e985c628SWarner Losh typedef struct {
948*e985c628SWarner Losh   UINT16    MemoryPowerStateCharacteristicsCount;
949*e985c628SWarner Losh   UINT8     Reserved[2];
950*e985c628SWarner Losh } EFI_ACPI_6_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_TABLE;
951*e985c628SWarner Losh 
952*e985c628SWarner Losh ///
953*e985c628SWarner Losh /// Memory Topology Table definition.
954*e985c628SWarner Losh ///
955*e985c628SWarner Losh typedef struct {
956*e985c628SWarner Losh   EFI_ACPI_DESCRIPTION_HEADER    Header;
957*e985c628SWarner Losh   UINT32                         Reserved;
958*e985c628SWarner Losh } EFI_ACPI_6_1_MEMORY_TOPOLOGY_TABLE;
959*e985c628SWarner Losh 
960*e985c628SWarner Losh ///
961*e985c628SWarner Losh /// PMTT Version (as defined in ACPI 6.1 spec.)
962*e985c628SWarner Losh ///
963*e985c628SWarner Losh #define EFI_ACPI_6_1_MEMORY_TOPOLOGY_TABLE_REVISION  0x01
964*e985c628SWarner Losh 
965*e985c628SWarner Losh ///
966*e985c628SWarner Losh /// Common Memory Aggregator Device Structure.
967*e985c628SWarner Losh ///
968*e985c628SWarner Losh typedef struct {
969*e985c628SWarner Losh   UINT8     Type;
970*e985c628SWarner Losh   UINT8     Reserved;
971*e985c628SWarner Losh   UINT16    Length;
972*e985c628SWarner Losh   UINT16    Flags;
973*e985c628SWarner Losh   UINT16    Reserved1;
974*e985c628SWarner Losh } EFI_ACPI_6_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
975*e985c628SWarner Losh 
976*e985c628SWarner Losh ///
977*e985c628SWarner Losh /// Memory Aggregator Device Type
978*e985c628SWarner Losh ///
979*e985c628SWarner Losh #define EFI_ACPI_6_1_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_SOCKET             0x0
980*e985c628SWarner Losh #define EFI_ACPI_6_1_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_MEMORY_CONTROLLER  0x1
981*e985c628SWarner Losh #define EFI_ACPI_6_1_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_DIMM               0x2
982*e985c628SWarner Losh 
983*e985c628SWarner Losh ///
984*e985c628SWarner Losh /// Socket Memory Aggregator Device Structure.
985*e985c628SWarner Losh ///
986*e985c628SWarner Losh typedef struct {
987*e985c628SWarner Losh   EFI_ACPI_6_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE    Header;
988*e985c628SWarner Losh   UINT16                                                         SocketIdentifier;
989*e985c628SWarner Losh   UINT16                                                         Reserved;
990*e985c628SWarner Losh   // EFI_ACPI_6_1_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE  MemoryController[];
991*e985c628SWarner Losh } EFI_ACPI_6_1_PMMT_SOCKET_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
992*e985c628SWarner Losh 
993*e985c628SWarner Losh ///
994*e985c628SWarner Losh /// MemoryController Memory Aggregator Device Structure.
995*e985c628SWarner Losh ///
996*e985c628SWarner Losh typedef struct {
997*e985c628SWarner Losh   EFI_ACPI_6_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE    Header;
998*e985c628SWarner Losh   UINT32                                                         ReadLatency;
999*e985c628SWarner Losh   UINT32                                                         WriteLatency;
1000*e985c628SWarner Losh   UINT32                                                         ReadBandwidth;
1001*e985c628SWarner Losh   UINT32                                                         WriteBandwidth;
1002*e985c628SWarner Losh   UINT16                                                         OptimalAccessUnit;
1003*e985c628SWarner Losh   UINT16                                                         OptimalAccessAlignment;
1004*e985c628SWarner Losh   UINT16                                                         Reserved;
1005*e985c628SWarner Losh   UINT16                                                         NumberOfProximityDomains;
1006*e985c628SWarner Losh   // UINT32                                                       ProximityDomain[NumberOfProximityDomains];
1007*e985c628SWarner Losh   // EFI_ACPI_6_1_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE    PhysicalComponent[];
1008*e985c628SWarner Losh } EFI_ACPI_6_1_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
1009*e985c628SWarner Losh 
1010*e985c628SWarner Losh ///
1011*e985c628SWarner Losh /// DIMM Memory Aggregator Device Structure.
1012*e985c628SWarner Losh ///
1013*e985c628SWarner Losh typedef struct {
1014*e985c628SWarner Losh   EFI_ACPI_6_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE    Header;
1015*e985c628SWarner Losh   UINT16                                                         PhysicalComponentIdentifier;
1016*e985c628SWarner Losh   UINT16                                                         Reserved;
1017*e985c628SWarner Losh   UINT32                                                         SizeOfDimm;
1018*e985c628SWarner Losh   UINT32                                                         SmbiosHandle;
1019*e985c628SWarner Losh } EFI_ACPI_6_1_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
1020*e985c628SWarner Losh 
1021*e985c628SWarner Losh ///
1022*e985c628SWarner Losh /// Boot Graphics Resource Table definition.
1023*e985c628SWarner Losh ///
1024*e985c628SWarner Losh typedef struct {
1025*e985c628SWarner Losh   EFI_ACPI_DESCRIPTION_HEADER    Header;
1026*e985c628SWarner Losh   ///
1027*e985c628SWarner Losh   /// 2-bytes (16 bit) version ID. This value must be 1.
1028*e985c628SWarner Losh   ///
1029*e985c628SWarner Losh   UINT16                         Version;
1030*e985c628SWarner Losh   ///
1031*e985c628SWarner Losh   /// 1-byte status field indicating current status about the table.
1032*e985c628SWarner Losh   ///     Bits[7:1] = Reserved (must be zero)
1033*e985c628SWarner Losh   ///     Bit [0] = Valid. A one indicates the boot image graphic is valid.
1034*e985c628SWarner Losh   ///
1035*e985c628SWarner Losh   UINT8                          Status;
1036*e985c628SWarner Losh   ///
1037*e985c628SWarner Losh   /// 1-byte enumerated type field indicating format of the image.
1038*e985c628SWarner Losh   ///     0 = Bitmap
1039*e985c628SWarner Losh   ///     1 - 255  Reserved (for future use)
1040*e985c628SWarner Losh   ///
1041*e985c628SWarner Losh   UINT8                          ImageType;
1042*e985c628SWarner Losh   ///
1043*e985c628SWarner Losh   /// 8-byte (64 bit) physical address pointing to the firmware's in-memory copy
1044*e985c628SWarner Losh   /// of the image bitmap.
1045*e985c628SWarner Losh   ///
1046*e985c628SWarner Losh   UINT64                         ImageAddress;
1047*e985c628SWarner Losh   ///
1048*e985c628SWarner Losh   /// A 4-byte (32-bit) unsigned long describing the display X-offset of the boot image.
1049*e985c628SWarner Losh   /// (X, Y) display offset of the top left corner of the boot image.
1050*e985c628SWarner Losh   /// The top left corner of the display is at offset (0, 0).
1051*e985c628SWarner Losh   ///
1052*e985c628SWarner Losh   UINT32                         ImageOffsetX;
1053*e985c628SWarner Losh   ///
1054*e985c628SWarner Losh   /// A 4-byte (32-bit) unsigned long describing the display Y-offset of the boot image.
1055*e985c628SWarner Losh   /// (X, Y) display offset of the top left corner of the boot image.
1056*e985c628SWarner Losh   /// The top left corner of the display is at offset (0, 0).
1057*e985c628SWarner Losh   ///
1058*e985c628SWarner Losh   UINT32                         ImageOffsetY;
1059*e985c628SWarner Losh } EFI_ACPI_6_1_BOOT_GRAPHICS_RESOURCE_TABLE;
1060*e985c628SWarner Losh 
1061*e985c628SWarner Losh ///
1062*e985c628SWarner Losh /// BGRT Revision
1063*e985c628SWarner Losh ///
1064*e985c628SWarner Losh #define EFI_ACPI_6_1_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION  1
1065*e985c628SWarner Losh 
1066*e985c628SWarner Losh ///
1067*e985c628SWarner Losh /// BGRT Version
1068*e985c628SWarner Losh ///
1069*e985c628SWarner Losh #define EFI_ACPI_6_1_BGRT_VERSION  0x01
1070*e985c628SWarner Losh 
1071*e985c628SWarner Losh ///
1072*e985c628SWarner Losh /// BGRT Status
1073*e985c628SWarner Losh ///
1074*e985c628SWarner Losh #define EFI_ACPI_6_1_BGRT_STATUS_NOT_DISPLAYED  0x00
1075*e985c628SWarner Losh #define EFI_ACPI_6_1_BGRT_STATUS_DISPLAYED      0x01
1076*e985c628SWarner Losh 
1077*e985c628SWarner Losh ///
1078*e985c628SWarner Losh /// BGRT Image Type
1079*e985c628SWarner Losh ///
1080*e985c628SWarner Losh #define EFI_ACPI_6_1_BGRT_IMAGE_TYPE_BMP  0x00
1081*e985c628SWarner Losh 
1082*e985c628SWarner Losh ///
1083*e985c628SWarner Losh /// FPDT Version (as defined in ACPI 6.1 spec.)
1084*e985c628SWarner Losh ///
1085*e985c628SWarner Losh #define EFI_ACPI_6_1_FIRMWARE_PERFORMANCE_DATA_TABLE_REVISION  0x01
1086*e985c628SWarner Losh 
1087*e985c628SWarner Losh ///
1088*e985c628SWarner Losh /// FPDT Performance Record Types
1089*e985c628SWarner Losh ///
1090*e985c628SWarner Losh #define EFI_ACPI_6_1_FPDT_RECORD_TYPE_FIRMWARE_BASIC_BOOT_POINTER   0x0000
1091*e985c628SWarner Losh #define EFI_ACPI_6_1_FPDT_RECORD_TYPE_S3_PERFORMANCE_TABLE_POINTER  0x0001
1092*e985c628SWarner Losh 
1093*e985c628SWarner Losh ///
1094*e985c628SWarner Losh /// FPDT Performance Record Revision
1095*e985c628SWarner Losh ///
1096*e985c628SWarner Losh #define EFI_ACPI_6_1_FPDT_RECORD_REVISION_FIRMWARE_BASIC_BOOT_POINTER   0x01
1097*e985c628SWarner Losh #define EFI_ACPI_6_1_FPDT_RECORD_REVISION_S3_PERFORMANCE_TABLE_POINTER  0x01
1098*e985c628SWarner Losh 
1099*e985c628SWarner Losh ///
1100*e985c628SWarner Losh /// FPDT Runtime Performance Record Types
1101*e985c628SWarner Losh ///
1102*e985c628SWarner Losh #define EFI_ACPI_6_1_FPDT_RUNTIME_RECORD_TYPE_S3_RESUME            0x0000
1103*e985c628SWarner Losh #define EFI_ACPI_6_1_FPDT_RUNTIME_RECORD_TYPE_S3_SUSPEND           0x0001
1104*e985c628SWarner Losh #define EFI_ACPI_6_1_FPDT_RUNTIME_RECORD_TYPE_FIRMWARE_BASIC_BOOT  0x0002
1105*e985c628SWarner Losh 
1106*e985c628SWarner Losh ///
1107*e985c628SWarner Losh /// FPDT Runtime Performance Record Revision
1108*e985c628SWarner Losh ///
1109*e985c628SWarner Losh #define EFI_ACPI_6_1_FPDT_RUNTIME_RECORD_REVISION_S3_RESUME            0x01
1110*e985c628SWarner Losh #define EFI_ACPI_6_1_FPDT_RUNTIME_RECORD_REVISION_S3_SUSPEND           0x01
1111*e985c628SWarner Losh #define EFI_ACPI_6_1_FPDT_RUNTIME_RECORD_REVISION_FIRMWARE_BASIC_BOOT  0x02
1112*e985c628SWarner Losh 
1113*e985c628SWarner Losh ///
1114*e985c628SWarner Losh /// FPDT Performance Record header
1115*e985c628SWarner Losh ///
1116*e985c628SWarner Losh typedef struct {
1117*e985c628SWarner Losh   UINT16    Type;
1118*e985c628SWarner Losh   UINT8     Length;
1119*e985c628SWarner Losh   UINT8     Revision;
1120*e985c628SWarner Losh } EFI_ACPI_6_1_FPDT_PERFORMANCE_RECORD_HEADER;
1121*e985c628SWarner Losh 
1122*e985c628SWarner Losh ///
1123*e985c628SWarner Losh /// FPDT Performance Table header
1124*e985c628SWarner Losh ///
1125*e985c628SWarner Losh typedef struct {
1126*e985c628SWarner Losh   UINT32    Signature;
1127*e985c628SWarner Losh   UINT32    Length;
1128*e985c628SWarner Losh } EFI_ACPI_6_1_FPDT_PERFORMANCE_TABLE_HEADER;
1129*e985c628SWarner Losh 
1130*e985c628SWarner Losh ///
1131*e985c628SWarner Losh /// FPDT Firmware Basic Boot Performance Pointer Record Structure
1132*e985c628SWarner Losh ///
1133*e985c628SWarner Losh typedef struct {
1134*e985c628SWarner Losh   EFI_ACPI_6_1_FPDT_PERFORMANCE_RECORD_HEADER    Header;
1135*e985c628SWarner Losh   UINT32                                         Reserved;
1136*e985c628SWarner Losh   ///
1137*e985c628SWarner Losh   /// 64-bit processor-relative physical address of the Basic Boot Performance Table.
1138*e985c628SWarner Losh   ///
1139*e985c628SWarner Losh   UINT64                                         BootPerformanceTablePointer;
1140*e985c628SWarner Losh } EFI_ACPI_6_1_FPDT_BOOT_PERFORMANCE_TABLE_POINTER_RECORD;
1141*e985c628SWarner Losh 
1142*e985c628SWarner Losh ///
1143*e985c628SWarner Losh /// FPDT S3 Performance Table Pointer Record Structure
1144*e985c628SWarner Losh ///
1145*e985c628SWarner Losh typedef struct {
1146*e985c628SWarner Losh   EFI_ACPI_6_1_FPDT_PERFORMANCE_RECORD_HEADER    Header;
1147*e985c628SWarner Losh   UINT32                                         Reserved;
1148*e985c628SWarner Losh   ///
1149*e985c628SWarner Losh   /// 64-bit processor-relative physical address of the S3 Performance Table.
1150*e985c628SWarner Losh   ///
1151*e985c628SWarner Losh   UINT64                                         S3PerformanceTablePointer;
1152*e985c628SWarner Losh } EFI_ACPI_6_1_FPDT_S3_PERFORMANCE_TABLE_POINTER_RECORD;
1153*e985c628SWarner Losh 
1154*e985c628SWarner Losh ///
1155*e985c628SWarner Losh /// FPDT Firmware Basic Boot Performance Record Structure
1156*e985c628SWarner Losh ///
1157*e985c628SWarner Losh typedef struct {
1158*e985c628SWarner Losh   EFI_ACPI_6_1_FPDT_PERFORMANCE_RECORD_HEADER    Header;
1159*e985c628SWarner Losh   UINT32                                         Reserved;
1160*e985c628SWarner Losh   ///
1161*e985c628SWarner Losh   /// Timer value logged at the beginning of firmware image execution.
1162*e985c628SWarner Losh   /// This may not always be zero or near zero.
1163*e985c628SWarner Losh   ///
1164*e985c628SWarner Losh   UINT64                                         ResetEnd;
1165*e985c628SWarner Losh   ///
1166*e985c628SWarner Losh   /// Timer value logged just prior to loading the OS boot loader into memory.
1167*e985c628SWarner Losh   /// For non-UEFI compatible boots, this field must be zero.
1168*e985c628SWarner Losh   ///
1169*e985c628SWarner Losh   UINT64                                         OsLoaderLoadImageStart;
1170*e985c628SWarner Losh   ///
1171*e985c628SWarner Losh   /// Timer value logged just prior to launching the previously loaded OS boot loader image.
1172*e985c628SWarner Losh   /// For non-UEFI compatible boots, the timer value logged will be just prior
1173*e985c628SWarner Losh   /// to the INT 19h handler invocation.
1174*e985c628SWarner Losh   ///
1175*e985c628SWarner Losh   UINT64                                         OsLoaderStartImageStart;
1176*e985c628SWarner Losh   ///
1177*e985c628SWarner Losh   /// Timer value logged at the point when the OS loader calls the
1178*e985c628SWarner Losh   /// ExitBootServices function for UEFI compatible firmware.
1179*e985c628SWarner Losh   /// For non-UEFI compatible boots, this field must be zero.
1180*e985c628SWarner Losh   ///
1181*e985c628SWarner Losh   UINT64                                         ExitBootServicesEntry;
1182*e985c628SWarner Losh   ///
1183*e985c628SWarner Losh   /// Timer value logged at the point just prior to when the OS loader gaining
1184*e985c628SWarner Losh   /// control back from calls the ExitBootServices function for UEFI compatible firmware.
1185*e985c628SWarner Losh   /// For non-UEFI compatible boots, this field must be zero.
1186*e985c628SWarner Losh   ///
1187*e985c628SWarner Losh   UINT64                                         ExitBootServicesExit;
1188*e985c628SWarner Losh } EFI_ACPI_6_1_FPDT_FIRMWARE_BASIC_BOOT_RECORD;
1189*e985c628SWarner Losh 
1190*e985c628SWarner Losh ///
1191*e985c628SWarner Losh /// FPDT Firmware Basic Boot Performance Table signature
1192*e985c628SWarner Losh ///
1193*e985c628SWarner Losh #define EFI_ACPI_6_1_FPDT_BOOT_PERFORMANCE_TABLE_SIGNATURE  SIGNATURE_32('F', 'B', 'P', 'T')
1194*e985c628SWarner Losh 
1195*e985c628SWarner Losh //
1196*e985c628SWarner Losh // FPDT Firmware Basic Boot Performance Table
1197*e985c628SWarner Losh //
1198*e985c628SWarner Losh typedef struct {
1199*e985c628SWarner Losh   EFI_ACPI_6_1_FPDT_PERFORMANCE_TABLE_HEADER    Header;
1200*e985c628SWarner Losh   //
1201*e985c628SWarner Losh   // one or more Performance Records.
1202*e985c628SWarner Losh   //
1203*e985c628SWarner Losh } EFI_ACPI_6_1_FPDT_FIRMWARE_BASIC_BOOT_TABLE;
1204*e985c628SWarner Losh 
1205*e985c628SWarner Losh ///
1206*e985c628SWarner Losh /// FPDT "S3PT" S3 Performance Table
1207*e985c628SWarner Losh ///
1208*e985c628SWarner Losh #define EFI_ACPI_6_1_FPDT_S3_PERFORMANCE_TABLE_SIGNATURE  SIGNATURE_32('S', '3', 'P', 'T')
1209*e985c628SWarner Losh 
1210*e985c628SWarner Losh //
1211*e985c628SWarner Losh // FPDT Firmware S3 Boot Performance Table
1212*e985c628SWarner Losh //
1213*e985c628SWarner Losh typedef struct {
1214*e985c628SWarner Losh   EFI_ACPI_6_1_FPDT_PERFORMANCE_TABLE_HEADER    Header;
1215*e985c628SWarner Losh   //
1216*e985c628SWarner Losh   // one or more Performance Records.
1217*e985c628SWarner Losh   //
1218*e985c628SWarner Losh } EFI_ACPI_6_1_FPDT_FIRMWARE_S3_BOOT_TABLE;
1219*e985c628SWarner Losh 
1220*e985c628SWarner Losh ///
1221*e985c628SWarner Losh /// FPDT Basic S3 Resume Performance Record
1222*e985c628SWarner Losh ///
1223*e985c628SWarner Losh typedef struct {
1224*e985c628SWarner Losh   EFI_ACPI_6_1_FPDT_PERFORMANCE_RECORD_HEADER    Header;
1225*e985c628SWarner Losh   ///
1226*e985c628SWarner Losh   /// A count of the number of S3 resume cycles since the last full boot sequence.
1227*e985c628SWarner Losh   ///
1228*e985c628SWarner Losh   UINT32                                         ResumeCount;
1229*e985c628SWarner Losh   ///
1230*e985c628SWarner Losh   /// Timer recorded at the end of BIOS S3 resume, just prior to handoff to the
1231*e985c628SWarner Losh   /// OS waking vector. Only the most recent resume cycle's time is retained.
1232*e985c628SWarner Losh   ///
1233*e985c628SWarner Losh   UINT64                                         FullResume;
1234*e985c628SWarner Losh   ///
1235*e985c628SWarner Losh   /// Average timer value of all resume cycles logged since the last full boot
1236*e985c628SWarner Losh   /// sequence, including the most recent resume.  Note that the entire log of
1237*e985c628SWarner Losh   /// timer values does not need to be retained in order to calculate this average.
1238*e985c628SWarner Losh   ///
1239*e985c628SWarner Losh   UINT64                                         AverageResume;
1240*e985c628SWarner Losh } EFI_ACPI_6_1_FPDT_S3_RESUME_RECORD;
1241*e985c628SWarner Losh 
1242*e985c628SWarner Losh ///
1243*e985c628SWarner Losh /// FPDT Basic S3 Suspend Performance Record
1244*e985c628SWarner Losh ///
1245*e985c628SWarner Losh typedef struct {
1246*e985c628SWarner Losh   EFI_ACPI_6_1_FPDT_PERFORMANCE_RECORD_HEADER    Header;
1247*e985c628SWarner Losh   ///
1248*e985c628SWarner Losh   /// Timer value recorded at the OS write to SLP_TYP upon entry to S3.
1249*e985c628SWarner Losh   /// Only the most recent suspend cycle's timer value is retained.
1250*e985c628SWarner Losh   ///
1251*e985c628SWarner Losh   UINT64                                         SuspendStart;
1252*e985c628SWarner Losh   ///
1253*e985c628SWarner Losh   /// Timer value recorded at the final firmware write to SLP_TYP (or other
1254*e985c628SWarner Losh   /// mechanism) used to trigger hardware entry to S3.
1255*e985c628SWarner Losh   /// Only the most recent suspend cycle's timer value is retained.
1256*e985c628SWarner Losh   ///
1257*e985c628SWarner Losh   UINT64                                         SuspendEnd;
1258*e985c628SWarner Losh } EFI_ACPI_6_1_FPDT_S3_SUSPEND_RECORD;
1259*e985c628SWarner Losh 
1260*e985c628SWarner Losh ///
1261*e985c628SWarner Losh /// Firmware Performance Record Table definition.
1262*e985c628SWarner Losh ///
1263*e985c628SWarner Losh typedef struct {
1264*e985c628SWarner Losh   EFI_ACPI_DESCRIPTION_HEADER    Header;
1265*e985c628SWarner Losh } EFI_ACPI_6_1_FIRMWARE_PERFORMANCE_RECORD_TABLE;
1266*e985c628SWarner Losh 
1267*e985c628SWarner Losh ///
1268*e985c628SWarner Losh /// Generic Timer Description Table definition.
1269*e985c628SWarner Losh ///
1270*e985c628SWarner Losh typedef struct {
1271*e985c628SWarner Losh   EFI_ACPI_DESCRIPTION_HEADER    Header;
1272*e985c628SWarner Losh   UINT64                         CntControlBasePhysicalAddress;
1273*e985c628SWarner Losh   UINT32                         Reserved;
1274*e985c628SWarner Losh   UINT32                         SecurePL1TimerGSIV;
1275*e985c628SWarner Losh   UINT32                         SecurePL1TimerFlags;
1276*e985c628SWarner Losh   UINT32                         NonSecurePL1TimerGSIV;
1277*e985c628SWarner Losh   UINT32                         NonSecurePL1TimerFlags;
1278*e985c628SWarner Losh   UINT32                         VirtualTimerGSIV;
1279*e985c628SWarner Losh   UINT32                         VirtualTimerFlags;
1280*e985c628SWarner Losh   UINT32                         NonSecurePL2TimerGSIV;
1281*e985c628SWarner Losh   UINT32                         NonSecurePL2TimerFlags;
1282*e985c628SWarner Losh   UINT64                         CntReadBasePhysicalAddress;
1283*e985c628SWarner Losh   UINT32                         PlatformTimerCount;
1284*e985c628SWarner Losh   UINT32                         PlatformTimerOffset;
1285*e985c628SWarner Losh } EFI_ACPI_6_1_GENERIC_TIMER_DESCRIPTION_TABLE;
1286*e985c628SWarner Losh 
1287*e985c628SWarner Losh ///
1288*e985c628SWarner Losh /// GTDT Version (as defined in ACPI 6.1 spec.)
1289*e985c628SWarner Losh ///
1290*e985c628SWarner Losh #define EFI_ACPI_6_1_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION  0x02
1291*e985c628SWarner Losh 
1292*e985c628SWarner Losh ///
1293*e985c628SWarner Losh /// Timer Flags.  All other bits are reserved and must be 0.
1294*e985c628SWarner Losh ///
1295*e985c628SWarner Losh #define EFI_ACPI_6_1_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE      BIT0
1296*e985c628SWarner Losh #define EFI_ACPI_6_1_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY  BIT1
1297*e985c628SWarner Losh #define EFI_ACPI_6_1_GTDT_TIMER_FLAG_ALWAYS_ON_CAPABILITY      BIT2
1298*e985c628SWarner Losh 
1299*e985c628SWarner Losh ///
1300*e985c628SWarner Losh /// Platform Timer Type
1301*e985c628SWarner Losh ///
1302*e985c628SWarner Losh #define EFI_ACPI_6_1_GTDT_GT_BLOCK               0
1303*e985c628SWarner Losh #define EFI_ACPI_6_1_GTDT_SBSA_GENERIC_WATCHDOG  1
1304*e985c628SWarner Losh 
1305*e985c628SWarner Losh ///
1306*e985c628SWarner Losh /// GT Block Structure
1307*e985c628SWarner Losh ///
1308*e985c628SWarner Losh typedef struct {
1309*e985c628SWarner Losh   UINT8     Type;
1310*e985c628SWarner Losh   UINT16    Length;
1311*e985c628SWarner Losh   UINT8     Reserved;
1312*e985c628SWarner Losh   UINT64    CntCtlBase;
1313*e985c628SWarner Losh   UINT32    GTBlockTimerCount;
1314*e985c628SWarner Losh   UINT32    GTBlockTimerOffset;
1315*e985c628SWarner Losh } EFI_ACPI_6_1_GTDT_GT_BLOCK_STRUCTURE;
1316*e985c628SWarner Losh 
1317*e985c628SWarner Losh ///
1318*e985c628SWarner Losh /// GT Block Timer Structure
1319*e985c628SWarner Losh ///
1320*e985c628SWarner Losh typedef struct {
1321*e985c628SWarner Losh   UINT8     GTFrameNumber;
1322*e985c628SWarner Losh   UINT8     Reserved[3];
1323*e985c628SWarner Losh   UINT64    CntBaseX;
1324*e985c628SWarner Losh   UINT64    CntEL0BaseX;
1325*e985c628SWarner Losh   UINT32    GTxPhysicalTimerGSIV;
1326*e985c628SWarner Losh   UINT32    GTxPhysicalTimerFlags;
1327*e985c628SWarner Losh   UINT32    GTxVirtualTimerGSIV;
1328*e985c628SWarner Losh   UINT32    GTxVirtualTimerFlags;
1329*e985c628SWarner Losh   UINT32    GTxCommonFlags;
1330*e985c628SWarner Losh } EFI_ACPI_6_1_GTDT_GT_BLOCK_TIMER_STRUCTURE;
1331*e985c628SWarner Losh 
1332*e985c628SWarner Losh ///
1333*e985c628SWarner Losh /// GT Block Physical Timers and Virtual Timers Flags.  All other bits are reserved and must be 0.
1334*e985c628SWarner Losh ///
1335*e985c628SWarner Losh #define EFI_ACPI_6_1_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_MODE      BIT0
1336*e985c628SWarner Losh #define EFI_ACPI_6_1_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_POLARITY  BIT1
1337*e985c628SWarner Losh 
1338*e985c628SWarner Losh ///
1339*e985c628SWarner Losh /// Common Flags Flags.  All other bits are reserved and must be 0.
1340*e985c628SWarner Losh ///
1341*e985c628SWarner Losh #define EFI_ACPI_6_1_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER          BIT0
1342*e985c628SWarner Losh #define EFI_ACPI_6_1_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY  BIT1
1343*e985c628SWarner Losh 
1344*e985c628SWarner Losh ///
1345*e985c628SWarner Losh /// SBSA Generic Watchdog Structure
1346*e985c628SWarner Losh ///
1347*e985c628SWarner Losh typedef struct {
1348*e985c628SWarner Losh   UINT8     Type;
1349*e985c628SWarner Losh   UINT16    Length;
1350*e985c628SWarner Losh   UINT8     Reserved;
1351*e985c628SWarner Losh   UINT64    RefreshFramePhysicalAddress;
1352*e985c628SWarner Losh   UINT64    WatchdogControlFramePhysicalAddress;
1353*e985c628SWarner Losh   UINT32    WatchdogTimerGSIV;
1354*e985c628SWarner Losh   UINT32    WatchdogTimerFlags;
1355*e985c628SWarner Losh } EFI_ACPI_6_1_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE;
1356*e985c628SWarner Losh 
1357*e985c628SWarner Losh ///
1358*e985c628SWarner Losh /// SBSA Generic Watchdog Timer Flags.  All other bits are reserved and must be 0.
1359*e985c628SWarner Losh ///
1360*e985c628SWarner Losh #define EFI_ACPI_6_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_MODE      BIT0
1361*e985c628SWarner Losh #define EFI_ACPI_6_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_POLARITY  BIT1
1362*e985c628SWarner Losh #define EFI_ACPI_6_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER              BIT2
1363*e985c628SWarner Losh 
1364*e985c628SWarner Losh //
1365*e985c628SWarner Losh // NVDIMM Firmware Interface Table definition.
1366*e985c628SWarner Losh //
1367*e985c628SWarner Losh typedef struct {
1368*e985c628SWarner Losh   EFI_ACPI_DESCRIPTION_HEADER    Header;
1369*e985c628SWarner Losh   UINT32                         Reserved;
1370*e985c628SWarner Losh } EFI_ACPI_6_1_NVDIMM_FIRMWARE_INTERFACE_TABLE;
1371*e985c628SWarner Losh 
1372*e985c628SWarner Losh //
1373*e985c628SWarner Losh // NFIT Version (as defined in ACPI 6.1 spec.)
1374*e985c628SWarner Losh //
1375*e985c628SWarner Losh #define EFI_ACPI_6_1_NVDIMM_FIRMWARE_INTERFACE_TABLE_REVISION  0x1
1376*e985c628SWarner Losh 
1377*e985c628SWarner Losh //
1378*e985c628SWarner Losh // Definition for NFIT Table Structure Types
1379*e985c628SWarner Losh //
1380*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_STRUCTURE_TYPE    0
1381*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_NVDIMM_REGION_MAPPING_STRUCTURE_TYPE            1
1382*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_INTERLEAVE_STRUCTURE_TYPE                       2
1383*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_SMBIOS_MANAGEMENT_INFORMATION_STRUCTURE_TYPE    3
1384*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_NVDIMM_CONTROL_REGION_STRUCTURE_TYPE            4
1385*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_NVDIMM_BLOCK_DATA_WINDOW_REGION_STRUCTURE_TYPE  5
1386*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_FLUSH_HINT_ADDRESS_STRUCTURE_TYPE               6
1387*e985c628SWarner Losh 
1388*e985c628SWarner Losh //
1389*e985c628SWarner Losh // Definition for NFIT Structure Header
1390*e985c628SWarner Losh //
1391*e985c628SWarner Losh typedef struct {
1392*e985c628SWarner Losh   UINT16    Type;
1393*e985c628SWarner Losh   UINT16    Length;
1394*e985c628SWarner Losh } EFI_ACPI_6_1_NFIT_STRUCTURE_HEADER;
1395*e985c628SWarner Losh 
1396*e985c628SWarner Losh //
1397*e985c628SWarner Losh // Definition for System Physical Address Range Structure
1398*e985c628SWarner Losh //
1399*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_CONTROL_REGION_FOR_MANAGEMENT  BIT0
1400*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_PROXIMITY_DOMAIN_VALID         BIT1
1401*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_GUID_VOLATILE_MEMORY_REGION                                        { 0x7305944F, 0xFDDA, 0x44E3, { 0xB1, 0x6C, 0x3F, 0x22, 0xD2, 0x52, 0xE5, 0xD0 }}
1402*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_GUID_BYTE_ADDRESSABLE_PERSISTENT_MEMORY_REGION                     { 0x66F0D379, 0xB4F3, 0x4074, { 0xAC, 0x43, 0x0D, 0x33, 0x18, 0xB7, 0x8C, 0xDB }}
1403*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_GUID_NVDIMM_CONTROL_REGION                                         { 0x92F701F6, 0x13B4, 0x405D, { 0x91, 0x0B, 0x29, 0x93, 0x67, 0xE8, 0x23, 0x4C }}
1404*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_GUID_NVDIMM_BLOCK_DATA_WINDOW_REGION                               { 0x91AF0530, 0x5D86, 0x470E, { 0xA6, 0xB0, 0x0A, 0x2D, 0xB9, 0x40, 0x82, 0x49 }}
1405*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE              { 0x77AB535A, 0x45FC, 0x624B, { 0x55, 0x60, 0xF7, 0xB2, 0x81, 0xD1, 0xF9, 0x6E }}
1406*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE                { 0x3D5ABD30, 0x4175, 0x87CE, { 0x6D, 0x64, 0xD2, 0xAD, 0xE5, 0x23, 0xC4, 0xBB }}
1407*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT            { 0x5CEA02C9, 0x4D07, 0x69D3, { 0x26, 0x9F ,0x44, 0x96, 0xFB, 0xE0, 0x96, 0xF9 }}
1408*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT              { 0x08018188, 0x42CD, 0xBB48, { 0x10, 0x0F, 0x53, 0x87, 0xD5, 0x3D, 0xED, 0x3D }}
1409*e985c628SWarner Losh typedef struct {
1410*e985c628SWarner Losh   UINT16    Type;
1411*e985c628SWarner Losh   UINT16    Length;
1412*e985c628SWarner Losh   UINT16    SPARangeStructureIndex;
1413*e985c628SWarner Losh   UINT16    Flags;
1414*e985c628SWarner Losh   UINT32    Reserved_8;
1415*e985c628SWarner Losh   UINT32    ProximityDomain;
1416*e985c628SWarner Losh   GUID      AddressRangeTypeGUID;
1417*e985c628SWarner Losh   UINT64    SystemPhysicalAddressRangeBase;
1418*e985c628SWarner Losh   UINT64    SystemPhysicalAddressRangeLength;
1419*e985c628SWarner Losh   UINT64    AddressRangeMemoryMappingAttribute;
1420*e985c628SWarner Losh } EFI_ACPI_6_1_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_STRUCTURE;
1421*e985c628SWarner Losh 
1422*e985c628SWarner Losh //
1423*e985c628SWarner Losh // Definition for Memory Device to System Physical Address Range Mapping Structure
1424*e985c628SWarner Losh //
1425*e985c628SWarner Losh typedef struct {
1426*e985c628SWarner Losh   UINT32    DIMMNumber          : 4;
1427*e985c628SWarner Losh   UINT32    MemoryChannelNumber : 4;
1428*e985c628SWarner Losh   UINT32    MemoryControllerID  : 4;
1429*e985c628SWarner Losh   UINT32    SocketID            : 4;
1430*e985c628SWarner Losh   UINT32    NodeControllerID    : 12;
1431*e985c628SWarner Losh   UINT32    Reserved_28         : 4;
1432*e985c628SWarner Losh } EFI_ACPI_6_1_NFIT_DEVICE_HANDLE;
1433*e985c628SWarner Losh 
1434*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_MEMORY_DEVICE_STATE_FLAGS_PREVIOUS_SAVE_FAIL                                      BIT0
1435*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_MEMORY_DEVICE_STATE_FLAGS_LAST_RESTORE_FAIL                                       BIT1
1436*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_MEMORY_DEVICE_STATE_FLAGS_PLATFORM_FLUSH_FAIL                                     BIT2
1437*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_MEMORY_DEVICE_STATE_FLAGS_NOT_ARMED_PRIOR_TO_OSPM_HAND_OFF                        BIT3
1438*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_MEMORY_DEVICE_STATE_FLAGS_SMART_HEALTH_EVENTS_PRIOR_OSPM_HAND_OFF                 BIT4
1439*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_MEMORY_DEVICE_STATE_FLAGS_FIRMWARE_ENABLED_TO_NOTIFY_OSPM_ON_SMART_HEALTH_EVENTS  BIT5
1440*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_MEMORY_DEVICE_STATE_FLAGS_FIRMWARE_NOT_MAP_NVDIMM_TO_SPA                          BIT6
1441*e985c628SWarner Losh typedef struct {
1442*e985c628SWarner Losh   UINT16                             Type;
1443*e985c628SWarner Losh   UINT16                             Length;
1444*e985c628SWarner Losh   EFI_ACPI_6_1_NFIT_DEVICE_HANDLE    NFITDeviceHandle;
1445*e985c628SWarner Losh   UINT16                             NVDIMMPhysicalID;
1446*e985c628SWarner Losh   UINT16                             NVDIMMRegionID;
1447*e985c628SWarner Losh   UINT16                             SPARangeStructureIndex;
1448*e985c628SWarner Losh   UINT16                             NVDIMMControlRegionStructureIndex;
1449*e985c628SWarner Losh   UINT64                             NVDIMMRegionSize;
1450*e985c628SWarner Losh   UINT64                             RegionOffset;
1451*e985c628SWarner Losh   UINT64                             NVDIMMPhysicalAddressRegionBase;
1452*e985c628SWarner Losh   UINT16                             InterleaveStructureIndex;
1453*e985c628SWarner Losh   UINT16                             InterleaveWays;
1454*e985c628SWarner Losh   UINT16                             NVDIMMStateFlags;
1455*e985c628SWarner Losh   UINT16                             Reserved_46;
1456*e985c628SWarner Losh } EFI_ACPI_6_1_NFIT_NVDIMM_REGION_MAPPING_STRUCTURE;
1457*e985c628SWarner Losh 
1458*e985c628SWarner Losh //
1459*e985c628SWarner Losh // Definition for Interleave Structure
1460*e985c628SWarner Losh //
1461*e985c628SWarner Losh typedef struct {
1462*e985c628SWarner Losh   UINT16    Type;
1463*e985c628SWarner Losh   UINT16    Length;
1464*e985c628SWarner Losh   UINT16    InterleaveStructureIndex;
1465*e985c628SWarner Losh   UINT16    Reserved_6;
1466*e985c628SWarner Losh   UINT32    NumberOfLines;
1467*e985c628SWarner Losh   UINT32    LineSize;
1468*e985c628SWarner Losh   // UINT32                                      LineOffset[NumberOfLines];
1469*e985c628SWarner Losh } EFI_ACPI_6_1_NFIT_INTERLEAVE_STRUCTURE;
1470*e985c628SWarner Losh 
1471*e985c628SWarner Losh //
1472*e985c628SWarner Losh // Definition for SMBIOS Management Information Structure
1473*e985c628SWarner Losh //
1474*e985c628SWarner Losh typedef struct {
1475*e985c628SWarner Losh   UINT16    Type;
1476*e985c628SWarner Losh   UINT16    Length;
1477*e985c628SWarner Losh   UINT32    Reserved_4;
1478*e985c628SWarner Losh   // UINT8                                       Data[];
1479*e985c628SWarner Losh } EFI_ACPI_6_1_NFIT_SMBIOS_MANAGEMENT_INFORMATION_STRUCTURE;
1480*e985c628SWarner Losh 
1481*e985c628SWarner Losh //
1482*e985c628SWarner Losh // Definition for NVDIMM Control Region Structure
1483*e985c628SWarner Losh //
1484*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_NVDIMM_CONTROL_REGION_VALID_FIELDS_MANUFACTURING  BIT0
1485*e985c628SWarner Losh 
1486*e985c628SWarner Losh #define EFI_ACPI_6_1_NFIT_NVDIMM_CONTROL_REGION_FLAGS_BLOCK_DATA_WINDOWS_BUFFERED  BIT0
1487*e985c628SWarner Losh typedef struct {
1488*e985c628SWarner Losh   UINT16    Type;
1489*e985c628SWarner Losh   UINT16    Length;
1490*e985c628SWarner Losh   UINT16    NVDIMMControlRegionStructureIndex;
1491*e985c628SWarner Losh   UINT16    VendorID;
1492*e985c628SWarner Losh   UINT16    DeviceID;
1493*e985c628SWarner Losh   UINT16    RevisionID;
1494*e985c628SWarner Losh   UINT16    SubsystemVendorID;
1495*e985c628SWarner Losh   UINT16    SubsystemDeviceID;
1496*e985c628SWarner Losh   UINT16    SubsystemRevisionID;
1497*e985c628SWarner Losh   UINT8     ValidFields;
1498*e985c628SWarner Losh   UINT8     ManufacturingLocation;
1499*e985c628SWarner Losh   UINT16    ManufacturingDate;
1500*e985c628SWarner Losh   UINT8     Reserved_22[2];
1501*e985c628SWarner Losh   UINT32    SerialNumber;
1502*e985c628SWarner Losh   UINT16    RegionFormatInterfaceCode;
1503*e985c628SWarner Losh   UINT16    NumberOfBlockControlWindows;
1504*e985c628SWarner Losh   UINT64    SizeOfBlockControlWindow;
1505*e985c628SWarner Losh   UINT64    CommandRegisterOffsetInBlockControlWindow;
1506*e985c628SWarner Losh   UINT64    SizeOfCommandRegisterInBlockControlWindows;
1507*e985c628SWarner Losh   UINT64    StatusRegisterOffsetInBlockControlWindow;
1508*e985c628SWarner Losh   UINT64    SizeOfStatusRegisterInBlockControlWindows;
1509*e985c628SWarner Losh   UINT16    NVDIMMControlRegionFlag;
1510*e985c628SWarner Losh   UINT8     Reserved_74[6];
1511*e985c628SWarner Losh } EFI_ACPI_6_1_NFIT_NVDIMM_CONTROL_REGION_STRUCTURE;
1512*e985c628SWarner Losh 
1513*e985c628SWarner Losh //
1514*e985c628SWarner Losh // Definition for NVDIMM Block Data Window Region Structure
1515*e985c628SWarner Losh //
1516*e985c628SWarner Losh typedef struct {
1517*e985c628SWarner Losh   UINT16    Type;
1518*e985c628SWarner Losh   UINT16    Length;
1519*e985c628SWarner Losh   UINT16    NVDIMMControlRegionStructureIndex;
1520*e985c628SWarner Losh   UINT16    NumberOfBlockDataWindows;
1521*e985c628SWarner Losh   UINT64    BlockDataWindowStartOffset;
1522*e985c628SWarner Losh   UINT64    SizeOfBlockDataWindow;
1523*e985c628SWarner Losh   UINT64    BlockAccessibleMemoryCapacity;
1524*e985c628SWarner Losh   UINT64    BeginningAddressOfFirstBlockInBlockAccessibleMemory;
1525*e985c628SWarner Losh } EFI_ACPI_6_1_NFIT_NVDIMM_BLOCK_DATA_WINDOW_REGION_STRUCTURE;
1526*e985c628SWarner Losh 
1527*e985c628SWarner Losh //
1528*e985c628SWarner Losh // Definition for Flush Hint Address Structure
1529*e985c628SWarner Losh //
1530*e985c628SWarner Losh typedef struct {
1531*e985c628SWarner Losh   UINT16                             Type;
1532*e985c628SWarner Losh   UINT16                             Length;
1533*e985c628SWarner Losh   EFI_ACPI_6_1_NFIT_DEVICE_HANDLE    NFITDeviceHandle;
1534*e985c628SWarner Losh   UINT16                             NumberOfFlushHintAddresses;
1535*e985c628SWarner Losh   UINT8                              Reserved_10[6];
1536*e985c628SWarner Losh   // UINT64                                      FlushHintAddress[NumberOfFlushHintAddresses];
1537*e985c628SWarner Losh } EFI_ACPI_6_1_NFIT_FLUSH_HINT_ADDRESS_STRUCTURE;
1538*e985c628SWarner Losh 
1539*e985c628SWarner Losh ///
1540*e985c628SWarner Losh /// Boot Error Record Table (BERT)
1541*e985c628SWarner Losh ///
1542*e985c628SWarner Losh typedef struct {
1543*e985c628SWarner Losh   EFI_ACPI_DESCRIPTION_HEADER    Header;
1544*e985c628SWarner Losh   UINT32                         BootErrorRegionLength;
1545*e985c628SWarner Losh   UINT64                         BootErrorRegion;
1546*e985c628SWarner Losh } EFI_ACPI_6_1_BOOT_ERROR_RECORD_TABLE_HEADER;
1547*e985c628SWarner Losh 
1548*e985c628SWarner Losh ///
1549*e985c628SWarner Losh /// BERT Version (as defined in ACPI 6.1 spec.)
1550*e985c628SWarner Losh ///
1551*e985c628SWarner Losh #define EFI_ACPI_6_1_BOOT_ERROR_RECORD_TABLE_REVISION  0x01
1552*e985c628SWarner Losh 
1553*e985c628SWarner Losh ///
1554*e985c628SWarner Losh /// Boot Error Region Block Status Definition
1555*e985c628SWarner Losh ///
1556*e985c628SWarner Losh typedef struct {
1557*e985c628SWarner Losh   UINT32    UncorrectableErrorValid     : 1;
1558*e985c628SWarner Losh   UINT32    CorrectableErrorValid       : 1;
1559*e985c628SWarner Losh   UINT32    MultipleUncorrectableErrors : 1;
1560*e985c628SWarner Losh   UINT32    MultipleCorrectableErrors   : 1;
1561*e985c628SWarner Losh   UINT32    ErrorDataEntryCount         : 10;
1562*e985c628SWarner Losh   UINT32    Reserved                    : 18;
1563*e985c628SWarner Losh } EFI_ACPI_6_1_ERROR_BLOCK_STATUS;
1564*e985c628SWarner Losh 
1565*e985c628SWarner Losh ///
1566*e985c628SWarner Losh /// Boot Error Region Definition
1567*e985c628SWarner Losh ///
1568*e985c628SWarner Losh typedef struct {
1569*e985c628SWarner Losh   EFI_ACPI_6_1_ERROR_BLOCK_STATUS    BlockStatus;
1570*e985c628SWarner Losh   UINT32                             RawDataOffset;
1571*e985c628SWarner Losh   UINT32                             RawDataLength;
1572*e985c628SWarner Losh   UINT32                             DataLength;
1573*e985c628SWarner Losh   UINT32                             ErrorSeverity;
1574*e985c628SWarner Losh } EFI_ACPI_6_1_BOOT_ERROR_REGION_STRUCTURE;
1575*e985c628SWarner Losh 
1576*e985c628SWarner Losh //
1577*e985c628SWarner Losh // Boot Error Severity types
1578*e985c628SWarner Losh //
1579*e985c628SWarner Losh #define EFI_ACPI_6_1_ERROR_SEVERITY_RECOVERABLE  0x00
1580*e985c628SWarner Losh #define EFI_ACPI_6_1_ERROR_SEVERITY_FATAL        0x01
1581*e985c628SWarner Losh #define EFI_ACPI_6_1_ERROR_SEVERITY_CORRECTED    0x02
1582*e985c628SWarner Losh #define EFI_ACPI_6_1_ERROR_SEVERITY_NONE         0x03
1583*e985c628SWarner Losh //
1584*e985c628SWarner Losh // The term 'Correctable' is no longer being used as an error severity of the
1585*e985c628SWarner Losh // reported error since ACPI Specification Version 5.1 Errata B.
1586*e985c628SWarner Losh // The below macro is considered as deprecated and should no longer be used.
1587*e985c628SWarner Losh //
1588*e985c628SWarner Losh #define EFI_ACPI_6_1_ERROR_SEVERITY_CORRECTABLE  0x00
1589*e985c628SWarner Losh 
1590*e985c628SWarner Losh ///
1591*e985c628SWarner Losh /// Generic Error Data Entry Definition
1592*e985c628SWarner Losh ///
1593*e985c628SWarner Losh typedef struct {
1594*e985c628SWarner Losh   UINT8     SectionType[16];
1595*e985c628SWarner Losh   UINT32    ErrorSeverity;
1596*e985c628SWarner Losh   UINT16    Revision;
1597*e985c628SWarner Losh   UINT8     ValidationBits;
1598*e985c628SWarner Losh   UINT8     Flags;
1599*e985c628SWarner Losh   UINT32    ErrorDataLength;
1600*e985c628SWarner Losh   UINT8     FruId[16];
1601*e985c628SWarner Losh   UINT8     FruText[20];
1602*e985c628SWarner Losh   UINT8     Timestamp[8];
1603*e985c628SWarner Losh } EFI_ACPI_6_1_GENERIC_ERROR_DATA_ENTRY_STRUCTURE;
1604*e985c628SWarner Losh 
1605*e985c628SWarner Losh ///
1606*e985c628SWarner Losh /// Generic Error Data Entry Version (as defined in ACPI 6.1 spec.)
1607*e985c628SWarner Losh ///
1608*e985c628SWarner Losh #define EFI_ACPI_6_1_GENERIC_ERROR_DATA_ENTRY_REVISION  0x0300
1609*e985c628SWarner Losh 
1610*e985c628SWarner Losh ///
1611*e985c628SWarner Losh /// HEST - Hardware Error Source Table
1612*e985c628SWarner Losh ///
1613*e985c628SWarner Losh typedef struct {
1614*e985c628SWarner Losh   EFI_ACPI_DESCRIPTION_HEADER    Header;
1615*e985c628SWarner Losh   UINT32                         ErrorSourceCount;
1616*e985c628SWarner Losh } EFI_ACPI_6_1_HARDWARE_ERROR_SOURCE_TABLE_HEADER;
1617*e985c628SWarner Losh 
1618*e985c628SWarner Losh ///
1619*e985c628SWarner Losh /// HEST Version (as defined in ACPI 6.1 spec.)
1620*e985c628SWarner Losh ///
1621*e985c628SWarner Losh #define EFI_ACPI_6_1_HARDWARE_ERROR_SOURCE_TABLE_REVISION  0x01
1622*e985c628SWarner Losh 
1623*e985c628SWarner Losh //
1624*e985c628SWarner Losh // Error Source structure types.
1625*e985c628SWarner Losh //
1626*e985c628SWarner Losh #define EFI_ACPI_6_1_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION  0x00
1627*e985c628SWarner Losh #define EFI_ACPI_6_1_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK  0x01
1628*e985c628SWarner Losh #define EFI_ACPI_6_1_IA32_ARCHITECTURE_NMI_ERROR                0x02
1629*e985c628SWarner Losh #define EFI_ACPI_6_1_PCI_EXPRESS_ROOT_PORT_AER                  0x06
1630*e985c628SWarner Losh #define EFI_ACPI_6_1_PCI_EXPRESS_DEVICE_AER                     0x07
1631*e985c628SWarner Losh #define EFI_ACPI_6_1_PCI_EXPRESS_BRIDGE_AER                     0x08
1632*e985c628SWarner Losh #define EFI_ACPI_6_1_GENERIC_HARDWARE_ERROR                     0x09
1633*e985c628SWarner Losh #define EFI_ACPI_6_1_GENERIC_HARDWARE_ERROR_VERSION_2           0x0A
1634*e985c628SWarner Losh 
1635*e985c628SWarner Losh //
1636*e985c628SWarner Losh // Error Source structure flags.
1637*e985c628SWarner Losh //
1638*e985c628SWarner Losh #define EFI_ACPI_6_1_ERROR_SOURCE_FLAG_FIRMWARE_FIRST  (1 << 0)
1639*e985c628SWarner Losh #define EFI_ACPI_6_1_ERROR_SOURCE_FLAG_GLOBAL          (1 << 1)
1640*e985c628SWarner Losh 
1641*e985c628SWarner Losh ///
1642*e985c628SWarner Losh /// IA-32 Architecture Machine Check Exception Structure Definition
1643*e985c628SWarner Losh ///
1644*e985c628SWarner Losh typedef struct {
1645*e985c628SWarner Losh   UINT16    Type;
1646*e985c628SWarner Losh   UINT16    SourceId;
1647*e985c628SWarner Losh   UINT8     Reserved0[2];
1648*e985c628SWarner Losh   UINT8     Flags;
1649*e985c628SWarner Losh   UINT8     Enabled;
1650*e985c628SWarner Losh   UINT32    NumberOfRecordsToPreAllocate;
1651*e985c628SWarner Losh   UINT32    MaxSectionsPerRecord;
1652*e985c628SWarner Losh   UINT64    GlobalCapabilityInitData;
1653*e985c628SWarner Losh   UINT64    GlobalControlInitData;
1654*e985c628SWarner Losh   UINT8     NumberOfHardwareBanks;
1655*e985c628SWarner Losh   UINT8     Reserved1[7];
1656*e985c628SWarner Losh } EFI_ACPI_6_1_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION_STRUCTURE;
1657*e985c628SWarner Losh 
1658*e985c628SWarner Losh ///
1659*e985c628SWarner Losh /// IA-32 Architecture Machine Check Bank Structure Definition
1660*e985c628SWarner Losh ///
1661*e985c628SWarner Losh typedef struct {
1662*e985c628SWarner Losh   UINT8     BankNumber;
1663*e985c628SWarner Losh   UINT8     ClearStatusOnInitialization;
1664*e985c628SWarner Losh   UINT8     StatusDataFormat;
1665*e985c628SWarner Losh   UINT8     Reserved0;
1666*e985c628SWarner Losh   UINT32    ControlRegisterMsrAddress;
1667*e985c628SWarner Losh   UINT64    ControlInitData;
1668*e985c628SWarner Losh   UINT32    StatusRegisterMsrAddress;
1669*e985c628SWarner Losh   UINT32    AddressRegisterMsrAddress;
1670*e985c628SWarner Losh   UINT32    MiscRegisterMsrAddress;
1671*e985c628SWarner Losh } EFI_ACPI_6_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_BANK_STRUCTURE;
1672*e985c628SWarner Losh 
1673*e985c628SWarner Losh ///
1674*e985c628SWarner Losh /// IA-32 Architecture Machine Check Bank Structure MCA data format
1675*e985c628SWarner Losh ///
1676*e985c628SWarner Losh #define EFI_ACPI_6_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32     0x00
1677*e985c628SWarner Losh #define EFI_ACPI_6_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64  0x01
1678*e985c628SWarner Losh #define EFI_ACPI_6_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64    0x02
1679*e985c628SWarner Losh 
1680*e985c628SWarner Losh //
1681*e985c628SWarner Losh // Hardware Error Notification types. All other values are reserved
1682*e985c628SWarner Losh //
1683*e985c628SWarner Losh #define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_POLLED              0x00
1684*e985c628SWarner Losh #define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT  0x01
1685*e985c628SWarner Losh #define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT     0x02
1686*e985c628SWarner Losh #define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_SCI                 0x03
1687*e985c628SWarner Losh #define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_NMI                 0x04
1688*e985c628SWarner Losh #define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_CMCI                0x05
1689*e985c628SWarner Losh #define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_MCE                 0x06
1690*e985c628SWarner Losh #define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_GPIO_SIGNAL         0x07
1691*e985c628SWarner Losh #define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_ARMV8_SEA           0x08
1692*e985c628SWarner Losh #define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_ARMV8_SEI           0x09
1693*e985c628SWarner Losh #define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_GSIV                0x0A
1694*e985c628SWarner Losh 
1695*e985c628SWarner Losh ///
1696*e985c628SWarner Losh /// Hardware Error Notification Configuration Write Enable Structure Definition
1697*e985c628SWarner Losh ///
1698*e985c628SWarner Losh typedef struct {
1699*e985c628SWarner Losh   UINT16    Type                           : 1;
1700*e985c628SWarner Losh   UINT16    PollInterval                   : 1;
1701*e985c628SWarner Losh   UINT16    SwitchToPollingThresholdValue  : 1;
1702*e985c628SWarner Losh   UINT16    SwitchToPollingThresholdWindow : 1;
1703*e985c628SWarner Losh   UINT16    ErrorThresholdValue            : 1;
1704*e985c628SWarner Losh   UINT16    ErrorThresholdWindow           : 1;
1705*e985c628SWarner Losh   UINT16    Reserved                       : 10;
1706*e985c628SWarner Losh } EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE;
1707*e985c628SWarner Losh 
1708*e985c628SWarner Losh ///
1709*e985c628SWarner Losh /// Hardware Error Notification Structure Definition
1710*e985c628SWarner Losh ///
1711*e985c628SWarner Losh typedef struct {
1712*e985c628SWarner Losh   UINT8                                                                            Type;
1713*e985c628SWarner Losh   UINT8                                                                            Length;
1714*e985c628SWarner Losh   EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE    ConfigurationWriteEnable;
1715*e985c628SWarner Losh   UINT32                                                                           PollInterval;
1716*e985c628SWarner Losh   UINT32                                                                           Vector;
1717*e985c628SWarner Losh   UINT32                                                                           SwitchToPollingThresholdValue;
1718*e985c628SWarner Losh   UINT32                                                                           SwitchToPollingThresholdWindow;
1719*e985c628SWarner Losh   UINT32                                                                           ErrorThresholdValue;
1720*e985c628SWarner Losh   UINT32                                                                           ErrorThresholdWindow;
1721*e985c628SWarner Losh } EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_STRUCTURE;
1722*e985c628SWarner Losh 
1723*e985c628SWarner Losh ///
1724*e985c628SWarner Losh /// IA-32 Architecture Corrected Machine Check Structure Definition
1725*e985c628SWarner Losh ///
1726*e985c628SWarner Losh typedef struct {
1727*e985c628SWarner Losh   UINT16                                                Type;
1728*e985c628SWarner Losh   UINT16                                                SourceId;
1729*e985c628SWarner Losh   UINT8                                                 Reserved0[2];
1730*e985c628SWarner Losh   UINT8                                                 Flags;
1731*e985c628SWarner Losh   UINT8                                                 Enabled;
1732*e985c628SWarner Losh   UINT32                                                NumberOfRecordsToPreAllocate;
1733*e985c628SWarner Losh   UINT32                                                MaxSectionsPerRecord;
1734*e985c628SWarner Losh   EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_STRUCTURE    NotificationStructure;
1735*e985c628SWarner Losh   UINT8                                                 NumberOfHardwareBanks;
1736*e985c628SWarner Losh   UINT8                                                 Reserved1[3];
1737*e985c628SWarner Losh } EFI_ACPI_6_1_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK_STRUCTURE;
1738*e985c628SWarner Losh 
1739*e985c628SWarner Losh ///
1740*e985c628SWarner Losh /// IA-32 Architecture NMI Error Structure Definition
1741*e985c628SWarner Losh ///
1742*e985c628SWarner Losh typedef struct {
1743*e985c628SWarner Losh   UINT16    Type;
1744*e985c628SWarner Losh   UINT16    SourceId;
1745*e985c628SWarner Losh   UINT8     Reserved0[2];
1746*e985c628SWarner Losh   UINT32    NumberOfRecordsToPreAllocate;
1747*e985c628SWarner Losh   UINT32    MaxSectionsPerRecord;
1748*e985c628SWarner Losh   UINT32    MaxRawDataLength;
1749*e985c628SWarner Losh } EFI_ACPI_6_1_IA32_ARCHITECTURE_NMI_ERROR_STRUCTURE;
1750*e985c628SWarner Losh 
1751*e985c628SWarner Losh ///
1752*e985c628SWarner Losh /// PCI Express Root Port AER Structure Definition
1753*e985c628SWarner Losh ///
1754*e985c628SWarner Losh typedef struct {
1755*e985c628SWarner Losh   UINT16    Type;
1756*e985c628SWarner Losh   UINT16    SourceId;
1757*e985c628SWarner Losh   UINT8     Reserved0[2];
1758*e985c628SWarner Losh   UINT8     Flags;
1759*e985c628SWarner Losh   UINT8     Enabled;
1760*e985c628SWarner Losh   UINT32    NumberOfRecordsToPreAllocate;
1761*e985c628SWarner Losh   UINT32    MaxSectionsPerRecord;
1762*e985c628SWarner Losh   UINT32    Bus;
1763*e985c628SWarner Losh   UINT16    Device;
1764*e985c628SWarner Losh   UINT16    Function;
1765*e985c628SWarner Losh   UINT16    DeviceControl;
1766*e985c628SWarner Losh   UINT8     Reserved1[2];
1767*e985c628SWarner Losh   UINT32    UncorrectableErrorMask;
1768*e985c628SWarner Losh   UINT32    UncorrectableErrorSeverity;
1769*e985c628SWarner Losh   UINT32    CorrectableErrorMask;
1770*e985c628SWarner Losh   UINT32    AdvancedErrorCapabilitiesAndControl;
1771*e985c628SWarner Losh   UINT32    RootErrorCommand;
1772*e985c628SWarner Losh } EFI_ACPI_6_1_PCI_EXPRESS_ROOT_PORT_AER_STRUCTURE;
1773*e985c628SWarner Losh 
1774*e985c628SWarner Losh ///
1775*e985c628SWarner Losh /// PCI Express Device AER Structure Definition
1776*e985c628SWarner Losh ///
1777*e985c628SWarner Losh typedef struct {
1778*e985c628SWarner Losh   UINT16    Type;
1779*e985c628SWarner Losh   UINT16    SourceId;
1780*e985c628SWarner Losh   UINT8     Reserved0[2];
1781*e985c628SWarner Losh   UINT8     Flags;
1782*e985c628SWarner Losh   UINT8     Enabled;
1783*e985c628SWarner Losh   UINT32    NumberOfRecordsToPreAllocate;
1784*e985c628SWarner Losh   UINT32    MaxSectionsPerRecord;
1785*e985c628SWarner Losh   UINT32    Bus;
1786*e985c628SWarner Losh   UINT16    Device;
1787*e985c628SWarner Losh   UINT16    Function;
1788*e985c628SWarner Losh   UINT16    DeviceControl;
1789*e985c628SWarner Losh   UINT8     Reserved1[2];
1790*e985c628SWarner Losh   UINT32    UncorrectableErrorMask;
1791*e985c628SWarner Losh   UINT32    UncorrectableErrorSeverity;
1792*e985c628SWarner Losh   UINT32    CorrectableErrorMask;
1793*e985c628SWarner Losh   UINT32    AdvancedErrorCapabilitiesAndControl;
1794*e985c628SWarner Losh } EFI_ACPI_6_1_PCI_EXPRESS_DEVICE_AER_STRUCTURE;
1795*e985c628SWarner Losh 
1796*e985c628SWarner Losh ///
1797*e985c628SWarner Losh /// PCI Express Bridge AER Structure Definition
1798*e985c628SWarner Losh ///
1799*e985c628SWarner Losh typedef struct {
1800*e985c628SWarner Losh   UINT16    Type;
1801*e985c628SWarner Losh   UINT16    SourceId;
1802*e985c628SWarner Losh   UINT8     Reserved0[2];
1803*e985c628SWarner Losh   UINT8     Flags;
1804*e985c628SWarner Losh   UINT8     Enabled;
1805*e985c628SWarner Losh   UINT32    NumberOfRecordsToPreAllocate;
1806*e985c628SWarner Losh   UINT32    MaxSectionsPerRecord;
1807*e985c628SWarner Losh   UINT32    Bus;
1808*e985c628SWarner Losh   UINT16    Device;
1809*e985c628SWarner Losh   UINT16    Function;
1810*e985c628SWarner Losh   UINT16    DeviceControl;
1811*e985c628SWarner Losh   UINT8     Reserved1[2];
1812*e985c628SWarner Losh   UINT32    UncorrectableErrorMask;
1813*e985c628SWarner Losh   UINT32    UncorrectableErrorSeverity;
1814*e985c628SWarner Losh   UINT32    CorrectableErrorMask;
1815*e985c628SWarner Losh   UINT32    AdvancedErrorCapabilitiesAndControl;
1816*e985c628SWarner Losh   UINT32    SecondaryUncorrectableErrorMask;
1817*e985c628SWarner Losh   UINT32    SecondaryUncorrectableErrorSeverity;
1818*e985c628SWarner Losh   UINT32    SecondaryAdvancedErrorCapabilitiesAndControl;
1819*e985c628SWarner Losh } EFI_ACPI_6_1_PCI_EXPRESS_BRIDGE_AER_STRUCTURE;
1820*e985c628SWarner Losh 
1821*e985c628SWarner Losh ///
1822*e985c628SWarner Losh /// Generic Hardware Error Source Structure Definition
1823*e985c628SWarner Losh ///
1824*e985c628SWarner Losh typedef struct {
1825*e985c628SWarner Losh   UINT16                                                Type;
1826*e985c628SWarner Losh   UINT16                                                SourceId;
1827*e985c628SWarner Losh   UINT16                                                RelatedSourceId;
1828*e985c628SWarner Losh   UINT8                                                 Flags;
1829*e985c628SWarner Losh   UINT8                                                 Enabled;
1830*e985c628SWarner Losh   UINT32                                                NumberOfRecordsToPreAllocate;
1831*e985c628SWarner Losh   UINT32                                                MaxSectionsPerRecord;
1832*e985c628SWarner Losh   UINT32                                                MaxRawDataLength;
1833*e985c628SWarner Losh   EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE                ErrorStatusAddress;
1834*e985c628SWarner Losh   EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_STRUCTURE    NotificationStructure;
1835*e985c628SWarner Losh   UINT32                                                ErrorStatusBlockLength;
1836*e985c628SWarner Losh } EFI_ACPI_6_1_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE;
1837*e985c628SWarner Losh 
1838*e985c628SWarner Losh ///
1839*e985c628SWarner Losh /// Generic Hardware Error Source Version 2 Structure Definition
1840*e985c628SWarner Losh ///
1841*e985c628SWarner Losh typedef struct {
1842*e985c628SWarner Losh   UINT16                                                Type;
1843*e985c628SWarner Losh   UINT16                                                SourceId;
1844*e985c628SWarner Losh   UINT16                                                RelatedSourceId;
1845*e985c628SWarner Losh   UINT8                                                 Flags;
1846*e985c628SWarner Losh   UINT8                                                 Enabled;
1847*e985c628SWarner Losh   UINT32                                                NumberOfRecordsToPreAllocate;
1848*e985c628SWarner Losh   UINT32                                                MaxSectionsPerRecord;
1849*e985c628SWarner Losh   UINT32                                                MaxRawDataLength;
1850*e985c628SWarner Losh   EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE                ErrorStatusAddress;
1851*e985c628SWarner Losh   EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_STRUCTURE    NotificationStructure;
1852*e985c628SWarner Losh   UINT32                                                ErrorStatusBlockLength;
1853*e985c628SWarner Losh   EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE                ReadAckRegister;
1854*e985c628SWarner Losh   UINT64                                                ReadAckPreserve;
1855*e985c628SWarner Losh   UINT64                                                ReadAckWrite;
1856*e985c628SWarner Losh } EFI_ACPI_6_1_GENERIC_HARDWARE_ERROR_SOURCE_VERSION_2_STRUCTURE;
1857*e985c628SWarner Losh 
1858*e985c628SWarner Losh ///
1859*e985c628SWarner Losh /// Generic Error Status Definition
1860*e985c628SWarner Losh ///
1861*e985c628SWarner Losh typedef struct {
1862*e985c628SWarner Losh   EFI_ACPI_6_1_ERROR_BLOCK_STATUS    BlockStatus;
1863*e985c628SWarner Losh   UINT32                             RawDataOffset;
1864*e985c628SWarner Losh   UINT32                             RawDataLength;
1865*e985c628SWarner Losh   UINT32                             DataLength;
1866*e985c628SWarner Losh   UINT32                             ErrorSeverity;
1867*e985c628SWarner Losh } EFI_ACPI_6_1_GENERIC_ERROR_STATUS_STRUCTURE;
1868*e985c628SWarner Losh 
1869*e985c628SWarner Losh ///
1870*e985c628SWarner Losh /// ERST - Error Record Serialization Table
1871*e985c628SWarner Losh ///
1872*e985c628SWarner Losh typedef struct {
1873*e985c628SWarner Losh   EFI_ACPI_DESCRIPTION_HEADER    Header;
1874*e985c628SWarner Losh   UINT32                         SerializationHeaderSize;
1875*e985c628SWarner Losh   UINT8                          Reserved0[4];
1876*e985c628SWarner Losh   UINT32                         InstructionEntryCount;
1877*e985c628SWarner Losh } EFI_ACPI_6_1_ERROR_RECORD_SERIALIZATION_TABLE_HEADER;
1878*e985c628SWarner Losh 
1879*e985c628SWarner Losh ///
1880*e985c628SWarner Losh /// ERST Version (as defined in ACPI 6.1 spec.)
1881*e985c628SWarner Losh ///
1882*e985c628SWarner Losh #define EFI_ACPI_6_1_ERROR_RECORD_SERIALIZATION_TABLE_REVISION  0x01
1883*e985c628SWarner Losh 
1884*e985c628SWarner Losh ///
1885*e985c628SWarner Losh /// ERST Serialization Actions
1886*e985c628SWarner Losh ///
1887*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_BEGIN_WRITE_OPERATION                   0x00
1888*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_BEGIN_READ_OPERATION                    0x01
1889*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_BEGIN_CLEAR_OPERATION                   0x02
1890*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_END_OPERATION                           0x03
1891*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_SET_RECORD_OFFSET                       0x04
1892*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_EXECUTE_OPERATION                       0x05
1893*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_CHECK_BUSY_STATUS                       0x06
1894*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_GET_COMMAND_STATUS                      0x07
1895*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_GET_RECORD_IDENTIFIER                   0x08
1896*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_SET_RECORD_IDENTIFIER                   0x09
1897*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_GET_RECORD_COUNT                        0x0A
1898*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_BEGIN_DUMMY_WRITE_OPERATION             0x0B
1899*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_GET_ERROR_LOG_ADDRESS_RANGE             0x0D
1900*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH      0x0E
1901*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES  0x0F
1902*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_GET_EXECUTE_OPERATION_TIMINGS           0x10
1903*e985c628SWarner Losh 
1904*e985c628SWarner Losh ///
1905*e985c628SWarner Losh /// ERST Action Command Status
1906*e985c628SWarner Losh ///
1907*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_STATUS_SUCCESS                 0x00
1908*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_STATUS_NOT_ENOUGH_SPACE        0x01
1909*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_STATUS_HARDWARE_NOT_AVAILABLE  0x02
1910*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_STATUS_FAILED                  0x03
1911*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_STATUS_RECORD_STORE_EMPTY      0x04
1912*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_STATUS_RECORD_NOT_FOUND        0x05
1913*e985c628SWarner Losh 
1914*e985c628SWarner Losh ///
1915*e985c628SWarner Losh /// ERST Serialization Instructions
1916*e985c628SWarner Losh ///
1917*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_READ_REGISTER                  0x00
1918*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_READ_REGISTER_VALUE            0x01
1919*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_WRITE_REGISTER                 0x02
1920*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_WRITE_REGISTER_VALUE           0x03
1921*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_NOOP                           0x04
1922*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_LOAD_VAR1                      0x05
1923*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_LOAD_VAR2                      0x06
1924*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_STORE_VAR1                     0x07
1925*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_ADD                            0x08
1926*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_SUBTRACT                       0x09
1927*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_ADD_VALUE                      0x0A
1928*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_SUBTRACT_VALUE                 0x0B
1929*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_STALL                          0x0C
1930*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_STALL_WHILE_TRUE               0x0D
1931*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE  0x0E
1932*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_GOTO                           0x0F
1933*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_SET_SRC_ADDRESS_BASE           0x10
1934*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_SET_DST_ADDRESS_BASE           0x11
1935*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_MOVE_DATA                      0x12
1936*e985c628SWarner Losh 
1937*e985c628SWarner Losh ///
1938*e985c628SWarner Losh /// ERST Instruction Flags
1939*e985c628SWarner Losh ///
1940*e985c628SWarner Losh #define EFI_ACPI_6_1_ERST_PRESERVE_REGISTER  0x01
1941*e985c628SWarner Losh 
1942*e985c628SWarner Losh ///
1943*e985c628SWarner Losh /// ERST Serialization Instruction Entry
1944*e985c628SWarner Losh ///
1945*e985c628SWarner Losh typedef struct {
1946*e985c628SWarner Losh   UINT8                                     SerializationAction;
1947*e985c628SWarner Losh   UINT8                                     Instruction;
1948*e985c628SWarner Losh   UINT8                                     Flags;
1949*e985c628SWarner Losh   UINT8                                     Reserved0;
1950*e985c628SWarner Losh   EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE    RegisterRegion;
1951*e985c628SWarner Losh   UINT64                                    Value;
1952*e985c628SWarner Losh   UINT64                                    Mask;
1953*e985c628SWarner Losh } EFI_ACPI_6_1_ERST_SERIALIZATION_INSTRUCTION_ENTRY;
1954*e985c628SWarner Losh 
1955*e985c628SWarner Losh ///
1956*e985c628SWarner Losh /// EINJ - Error Injection Table
1957*e985c628SWarner Losh ///
1958*e985c628SWarner Losh typedef struct {
1959*e985c628SWarner Losh   EFI_ACPI_DESCRIPTION_HEADER    Header;
1960*e985c628SWarner Losh   UINT32                         InjectionHeaderSize;
1961*e985c628SWarner Losh   UINT8                          InjectionFlags;
1962*e985c628SWarner Losh   UINT8                          Reserved0[3];
1963*e985c628SWarner Losh   UINT32                         InjectionEntryCount;
1964*e985c628SWarner Losh } EFI_ACPI_6_1_ERROR_INJECTION_TABLE_HEADER;
1965*e985c628SWarner Losh 
1966*e985c628SWarner Losh ///
1967*e985c628SWarner Losh /// EINJ Version (as defined in ACPI 6.1 spec.)
1968*e985c628SWarner Losh ///
1969*e985c628SWarner Losh #define EFI_ACPI_6_1_ERROR_INJECTION_TABLE_REVISION  0x01
1970*e985c628SWarner Losh 
1971*e985c628SWarner Losh ///
1972*e985c628SWarner Losh /// EINJ Error Injection Actions
1973*e985c628SWarner Losh ///
1974*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_BEGIN_INJECTION_OPERATION       0x00
1975*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE  0x01
1976*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_SET_ERROR_TYPE                  0x02
1977*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_GET_ERROR_TYPE                  0x03
1978*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_END_OPERATION                   0x04
1979*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_EXECUTE_OPERATION               0x05
1980*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_CHECK_BUSY_STATUS               0x06
1981*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_GET_COMMAND_STATUS              0x07
1982*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_SET_ERROR_TYPE_WITH_ADDRESS     0x08
1983*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_GET_EXECUTE_OPERATION_TIMINGS   0x09
1984*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_TRIGGER_ERROR                   0xFF
1985*e985c628SWarner Losh 
1986*e985c628SWarner Losh ///
1987*e985c628SWarner Losh /// EINJ Action Command Status
1988*e985c628SWarner Losh ///
1989*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_STATUS_SUCCESS          0x00
1990*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_STATUS_UNKNOWN_FAILURE  0x01
1991*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_STATUS_INVALID_ACCESS   0x02
1992*e985c628SWarner Losh 
1993*e985c628SWarner Losh ///
1994*e985c628SWarner Losh /// EINJ Error Type Definition
1995*e985c628SWarner Losh ///
1996*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_ERROR_PROCESSOR_CORRECTABLE               (1 << 0)
1997*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL    (1 << 1)
1998*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL       (1 << 2)
1999*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_ERROR_MEMORY_CORRECTABLE                  (1 << 3)
2000*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL       (1 << 4)
2001*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL          (1 << 5)
2002*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE             (1 << 6)
2003*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL  (1 << 7)
2004*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL     (1 << 8)
2005*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_ERROR_PLATFORM_CORRECTABLE                (1 << 9)
2006*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL     (1 << 10)
2007*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL        (1 << 11)
2008*e985c628SWarner Losh 
2009*e985c628SWarner Losh ///
2010*e985c628SWarner Losh /// EINJ Injection Instructions
2011*e985c628SWarner Losh ///
2012*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_READ_REGISTER         0x00
2013*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_READ_REGISTER_VALUE   0x01
2014*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_WRITE_REGISTER        0x02
2015*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_WRITE_REGISTER_VALUE  0x03
2016*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_NOOP                  0x04
2017*e985c628SWarner Losh 
2018*e985c628SWarner Losh ///
2019*e985c628SWarner Losh /// EINJ Instruction Flags
2020*e985c628SWarner Losh ///
2021*e985c628SWarner Losh #define EFI_ACPI_6_1_EINJ_PRESERVE_REGISTER  0x01
2022*e985c628SWarner Losh 
2023*e985c628SWarner Losh ///
2024*e985c628SWarner Losh /// EINJ Injection Instruction Entry
2025*e985c628SWarner Losh ///
2026*e985c628SWarner Losh typedef struct {
2027*e985c628SWarner Losh   UINT8                                     InjectionAction;
2028*e985c628SWarner Losh   UINT8                                     Instruction;
2029*e985c628SWarner Losh   UINT8                                     Flags;
2030*e985c628SWarner Losh   UINT8                                     Reserved0;
2031*e985c628SWarner Losh   EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE    RegisterRegion;
2032*e985c628SWarner Losh   UINT64                                    Value;
2033*e985c628SWarner Losh   UINT64                                    Mask;
2034*e985c628SWarner Losh } EFI_ACPI_6_1_EINJ_INJECTION_INSTRUCTION_ENTRY;
2035*e985c628SWarner Losh 
2036*e985c628SWarner Losh ///
2037*e985c628SWarner Losh /// EINJ Trigger Action Table
2038*e985c628SWarner Losh ///
2039*e985c628SWarner Losh typedef struct {
2040*e985c628SWarner Losh   UINT32    HeaderSize;
2041*e985c628SWarner Losh   UINT32    Revision;
2042*e985c628SWarner Losh   UINT32    TableSize;
2043*e985c628SWarner Losh   UINT32    EntryCount;
2044*e985c628SWarner Losh } EFI_ACPI_6_1_EINJ_TRIGGER_ACTION_TABLE;
2045*e985c628SWarner Losh 
2046*e985c628SWarner Losh ///
2047*e985c628SWarner Losh /// Platform Communications Channel Table (PCCT)
2048*e985c628SWarner Losh ///
2049*e985c628SWarner Losh typedef struct {
2050*e985c628SWarner Losh   EFI_ACPI_DESCRIPTION_HEADER    Header;
2051*e985c628SWarner Losh   UINT32                         Flags;
2052*e985c628SWarner Losh   UINT64                         Reserved;
2053*e985c628SWarner Losh } EFI_ACPI_6_1_PLATFORM_COMMUNICATION_CHANNEL_TABLE_HEADER;
2054*e985c628SWarner Losh 
2055*e985c628SWarner Losh ///
2056*e985c628SWarner Losh /// PCCT Version (as defined in ACPI 6.1 spec.)
2057*e985c628SWarner Losh ///
2058*e985c628SWarner Losh #define EFI_ACPI_6_1_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION  0x01
2059*e985c628SWarner Losh 
2060*e985c628SWarner Losh ///
2061*e985c628SWarner Losh /// PCCT Global Flags
2062*e985c628SWarner Losh ///
2063*e985c628SWarner Losh #define EFI_ACPI_6_1_PCCT_FLAGS_SCI_DOORBELL  BIT0
2064*e985c628SWarner Losh 
2065*e985c628SWarner Losh //
2066*e985c628SWarner Losh // PCCT Subspace type
2067*e985c628SWarner Losh //
2068*e985c628SWarner Losh #define EFI_ACPI_6_1_PCCT_SUBSPACE_TYPE_GENERIC                      0x00
2069*e985c628SWarner Losh #define EFI_ACPI_6_1_PCCT_SUBSPACE_TYPE_1_HW_REDUCED_COMMUNICATIONS  0x01
2070*e985c628SWarner Losh #define EFI_ACPI_6_1_PCCT_SUBSPACE_TYPE_2_HW_REDUCED_COMMUNICATIONS  0x02
2071*e985c628SWarner Losh 
2072*e985c628SWarner Losh ///
2073*e985c628SWarner Losh /// PCC Subspace Structure Header
2074*e985c628SWarner Losh ///
2075*e985c628SWarner Losh typedef struct {
2076*e985c628SWarner Losh   UINT8    Type;
2077*e985c628SWarner Losh   UINT8    Length;
2078*e985c628SWarner Losh } EFI_ACPI_6_1_PCCT_SUBSPACE_HEADER;
2079*e985c628SWarner Losh 
2080*e985c628SWarner Losh ///
2081*e985c628SWarner Losh /// Generic Communications Subspace Structure
2082*e985c628SWarner Losh ///
2083*e985c628SWarner Losh typedef struct {
2084*e985c628SWarner Losh   UINT8                                     Type;
2085*e985c628SWarner Losh   UINT8                                     Length;
2086*e985c628SWarner Losh   UINT8                                     Reserved[6];
2087*e985c628SWarner Losh   UINT64                                    BaseAddress;
2088*e985c628SWarner Losh   UINT64                                    AddressLength;
2089*e985c628SWarner Losh   EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE    DoorbellRegister;
2090*e985c628SWarner Losh   UINT64                                    DoorbellPreserve;
2091*e985c628SWarner Losh   UINT64                                    DoorbellWrite;
2092*e985c628SWarner Losh   UINT32                                    NominalLatency;
2093*e985c628SWarner Losh   UINT32                                    MaximumPeriodicAccessRate;
2094*e985c628SWarner Losh   UINT16                                    MinimumRequestTurnaroundTime;
2095*e985c628SWarner Losh } EFI_ACPI_6_1_PCCT_SUBSPACE_GENERIC;
2096*e985c628SWarner Losh 
2097*e985c628SWarner Losh ///
2098*e985c628SWarner Losh /// Generic Communications Channel Shared Memory Region
2099*e985c628SWarner Losh ///
2100*e985c628SWarner Losh 
2101*e985c628SWarner Losh typedef struct {
2102*e985c628SWarner Losh   UINT8    Command;
2103*e985c628SWarner Losh   UINT8    Reserved    : 7;
2104*e985c628SWarner Losh   UINT8    GenerateSci : 1;
2105*e985c628SWarner Losh } EFI_ACPI_6_1_PCCT_GENERIC_SHARED_MEMORY_REGION_COMMAND;
2106*e985c628SWarner Losh 
2107*e985c628SWarner Losh typedef struct {
2108*e985c628SWarner Losh   UINT8    CommandComplete      : 1;
2109*e985c628SWarner Losh   UINT8    SciDoorbell          : 1;
2110*e985c628SWarner Losh   UINT8    Error                : 1;
2111*e985c628SWarner Losh   UINT8    PlatformNotification : 1;
2112*e985c628SWarner Losh   UINT8    Reserved             : 4;
2113*e985c628SWarner Losh   UINT8    Reserved1;
2114*e985c628SWarner Losh } EFI_ACPI_6_1_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS;
2115*e985c628SWarner Losh 
2116*e985c628SWarner Losh typedef struct {
2117*e985c628SWarner Losh   UINT32                                                    Signature;
2118*e985c628SWarner Losh   EFI_ACPI_6_1_PCCT_GENERIC_SHARED_MEMORY_REGION_COMMAND    Command;
2119*e985c628SWarner Losh   EFI_ACPI_6_1_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS     Status;
2120*e985c628SWarner Losh } EFI_ACPI_6_1_PCCT_GENERIC_SHARED_MEMORY_REGION_HEADER;
2121*e985c628SWarner Losh 
2122*e985c628SWarner Losh #define EFI_ACPI_6_1_PCCT_SUBSPACE_DOORBELL_INTERRUPT_FLAGS_POLARITY  BIT0
2123*e985c628SWarner Losh #define EFI_ACPI_6_1_PCCT_SUBSPACE_DOORBELL_INTERRUPT_FLAGS_MODE      BIT1
2124*e985c628SWarner Losh 
2125*e985c628SWarner Losh ///
2126*e985c628SWarner Losh /// Type 1 HW-Reduced Communications Subspace Structure
2127*e985c628SWarner Losh ///
2128*e985c628SWarner Losh typedef struct {
2129*e985c628SWarner Losh   UINT8                                     Type;
2130*e985c628SWarner Losh   UINT8                                     Length;
2131*e985c628SWarner Losh   UINT32                                    DoorbellInterrupt;
2132*e985c628SWarner Losh   UINT8                                     DoorbellInterruptFlags;
2133*e985c628SWarner Losh   UINT8                                     Reserved;
2134*e985c628SWarner Losh   UINT64                                    BaseAddress;
2135*e985c628SWarner Losh   UINT64                                    AddressLength;
2136*e985c628SWarner Losh   EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE    DoorbellRegister;
2137*e985c628SWarner Losh   UINT64                                    DoorbellPreserve;
2138*e985c628SWarner Losh   UINT64                                    DoorbellWrite;
2139*e985c628SWarner Losh   UINT32                                    NominalLatency;
2140*e985c628SWarner Losh   UINT32                                    MaximumPeriodicAccessRate;
2141*e985c628SWarner Losh   UINT16                                    MinimumRequestTurnaroundTime;
2142*e985c628SWarner Losh } EFI_ACPI_6_1_PCCT_SUBSPACE_1_HW_REDUCED_COMMUNICATIONS;
2143*e985c628SWarner Losh 
2144*e985c628SWarner Losh ///
2145*e985c628SWarner Losh /// Type 2 HW-Reduced Communications Subspace Structure
2146*e985c628SWarner Losh ///
2147*e985c628SWarner Losh typedef struct {
2148*e985c628SWarner Losh   UINT8                                     Type;
2149*e985c628SWarner Losh   UINT8                                     Length;
2150*e985c628SWarner Losh   UINT32                                    DoorbellInterrupt;
2151*e985c628SWarner Losh   UINT8                                     DoorbellInterruptFlags;
2152*e985c628SWarner Losh   UINT8                                     Reserved;
2153*e985c628SWarner Losh   UINT64                                    BaseAddress;
2154*e985c628SWarner Losh   UINT64                                    AddressLength;
2155*e985c628SWarner Losh   EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE    DoorbellRegister;
2156*e985c628SWarner Losh   UINT64                                    DoorbellPreserve;
2157*e985c628SWarner Losh   UINT64                                    DoorbellWrite;
2158*e985c628SWarner Losh   UINT32                                    NominalLatency;
2159*e985c628SWarner Losh   UINT32                                    MaximumPeriodicAccessRate;
2160*e985c628SWarner Losh   UINT16                                    MinimumRequestTurnaroundTime;
2161*e985c628SWarner Losh   EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE    DoorbellAckRegister;
2162*e985c628SWarner Losh   UINT64                                    DoorbellAckPreserve;
2163*e985c628SWarner Losh   UINT64                                    DoorbellAckWrite;
2164*e985c628SWarner Losh } EFI_ACPI_6_1_PCCT_SUBSPACE_2_HW_REDUCED_COMMUNICATIONS;
2165*e985c628SWarner Losh 
2166*e985c628SWarner Losh //
2167*e985c628SWarner Losh // Known table signatures
2168*e985c628SWarner Losh //
2169*e985c628SWarner Losh 
2170*e985c628SWarner Losh ///
2171*e985c628SWarner Losh /// "RSD PTR " Root System Description Pointer
2172*e985c628SWarner Losh ///
2173*e985c628SWarner Losh #define EFI_ACPI_6_1_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE  SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
2174*e985c628SWarner Losh 
2175*e985c628SWarner Losh ///
2176*e985c628SWarner Losh /// "APIC" Multiple APIC Description Table
2177*e985c628SWarner Losh ///
2178*e985c628SWarner Losh #define EFI_ACPI_6_1_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('A', 'P', 'I', 'C')
2179*e985c628SWarner Losh 
2180*e985c628SWarner Losh ///
2181*e985c628SWarner Losh /// "BERT" Boot Error Record Table
2182*e985c628SWarner Losh ///
2183*e985c628SWarner Losh #define EFI_ACPI_6_1_BOOT_ERROR_RECORD_TABLE_SIGNATURE  SIGNATURE_32('B', 'E', 'R', 'T')
2184*e985c628SWarner Losh 
2185*e985c628SWarner Losh ///
2186*e985c628SWarner Losh /// "BGRT" Boot Graphics Resource Table
2187*e985c628SWarner Losh ///
2188*e985c628SWarner Losh #define EFI_ACPI_6_1_BOOT_GRAPHICS_RESOURCE_TABLE_SIGNATURE  SIGNATURE_32('B', 'G', 'R', 'T')
2189*e985c628SWarner Losh 
2190*e985c628SWarner Losh ///
2191*e985c628SWarner Losh /// "CPEP" Corrected Platform Error Polling Table
2192*e985c628SWarner Losh ///
2193*e985c628SWarner Losh #define EFI_ACPI_6_1_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_SIGNATURE  SIGNATURE_32('C', 'P', 'E', 'P')
2194*e985c628SWarner Losh 
2195*e985c628SWarner Losh ///
2196*e985c628SWarner Losh /// "DSDT" Differentiated System Description Table
2197*e985c628SWarner Losh ///
2198*e985c628SWarner Losh #define EFI_ACPI_6_1_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('D', 'S', 'D', 'T')
2199*e985c628SWarner Losh 
2200*e985c628SWarner Losh ///
2201*e985c628SWarner Losh /// "ECDT" Embedded Controller Boot Resources Table
2202*e985c628SWarner Losh ///
2203*e985c628SWarner Losh #define EFI_ACPI_6_1_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE  SIGNATURE_32('E', 'C', 'D', 'T')
2204*e985c628SWarner Losh 
2205*e985c628SWarner Losh ///
2206*e985c628SWarner Losh /// "EINJ" Error Injection Table
2207*e985c628SWarner Losh ///
2208*e985c628SWarner Losh #define EFI_ACPI_6_1_ERROR_INJECTION_TABLE_SIGNATURE  SIGNATURE_32('E', 'I', 'N', 'J')
2209*e985c628SWarner Losh 
2210*e985c628SWarner Losh ///
2211*e985c628SWarner Losh /// "ERST" Error Record Serialization Table
2212*e985c628SWarner Losh ///
2213*e985c628SWarner Losh #define EFI_ACPI_6_1_ERROR_RECORD_SERIALIZATION_TABLE_SIGNATURE  SIGNATURE_32('E', 'R', 'S', 'T')
2214*e985c628SWarner Losh 
2215*e985c628SWarner Losh ///
2216*e985c628SWarner Losh /// "FACP" Fixed ACPI Description Table
2217*e985c628SWarner Losh ///
2218*e985c628SWarner Losh #define EFI_ACPI_6_1_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('F', 'A', 'C', 'P')
2219*e985c628SWarner Losh 
2220*e985c628SWarner Losh ///
2221*e985c628SWarner Losh /// "FACS" Firmware ACPI Control Structure
2222*e985c628SWarner Losh ///
2223*e985c628SWarner Losh #define EFI_ACPI_6_1_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE  SIGNATURE_32('F', 'A', 'C', 'S')
2224*e985c628SWarner Losh 
2225*e985c628SWarner Losh ///
2226*e985c628SWarner Losh /// "FPDT" Firmware Performance Data Table
2227*e985c628SWarner Losh ///
2228*e985c628SWarner Losh #define EFI_ACPI_6_1_FIRMWARE_PERFORMANCE_DATA_TABLE_SIGNATURE  SIGNATURE_32('F', 'P', 'D', 'T')
2229*e985c628SWarner Losh 
2230*e985c628SWarner Losh ///
2231*e985c628SWarner Losh /// "GTDT" Generic Timer Description Table
2232*e985c628SWarner Losh ///
2233*e985c628SWarner Losh #define EFI_ACPI_6_1_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('G', 'T', 'D', 'T')
2234*e985c628SWarner Losh 
2235*e985c628SWarner Losh ///
2236*e985c628SWarner Losh /// "HEST" Hardware Error Source Table
2237*e985c628SWarner Losh ///
2238*e985c628SWarner Losh #define EFI_ACPI_6_1_HARDWARE_ERROR_SOURCE_TABLE_SIGNATURE  SIGNATURE_32('H', 'E', 'S', 'T')
2239*e985c628SWarner Losh 
2240*e985c628SWarner Losh ///
2241*e985c628SWarner Losh /// "MPST" Memory Power State Table
2242*e985c628SWarner Losh ///
2243*e985c628SWarner Losh #define EFI_ACPI_6_1_MEMORY_POWER_STATE_TABLE_SIGNATURE  SIGNATURE_32('M', 'P', 'S', 'T')
2244*e985c628SWarner Losh 
2245*e985c628SWarner Losh ///
2246*e985c628SWarner Losh /// "MSCT" Maximum System Characteristics Table
2247*e985c628SWarner Losh ///
2248*e985c628SWarner Losh #define EFI_ACPI_6_1_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_SIGNATURE  SIGNATURE_32('M', 'S', 'C', 'T')
2249*e985c628SWarner Losh 
2250*e985c628SWarner Losh ///
2251*e985c628SWarner Losh /// "NFIT" NVDIMM Firmware Interface Table
2252*e985c628SWarner Losh ///
2253*e985c628SWarner Losh #define EFI_ACPI_6_1_NVDIMM_FIRMWARE_INTERFACE_TABLE_STRUCTURE_SIGNATURE  SIGNATURE_32('N', 'F', 'I', 'T')
2254*e985c628SWarner Losh 
2255*e985c628SWarner Losh ///
2256*e985c628SWarner Losh /// "PMTT" Platform Memory Topology Table
2257*e985c628SWarner Losh ///
2258*e985c628SWarner Losh #define EFI_ACPI_6_1_PLATFORM_MEMORY_TOPOLOGY_TABLE_SIGNATURE  SIGNATURE_32('P', 'M', 'T', 'T')
2259*e985c628SWarner Losh 
2260*e985c628SWarner Losh ///
2261*e985c628SWarner Losh /// "PSDT" Persistent System Description Table
2262*e985c628SWarner Losh ///
2263*e985c628SWarner Losh #define EFI_ACPI_6_1_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('P', 'S', 'D', 'T')
2264*e985c628SWarner Losh 
2265*e985c628SWarner Losh ///
2266*e985c628SWarner Losh /// "RASF" ACPI RAS Feature Table
2267*e985c628SWarner Losh ///
2268*e985c628SWarner Losh #define EFI_ACPI_6_1_ACPI_RAS_FEATURE_TABLE_SIGNATURE  SIGNATURE_32('R', 'A', 'S', 'F')
2269*e985c628SWarner Losh 
2270*e985c628SWarner Losh ///
2271*e985c628SWarner Losh /// "RSDT" Root System Description Table
2272*e985c628SWarner Losh ///
2273*e985c628SWarner Losh #define EFI_ACPI_6_1_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('R', 'S', 'D', 'T')
2274*e985c628SWarner Losh 
2275*e985c628SWarner Losh ///
2276*e985c628SWarner Losh /// "SBST" Smart Battery Specification Table
2277*e985c628SWarner Losh ///
2278*e985c628SWarner Losh #define EFI_ACPI_6_1_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE  SIGNATURE_32('S', 'B', 'S', 'T')
2279*e985c628SWarner Losh 
2280*e985c628SWarner Losh ///
2281*e985c628SWarner Losh /// "SLIT" System Locality Information Table
2282*e985c628SWarner Losh ///
2283*e985c628SWarner Losh #define EFI_ACPI_6_1_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE  SIGNATURE_32('S', 'L', 'I', 'T')
2284*e985c628SWarner Losh 
2285*e985c628SWarner Losh ///
2286*e985c628SWarner Losh /// "SRAT" System Resource Affinity Table
2287*e985c628SWarner Losh ///
2288*e985c628SWarner Losh #define EFI_ACPI_6_1_SYSTEM_RESOURCE_AFFINITY_TABLE_SIGNATURE  SIGNATURE_32('S', 'R', 'A', 'T')
2289*e985c628SWarner Losh 
2290*e985c628SWarner Losh ///
2291*e985c628SWarner Losh /// "SSDT" Secondary System Description Table
2292*e985c628SWarner Losh ///
2293*e985c628SWarner Losh #define EFI_ACPI_6_1_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('S', 'S', 'D', 'T')
2294*e985c628SWarner Losh 
2295*e985c628SWarner Losh ///
2296*e985c628SWarner Losh /// "XSDT" Extended System Description Table
2297*e985c628SWarner Losh ///
2298*e985c628SWarner Losh #define EFI_ACPI_6_1_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('X', 'S', 'D', 'T')
2299*e985c628SWarner Losh 
2300*e985c628SWarner Losh ///
2301*e985c628SWarner Losh /// "BOOT" MS Simple Boot Spec
2302*e985c628SWarner Losh ///
2303*e985c628SWarner Losh #define EFI_ACPI_6_1_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE  SIGNATURE_32('B', 'O', 'O', 'T')
2304*e985c628SWarner Losh 
2305*e985c628SWarner Losh ///
2306*e985c628SWarner Losh /// "CSRT" MS Core System Resource Table
2307*e985c628SWarner Losh ///
2308*e985c628SWarner Losh #define EFI_ACPI_6_1_CORE_SYSTEM_RESOURCE_TABLE_SIGNATURE  SIGNATURE_32('C', 'S', 'R', 'T')
2309*e985c628SWarner Losh 
2310*e985c628SWarner Losh ///
2311*e985c628SWarner Losh /// "DBG2" MS Debug Port 2 Spec
2312*e985c628SWarner Losh ///
2313*e985c628SWarner Losh #define EFI_ACPI_6_1_DEBUG_PORT_2_TABLE_SIGNATURE  SIGNATURE_32('D', 'B', 'G', '2')
2314*e985c628SWarner Losh 
2315*e985c628SWarner Losh ///
2316*e985c628SWarner Losh /// "DBGP" MS Debug Port Spec
2317*e985c628SWarner Losh ///
2318*e985c628SWarner Losh #define EFI_ACPI_6_1_DEBUG_PORT_TABLE_SIGNATURE  SIGNATURE_32('D', 'B', 'G', 'P')
2319*e985c628SWarner Losh 
2320*e985c628SWarner Losh ///
2321*e985c628SWarner Losh /// "DMAR" DMA Remapping Table
2322*e985c628SWarner Losh ///
2323*e985c628SWarner Losh #define EFI_ACPI_6_1_DMA_REMAPPING_TABLE_SIGNATURE  SIGNATURE_32('D', 'M', 'A', 'R')
2324*e985c628SWarner Losh 
2325*e985c628SWarner Losh ///
2326*e985c628SWarner Losh /// "DRTM" Dynamic Root of Trust for Measurement Table
2327*e985c628SWarner Losh ///
2328*e985c628SWarner Losh #define EFI_ACPI_6_1_DYNAMIC_ROOT_OF_TRUST_FOR_MEASUREMENT_TABLE_SIGNATURE  SIGNATURE_32('D', 'R', 'T', 'M')
2329*e985c628SWarner Losh 
2330*e985c628SWarner Losh ///
2331*e985c628SWarner Losh /// "ETDT" Event Timer Description Table
2332*e985c628SWarner Losh ///
2333*e985c628SWarner Losh #define EFI_ACPI_6_1_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('E', 'T', 'D', 'T')
2334*e985c628SWarner Losh 
2335*e985c628SWarner Losh ///
2336*e985c628SWarner Losh /// "HPET" IA-PC High Precision Event Timer Table
2337*e985c628SWarner Losh ///
2338*e985c628SWarner Losh #define EFI_ACPI_6_1_HIGH_PRECISION_EVENT_TIMER_TABLE_SIGNATURE  SIGNATURE_32('H', 'P', 'E', 'T')
2339*e985c628SWarner Losh 
2340*e985c628SWarner Losh ///
2341*e985c628SWarner Losh /// "iBFT" iSCSI Boot Firmware Table
2342*e985c628SWarner Losh ///
2343*e985c628SWarner Losh #define EFI_ACPI_6_1_ISCSI_BOOT_FIRMWARE_TABLE_SIGNATURE  SIGNATURE_32('i', 'B', 'F', 'T')
2344*e985c628SWarner Losh 
2345*e985c628SWarner Losh ///
2346*e985c628SWarner Losh /// "IORT" I/O Remapping Table
2347*e985c628SWarner Losh ///
2348*e985c628SWarner Losh #define EFI_ACPI_6_1_IO_REMAPPING_TABLE_SIGNATURE  SIGNATURE_32('I', 'O', 'R', 'T')
2349*e985c628SWarner Losh 
2350*e985c628SWarner Losh ///
2351*e985c628SWarner Losh /// "IVRS" I/O Virtualization Reporting Structure
2352*e985c628SWarner Losh ///
2353*e985c628SWarner Losh #define EFI_ACPI_6_1_IO_VIRTUALIZATION_REPORTING_STRUCTURE_SIGNATURE  SIGNATURE_32('I', 'V', 'R', 'S')
2354*e985c628SWarner Losh 
2355*e985c628SWarner Losh ///
2356*e985c628SWarner Losh /// "LPIT" Low Power Idle Table
2357*e985c628SWarner Losh ///
2358*e985c628SWarner Losh #define EFI_ACPI_6_1_LOW_POWER_IDLE_TABLE_STRUCTURE_SIGNATURE  SIGNATURE_32('L', 'P', 'I', 'T')
2359*e985c628SWarner Losh 
2360*e985c628SWarner Losh ///
2361*e985c628SWarner Losh /// "MCFG" PCI Express Memory Mapped Configuration Space Base Address Description Table
2362*e985c628SWarner Losh ///
2363*e985c628SWarner Losh #define EFI_ACPI_6_1_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('M', 'C', 'F', 'G')
2364*e985c628SWarner Losh 
2365*e985c628SWarner Losh ///
2366*e985c628SWarner Losh /// "MCHI" Management Controller Host Interface Table
2367*e985c628SWarner Losh ///
2368*e985c628SWarner Losh #define EFI_ACPI_6_1_MANAGEMENT_CONTROLLER_HOST_INTERFACE_TABLE_SIGNATURE  SIGNATURE_32('M', 'C', 'H', 'I')
2369*e985c628SWarner Losh 
2370*e985c628SWarner Losh ///
2371*e985c628SWarner Losh /// "MSDM" MS Data Management Table
2372*e985c628SWarner Losh ///
2373*e985c628SWarner Losh #define EFI_ACPI_6_1_DATA_MANAGEMENT_TABLE_SIGNATURE  SIGNATURE_32('M', 'S', 'D', 'M')
2374*e985c628SWarner Losh 
2375*e985c628SWarner Losh ///
2376*e985c628SWarner Losh /// "PCCT" Platform Communications Channel Table
2377*e985c628SWarner Losh ///
2378*e985c628SWarner Losh #define EFI_ACPI_6_1_PLATFORM_COMMUNICATIONS_CHANNEL_TABLE_SIGNATURE  SIGNATURE_32('P', 'C', 'C', 'T')
2379*e985c628SWarner Losh 
2380*e985c628SWarner Losh ///
2381*e985c628SWarner Losh /// "SLIC" MS Software Licensing Table Specification
2382*e985c628SWarner Losh ///
2383*e985c628SWarner Losh #define EFI_ACPI_6_1_SOFTWARE_LICENSING_TABLE_SIGNATURE  SIGNATURE_32('S', 'L', 'I', 'C')
2384*e985c628SWarner Losh 
2385*e985c628SWarner Losh ///
2386*e985c628SWarner Losh /// "SPCR" Serial Port Console Redirection Table
2387*e985c628SWarner Losh ///
2388*e985c628SWarner Losh #define EFI_ACPI_6_1_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE  SIGNATURE_32('S', 'P', 'C', 'R')
2389*e985c628SWarner Losh 
2390*e985c628SWarner Losh ///
2391*e985c628SWarner Losh /// "SPMI" Server Platform Management Interface Table
2392*e985c628SWarner Losh ///
2393*e985c628SWarner Losh #define EFI_ACPI_6_1_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE_SIGNATURE  SIGNATURE_32('S', 'P', 'M', 'I')
2394*e985c628SWarner Losh 
2395*e985c628SWarner Losh ///
2396*e985c628SWarner Losh /// "STAO" _STA Override Table
2397*e985c628SWarner Losh ///
2398*e985c628SWarner Losh #define EFI_ACPI_6_1_STA_OVERRIDE_TABLE_SIGNATURE  SIGNATURE_32('S', 'T', 'A', 'O')
2399*e985c628SWarner Losh 
2400*e985c628SWarner Losh ///
2401*e985c628SWarner Losh /// "TCPA" Trusted Computing Platform Alliance Capabilities Table
2402*e985c628SWarner Losh ///
2403*e985c628SWarner Losh #define EFI_ACPI_6_1_TRUSTED_COMPUTING_PLATFORM_ALLIANCE_CAPABILITIES_TABLE_SIGNATURE  SIGNATURE_32('T', 'C', 'P', 'A')
2404*e985c628SWarner Losh 
2405*e985c628SWarner Losh ///
2406*e985c628SWarner Losh /// "TPM2" Trusted Computing Platform 1 Table
2407*e985c628SWarner Losh ///
2408*e985c628SWarner Losh #define EFI_ACPI_6_1_TRUSTED_COMPUTING_PLATFORM_2_TABLE_SIGNATURE  SIGNATURE_32('T', 'P', 'M', '2')
2409*e985c628SWarner Losh 
2410*e985c628SWarner Losh ///
2411*e985c628SWarner Losh /// "UEFI" UEFI ACPI Data Table
2412*e985c628SWarner Losh ///
2413*e985c628SWarner Losh #define EFI_ACPI_6_1_UEFI_ACPI_DATA_TABLE_SIGNATURE  SIGNATURE_32('U', 'E', 'F', 'I')
2414*e985c628SWarner Losh 
2415*e985c628SWarner Losh ///
2416*e985c628SWarner Losh /// "WAET" Windows ACPI Emulated Devices Table
2417*e985c628SWarner Losh ///
2418*e985c628SWarner Losh #define EFI_ACPI_6_1_WINDOWS_ACPI_EMULATED_DEVICES_TABLE_SIGNATURE  SIGNATURE_32('W', 'A', 'E', 'T')
2419*e985c628SWarner Losh 
2420*e985c628SWarner Losh ///
2421*e985c628SWarner Losh /// "WDAT" Watchdog Action Table
2422*e985c628SWarner Losh ///
2423*e985c628SWarner Losh #define EFI_ACPI_6_1_WATCHDOG_ACTION_TABLE_SIGNATURE  SIGNATURE_32('W', 'D', 'A', 'T')
2424*e985c628SWarner Losh 
2425*e985c628SWarner Losh ///
2426*e985c628SWarner Losh /// "WDRT" Watchdog Resource Table
2427*e985c628SWarner Losh ///
2428*e985c628SWarner Losh #define EFI_ACPI_6_1_WATCHDOG_RESOURCE_TABLE_SIGNATURE  SIGNATURE_32('W', 'D', 'R', 'T')
2429*e985c628SWarner Losh 
2430*e985c628SWarner Losh ///
2431*e985c628SWarner Losh /// "WPBT" MS Platform Binary Table
2432*e985c628SWarner Losh ///
2433*e985c628SWarner Losh #define EFI_ACPI_6_1_PLATFORM_BINARY_TABLE_SIGNATURE  SIGNATURE_32('W', 'P', 'B', 'T')
2434*e985c628SWarner Losh 
2435*e985c628SWarner Losh ///
2436*e985c628SWarner Losh /// "XENV" Xen Project Table
2437*e985c628SWarner Losh ///
2438*e985c628SWarner Losh #define EFI_ACPI_6_1_XEN_PROJECT_TABLE_SIGNATURE  SIGNATURE_32('X', 'E', 'N', 'V')
2439*e985c628SWarner Losh 
2440*e985c628SWarner Losh #pragma pack()
2441*e985c628SWarner Losh 
2442*e985c628SWarner Losh #endif
2443