iPXE
Acpi20.h
Go to the documentation of this file.
1/** @file
2 ACPI 2.0 definitions from the ACPI Specification, revision 2.0
3
4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6**/
7
8#pragma once
9
10FILE_LICENCE ( BSD2_PATENT );
11FILE_SECBOOT ( PERMITTED );
12
14
15//
16// Define for Descriptor
17//
18#define ACPI_LARGE_GENERIC_REGISTER_DESCRIPTOR_NAME 0x02
19
20#define ACPI_GENERIC_REGISTER_DESCRIPTOR 0x82
21
22//
23// Ensure proper structure formats
24//
25#pragma pack(1)
26
27///
28/// Generic Register Descriptor
29///
30typedef PACKED struct {
38
39#pragma pack()
40
41//
42// Ensure proper structure formats
43//
44#pragma pack(1)
45
46///
47/// ACPI 2.0 Generic Address Space definition
48///
56
57//
58// Generic Address Space Address IDs
59//
60#define EFI_ACPI_2_0_SYSTEM_MEMORY 0
61#define EFI_ACPI_2_0_SYSTEM_IO 1
62#define EFI_ACPI_2_0_PCI_CONFIGURATION_SPACE 2
63#define EFI_ACPI_2_0_EMBEDDED_CONTROLLER 3
64#define EFI_ACPI_2_0_SMBUS 4
65#define EFI_ACPI_2_0_FUNCTIONAL_FIXED_HARDWARE 0x7F
66
67//
68// ACPI 2.0 table structures
69//
70
71///
72/// Root System Description Pointer Structure
73///
85
86///
87/// RSD_PTR Revision (as defined in ACPI 2.0 spec.)
88///
89#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02
90
91///
92/// Common table header, this prefaces all ACPI tables, including FACS, but
93/// excluding the RSD PTR structure
94///
99
100//
101// Root System Description Table
102// No definition needed as it is a common description table header, the same with
103// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
104//
105
106///
107/// RSDT Revision (as defined in ACPI 2.0 spec.)
108///
109#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
110
111//
112// Extended System Description Table
113// No definition needed as it is a common description table header, the same with
114// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
115//
116
117///
118/// XSDT Revision (as defined in ACPI 2.0 spec.)
119///
120#define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
121
122///
123/// Fixed ACPI Description Table Structure (FADT)
124///
125typedef struct {
179
180///
181/// FADT Version (as defined in ACPI 2.0 spec.)
182///
183#define EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x03
184
185//
186// Fixed ACPI Description Table Preferred Power Management Profile
187//
188#define EFI_ACPI_2_0_PM_PROFILE_UNSPECIFIED 0
189#define EFI_ACPI_2_0_PM_PROFILE_DESKTOP 1
190#define EFI_ACPI_2_0_PM_PROFILE_MOBILE 2
191#define EFI_ACPI_2_0_PM_PROFILE_WORKSTATION 3
192#define EFI_ACPI_2_0_PM_PROFILE_ENTERPRISE_SERVER 4
193#define EFI_ACPI_2_0_PM_PROFILE_SOHO_SERVER 5
194#define EFI_ACPI_2_0_PM_PROFILE_APPLIANCE_PC 6
195
196//
197// Fixed ACPI Description Table Boot Architecture Flags
198// All other bits are reserved and must be set to 0.
199//
200#define EFI_ACPI_2_0_LEGACY_DEVICES BIT0
201#define EFI_ACPI_2_0_8042 BIT1
202
203//
204// Fixed ACPI Description Table Fixed Feature Flags
205// All other bits are reserved and must be set to 0.
206//
207#define EFI_ACPI_2_0_WBINVD BIT0
208#define EFI_ACPI_2_0_WBINVD_FLUSH BIT1
209#define EFI_ACPI_2_0_PROC_C1 BIT2
210#define EFI_ACPI_2_0_P_LVL2_UP BIT3
211#define EFI_ACPI_2_0_PWR_BUTTON BIT4
212#define EFI_ACPI_2_0_SLP_BUTTON BIT5
213#define EFI_ACPI_2_0_FIX_RTC BIT6
214#define EFI_ACPI_2_0_RTC_S4 BIT7
215#define EFI_ACPI_2_0_TMR_VAL_EXT BIT8
216#define EFI_ACPI_2_0_DCK_CAP BIT9
217#define EFI_ACPI_2_0_RESET_REG_SUP BIT10
218#define EFI_ACPI_2_0_SEALED_CASE BIT11
219#define EFI_ACPI_2_0_HEADLESS BIT12
220#define EFI_ACPI_2_0_CPU_SW_SLP BIT13
221
222///
223/// Firmware ACPI Control Structure
224///
236
237///
238/// FACS Version (as defined in ACPI 2.0 spec.)
239///
240#define EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION 0x01
241
242///
243/// Firmware Control Structure Feature Flags
244/// All other bits are reserved and must be set to 0.
245///
246#define EFI_ACPI_2_0_S4BIOS_F BIT0
247
248///
249/// Multiple APIC Description Table header definition. The rest of the table
250/// must be defined in a platform specific manner.
251///
257
258///
259/// MADT Revision (as defined in ACPI 2.0 spec.)
260///
261#define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01
262
263///
264/// Multiple APIC Flags
265/// All other bits are reserved and must be set to 0.
266///
267#define EFI_ACPI_2_0_PCAT_COMPAT BIT0
268
269//
270// Multiple APIC Description Table APIC structure types
271// All other values between 0x09 an 0xFF are reserved and
272// will be ignored by OSPM.
273//
274#define EFI_ACPI_2_0_PROCESSOR_LOCAL_APIC 0x00
275#define EFI_ACPI_2_0_IO_APIC 0x01
276#define EFI_ACPI_2_0_INTERRUPT_SOURCE_OVERRIDE 0x02
277#define EFI_ACPI_2_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03
278#define EFI_ACPI_2_0_LOCAL_APIC_NMI 0x04
279#define EFI_ACPI_2_0_LOCAL_APIC_ADDRESS_OVERRIDE 0x05
280#define EFI_ACPI_2_0_IO_SAPIC 0x06
281#define EFI_ACPI_2_0_PROCESSOR_LOCAL_SAPIC 0x07
282#define EFI_ACPI_2_0_PLATFORM_INTERRUPT_SOURCES 0x08
283
284//
285// APIC Structure Definitions
286//
287
288///
289/// Processor Local APIC Structure Definition
290///
298
299///
300/// Local APIC Flags. All other bits are reserved and must be 0.
301///
302#define EFI_ACPI_2_0_LOCAL_APIC_ENABLED BIT0
303
304///
305/// IO APIC Structure
306///
315
316///
317/// Interrupt Source Override Structure
318///
327
328///
329/// Non-Maskable Interrupt Source Structure
330///
337
338///
339/// Local APIC NMI Structure
340///
348
349///
350/// Local APIC Address Override Structure
351///
358
359///
360/// IO SAPIC Structure
361///
370
371///
372/// Local SAPIC Structure
373///
383
384///
385/// Platform Interrupt Sources Structure
386///
398
399///
400/// Smart Battery Description Table (SBST)
401///
408
409///
410/// SBST Version (as defined in ACPI 2.0 spec.)
411///
412#define EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
413
414///
415/// Embedded Controller Boot Resources Table (ECDT)
416/// The table is followed by a null terminated ASCII string that contains
417/// a fully qualified reference to the name space object.
418///
426
427///
428/// ECDT Version (as defined in ACPI 2.0 spec.)
429///
430#define EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION 0x01
431
432//
433// Known table signatures
434//
435
436///
437/// "RSD PTR " Root System Description Pointer
438///
439#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
440
441///
442/// "SPIC" Multiple SAPIC Description Table
443///
444/// BUGBUG: Don't know where this came from except SR870BN4 uses it.
445/// #define EFI_ACPI_2_0_MULTIPLE_SAPIC_DESCRIPTION_TABLE_SIGNATURE 0x43495053
446///
447#define EFI_ACPI_2_0_MULTIPLE_SAPIC_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
448
449///
450/// "BOOT" MS Simple Boot Spec
451///
452#define EFI_ACPI_2_0_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE SIGNATURE_32('B', 'O', 'O', 'T')
453
454///
455/// "DBGP" MS Bebug Port Spec
456///
457#define EFI_ACPI_2_0_DEBUG_PORT_TABLE_SIGNATURE SIGNATURE_32('D', 'B', 'G', 'P')
458
459///
460/// "DSDT" Differentiated System Description Table
461///
462#define EFI_ACPI_2_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('D', 'S', 'D', 'T')
463
464///
465/// "ECDT" Embedded Controller Boot Resources Table
466///
467#define EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE SIGNATURE_32('E', 'C', 'D', 'T')
468
469///
470/// "ETDT" Event Timer Description Table
471///
472#define EFI_ACPI_2_0_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('E', 'T', 'D', 'T')
473
474///
475/// "FACS" Firmware ACPI Control Structure
476///
477#define EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'S')
478
479///
480/// "FACP" Fixed ACPI Description Table
481///
482#define EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'P')
483
484///
485/// "APIC" Multiple APIC Description Table
486///
487#define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
488
489///
490/// "PSDT" Persistent System Description Table
491///
492#define EFI_ACPI_2_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('P', 'S', 'D', 'T')
493
494///
495/// "RSDT" Root System Description Table
496///
497#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('R', 'S', 'D', 'T')
498
499///
500/// "SBST" Smart Battery Specification Table
501///
502#define EFI_ACPI_2_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE SIGNATURE_32('S', 'B', 'S', 'T')
503
504///
505/// "SLIT" System Locality Information Table
506///
507#define EFI_ACPI_2_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE SIGNATURE_32('S', 'L', 'I', 'T')
508
509///
510/// "SPCR" Serial Port Console Redirection Table
511///
512#define EFI_ACPI_2_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'C', 'R')
513
514///
515/// "SRAT" Static Resource Affinity Table
516///
517#define EFI_ACPI_2_0_STATIC_RESOURCE_AFFINITY_TABLE_SIGNATURE SIGNATURE_32('S', 'R', 'A', 'T')
518
519///
520/// "SSDT" Secondary System Description Table
521///
522#define EFI_ACPI_2_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('S', 'S', 'D', 'T')
523
524///
525/// "SPMI" Server Platform Management Interface Table
526///
527#define EFI_ACPI_2_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_SIGNATURE SIGNATURE_32('S', 'P', 'M', 'I')
528
529///
530/// "XSDT" Extended System Description Table
531///
532#define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('X', 'S', 'D', 'T')
533
534///
535/// "MCFG" PCI Express Memory Mapped Configuration Space Base Address Description Table
536///
537#define EFI_ACPI_2_0_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_SIGNATURE SIGNATURE_32('M', 'C', 'F', 'G')
538
539#pragma pack()
unsigned short UINT16
2-byte unsigned value.
unsigned long long UINT64
8-byte unsigned value.
unsigned char UINT8
1-byte unsigned value.
unsigned int UINT32
4-byte unsigned value.
ACPI 1.0b definitions from the ACPI Specification, revision 1.0b.
PACKED struct @165104130223077263224044232125337106163015377141 ACPI_LARGE_RESOURCE_HEADER
PACKED union @165104130223077263224044232125337106163015377141::@273126103036270271166311122320164340317073026312 Header
Definition Acpi10.h:155
UINT64 RegisterAddress
Definition Acpi20.h:36
UINT8 RegisterBitWidth
Definition Acpi20.h:33
UINT8 RegisterBitOffset
Definition Acpi20.h:34
PACKED struct @361334057146262142357026063355075342332166257172 EFI_ACPI_GENERIC_REGISTER_DESCRIPTOR
Generic Register Descriptor.
UINT8 AddressSize
Definition Acpi20.h:35
UINT8 AddressSpaceId
Definition Acpi20.h:32
#define PACKED
Definition Base.h:209
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:921
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:951
Common table header, this prefaces all ACPI tables, including FACS, but excluding the RSD PTR structu...
Definition Acpi20.h:95
Embedded Controller Boot Resources Table (ECDT) The table is followed by a null terminated ASCII stri...
Definition Acpi20.h:419
EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE EcControl
Definition Acpi20.h:421
EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE EcData
Definition Acpi20.h:422
Firmware ACPI Control Structure.
Definition Acpi20.h:225
Fixed ACPI Description Table Structure (FADT)
Definition Acpi20.h:125
EFI_ACPI_DESCRIPTION_HEADER Header
Definition Acpi20.h:126
EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk
Definition Acpi20.h:174
EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE ResetReg
Definition Acpi20.h:165
EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk
Definition Acpi20.h:172
EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk
Definition Acpi20.h:171
EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk
Definition Acpi20.h:170
EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk
Definition Acpi20.h:176
EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk
Definition Acpi20.h:173
EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk
Definition Acpi20.h:175
EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk
Definition Acpi20.h:177
ACPI 2.0 Generic Address Space definition.
Definition Acpi20.h:49
Interrupt Source Override Structure.
Definition Acpi20.h:319
IO APIC Structure.
Definition Acpi20.h:307
IO SAPIC Structure.
Definition Acpi20.h:362
Local APIC Address Override Structure.
Definition Acpi20.h:352
Local APIC NMI Structure.
Definition Acpi20.h:341
Multiple APIC Description Table header definition.
Definition Acpi20.h:252
Non-Maskable Interrupt Source Structure.
Definition Acpi20.h:331
Platform Interrupt Sources Structure.
Definition Acpi20.h:387
Processor Local APIC Structure Definition.
Definition Acpi20.h:291
Root System Description Pointer Structure.
Definition Acpi20.h:74
Smart Battery Description Table (SBST)
Definition Acpi20.h:402
EFI_ACPI_DESCRIPTION_HEADER Header
Definition Acpi20.h:403
The common ACPI description table header.
Definition Acpi10.h:29