2 ACPI 1.0b definitions from the ACPI Specification, revision 1.0b
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.
18 /// Common table header, this prefaces all ACPI tables, including FACS, but
19 /// excluding the RSD PTR structure
24 } EFI_ACPI_COMMON_HEADER
;
28 /// Common ACPI description table header. This structure prefaces most ACPI tables.
39 UINT32 CreatorRevision
;
40 } EFI_ACPI_DESCRIPTION_HEADER
;
44 // Define for Desriptor
46 #define ACPI_ADDRESS_SPACE_DESCRIPTOR 0x8A
47 #define ACPI_END_TAG_DESCRIPTOR 0x79
52 #define ACPI_ADDRESS_SPACE_TYPE_MEM 0x00
53 #define ACPI_ADDRESS_SPACE_TYPE_IO 0x01
54 #define ACPI_ADDRESS_SPACE_TYPE_BUS 0x02
57 /// Power Management Timer frequency is fixed at 3.579545MHz
59 #define ACPI_TIMER_FREQUENCY 3579545
62 // Ensure proper structure formats
67 /// The commond definition of QWORD, DWORD, and WORD
68 /// Address Space Descriptors
76 UINT64 AddrSpaceGranularity
;
79 UINT64 AddrTranslationOffset
;
81 } EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR
;
86 /// the End tag identifies an end of resource data.
91 } EFI_ACPI_END_TAG_DESCRIPTOR
;
94 // General use definitions
96 #define EFI_ACPI_RESERVED_BYTE 0x00
97 #define EFI_ACPI_RESERVED_WORD 0x0000
98 #define EFI_ACPI_RESERVED_DWORD 0x00000000
99 #define EFI_ACPI_RESERVED_QWORD 0x0000000000000000
102 // Resource Type Specific Flags
103 // Ref ACPI specification 6.4.3.5.5
105 // Bit [0] : Write Status, _RW
107 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_WRITE (1 << 0)
108 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_ONLY (0 << 0)
110 // Bit [2:1] : Memory Attributes, _MEM
112 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_NON_CACHEABLE (0 << 1)
113 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE (1 << 1)
114 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_WRITE_COMBINING (2 << 1)
115 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE (3 << 1)
117 // Bit [4:3] : Memory Attributes, _MTP
119 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_MEMORY (0 << 3)
120 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_RESERVED (1 << 3)
121 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_ACPI (2 << 3)
122 #define EFI_APCI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_NVS (3 << 3)
124 // Bit [5] : Memory to I/O Translation, _TTP
126 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_TRANSLATION (1 << 5)
127 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_STATIC (0 << 5)
130 // Ensure proper structure formats
134 // ACPI 1.0b table structures
138 /// Root System Description Pointer Structure
146 } EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER
;
149 // Root System Description Table
150 // No definition needed as it is a common description table header, the same with
151 // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
155 /// RSDT Revision (as defined in ACPI 1.0b spec.)
157 #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
160 /// Fixed ACPI Description Table Structure (FADT)
163 EFI_ACPI_DESCRIPTION_HEADER Header
;
203 } EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE
;
206 /// FADT Version (as defined in ACPI 1.0b spec.)
208 #define EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x01
211 // Fixed ACPI Description Table Fixed Feature Flags
212 // All other bits are reserved and must be set to 0.
214 #define EFI_ACPI_1_0_WBINVD BIT0
215 #define EFI_ACPI_1_0_WBINVD_FLUSH BIT1
216 #define EFI_ACPI_1_0_PROC_C1 BIT2
217 #define EFI_ACPI_1_0_P_LVL2_UP BIT3
218 #define EFI_ACPI_1_0_PWR_BUTTON BIT4
219 #define EFI_ACPI_1_0_SLP_BUTTON BIT5
220 #define EFI_ACPI_1_0_FIX_RTC BIT6
221 #define EFI_ACPI_1_0_RTC_S4 BIT7
222 #define EFI_ACPI_1_0_TMR_VAL_EXT BIT8
223 #define EFI_ACPI_1_0_DCK_CAP BIT9
226 /// Firmware ACPI Control Structure
231 UINT32 HardwareSignature
;
232 UINT32 FirmwareWakingVector
;
236 } EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE
;
239 /// Firmware Control Structure Feature Flags
240 /// All other bits are reserved and must be set to 0.
242 #define EFI_ACPI_1_0_S4BIOS_F BIT0
245 /// Multiple APIC Description Table header definition. The rest of the table
246 /// must be defined in a platform specific manner.
249 EFI_ACPI_DESCRIPTION_HEADER Header
;
250 UINT32 LocalApicAddress
;
252 } EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER
;
255 /// MADT Revision (as defined in ACPI 1.0b spec.)
257 #define EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01
260 /// Multiple APIC Flags
261 /// All other bits are reserved and must be set to 0.
263 #define EFI_ACPI_1_0_PCAT_COMPAT BIT0
266 // Multiple APIC Description Table APIC structure types
267 // All other values between 0x05 an 0xFF are reserved and
268 // will be ignored by OSPM.
270 #define EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC 0x00
271 #define EFI_ACPI_1_0_IO_APIC 0x01
272 #define EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE 0x02
273 #define EFI_ACPI_1_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03
274 #define EFI_ACPI_1_0_LOCAL_APIC_NMI 0x04
277 // APIC Structure Definitions
281 /// Processor Local APIC Structure Definition
286 UINT8 AcpiProcessorId
;
289 } EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC_STRUCTURE
;
292 /// Local APIC Flags. All other bits are reserved and must be 0.
294 #define EFI_ACPI_1_0_LOCAL_APIC_ENABLED BIT0
297 /// IO APIC Structure
304 UINT32 IoApicAddress
;
305 UINT32 SystemVectorBase
;
306 } EFI_ACPI_1_0_IO_APIC_STRUCTURE
;
309 /// Interrupt Source Override Structure
316 UINT32 GlobalSystemInterruptVector
;
318 } EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE
;
321 /// Non-Maskable Interrupt Source Structure
327 UINT32 GlobalSystemInterruptVector
;
328 } EFI_ACPI_1_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE
;
331 /// Local APIC NMI Structure
336 UINT8 AcpiProcessorId
;
339 } EFI_ACPI_1_0_LOCAL_APIC_NMI_STRUCTURE
;
342 /// Smart Battery Description Table (SBST)
345 EFI_ACPI_DESCRIPTION_HEADER Header
;
346 UINT32 WarningEnergyLevel
;
347 UINT32 LowEnergyLevel
;
348 UINT32 CriticalEnergyLevel
;
349 } EFI_ACPI_1_0_SMART_BATTERY_DESCRIPTION_TABLE
;
352 // Known table signatures
356 /// "RSD PTR " Root System Description Pointer
358 #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
361 /// "APIC" Multiple APIC Description Table
363 #define EFI_ACPI_1_0_APIC_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
366 /// "DSDT" Differentiated System Description Table
368 #define EFI_ACPI_1_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('D', 'S', 'D', 'T')
371 /// "FACS" Firmware ACPI Control Structure
373 #define EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'S')
376 /// "FACP" Fixed ACPI Description Table
378 #define EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'P')
381 /// "PSDT" Persistent System Description Table
383 #define EFI_ACPI_1_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('P', 'S', 'D', 'T')
386 /// "RSDT" Root System Description Table
388 #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('R', 'S', 'D', 'T')
391 /// "SBST" Smart Battery Specification Table
393 #define EFI_ACPI_1_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE SIGNATURE_32('S', 'B', 'S', 'T')
396 /// "SSDT" Secondary System Description Table
398 #define EFI_ACPI_1_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('S', 'S', 'D', 'T')