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 3.0 definitions from the ACPI Specification Revision 3.0 September 2, 2004
26 #include "IndustryStandard/Acpi.h"
29 // Ensure proper structure formats
33 // ACPI Specification Revision
35 #define EFI_ACPI_3_0_REVISION 0x03 // BUGBUG: Not in spec yet.
37 // BUGBUG: OEM values need to be moved somewhere else, probably read from data hub
38 // and produced by a platform specific driver.
41 // ACPI 3.0 Generic Address Space definition
45 UINT8 RegisterBitWidth
;
46 UINT8 RegisterBitOffset
;
49 } EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE
;
52 // Generic Address Space Address IDs
54 #define EFI_ACPI_3_0_SYSTEM_MEMORY 0
55 #define EFI_ACPI_3_0_SYSTEM_IO 1
56 #define EFI_ACPI_3_0_PCI_CONFIGURATION_SPACE 2
57 #define EFI_ACPI_3_0_EMBEDDED_CONTROLLER 3
58 #define EFI_ACPI_3_0_SMBUS 4
59 #define EFI_ACPI_3_0_FUNCTIONAL_FIXED_HARDWARE 0x7F
62 // Generic Address Space Access Sizes
64 #define EFI_ACPI_3_0_UNDEFINED 0
65 #define EFI_ACPI_3_0_BYTE 1
66 #define EFI_ACPI_3_0_WORD 2
67 #define EFI_ACPI_3_0_DWORD 3
68 #define EFI_ACPI_3_0_QWORD 4
71 // ACPI 3.0 table structures
74 // Root System Description Pointer Structure
84 UINT8 ExtendedChecksum
;
86 } EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER
;
89 // RSD_PTR Revision (as defined in ACPI 3.0 spec.)
91 #define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 // ACPISpec30 (Revision 3.0 September 2, 2004) says current value is 2
93 // Common table header, this prefaces all ACPI tables, including FACS, but
94 // excluding the RSD PTR structure
99 } EFI_ACPI_3_0_COMMON_HEADER
;
102 // Root System Description Table
103 // No definition needed as it is a common description table header followed by a
104 // variable number of UINT32 table pointers.
107 // RSDT Revision (as defined in ACPI 3.0 spec.)
109 #define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
112 // Extended System Description Table
113 // No definition needed as it is a common description table header followed by a
114 // variable number of UINT64 table pointers.
117 // XSDT Revision (as defined in ACPI 3.0 spec.)
119 #define EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
122 // Fixed ACPI Description Table Structure (FADT)
125 EFI_ACPI_DESCRIPTION_HEADER Header
;
129 UINT8 PreferredPmProfile
;
164 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE ResetReg
;
167 UINT64 XFirmwareCtrl
;
169 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk
;
170 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk
;
171 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk
;
172 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk
;
173 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk
;
174 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk
;
175 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk
;
176 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk
;
177 } EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE
;
180 // FADT Version (as defined in ACPI 3.0 spec.)
182 #define EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x04
185 // Fixed ACPI Description Table Preferred Power Management Profile
187 #define EFI_ACPI_3_0_PM_PROFILE_UNSPECIFIED 0
188 #define EFI_ACPI_3_0_PM_PROFILE_DESKTOP 1
189 #define EFI_ACPI_3_0_PM_PROFILE_MOBILE 2
190 #define EFI_ACPI_3_0_PM_PROFILE_WORKSTATION 3
191 #define EFI_ACPI_3_0_PM_PROFILE_ENTERPRISE_SERVER 4
192 #define EFI_ACPI_3_0_PM_PROFILE_SOHO_SERVER 5
193 #define EFI_ACPI_3_0_PM_PROFILE_APPLIANCE_PC 6
194 #define EFI_ACPI_3_0_PM_PROFILE_PERFORMANCE_SERVER 7
197 // Fixed ACPI Description Table Boot Architecture Flags
198 // All other bits are reserved and must be set to 0.
200 #define EFI_ACPI_3_0_LEGACY_DEVICES (1 << 0)
201 #define EFI_ACPI_3_0_8042 (1 << 1)
202 #define EFI_ACPI_3_0_VGA_NOT_PRESENT (1 << 2)
203 #define EFI_ACPI_3_0_MSI_NOT_SUPPORTED (1 << 3)
205 // Fixed ACPI Description Table Fixed Feature Flags
206 // All other bits are reserved and must be set to 0.
208 #define EFI_ACPI_3_0_WBINVD (1 << 0)
209 #define EFI_ACPI_3_0_WBINVD_FLUSH (1 << 1)
210 #define EFI_ACPI_3_0_PROC_C1 (1 << 2)
211 #define EFI_ACPI_3_0_P_LVL2_UP (1 << 3)
212 #define EFI_ACPI_3_0_PWR_BUTTON (1 << 4)
213 #define EFI_ACPI_3_0_SLP_BUTTON (1 << 5)
214 #define EFI_ACPI_3_0_FIX_RTC (1 << 6)
215 #define EFI_ACPI_3_0_RTC_S4 (1 << 7)
216 #define EFI_ACPI_3_0_TMR_VAL_EXT (1 << 8)
217 #define EFI_ACPI_3_0_DCK_CAP (1 << 9)
218 #define EFI_ACPI_3_0_RESET_REG_SUP (1 << 10)
219 #define EFI_ACPI_3_0_SEALED_CASE (1 << 11)
220 #define EFI_ACPI_3_0_HEADLESS (1 << 12)
221 #define EFI_ACPI_3_0_CPU_SW_SLP (1 << 13)
222 #define EFI_ACPI_3_0_PCI_EXP_WAK (1 << 14)
223 #define EFI_ACPI_3_0_USE_PLATFORM_CLOCK (1 << 15)
224 #define EFI_ACPI_3_0_S4_RTC_STS_VALID (1 << 16)
225 #define EFI_ACPI_3_0_REMOTE_POWER_ON_CAPABLE (1 << 17)
226 #define EFI_ACPI_3_0_FORCE_APIC_CLUSTER_MODEL (1 << 18)
227 #define EFI_ACPI_3_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE (1 << 19)
230 // Firmware ACPI Control Structure
235 UINT32 HardwareSignature
;
236 UINT32 FirmwareWakingVector
;
239 UINT64 XFirmwareWakingVector
;
242 } EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE
;
245 // FACS Version (as defined in ACPI 3.0 spec.)
247 #define EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION 0x01
250 // Firmware Control Structure Feature Flags
251 // All other bits are reserved and must be set to 0.
253 #define EFI_ACPI_3_0_S4BIOS_F (1 << 0)
256 // Differentiated System Description Table,
257 // Secondary System Description Table
258 // and Persistent System Description Table,
259 // no definition needed as they are common description table header followed by a
262 #define EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
263 #define EFI_ACPI_3_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
266 // Multiple APIC Description Table header definition. The rest of the table
267 // must be defined in a platform specific manner.
270 EFI_ACPI_DESCRIPTION_HEADER Header
;
271 UINT32 LocalApicAddress
;
273 } EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER
;
276 // MADT Revision (as defined in ACPI 3.0 spec.)
278 #define EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x02
281 // Multiple APIC Flags
282 // All other bits are reserved and must be set to 0.
284 #define EFI_ACPI_3_0_PCAT_COMPAT (1 << 0)
287 // Multiple APIC Description Table APIC structure types
288 // All other values between 0x09 an 0xFF are reserved and
289 // will be ignored by OSPM.
291 #define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC 0x00
292 #define EFI_ACPI_3_0_IO_APIC 0x01
293 #define EFI_ACPI_3_0_INTERRUPT_SOURCE_OVERRIDE 0x02
294 #define EFI_ACPI_3_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03
295 #define EFI_ACPI_3_0_LOCAL_APIC_NMI 0x04
296 #define EFI_ACPI_3_0_LOCAL_APIC_ADDRESS_OVERRIDE 0x05
297 #define EFI_ACPI_3_0_IO_SAPIC 0x06
298 #define EFI_ACPI_3_0_LOCAL_SAPIC 0x07
299 #define EFI_ACPI_3_0_PLATFORM_INTERRUPT_SOURCES 0x08
302 // APIC Structure Definitions
305 // Processor Local APIC Structure Definition
310 UINT8 AcpiProcessorId
;
313 } EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_STRUCTURE
;
316 // Local APIC Flags. All other bits are reserved and must be 0.
318 #define EFI_ACPI_3_0_LOCAL_APIC_ENABLED (1 << 0)
328 UINT32 IoApicAddress
;
329 UINT32 GlobalSystemInterruptBase
;
330 } EFI_ACPI_3_0_IO_APIC_STRUCTURE
;
333 // Interrupt Source Override Structure
340 UINT32 GlobalSystemInterrupt
;
342 } EFI_ACPI_3_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE
;
345 // Platform Interrupt Sources Structure Definition
355 UINT32 GlobalSystemInterrupt
;
356 UINT32 PlatformInterruptSourceFlags
;
357 UINT8 CpeiProcessorOverride
;
359 } EFI_ACPI_3_0_PLATFORM_INTERRUPT_APIC_STRUCTURE
;
363 // All other bits are reserved and must be set to 0.
365 #define EFI_ACPI_3_0_POLARITY (3 << 0)
366 #define EFI_ACPI_3_0_TRIGGER_MODE (3 << 2)
369 // Non-Maskable Interrupt Source Structure
375 UINT32 GlobalSystemInterrupt
;
376 } EFI_ACPI_3_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE
;
379 // Local APIC NMI Structure
384 UINT8 AcpiProcessorId
;
387 } EFI_ACPI_3_0_LOCAL_APIC_NMI_STRUCTURE
;
390 // Local APIC Address Override Structure
396 UINT64 LocalApicAddress
;
397 } EFI_ACPI_3_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE
;
400 // IO SAPIC Structure
407 UINT32 GlobalSystemInterruptBase
;
408 UINT64 IoSapicAddress
;
409 } EFI_ACPI_3_0_IO_SAPIC_STRUCTURE
;
412 // Local SAPIC Structure
413 // This struct followed by a null-terminated ASCII string - ACPI Processor UID String
418 UINT8 AcpiProcessorId
;
423 UINT32 ACPIProcessorUIDValue
;
424 } EFI_ACPI_3_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE
;
427 // Platform Interrupt Sources Structure
437 UINT32 GlobalSystemInterrupt
;
438 UINT32 PlatformInterruptSourceFlags
;
439 } EFI_ACPI_3_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE
;
442 // Platform Interrupt Source Flags.
443 // All other bits are reserved and must be set to 0.
445 #define EFI_ACPI_3_0_CPEI_PROCESSOR_OVERRIDE (1 << 0)
448 // Smart Battery Description Table (SBST)
451 EFI_ACPI_DESCRIPTION_HEADER Header
;
452 UINT32 WarningEnergyLevel
;
453 UINT32 LowEnergyLevel
;
454 UINT32 CriticalEnergyLevel
;
455 } EFI_ACPI_3_0_SMART_BATTERY_DESCRIPTION_TABLE
;
458 // SBST Version (as defined in ACPI 3.0 spec.)
460 #define EFI_ACPI_3_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
463 // Embedded Controller Boot Resources Table (ECDT)
464 // The table is followed by a null terminated ASCII string that contains
465 // a fully qualified reference to the name space object.
468 EFI_ACPI_DESCRIPTION_HEADER Header
;
469 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE EcControl
;
470 EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE EcData
;
473 } EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE
;
476 // ECDT Version (as defined in ACPI 3.0 spec.)
478 #define EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION 0x01
481 // System Resource Affinity Table (SRAT. The rest of the table
482 // must be defined in a platform specific manner.
485 EFI_ACPI_DESCRIPTION_HEADER Header
;
486 UINT32 Reserved1
; // Must be set to 1
488 } EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER
;
491 // SRAT Version (as defined in ACPI 3.0 spec.)
493 #define EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_REVISION 0x02
496 // SRAT structure types.
497 // All other values between 0x02 an 0xFF are reserved and
498 // will be ignored by OSPM.
500 #define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY 0x00
501 #define EFI_ACPI_3_0_MEMORY_AFFINITY 0x01
504 // Processor Local APIC/SAPIC Affinity Structure Definition
509 UINT8 ProximityDomain7To0
;
513 UINT8 ProximityDomain31To8
[3];
515 } EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE
;
518 // Local APIC/SAPIC Flags. All other bits are reserved and must be 0.
520 #define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
523 // Memory Affinity Structure Definition
528 UINT32 ProximityDomain
;
530 UINT32 AddressBaseLow
;
531 UINT32 AddressBaseHigh
;
537 } EFI_ACPI_3_0_MEMORY_AFFINITY_STRUCTURE
;
540 // Memory Flags. All other bits are reserved and must be 0.
542 #define EFI_ACPI_3_0_MEMORY_ENABLED (1 << 0)
543 #define EFI_ACPI_3_0_MEMORY_HOT_PLUGGABLE (1 << 1)
544 #define EFI_ACPI_3_0_MEMORY_NONVOLATILE (1 << 2)
547 // System Locality Distance Information Table (SLIT).
548 // The rest of the table is a matrix.
551 EFI_ACPI_DESCRIPTION_HEADER Header
;
552 UINT64 NumberOfSystemLocalities
;
553 } EFI_ACPI_3_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER
;
556 // SLIT Version (as defined in ACPI 3.0 spec.)
558 #define EFI_ACPI_3_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_REVISION 0x01
561 // Known table signatures
564 // "RSD PTR " Root System Description Pointer
566 #define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE 0x2052545020445352ULL
569 // "APIC" Multiple APIC Description Table
571 #define EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE 0x43495041
574 // "DSDT" Differentiated System Description Table
576 #define EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445344
579 // "ECDT" Embedded Controller Boot Resources Table
581 #define EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE 0x54444345
584 // "FACP" Fixed ACPI Description Table
586 #define EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE 0x50434146
589 // "FACS" Firmware ACPI Control Structure
591 #define EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE 0x53434146
594 // "PSDT" Persistent System Description Table
596 #define EFI_ACPI_3_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445350
599 // "RSDT" Root System Description Table
601 #define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445352
604 // "SBST" Smart Battery Specification Table
606 #define EFI_ACPI_3_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE 0x54534253
609 // "SLIT" System Locality Information Table
611 #define EFI_ACPI_3_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE 0x54494C53
614 // "SRAT" System Resource Affinity Table
616 #define EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_SIGNATURE 0x54415253
619 // "SSDT" Secondary System Description Table
621 #define EFI_ACPI_3_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445353
624 // "XSDT" Extended System Description Table
626 #define EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445358
629 // "BOOT" MS Simple Boot Spec
631 #define EFI_ACPI_3_0_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE 0x544F4F42
634 // "CPEP" Corrected Platform Error Polling Table
637 #define EFI_ACPI_3_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_SIGNATURE 0x50455043
640 // "DBGP" MS Debug Port Spec
642 #define EFI_ACPI_3_0_DEBUG_PORT_TABLE_SIGNATURE 0x50474244
645 // "ETDT" Event Timer Description Table
647 #define EFI_ACPI_3_0_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE 0x54445445
650 // "HPET" IA-PC High Precision Event Timer Table
652 #define EFI_ACPI_3_0_HIGH_PRECISION_EVENT_TIMER_TABLE_SIGNATURE 0x54455048
655 // "MCFG" PCI Express Memory Mapped Configuration Space Base Address Description Table
657 #define EFI_ACPI_3_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE 0x4746434D
660 // "SPCR" Serial Port Concole Redirection Table
662 #define EFI_ACPI_3_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE 0x52435053
665 // "SPMI" Server Platform Management Interface Table
667 #define EFI_ACPI_3_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE_SIGNATURE 0x494D5053
670 // "TCPA" Trusted Computing Platform Alliance Capabilities Table
672 #define EFI_ACPI_3_0_TRUSTED_COMPUTING_PLATFORM_ALLIANCE_CAPABILITIES_TABLE_SIGNATURE 0x41504354
675 // "WDRT" Watchdog Resource Table
677 #define EFI_ACPI_3_0_WATCHDOG_RESOURCE_TABLE_SIGNATURE 0x54524457