2 ACPI 1.0b definitions from the ACPI Specification, revision 1.0b
4 Copyright (c) 2006 - 2007, 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.
40 UINT32 CreatorRevision
;
41 } EFI_ACPI_DESCRIPTION_HEADER
;
45 // Define for Pci Host Bridge Resource Allocation
47 #define ACPI_ADDRESS_SPACE_DESCRIPTOR 0x8A
48 #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 // Make sure structures match spec
70 UINT64 AddrSpaceGranularity
;
73 UINT64 AddrTranslationOffset
;
75 } EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR
;
80 } EFI_ACPI_END_TAG_DESCRIPTOR
;
83 // General use definitions
85 #define EFI_ACPI_RESERVED_BYTE 0x00
86 #define EFI_ACPI_RESERVED_WORD 0x0000
87 #define EFI_ACPI_RESERVED_DWORD 0x00000000
88 #define EFI_ACPI_RESERVED_QWORD 0x0000000000000000
91 // Resource Type Specific Flags
92 // Ref ACPI specification 6.4.3.5.5
94 // Bit [0] : Write Status, _RW
96 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_WRITE (1 << 0)
97 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_ONLY (0 << 0)
99 // Bit [2:1] : Memory Attributes, _MEM
101 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_NON_CACHEABLE (0 << 1)
102 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE (1 << 1)
103 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_WRITE_COMBINING (2 << 1)
104 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE (3 << 1)
106 // Bit [4:3] : Memory Attributes, _MTP
108 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_MEMORY (0 << 3)
109 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_RESERVED (1 << 3)
110 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_ACPI (2 << 3)
111 #define EFI_APCI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_NVS (3 << 3)
113 // Bit [5] : Memory to I/O Translation, _TTP
115 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_TRANSLATION (1 << 5)
116 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_STATIC (0 << 5)
122 // Ensure proper structure formats
126 // 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 followed by a
142 // variable number of UINT32 table pointers.
145 // RSDT Revision (as defined in ACPI 1.0b spec.)
147 #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
150 // Fixed ACPI Description Table Structure (FADT)
153 EFI_ACPI_DESCRIPTION_HEADER Header
;
193 } EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE
;
196 // FADT Version (as defined in ACPI 1.0b spec.)
198 #define EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x01
201 // Fixed ACPI Description Table Fixed Feature Flags
202 // All other bits are reserved and must be set to 0.
204 #define EFI_ACPI_1_0_WBINVD (1 << 0)
205 #define EFI_ACPI_1_0_WBINVD_FLUSH (1 << 1)
206 #define EFI_ACPI_1_0_PROC_C1 (1 << 2)
207 #define EFI_ACPI_1_0_P_LVL2_UP (1 << 3)
208 #define EFI_ACPI_1_0_PWR_BUTTON (1 << 4)
209 #define EFI_ACPI_1_0_SLP_BUTTON (1 << 5)
210 #define EFI_ACPI_1_0_FIX_RTC (1 << 6)
211 #define EFI_ACPI_1_0_RTC_S4 (1 << 7)
212 #define EFI_ACPI_1_0_TMR_VAL_EXT (1 << 8)
213 #define EFI_ACPI_1_0_DCK_CAP (1 << 9)
216 // Firmware ACPI Control Structure
221 UINT32 HardwareSignature
;
222 UINT32 FirmwareWakingVector
;
226 } EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE
;
229 // Firmware Control Structure Feature Flags
230 // All other bits are reserved and must be set to 0.
232 #define EFI_ACPI_1_0_S4BIOS_F (1 << 0)
235 // Multiple APIC Description Table header definition. The rest of the table
236 // must be defined in a platform specific manner.
239 EFI_ACPI_DESCRIPTION_HEADER Header
;
240 UINT32 LocalApicAddress
;
242 } EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER
;
245 // MADT Revision (as defined in ACPI 1.0b spec.)
247 #define EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01
250 // Multiple APIC Flags
251 // All other bits are reserved and must be set to 0.
253 #define EFI_ACPI_1_0_PCAT_COMPAT (1 << 0)
256 // Multiple APIC Description Table APIC structure types
257 // All other values between 0x09 an 0xFF are reserved and
258 // will be ignored by OSPM.
260 #define EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC 0x00
261 #define EFI_ACPI_1_0_IO_APIC 0x01
262 #define EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE 0x02
263 #define EFI_ACPI_1_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03
264 #define EFI_ACPI_1_0_LOCAL_APIC_NMI 0x04
267 // APIC Structure Definitions
270 // Processor Local APIC Structure Definition
275 UINT8 AcpiProcessorId
;
278 } EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC_STRUCTURE
;
281 // Local APIC Flags. All other bits are reserved and must be 0.
283 #define EFI_ACPI_1_0_LOCAL_APIC_ENABLED (1 << 0)
293 UINT32 IoApicAddress
;
294 UINT32 SystemVectorBase
;
295 } EFI_ACPI_1_0_IO_APIC_STRUCTURE
;
298 // Interrupt Source Override Structure
305 UINT32 GlobalSystemInterruptVector
;
307 } EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE
;
310 // Non-Maskable Interrupt Source Structure
316 UINT32 GlobalSystemInterruptVector
;
317 } EFI_ACPI_1_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE
;
320 // Local APIC NMI Structure
325 UINT8 AcpiProcessorId
;
328 } EFI_ACPI_1_0_LOCAL_APIC_NMI_STRUCTURE
;
331 // Smart Battery Description Table (SBST)
334 EFI_ACPI_DESCRIPTION_HEADER Header
;
335 UINT32 WarningEnergyLevel
;
336 UINT32 LowEnergyLevel
;
337 UINT32 CriticalEnergyLevel
;
338 } EFI_ACPI_1_0_SMART_BATTERY_DESCRIPTION_TABLE
;
341 // Known table signatures
344 // "RSD PTR " Root System Description Pointer
346 #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE 0x2052545020445352ULL
349 // "APIC" Multiple APIC Description Table
351 #define EFI_ACPI_1_0_APIC_SIGNATURE 0x43495041
354 // "DSDT" Differentiated System Description Table
356 #define EFI_ACPI_1_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445344
359 // "FACS" Firmware ACPI Control Structure
361 #define EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE 0x53434146
364 // "FACP" Fixed ACPI Description Table
366 #define EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE 0x50434146
369 // "PSDT" Persistent System Description Table
371 #define EFI_ACPI_1_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445350
374 // "RSDT" Root System Description Table
376 #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445352
379 // "SBST" Smart Battery Specification Table
381 #define EFI_ACPI_1_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE 0x54534253
384 // "SSDT" Secondary System Description Table
386 #define EFI_ACPI_1_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445353