2 ACPI 2.0 definitions from the ACPI Specification, revision 2.0
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/Acpi10.h>
20 // Ensure proper structure formats
25 /// ACPI 2.0 Generic Address Space definition
29 UINT8 RegisterBitWidth
;
30 UINT8 RegisterBitOffset
;
33 } EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE
;
38 // Generic Address Space Address IDs
40 #define EFI_ACPI_2_0_SYSTEM_MEMORY 0
41 #define EFI_ACPI_2_0_SYSTEM_IO 1
42 #define EFI_ACPI_2_0_PCI_CONFIGURATION_SPACE 2
43 #define EFI_ACPI_2_0_EMBEDDED_CONTROLLER 3
44 #define EFI_ACPI_2_0_SMBUS 4
45 #define EFI_ACPI_2_0_FUNCTIONAL_FIXED_HARDWARE 0x7F
48 // ACPI 2.0 table structures
52 /// Root System Description Pointer Structure
62 UINT8 ExtendedChecksum
;
64 } EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER
;
67 /// RSD_PTR Revision (as defined in ACPI 2.0 spec.)
69 #define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02
72 /// Common table header, this prefaces all ACPI tables, including FACS, but
73 /// excluding the RSD PTR structure
78 } EFI_ACPI_2_0_COMMON_HEADER
;
81 // Root System Description Table
82 // No definition needed as it is a common description table header, the same with
83 // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
87 /// RSDT Revision (as defined in ACPI 2.0 spec.)
89 #define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
92 // Extended System Description Table
93 // No definition needed as it is a common description table header, the same with
94 // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
98 /// XSDT Revision (as defined in ACPI 2.0 spec.)
100 #define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
103 /// Fixed ACPI Description Table Structure (FADT)
106 EFI_ACPI_DESCRIPTION_HEADER Header
;
110 UINT8 PreferredPmProfile
;
145 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE ResetReg
;
148 UINT64 XFirmwareCtrl
;
150 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk
;
151 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk
;
152 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk
;
153 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk
;
154 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk
;
155 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk
;
156 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk
;
157 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk
;
158 } EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE
;
161 /// FADT Version (as defined in ACPI 2.0 spec.)
163 #define EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x03
166 // Fixed ACPI Description Table Boot Architecture Flags
167 // All other bits are reserved and must be set to 0.
169 #define EFI_ACPI_2_0_LEGACY_DEVICES BIT0
170 #define EFI_ACPI_2_0_8042 BIT1
173 // Fixed ACPI Description Table Fixed Feature Flags
174 // All other bits are reserved and must be set to 0.
176 #define EFI_ACPI_2_0_WBINVD BIT0
177 #define EFI_ACPI_2_0_WBINVD_FLUSH BIT1
178 #define EFI_ACPI_2_0_PROC_C1 BIT2
179 #define EFI_ACPI_2_0_P_LVL2_UP BIT3
180 #define EFI_ACPI_2_0_PWR_BUTTON BIT4
181 #define EFI_ACPI_2_0_SLP_BUTTON BIT5
182 #define EFI_ACPI_2_0_FIX_RTC BIT6
183 #define EFI_ACPI_2_0_RTC_S4 BIT7
184 #define EFI_ACPI_2_0_TMR_VAL_EXT BIT8
185 #define EFI_ACPI_2_0_DCK_CAP BIT9
186 #define EFI_ACPI_2_0_RESET_REG_SUP BIT10
187 #define EFI_ACPI_2_0_SEALED_CASE BIT11
188 #define EFI_ACPI_2_0_HEADLESS BIT12
189 #define EFI_ACPI_2_0_CPU_SW_SLP BIT13
192 /// Firmware ACPI Control Structure
197 UINT32 HardwareSignature
;
198 UINT32 FirmwareWakingVector
;
201 UINT64 XFirmwareWakingVector
;
204 } EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE
;
207 /// FACS Version (as defined in ACPI 2.0 spec.)
209 #define EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION 0x01
212 /// Firmware Control Structure Feature Flags
213 /// All other bits are reserved and must be set to 0.
215 #define EFI_ACPI_2_0_S4BIOS_F BIT0
218 /// Multiple APIC Description Table header definition. The rest of the table
219 /// must be defined in a platform specific manner.
222 EFI_ACPI_DESCRIPTION_HEADER Header
;
223 UINT32 LocalApicAddress
;
225 } EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER
;
228 /// MADT Revision (as defined in ACPI 2.0 spec.)
230 #define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01
233 /// Multiple APIC Flags
234 /// All other bits are reserved and must be set to 0.
236 #define EFI_ACPI_2_0_PCAT_COMPAT BIT0
239 // Multiple APIC Description Table APIC structure types
240 // All other values between 0x09 an 0xFF are reserved and
241 // will be ignored by OSPM.
243 #define EFI_ACPI_2_0_PROCESSOR_LOCAL_APIC 0x00
244 #define EFI_ACPI_2_0_IO_APIC 0x01
245 #define EFI_ACPI_2_0_INTERRUPT_SOURCE_OVERRIDE 0x02
246 #define EFI_ACPI_2_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03
247 #define EFI_ACPI_2_0_LOCAL_APIC_NMI 0x04
248 #define EFI_ACPI_2_0_LOCAL_APIC_ADDRESS_OVERRIDE 0x05
249 #define EFI_ACPI_2_0_IO_SAPIC 0x06
250 #define EFI_ACPI_2_0_PROCESSOR_LOCAL_SAPIC 0x07
251 #define EFI_ACPI_2_0_PLATFORM_INTERRUPT_SOURCES 0x08
254 // APIC Structure Definitions
258 /// Processor Local APIC Structure Definition
263 UINT8 AcpiProcessorId
;
266 } EFI_ACPI_2_0_PROCESSOR_LOCAL_APIC_STRUCTURE
;
269 /// Local APIC Flags. All other bits are reserved and must be 0.
271 #define EFI_ACPI_2_0_LOCAL_APIC_ENABLED BIT0
274 /// IO APIC Structure
281 UINT32 IoApicAddress
;
282 UINT32 GlobalSystemInterruptBase
;
283 } EFI_ACPI_2_0_IO_APIC_STRUCTURE
;
286 /// Interrupt Source Override Structure
293 UINT32 GlobalSystemInterrupt
;
295 } EFI_ACPI_2_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE
;
298 /// Non-Maskable Interrupt Source Structure
304 UINT32 GlobalSystemInterrupt
;
305 } EFI_ACPI_2_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE
;
308 // Ensure proper structure formats
313 /// Local APIC NMI Structure
318 UINT8 AcpiProcessorId
;
321 } EFI_ACPI_2_0_LOCAL_APIC_NMI_STRUCTURE
;
324 /// Local APIC Address Override Structure
330 UINT64 LocalApicAddress
;
331 } EFI_ACPI_2_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE
;
336 /// IO SAPIC Structure
343 UINT32 GlobalSystemInterruptBase
;
344 UINT64 IoSapicAddress
;
345 } EFI_ACPI_2_0_IO_SAPIC_STRUCTURE
;
348 /// Local SAPIC Structure
353 UINT8 AcpiProcessorId
;
358 } EFI_ACPI_2_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE
;
361 /// Platform Interrupt Sources Structure
371 UINT32 GlobalSystemInterrupt
;
373 } EFI_ACPI_2_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE
;
376 /// Smart Battery Description Table (SBST)
379 EFI_ACPI_DESCRIPTION_HEADER Header
;
380 UINT32 WarningEnergyLevel
;
381 UINT32 LowEnergyLevel
;
382 UINT32 CriticalEnergyLevel
;
383 } EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE
;
386 /// SBST Version (as defined in ACPI 2.0 spec.)
388 #define EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
391 /// Embedded Controller Boot Resources Table (ECDT)
392 /// The table is followed by a null terminated ASCII string that contains
393 /// a fully qualified reference to the name space object.
396 EFI_ACPI_DESCRIPTION_HEADER Header
;
397 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE EcControl
;
398 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE EcData
;
401 } EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE
;
404 /// ECDT Version (as defined in ACPI 2.0 spec.)
406 #define EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION 0x01
409 // Known table signatures
413 /// "RSD PTR " Root System Description Pointer
415 #define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
418 /// "SPIC" Multiple SAPIC Description Table
420 /// BUGBUG: Don't know where this came from except SR870BN4 uses it.
421 /// #define EFI_ACPI_2_0_MULTIPLE_SAPIC_DESCRIPTION_TABLE_SIGNATURE 0x43495053
423 #define EFI_ACPI_2_0_MULTIPLE_SAPIC_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'I', 'C')
426 /// "BOOT" MS Simple Boot Spec
428 #define EFI_ACPI_2_0_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE SIGNATURE_32('B', 'O', 'O', 'T')
431 /// "DBGP" MS Bebug Port Spec
433 #define EFI_ACPI_2_0_DEBUG_PORT_TABLE_SIGNATURE SIGNATURE_32('D', 'B', 'G', 'P')
436 /// "DSDT" Differentiated System Description Table
438 #define EFI_ACPI_2_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('D', 'S', 'D', 'T')
441 /// "ECDT" Embedded Controller Boot Resources Table
443 #define EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE SIGNATURE_32('E', 'C', 'D', 'T')
446 /// "ETDT" Event Timer Description Table
448 #define EFI_ACPI_2_0_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('E', 'T', 'D', 'T')
451 /// "FACS" Firmware ACPI Control Structure
453 #define EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'S')
456 /// "FACP" Fixed ACPI Description Table
458 #define EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'P')
461 /// "APIC" Multiple APIC Description Table
463 #define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
466 /// "PSDT" Persistent System Description Table
468 #define EFI_ACPI_2_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('P', 'S', 'D', 'T')
471 /// "RSDT" Root System Description Table
473 #define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('R', 'S', 'D', 'T')
476 /// "SBST" Smart Battery Specification Table
478 #define EFI_ACPI_2_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE SIGNATURE_32('S', 'B', 'S', 'T')
481 /// "SLIT" System Locality Information Table
483 #define EFI_ACPI_2_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE SIGNATURE_32('S', 'L', 'I', 'T')
486 /// "SPCR" Serial Port Concole Redirection Table
488 #define EFI_ACPI_2_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'C', 'R')
491 /// "SRAT" Static Resource Affinity Table
493 #define EFI_ACPI_2_0_STATIC_RESOURCE_AFFINITY_TABLE_SIGNATURE SIGNATURE_32('S', 'R', 'A', 'T')
496 /// "SSDT" Secondary System Description Table
498 #define EFI_ACPI_2_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('S', 'S', 'D', 'T')
501 /// "SPMI" Server Platform Management Interface Table
503 #define EFI_ACPI_2_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_SIGNATURE SIGNATURE_32('S', 'P', 'M', 'I')
506 /// "XSDT" Extended System Description Table
508 #define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('X', 'S', 'D', 'T')
511 /// "MCFG" Static Resource Affinity Table
513 #define EFI_ACPI_2_0_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_SIGNATURE SIGNATURE_32('M', 'C', 'F', 'G')