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