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
;
27 /// Common ACPI description table header. This structure prefaces most ACPI tables.
38 UINT32 CreatorRevision
;
39 } EFI_ACPI_DESCRIPTION_HEADER
;
42 // Define for Desriptor
44 #define ACPI_ADDRESS_SPACE_DESCRIPTOR 0x8A
45 #define ACPI_END_TAG_DESCRIPTOR 0x79
50 #define ACPI_ADDRESS_SPACE_TYPE_MEM 0x00
51 #define ACPI_ADDRESS_SPACE_TYPE_IO 0x01
52 #define ACPI_ADDRESS_SPACE_TYPE_BUS 0x02
55 /// Power Management Timer frequency is fixed at 3.579545MHz
57 #define ACPI_TIMER_FREQUENCY 3579545
60 // Ensure proper structure formats
65 /// The commond definition of QWORD, DWORD, and WORD
66 /// Address Space Descriptors
74 UINT64 AddrSpaceGranularity
;
77 UINT64 AddrTranslationOffset
;
79 } EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR
;
86 } EFI_ACPI_END_TAG_DESCRIPTOR
;
89 // General use definitions
91 #define EFI_ACPI_RESERVED_BYTE 0x00
92 #define EFI_ACPI_RESERVED_WORD 0x0000
93 #define EFI_ACPI_RESERVED_DWORD 0x00000000
94 #define EFI_ACPI_RESERVED_QWORD 0x0000000000000000
97 // Resource Type Specific Flags
98 // Ref ACPI specification 6.4.3.5.5
100 // Bit [0] : Write Status, _RW
102 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_WRITE (1 << 0)
103 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_ONLY (0 << 0)
105 // Bit [2:1] : Memory Attributes, _MEM
107 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_NON_CACHEABLE (0 << 1)
108 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE (1 << 1)
109 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_WRITE_COMBINING (2 << 1)
110 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE (3 << 1)
112 // Bit [4:3] : Memory Attributes, _MTP
114 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_MEMORY (0 << 3)
115 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_RESERVED (1 << 3)
116 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_ACPI (2 << 3)
117 #define EFI_APCI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_NVS (3 << 3)
119 // Bit [5] : Memory to I/O Translation, _TTP
121 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_TRANSLATION (1 << 5)
122 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_STATIC (0 << 5)
125 // ACPI 1.0b table structures
129 /// Root System Description Pointer Structure
137 } EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER
;
140 // Root System Description Table
141 // No definition needed as it is a common description table header, the same with
142 // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
146 /// RSDT Revision (as defined in ACPI 1.0b spec.)
148 #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
151 /// Fixed ACPI Description Table Structure (FADT)
154 EFI_ACPI_DESCRIPTION_HEADER Header
;
194 } EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE
;
197 /// FADT Version (as defined in ACPI 1.0b spec.)
199 #define EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x01
202 // Fixed ACPI Description Table Fixed Feature Flags
203 // All other bits are reserved and must be set to 0.
205 #define EFI_ACPI_1_0_WBINVD BIT0
206 #define EFI_ACPI_1_0_WBINVD_FLUSH BIT1
207 #define EFI_ACPI_1_0_PROC_C1 BIT2
208 #define EFI_ACPI_1_0_P_LVL2_UP BIT3
209 #define EFI_ACPI_1_0_PWR_BUTTON BIT4
210 #define EFI_ACPI_1_0_SLP_BUTTON BIT5
211 #define EFI_ACPI_1_0_FIX_RTC BIT6
212 #define EFI_ACPI_1_0_RTC_S4 BIT7
213 #define EFI_ACPI_1_0_TMR_VAL_EXT BIT8
214 #define EFI_ACPI_1_0_DCK_CAP BIT9
217 /// Firmware ACPI Control Structure
222 UINT32 HardwareSignature
;
223 UINT32 FirmwareWakingVector
;
227 } EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE
;
230 /// Firmware Control Structure Feature Flags
231 /// All other bits are reserved and must be set to 0.
233 #define EFI_ACPI_1_0_S4BIOS_F BIT0
236 /// Multiple APIC Description Table header definition. The rest of the table
237 /// must be defined in a platform specific manner.
240 EFI_ACPI_DESCRIPTION_HEADER Header
;
241 UINT32 LocalApicAddress
;
243 } EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER
;
246 /// MADT Revision (as defined in ACPI 1.0b spec.)
248 #define EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01
251 /// Multiple APIC Flags
252 /// All other bits are reserved and must be set to 0.
254 #define EFI_ACPI_1_0_PCAT_COMPAT BIT0
257 // Multiple APIC Description Table APIC structure types
258 // All other values between 0x05 an 0xFF are reserved and
259 // will be ignored by OSPM.
261 #define EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC 0x00
262 #define EFI_ACPI_1_0_IO_APIC 0x01
263 #define EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE 0x02
264 #define EFI_ACPI_1_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03
265 #define EFI_ACPI_1_0_LOCAL_APIC_NMI 0x04
268 // APIC Structure Definitions
272 /// Processor Local APIC Structure Definition
277 UINT8 AcpiProcessorId
;
280 } EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC_STRUCTURE
;
283 /// Local APIC Flags. All other bits are reserved and must be 0.
285 #define EFI_ACPI_1_0_LOCAL_APIC_ENABLED BIT0
288 /// IO APIC Structure
295 UINT32 IoApicAddress
;
296 UINT32 SystemVectorBase
;
297 } EFI_ACPI_1_0_IO_APIC_STRUCTURE
;
300 /// Interrupt Source Override Structure
307 UINT32 GlobalSystemInterruptVector
;
309 } EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE
;
312 /// Non-Maskable Interrupt Source Structure
318 UINT32 GlobalSystemInterruptVector
;
319 } EFI_ACPI_1_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE
;
322 // Ensure proper structure formats
327 /// Local APIC NMI Structure
332 UINT8 AcpiProcessorId
;
335 } EFI_ACPI_1_0_LOCAL_APIC_NMI_STRUCTURE
;
340 /// Smart Battery Description Table (SBST)
343 EFI_ACPI_DESCRIPTION_HEADER Header
;
344 UINT32 WarningEnergyLevel
;
345 UINT32 LowEnergyLevel
;
346 UINT32 CriticalEnergyLevel
;
347 } EFI_ACPI_1_0_SMART_BATTERY_DESCRIPTION_TABLE
;
350 // Known table signatures
354 /// "RSD PTR " Root System Description Pointer
356 #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
359 /// "APIC" Multiple APIC Description Table
361 #define EFI_ACPI_1_0_APIC_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
364 /// "DSDT" Differentiated System Description Table
366 #define EFI_ACPI_1_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('D', 'S', 'D', 'T')
369 /// "FACS" Firmware ACPI Control Structure
371 #define EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'S')
374 /// "FACP" Fixed ACPI Description Table
376 #define EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'P')
379 /// "PSDT" Persistent System Description Table
381 #define EFI_ACPI_1_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('P', 'S', 'D', 'T')
384 /// "RSDT" Root System Description Table
386 #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('R', 'S', 'D', 'T')
389 /// "SBST" Smart Battery Specification Table
391 #define EFI_ACPI_1_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE SIGNATURE_32('S', 'B', 'S', 'T')
394 /// "SSDT" Secondary System Description Table
396 #define EFI_ACPI_1_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('S', 'S', 'D', 'T')