blob: 5e3493afd8fc2f4aed6ea4aba25a4a9882f80df9 [file] [log] [blame]
Ronak Kanabar1ae366f2023-06-07 01:21:56 +05301/** @file
2 ACPI 4.0 definitions from the ACPI Specification Revision 4.0a April 5, 2010
3
4 Copyright (c) 2010 - 2022, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6**/
7
8#ifndef _ACPI_4_0_H_
9#define _ACPI_4_0_H_
10
11#include <IndustryStandard/Acpi30.h>
12
13//
14// Ensure proper structure formats
15//
16#pragma pack(1)
17
18///
19/// ACPI 4.0 Generic Address Space definition
20///
21typedef struct {
22 UINT8 AddressSpaceId;
23 UINT8 RegisterBitWidth;
24 UINT8 RegisterBitOffset;
25 UINT8 AccessSize;
26 UINT64 Address;
27} EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE;
28
29//
30// Generic Address Space Address IDs
31//
32#define EFI_ACPI_4_0_SYSTEM_MEMORY 0
33#define EFI_ACPI_4_0_SYSTEM_IO 1
34#define EFI_ACPI_4_0_PCI_CONFIGURATION_SPACE 2
35#define EFI_ACPI_4_0_EMBEDDED_CONTROLLER 3
36#define EFI_ACPI_4_0_SMBUS 4
37#define EFI_ACPI_4_0_FUNCTIONAL_FIXED_HARDWARE 0x7F
38
39//
40// Generic Address Space Access Sizes
41//
42#define EFI_ACPI_4_0_UNDEFINED 0
43#define EFI_ACPI_4_0_BYTE 1
44#define EFI_ACPI_4_0_WORD 2
45#define EFI_ACPI_4_0_DWORD 3
46#define EFI_ACPI_4_0_QWORD 4
47
48//
49// ACPI 4.0 table structures
50//
51
52///
53/// Root System Description Pointer Structure
54///
55typedef struct {
56 UINT64 Signature;
57 UINT8 Checksum;
58 UINT8 OemId[6];
59 UINT8 Revision;
60 UINT32 RsdtAddress;
61 UINT32 Length;
62 UINT64 XsdtAddress;
63 UINT8 ExtendedChecksum;
64 UINT8 Reserved[3];
65} EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
66
67///
68/// RSD_PTR Revision (as defined in ACPI 4.0b spec.)
69///
70#define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 4.0a) says current value is 2
71
72///
73/// Common table header, this prefaces all ACPI tables, including FACS, but
74/// excluding the RSD PTR structure
75///
76typedef struct {
77 UINT32 Signature;
78 UINT32 Length;
79} EFI_ACPI_4_0_COMMON_HEADER;
80
81//
82// Root System Description Table
83// No definition needed as it is a common description table header, the same with
84// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
85//
86
87///
88/// RSDT Revision (as defined in ACPI 4.0 spec.)
89///
90#define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
91
92//
93// Extended System Description Table
94// No definition needed as it is a common description table header, the same with
95// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
96//
97
98///
99/// XSDT Revision (as defined in ACPI 4.0 spec.)
100///
101#define EFI_ACPI_4_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
102
103///
104/// Fixed ACPI Description Table Structure (FADT)
105///
106typedef struct {
107 EFI_ACPI_DESCRIPTION_HEADER Header;
108 UINT32 FirmwareCtrl;
109 UINT32 Dsdt;
110 UINT8 Reserved0;
111 UINT8 PreferredPmProfile;
112 UINT16 SciInt;
113 UINT32 SmiCmd;
114 UINT8 AcpiEnable;
115 UINT8 AcpiDisable;
116 UINT8 S4BiosReq;
117 UINT8 PstateCnt;
118 UINT32 Pm1aEvtBlk;
119 UINT32 Pm1bEvtBlk;
120 UINT32 Pm1aCntBlk;
121 UINT32 Pm1bCntBlk;
122 UINT32 Pm2CntBlk;
123 UINT32 PmTmrBlk;
124 UINT32 Gpe0Blk;
125 UINT32 Gpe1Blk;
126 UINT8 Pm1EvtLen;
127 UINT8 Pm1CntLen;
128 UINT8 Pm2CntLen;
129 UINT8 PmTmrLen;
130 UINT8 Gpe0BlkLen;
131 UINT8 Gpe1BlkLen;
132 UINT8 Gpe1Base;
133 UINT8 CstCnt;
134 UINT16 PLvl2Lat;
135 UINT16 PLvl3Lat;
136 UINT16 FlushSize;
137 UINT16 FlushStride;
138 UINT8 DutyOffset;
139 UINT8 DutyWidth;
140 UINT8 DayAlrm;
141 UINT8 MonAlrm;
142 UINT8 Century;
143 UINT16 IaPcBootArch;
144 UINT8 Reserved1;
145 UINT32 Flags;
146 EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE ResetReg;
147 UINT8 ResetValue;
148 UINT8 Reserved2[3];
149 UINT64 XFirmwareCtrl;
150 UINT64 XDsdt;
151 EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk;
152 EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk;
153 EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk;
154 EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk;
155 EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk;
156 EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk;
157 EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk;
158 EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk;
159} EFI_ACPI_4_0_FIXED_ACPI_DESCRIPTION_TABLE;
160
161///
162/// FADT Version (as defined in ACPI 4.0 spec.)
163///
164#define EFI_ACPI_4_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x04
165
166//
167// Fixed ACPI Description Table Preferred Power Management Profile
168//
169#define EFI_ACPI_4_0_PM_PROFILE_UNSPECIFIED 0
170#define EFI_ACPI_4_0_PM_PROFILE_DESKTOP 1
171#define EFI_ACPI_4_0_PM_PROFILE_MOBILE 2
172#define EFI_ACPI_4_0_PM_PROFILE_WORKSTATION 3
173#define EFI_ACPI_4_0_PM_PROFILE_ENTERPRISE_SERVER 4
174#define EFI_ACPI_4_0_PM_PROFILE_SOHO_SERVER 5
175#define EFI_ACPI_4_0_PM_PROFILE_APPLIANCE_PC 6
176#define EFI_ACPI_4_0_PM_PROFILE_PERFORMANCE_SERVER 7
177
178//
179// Fixed ACPI Description Table Boot Architecture Flags
180// All other bits are reserved and must be set to 0.
181//
182#define EFI_ACPI_4_0_LEGACY_DEVICES BIT0
183#define EFI_ACPI_4_0_8042 BIT1
184#define EFI_ACPI_4_0_VGA_NOT_PRESENT BIT2
185#define EFI_ACPI_4_0_MSI_NOT_SUPPORTED BIT3
186#define EFI_ACPI_4_0_PCIE_ASPM_CONTROLS BIT4
187
188//
189// Fixed ACPI Description Table Fixed Feature Flags
190// All other bits are reserved and must be set to 0.
191//
192#define EFI_ACPI_4_0_WBINVD BIT0
193#define EFI_ACPI_4_0_WBINVD_FLUSH BIT1
194#define EFI_ACPI_4_0_PROC_C1 BIT2
195#define EFI_ACPI_4_0_P_LVL2_UP BIT3
196#define EFI_ACPI_4_0_PWR_BUTTON BIT4
197#define EFI_ACPI_4_0_SLP_BUTTON BIT5
198#define EFI_ACPI_4_0_FIX_RTC BIT6
199#define EFI_ACPI_4_0_RTC_S4 BIT7
200#define EFI_ACPI_4_0_TMR_VAL_EXT BIT8
201#define EFI_ACPI_4_0_DCK_CAP BIT9
202#define EFI_ACPI_4_0_RESET_REG_SUP BIT10
203#define EFI_ACPI_4_0_SEALED_CASE BIT11
204#define EFI_ACPI_4_0_HEADLESS BIT12
205#define EFI_ACPI_4_0_CPU_SW_SLP BIT13
206#define EFI_ACPI_4_0_PCI_EXP_WAK BIT14
207#define EFI_ACPI_4_0_USE_PLATFORM_CLOCK BIT15
208#define EFI_ACPI_4_0_S4_RTC_STS_VALID BIT16
209#define EFI_ACPI_4_0_REMOTE_POWER_ON_CAPABLE BIT17
210#define EFI_ACPI_4_0_FORCE_APIC_CLUSTER_MODEL BIT18
211#define EFI_ACPI_4_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19
212
213///
214/// Firmware ACPI Control Structure
215///
216typedef struct {
217 UINT32 Signature;
218 UINT32 Length;
219 UINT32 HardwareSignature;
220 UINT32 FirmwareWakingVector;
221 UINT32 GlobalLock;
222 UINT32 Flags;
223 UINT64 XFirmwareWakingVector;
224 UINT8 Version;
225 UINT8 Reserved0[3];
226 UINT32 OspmFlags;
227 UINT8 Reserved1[24];
228} EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE;
229
230///
231/// FACS Version (as defined in ACPI 4.0 spec.)
232///
233#define EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION 0x02
234
235///
236/// Firmware Control Structure Feature Flags
237/// All other bits are reserved and must be set to 0.
238///
239#define EFI_ACPI_4_0_S4BIOS_F BIT0
240#define EFI_ACPI_4_0_64BIT_WAKE_SUPPORTED_F BIT1
241
242///
243/// OSPM Enabled Firmware Control Structure Flags
244/// All other bits are reserved and must be set to 0.
245///
246#define EFI_ACPI_4_0_OSPM_64BIT_WAKE__F BIT0
247
248//
249// Differentiated System Description Table,
250// Secondary System Description Table
251// and Persistent System Description Table,
252// no definition needed as they are common description table header, the same with
253// EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block.
254//
255#define EFI_ACPI_4_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
256#define EFI_ACPI_4_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
257
258///
259/// Multiple APIC Description Table header definition. The rest of the table
260/// must be defined in a platform specific manner.
261///
262typedef struct {
263 EFI_ACPI_DESCRIPTION_HEADER Header;
264 UINT32 LocalApicAddress;
265 UINT32 Flags;
266} EFI_ACPI_4_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
267
268///
269/// MADT Revision (as defined in ACPI 4.0 spec.)
270///
271#define EFI_ACPI_4_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x03
272
273///
274/// Multiple APIC Flags
275/// All other bits are reserved and must be set to 0.
276///
277#define EFI_ACPI_4_0_PCAT_COMPAT BIT0
278
279//
280// Multiple APIC Description Table APIC structure types
281// All other values between 0x0B an 0xFF are reserved and
282// will be ignored by OSPM.
283//
284#define EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC 0x00
285#define EFI_ACPI_4_0_IO_APIC 0x01
286#define EFI_ACPI_4_0_INTERRUPT_SOURCE_OVERRIDE 0x02
287#define EFI_ACPI_4_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03
288#define EFI_ACPI_4_0_LOCAL_APIC_NMI 0x04
289#define EFI_ACPI_4_0_LOCAL_APIC_ADDRESS_OVERRIDE 0x05
290#define EFI_ACPI_4_0_IO_SAPIC 0x06
291#define EFI_ACPI_4_0_LOCAL_SAPIC 0x07
292#define EFI_ACPI_4_0_PLATFORM_INTERRUPT_SOURCES 0x08
293#define EFI_ACPI_4_0_PROCESSOR_LOCAL_X2APIC 0x09
294#define EFI_ACPI_4_0_LOCAL_X2APIC_NMI 0x0A
295
296//
297// APIC Structure Definitions
298//
299
300///
301/// Processor Local APIC Structure Definition
302///
303typedef struct {
304 UINT8 Type;
305 UINT8 Length;
306 UINT8 AcpiProcessorId;
307 UINT8 ApicId;
308 UINT32 Flags;
309} EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC_STRUCTURE;
310
311///
312/// Local APIC Flags. All other bits are reserved and must be 0.
313///
314#define EFI_ACPI_4_0_LOCAL_APIC_ENABLED BIT0
315
316///
317/// IO APIC Structure
318///
319typedef struct {
320 UINT8 Type;
321 UINT8 Length;
322 UINT8 IoApicId;
323 UINT8 Reserved;
324 UINT32 IoApicAddress;
325 UINT32 GlobalSystemInterruptBase;
326} EFI_ACPI_4_0_IO_APIC_STRUCTURE;
327
328///
329/// Interrupt Source Override Structure
330///
331typedef struct {
332 UINT8 Type;
333 UINT8 Length;
334 UINT8 Bus;
335 UINT8 Source;
336 UINT32 GlobalSystemInterrupt;
337 UINT16 Flags;
338} EFI_ACPI_4_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
339
340///
341/// Platform Interrupt Sources Structure Definition
342///
343typedef struct {
344 UINT8 Type;
345 UINT8 Length;
346 UINT16 Flags;
347 UINT8 InterruptType;
348 UINT8 ProcessorId;
349 UINT8 ProcessorEid;
350 UINT8 IoSapicVector;
351 UINT32 GlobalSystemInterrupt;
352 UINT32 PlatformInterruptSourceFlags;
353 UINT8 CpeiProcessorOverride;
354 UINT8 Reserved[31];
355} EFI_ACPI_4_0_PLATFORM_INTERRUPT_APIC_STRUCTURE;
356
357//
358// MPS INTI flags.
359// All other bits are reserved and must be set to 0.
360//
361#define EFI_ACPI_4_0_POLARITY (3 << 0)
362#define EFI_ACPI_4_0_TRIGGER_MODE (3 << 2)
363
364///
365/// Non-Maskable Interrupt Source Structure
366///
367typedef struct {
368 UINT8 Type;
369 UINT8 Length;
370 UINT16 Flags;
371 UINT32 GlobalSystemInterrupt;
372} EFI_ACPI_4_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
373
374///
375/// Local APIC NMI Structure
376///
377typedef struct {
378 UINT8 Type;
379 UINT8 Length;
380 UINT8 AcpiProcessorId;
381 UINT16 Flags;
382 UINT8 LocalApicLint;
383} EFI_ACPI_4_0_LOCAL_APIC_NMI_STRUCTURE;
384
385///
386/// Local APIC Address Override Structure
387///
388typedef struct {
389 UINT8 Type;
390 UINT8 Length;
391 UINT16 Reserved;
392 UINT64 LocalApicAddress;
393} EFI_ACPI_4_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE;
394
395///
396/// IO SAPIC Structure
397///
398typedef struct {
399 UINT8 Type;
400 UINT8 Length;
401 UINT8 IoApicId;
402 UINT8 Reserved;
403 UINT32 GlobalSystemInterruptBase;
404 UINT64 IoSapicAddress;
405} EFI_ACPI_4_0_IO_SAPIC_STRUCTURE;
406
407///
408/// Local SAPIC Structure
409/// This struct followed by a null-terminated ASCII string - ACPI Processor UID String
410///
411typedef struct {
412 UINT8 Type;
413 UINT8 Length;
414 UINT8 AcpiProcessorId;
415 UINT8 LocalSapicId;
416 UINT8 LocalSapicEid;
417 UINT8 Reserved[3];
418 UINT32 Flags;
419 UINT32 ACPIProcessorUIDValue;
420} EFI_ACPI_4_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE;
421
422///
423/// Platform Interrupt Sources Structure
424///
425typedef struct {
426 UINT8 Type;
427 UINT8 Length;
428 UINT16 Flags;
429 UINT8 InterruptType;
430 UINT8 ProcessorId;
431 UINT8 ProcessorEid;
432 UINT8 IoSapicVector;
433 UINT32 GlobalSystemInterrupt;
434 UINT32 PlatformInterruptSourceFlags;
435} EFI_ACPI_4_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE;
436
437///
438/// Platform Interrupt Source Flags.
439/// All other bits are reserved and must be set to 0.
440///
441#define EFI_ACPI_4_0_CPEI_PROCESSOR_OVERRIDE BIT0
442
443///
444/// Processor Local x2APIC Structure Definition
445///
446typedef struct {
447 UINT8 Type;
448 UINT8 Length;
449 UINT8 Reserved[2];
450 UINT32 X2ApicId;
451 UINT32 Flags;
452 UINT32 AcpiProcessorUid;
453} EFI_ACPI_4_0_PROCESSOR_LOCAL_X2APIC_STRUCTURE;
454
455///
456/// Local x2APIC NMI Structure
457///
458typedef struct {
459 UINT8 Type;
460 UINT8 Length;
461 UINT16 Flags;
462 UINT32 AcpiProcessorUid;
463 UINT8 LocalX2ApicLint;
464 UINT8 Reserved[3];
465} EFI_ACPI_4_0_LOCAL_X2APIC_NMI_STRUCTURE;
466
467///
468/// Smart Battery Description Table (SBST)
469///
470typedef struct {
471 EFI_ACPI_DESCRIPTION_HEADER Header;
472 UINT32 WarningEnergyLevel;
473 UINT32 LowEnergyLevel;
474 UINT32 CriticalEnergyLevel;
475} EFI_ACPI_4_0_SMART_BATTERY_DESCRIPTION_TABLE;
476
477///
478/// SBST Version (as defined in ACPI 4.0 spec.)
479///
480#define EFI_ACPI_4_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
481
482///
483/// Embedded Controller Boot Resources Table (ECDT)
484/// The table is followed by a null terminated ASCII string that contains
485/// a fully qualified reference to the name space object.
486///
487typedef struct {
488 EFI_ACPI_DESCRIPTION_HEADER Header;
489 EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE EcControl;
490 EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE EcData;
491 UINT32 Uid;
492 UINT8 GpeBit;
493} EFI_ACPI_4_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE;
494
495///
496/// ECDT Version (as defined in ACPI 4.0 spec.)
497///
498#define EFI_ACPI_4_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION 0x01
499
500///
501/// System Resource Affinity Table (SRAT. The rest of the table
502/// must be defined in a platform specific manner.
503///
504typedef struct {
505 EFI_ACPI_DESCRIPTION_HEADER Header;
506 UINT32 Reserved1; ///< Must be set to 1
507 UINT64 Reserved2;
508} EFI_ACPI_4_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER;
509
510///
511/// SRAT Version (as defined in ACPI 4.0 spec.)
512///
513#define EFI_ACPI_4_0_SYSTEM_RESOURCE_AFFINITY_TABLE_REVISION 0x03
514
515//
516// SRAT structure types.
517// All other values between 0x03 an 0xFF are reserved and
518// will be ignored by OSPM.
519//
520#define EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY 0x00
521#define EFI_ACPI_4_0_MEMORY_AFFINITY 0x01
522#define EFI_ACPI_4_0_PROCESSOR_LOCAL_X2APIC_AFFINITY 0x02
523
524///
525/// Processor Local APIC/SAPIC Affinity Structure Definition
526///
527typedef struct {
528 UINT8 Type;
529 UINT8 Length;
530 UINT8 ProximityDomain7To0;
531 UINT8 ApicId;
532 UINT32 Flags;
533 UINT8 LocalSapicEid;
534 UINT8 ProximityDomain31To8[3];
535 UINT32 ClockDomain;
536} EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE;
537
538///
539/// Local APIC/SAPIC Flags. All other bits are reserved and must be 0.
540///
541#define EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
542
543///
544/// Memory Affinity Structure Definition
545///
546typedef struct {
547 UINT8 Type;
548 UINT8 Length;
549 UINT32 ProximityDomain;
550 UINT16 Reserved1;
551 UINT32 AddressBaseLow;
552 UINT32 AddressBaseHigh;
553 UINT32 LengthLow;
554 UINT32 LengthHigh;
555 UINT32 Reserved2;
556 UINT32 Flags;
557 UINT64 Reserved3;
558} EFI_ACPI_4_0_MEMORY_AFFINITY_STRUCTURE;
559
560//
561// Memory Flags. All other bits are reserved and must be 0.
562//
563#define EFI_ACPI_4_0_MEMORY_ENABLED (1 << 0)
564#define EFI_ACPI_4_0_MEMORY_HOT_PLUGGABLE (1 << 1)
565#define EFI_ACPI_4_0_MEMORY_NONVOLATILE (1 << 2)
566
567///
568/// Processor Local x2APIC Affinity Structure Definition
569///
570typedef struct {
571 UINT8 Type;
572 UINT8 Length;
573 UINT8 Reserved1[2];
574 UINT32 ProximityDomain;
575 UINT32 X2ApicId;
576 UINT32 Flags;
577 UINT32 ClockDomain;
578 UINT8 Reserved2[4];
579} EFI_ACPI_4_0_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE;
580
581///
582/// System Locality Distance Information Table (SLIT).
583/// The rest of the table is a matrix.
584///
585typedef struct {
586 EFI_ACPI_DESCRIPTION_HEADER Header;
587 UINT64 NumberOfSystemLocalities;
588} EFI_ACPI_4_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER;
589
590///
591/// SLIT Version (as defined in ACPI 4.0 spec.)
592///
593#define EFI_ACPI_4_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_REVISION 0x01
594
595///
596/// Corrected Platform Error Polling Table (CPEP)
597///
598typedef struct {
599 EFI_ACPI_DESCRIPTION_HEADER Header;
600 UINT8 Reserved[8];
601} EFI_ACPI_4_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_HEADER;
602
603///
604/// CPEP Version (as defined in ACPI 4.0 spec.)
605///
606#define EFI_ACPI_4_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01
607
608//
609// CPEP processor structure types.
610//
611#define EFI_ACPI_4_0_CPEP_PROCESSOR_APIC_SAPIC 0x00
612
613///
614/// Corrected Platform Error Polling Processor Structure Definition
615///
616typedef struct {
617 UINT8 Type;
618 UINT8 Length;
619 UINT8 ProcessorId;
620 UINT8 ProcessorEid;
621 UINT32 PollingInterval;
622} EFI_ACPI_4_0_CPEP_PROCESSOR_APIC_SAPIC_STRUCTURE;
623
624///
625/// Maximum System Characteristics Table (MSCT)
626///
627typedef struct {
628 EFI_ACPI_DESCRIPTION_HEADER Header;
629 UINT32 OffsetProxDomInfo;
630 UINT32 MaximumNumberOfProximityDomains;
631 UINT32 MaximumNumberOfClockDomains;
632 UINT64 MaximumPhysicalAddress;
633} EFI_ACPI_4_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_HEADER;
634
635///
636/// MSCT Version (as defined in ACPI 4.0 spec.)
637///
638#define EFI_ACPI_4_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01
639
640///
641/// Maximum Proximity Domain Information Structure Definition
642///
643typedef struct {
644 UINT8 Revision;
645 UINT8 Length;
646 UINT32 ProximityDomainRangeLow;
647 UINT32 ProximityDomainRangeHigh;
648 UINT32 MaximumProcessorCapacity;
649 UINT64 MaximumMemoryCapacity;
650} EFI_ACPI_4_0_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE;
651
652///
653/// Boot Error Record Table (BERT)
654///
655typedef struct {
656 EFI_ACPI_DESCRIPTION_HEADER Header;
657 UINT32 BootErrorRegionLength;
658 UINT64 BootErrorRegion;
659} EFI_ACPI_4_0_BOOT_ERROR_RECORD_TABLE_HEADER;
660
661///
662/// BERT Version (as defined in ACPI 4.0 spec.)
663///
664#define EFI_ACPI_4_0_BOOT_ERROR_RECORD_TABLE_REVISION 0x01
665
666///
667/// Boot Error Region Block Status Definition
668///
669typedef struct {
670 UINT32 UncorrectableErrorValid : 1;
671 UINT32 CorrectableErrorValid : 1;
672 UINT32 MultipleUncorrectableErrors : 1;
673 UINT32 MultipleCorrectableErrors : 1;
674 UINT32 ErrorDataEntryCount : 10;
675 UINT32 Reserved : 18;
676} EFI_ACPI_4_0_ERROR_BLOCK_STATUS;
677
678///
679/// Boot Error Region Definition
680///
681typedef struct {
682 EFI_ACPI_4_0_ERROR_BLOCK_STATUS BlockStatus;
683 UINT32 RawDataOffset;
684 UINT32 RawDataLength;
685 UINT32 DataLength;
686 UINT32 ErrorSeverity;
687} EFI_ACPI_4_0_BOOT_ERROR_REGION_STRUCTURE;
688
689//
690// Boot Error Severity types
691//
692#define EFI_ACPI_4_0_ERROR_SEVERITY_CORRECTABLE 0x00
693#define EFI_ACPI_4_0_ERROR_SEVERITY_RECOVERABLE 0x00
694#define EFI_ACPI_4_0_ERROR_SEVERITY_FATAL 0x01
695#define EFI_ACPI_4_0_ERROR_SEVERITY_CORRECTED 0x02
696#define EFI_ACPI_4_0_ERROR_SEVERITY_NONE 0x03
697
698///
699/// Generic Error Data Entry Definition
700///
701typedef struct {
702 UINT8 SectionType[16];
703 UINT32 ErrorSeverity;
704 UINT16 Revision;
705 UINT8 ValidationBits;
706 UINT8 Flags;
707 UINT32 ErrorDataLength;
708 UINT8 FruId[16];
709 UINT8 FruText[20];
710} EFI_ACPI_4_0_GENERIC_ERROR_DATA_ENTRY_STRUCTURE;
711
712///
713/// Generic Error Data Entry Version (as defined in ACPI 4.0 spec.)
714///
715#define EFI_ACPI_4_0_GENERIC_ERROR_DATA_ENTRY_REVISION 0x0201
716
717///
718/// HEST - Hardware Error Source Table
719///
720typedef struct {
721 EFI_ACPI_DESCRIPTION_HEADER Header;
722 UINT32 ErrorSourceCount;
723} EFI_ACPI_4_0_HARDWARE_ERROR_SOURCE_TABLE_HEADER;
724
725///
726/// HEST Version (as defined in ACPI 4.0 spec.)
727///
728#define EFI_ACPI_4_0_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01
729
730//
731// Error Source structure types.
732//
733#define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION 0x00
734#define EFI_ACPI_4_0_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK 0x01
735#define EFI_ACPI_4_0_IA32_ARCHITECTURE_NMI_ERROR 0x02
736#define EFI_ACPI_4_0_PCI_EXPRESS_ROOT_PORT_AER 0x06
737#define EFI_ACPI_4_0_PCI_EXPRESS_DEVICE_AER 0x07
738#define EFI_ACPI_4_0_PCI_EXPRESS_BRIDGE_AER 0x08
739#define EFI_ACPI_4_0_GENERIC_HARDWARE_ERROR 0x09
740
741//
742// Error Source structure flags.
743//
744#define EFI_ACPI_4_0_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0)
745#define EFI_ACPI_4_0_ERROR_SOURCE_FLAG_GLOBAL (1 << 1)
746
747///
748/// IA-32 Architecture Machine Check Exception Structure Definition
749///
750typedef struct {
751 UINT16 Type;
752 UINT16 SourceId;
753 UINT8 Reserved0[2];
754 UINT8 Flags;
755 UINT8 Enabled;
756 UINT32 NumberOfRecordsToPreAllocate;
757 UINT32 MaxSectionsPerRecord;
758 UINT64 GlobalCapabilityInitData;
759 UINT64 GlobalControlInitData;
760 UINT8 NumberOfHardwareBanks;
761 UINT8 Reserved1[7];
762} EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION_STRUCTURE;
763
764///
765/// IA-32 Architecture Machine Check Bank Structure Definition
766///
767typedef struct {
768 UINT8 BankNumber;
769 UINT8 ClearStatusOnInitialization;
770 UINT8 StatusDataFormat;
771 UINT8 Reserved0;
772 UINT32 ControlRegisterMsrAddress;
773 UINT64 ControlInitData;
774 UINT32 StatusRegisterMsrAddress;
775 UINT32 AddressRegisterMsrAddress;
776 UINT32 MiscRegisterMsrAddress;
777} EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_BANK_STRUCTURE;
778
779///
780/// IA-32 Architecture Machine Check Bank Structure MCA data format
781///
782#define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00
783#define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01
784#define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02
785
786//
787// Hardware Error Notification types. All other values are reserved
788//
789#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00
790#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01
791#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02
792#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_SCI 0x03
793#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_NMI 0x04
794
795///
796/// Hardware Error Notification Configuration Write Enable Structure Definition
797///
798typedef struct {
799 UINT16 Type : 1;
800 UINT16 PollInterval : 1;
801 UINT16 SwitchToPollingThresholdValue : 1;
802 UINT16 SwitchToPollingThresholdWindow : 1;
803 UINT16 ErrorThresholdValue : 1;
804 UINT16 ErrorThresholdWindow : 1;
805 UINT16 Reserved : 10;
806} EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE;
807
808///
809/// Hardware Error Notification Structure Definition
810///
811typedef struct {
812 UINT8 Type;
813 UINT8 Length;
814 EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable;
815 UINT32 PollInterval;
816 UINT32 Vector;
817 UINT32 SwitchToPollingThresholdValue;
818 UINT32 SwitchToPollingThresholdWindow;
819 UINT32 ErrorThresholdValue;
820 UINT32 ErrorThresholdWindow;
821} EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE;
822
823///
824/// IA-32 Architecture Corrected Machine Check Structure Definition
825///
826typedef struct {
827 UINT16 Type;
828 UINT16 SourceId;
829 UINT8 Reserved0[2];
830 UINT8 Flags;
831 UINT8 Enabled;
832 UINT32 NumberOfRecordsToPreAllocate;
833 UINT32 MaxSectionsPerRecord;
834 EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
835 UINT8 NumberOfHardwareBanks;
836 UINT8 Reserved1[3];
837} EFI_ACPI_4_0_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK_STRUCTURE;
838
839///
840/// IA-32 Architecture NMI Error Structure Definition
841///
842typedef struct {
843 UINT16 Type;
844 UINT16 SourceId;
845 UINT8 Reserved0[2];
846 UINT32 NumberOfRecordsToPreAllocate;
847 UINT32 MaxSectionsPerRecord;
848 UINT32 MaxRawDataLength;
849} EFI_ACPI_4_0_IA32_ARCHITECTURE_NMI_ERROR_STRUCTURE;
850
851///
852/// PCI Express Root Port AER Structure Definition
853///
854typedef struct {
855 UINT16 Type;
856 UINT16 SourceId;
857 UINT8 Reserved0[2];
858 UINT8 Flags;
859 UINT8 Enabled;
860 UINT32 NumberOfRecordsToPreAllocate;
861 UINT32 MaxSectionsPerRecord;
862 UINT32 Bus;
863 UINT16 Device;
864 UINT16 Function;
865 UINT16 DeviceControl;
866 UINT8 Reserved1[2];
867 UINT32 UncorrectableErrorMask;
868 UINT32 UncorrectableErrorSeverity;
869 UINT32 CorrectableErrorMask;
870 UINT32 AdvancedErrorCapabilitiesAndControl;
871 UINT32 RootErrorCommand;
872} EFI_ACPI_4_0_PCI_EXPRESS_ROOT_PORT_AER_STRUCTURE;
873
874///
875/// PCI Express Device AER Structure Definition
876///
877typedef struct {
878 UINT16 Type;
879 UINT16 SourceId;
880 UINT8 Reserved0[2];
881 UINT8 Flags;
882 UINT8 Enabled;
883 UINT32 NumberOfRecordsToPreAllocate;
884 UINT32 MaxSectionsPerRecord;
885 UINT32 Bus;
886 UINT16 Device;
887 UINT16 Function;
888 UINT16 DeviceControl;
889 UINT8 Reserved1[2];
890 UINT32 UncorrectableErrorMask;
891 UINT32 UncorrectableErrorSeverity;
892 UINT32 CorrectableErrorMask;
893 UINT32 AdvancedErrorCapabilitiesAndControl;
894} EFI_ACPI_4_0_PCI_EXPRESS_DEVICE_AER_STRUCTURE;
895
896///
897/// PCI Express Bridge AER Structure Definition
898///
899typedef struct {
900 UINT16 Type;
901 UINT16 SourceId;
902 UINT8 Reserved0[2];
903 UINT8 Flags;
904 UINT8 Enabled;
905 UINT32 NumberOfRecordsToPreAllocate;
906 UINT32 MaxSectionsPerRecord;
907 UINT32 Bus;
908 UINT16 Device;
909 UINT16 Function;
910 UINT16 DeviceControl;
911 UINT8 Reserved1[2];
912 UINT32 UncorrectableErrorMask;
913 UINT32 UncorrectableErrorSeverity;
914 UINT32 CorrectableErrorMask;
915 UINT32 AdvancedErrorCapabilitiesAndControl;
916 UINT32 SecondaryUncorrectableErrorMask;
917 UINT32 SecondaryUncorrectableErrorSeverity;
918 UINT32 SecondaryAdvancedErrorCapabilitiesAndControl;
919} EFI_ACPI_4_0_PCI_EXPRESS_BRIDGE_AER_STRUCTURE;
920
921///
922/// Generic Hardware Error Source Structure Definition
923///
924typedef struct {
925 UINT16 Type;
926 UINT16 SourceId;
927 UINT16 RelatedSourceId;
928 UINT8 Flags;
929 UINT8 Enabled;
930 UINT32 NumberOfRecordsToPreAllocate;
931 UINT32 MaxSectionsPerRecord;
932 UINT32 MaxRawDataLength;
933 EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress;
934 EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
935 UINT32 ErrorStatusBlockLength;
936} EFI_ACPI_4_0_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE;
937
938///
939/// Generic Error Status Definition
940///
941typedef struct {
942 EFI_ACPI_4_0_ERROR_BLOCK_STATUS BlockStatus;
943 UINT32 RawDataOffset;
944 UINT32 RawDataLength;
945 UINT32 DataLength;
946 UINT32 ErrorSeverity;
947} EFI_ACPI_4_0_GENERIC_ERROR_STATUS_STRUCTURE;
948
949///
950/// ERST - Error Record Serialization Table
951///
952typedef struct {
953 EFI_ACPI_DESCRIPTION_HEADER Header;
954 UINT32 SerializationHeaderSize;
955 UINT8 Reserved0[4];
956 UINT32 InstructionEntryCount;
957} EFI_ACPI_4_0_ERROR_RECORD_SERIALIZATION_TABLE_HEADER;
958
959///
960/// ERST Version (as defined in ACPI 4.0 spec.)
961///
962#define EFI_ACPI_4_0_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01
963
964///
965/// ERST Serialization Actions
966///
967#define EFI_ACPI_4_0_ERST_BEGIN_WRITE_OPERATION 0x00
968#define EFI_ACPI_4_0_ERST_BEGIN_READ_OPERATION 0x01
969#define EFI_ACPI_4_0_ERST_BEGIN_CLEAR_OPERATION 0x02
970#define EFI_ACPI_4_0_ERST_END_OPERATION 0x03
971#define EFI_ACPI_4_0_ERST_SET_RECORD_OFFSET 0x04
972#define EFI_ACPI_4_0_ERST_EXECUTE_OPERATION 0x05
973#define EFI_ACPI_4_0_ERST_CHECK_BUSY_STATUS 0x06
974#define EFI_ACPI_4_0_ERST_GET_COMMAND_STATUS 0x07
975#define EFI_ACPI_4_0_ERST_GET_RECORD_IDENTIFIER 0x08
976#define EFI_ACPI_4_0_ERST_SET_RECORD_IDENTIFIER 0x09
977#define EFI_ACPI_4_0_ERST_GET_RECORD_COUNT 0x0A
978#define EFI_ACPI_4_0_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B
979#define EFI_ACPI_4_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D
980#define EFI_ACPI_4_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E
981#define EFI_ACPI_4_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F
982
983///
984/// ERST Action Command Status
985///
986#define EFI_ACPI_4_0_EINJ_STATUS_SUCCESS 0x00
987#define EFI_ACPI_4_0_EINJ_STATUS_NOT_ENOUGH_SPACE 0x01
988#define EFI_ACPI_4_0_EINJ_STATUS_HARDWARE_NOT_AVAILABLE 0x02
989#define EFI_ACPI_4_0_EINJ_STATUS_FAILED 0x03
990#define EFI_ACPI_4_0_EINJ_STATUS_RECORD_STORE_EMPTY 0x04
991#define EFI_ACPI_4_0_EINJ_STATUS_RECORD_NOT_FOUND 0x05
992
993///
994/// ERST Serialization Instructions
995///
996#define EFI_ACPI_4_0_ERST_READ_REGISTER 0x00
997#define EFI_ACPI_4_0_ERST_READ_REGISTER_VALUE 0x01
998#define EFI_ACPI_4_0_ERST_WRITE_REGISTER 0x02
999#define EFI_ACPI_4_0_ERST_WRITE_REGISTER_VALUE 0x03
1000#define EFI_ACPI_4_0_ERST_NOOP 0x04
1001#define EFI_ACPI_4_0_ERST_LOAD_VAR1 0x05
1002#define EFI_ACPI_4_0_ERST_LOAD_VAR2 0x06
1003#define EFI_ACPI_4_0_ERST_STORE_VAR1 0x07
1004#define EFI_ACPI_4_0_ERST_ADD 0x08
1005#define EFI_ACPI_4_0_ERST_SUBTRACT 0x09
1006#define EFI_ACPI_4_0_ERST_ADD_VALUE 0x0A
1007#define EFI_ACPI_4_0_ERST_SUBTRACT_VALUE 0x0B
1008#define EFI_ACPI_4_0_ERST_STALL 0x0C
1009#define EFI_ACPI_4_0_ERST_STALL_WHILE_TRUE 0x0D
1010#define EFI_ACPI_4_0_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E
1011#define EFI_ACPI_4_0_ERST_GOTO 0x0F
1012#define EFI_ACPI_4_0_ERST_SET_SRC_ADDRESS_BASE 0x10
1013#define EFI_ACPI_4_0_ERST_SET_DST_ADDRESS_BASE 0x11
1014#define EFI_ACPI_4_0_ERST_MOVE_DATA 0x12
1015
1016///
1017/// ERST Instruction Flags
1018///
1019#define EFI_ACPI_4_0_ERST_PRESERVE_REGISTER 0x01
1020
1021///
1022/// ERST Serialization Instruction Entry
1023///
1024typedef struct {
1025 UINT8 SerializationAction;
1026 UINT8 Instruction;
1027 UINT8 Flags;
1028 UINT8 Reserved0;
1029 EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
1030 UINT64 Value;
1031 UINT64 Mask;
1032} EFI_ACPI_4_0_ERST_SERIALIZATION_INSTRUCTION_ENTRY;
1033
1034///
1035/// EINJ - Error Injection Table
1036///
1037typedef struct {
1038 EFI_ACPI_DESCRIPTION_HEADER Header;
1039 UINT32 InjectionHeaderSize;
1040 UINT8 InjectionFlags;
1041 UINT8 Reserved0[3];
1042 UINT32 InjectionEntryCount;
1043} EFI_ACPI_4_0_ERROR_INJECTION_TABLE_HEADER;
1044
1045///
1046/// EINJ Version (as defined in ACPI 4.0 spec.)
1047///
1048#define EFI_ACPI_4_0_ERROR_INJECTION_TABLE_REVISION 0x01
1049
1050///
1051/// EINJ Error Injection Actions
1052///
1053#define EFI_ACPI_4_0_EINJ_BEGIN_INJECTION_OPERATION 0x00
1054#define EFI_ACPI_4_0_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01
1055#define EFI_ACPI_4_0_EINJ_SET_ERROR_TYPE 0x02
1056#define EFI_ACPI_4_0_EINJ_GET_ERROR_TYPE 0x03
1057#define EFI_ACPI_4_0_EINJ_END_OPERATION 0x04
1058#define EFI_ACPI_4_0_EINJ_EXECUTE_OPERATION 0x05
1059#define EFI_ACPI_4_0_EINJ_CHECK_BUSY_STATUS 0x06
1060#define EFI_ACPI_4_0_EINJ_GET_COMMAND_STATUS 0x07
1061#define EFI_ACPI_4_0_EINJ_TRIGGER_ERROR 0xFF
1062
1063///
1064/// EINJ Action Command Status
1065///
1066#define EFI_ACPI_4_0_EINJ_STATUS_SUCCESS 0x00
1067#define EFI_ACPI_4_0_EINJ_STATUS_UNKNOWN_FAILURE 0x01
1068#define EFI_ACPI_4_0_EINJ_STATUS_INVALID_ACCESS 0x02
1069
1070///
1071/// EINJ Error Type Definition
1072///
1073#define EFI_ACPI_4_0_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0)
1074#define EFI_ACPI_4_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1)
1075#define EFI_ACPI_4_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2)
1076#define EFI_ACPI_4_0_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3)
1077#define EFI_ACPI_4_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4)
1078#define EFI_ACPI_4_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5)
1079#define EFI_ACPI_4_0_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6)
1080#define EFI_ACPI_4_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7)
1081#define EFI_ACPI_4_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8)
1082#define EFI_ACPI_4_0_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9)
1083#define EFI_ACPI_4_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10)
1084#define EFI_ACPI_4_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11)
1085
1086///
1087/// EINJ Injection Instructions
1088///
1089#define EFI_ACPI_4_0_EINJ_READ_REGISTER 0x00
1090#define EFI_ACPI_4_0_EINJ_READ_REGISTER_VALUE 0x01
1091#define EFI_ACPI_4_0_EINJ_WRITE_REGISTER 0x02
1092#define EFI_ACPI_4_0_EINJ_WRITE_REGISTER_VALUE 0x03
1093#define EFI_ACPI_4_0_EINJ_NOOP 0x04
1094
1095///
1096/// EINJ Instruction Flags
1097///
1098#define EFI_ACPI_4_0_EINJ_PRESERVE_REGISTER 0x01
1099
1100///
1101/// EINJ Injection Instruction Entry
1102///
1103typedef struct {
1104 UINT8 InjectionAction;
1105 UINT8 Instruction;
1106 UINT8 Flags;
1107 UINT8 Reserved0;
1108 EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
1109 UINT64 Value;
1110 UINT64 Mask;
1111} EFI_ACPI_4_0_EINJ_INJECTION_INSTRUCTION_ENTRY;
1112
1113///
1114/// EINJ Trigger Action Table
1115///
1116typedef struct {
1117 UINT32 HeaderSize;
1118 UINT32 Revision;
1119 UINT32 TableSize;
1120 UINT32 EntryCount;
1121} EFI_ACPI_4_0_EINJ_TRIGGER_ACTION_TABLE;
1122
1123//
1124// Known table signatures
1125//
1126
1127///
1128/// "RSD PTR " Root System Description Pointer
1129///
1130#define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
1131
1132///
1133/// "APIC" Multiple APIC Description Table
1134///
1135#define EFI_ACPI_4_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
1136
1137///
1138/// "BERT" Boot Error Record Table
1139///
1140#define EFI_ACPI_4_0_BOOT_ERROR_RECORD_TABLE_SIGNATURE SIGNATURE_32('B', 'E', 'R', 'T')
1141
1142///
1143/// "CPEP" Corrected Platform Error Polling Table
1144///
1145#define EFI_ACPI_4_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_SIGNATURE SIGNATURE_32('C', 'P', 'E', 'P')
1146
1147///
1148/// "DSDT" Differentiated System Description Table
1149///
1150#define EFI_ACPI_4_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('D', 'S', 'D', 'T')
1151
1152///
1153/// "ECDT" Embedded Controller Boot Resources Table
1154///
1155#define EFI_ACPI_4_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE SIGNATURE_32('E', 'C', 'D', 'T')
1156
1157///
1158/// "EINJ" Error Injection Table
1159///
1160#define EFI_ACPI_4_0_ERROR_INJECTION_TABLE_SIGNATURE SIGNATURE_32('E', 'I', 'N', 'J')
1161
1162///
1163/// "ERST" Error Record Serialization Table
1164///
1165#define EFI_ACPI_4_0_ERROR_RECORD_SERIALIZATION_TABLE_SIGNATURE SIGNATURE_32('E', 'R', 'S', 'T')
1166
1167///
1168/// "FACP" Fixed ACPI Description Table
1169///
1170#define EFI_ACPI_4_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'P')
1171
1172///
1173/// "FACS" Firmware ACPI Control Structure
1174///
1175#define EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'S')
1176
1177///
1178/// "HEST" Hardware Error Source Table
1179///
1180#define EFI_ACPI_4_0_HARDWARE_ERROR_SOURCE_TABLE_SIGNATURE SIGNATURE_32('H', 'E', 'S', 'T')
1181
1182///
1183/// "MSCT" Maximum System Characteristics Table
1184///
1185#define EFI_ACPI_4_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_SIGNATURE SIGNATURE_32('M', 'S', 'C', 'T')
1186
1187///
1188/// "PSDT" Persistent System Description Table
1189///
1190#define EFI_ACPI_4_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('P', 'S', 'D', 'T')
1191
1192///
1193/// "RSDT" Root System Description Table
1194///
1195#define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('R', 'S', 'D', 'T')
1196
1197///
1198/// "SBST" Smart Battery Specification Table
1199///
1200#define EFI_ACPI_4_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE SIGNATURE_32('S', 'B', 'S', 'T')
1201
1202///
1203/// "SLIT" System Locality Information Table
1204///
1205#define EFI_ACPI_4_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE SIGNATURE_32('S', 'L', 'I', 'T')
1206
1207///
1208/// "SRAT" System Resource Affinity Table
1209///
1210#define EFI_ACPI_4_0_SYSTEM_RESOURCE_AFFINITY_TABLE_SIGNATURE SIGNATURE_32('S', 'R', 'A', 'T')
1211
1212///
1213/// "SSDT" Secondary System Description Table
1214///
1215#define EFI_ACPI_4_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('S', 'S', 'D', 'T')
1216
1217///
1218/// "XSDT" Extended System Description Table
1219///
1220#define EFI_ACPI_4_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('X', 'S', 'D', 'T')
1221
1222///
1223/// "BOOT" MS Simple Boot Spec
1224///
1225#define EFI_ACPI_4_0_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE SIGNATURE_32('B', 'O', 'O', 'T')
1226
1227///
1228/// "DBGP" MS Debug Port Spec
1229///
1230#define EFI_ACPI_4_0_DEBUG_PORT_TABLE_SIGNATURE SIGNATURE_32('D', 'B', 'G', 'P')
1231
1232///
1233/// "DMAR" DMA Remapping Table
1234///
1235#define EFI_ACPI_4_0_DMA_REMAPPING_TABLE_SIGNATURE SIGNATURE_32('D', 'M', 'A', 'R')
1236
1237///
1238/// "ETDT" Event Timer Description Table
1239///
1240#define EFI_ACPI_4_0_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('E', 'T', 'D', 'T')
1241
1242///
1243/// "HPET" IA-PC High Precision Event Timer Table
1244///
1245#define EFI_ACPI_4_0_HIGH_PRECISION_EVENT_TIMER_TABLE_SIGNATURE SIGNATURE_32('H', 'P', 'E', 'T')
1246
1247///
1248/// "iBFT" iSCSI Boot Firmware Table
1249///
1250#define EFI_ACPI_4_0_ISCSI_BOOT_FIRMWARE_TABLE_SIGNATURE SIGNATURE_32('i', 'B', 'F', 'T')
1251
1252///
1253/// "IVRS" I/O Virtualization Reporting Structure
1254///
1255#define EFI_ACPI_4_0_IO_VIRTUALIZATION_REPORTING_STRUCTURE_SIGNATURE SIGNATURE_32('I', 'V', 'R', 'S')
1256
1257///
1258/// "MCFG" PCI Express Memory Mapped Configuration Space Base Address Description Table
1259///
1260#define EFI_ACPI_4_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('M', 'C', 'F', 'G')
1261
1262///
1263/// "MCHI" Management Controller Host Interface Table
1264///
1265#define EFI_ACPI_4_0_MANAGEMENT_CONTROLLER_HOST_INTERFACE_TABLE_SIGNATURE SIGNATURE_32('M', 'C', 'H', 'I')
1266
1267///
1268/// "SPCR" Serial Port Console Redirection Table
1269///
1270#define EFI_ACPI_4_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'C', 'R')
1271
1272///
1273/// "SPMI" Server Platform Management Interface Table
1274///
1275#define EFI_ACPI_4_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'M', 'I')
1276
1277///
1278/// "TCPA" Trusted Computing Platform Alliance Capabilities Table
1279///
1280#define EFI_ACPI_4_0_TRUSTED_COMPUTING_PLATFORM_ALLIANCE_CAPABILITIES_TABLE_SIGNATURE SIGNATURE_32('T', 'C', 'P', 'A')
1281
1282///
1283/// "UEFI" UEFI ACPI Data Table
1284///
1285#define EFI_ACPI_4_0_UEFI_ACPI_DATA_TABLE_SIGNATURE SIGNATURE_32('U', 'E', 'F', 'I')
1286
1287///
1288/// "WAET" Windows ACPI Enlightenment Table
1289///
1290#define EFI_ACPI_4_0_WINDOWS_ACPI_ENLIGHTENMENT_TABLE_SIGNATURE SIGNATURE_32('W', 'A', 'E', 'T')
1291
1292///
1293/// "WDAT" Watchdog Action Table
1294///
1295#define EFI_ACPI_4_0_WATCHDOG_ACTION_TABLE_SIGNATURE SIGNATURE_32('W', 'D', 'A', 'T')
1296
1297///
1298/// "WDRT" Watchdog Resource Table
1299///
1300#define EFI_ACPI_4_0_WATCHDOG_RESOURCE_TABLE_SIGNATURE SIGNATURE_32('W', 'D', 'R', 'T')
1301
1302#pragma pack()
1303
1304#endif