2 ACPI 3.0 definitions from the ACPI Specification Revision 3.0 September 2, 2004
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/Acpi2_0.h>
20 // Ensure proper structure formats
25 /// ACPI Specification Revision
27 #define EFI_ACPI_3_0_REVISION 0x03
30 /// ACPI 3.0 Generic Address Space definition
34 UINT8 RegisterBitWidth
;
35 UINT8 RegisterBitOffset
;
38 } EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE
;
41 // Generic Address Space Address IDs
43 #define EFI_ACPI_3_0_SYSTEM_MEMORY 0
44 #define EFI_ACPI_3_0_SYSTEM_IO 1
45 #define EFI_ACPI_3_0_PCI_CONFIGURATION_SPACE 2
46 #define EFI_ACPI_3_0_EMBEDDED_CONTROLLER 3
47 #define EFI_ACPI_3_0_SMBUS 4
48 #define EFI_ACPI_3_0_FUNCTIONAL_FIXED_HARDWARE 0x7F
51 // Generic Address Space Access Sizes
53 #define EFI_ACPI_3_0_UNDEFINED 0
54 #define EFI_ACPI_3_0_BYTE 1
55 #define EFI_ACPI_3_0_WORD 2
56 #define EFI_ACPI_3_0_DWORD 3
57 #define EFI_ACPI_3_0_QWORD 4
60 // ACPI 3.0 table structures
64 /// Root System Description Pointer Structure
74 UINT8 ExtendedChecksum
;
76 } EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER
;
79 /// RSD_PTR Revision (as defined in ACPI 3.0 spec.)
81 #define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 // ACPISpec30 (Revision 3.0 September 2, 2004) says current value is 2
84 /// Common table header, this prefaces all ACPI tables, including FACS, but
85 /// excluding the RSD PTR structure
90 } EFI_ACPI_3_0_COMMON_HEADER
;
93 // Root System Description Table
94 // No definition needed as it is a common description table header followed by a
95 // variable number of UINT32 table pointers.
99 /// RSDT Revision (as defined in ACPI 3.0 spec.)
101 #define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
104 // Extended System Description Table
105 // No definition needed as it is a common description table header followed by a
106 // variable number of UINT64 table pointers.
110 /// XSDT Revision (as defined in ACPI 3.0 spec.)
112 #define EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
115 /// Fixed ACPI Description Table Structure (FADT)
118 EFI_ACPI_DESCRIPTION_HEADER Header
;
122 UINT8 PreferredPmProfile
;
157 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE ResetReg
;
160 UINT64 XFirmwareCtrl
;
162 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk
;
163 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk
;
164 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk
;
165 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk
;
166 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk
;
167 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk
;
168 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk
;
169 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk
;
170 } EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE
;
173 /// FADT Version (as defined in ACPI 3.0 spec.)
175 #define EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x04
178 // Fixed ACPI Description Table Preferred Power Management Profile
180 #define EFI_ACPI_3_0_PM_PROFILE_UNSPECIFIED 0
181 #define EFI_ACPI_3_0_PM_PROFILE_DESKTOP 1
182 #define EFI_ACPI_3_0_PM_PROFILE_MOBILE 2
183 #define EFI_ACPI_3_0_PM_PROFILE_WORKSTATION 3
184 #define EFI_ACPI_3_0_PM_PROFILE_ENTERPRISE_SERVER 4
185 #define EFI_ACPI_3_0_PM_PROFILE_SOHO_SERVER 5
186 #define EFI_ACPI_3_0_PM_PROFILE_APPLIANCE_PC 6
187 #define EFI_ACPI_3_0_PM_PROFILE_PERFORMANCE_SERVER 7
190 // Fixed ACPI Description Table Boot Architecture Flags
191 // All other bits are reserved and must be set to 0.
193 #define EFI_ACPI_3_0_LEGACY_DEVICES (1 << 0)
194 #define EFI_ACPI_3_0_8042 (1 << 1)
195 #define EFI_ACPI_3_0_VGA_NOT_PRESENT (1 << 2)
196 #define EFI_ACPI_3_0_MSI_NOT_SUPPORTED (1 << 3)
197 #define EFI_ACPI_3_0_PCIE_ASPM_CONTROLS (1 << 4)
200 // Fixed ACPI Description Table Fixed Feature Flags
201 // All other bits are reserved and must be set to 0.
203 #define EFI_ACPI_3_0_WBINVD (1 << 0)
204 #define EFI_ACPI_3_0_WBINVD_FLUSH (1 << 1)
205 #define EFI_ACPI_3_0_PROC_C1 (1 << 2)
206 #define EFI_ACPI_3_0_P_LVL2_UP (1 << 3)
207 #define EFI_ACPI_3_0_PWR_BUTTON (1 << 4)
208 #define EFI_ACPI_3_0_SLP_BUTTON (1 << 5)
209 #define EFI_ACPI_3_0_FIX_RTC (1 << 6)
210 #define EFI_ACPI_3_0_RTC_S4 (1 << 7)
211 #define EFI_ACPI_3_0_TMR_VAL_EXT (1 << 8)
212 #define EFI_ACPI_3_0_DCK_CAP (1 << 9)
213 #define EFI_ACPI_3_0_RESET_REG_SUP (1 << 10)
214 #define EFI_ACPI_3_0_SEALED_CASE (1 << 11)
215 #define EFI_ACPI_3_0_HEADLESS (1 << 12)
216 #define EFI_ACPI_3_0_CPU_SW_SLP (1 << 13)
217 #define EFI_ACPI_3_0_PCI_EXP_WAK (1 << 14)
218 #define EFI_ACPI_3_0_USE_PLATFORM_CLOCK (1 << 15)
219 #define EFI_ACPI_3_0_S4_RTC_STS_VALID (1 << 16)
220 #define EFI_ACPI_3_0_REMOTE_POWER_ON_CAPABLE (1 << 17)
221 #define EFI_ACPI_3_0_FORCE_APIC_CLUSTER_MODEL (1 << 18)
222 #define EFI_ACPI_3_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE (1 << 19)
225 /// Firmware ACPI Control Structure
230 UINT32 HardwareSignature
;
231 UINT32 FirmwareWakingVector
;
234 UINT64 XFirmwareWakingVector
;
237 } EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE
;
240 /// FACS Version (as defined in ACPI 3.0 spec.)
242 #define EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION 0x01
245 /// Firmware Control Structure Feature Flags
246 /// All other bits are reserved and must be set to 0.
248 #define EFI_ACPI_3_0_S4BIOS_F (1 << 0)
251 // Differentiated System Description Table,
252 // Secondary System Description Table
253 // and Persistent System Description Table,
254 // no definition needed as they are common description table header followed by a
257 #define EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
258 #define EFI_ACPI_3_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
261 /// Multiple APIC Description Table header definition. The rest of the table
262 /// must be defined in a platform specific manner.
265 EFI_ACPI_DESCRIPTION_HEADER Header
;
266 UINT32 LocalApicAddress
;
268 } EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER
;
271 /// MADT Revision (as defined in ACPI 3.0 spec.)
273 #define EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x02
276 /// Multiple APIC Flags
277 /// All other bits are reserved and must be set to 0.
279 #define EFI_ACPI_3_0_PCAT_COMPAT (1 << 0)
282 // Multiple APIC Description Table APIC structure types
283 // All other values between 0x09 an 0xFF are reserved and
284 // will be ignored by OSPM.
286 #define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC 0x00
287 #define EFI_ACPI_3_0_IO_APIC 0x01
288 #define EFI_ACPI_3_0_INTERRUPT_SOURCE_OVERRIDE 0x02
289 #define EFI_ACPI_3_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03
290 #define EFI_ACPI_3_0_LOCAL_APIC_NMI 0x04
291 #define EFI_ACPI_3_0_LOCAL_APIC_ADDRESS_OVERRIDE 0x05
292 #define EFI_ACPI_3_0_IO_SAPIC 0x06
293 #define EFI_ACPI_3_0_LOCAL_SAPIC 0x07
294 #define EFI_ACPI_3_0_PLATFORM_INTERRUPT_SOURCES 0x08
297 // APIC Structure Definitions
301 /// Processor Local APIC Structure Definition
306 UINT8 AcpiProcessorId
;
309 } EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_STRUCTURE
;
312 /// Local APIC Flags. All other bits are reserved and must be 0.
314 #define EFI_ACPI_3_0_LOCAL_APIC_ENABLED (1 << 0)
317 /// IO APIC Structure
324 UINT32 IoApicAddress
;
325 UINT32 GlobalSystemInterruptBase
;
326 } EFI_ACPI_3_0_IO_APIC_STRUCTURE
;
329 /// Interrupt Source Override Structure
336 UINT32 GlobalSystemInterrupt
;
338 } EFI_ACPI_3_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE
;
341 /// Platform Interrupt Sources Structure Definition
351 UINT32 GlobalSystemInterrupt
;
352 UINT32 PlatformInterruptSourceFlags
;
353 UINT8 CpeiProcessorOverride
;
355 } EFI_ACPI_3_0_PLATFORM_INTERRUPT_APIC_STRUCTURE
;
359 // All other bits are reserved and must be set to 0.
361 #define EFI_ACPI_3_0_POLARITY (3 << 0)
362 #define EFI_ACPI_3_0_TRIGGER_MODE (3 << 2)
365 /// Non-Maskable Interrupt Source Structure
371 UINT32 GlobalSystemInterrupt
;
372 } EFI_ACPI_3_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE
;
375 /// Local APIC NMI Structure
380 UINT8 AcpiProcessorId
;
383 } EFI_ACPI_3_0_LOCAL_APIC_NMI_STRUCTURE
;
386 /// Local APIC Address Override Structure
392 UINT64 LocalApicAddress
;
393 } EFI_ACPI_3_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE
;
396 /// IO SAPIC Structure
403 UINT32 GlobalSystemInterruptBase
;
404 UINT64 IoSapicAddress
;
405 } EFI_ACPI_3_0_IO_SAPIC_STRUCTURE
;
408 /// Local SAPIC Structure
409 /// This struct followed by a null-terminated ASCII string - ACPI Processor UID String
414 UINT8 AcpiProcessorId
;
419 UINT32 ACPIProcessorUIDValue
;
420 } EFI_ACPI_3_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE
;
423 /// Platform Interrupt Sources Structure
433 UINT32 GlobalSystemInterrupt
;
434 UINT32 PlatformInterruptSourceFlags
;
435 } EFI_ACPI_3_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE
;
438 /// Platform Interrupt Source Flags.
439 /// All other bits are reserved and must be set to 0.
441 #define EFI_ACPI_3_0_CPEI_PROCESSOR_OVERRIDE (1 << 0)
444 /// Smart Battery Description Table (SBST)
447 EFI_ACPI_DESCRIPTION_HEADER Header
;
448 UINT32 WarningEnergyLevel
;
449 UINT32 LowEnergyLevel
;
450 UINT32 CriticalEnergyLevel
;
451 } EFI_ACPI_3_0_SMART_BATTERY_DESCRIPTION_TABLE
;
454 /// SBST Version (as defined in ACPI 3.0 spec.)
456 #define EFI_ACPI_3_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
459 /// Embedded Controller Boot Resources Table (ECDT)
460 /// The table is followed by a null terminated ASCII string that contains
461 /// a fully qualified reference to the name space object.
464 EFI_ACPI_DESCRIPTION_HEADER Header
;
465 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE EcControl
;
466 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE EcData
;
469 } EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE
;
472 /// ECDT Version (as defined in ACPI 3.0 spec.)
474 #define EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION 0x01
477 /// System Resource Affinity Table (SRAT. The rest of the table
478 /// must be defined in a platform specific manner.
481 EFI_ACPI_DESCRIPTION_HEADER Header
;
482 UINT32 Reserved1
; // Must be set to 1
484 } EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER
;
487 /// SRAT Version (as defined in ACPI 3.0 spec.)
489 #define EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_REVISION 0x02
492 /// SRAT structure types.
493 /// All other values between 0x02 an 0xFF are reserved and
494 /// will be ignored by OSPM.
496 #define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY 0x00
497 #define EFI_ACPI_3_0_MEMORY_AFFINITY 0x01
500 /// Processor Local APIC/SAPIC Affinity Structure Definition
505 UINT8 ProximityDomain7To0
;
509 UINT8 ProximityDomain31To8
[3];
511 } EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE
;
514 /// Local APIC/SAPIC Flags. All other bits are reserved and must be 0.
516 #define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
519 /// Memory Affinity Structure Definition
524 UINT32 ProximityDomain
;
526 UINT32 AddressBaseLow
;
527 UINT32 AddressBaseHigh
;
533 } EFI_ACPI_3_0_MEMORY_AFFINITY_STRUCTURE
;
536 // Memory Flags. All other bits are reserved and must be 0.
538 #define EFI_ACPI_3_0_MEMORY_ENABLED (1 << 0)
539 #define EFI_ACPI_3_0_MEMORY_HOT_PLUGGABLE (1 << 1)
540 #define EFI_ACPI_3_0_MEMORY_NONVOLATILE (1 << 2)
543 /// System Locality Distance Information Table (SLIT).
544 /// The rest of the table is a matrix.
547 EFI_ACPI_DESCRIPTION_HEADER Header
;
548 UINT64 NumberOfSystemLocalities
;
549 } EFI_ACPI_3_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER
;
552 /// SLIT Version (as defined in ACPI 3.0 spec.)
554 #define EFI_ACPI_3_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_REVISION 0x01
557 // Known table signatures
561 /// "RSD PTR " Root System Description Pointer
563 #define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE 0x2052545020445352ULL
566 /// "APIC" Multiple APIC Description Table
568 #define EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE 0x43495041
571 /// "DSDT" Differentiated System Description Table
573 #define EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445344
576 /// "ECDT" Embedded Controller Boot Resources Table
578 #define EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE 0x54444345
581 /// "FACP" Fixed ACPI Description Table
583 #define EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE 0x50434146
586 /// "FACS" Firmware ACPI Control Structure
588 #define EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE 0x53434146
591 /// "PSDT" Persistent System Description Table
593 #define EFI_ACPI_3_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445350
596 /// "RSDT" Root System Description Table
598 #define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445352
601 /// "SBST" Smart Battery Specification Table
603 #define EFI_ACPI_3_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE 0x54534253
606 /// "SLIT" System Locality Information Table
608 #define EFI_ACPI_3_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE 0x54494C53
611 /// "SRAT" System Resource Affinity Table
613 #define EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_SIGNATURE 0x54415253
616 /// "SSDT" Secondary System Description Table
618 #define EFI_ACPI_3_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445353
621 /// "XSDT" Extended System Description Table
623 #define EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445358
626 /// "BOOT" MS Simple Boot Spec
628 #define EFI_ACPI_3_0_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE 0x544F4F42
631 /// "CPEP" Corrected Platform Error Polling Table
634 #define EFI_ACPI_3_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_SIGNATURE 0x50455043
637 /// "DBGP" MS Debug Port Spec
639 #define EFI_ACPI_3_0_DEBUG_PORT_TABLE_SIGNATURE 0x50474244
642 /// "ETDT" Event Timer Description Table
644 #define EFI_ACPI_3_0_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE 0x54445445
647 /// "HPET" IA-PC High Precision Event Timer Table
649 #define EFI_ACPI_3_0_HIGH_PRECISION_EVENT_TIMER_TABLE_SIGNATURE 0x54455048
652 /// "MCFG" PCI Express Memory Mapped Configuration Space Base Address Description Table
654 #define EFI_ACPI_3_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE 0x4746434D
657 /// "SPCR" Serial Port Concole Redirection Table
659 #define EFI_ACPI_3_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE 0x52435053
662 /// "SPMI" Server Platform Management Interface Table
664 #define EFI_ACPI_3_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE_SIGNATURE 0x494D5053
667 /// "TCPA" Trusted Computing Platform Alliance Capabilities Table
669 #define EFI_ACPI_3_0_TRUSTED_COMPUTING_PLATFORM_ALLIANCE_CAPABILITIES_TABLE_SIGNATURE 0x41504354
672 /// "WDRT" Watchdog Resource Table
674 #define EFI_ACPI_3_0_WATCHDOG_RESOURCE_TABLE_SIGNATURE 0x54524457
677 /// "WDAT" Watchdog Action Table
679 #define EFI_ACPI_3_0_WATCHDOG_ACTION_TABLE_SIGNATURE 0x54414457
682 /// "iBFT" iSCSI Boot Firmware Table
684 #define EFI_ACPI_3_0_ISCSI_BOOT_FIRMWARE_TABLE_SIGNATURE 0x54464269