3 Copyright (c) 2006 - 2007 Intel Corporation. All rights reserved.
4 This software and associated documentation (if any) is furnished
5 under a license and may only be used or copied in accordance
6 with the terms of the license. Except as permitted by such
7 license, no part of this software or documentation may be
8 reproduced, stored in a retrieval system, or transmitted in any
9 form or by any means without the express written consent of
19 ACPI 2.0 definitions from the ACPI Specification, revision 2.0
26 #include "IndustryStandard/Acpi.h"
29 // Ensure proper structure formats
33 // ACPI Specification Revision
35 #define EFI_ACPI_2_0_REVISION 0x02
38 // BUGBUG: OEM values need to be moved somewhere else, probably read from data hub
39 // and produced by a platform specific driver.
44 #define EFI_ACPI_2_0_OEM_ID "INTEL "
45 #define EFI_ACPI_2_0_OEM_TABLE_ID 0x5034303738543245 // "E2T8704P"
49 #define EFI_ACPI_2_0_OEM_REVISION 0x00000002
52 // ACPI table creator ID
54 #define EFI_ACPI_2_0_CREATOR_ID 0x5446534D // TBD "MSFT"
56 // ACPI table creator revision
58 #define EFI_ACPI_2_0_CREATOR_REVISION 0x01000013 // TBD
60 // ACPI 2.0 Generic Address Space definition
64 UINT8 RegisterBitWidth
;
65 UINT8 RegisterBitOffset
;
68 } EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE
;
71 // Generic Address Space Address IDs
73 #define EFI_ACPI_2_0_SYSTEM_MEMORY 0
74 #define EFI_ACPI_2_0_SYSTEM_IO 1
75 #define EFI_ACPI_2_0_PCI_CONFIGURATION_SPACE 2
76 #define EFI_ACPI_2_0_EMBEDDED_CONTROLLER 3
77 #define EFI_ACPI_2_0_SMBUS 4
78 #define EFI_ACPI_2_0_FUNCTIONAL_FIXED_HARDWARE 0x7F
81 // ACPI 2.0 table structures
84 // Root System Description Pointer Structure
94 UINT8 ExtendedChecksum
;
96 } EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER
;
99 // RSD_PTR Revision (as defined in ACPI 2.0 spec.)
101 #define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02
104 // Common table header, this prefaces all ACPI tables, including FACS, but
105 // excluding the RSD PTR structure
110 } EFI_ACPI_2_0_COMMON_HEADER
;
113 // Root System Description Table
114 // No definition needed as it is a common description table header followed by a
115 // variable number of UINT32 table pointers.
118 // RSDT Revision (as defined in ACPI 2.0 spec.)
120 #define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
123 // Extended System Description Table
124 // No definition needed as it is a common description table header followed by a
125 // variable number of UINT64 table pointers.
128 // XSDT Revision (as defined in ACPI 2.0 spec.)
130 #define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
133 // Fixed ACPI Description Table Structure (FADT)
136 EFI_ACPI_DESCRIPTION_HEADER Header
;
140 UINT8 PreferredPmProfile
;
175 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE ResetReg
;
178 UINT64 XFirmwareCtrl
;
180 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk
;
181 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk
;
182 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk
;
183 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk
;
184 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk
;
185 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk
;
186 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk
;
187 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk
;
188 } EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE
;
191 // FADT Version (as defined in ACPI 2.0 spec.)
193 #define EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x03
196 // Fixed ACPI Description Table Boot Architecture Flags
197 // All other bits are reserved and must be set to 0.
199 #define EFI_ACPI_2_0_LEGACY_DEVICES (1 << 0)
200 #define EFI_ACPI_2_0_8042 (1 << 1)
203 // Fixed ACPI Description Table Fixed Feature Flags
204 // All other bits are reserved and must be set to 0.
206 #define EFI_ACPI_2_0_WBINVD (1 << 0)
207 #define EFI_ACPI_2_0_WBINVD_FLUSH (1 << 1)
208 #define EFI_ACPI_2_0_PROC_C1 (1 << 2)
209 #define EFI_ACPI_2_0_P_LVL2_UP (1 << 3)
210 #define EFI_ACPI_2_0_PWR_BUTTON (1 << 4)
211 #define EFI_ACPI_2_0_SLP_BUTTON (1 << 5)
212 #define EFI_ACPI_2_0_FIX_RTC (1 << 6)
213 #define EFI_ACPI_2_0_RTC_S4 (1 << 7)
214 #define EFI_ACPI_2_0_TMR_VAL_EXT (1 << 8)
215 #define EFI_ACPI_2_0_DCK_CAP (1 << 9)
216 #define EFI_ACPI_2_0_RESET_REG_SUP (1 << 10)
217 #define EFI_ACPI_2_0_SEALED_CASE (1 << 11)
218 #define EFI_ACPI_2_0_HEADLESS (1 << 12)
219 #define EFI_ACPI_2_0_CPU_SW_SLP (1 << 13)
222 // Firmware ACPI Control Structure
227 UINT32 HardwareSignature
;
228 UINT32 FirmwareWakingVector
;
231 UINT64 XFirmwareWakingVector
;
234 } EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE
;
237 // FACS Version (as defined in ACPI 2.0 spec.)
239 #define EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION 0x01
242 // Firmware Control Structure Feature Flags
243 // All other bits are reserved and must be set to 0.
245 #define EFI_ACPI_2_0_S4BIOS_F (1 << 0)
248 // Multiple APIC Description Table header definition. The rest of the table
249 // must be defined in a platform specific manner.
252 EFI_ACPI_DESCRIPTION_HEADER Header
;
253 UINT32 LocalApicAddress
;
255 } EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER
;
258 // MADT Revision (as defined in ACPI 2.0 spec.)
260 #define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01
263 // Multiple APIC Flags
264 // All other bits are reserved and must be set to 0.
266 #define EFI_ACPI_2_0_PCAT_COMPAT (1 << 0)
269 // Multiple APIC Description Table APIC structure types
270 // All other values between 0x09 an 0xFF are reserved and
271 // will be ignored by OSPM.
273 #define EFI_ACPI_2_0_PROCESSOR_LOCAL_APIC 0x00
274 #define EFI_ACPI_2_0_IO_APIC 0x01
275 #define EFI_ACPI_2_0_INTERRUPT_SOURCE_OVERRIDE 0x02
276 #define EFI_ACPI_2_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03
277 #define EFI_ACPI_2_0_LOCAL_APIC_NMI 0x04
278 #define EFI_ACPI_2_0_LOCAL_APIC_ADDRESS_OVERRIDE 0x05
279 #define EFI_ACPI_2_0_IO_SAPIC 0x06
280 #define EFI_ACPI_2_0_PROCESSOR_LOCAL_SAPIC 0x07
281 #define EFI_ACPI_2_0_PLATFORM_INTERRUPT_SOURCES 0x08
284 // 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 (1 << 0)
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
434 // "RSD PTR " Root System Description Pointer
436 #define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE 0x2052545020445352
439 // "SPIC" Multiple SAPIC Description Table
441 // BUGBUG: Don't know where this came from except SR870BN4 uses it.
442 // #define EFI_ACPI_2_0_MULTIPLE_SAPIC_DESCRIPTION_TABLE_SIGNATURE 0x43495053
444 #define EFI_ACPI_2_0_MULTIPLE_SAPIC_DESCRIPTION_TABLE_SIGNATURE 0x43495041
447 // "BOOT" MS Simple Boot Spec
449 #define EFI_ACPI_2_0_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE 0x544F4F42
452 // "DBGP" MS Bebug Port Spec
454 #define EFI_ACPI_2_0_DEBUG_PORT_TABLE_SIGNATURE 0x50474244
457 // "DSDT" Differentiated System Description Table
459 #define EFI_ACPI_2_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445344
462 // "ECDT" Embedded Controller Boot Resources Table
464 #define EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE 0x54444345
467 // "ETDT" Event Timer Description Table
469 #define EFI_ACPI_2_0_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE 0x54445445
472 // "FACS" Firmware ACPI Control Structure
474 #define EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE 0x53434146
477 // "FACP" Fixed ACPI Description Table
479 #define EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE 0x50434146
482 // "APIC" Multiple APIC Description Table
484 #define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE 0x43495041
487 // "PSDT" Persistent System Description Table
489 #define EFI_ACPI_2_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445350
492 // "RSDT" Root System Description Table
494 #define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445352
497 // "SBST" Smart Battery Specification Table
499 #define EFI_ACPI_2_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE 0x54534253
502 // "SLIT" System Locality Information Table
504 #define EFI_ACPI_2_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE 0x54494C53
507 // "SPCR" Serial Port Concole Redirection Table
509 #define EFI_ACPI_2_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE 0x52435053
512 // "SRAT" Static Resource Affinity Table
514 #define EFI_ACPI_2_0_STATIC_RESOURCE_AFFINITY_TABLE_SIGNATURE 0x54415253
517 // "SSDT" Secondary System Description Table
519 #define EFI_ACPI_2_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445353
522 // "SPMI" Server Platform Management Interface Table
524 #define EFI_ACPI_2_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_SIGNATURE 0x494D5053
527 // "XSDT" Extended System Description Table
529 #define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445358