2 ACPI 2.0 definitions from the ACPI Specification, revision 2.0
4 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
5 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 // Define for Desriptor
22 #define ACPI_LARGE_GENERIC_REGISTER_DESCRIPTOR_NAME 0x02
24 #define ACPI_GENERIC_REGISTER_DESCRIPTOR 0x82
27 // Ensure proper structure formats
32 /// Generic Register Descriptor
34 typedef PACKED
struct {
35 ACPI_LARGE_RESOURCE_HEADER Header
;
37 UINT8 RegisterBitWidth
;
38 UINT8 RegisterBitOffset
;
40 UINT64 RegisterAddress
;
41 } EFI_ACPI_GENERIC_REGISTER_DESCRIPTOR
;
46 // Ensure proper structure formats
51 /// ACPI 2.0 Generic Address Space definition
55 UINT8 RegisterBitWidth
;
56 UINT8 RegisterBitOffset
;
59 } EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE
;
62 // Generic Address Space Address IDs
64 #define EFI_ACPI_2_0_SYSTEM_MEMORY 0
65 #define EFI_ACPI_2_0_SYSTEM_IO 1
66 #define EFI_ACPI_2_0_PCI_CONFIGURATION_SPACE 2
67 #define EFI_ACPI_2_0_EMBEDDED_CONTROLLER 3
68 #define EFI_ACPI_2_0_SMBUS 4
69 #define EFI_ACPI_2_0_FUNCTIONAL_FIXED_HARDWARE 0x7F
72 // ACPI 2.0 table structures
76 /// Root System Description Pointer Structure
86 UINT8 ExtendedChecksum
;
88 } EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER
;
91 /// RSD_PTR Revision (as defined in ACPI 2.0 spec.)
93 #define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02
96 /// Common table header, this prefaces all ACPI tables, including FACS, but
97 /// excluding the RSD PTR structure
102 } EFI_ACPI_2_0_COMMON_HEADER
;
105 // Root System Description Table
106 // No definition needed as it is a common description table header, the same with
107 // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
111 /// RSDT Revision (as defined in ACPI 2.0 spec.)
113 #define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
116 // Extended System Description Table
117 // No definition needed as it is a common description table header, the same with
118 // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
122 /// XSDT Revision (as defined in ACPI 2.0 spec.)
124 #define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
127 /// Fixed ACPI Description Table Structure (FADT)
130 EFI_ACPI_DESCRIPTION_HEADER Header
;
134 UINT8 PreferredPmProfile
;
169 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE ResetReg
;
172 UINT64 XFirmwareCtrl
;
174 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk
;
175 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk
;
176 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk
;
177 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk
;
178 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk
;
179 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk
;
180 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk
;
181 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk
;
182 } EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE
;
185 /// FADT Version (as defined in ACPI 2.0 spec.)
187 #define EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x03
190 // Fixed ACPI Description Table Preferred Power Management Profile
192 #define EFI_ACPI_2_0_PM_PROFILE_UNSPECIFIED 0
193 #define EFI_ACPI_2_0_PM_PROFILE_DESKTOP 1
194 #define EFI_ACPI_2_0_PM_PROFILE_MOBILE 2
195 #define EFI_ACPI_2_0_PM_PROFILE_WORKSTATION 3
196 #define EFI_ACPI_2_0_PM_PROFILE_ENTERPRISE_SERVER 4
197 #define EFI_ACPI_2_0_PM_PROFILE_SOHO_SERVER 5
198 #define EFI_ACPI_2_0_PM_PROFILE_APPLIANCE_PC 6
201 // Fixed ACPI Description Table Boot Architecture Flags
202 // All other bits are reserved and must be set to 0.
204 #define EFI_ACPI_2_0_LEGACY_DEVICES BIT0
205 #define EFI_ACPI_2_0_8042 BIT1
208 // Fixed ACPI Description Table Fixed Feature Flags
209 // All other bits are reserved and must be set to 0.
211 #define EFI_ACPI_2_0_WBINVD BIT0
212 #define EFI_ACPI_2_0_WBINVD_FLUSH BIT1
213 #define EFI_ACPI_2_0_PROC_C1 BIT2
214 #define EFI_ACPI_2_0_P_LVL2_UP BIT3
215 #define EFI_ACPI_2_0_PWR_BUTTON BIT4
216 #define EFI_ACPI_2_0_SLP_BUTTON BIT5
217 #define EFI_ACPI_2_0_FIX_RTC BIT6
218 #define EFI_ACPI_2_0_RTC_S4 BIT7
219 #define EFI_ACPI_2_0_TMR_VAL_EXT BIT8
220 #define EFI_ACPI_2_0_DCK_CAP BIT9
221 #define EFI_ACPI_2_0_RESET_REG_SUP BIT10
222 #define EFI_ACPI_2_0_SEALED_CASE BIT11
223 #define EFI_ACPI_2_0_HEADLESS BIT12
224 #define EFI_ACPI_2_0_CPU_SW_SLP BIT13
227 /// Firmware ACPI Control Structure
232 UINT32 HardwareSignature
;
233 UINT32 FirmwareWakingVector
;
236 UINT64 XFirmwareWakingVector
;
239 } EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE
;
242 /// FACS Version (as defined in ACPI 2.0 spec.)
244 #define EFI_ACPI_2_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_2_0_S4BIOS_F BIT0
253 /// Multiple APIC Description Table header definition. The rest of the table
254 /// must be defined in a platform specific manner.
257 EFI_ACPI_DESCRIPTION_HEADER Header
;
258 UINT32 LocalApicAddress
;
260 } EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER
;
263 /// MADT Revision (as defined in ACPI 2.0 spec.)
265 #define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01
268 /// Multiple APIC Flags
269 /// All other bits are reserved and must be set to 0.
271 #define EFI_ACPI_2_0_PCAT_COMPAT BIT0
274 // Multiple APIC Description Table APIC structure types
275 // All other values between 0x09 an 0xFF are reserved and
276 // will be ignored by OSPM.
278 #define EFI_ACPI_2_0_PROCESSOR_LOCAL_APIC 0x00
279 #define EFI_ACPI_2_0_IO_APIC 0x01
280 #define EFI_ACPI_2_0_INTERRUPT_SOURCE_OVERRIDE 0x02
281 #define EFI_ACPI_2_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03
282 #define EFI_ACPI_2_0_LOCAL_APIC_NMI 0x04
283 #define EFI_ACPI_2_0_LOCAL_APIC_ADDRESS_OVERRIDE 0x05
284 #define EFI_ACPI_2_0_IO_SAPIC 0x06
285 #define EFI_ACPI_2_0_PROCESSOR_LOCAL_SAPIC 0x07
286 #define EFI_ACPI_2_0_PLATFORM_INTERRUPT_SOURCES 0x08
289 // APIC Structure Definitions
293 /// Processor Local APIC Structure Definition
298 UINT8 AcpiProcessorId
;
301 } EFI_ACPI_2_0_PROCESSOR_LOCAL_APIC_STRUCTURE
;
304 /// Local APIC Flags. All other bits are reserved and must be 0.
306 #define EFI_ACPI_2_0_LOCAL_APIC_ENABLED BIT0
309 /// IO APIC Structure
316 UINT32 IoApicAddress
;
317 UINT32 GlobalSystemInterruptBase
;
318 } EFI_ACPI_2_0_IO_APIC_STRUCTURE
;
321 /// Interrupt Source Override Structure
328 UINT32 GlobalSystemInterrupt
;
330 } EFI_ACPI_2_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE
;
333 /// Non-Maskable Interrupt Source Structure
339 UINT32 GlobalSystemInterrupt
;
340 } EFI_ACPI_2_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE
;
343 /// Local APIC NMI Structure
348 UINT8 AcpiProcessorId
;
351 } EFI_ACPI_2_0_LOCAL_APIC_NMI_STRUCTURE
;
354 /// Local APIC Address Override Structure
360 UINT64 LocalApicAddress
;
361 } EFI_ACPI_2_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE
;
364 /// IO SAPIC Structure
371 UINT32 GlobalSystemInterruptBase
;
372 UINT64 IoSapicAddress
;
373 } EFI_ACPI_2_0_IO_SAPIC_STRUCTURE
;
376 /// Local SAPIC Structure
381 UINT8 AcpiProcessorId
;
386 } EFI_ACPI_2_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE
;
389 /// Platform Interrupt Sources Structure
399 UINT32 GlobalSystemInterrupt
;
401 } EFI_ACPI_2_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE
;
404 /// Smart Battery Description Table (SBST)
407 EFI_ACPI_DESCRIPTION_HEADER Header
;
408 UINT32 WarningEnergyLevel
;
409 UINT32 LowEnergyLevel
;
410 UINT32 CriticalEnergyLevel
;
411 } EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE
;
414 /// SBST Version (as defined in ACPI 2.0 spec.)
416 #define EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
419 /// Embedded Controller Boot Resources Table (ECDT)
420 /// The table is followed by a null terminated ASCII string that contains
421 /// a fully qualified reference to the name space object.
424 EFI_ACPI_DESCRIPTION_HEADER Header
;
425 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE EcControl
;
426 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE EcData
;
429 } EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE
;
432 /// ECDT Version (as defined in ACPI 2.0 spec.)
434 #define EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION 0x01
437 // Known table signatures
441 /// "RSD PTR " Root System Description Pointer
443 #define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
446 /// "SPIC" Multiple SAPIC Description Table
448 /// BUGBUG: Don't know where this came from except SR870BN4 uses it.
449 /// #define EFI_ACPI_2_0_MULTIPLE_SAPIC_DESCRIPTION_TABLE_SIGNATURE 0x43495053
451 #define EFI_ACPI_2_0_MULTIPLE_SAPIC_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
454 /// "BOOT" MS Simple Boot Spec
456 #define EFI_ACPI_2_0_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE SIGNATURE_32('B', 'O', 'O', 'T')
459 /// "DBGP" MS Bebug Port Spec
461 #define EFI_ACPI_2_0_DEBUG_PORT_TABLE_SIGNATURE SIGNATURE_32('D', 'B', 'G', 'P')
464 /// "DSDT" Differentiated System Description Table
466 #define EFI_ACPI_2_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('D', 'S', 'D', 'T')
469 /// "ECDT" Embedded Controller Boot Resources Table
471 #define EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE SIGNATURE_32('E', 'C', 'D', 'T')
474 /// "ETDT" Event Timer Description Table
476 #define EFI_ACPI_2_0_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('E', 'T', 'D', 'T')
479 /// "FACS" Firmware ACPI Control Structure
481 #define EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'S')
484 /// "FACP" Fixed ACPI Description Table
486 #define EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'P')
489 /// "APIC" Multiple APIC Description Table
491 #define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
494 /// "PSDT" Persistent System Description Table
496 #define EFI_ACPI_2_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('P', 'S', 'D', 'T')
499 /// "RSDT" Root System Description Table
501 #define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('R', 'S', 'D', 'T')
504 /// "SBST" Smart Battery Specification Table
506 #define EFI_ACPI_2_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE SIGNATURE_32('S', 'B', 'S', 'T')
509 /// "SLIT" System Locality Information Table
511 #define EFI_ACPI_2_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE SIGNATURE_32('S', 'L', 'I', 'T')
514 /// "SPCR" Serial Port Concole Redirection Table
516 #define EFI_ACPI_2_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'C', 'R')
519 /// "SRAT" Static Resource Affinity Table
521 #define EFI_ACPI_2_0_STATIC_RESOURCE_AFFINITY_TABLE_SIGNATURE SIGNATURE_32('S', 'R', 'A', 'T')
524 /// "SSDT" Secondary System Description Table
526 #define EFI_ACPI_2_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('S', 'S', 'D', 'T')
529 /// "SPMI" Server Platform Management Interface Table
531 #define EFI_ACPI_2_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_SIGNATURE SIGNATURE_32('S', 'P', 'M', 'I')
534 /// "XSDT" Extended System Description Table
536 #define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('X', 'S', 'D', 'T')
539 /// "MCFG" PCI Express Memory Mapped Configuration Space Base Address Description Table
541 #define EFI_ACPI_2_0_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_SIGNATURE SIGNATURE_32('M', 'C', 'F', 'G')