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 - 2011, Intel Corporation. All rights reserved.<BR>
5  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
9 
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.
12 **/
13 
14 #ifndef _ACPI_2_0_H_
15 #define _ACPI_2_0_H_
16 
17 FILE_LICENCE ( BSD3 );
18 
20 
21 //
22 // Define for Desriptor
23 //
24 #define ACPI_LARGE_GENERIC_REGISTER_DESCRIPTOR_NAME 0x02
25 
26 #define ACPI_GENERIC_REGISTER_DESCRIPTOR 0x82
27 
28 //
29 // Ensure proper structure formats
30 //
31 #pragma pack(1)
32 
33 ///
34 /// Generic Register Descriptor
35 ///
36 typedef PACKED struct {
44 
45 #pragma pack()
46 
47 //
48 // Ensure proper structure formats
49 //
50 #pragma pack(1)
51 
52 ///
53 /// ACPI 2.0 Generic Address Space definition
54 ///
55 typedef struct {
62 
63 //
64 // Generic Address Space Address IDs
65 //
66 #define EFI_ACPI_2_0_SYSTEM_MEMORY 0
67 #define EFI_ACPI_2_0_SYSTEM_IO 1
68 #define EFI_ACPI_2_0_PCI_CONFIGURATION_SPACE 2
69 #define EFI_ACPI_2_0_EMBEDDED_CONTROLLER 3
70 #define EFI_ACPI_2_0_SMBUS 4
71 #define EFI_ACPI_2_0_FUNCTIONAL_FIXED_HARDWARE 0x7F
72 
73 //
74 // ACPI 2.0 table structures
75 //
76 
77 ///
78 /// Root System Description Pointer Structure
79 ///
80 typedef struct {
83  UINT8 OemId[6];
91 
92 ///
93 /// RSD_PTR Revision (as defined in ACPI 2.0 spec.)
94 ///
95 #define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02
96 
97 ///
98 /// Common table header, this prefaces all ACPI tables, including FACS, but
99 /// excluding the RSD PTR structure
100 ///
101 typedef struct {
105 
106 //
107 // Root System Description Table
108 // No definition needed as it is a common description table header, the same with
109 // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
110 //
111 
112 ///
113 /// RSDT Revision (as defined in ACPI 2.0 spec.)
114 ///
115 #define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
116 
117 //
118 // Extended System Description Table
119 // No definition needed as it is a common description table header, the same with
120 // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
121 //
122 
123 ///
124 /// XSDT Revision (as defined in ACPI 2.0 spec.)
125 ///
126 #define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
127 
128 ///
129 /// Fixed ACPI Description Table Structure (FADT)
130 ///
131 typedef struct {
173  UINT8 Reserved2[3];
185 
186 ///
187 /// FADT Version (as defined in ACPI 2.0 spec.)
188 ///
189 #define EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x03
190 
191 //
192 // Fixed ACPI Description Table Preferred Power Management Profile
193 //
194 #define EFI_ACPI_2_0_PM_PROFILE_UNSPECIFIED 0
195 #define EFI_ACPI_2_0_PM_PROFILE_DESKTOP 1
196 #define EFI_ACPI_2_0_PM_PROFILE_MOBILE 2
197 #define EFI_ACPI_2_0_PM_PROFILE_WORKSTATION 3
198 #define EFI_ACPI_2_0_PM_PROFILE_ENTERPRISE_SERVER 4
199 #define EFI_ACPI_2_0_PM_PROFILE_SOHO_SERVER 5
200 #define EFI_ACPI_2_0_PM_PROFILE_APPLIANCE_PC 6
201 
202 //
203 // Fixed ACPI Description Table Boot Architecture Flags
204 // All other bits are reserved and must be set to 0.
205 //
206 #define EFI_ACPI_2_0_LEGACY_DEVICES BIT0
207 #define EFI_ACPI_2_0_8042 BIT1
208 
209 //
210 // Fixed ACPI Description Table Fixed Feature Flags
211 // All other bits are reserved and must be set to 0.
212 //
213 #define EFI_ACPI_2_0_WBINVD BIT0
214 #define EFI_ACPI_2_0_WBINVD_FLUSH BIT1
215 #define EFI_ACPI_2_0_PROC_C1 BIT2
216 #define EFI_ACPI_2_0_P_LVL2_UP BIT3
217 #define EFI_ACPI_2_0_PWR_BUTTON BIT4
218 #define EFI_ACPI_2_0_SLP_BUTTON BIT5
219 #define EFI_ACPI_2_0_FIX_RTC BIT6
220 #define EFI_ACPI_2_0_RTC_S4 BIT7
221 #define EFI_ACPI_2_0_TMR_VAL_EXT BIT8
222 #define EFI_ACPI_2_0_DCK_CAP BIT9
223 #define EFI_ACPI_2_0_RESET_REG_SUP BIT10
224 #define EFI_ACPI_2_0_SEALED_CASE BIT11
225 #define EFI_ACPI_2_0_HEADLESS BIT12
226 #define EFI_ACPI_2_0_CPU_SW_SLP BIT13
227 
228 ///
229 /// Firmware ACPI Control Structure
230 ///
231 typedef struct {
242 
243 ///
244 /// FACS Version (as defined in ACPI 2.0 spec.)
245 ///
246 #define EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION 0x01
247 
248 ///
249 /// Firmware Control Structure Feature Flags
250 /// All other bits are reserved and must be set to 0.
251 ///
252 #define EFI_ACPI_2_0_S4BIOS_F BIT0
253 
254 ///
255 /// Multiple APIC Description Table header definition. The rest of the table
256 /// must be defined in a platform specific manner.
257 ///
258 typedef struct {
263 
264 ///
265 /// MADT Revision (as defined in ACPI 2.0 spec.)
266 ///
267 #define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01
268 
269 ///
270 /// Multiple APIC Flags
271 /// All other bits are reserved and must be set to 0.
272 ///
273 #define EFI_ACPI_2_0_PCAT_COMPAT BIT0
274 
275 //
276 // Multiple APIC Description Table APIC structure types
277 // All other values between 0x09 an 0xFF are reserved and
278 // will be ignored by OSPM.
279 //
280 #define EFI_ACPI_2_0_PROCESSOR_LOCAL_APIC 0x00
281 #define EFI_ACPI_2_0_IO_APIC 0x01
282 #define EFI_ACPI_2_0_INTERRUPT_SOURCE_OVERRIDE 0x02
283 #define EFI_ACPI_2_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03
284 #define EFI_ACPI_2_0_LOCAL_APIC_NMI 0x04
285 #define EFI_ACPI_2_0_LOCAL_APIC_ADDRESS_OVERRIDE 0x05
286 #define EFI_ACPI_2_0_IO_SAPIC 0x06
287 #define EFI_ACPI_2_0_PROCESSOR_LOCAL_SAPIC 0x07
288 #define EFI_ACPI_2_0_PLATFORM_INTERRUPT_SOURCES 0x08
289 
290 //
291 // APIC Structure Definitions
292 //
293 
294 ///
295 /// Processor Local APIC Structure Definition
296 ///
297 typedef struct {
304 
305 ///
306 /// Local APIC Flags. All other bits are reserved and must be 0.
307 ///
308 #define EFI_ACPI_2_0_LOCAL_APIC_ENABLED BIT0
309 
310 ///
311 /// IO APIC Structure
312 ///
313 typedef struct {
321 
322 ///
323 /// Interrupt Source Override Structure
324 ///
325 typedef struct {
333 
334 ///
335 /// Non-Maskable Interrupt Source Structure
336 ///
337 typedef struct {
343 
344 ///
345 /// Local APIC NMI Structure
346 ///
347 typedef struct {
354 
355 ///
356 /// Local APIC Address Override Structure
357 ///
358 typedef struct {
364 
365 ///
366 /// IO SAPIC Structure
367 ///
368 typedef struct {
376 
377 ///
378 /// Local SAPIC Structure
379 ///
380 typedef struct {
389 
390 ///
391 /// Platform Interrupt Sources Structure
392 ///
393 typedef struct {
404 
405 ///
406 /// Smart Battery Description Table (SBST)
407 ///
408 typedef struct {
414 
415 ///
416 /// SBST Version (as defined in ACPI 2.0 spec.)
417 ///
418 #define EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
419 
420 ///
421 /// Embedded Controller Boot Resources Table (ECDT)
422 /// The table is followed by a null terminated ASCII string that contains
423 /// a fully qualified reference to the name space object.
424 ///
425 typedef struct {
432 
433 ///
434 /// ECDT Version (as defined in ACPI 2.0 spec.)
435 ///
436 #define EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION 0x01
437 
438 //
439 // Known table signatures
440 //
441 
442 ///
443 /// "RSD PTR " Root System Description Pointer
444 ///
445 #define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
446 
447 ///
448 /// "SPIC" Multiple SAPIC Description Table
449 ///
450 /// BUGBUG: Don't know where this came from except SR870BN4 uses it.
451 /// #define EFI_ACPI_2_0_MULTIPLE_SAPIC_DESCRIPTION_TABLE_SIGNATURE 0x43495053
452 ///
453 #define EFI_ACPI_2_0_MULTIPLE_SAPIC_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
454 
455 ///
456 /// "BOOT" MS Simple Boot Spec
457 ///
458 #define EFI_ACPI_2_0_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE SIGNATURE_32('B', 'O', 'O', 'T')
459 
460 ///
461 /// "DBGP" MS Bebug Port Spec
462 ///
463 #define EFI_ACPI_2_0_DEBUG_PORT_TABLE_SIGNATURE SIGNATURE_32('D', 'B', 'G', 'P')
464 
465 ///
466 /// "DSDT" Differentiated System Description Table
467 ///
468 #define EFI_ACPI_2_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('D', 'S', 'D', 'T')
469 
470 ///
471 /// "ECDT" Embedded Controller Boot Resources Table
472 ///
473 #define EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE SIGNATURE_32('E', 'C', 'D', 'T')
474 
475 ///
476 /// "ETDT" Event Timer Description Table
477 ///
478 #define EFI_ACPI_2_0_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('E', 'T', 'D', 'T')
479 
480 ///
481 /// "FACS" Firmware ACPI Control Structure
482 ///
483 #define EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'S')
484 
485 ///
486 /// "FACP" Fixed ACPI Description Table
487 ///
488 #define EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'P')
489 
490 ///
491 /// "APIC" Multiple APIC Description Table
492 ///
493 #define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
494 
495 ///
496 /// "PSDT" Persistent System Description Table
497 ///
498 #define EFI_ACPI_2_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('P', 'S', 'D', 'T')
499 
500 ///
501 /// "RSDT" Root System Description Table
502 ///
503 #define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('R', 'S', 'D', 'T')
504 
505 ///
506 /// "SBST" Smart Battery Specification Table
507 ///
508 #define EFI_ACPI_2_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE SIGNATURE_32('S', 'B', 'S', 'T')
509 
510 ///
511 /// "SLIT" System Locality Information Table
512 ///
513 #define EFI_ACPI_2_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE SIGNATURE_32('S', 'L', 'I', 'T')
514 
515 ///
516 /// "SPCR" Serial Port Concole Redirection Table
517 ///
518 #define EFI_ACPI_2_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'C', 'R')
519 
520 ///
521 /// "SRAT" Static Resource Affinity Table
522 ///
523 #define EFI_ACPI_2_0_STATIC_RESOURCE_AFFINITY_TABLE_SIGNATURE SIGNATURE_32('S', 'R', 'A', 'T')
524 
525 ///
526 /// "SSDT" Secondary System Description Table
527 ///
528 #define EFI_ACPI_2_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('S', 'S', 'D', 'T')
529 
530 ///
531 /// "SPMI" Server Platform Management Interface Table
532 ///
533 #define EFI_ACPI_2_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_SIGNATURE SIGNATURE_32('S', 'P', 'M', 'I')
534 
535 ///
536 /// "XSDT" Extended System Description Table
537 ///
538 #define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('X', 'S', 'D', 'T')
539 
540 ///
541 /// "MCFG" PCI Express Memory Mapped Configuration Space Base Address Description Table
542 ///
543 #define EFI_ACPI_2_0_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_SIGNATURE SIGNATURE_32('M', 'C', 'F', 'G')
544 
545 #pragma pack()
546 
547 #endif
IO SAPIC Structure.
Definition: Acpi20.h:368
EFI_ACPI_DESCRIPTION_HEADER Header
Definition: Acpi20.h:409
EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk
Definition: Acpi20.h:177
UINT8 RegisterBitOffset
Definition: Acpi20.h:40
PACKED struct @476 EFI_ACPI_GENERIC_REGISTER_DESCRIPTOR
Generic Register Descriptor.
EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE EcControl
Definition: Acpi20.h:427
UINT64 RegisterAddress
Definition: Acpi20.h:42
UINT8 RegisterBitWidth
Definition: Acpi20.h:39
Processor Local APIC Structure Definition.
Definition: Acpi20.h:297
Multiple APIC Description Table header definition.
Definition: Acpi20.h:258
unsigned int UINT32
Definition: ProcessorBind.h:56
Platform Interrupt Sources Structure.
Definition: Acpi20.h:393
EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk
Definition: Acpi20.h:181
Root System Description Pointer Structure.
Definition: Acpi20.h:80
#define PACKED
Definition: Base.h:256
unsigned char UINT8
Definition: ProcessorBind.h:62
ACPI 1.0b definitions from the ACPI Specification, revision 1.0b.
EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk
Definition: Acpi20.h:179
EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk
Definition: Acpi20.h:176
PACKED struct @460 ACPI_LARGE_RESOURCE_HEADER
FILE_LICENCE(BSD3)
Common table header, this prefaces all ACPI tables, including FACS, but excluding the RSD PTR structu...
Definition: Acpi20.h:101
UINT8 AddressSpaceId
Definition: Acpi20.h:38
EFI_ACPI_DESCRIPTION_HEADER Header
Definition: Acpi20.h:132
Local APIC NMI Structure.
Definition: Acpi20.h:347
UINT8 AddressSize
Definition: Acpi20.h:41
unsigned short UINT16
Definition: ProcessorBind.h:58
UINT8 Reserved
Must be zero.
Definition: Acpi30.h:42
The common ACPI description table header.
Definition: Acpi10.h:34
Local APIC Address Override Structure.
Definition: Acpi20.h:358
IO APIC Structure.
Definition: Acpi20.h:313
unsigned long long UINT64
Definition: ProcessorBind.h:54
Fixed ACPI Description Table Structure (FADT)
Definition: Acpi20.h:131
EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk
Definition: Acpi20.h:183
EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE EcData
Definition: Acpi20.h:428
Smart Battery Description Table (SBST)
Definition: Acpi20.h:408
Embedded Controller Boot Resources Table (ECDT) The table is followed by a null terminated ASCII stri...
Definition: Acpi20.h:425
EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk
Definition: Acpi20.h:178
EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk
Definition: Acpi20.h:180
Firmware ACPI Control Structure.
Definition: Acpi20.h:231
Interrupt Source Override Structure.
Definition: Acpi20.h:325
EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk
Definition: Acpi20.h:182
Non-Maskable Interrupt Source Structure.
Definition: Acpi20.h:337
ACPI 2.0 Generic Address Space definition.
Definition: Acpi20.h:55
ACPI_LARGE_RESOURCE_HEADER Header
Definition: Acpi20.h:37
EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE ResetReg
Definition: Acpi20.h:171