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