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