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
;
38 // Generic Address Space Address IDs
40 #define EFI_ACPI_3_0_SYSTEM_MEMORY 0
41 #define EFI_ACPI_3_0_SYSTEM_IO 1
42 #define EFI_ACPI_3_0_PCI_CONFIGURATION_SPACE 2
43 #define EFI_ACPI_3_0_EMBEDDED_CONTROLLER 3
44 #define EFI_ACPI_3_0_SMBUS 4
45 #define EFI_ACPI_3_0_FUNCTIONAL_FIXED_HARDWARE 0x7F
48 // Generic Address Space Access Sizes
50 #define EFI_ACPI_3_0_UNDEFINED 0
51 #define EFI_ACPI_3_0_BYTE 1
52 #define EFI_ACPI_3_0_WORD 2
53 #define EFI_ACPI_3_0_DWORD 3
54 #define EFI_ACPI_3_0_QWORD 4
57 // ACPI 3.0 table structures
61 /// Root System Description Pointer Structure
71 UINT8 ExtendedChecksum
;
73 } EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER
;
76 /// RSD_PTR Revision (as defined in ACPI 3.0b spec.)
78 #define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 3.0b) says current value is 2
81 /// Common table header, this prefaces all ACPI tables, including FACS, but
82 /// excluding the RSD PTR structure
87 } EFI_ACPI_3_0_COMMON_HEADER
;
90 // Root System Description Table
91 // No definition needed as it is a common description table header, the same with
92 // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
96 /// RSDT Revision (as defined in ACPI 3.0 spec.)
98 #define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
101 // Extended System Description Table
102 // No definition needed as it is a common description table header, the same with
103 // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
107 /// XSDT Revision (as defined in ACPI 3.0 spec.)
109 #define EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
112 // Ensure proper structure formats
116 /// Fixed ACPI Description Table Structure (FADT)
119 EFI_ACPI_DESCRIPTION_HEADER Header
;
123 UINT8 PreferredPmProfile
;
158 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE ResetReg
;
161 UINT64 XFirmwareCtrl
;
163 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk
;
164 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk
;
165 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk
;
166 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk
;
167 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk
;
168 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk
;
169 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk
;
170 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk
;
171 } EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE
;
175 /// FADT Version (as defined in ACPI 3.0 spec.)
177 #define EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x04
180 // Fixed ACPI Description Table Preferred Power Management Profile
182 #define EFI_ACPI_3_0_PM_PROFILE_UNSPECIFIED 0
183 #define EFI_ACPI_3_0_PM_PROFILE_DESKTOP 1
184 #define EFI_ACPI_3_0_PM_PROFILE_MOBILE 2
185 #define EFI_ACPI_3_0_PM_PROFILE_WORKSTATION 3
186 #define EFI_ACPI_3_0_PM_PROFILE_ENTERPRISE_SERVER 4
187 #define EFI_ACPI_3_0_PM_PROFILE_SOHO_SERVER 5
188 #define EFI_ACPI_3_0_PM_PROFILE_APPLIANCE_PC 6
189 #define EFI_ACPI_3_0_PM_PROFILE_PERFORMANCE_SERVER 7
192 // Fixed ACPI Description Table Boot Architecture Flags
193 // All other bits are reserved and must be set to 0.
195 #define EFI_ACPI_3_0_LEGACY_DEVICES BIT0
196 #define EFI_ACPI_3_0_8042 BIT1
197 #define EFI_ACPI_3_0_VGA_NOT_PRESENT BIT2
198 #define EFI_ACPI_3_0_MSI_NOT_SUPPORTED BIT3
199 #define EFI_ACPI_3_0_PCIE_ASPM_CONTROLS BIT4
202 // Fixed ACPI Description Table Fixed Feature Flags
203 // All other bits are reserved and must be set to 0.
205 #define EFI_ACPI_3_0_WBINVD BIT0
206 #define EFI_ACPI_3_0_WBINVD_FLUSH BIT1
207 #define EFI_ACPI_3_0_PROC_C1 BIT2
208 #define EFI_ACPI_3_0_P_LVL2_UP BIT3
209 #define EFI_ACPI_3_0_PWR_BUTTON BIT4
210 #define EFI_ACPI_3_0_SLP_BUTTON BIT5
211 #define EFI_ACPI_3_0_FIX_RTC BIT6
212 #define EFI_ACPI_3_0_RTC_S4 BIT7
213 #define EFI_ACPI_3_0_TMR_VAL_EXT BIT8
214 #define EFI_ACPI_3_0_DCK_CAP BIT9
215 #define EFI_ACPI_3_0_RESET_REG_SUP BIT10
216 #define EFI_ACPI_3_0_SEALED_CASE BIT11
217 #define EFI_ACPI_3_0_HEADLESS BIT12
218 #define EFI_ACPI_3_0_CPU_SW_SLP BIT13
219 #define EFI_ACPI_3_0_PCI_EXP_WAK BIT14
220 #define EFI_ACPI_3_0_USE_PLATFORM_CLOCK BIT15
221 #define EFI_ACPI_3_0_S4_RTC_STS_VALID BIT16
222 #define EFI_ACPI_3_0_REMOTE_POWER_ON_CAPABLE BIT17
223 #define EFI_ACPI_3_0_FORCE_APIC_CLUSTER_MODEL BIT18
224 #define EFI_ACPI_3_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19
227 /// Firmware ACPI Control Structure
232 UINT32 HardwareSignature
;
233 UINT32 FirmwareWakingVector
;
236 UINT64 XFirmwareWakingVector
;
239 } EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE
;
242 /// FACS Version (as defined in ACPI 3.0 spec.)
244 #define EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION 0x01
247 /// Firmware Control Structure Feature Flags
248 /// All other bits are reserved and must be set to 0.
250 #define EFI_ACPI_3_0_S4BIOS_F BIT0
253 // Differentiated System Description Table,
254 // Secondary System Description Table
255 // and Persistent System Description Table,
256 // no definition needed as they are common description table header, the same with
257 // EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block.
259 #define EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
260 #define EFI_ACPI_3_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
263 /// Multiple APIC Description Table header definition. The rest of the table
264 /// must be defined in a platform specific manner.
267 EFI_ACPI_DESCRIPTION_HEADER Header
;
268 UINT32 LocalApicAddress
;
270 } EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER
;
273 /// MADT Revision (as defined in ACPI 3.0 spec.)
275 #define EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x02
278 /// Multiple APIC Flags
279 /// All other bits are reserved and must be set to 0.
281 #define EFI_ACPI_3_0_PCAT_COMPAT BIT0
284 // Multiple APIC Description Table APIC structure types
285 // All other values between 0x09 an 0xFF are reserved and
286 // will be ignored by OSPM.
288 #define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC 0x00
289 #define EFI_ACPI_3_0_IO_APIC 0x01
290 #define EFI_ACPI_3_0_INTERRUPT_SOURCE_OVERRIDE 0x02
291 #define EFI_ACPI_3_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03
292 #define EFI_ACPI_3_0_LOCAL_APIC_NMI 0x04
293 #define EFI_ACPI_3_0_LOCAL_APIC_ADDRESS_OVERRIDE 0x05
294 #define EFI_ACPI_3_0_IO_SAPIC 0x06
295 #define EFI_ACPI_3_0_LOCAL_SAPIC 0x07
296 #define EFI_ACPI_3_0_PLATFORM_INTERRUPT_SOURCES 0x08
299 // APIC Structure Definitions
303 /// Processor Local APIC Structure Definition
308 UINT8 AcpiProcessorId
;
311 } EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_STRUCTURE
;
314 /// Local APIC Flags. All other bits are reserved and must be 0.
316 #define EFI_ACPI_3_0_LOCAL_APIC_ENABLED BIT0
319 /// IO APIC Structure
326 UINT32 IoApicAddress
;
327 UINT32 GlobalSystemInterruptBase
;
328 } EFI_ACPI_3_0_IO_APIC_STRUCTURE
;
331 /// Interrupt Source Override Structure
338 UINT32 GlobalSystemInterrupt
;
340 } EFI_ACPI_3_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE
;
343 /// Platform Interrupt Sources Structure Definition
353 UINT32 GlobalSystemInterrupt
;
354 UINT32 PlatformInterruptSourceFlags
;
355 UINT8 CpeiProcessorOverride
;
357 } EFI_ACPI_3_0_PLATFORM_INTERRUPT_APIC_STRUCTURE
;
361 // All other bits are reserved and must be set to 0.
363 #define EFI_ACPI_3_0_POLARITY (3 << 0)
364 #define EFI_ACPI_3_0_TRIGGER_MODE (3 << 2)
367 /// Non-Maskable Interrupt Source Structure
373 UINT32 GlobalSystemInterrupt
;
374 } EFI_ACPI_3_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE
;
377 // Ensure proper structure formats
382 /// Local APIC NMI Structure
387 UINT8 AcpiProcessorId
;
390 } EFI_ACPI_3_0_LOCAL_APIC_NMI_STRUCTURE
;
393 /// Local APIC Address Override Structure
399 UINT64 LocalApicAddress
;
400 } EFI_ACPI_3_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE
;
405 /// IO SAPIC Structure
412 UINT32 GlobalSystemInterruptBase
;
413 UINT64 IoSapicAddress
;
414 } EFI_ACPI_3_0_IO_SAPIC_STRUCTURE
;
417 /// Local SAPIC Structure
418 /// This struct followed by a null-terminated ASCII string - ACPI Processor UID String
423 UINT8 AcpiProcessorId
;
428 UINT32 ACPIProcessorUIDValue
;
429 } EFI_ACPI_3_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE
;
432 /// Platform Interrupt Sources Structure
442 UINT32 GlobalSystemInterrupt
;
443 UINT32 PlatformInterruptSourceFlags
;
444 } EFI_ACPI_3_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE
;
447 /// Platform Interrupt Source Flags.
448 /// All other bits are reserved and must be set to 0.
450 #define EFI_ACPI_3_0_CPEI_PROCESSOR_OVERRIDE BIT0
453 /// Smart Battery Description Table (SBST)
456 EFI_ACPI_DESCRIPTION_HEADER Header
;
457 UINT32 WarningEnergyLevel
;
458 UINT32 LowEnergyLevel
;
459 UINT32 CriticalEnergyLevel
;
460 } EFI_ACPI_3_0_SMART_BATTERY_DESCRIPTION_TABLE
;
463 /// SBST Version (as defined in ACPI 3.0 spec.)
465 #define EFI_ACPI_3_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
468 /// Embedded Controller Boot Resources Table (ECDT)
469 /// The table is followed by a null terminated ASCII string that contains
470 /// a fully qualified reference to the name space object.
473 EFI_ACPI_DESCRIPTION_HEADER Header
;
474 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE EcControl
;
475 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE EcData
;
478 } EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE
;
481 /// ECDT Version (as defined in ACPI 3.0 spec.)
483 #define EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION 0x01
486 /// System Resource Affinity Table (SRAT. The rest of the table
487 /// must be defined in a platform specific manner.
490 EFI_ACPI_DESCRIPTION_HEADER Header
;
491 UINT32 Reserved1
; ///< Must be set to 1
493 } EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER
;
496 /// SRAT Version (as defined in ACPI 3.0 spec.)
498 #define EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_REVISION 0x02
501 // SRAT structure types.
502 // All other values between 0x02 an 0xFF are reserved and
503 // will be ignored by OSPM.
505 #define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY 0x00
506 #define EFI_ACPI_3_0_MEMORY_AFFINITY 0x01
509 /// Processor Local APIC/SAPIC Affinity Structure Definition
514 UINT8 ProximityDomain7To0
;
518 UINT8 ProximityDomain31To8
[3];
520 } EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE
;
523 /// Local APIC/SAPIC Flags. All other bits are reserved and must be 0.
525 #define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
528 // Ensure proper structure formats
532 /// Memory Affinity Structure Definition
537 UINT32 ProximityDomain
;
539 UINT32 AddressBaseLow
;
540 UINT32 AddressBaseHigh
;
546 } EFI_ACPI_3_0_MEMORY_AFFINITY_STRUCTURE
;
551 // Memory Flags. All other bits are reserved and must be 0.
553 #define EFI_ACPI_3_0_MEMORY_ENABLED (1 << 0)
554 #define EFI_ACPI_3_0_MEMORY_HOT_PLUGGABLE (1 << 1)
555 #define EFI_ACPI_3_0_MEMORY_NONVOLATILE (1 << 2)
558 /// System Locality Distance Information Table (SLIT).
559 /// The rest of the table is a matrix.
562 EFI_ACPI_DESCRIPTION_HEADER Header
;
563 UINT64 NumberOfSystemLocalities
;
564 } EFI_ACPI_3_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER
;
567 /// SLIT Version (as defined in ACPI 3.0 spec.)
569 #define EFI_ACPI_3_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_REVISION 0x01
572 // Known table signatures
576 /// "RSD PTR " Root System Description Pointer
578 #define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
581 /// "APIC" Multiple APIC Description Table
583 #define EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
586 /// "DSDT" Differentiated System Description Table
588 #define EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('D', 'S', 'D', 'T')
591 /// "ECDT" Embedded Controller Boot Resources Table
593 #define EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE SIGNATURE_32('E', 'C', 'D', 'T')
596 /// "FACP" Fixed ACPI Description Table
598 #define EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'P')
601 /// "FACS" Firmware ACPI Control Structure
603 #define EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'S')
606 /// "PSDT" Persistent System Description Table
608 #define EFI_ACPI_3_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('P', 'S', 'D', 'T')
611 /// "RSDT" Root System Description Table
613 #define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('R', 'S', 'D', 'T')
616 /// "SBST" Smart Battery Specification Table
618 #define EFI_ACPI_3_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE SIGNATURE_32('S', 'B', 'S', 'T')
621 /// "SLIT" System Locality Information Table
623 #define EFI_ACPI_3_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE SIGNATURE_32('S', 'L', 'I', 'T')
626 /// "SRAT" System Resource Affinity Table
628 #define EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_SIGNATURE SIGNATURE_32('S', 'R', 'A', 'T')
631 /// "SSDT" Secondary System Description Table
633 #define EFI_ACPI_3_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('S', 'S', 'D', 'T')
636 /// "XSDT" Extended System Description Table
638 #define EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('X', 'S', 'D', 'T')
641 /// "BOOT" MS Simple Boot Spec
643 #define EFI_ACPI_3_0_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE SIGNATURE_32('B', 'O', 'O', 'T')
646 /// "CPEP" Corrected Platform Error Polling Table
649 #define EFI_ACPI_3_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_SIGNATURE SIGNATURE_32('C', 'P', 'E', 'P')
652 /// "DBGP" MS Debug Port Spec
654 #define EFI_ACPI_3_0_DEBUG_PORT_TABLE_SIGNATURE SIGNATURE_32('D', 'B', 'G', 'P')
657 /// "ETDT" Event Timer Description Table
659 #define EFI_ACPI_3_0_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('E', 'T', 'D', 'T')
662 /// "HPET" IA-PC High Precision Event Timer Table
664 #define EFI_ACPI_3_0_HIGH_PRECISION_EVENT_TIMER_TABLE_SIGNATURE SIGNATURE_32('H', 'P', 'E', 'T')
667 /// "MCFG" PCI Express Memory Mapped Configuration Space Base Address Description Table
669 #define EFI_ACPI_3_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('M', 'C', 'F', 'G')
672 /// "SPCR" Serial Port Concole Redirection Table
674 #define EFI_ACPI_3_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'C', 'R')
677 /// "SPMI" Server Platform Management Interface Table
679 #define EFI_ACPI_3_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'M', 'I')
682 /// "TCPA" Trusted Computing Platform Alliance Capabilities Table
684 #define EFI_ACPI_3_0_TRUSTED_COMPUTING_PLATFORM_ALLIANCE_CAPABILITIES_TABLE_SIGNATURE SIGNATURE_32('T', 'C', 'P', 'A')
687 /// "WDRT" Watchdog Resource Table
689 #define EFI_ACPI_3_0_WATCHDOG_RESOURCE_TABLE_SIGNATURE SIGNATURE_32('W', 'D', 'R', 'T')
692 /// "WDAT" Watchdog Action Table
694 #define EFI_ACPI_3_0_WATCHDOG_ACTION_TABLE_SIGNATURE SIGNATURE_32('W', 'D', 'A', 'T')
697 /// "iBFT" iSCSI Boot Firmware Table
699 #define EFI_ACPI_3_0_ISCSI_BOOT_FIRMWARE_TABLE_SIGNATURE SIGNATURE_32('i', 'B', 'F', 'T')