]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/IndustryStandard/Acpi2_0.h
Update the industryStandard in MdePkg:
[mirror_edk2.git] / MdePkg / Include / IndustryStandard / Acpi2_0.h
1 /**
2 @file
3 ACPI 2.0 definitions from the ACPI Specification, revision 2.0
4
5 Copyright (c) 2006 - 2007, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 **/
14
15 #ifndef _ACPI_2_0_H_
16 #define _ACPI_2_0_H_
17
18 #include <IndustryStandard/Acpi1_0.h>
19
20 //
21 // Ensure proper structure formats
22 //
23 #pragma pack(1)
24 //
25 // ACPI Specification Revision
26 //
27 #define EFI_ACPI_2_0_REVISION 0x02
28
29 //
30 // ACPI 2.0 Generic Address Space definition
31 //
32 typedef struct {
33 UINT8 AddressSpaceId;
34 UINT8 RegisterBitWidth;
35 UINT8 RegisterBitOffset;
36 UINT8 Reserved;
37 UINT64 Address;
38 } EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE;
39
40 //
41 // Generic Address Space Address IDs
42 //
43 #define EFI_ACPI_2_0_SYSTEM_MEMORY 0
44 #define EFI_ACPI_2_0_SYSTEM_IO 1
45 #define EFI_ACPI_2_0_PCI_CONFIGURATION_SPACE 2
46 #define EFI_ACPI_2_0_EMBEDDED_CONTROLLER 3
47 #define EFI_ACPI_2_0_SMBUS 4
48 #define EFI_ACPI_2_0_FUNCTIONAL_FIXED_HARDWARE 0x7F
49
50 //
51 // ACPI 2.0 table structures
52 //
53 //
54 // Root System Description Pointer Structure
55 //
56 typedef struct {
57 UINT64 Signature;
58 UINT8 Checksum;
59 UINT8 OemId[6];
60 UINT8 Revision;
61 UINT32 RsdtAddress;
62 UINT32 Length;
63 UINT64 XsdtAddress;
64 UINT8 ExtendedChecksum;
65 UINT8 Reserved[3];
66 } EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
67
68 //
69 // RSD_PTR Revision (as defined in ACPI 2.0 spec.)
70 //
71 #define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02
72
73 //
74 // Common table header, this prefaces all ACPI tables, including FACS, but
75 // excluding the RSD PTR structure
76 //
77 typedef struct {
78 UINT32 Signature;
79 UINT32 Length;
80 } EFI_ACPI_2_0_COMMON_HEADER;
81
82 //
83 // Root System Description Table
84 // No definition needed as it is a common description table header followed by a
85 // variable number of UINT32 table pointers.
86 //
87 //
88 // RSDT Revision (as defined in ACPI 2.0 spec.)
89 //
90 #define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
91
92 //
93 // Extended System Description Table
94 // No definition needed as it is a common description table header followed by a
95 // variable number of UINT64 table pointers.
96 //
97 //
98 // XSDT Revision (as defined in ACPI 2.0 spec.)
99 //
100 #define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
101
102 //
103 // Fixed ACPI Description Table Structure (FADT)
104 //
105 typedef struct {
106 EFI_ACPI_DESCRIPTION_HEADER Header;
107 UINT32 FirmwareCtrl;
108 UINT32 Dsdt;
109 UINT8 Reserved0;
110 UINT8 PreferredPmProfile;
111 UINT16 SciInt;
112 UINT32 SmiCmd;
113 UINT8 AcpiEnable;
114 UINT8 AcpiDisable;
115 UINT8 S4BiosReq;
116 UINT8 PstateCnt;
117 UINT32 Pm1aEvtBlk;
118 UINT32 Pm1bEvtBlk;
119 UINT32 Pm1aCntBlk;
120 UINT32 Pm1bCntBlk;
121 UINT32 Pm2CntBlk;
122 UINT32 PmTmrBlk;
123 UINT32 Gpe0Blk;
124 UINT32 Gpe1Blk;
125 UINT8 Pm1EvtLen;
126 UINT8 Pm1CntLen;
127 UINT8 Pm2CntLen;
128 UINT8 PmTmrLen;
129 UINT8 Gpe0BlkLen;
130 UINT8 Gpe1BlkLen;
131 UINT8 Gpe1Base;
132 UINT8 CstCnt;
133 UINT16 PLvl2Lat;
134 UINT16 PLvl3Lat;
135 UINT16 FlushSize;
136 UINT16 FlushStride;
137 UINT8 DutyOffset;
138 UINT8 DutyWidth;
139 UINT8 DayAlrm;
140 UINT8 MonAlrm;
141 UINT8 Century;
142 UINT16 IaPcBootArch;
143 UINT8 Reserved1;
144 UINT32 Flags;
145 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE ResetReg;
146 UINT8 ResetValue;
147 UINT8 Reserved2[3];
148 UINT64 XFirmwareCtrl;
149 UINT64 XDsdt;
150 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk;
151 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk;
152 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk;
153 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk;
154 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk;
155 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk;
156 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk;
157 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk;
158 } EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE;
159
160 //
161 // FADT Version (as defined in ACPI 2.0 spec.)
162 //
163 #define EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x03
164
165 //
166 // Fixed ACPI Description Table Boot Architecture Flags
167 // All other bits are reserved and must be set to 0.
168 //
169 #define EFI_ACPI_2_0_LEGACY_DEVICES (1 << 0)
170 #define EFI_ACPI_2_0_8042 (1 << 1)
171
172 //
173 // Fixed ACPI Description Table Fixed Feature Flags
174 // All other bits are reserved and must be set to 0.
175 //
176 #define EFI_ACPI_2_0_WBINVD (1 << 0)
177 #define EFI_ACPI_2_0_WBINVD_FLUSH (1 << 1)
178 #define EFI_ACPI_2_0_PROC_C1 (1 << 2)
179 #define EFI_ACPI_2_0_P_LVL2_UP (1 << 3)
180 #define EFI_ACPI_2_0_PWR_BUTTON (1 << 4)
181 #define EFI_ACPI_2_0_SLP_BUTTON (1 << 5)
182 #define EFI_ACPI_2_0_FIX_RTC (1 << 6)
183 #define EFI_ACPI_2_0_RTC_S4 (1 << 7)
184 #define EFI_ACPI_2_0_TMR_VAL_EXT (1 << 8)
185 #define EFI_ACPI_2_0_DCK_CAP (1 << 9)
186 #define EFI_ACPI_2_0_RESET_REG_SUP (1 << 10)
187 #define EFI_ACPI_2_0_SEALED_CASE (1 << 11)
188 #define EFI_ACPI_2_0_HEADLESS (1 << 12)
189 #define EFI_ACPI_2_0_CPU_SW_SLP (1 << 13)
190
191 //
192 // Firmware ACPI Control Structure
193 //
194 typedef struct {
195 UINT32 Signature;
196 UINT32 Length;
197 UINT32 HardwareSignature;
198 UINT32 FirmwareWakingVector;
199 UINT32 GlobalLock;
200 UINT32 Flags;
201 UINT64 XFirmwareWakingVector;
202 UINT8 Version;
203 UINT8 Reserved[31];
204 } EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE;
205
206 //
207 // FACS Version (as defined in ACPI 2.0 spec.)
208 //
209 #define EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION 0x01
210
211 //
212 // Firmware Control Structure Feature Flags
213 // All other bits are reserved and must be set to 0.
214 //
215 #define EFI_ACPI_2_0_S4BIOS_F (1 << 0)
216
217 //
218 // Multiple APIC Description Table header definition. The rest of the table
219 // must be defined in a platform specific manner.
220 //
221 typedef struct {
222 EFI_ACPI_DESCRIPTION_HEADER Header;
223 UINT32 LocalApicAddress;
224 UINT32 Flags;
225 } EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
226
227 //
228 // MADT Revision (as defined in ACPI 2.0 spec.)
229 //
230 #define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01
231
232 //
233 // Multiple APIC Flags
234 // All other bits are reserved and must be set to 0.
235 //
236 #define EFI_ACPI_2_0_PCAT_COMPAT (1 << 0)
237
238 //
239 // Multiple APIC Description Table APIC structure types
240 // All other values between 0x09 an 0xFF are reserved and
241 // will be ignored by OSPM.
242 //
243 #define EFI_ACPI_2_0_PROCESSOR_LOCAL_APIC 0x00
244 #define EFI_ACPI_2_0_IO_APIC 0x01
245 #define EFI_ACPI_2_0_INTERRUPT_SOURCE_OVERRIDE 0x02
246 #define EFI_ACPI_2_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03
247 #define EFI_ACPI_2_0_LOCAL_APIC_NMI 0x04
248 #define EFI_ACPI_2_0_LOCAL_APIC_ADDRESS_OVERRIDE 0x05
249 #define EFI_ACPI_2_0_IO_SAPIC 0x06
250 #define EFI_ACPI_2_0_PROCESSOR_LOCAL_SAPIC 0x07
251 #define EFI_ACPI_2_0_PLATFORM_INTERRUPT_SOURCES 0x08
252
253 //
254 // APIC Structure Definitions
255 //
256 //
257 // Processor Local APIC Structure Definition
258 //
259 typedef struct {
260 UINT8 Type;
261 UINT8 Length;
262 UINT8 AcpiProcessorId;
263 UINT8 ApicId;
264 UINT32 Flags;
265 } EFI_ACPI_2_0_PROCESSOR_LOCAL_APIC_STRUCTURE;
266
267 //
268 // Local APIC Flags. All other bits are reserved and must be 0.
269 //
270 #define EFI_ACPI_2_0_LOCAL_APIC_ENABLED (1 << 0)
271
272 //
273 // IO APIC Structure
274 //
275 typedef struct {
276 UINT8 Type;
277 UINT8 Length;
278 UINT8 IoApicId;
279 UINT8 Reserved;
280 UINT32 IoApicAddress;
281 UINT32 GlobalSystemInterruptBase;
282 } EFI_ACPI_2_0_IO_APIC_STRUCTURE;
283
284 //
285 // Interrupt Source Override Structure
286 //
287 typedef struct {
288 UINT8 Type;
289 UINT8 Length;
290 UINT8 Bus;
291 UINT8 Source;
292 UINT32 GlobalSystemInterrupt;
293 UINT16 Flags;
294 } EFI_ACPI_2_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
295
296 //
297 // Non-Maskable Interrupt Source Structure
298 //
299 typedef struct {
300 UINT8 Type;
301 UINT8 Length;
302 UINT16 Flags;
303 UINT32 GlobalSystemInterrupt;
304 } EFI_ACPI_2_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
305
306 //
307 // Local APIC NMI Structure
308 //
309 typedef struct {
310 UINT8 Type;
311 UINT8 Length;
312 UINT8 AcpiProcessorId;
313 UINT16 Flags;
314 UINT8 LocalApicLint;
315 } EFI_ACPI_2_0_LOCAL_APIC_NMI_STRUCTURE;
316
317 //
318 // Local APIC Address Override Structure
319 //
320 typedef struct {
321 UINT8 Type;
322 UINT8 Length;
323 UINT16 Reserved;
324 UINT64 LocalApicAddress;
325 } EFI_ACPI_2_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE;
326
327 //
328 // IO SAPIC Structure
329 //
330 typedef struct {
331 UINT8 Type;
332 UINT8 Length;
333 UINT8 IoApicId;
334 UINT8 Reserved;
335 UINT32 GlobalSystemInterruptBase;
336 UINT64 IoSapicAddress;
337 } EFI_ACPI_2_0_IO_SAPIC_STRUCTURE;
338
339 //
340 // Local SAPIC Structure
341 //
342 typedef struct {
343 UINT8 Type;
344 UINT8 Length;
345 UINT8 AcpiProcessorId;
346 UINT8 LocalSapicId;
347 UINT8 LocalSapicEid;
348 UINT8 Reserved[3];
349 UINT32 Flags;
350 } EFI_ACPI_2_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE;
351
352 //
353 // Platform Interrupt Sources Structure
354 //
355 typedef struct {
356 UINT8 Type;
357 UINT8 Length;
358 UINT16 Flags;
359 UINT8 InterruptType;
360 UINT8 ProcessorId;
361 UINT8 ProcessorEid;
362 UINT8 IoSapicVector;
363 UINT32 GlobalSystemInterrupt;
364 UINT32 Reserved;
365 } EFI_ACPI_2_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE;
366
367 //
368 // Smart Battery Description Table (SBST)
369 //
370 typedef struct {
371 EFI_ACPI_DESCRIPTION_HEADER Header;
372 UINT32 WarningEnergyLevel;
373 UINT32 LowEnergyLevel;
374 UINT32 CriticalEnergyLevel;
375 } EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE;
376
377 //
378 // SBST Version (as defined in ACPI 2.0 spec.)
379 //
380 #define EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
381
382 //
383 // Embedded Controller Boot Resources Table (ECDT)
384 // The table is followed by a null terminated ASCII string that contains
385 // a fully qualified reference to the name space object.
386 //
387 typedef struct {
388 EFI_ACPI_DESCRIPTION_HEADER Header;
389 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE EcControl;
390 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE EcData;
391 UINT32 Uid;
392 UINT8 GpeBit;
393 } EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE;
394
395 //
396 // ECDT Version (as defined in ACPI 2.0 spec.)
397 //
398 #define EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION 0x01
399
400 //
401 // Known table signatures
402 //
403 //
404 // "RSD PTR " Root System Description Pointer
405 //
406 #define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE 0x2052545020445352
407
408 //
409 // "SPIC" Multiple SAPIC Description Table
410 //
411 // BUGBUG: Don't know where this came from except SR870BN4 uses it.
412 // #define EFI_ACPI_2_0_MULTIPLE_SAPIC_DESCRIPTION_TABLE_SIGNATURE 0x43495053
413 //
414 #define EFI_ACPI_2_0_MULTIPLE_SAPIC_DESCRIPTION_TABLE_SIGNATURE 0x43495041
415
416 //
417 // "BOOT" MS Simple Boot Spec
418 //
419 #define EFI_ACPI_2_0_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE 0x544F4F42
420
421 //
422 // "DBGP" MS Bebug Port Spec
423 //
424 #define EFI_ACPI_2_0_DEBUG_PORT_TABLE_SIGNATURE 0x50474244
425
426 //
427 // "DSDT" Differentiated System Description Table
428 //
429 #define EFI_ACPI_2_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445344
430
431 //
432 // "ECDT" Embedded Controller Boot Resources Table
433 //
434 #define EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE 0x54444345
435
436 //
437 // "ETDT" Event Timer Description Table
438 //
439 #define EFI_ACPI_2_0_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE 0x54445445
440
441 //
442 // "FACS" Firmware ACPI Control Structure
443 //
444 #define EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE 0x53434146
445
446 //
447 // "FACP" Fixed ACPI Description Table
448 //
449 #define EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE 0x50434146
450
451 //
452 // "APIC" Multiple APIC Description Table
453 //
454 #define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE 0x43495041
455
456 //
457 // "PSDT" Persistent System Description Table
458 //
459 #define EFI_ACPI_2_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445350
460
461 //
462 // "RSDT" Root System Description Table
463 //
464 #define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445352
465
466 //
467 // "SBST" Smart Battery Specification Table
468 //
469 #define EFI_ACPI_2_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE 0x54534253
470
471 //
472 // "SLIT" System Locality Information Table
473 //
474 #define EFI_ACPI_2_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE 0x54494C53
475
476 //
477 // "SPCR" Serial Port Concole Redirection Table
478 //
479 #define EFI_ACPI_2_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE 0x52435053
480
481 //
482 // "SRAT" Static Resource Affinity Table
483 //
484 #define EFI_ACPI_2_0_STATIC_RESOURCE_AFFINITY_TABLE_SIGNATURE 0x54415253
485
486 //
487 // "SSDT" Secondary System Description Table
488 //
489 #define EFI_ACPI_2_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445353
490
491 //
492 // "SPMI" Server Platform Management Interface Table
493 //
494 #define EFI_ACPI_2_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_SIGNATURE 0x494D5053
495
496 //
497 // "XSDT" Extended System Description Table
498 //
499 #define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445358
500
501 #pragma pack()
502
503 #endif