3 ACPI 3.0 definitions from the ACPI Specification Revision 3.0 September 2, 2004
5 Copyright (c) 2006 - 2007, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 #include <IndustryStandard/Acpi2_0.h>
21 // 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
63 // Root System Description Pointer Structure
73 UINT8 ExtendedChecksum
;
75 } EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER
;
78 // RSD_PTR Revision (as defined in ACPI 3.0 spec.)
80 #define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 // ACPISpec30 (Revision 3.0 September 2, 2004) says current value is 2
82 // Common table header, this prefaces all ACPI tables, including FACS, but
83 // excluding the RSD PTR structure
88 } EFI_ACPI_3_0_COMMON_HEADER
;
91 // Root System Description Table
92 // No definition needed as it is a common description table header followed by a
93 // 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 followed by a
103 // variable number of UINT64 table pointers.
106 // XSDT Revision (as defined in ACPI 3.0 spec.)
108 #define EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
111 // Fixed ACPI Description Table Structure (FADT)
114 EFI_ACPI_DESCRIPTION_HEADER Header
;
118 UINT8 PreferredPmProfile
;
153 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE ResetReg
;
156 UINT64 XFirmwareCtrl
;
158 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk
;
159 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk
;
160 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk
;
161 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk
;
162 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk
;
163 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk
;
164 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk
;
165 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk
;
166 } EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE
;
169 // FADT Version (as defined in ACPI 3.0 spec.)
171 #define EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x04
174 // Fixed ACPI Description Table Preferred Power Management Profile
176 #define EFI_ACPI_3_0_PM_PROFILE_UNSPECIFIED 0
177 #define EFI_ACPI_3_0_PM_PROFILE_DESKTOP 1
178 #define EFI_ACPI_3_0_PM_PROFILE_MOBILE 2
179 #define EFI_ACPI_3_0_PM_PROFILE_WORKSTATION 3
180 #define EFI_ACPI_3_0_PM_PROFILE_ENTERPRISE_SERVER 4
181 #define EFI_ACPI_3_0_PM_PROFILE_SOHO_SERVER 5
182 #define EFI_ACPI_3_0_PM_PROFILE_APPLIANCE_PC 6
183 #define EFI_ACPI_3_0_PM_PROFILE_PERFORMANCE_SERVER 7
186 // Fixed ACPI Description Table Boot Architecture Flags
187 // All other bits are reserved and must be set to 0.
189 #define EFI_ACPI_3_0_LEGACY_DEVICES (1 << 0)
190 #define EFI_ACPI_3_0_8042 (1 << 1)
191 #define EFI_ACPI_3_0_VGA_NOT_PRESENT (1 << 2)
192 #define EFI_ACPI_3_0_MSI_NOT_SUPPORTED (1 << 3)
194 // Fixed ACPI Description Table Fixed Feature Flags
195 // All other bits are reserved and must be set to 0.
197 #define EFI_ACPI_3_0_WBINVD (1 << 0)
198 #define EFI_ACPI_3_0_WBINVD_FLUSH (1 << 1)
199 #define EFI_ACPI_3_0_PROC_C1 (1 << 2)
200 #define EFI_ACPI_3_0_P_LVL2_UP (1 << 3)
201 #define EFI_ACPI_3_0_PWR_BUTTON (1 << 4)
202 #define EFI_ACPI_3_0_SLP_BUTTON (1 << 5)
203 #define EFI_ACPI_3_0_FIX_RTC (1 << 6)
204 #define EFI_ACPI_3_0_RTC_S4 (1 << 7)
205 #define EFI_ACPI_3_0_TMR_VAL_EXT (1 << 8)
206 #define EFI_ACPI_3_0_DCK_CAP (1 << 9)
207 #define EFI_ACPI_3_0_RESET_REG_SUP (1 << 10)
208 #define EFI_ACPI_3_0_SEALED_CASE (1 << 11)
209 #define EFI_ACPI_3_0_HEADLESS (1 << 12)
210 #define EFI_ACPI_3_0_CPU_SW_SLP (1 << 13)
211 #define EFI_ACPI_3_0_PCI_EXP_WAK (1 << 14)
212 #define EFI_ACPI_3_0_USE_PLATFORM_CLOCK (1 << 15)
213 #define EFI_ACPI_3_0_S4_RTC_STS_VALID (1 << 16)
214 #define EFI_ACPI_3_0_REMOTE_POWER_ON_CAPABLE (1 << 17)
215 #define EFI_ACPI_3_0_FORCE_APIC_CLUSTER_MODEL (1 << 18)
216 #define EFI_ACPI_3_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE (1 << 19)
219 // Firmware ACPI Control Structure
224 UINT32 HardwareSignature
;
225 UINT32 FirmwareWakingVector
;
228 UINT64 XFirmwareWakingVector
;
231 } EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE
;
234 // FACS Version (as defined in ACPI 3.0 spec.)
236 #define EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION 0x01
239 // Firmware Control Structure Feature Flags
240 // All other bits are reserved and must be set to 0.
242 #define EFI_ACPI_3_0_S4BIOS_F (1 << 0)
245 // Differentiated System Description Table,
246 // Secondary System Description Table
247 // and Persistent System Description Table,
248 // no definition needed as they are common description table header followed by a
251 #define EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
252 #define EFI_ACPI_3_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
255 // Multiple APIC Description Table header definition. The rest of the table
256 // must be defined in a platform specific manner.
259 EFI_ACPI_DESCRIPTION_HEADER Header
;
260 UINT32 LocalApicAddress
;
262 } EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER
;
265 // MADT Revision (as defined in ACPI 3.0 spec.)
267 #define EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x02
270 // Multiple APIC Flags
271 // All other bits are reserved and must be set to 0.
273 #define EFI_ACPI_3_0_PCAT_COMPAT (1 << 0)
276 // Multiple APIC Description Table APIC structure types
277 // All other values between 0x09 an 0xFF are reserved and
278 // will be ignored by OSPM.
280 #define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC 0x00
281 #define EFI_ACPI_3_0_IO_APIC 0x01
282 #define EFI_ACPI_3_0_INTERRUPT_SOURCE_OVERRIDE 0x02
283 #define EFI_ACPI_3_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03
284 #define EFI_ACPI_3_0_LOCAL_APIC_NMI 0x04
285 #define EFI_ACPI_3_0_LOCAL_APIC_ADDRESS_OVERRIDE 0x05
286 #define EFI_ACPI_3_0_IO_SAPIC 0x06
287 #define EFI_ACPI_3_0_LOCAL_SAPIC 0x07
288 #define EFI_ACPI_3_0_PLATFORM_INTERRUPT_SOURCES 0x08
291 // APIC Structure Definitions
294 // Processor Local APIC Structure Definition
299 UINT8 AcpiProcessorId
;
302 } EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_STRUCTURE
;
305 // Local APIC Flags. All other bits are reserved and must be 0.
307 #define EFI_ACPI_3_0_LOCAL_APIC_ENABLED (1 << 0)
317 UINT32 IoApicAddress
;
318 UINT32 GlobalSystemInterruptBase
;
319 } EFI_ACPI_3_0_IO_APIC_STRUCTURE
;
322 // Interrupt Source Override Structure
329 UINT32 GlobalSystemInterrupt
;
331 } EFI_ACPI_3_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE
;
334 // Platform Interrupt Sources Structure Definition
344 UINT32 GlobalSystemInterrupt
;
345 UINT32 PlatformInterruptSourceFlags
;
346 UINT8 CpeiProcessorOverride
;
348 } EFI_ACPI_3_0_PLATFORM_INTERRUPT_APIC_STRUCTURE
;
352 // All other bits are reserved and must be set to 0.
354 #define EFI_ACPI_3_0_POLARITY (3 << 0)
355 #define EFI_ACPI_3_0_TRIGGER_MODE (3 << 2)
358 // Non-Maskable Interrupt Source Structure
364 UINT32 GlobalSystemInterrupt
;
365 } EFI_ACPI_3_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE
;
368 // Local APIC NMI Structure
373 UINT8 AcpiProcessorId
;
376 } EFI_ACPI_3_0_LOCAL_APIC_NMI_STRUCTURE
;
379 // Local APIC Address Override Structure
385 UINT64 LocalApicAddress
;
386 } EFI_ACPI_3_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE
;
389 // IO SAPIC Structure
396 UINT32 GlobalSystemInterruptBase
;
397 UINT64 IoSapicAddress
;
398 } EFI_ACPI_3_0_IO_SAPIC_STRUCTURE
;
401 // Local SAPIC Structure
402 // This struct followed by a null-terminated ASCII string - ACPI Processor UID String
407 UINT8 AcpiProcessorId
;
412 UINT32 ACPIProcessorUIDValue
;
413 } EFI_ACPI_3_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE
;
416 // Platform Interrupt Sources Structure
426 UINT32 GlobalSystemInterrupt
;
427 UINT32 PlatformInterruptSourceFlags
;
428 } EFI_ACPI_3_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE
;
431 // Platform Interrupt Source Flags.
432 // All other bits are reserved and must be set to 0.
434 #define EFI_ACPI_3_0_CPEI_PROCESSOR_OVERRIDE (1 << 0)
437 // Smart Battery Description Table (SBST)
440 EFI_ACPI_DESCRIPTION_HEADER Header
;
441 UINT32 WarningEnergyLevel
;
442 UINT32 LowEnergyLevel
;
443 UINT32 CriticalEnergyLevel
;
444 } EFI_ACPI_3_0_SMART_BATTERY_DESCRIPTION_TABLE
;
447 // SBST Version (as defined in ACPI 3.0 spec.)
449 #define EFI_ACPI_3_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
452 // Embedded Controller Boot Resources Table (ECDT)
453 // The table is followed by a null terminated ASCII string that contains
454 // a fully qualified reference to the name space object.
457 EFI_ACPI_DESCRIPTION_HEADER Header
;
458 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE EcControl
;
459 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE EcData
;
462 } EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE
;
465 // ECDT Version (as defined in ACPI 3.0 spec.)
467 #define EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION 0x01
470 // System Resource Affinity Table (SRAT. The rest of the table
471 // must be defined in a platform specific manner.
474 EFI_ACPI_DESCRIPTION_HEADER Header
;
475 UINT32 Reserved1
; // Must be set to 1
477 } EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER
;
480 // SRAT Version (as defined in ACPI 3.0 spec.)
482 #define EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_REVISION 0x02
485 // SRAT structure types.
486 // All other values between 0x02 an 0xFF are reserved and
487 // will be ignored by OSPM.
489 #define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY 0x00
490 #define EFI_ACPI_3_0_MEMORY_AFFINITY 0x01
493 // Processor Local APIC/SAPIC Affinity Structure Definition
498 UINT8 ProximityDomain7To0
;
502 UINT8 ProximityDomain31To8
[3];
504 } EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE
;
507 // Local APIC/SAPIC Flags. All other bits are reserved and must be 0.
509 #define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
512 // Memory Affinity Structure Definition
517 UINT32 ProximityDomain
;
519 UINT32 AddressBaseLow
;
520 UINT32 AddressBaseHigh
;
526 } EFI_ACPI_3_0_MEMORY_AFFINITY_STRUCTURE
;
529 // Memory Flags. All other bits are reserved and must be 0.
531 #define EFI_ACPI_3_0_MEMORY_ENABLED (1 << 0)
532 #define EFI_ACPI_3_0_MEMORY_HOT_PLUGGABLE (1 << 1)
533 #define EFI_ACPI_3_0_MEMORY_NONVOLATILE (1 << 2)
536 // System Locality Distance Information Table (SLIT).
537 // The rest of the table is a matrix.
540 EFI_ACPI_DESCRIPTION_HEADER Header
;
541 UINT64 NumberOfSystemLocalities
;
542 } EFI_ACPI_3_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER
;
545 // SLIT Version (as defined in ACPI 3.0 spec.)
547 #define EFI_ACPI_3_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_REVISION 0x01
550 // Known table signatures
553 // "RSD PTR " Root System Description Pointer
555 #define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE 0x2052545020445352ULL
558 // "APIC" Multiple APIC Description Table
560 #define EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE 0x43495041
563 // "DSDT" Differentiated System Description Table
565 #define EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445344
568 // "ECDT" Embedded Controller Boot Resources Table
570 #define EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE 0x54444345
573 // "FACP" Fixed ACPI Description Table
575 #define EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE 0x50434146
578 // "FACS" Firmware ACPI Control Structure
580 #define EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE 0x53434146
583 // "PSDT" Persistent System Description Table
585 #define EFI_ACPI_3_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445350
588 // "RSDT" Root System Description Table
590 #define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445352
593 // "SBST" Smart Battery Specification Table
595 #define EFI_ACPI_3_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE 0x54534253
598 // "SLIT" System Locality Information Table
600 #define EFI_ACPI_3_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE 0x54494C53
603 // "SRAT" System Resource Affinity Table
605 #define EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_SIGNATURE 0x54415253
608 // "SSDT" Secondary System Description Table
610 #define EFI_ACPI_3_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445353
613 // "XSDT" Extended System Description Table
615 #define EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445358
618 // "BOOT" MS Simple Boot Spec
620 #define EFI_ACPI_3_0_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE 0x544F4F42
623 // "CPEP" Corrected Platform Error Polling Table
626 #define EFI_ACPI_3_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_SIGNATURE 0x50455043
629 // "DBGP" MS Debug Port Spec
631 #define EFI_ACPI_3_0_DEBUG_PORT_TABLE_SIGNATURE 0x50474244
634 // "ETDT" Event Timer Description Table
636 #define EFI_ACPI_3_0_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE 0x54445445
639 // "HPET" IA-PC High Precision Event Timer Table
641 #define EFI_ACPI_3_0_HIGH_PRECISION_EVENT_TIMER_TABLE_SIGNATURE 0x54455048
644 // "MCFG" PCI Express Memory Mapped Configuration Space Base Address Description Table
646 #define EFI_ACPI_3_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE 0x4746434D
649 // "SPCR" Serial Port Concole Redirection Table
651 #define EFI_ACPI_3_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE 0x52435053
654 // "SPMI" Server Platform Management Interface Table
656 #define EFI_ACPI_3_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE_SIGNATURE 0x494D5053
659 // "TCPA" Trusted Computing Platform Alliance Capabilities Table
661 #define EFI_ACPI_3_0_TRUSTED_COMPUTING_PLATFORM_ALLIANCE_CAPABILITIES_TABLE_SIGNATURE 0x41504354
664 // "WDRT" Watchdog Resource Table
666 #define EFI_ACPI_3_0_WATCHDOG_RESOURCE_TABLE_SIGNATURE 0x54524457