2 ACPI 3.0 definitions from the ACPI Specification Revision 3.0b October 10, 2006
4 Copyright (c) 2006 - 2008, Intel Corporation
5 All rights reserved. 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
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.
17 #include <IndustryStandard/Acpi20.h>
20 // Ensure proper structure formats
25 /// ACPI 3.0 Generic Address Space definition
29 UINT8 RegisterBitWidth
;
30 UINT8 RegisterBitOffset
;
33 } EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE
;
36 // Generic Address Space Address IDs
38 #define EFI_ACPI_3_0_SYSTEM_MEMORY 0
39 #define EFI_ACPI_3_0_SYSTEM_IO 1
40 #define EFI_ACPI_3_0_PCI_CONFIGURATION_SPACE 2
41 #define EFI_ACPI_3_0_EMBEDDED_CONTROLLER 3
42 #define EFI_ACPI_3_0_SMBUS 4
43 #define EFI_ACPI_3_0_FUNCTIONAL_FIXED_HARDWARE 0x7F
46 // Generic Address Space Access Sizes
48 #define EFI_ACPI_3_0_UNDEFINED 0
49 #define EFI_ACPI_3_0_BYTE 1
50 #define EFI_ACPI_3_0_WORD 2
51 #define EFI_ACPI_3_0_DWORD 3
52 #define EFI_ACPI_3_0_QWORD 4
55 // ACPI 3.0 table structures
59 /// Root System Description Pointer Structure
69 UINT8 ExtendedChecksum
;
71 } EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER
;
74 /// RSD_PTR Revision (as defined in ACPI 3.0b spec.)
76 #define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 3.0b) says current value is 2
79 /// Common table header, this prefaces all ACPI tables, including FACS, but
80 /// excluding the RSD PTR structure
85 } EFI_ACPI_3_0_COMMON_HEADER
;
88 // Root System Description Table
89 // No definition needed as it is a common description table header, the same with
90 // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
94 /// RSDT Revision (as defined in ACPI 3.0 spec.)
96 #define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
99 // Extended System Description Table
100 // No definition needed as it is a common description table header, the same with
101 // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
105 /// XSDT Revision (as defined in ACPI 3.0 spec.)
107 #define EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
110 /// Fixed ACPI Description Table Structure (FADT)
113 EFI_ACPI_DESCRIPTION_HEADER Header
;
117 UINT8 PreferredPmProfile
;
152 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE ResetReg
;
155 UINT64 XFirmwareCtrl
;
157 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk
;
158 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk
;
159 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk
;
160 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk
;
161 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk
;
162 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk
;
163 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk
;
164 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk
;
165 } EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE
;
168 /// FADT Version (as defined in ACPI 3.0 spec.)
170 #define EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x04
173 // Fixed ACPI Description Table Preferred Power Management Profile
175 #define EFI_ACPI_3_0_PM_PROFILE_UNSPECIFIED 0
176 #define EFI_ACPI_3_0_PM_PROFILE_DESKTOP 1
177 #define EFI_ACPI_3_0_PM_PROFILE_MOBILE 2
178 #define EFI_ACPI_3_0_PM_PROFILE_WORKSTATION 3
179 #define EFI_ACPI_3_0_PM_PROFILE_ENTERPRISE_SERVER 4
180 #define EFI_ACPI_3_0_PM_PROFILE_SOHO_SERVER 5
181 #define EFI_ACPI_3_0_PM_PROFILE_APPLIANCE_PC 6
182 #define EFI_ACPI_3_0_PM_PROFILE_PERFORMANCE_SERVER 7
185 // Fixed ACPI Description Table Boot Architecture Flags
186 // All other bits are reserved and must be set to 0.
188 #define EFI_ACPI_3_0_LEGACY_DEVICES BIT0
189 #define EFI_ACPI_3_0_8042 BIT1
190 #define EFI_ACPI_3_0_VGA_NOT_PRESENT BIT2
191 #define EFI_ACPI_3_0_MSI_NOT_SUPPORTED BIT3
192 #define EFI_ACPI_3_0_PCIE_ASPM_CONTROLS BIT4
195 // Fixed ACPI Description Table Fixed Feature Flags
196 // All other bits are reserved and must be set to 0.
198 #define EFI_ACPI_3_0_WBINVD BIT0
199 #define EFI_ACPI_3_0_WBINVD_FLUSH BIT1
200 #define EFI_ACPI_3_0_PROC_C1 BIT2
201 #define EFI_ACPI_3_0_P_LVL2_UP BIT3
202 #define EFI_ACPI_3_0_PWR_BUTTON BIT4
203 #define EFI_ACPI_3_0_SLP_BUTTON BIT5
204 #define EFI_ACPI_3_0_FIX_RTC BIT6
205 #define EFI_ACPI_3_0_RTC_S4 BIT7
206 #define EFI_ACPI_3_0_TMR_VAL_EXT BIT8
207 #define EFI_ACPI_3_0_DCK_CAP BIT9
208 #define EFI_ACPI_3_0_RESET_REG_SUP BIT10
209 #define EFI_ACPI_3_0_SEALED_CASE BIT11
210 #define EFI_ACPI_3_0_HEADLESS BIT12
211 #define EFI_ACPI_3_0_CPU_SW_SLP BIT13
212 #define EFI_ACPI_3_0_PCI_EXP_WAK BIT14
213 #define EFI_ACPI_3_0_USE_PLATFORM_CLOCK BIT15
214 #define EFI_ACPI_3_0_S4_RTC_STS_VALID BIT16
215 #define EFI_ACPI_3_0_REMOTE_POWER_ON_CAPABLE BIT17
216 #define EFI_ACPI_3_0_FORCE_APIC_CLUSTER_MODEL BIT18
217 #define EFI_ACPI_3_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19
220 /// Firmware ACPI Control Structure
225 UINT32 HardwareSignature
;
226 UINT32 FirmwareWakingVector
;
229 UINT64 XFirmwareWakingVector
;
232 } EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE
;
235 /// FACS Version (as defined in ACPI 3.0 spec.)
237 #define EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION 0x01
240 /// Firmware Control Structure Feature Flags
241 /// All other bits are reserved and must be set to 0.
243 #define EFI_ACPI_3_0_S4BIOS_F BIT0
246 // Differentiated System Description Table,
247 // Secondary System Description Table
248 // and Persistent System Description Table,
249 // no definition needed as they are common description table header, the same with
250 // EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block.
252 #define EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
253 #define EFI_ACPI_3_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
256 /// Multiple APIC Description Table header definition. The rest of the table
257 /// must be defined in a platform specific manner.
260 EFI_ACPI_DESCRIPTION_HEADER Header
;
261 UINT32 LocalApicAddress
;
263 } EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER
;
266 /// MADT Revision (as defined in ACPI 3.0 spec.)
268 #define EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x02
271 /// Multiple APIC Flags
272 /// All other bits are reserved and must be set to 0.
274 #define EFI_ACPI_3_0_PCAT_COMPAT BIT0
277 // Multiple APIC Description Table APIC structure types
278 // All other values between 0x09 an 0xFF are reserved and
279 // will be ignored by OSPM.
281 #define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC 0x00
282 #define EFI_ACPI_3_0_IO_APIC 0x01
283 #define EFI_ACPI_3_0_INTERRUPT_SOURCE_OVERRIDE 0x02
284 #define EFI_ACPI_3_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03
285 #define EFI_ACPI_3_0_LOCAL_APIC_NMI 0x04
286 #define EFI_ACPI_3_0_LOCAL_APIC_ADDRESS_OVERRIDE 0x05
287 #define EFI_ACPI_3_0_IO_SAPIC 0x06
288 #define EFI_ACPI_3_0_LOCAL_SAPIC 0x07
289 #define EFI_ACPI_3_0_PLATFORM_INTERRUPT_SOURCES 0x08
292 // APIC Structure Definitions
296 /// Processor Local APIC Structure Definition
301 UINT8 AcpiProcessorId
;
304 } EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_STRUCTURE
;
307 /// Local APIC Flags. All other bits are reserved and must be 0.
309 #define EFI_ACPI_3_0_LOCAL_APIC_ENABLED BIT0
312 /// IO APIC Structure
319 UINT32 IoApicAddress
;
320 UINT32 GlobalSystemInterruptBase
;
321 } EFI_ACPI_3_0_IO_APIC_STRUCTURE
;
324 /// Interrupt Source Override Structure
331 UINT32 GlobalSystemInterrupt
;
333 } EFI_ACPI_3_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE
;
336 /// Platform Interrupt Sources Structure Definition
346 UINT32 GlobalSystemInterrupt
;
347 UINT32 PlatformInterruptSourceFlags
;
348 UINT8 CpeiProcessorOverride
;
350 } EFI_ACPI_3_0_PLATFORM_INTERRUPT_APIC_STRUCTURE
;
354 // All other bits are reserved and must be set to 0.
356 #define EFI_ACPI_3_0_POLARITY (3 << 0)
357 #define EFI_ACPI_3_0_TRIGGER_MODE (3 << 2)
360 /// Non-Maskable Interrupt Source Structure
366 UINT32 GlobalSystemInterrupt
;
367 } EFI_ACPI_3_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE
;
370 /// Local APIC NMI Structure
375 UINT8 AcpiProcessorId
;
378 } EFI_ACPI_3_0_LOCAL_APIC_NMI_STRUCTURE
;
381 /// Local APIC Address Override Structure
387 UINT64 LocalApicAddress
;
388 } EFI_ACPI_3_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE
;
391 /// IO SAPIC Structure
398 UINT32 GlobalSystemInterruptBase
;
399 UINT64 IoSapicAddress
;
400 } EFI_ACPI_3_0_IO_SAPIC_STRUCTURE
;
403 /// Local SAPIC Structure
404 /// This struct followed by a null-terminated ASCII string - ACPI Processor UID String
409 UINT8 AcpiProcessorId
;
414 UINT32 ACPIProcessorUIDValue
;
415 } EFI_ACPI_3_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE
;
418 /// Platform Interrupt Sources Structure
428 UINT32 GlobalSystemInterrupt
;
429 UINT32 PlatformInterruptSourceFlags
;
430 } EFI_ACPI_3_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE
;
433 /// Platform Interrupt Source Flags.
434 /// All other bits are reserved and must be set to 0.
436 #define EFI_ACPI_3_0_CPEI_PROCESSOR_OVERRIDE BIT0
439 /// Smart Battery Description Table (SBST)
442 EFI_ACPI_DESCRIPTION_HEADER Header
;
443 UINT32 WarningEnergyLevel
;
444 UINT32 LowEnergyLevel
;
445 UINT32 CriticalEnergyLevel
;
446 } EFI_ACPI_3_0_SMART_BATTERY_DESCRIPTION_TABLE
;
449 /// SBST Version (as defined in ACPI 3.0 spec.)
451 #define EFI_ACPI_3_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
454 /// Embedded Controller Boot Resources Table (ECDT)
455 /// The table is followed by a null terminated ASCII string that contains
456 /// a fully qualified reference to the name space object.
459 EFI_ACPI_DESCRIPTION_HEADER Header
;
460 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE EcControl
;
461 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE EcData
;
464 } EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE
;
467 /// ECDT Version (as defined in ACPI 3.0 spec.)
469 #define EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION 0x01
472 /// System Resource Affinity Table (SRAT. The rest of the table
473 /// must be defined in a platform specific manner.
476 EFI_ACPI_DESCRIPTION_HEADER Header
;
477 UINT32 Reserved1
; ///< Must be set to 1
479 } EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER
;
482 /// SRAT Version (as defined in ACPI 3.0 spec.)
484 #define EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_REVISION 0x02
487 // SRAT structure types.
488 // All other values between 0x02 an 0xFF are reserved and
489 // will be ignored by OSPM.
491 #define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY 0x00
492 #define EFI_ACPI_3_0_MEMORY_AFFINITY 0x01
495 /// Processor Local APIC/SAPIC Affinity Structure Definition
500 UINT8 ProximityDomain7To0
;
504 UINT8 ProximityDomain31To8
[3];
506 } EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE
;
509 /// Local APIC/SAPIC Flags. All other bits are reserved and must be 0.
511 #define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
514 /// Memory Affinity Structure Definition
519 UINT32 ProximityDomain
;
521 UINT32 AddressBaseLow
;
522 UINT32 AddressBaseHigh
;
528 } EFI_ACPI_3_0_MEMORY_AFFINITY_STRUCTURE
;
531 // Memory Flags. All other bits are reserved and must be 0.
533 #define EFI_ACPI_3_0_MEMORY_ENABLED (1 << 0)
534 #define EFI_ACPI_3_0_MEMORY_HOT_PLUGGABLE (1 << 1)
535 #define EFI_ACPI_3_0_MEMORY_NONVOLATILE (1 << 2)
538 /// System Locality Distance Information Table (SLIT).
539 /// The rest of the table is a matrix.
542 EFI_ACPI_DESCRIPTION_HEADER Header
;
543 UINT64 NumberOfSystemLocalities
;
544 } EFI_ACPI_3_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER
;
547 /// SLIT Version (as defined in ACPI 3.0 spec.)
549 #define EFI_ACPI_3_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_REVISION 0x01
552 // Known table signatures
556 /// "RSD PTR " Root System Description Pointer
558 #define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
561 /// "APIC" Multiple APIC Description Table
563 #define EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
566 /// "DSDT" Differentiated System Description Table
568 #define EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('D', 'S', 'D', 'T')
571 /// "ECDT" Embedded Controller Boot Resources Table
573 #define EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE SIGNATURE_32('E', 'C', 'D', 'T')
576 /// "FACP" Fixed ACPI Description Table
578 #define EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'P')
581 /// "FACS" Firmware ACPI Control Structure
583 #define EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'S')
586 /// "PSDT" Persistent System Description Table
588 #define EFI_ACPI_3_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('P', 'S', 'D', 'T')
591 /// "RSDT" Root System Description Table
593 #define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('R', 'S', 'D', 'T')
596 /// "SBST" Smart Battery Specification Table
598 #define EFI_ACPI_3_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE SIGNATURE_32('S', 'B', 'S', 'T')
601 /// "SLIT" System Locality Information Table
603 #define EFI_ACPI_3_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE SIGNATURE_32('S', 'L', 'I', 'T')
606 /// "SRAT" System Resource Affinity Table
608 #define EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_SIGNATURE SIGNATURE_32('S', 'R', 'A', 'T')
611 /// "SSDT" Secondary System Description Table
613 #define EFI_ACPI_3_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('S', 'S', 'D', 'T')
616 /// "XSDT" Extended System Description Table
618 #define EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('X', 'S', 'D', 'T')
621 /// "BOOT" MS Simple Boot Spec
623 #define EFI_ACPI_3_0_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE SIGNATURE_32('B', 'O', 'O', 'T')
626 /// "CPEP" Corrected Platform Error Polling Table
629 #define EFI_ACPI_3_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_SIGNATURE SIGNATURE_32('C', 'P', 'E', 'P')
632 /// "DBGP" MS Debug Port Spec
634 #define EFI_ACPI_3_0_DEBUG_PORT_TABLE_SIGNATURE SIGNATURE_32('D', 'B', 'G', 'P')
637 /// "ETDT" Event Timer Description Table
639 #define EFI_ACPI_3_0_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('E', 'T', 'D', 'T')
642 /// "HPET" IA-PC High Precision Event Timer Table
644 #define EFI_ACPI_3_0_HIGH_PRECISION_EVENT_TIMER_TABLE_SIGNATURE SIGNATURE_32('H', 'P', 'E', 'T')
647 /// "MCFG" PCI Express Memory Mapped Configuration Space Base Address Description Table
649 #define EFI_ACPI_3_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('M', 'C', 'F', 'G')
652 /// "SPCR" Serial Port Concole Redirection Table
654 #define EFI_ACPI_3_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'C', 'R')
657 /// "SPMI" Server Platform Management Interface Table
659 #define EFI_ACPI_3_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'M', 'I')
662 /// "TCPA" Trusted Computing Platform Alliance Capabilities Table
664 #define EFI_ACPI_3_0_TRUSTED_COMPUTING_PLATFORM_ALLIANCE_CAPABILITIES_TABLE_SIGNATURE SIGNATURE_32('T', 'C', 'P', 'A')
667 /// "WDRT" Watchdog Resource Table
669 #define EFI_ACPI_3_0_WATCHDOG_RESOURCE_TABLE_SIGNATURE SIGNATURE_32('W', 'D', 'R', 'T')
672 /// "WDAT" Watchdog Action Table
674 #define EFI_ACPI_3_0_WATCHDOG_ACTION_TABLE_SIGNATURE SIGNATURE_32('W', 'D', 'A', 'T')
677 /// "iBFT" iSCSI Boot Firmware Table
679 #define EFI_ACPI_3_0_ISCSI_BOOT_FIRMWARE_TABLE_SIGNATURE SIGNATURE_32('i', 'B', 'F', 'T')