2 ACPI 2.0 definitions from the ACPI Specification, revision 2.0
4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
11 #include <IndustryStandard/Acpi10.h>
14 // Define for Descriptor
16 #define ACPI_LARGE_GENERIC_REGISTER_DESCRIPTOR_NAME 0x02
18 #define ACPI_GENERIC_REGISTER_DESCRIPTOR 0x82
21 // Ensure proper structure formats
26 /// Generic Register Descriptor
28 typedef PACKED
struct {
29 ACPI_LARGE_RESOURCE_HEADER Header
;
31 UINT8 RegisterBitWidth
;
32 UINT8 RegisterBitOffset
;
34 UINT64 RegisterAddress
;
35 } EFI_ACPI_GENERIC_REGISTER_DESCRIPTOR
;
40 // Ensure proper structure formats
45 /// ACPI 2.0 Generic Address Space definition
49 UINT8 RegisterBitWidth
;
50 UINT8 RegisterBitOffset
;
53 } EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE
;
56 // Generic Address Space Address IDs
58 #define EFI_ACPI_2_0_SYSTEM_MEMORY 0
59 #define EFI_ACPI_2_0_SYSTEM_IO 1
60 #define EFI_ACPI_2_0_PCI_CONFIGURATION_SPACE 2
61 #define EFI_ACPI_2_0_EMBEDDED_CONTROLLER 3
62 #define EFI_ACPI_2_0_SMBUS 4
63 #define EFI_ACPI_2_0_FUNCTIONAL_FIXED_HARDWARE 0x7F
66 // ACPI 2.0 table structures
70 /// Root System Description Pointer Structure
80 UINT8 ExtendedChecksum
;
82 } EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER
;
85 /// RSD_PTR Revision (as defined in ACPI 2.0 spec.)
87 #define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02
90 /// Common table header, this prefaces all ACPI tables, including FACS, but
91 /// excluding the RSD PTR structure
96 } EFI_ACPI_2_0_COMMON_HEADER
;
99 // Root System Description Table
100 // No definition needed as it is a common description table header, the same with
101 // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
105 /// RSDT Revision (as defined in ACPI 2.0 spec.)
107 #define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
110 // Extended System Description Table
111 // No definition needed as it is a common description table header, the same with
112 // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
116 /// XSDT Revision (as defined in ACPI 2.0 spec.)
118 #define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
121 /// Fixed ACPI Description Table Structure (FADT)
124 EFI_ACPI_DESCRIPTION_HEADER Header
;
128 UINT8 PreferredPmProfile
;
163 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE ResetReg
;
166 UINT64 XFirmwareCtrl
;
168 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk
;
169 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk
;
170 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk
;
171 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk
;
172 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk
;
173 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk
;
174 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk
;
175 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk
;
176 } EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE
;
179 /// FADT Version (as defined in ACPI 2.0 spec.)
181 #define EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x03
184 // Fixed ACPI Description Table Preferred Power Management Profile
186 #define EFI_ACPI_2_0_PM_PROFILE_UNSPECIFIED 0
187 #define EFI_ACPI_2_0_PM_PROFILE_DESKTOP 1
188 #define EFI_ACPI_2_0_PM_PROFILE_MOBILE 2
189 #define EFI_ACPI_2_0_PM_PROFILE_WORKSTATION 3
190 #define EFI_ACPI_2_0_PM_PROFILE_ENTERPRISE_SERVER 4
191 #define EFI_ACPI_2_0_PM_PROFILE_SOHO_SERVER 5
192 #define EFI_ACPI_2_0_PM_PROFILE_APPLIANCE_PC 6
195 // Fixed ACPI Description Table Boot Architecture Flags
196 // All other bits are reserved and must be set to 0.
198 #define EFI_ACPI_2_0_LEGACY_DEVICES BIT0
199 #define EFI_ACPI_2_0_8042 BIT1
202 // Fixed ACPI Description Table Fixed Feature Flags
203 // All other bits are reserved and must be set to 0.
205 #define EFI_ACPI_2_0_WBINVD BIT0
206 #define EFI_ACPI_2_0_WBINVD_FLUSH BIT1
207 #define EFI_ACPI_2_0_PROC_C1 BIT2
208 #define EFI_ACPI_2_0_P_LVL2_UP BIT3
209 #define EFI_ACPI_2_0_PWR_BUTTON BIT4
210 #define EFI_ACPI_2_0_SLP_BUTTON BIT5
211 #define EFI_ACPI_2_0_FIX_RTC BIT6
212 #define EFI_ACPI_2_0_RTC_S4 BIT7
213 #define EFI_ACPI_2_0_TMR_VAL_EXT BIT8
214 #define EFI_ACPI_2_0_DCK_CAP BIT9
215 #define EFI_ACPI_2_0_RESET_REG_SUP BIT10
216 #define EFI_ACPI_2_0_SEALED_CASE BIT11
217 #define EFI_ACPI_2_0_HEADLESS BIT12
218 #define EFI_ACPI_2_0_CPU_SW_SLP BIT13
221 /// Firmware ACPI Control Structure
226 UINT32 HardwareSignature
;
227 UINT32 FirmwareWakingVector
;
230 UINT64 XFirmwareWakingVector
;
233 } EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE
;
236 /// FACS Version (as defined in ACPI 2.0 spec.)
238 #define EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION 0x01
241 /// Firmware Control Structure Feature Flags
242 /// All other bits are reserved and must be set to 0.
244 #define EFI_ACPI_2_0_S4BIOS_F BIT0
247 /// Multiple APIC Description Table header definition. The rest of the table
248 /// must be defined in a platform specific manner.
251 EFI_ACPI_DESCRIPTION_HEADER Header
;
252 UINT32 LocalApicAddress
;
254 } EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER
;
257 /// MADT Revision (as defined in ACPI 2.0 spec.)
259 #define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01
262 /// Multiple APIC Flags
263 /// All other bits are reserved and must be set to 0.
265 #define EFI_ACPI_2_0_PCAT_COMPAT BIT0
268 // Multiple APIC Description Table APIC structure types
269 // All other values between 0x09 an 0xFF are reserved and
270 // will be ignored by OSPM.
272 #define EFI_ACPI_2_0_PROCESSOR_LOCAL_APIC 0x00
273 #define EFI_ACPI_2_0_IO_APIC 0x01
274 #define EFI_ACPI_2_0_INTERRUPT_SOURCE_OVERRIDE 0x02
275 #define EFI_ACPI_2_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03
276 #define EFI_ACPI_2_0_LOCAL_APIC_NMI 0x04
277 #define EFI_ACPI_2_0_LOCAL_APIC_ADDRESS_OVERRIDE 0x05
278 #define EFI_ACPI_2_0_IO_SAPIC 0x06
279 #define EFI_ACPI_2_0_PROCESSOR_LOCAL_SAPIC 0x07
280 #define EFI_ACPI_2_0_PLATFORM_INTERRUPT_SOURCES 0x08
283 // APIC Structure Definitions
287 /// Processor Local APIC Structure Definition
292 UINT8 AcpiProcessorId
;
295 } EFI_ACPI_2_0_PROCESSOR_LOCAL_APIC_STRUCTURE
;
298 /// Local APIC Flags. All other bits are reserved and must be 0.
300 #define EFI_ACPI_2_0_LOCAL_APIC_ENABLED BIT0
303 /// IO APIC Structure
310 UINT32 IoApicAddress
;
311 UINT32 GlobalSystemInterruptBase
;
312 } EFI_ACPI_2_0_IO_APIC_STRUCTURE
;
315 /// Interrupt Source Override Structure
322 UINT32 GlobalSystemInterrupt
;
324 } EFI_ACPI_2_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE
;
327 /// Non-Maskable Interrupt Source Structure
333 UINT32 GlobalSystemInterrupt
;
334 } EFI_ACPI_2_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE
;
337 /// Local APIC NMI Structure
342 UINT8 AcpiProcessorId
;
345 } EFI_ACPI_2_0_LOCAL_APIC_NMI_STRUCTURE
;
348 /// Local APIC Address Override Structure
354 UINT64 LocalApicAddress
;
355 } EFI_ACPI_2_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE
;
358 /// IO SAPIC Structure
365 UINT32 GlobalSystemInterruptBase
;
366 UINT64 IoSapicAddress
;
367 } EFI_ACPI_2_0_IO_SAPIC_STRUCTURE
;
370 /// Local SAPIC Structure
375 UINT8 AcpiProcessorId
;
380 } EFI_ACPI_2_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE
;
383 /// Platform Interrupt Sources Structure
393 UINT32 GlobalSystemInterrupt
;
395 } EFI_ACPI_2_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE
;
398 /// Smart Battery Description Table (SBST)
401 EFI_ACPI_DESCRIPTION_HEADER Header
;
402 UINT32 WarningEnergyLevel
;
403 UINT32 LowEnergyLevel
;
404 UINT32 CriticalEnergyLevel
;
405 } EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE
;
408 /// SBST Version (as defined in ACPI 2.0 spec.)
410 #define EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
413 /// Embedded Controller Boot Resources Table (ECDT)
414 /// The table is followed by a null terminated ASCII string that contains
415 /// a fully qualified reference to the name space object.
418 EFI_ACPI_DESCRIPTION_HEADER Header
;
419 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE EcControl
;
420 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE EcData
;
423 } EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE
;
426 /// ECDT Version (as defined in ACPI 2.0 spec.)
428 #define EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION 0x01
431 // Known table signatures
435 /// "RSD PTR " Root System Description Pointer
437 #define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
440 /// "SPIC" Multiple SAPIC Description Table
442 /// BUGBUG: Don't know where this came from except SR870BN4 uses it.
443 /// #define EFI_ACPI_2_0_MULTIPLE_SAPIC_DESCRIPTION_TABLE_SIGNATURE 0x43495053
445 #define EFI_ACPI_2_0_MULTIPLE_SAPIC_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
448 /// "BOOT" MS Simple Boot Spec
450 #define EFI_ACPI_2_0_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE SIGNATURE_32('B', 'O', 'O', 'T')
453 /// "DBGP" MS Bebug Port Spec
455 #define EFI_ACPI_2_0_DEBUG_PORT_TABLE_SIGNATURE SIGNATURE_32('D', 'B', 'G', 'P')
458 /// "DSDT" Differentiated System Description Table
460 #define EFI_ACPI_2_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('D', 'S', 'D', 'T')
463 /// "ECDT" Embedded Controller Boot Resources Table
465 #define EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE SIGNATURE_32('E', 'C', 'D', 'T')
468 /// "ETDT" Event Timer Description Table
470 #define EFI_ACPI_2_0_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('E', 'T', 'D', 'T')
473 /// "FACS" Firmware ACPI Control Structure
475 #define EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'S')
478 /// "FACP" Fixed ACPI Description Table
480 #define EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'P')
483 /// "APIC" Multiple APIC Description Table
485 #define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
488 /// "PSDT" Persistent System Description Table
490 #define EFI_ACPI_2_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('P', 'S', 'D', 'T')
493 /// "RSDT" Root System Description Table
495 #define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('R', 'S', 'D', 'T')
498 /// "SBST" Smart Battery Specification Table
500 #define EFI_ACPI_2_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE SIGNATURE_32('S', 'B', 'S', 'T')
503 /// "SLIT" System Locality Information Table
505 #define EFI_ACPI_2_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE SIGNATURE_32('S', 'L', 'I', 'T')
508 /// "SPCR" Serial Port Console Redirection Table
510 #define EFI_ACPI_2_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'C', 'R')
513 /// "SRAT" Static Resource Affinity Table
515 #define EFI_ACPI_2_0_STATIC_RESOURCE_AFFINITY_TABLE_SIGNATURE SIGNATURE_32('S', 'R', 'A', 'T')
518 /// "SSDT" Secondary System Description Table
520 #define EFI_ACPI_2_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('S', 'S', 'D', 'T')
523 /// "SPMI" Server Platform Management Interface Table
525 #define EFI_ACPI_2_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_SIGNATURE SIGNATURE_32('S', 'P', 'M', 'I')
528 /// "XSDT" Extended System Description Table
530 #define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('X', 'S', 'D', 'T')
533 /// "MCFG" PCI Express Memory Mapped Configuration Space Base Address Description Table
535 #define EFI_ACPI_2_0_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_SIGNATURE SIGNATURE_32('M', 'C', 'F', 'G')