TianoCore EDK2 master
Loading...
Searching...
No Matches
Acpi20.h
Go to the documentation of this file.
1
8#ifndef _ACPI_2_0_H_
9#define _ACPI_2_0_H_
10
12
13//
14// Define for Descriptor
15//
16#define ACPI_LARGE_GENERIC_REGISTER_DESCRIPTOR_NAME 0x02
17
18#define ACPI_GENERIC_REGISTER_DESCRIPTOR 0x82
19
20//
21// Ensure proper structure formats
22//
23#pragma pack(1)
24
28typedef PACKED struct {
29 ACPI_LARGE_RESOURCE_HEADER Header;
30 UINT8 AddressSpaceId;
31 UINT8 RegisterBitWidth;
32 UINT8 RegisterBitOffset;
33 UINT8 AddressSize;
34 UINT64 RegisterAddress;
36
37#pragma pack()
38
39//
40// Ensure proper structure formats
41//
42#pragma pack(1)
43
47typedef struct {
48 UINT8 AddressSpaceId;
49 UINT8 RegisterBitWidth;
50 UINT8 RegisterBitOffset;
51 UINT8 Reserved;
52 UINT64 Address;
54
55//
56// Generic Address Space Address IDs
57//
58#define EFI_ACPI_2_0_SYSTEM_MEMORY 0
59#define EFI_ACPI_2_0_SYSTEM_IO 1
60#define EFI_ACPI_2_0_PCI_CONFIGURATION_SPACE 2
61#define EFI_ACPI_2_0_EMBEDDED_CONTROLLER 3
62#define EFI_ACPI_2_0_SMBUS 4
63#define EFI_ACPI_2_0_FUNCTIONAL_FIXED_HARDWARE 0x7F
64
65//
66// ACPI 2.0 table structures
67//
68
72typedef struct {
73 UINT64 Signature;
74 UINT8 Checksum;
75 UINT8 OemId[6];
76 UINT8 Revision;
77 UINT32 RsdtAddress;
78 UINT32 Length;
79 UINT64 XsdtAddress;
80 UINT8 ExtendedChecksum;
81 UINT8 Reserved[3];
83
87#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02
88
93typedef struct {
94 UINT32 Signature;
95 UINT32 Length;
97
98//
99// Root System Description Table
100// No definition needed as it is a common description table header, the same with
101// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
102//
103
107#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
108
109//
110// Extended System Description Table
111// No definition needed as it is a common description table header, the same with
112// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
113//
114
118#define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
119
123typedef struct {
125 UINT32 FirmwareCtrl;
126 UINT32 Dsdt;
127 UINT8 Reserved0;
128 UINT8 PreferredPmProfile;
129 UINT16 SciInt;
130 UINT32 SmiCmd;
131 UINT8 AcpiEnable;
132 UINT8 AcpiDisable;
133 UINT8 S4BiosReq;
134 UINT8 PstateCnt;
135 UINT32 Pm1aEvtBlk;
136 UINT32 Pm1bEvtBlk;
137 UINT32 Pm1aCntBlk;
138 UINT32 Pm1bCntBlk;
139 UINT32 Pm2CntBlk;
140 UINT32 PmTmrBlk;
141 UINT32 Gpe0Blk;
142 UINT32 Gpe1Blk;
143 UINT8 Pm1EvtLen;
144 UINT8 Pm1CntLen;
145 UINT8 Pm2CntLen;
146 UINT8 PmTmrLen;
147 UINT8 Gpe0BlkLen;
148 UINT8 Gpe1BlkLen;
149 UINT8 Gpe1Base;
150 UINT8 CstCnt;
151 UINT16 PLvl2Lat;
152 UINT16 PLvl3Lat;
153 UINT16 FlushSize;
154 UINT16 FlushStride;
155 UINT8 DutyOffset;
156 UINT8 DutyWidth;
157 UINT8 DayAlrm;
158 UINT8 MonAlrm;
159 UINT8 Century;
160 UINT16 IaPcBootArch;
161 UINT8 Reserved1;
162 UINT32 Flags;
164 UINT8 ResetValue;
165 UINT8 Reserved2[3];
166 UINT64 XFirmwareCtrl;
167 UINT64 XDsdt;
177
181#define EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x03
182
183//
184// Fixed ACPI Description Table Preferred Power Management Profile
185//
186#define EFI_ACPI_2_0_PM_PROFILE_UNSPECIFIED 0
187#define EFI_ACPI_2_0_PM_PROFILE_DESKTOP 1
188#define EFI_ACPI_2_0_PM_PROFILE_MOBILE 2
189#define EFI_ACPI_2_0_PM_PROFILE_WORKSTATION 3
190#define EFI_ACPI_2_0_PM_PROFILE_ENTERPRISE_SERVER 4
191#define EFI_ACPI_2_0_PM_PROFILE_SOHO_SERVER 5
192#define EFI_ACPI_2_0_PM_PROFILE_APPLIANCE_PC 6
193
194//
195// Fixed ACPI Description Table Boot Architecture Flags
196// All other bits are reserved and must be set to 0.
197//
198#define EFI_ACPI_2_0_LEGACY_DEVICES BIT0
199#define EFI_ACPI_2_0_8042 BIT1
200
201//
202// Fixed ACPI Description Table Fixed Feature Flags
203// All other bits are reserved and must be set to 0.
204//
205#define EFI_ACPI_2_0_WBINVD BIT0
206#define EFI_ACPI_2_0_WBINVD_FLUSH BIT1
207#define EFI_ACPI_2_0_PROC_C1 BIT2
208#define EFI_ACPI_2_0_P_LVL2_UP BIT3
209#define EFI_ACPI_2_0_PWR_BUTTON BIT4
210#define EFI_ACPI_2_0_SLP_BUTTON BIT5
211#define EFI_ACPI_2_0_FIX_RTC BIT6
212#define EFI_ACPI_2_0_RTC_S4 BIT7
213#define EFI_ACPI_2_0_TMR_VAL_EXT BIT8
214#define EFI_ACPI_2_0_DCK_CAP BIT9
215#define EFI_ACPI_2_0_RESET_REG_SUP BIT10
216#define EFI_ACPI_2_0_SEALED_CASE BIT11
217#define EFI_ACPI_2_0_HEADLESS BIT12
218#define EFI_ACPI_2_0_CPU_SW_SLP BIT13
219
223typedef struct {
224 UINT32 Signature;
225 UINT32 Length;
226 UINT32 HardwareSignature;
227 UINT32 FirmwareWakingVector;
228 UINT32 GlobalLock;
229 UINT32 Flags;
230 UINT64 XFirmwareWakingVector;
231 UINT8 Version;
232 UINT8 Reserved[31];
234
238#define EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION 0x01
239
244#define EFI_ACPI_2_0_S4BIOS_F BIT0
245
250typedef struct {
252 UINT32 LocalApicAddress;
253 UINT32 Flags;
255
259#define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01
260
265#define EFI_ACPI_2_0_PCAT_COMPAT BIT0
266
267//
268// Multiple APIC Description Table APIC structure types
269// All other values between 0x09 an 0xFF are reserved and
270// will be ignored by OSPM.
271//
272#define EFI_ACPI_2_0_PROCESSOR_LOCAL_APIC 0x00
273#define EFI_ACPI_2_0_IO_APIC 0x01
274#define EFI_ACPI_2_0_INTERRUPT_SOURCE_OVERRIDE 0x02
275#define EFI_ACPI_2_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03
276#define EFI_ACPI_2_0_LOCAL_APIC_NMI 0x04
277#define EFI_ACPI_2_0_LOCAL_APIC_ADDRESS_OVERRIDE 0x05
278#define EFI_ACPI_2_0_IO_SAPIC 0x06
279#define EFI_ACPI_2_0_PROCESSOR_LOCAL_SAPIC 0x07
280#define EFI_ACPI_2_0_PLATFORM_INTERRUPT_SOURCES 0x08
281
282//
283// APIC Structure Definitions
284//
285
289typedef struct {
290 UINT8 Type;
291 UINT8 Length;
292 UINT8 AcpiProcessorId;
293 UINT8 ApicId;
294 UINT32 Flags;
296
300#define EFI_ACPI_2_0_LOCAL_APIC_ENABLED BIT0
301
305typedef struct {
306 UINT8 Type;
307 UINT8 Length;
308 UINT8 IoApicId;
309 UINT8 Reserved;
310 UINT32 IoApicAddress;
311 UINT32 GlobalSystemInterruptBase;
313
317typedef struct {
318 UINT8 Type;
319 UINT8 Length;
320 UINT8 Bus;
321 UINT8 Source;
322 UINT32 GlobalSystemInterrupt;
323 UINT16 Flags;
325
329typedef struct {
330 UINT8 Type;
331 UINT8 Length;
332 UINT16 Flags;
333 UINT32 GlobalSystemInterrupt;
335
339typedef struct {
340 UINT8 Type;
341 UINT8 Length;
342 UINT8 AcpiProcessorId;
343 UINT16 Flags;
344 UINT8 LocalApicLint;
346
350typedef struct {
351 UINT8 Type;
352 UINT8 Length;
353 UINT16 Reserved;
354 UINT64 LocalApicAddress;
356
360typedef struct {
361 UINT8 Type;
362 UINT8 Length;
363 UINT8 IoApicId;
364 UINT8 Reserved;
365 UINT32 GlobalSystemInterruptBase;
366 UINT64 IoSapicAddress;
368
372typedef struct {
373 UINT8 Type;
374 UINT8 Length;
375 UINT8 AcpiProcessorId;
376 UINT8 LocalSapicId;
377 UINT8 LocalSapicEid;
378 UINT8 Reserved[3];
379 UINT32 Flags;
381
385typedef struct {
386 UINT8 Type;
387 UINT8 Length;
388 UINT16 Flags;
389 UINT8 InterruptType;
390 UINT8 ProcessorId;
391 UINT8 ProcessorEid;
392 UINT8 IoSapicVector;
393 UINT32 GlobalSystemInterrupt;
394 UINT32 Reserved;
396
400typedef struct {
402 UINT32 WarningEnergyLevel;
403 UINT32 LowEnergyLevel;
404 UINT32 CriticalEnergyLevel;
406
410#define EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
411
417typedef struct {
421 UINT32 Uid;
422 UINT8 GpeBit;
424
428#define EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION 0x01
429
430//
431// Known table signatures
432//
433
437#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
438
445#define EFI_ACPI_2_0_MULTIPLE_SAPIC_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
446
450#define EFI_ACPI_2_0_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE SIGNATURE_32('B', 'O', 'O', 'T')
451
455#define EFI_ACPI_2_0_DEBUG_PORT_TABLE_SIGNATURE SIGNATURE_32('D', 'B', 'G', 'P')
456
460#define EFI_ACPI_2_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('D', 'S', 'D', 'T')
461
465#define EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE SIGNATURE_32('E', 'C', 'D', 'T')
466
470#define EFI_ACPI_2_0_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('E', 'T', 'D', 'T')
471
475#define EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'S')
476
480#define EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'P')
481
485#define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
486
490#define EFI_ACPI_2_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('P', 'S', 'D', 'T')
491
495#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('R', 'S', 'D', 'T')
496
500#define EFI_ACPI_2_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE SIGNATURE_32('S', 'B', 'S', 'T')
501
505#define EFI_ACPI_2_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE SIGNATURE_32('S', 'L', 'I', 'T')
506
510#define EFI_ACPI_2_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'C', 'R')
511
515#define EFI_ACPI_2_0_STATIC_RESOURCE_AFFINITY_TABLE_SIGNATURE SIGNATURE_32('S', 'R', 'A', 'T')
516
520#define EFI_ACPI_2_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('S', 'S', 'D', 'T')
521
525#define EFI_ACPI_2_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_SIGNATURE SIGNATURE_32('S', 'P', 'M', 'I')
526
530#define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('X', 'S', 'D', 'T')
531
535#define EFI_ACPI_2_0_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_SIGNATURE SIGNATURE_32('M', 'C', 'F', 'G')
536
537#pragma pack()
538
539#endif
PACKED struct @107 EFI_ACPI_GENERIC_REGISTER_DESCRIPTOR