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