TianoCore EDK2 master
Loading...
Searching...
No Matches
Acpi30.h
Go to the documentation of this file.
1
8#ifndef _ACPI_3_0_H_
9#define _ACPI_3_0_H_
10
12
13//
14// Define for Descriptor
15//
16#define ACPI_LARGE_EXTENDED_ADDRESS_SPACE_DESCRIPTOR_NAME 0x0B
17
18#define ACPI_EXTENDED_ADDRESS_SPACE_DESCRIPTOR 0x8B
19
24#define ACPI_AML_COORD_TYPE_SW_ALL 0xFC
25#define ACPI_AML_COORD_TYPE_SW_ANY 0xFD
26#define ACPI_AML_COORD_TYPE_HW_ALL 0xFE
27
30// See s8.4.4.5 _PSD (P-State Dependency)
32#define EFI_ACPI_3_0_AML_PSD_REVISION 0
33
34//
35// Ensure proper structure formats
36//
37#pragma pack(1)
38
42typedef PACKED struct {
43 ACPI_LARGE_RESOURCE_HEADER Header;
44 UINT8 ResType;
45 UINT8 GenFlag;
46 UINT8 SpecificFlag;
47 UINT8 RevisionId;
48 UINT8 Reserved;
49 UINT64 AddrSpaceGranularity;
50 UINT64 AddrRangeMin;
51 UINT64 AddrRangeMax;
52 UINT64 AddrTranslationOffset;
53 UINT64 AddrLen;
54 UINT64 TypeSpecificAttribute;
56
57#pragma pack()
58
59//
60// Memory Type Specific Flags
61//
62#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_UC 0x0000000000000001
63#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WC 0x0000000000000002
64#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WT 0x0000000000000004
65#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WB 0x0000000000000008
66#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_UCE 0x0000000000000010
67#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_NV 0x0000000000008000
68
69//
70// Ensure proper structure formats
71//
72#pragma pack(1)
73
77typedef struct {
78 UINT8 AddressSpaceId;
79 UINT8 RegisterBitWidth;
80 UINT8 RegisterBitOffset;
81 UINT8 AccessSize;
82 UINT64 Address;
84
85//
86// Generic Address Space Address IDs
87//
88#define EFI_ACPI_3_0_SYSTEM_MEMORY 0
89#define EFI_ACPI_3_0_SYSTEM_IO 1
90#define EFI_ACPI_3_0_PCI_CONFIGURATION_SPACE 2
91#define EFI_ACPI_3_0_EMBEDDED_CONTROLLER 3
92#define EFI_ACPI_3_0_SMBUS 4
93#define EFI_ACPI_3_0_FUNCTIONAL_FIXED_HARDWARE 0x7F
94
95//
96// Generic Address Space Access Sizes
97//
98#define EFI_ACPI_3_0_UNDEFINED 0
99#define EFI_ACPI_3_0_BYTE 1
100#define EFI_ACPI_3_0_WORD 2
101#define EFI_ACPI_3_0_DWORD 3
102#define EFI_ACPI_3_0_QWORD 4
103
104//
105// ACPI 3.0 table structures
106//
107
111typedef struct {
112 UINT64 Signature;
113 UINT8 Checksum;
114 UINT8 OemId[6];
115 UINT8 Revision;
116 UINT32 RsdtAddress;
117 UINT32 Length;
118 UINT64 XsdtAddress;
119 UINT8 ExtendedChecksum;
120 UINT8 Reserved[3];
122
126#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02
127
132typedef struct {
133 UINT32 Signature;
134 UINT32 Length;
136
137//
138// Root System Description Table
139// No definition needed as it is a common description table header, the same with
140// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
141//
142
146#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
147
148//
149// Extended System Description Table
150// No definition needed as it is a common description table header, the same with
151// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
152//
153
157#define EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
158
162typedef struct {
164 UINT32 FirmwareCtrl;
165 UINT32 Dsdt;
166 UINT8 Reserved0;
167 UINT8 PreferredPmProfile;
168 UINT16 SciInt;
169 UINT32 SmiCmd;
170 UINT8 AcpiEnable;
171 UINT8 AcpiDisable;
172 UINT8 S4BiosReq;
173 UINT8 PstateCnt;
174 UINT32 Pm1aEvtBlk;
175 UINT32 Pm1bEvtBlk;
176 UINT32 Pm1aCntBlk;
177 UINT32 Pm1bCntBlk;
178 UINT32 Pm2CntBlk;
179 UINT32 PmTmrBlk;
180 UINT32 Gpe0Blk;
181 UINT32 Gpe1Blk;
182 UINT8 Pm1EvtLen;
183 UINT8 Pm1CntLen;
184 UINT8 Pm2CntLen;
185 UINT8 PmTmrLen;
186 UINT8 Gpe0BlkLen;
187 UINT8 Gpe1BlkLen;
188 UINT8 Gpe1Base;
189 UINT8 CstCnt;
190 UINT16 PLvl2Lat;
191 UINT16 PLvl3Lat;
192 UINT16 FlushSize;
193 UINT16 FlushStride;
194 UINT8 DutyOffset;
195 UINT8 DutyWidth;
196 UINT8 DayAlrm;
197 UINT8 MonAlrm;
198 UINT8 Century;
199 UINT16 IaPcBootArch;
200 UINT8 Reserved1;
201 UINT32 Flags;
203 UINT8 ResetValue;
204 UINT8 Reserved2[3];
205 UINT64 XFirmwareCtrl;
206 UINT64 XDsdt;
216
220#define EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x04
221
222//
223// Fixed ACPI Description Table Preferred Power Management Profile
224//
225#define EFI_ACPI_3_0_PM_PROFILE_UNSPECIFIED 0
226#define EFI_ACPI_3_0_PM_PROFILE_DESKTOP 1
227#define EFI_ACPI_3_0_PM_PROFILE_MOBILE 2
228#define EFI_ACPI_3_0_PM_PROFILE_WORKSTATION 3
229#define EFI_ACPI_3_0_PM_PROFILE_ENTERPRISE_SERVER 4
230#define EFI_ACPI_3_0_PM_PROFILE_SOHO_SERVER 5
231#define EFI_ACPI_3_0_PM_PROFILE_APPLIANCE_PC 6
232#define EFI_ACPI_3_0_PM_PROFILE_PERFORMANCE_SERVER 7
233
234//
235// Fixed ACPI Description Table Boot Architecture Flags
236// All other bits are reserved and must be set to 0.
237//
238#define EFI_ACPI_3_0_LEGACY_DEVICES BIT0
239#define EFI_ACPI_3_0_8042 BIT1
240#define EFI_ACPI_3_0_VGA_NOT_PRESENT BIT2
241#define EFI_ACPI_3_0_MSI_NOT_SUPPORTED BIT3
242#define EFI_ACPI_3_0_PCIE_ASPM_CONTROLS BIT4
243
244//
245// Fixed ACPI Description Table Fixed Feature Flags
246// All other bits are reserved and must be set to 0.
247//
248#define EFI_ACPI_3_0_WBINVD BIT0
249#define EFI_ACPI_3_0_WBINVD_FLUSH BIT1
250#define EFI_ACPI_3_0_PROC_C1 BIT2
251#define EFI_ACPI_3_0_P_LVL2_UP BIT3
252#define EFI_ACPI_3_0_PWR_BUTTON BIT4
253#define EFI_ACPI_3_0_SLP_BUTTON BIT5
254#define EFI_ACPI_3_0_FIX_RTC BIT6
255#define EFI_ACPI_3_0_RTC_S4 BIT7
256#define EFI_ACPI_3_0_TMR_VAL_EXT BIT8
257#define EFI_ACPI_3_0_DCK_CAP BIT9
258#define EFI_ACPI_3_0_RESET_REG_SUP BIT10
259#define EFI_ACPI_3_0_SEALED_CASE BIT11
260#define EFI_ACPI_3_0_HEADLESS BIT12
261#define EFI_ACPI_3_0_CPU_SW_SLP BIT13
262#define EFI_ACPI_3_0_PCI_EXP_WAK BIT14
263#define EFI_ACPI_3_0_USE_PLATFORM_CLOCK BIT15
264#define EFI_ACPI_3_0_S4_RTC_STS_VALID BIT16
265#define EFI_ACPI_3_0_REMOTE_POWER_ON_CAPABLE BIT17
266#define EFI_ACPI_3_0_FORCE_APIC_CLUSTER_MODEL BIT18
267#define EFI_ACPI_3_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19
268
272typedef struct {
273 UINT32 Signature;
274 UINT32 Length;
275 UINT32 HardwareSignature;
276 UINT32 FirmwareWakingVector;
277 UINT32 GlobalLock;
278 UINT32 Flags;
279 UINT64 XFirmwareWakingVector;
280 UINT8 Version;
281 UINT8 Reserved[31];
283
287#define EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION 0x01
288
293#define EFI_ACPI_3_0_S4BIOS_F BIT0
294
295//
296// Differentiated System Description Table,
297// Secondary System Description Table
298// and Persistent System Description Table,
299// no definition needed as they are common description table header, the same with
300// EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block.
301//
302#define EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
303#define EFI_ACPI_3_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
304
309typedef struct {
311 UINT32 LocalApicAddress;
312 UINT32 Flags;
314
318#define EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x02
319
324#define EFI_ACPI_3_0_PCAT_COMPAT BIT0
325
326//
327// Multiple APIC Description Table APIC structure types
328// All other values between 0x09 an 0xFF are reserved and
329// will be ignored by OSPM.
330//
331#define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC 0x00
332#define EFI_ACPI_3_0_IO_APIC 0x01
333#define EFI_ACPI_3_0_INTERRUPT_SOURCE_OVERRIDE 0x02
334#define EFI_ACPI_3_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03
335#define EFI_ACPI_3_0_LOCAL_APIC_NMI 0x04
336#define EFI_ACPI_3_0_LOCAL_APIC_ADDRESS_OVERRIDE 0x05
337#define EFI_ACPI_3_0_IO_SAPIC 0x06
338#define EFI_ACPI_3_0_LOCAL_SAPIC 0x07
339#define EFI_ACPI_3_0_PLATFORM_INTERRUPT_SOURCES 0x08
340
341//
342// APIC Structure Definitions
343//
344
348typedef struct {
349 UINT8 Type;
350 UINT8 Length;
351 UINT8 AcpiProcessorId;
352 UINT8 ApicId;
353 UINT32 Flags;
355
359#define EFI_ACPI_3_0_LOCAL_APIC_ENABLED BIT0
360
364typedef struct {
365 UINT8 Type;
366 UINT8 Length;
367 UINT8 IoApicId;
368 UINT8 Reserved;
369 UINT32 IoApicAddress;
370 UINT32 GlobalSystemInterruptBase;
372
376typedef struct {
377 UINT8 Type;
378 UINT8 Length;
379 UINT8 Bus;
380 UINT8 Source;
381 UINT32 GlobalSystemInterrupt;
382 UINT16 Flags;
384
388typedef struct {
389 UINT8 Type;
390 UINT8 Length;
391 UINT16 Flags;
392 UINT8 InterruptType;
393 UINT8 ProcessorId;
394 UINT8 ProcessorEid;
395 UINT8 IoSapicVector;
396 UINT32 GlobalSystemInterrupt;
397 UINT32 PlatformInterruptSourceFlags;
398 UINT8 CpeiProcessorOverride;
399 UINT8 Reserved[31];
401
402//
403// MPS INTI flags.
404// All other bits are reserved and must be set to 0.
405//
406#define EFI_ACPI_3_0_POLARITY (3 << 0)
407#define EFI_ACPI_3_0_TRIGGER_MODE (3 << 2)
408
412typedef struct {
413 UINT8 Type;
414 UINT8 Length;
415 UINT16 Flags;
416 UINT32 GlobalSystemInterrupt;
418
422typedef struct {
423 UINT8 Type;
424 UINT8 Length;
425 UINT8 AcpiProcessorId;
426 UINT16 Flags;
427 UINT8 LocalApicLint;
429
433typedef struct {
434 UINT8 Type;
435 UINT8 Length;
436 UINT16 Reserved;
437 UINT64 LocalApicAddress;
439
443typedef struct {
444 UINT8 Type;
445 UINT8 Length;
446 UINT8 IoApicId;
447 UINT8 Reserved;
448 UINT32 GlobalSystemInterruptBase;
449 UINT64 IoSapicAddress;
451
456typedef struct {
457 UINT8 Type;
458 UINT8 Length;
459 UINT8 AcpiProcessorId;
460 UINT8 LocalSapicId;
461 UINT8 LocalSapicEid;
462 UINT8 Reserved[3];
463 UINT32 Flags;
464 UINT32 ACPIProcessorUIDValue;
466
470typedef struct {
471 UINT8 Type;
472 UINT8 Length;
473 UINT16 Flags;
474 UINT8 InterruptType;
475 UINT8 ProcessorId;
476 UINT8 ProcessorEid;
477 UINT8 IoSapicVector;
478 UINT32 GlobalSystemInterrupt;
479 UINT32 PlatformInterruptSourceFlags;
481
486#define EFI_ACPI_3_0_CPEI_PROCESSOR_OVERRIDE BIT0
487
491typedef struct {
493 UINT32 WarningEnergyLevel;
494 UINT32 LowEnergyLevel;
495 UINT32 CriticalEnergyLevel;
497
501#define EFI_ACPI_3_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
502
508typedef struct {
512 UINT32 Uid;
513 UINT8 GpeBit;
515
519#define EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION 0x01
520
525typedef struct {
527 UINT32 Reserved1;
528 UINT64 Reserved2;
530
534#define EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_REVISION 0x02
535
536//
537// SRAT structure types.
538// All other values between 0x02 an 0xFF are reserved and
539// will be ignored by OSPM.
540//
541#define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY 0x00
542#define EFI_ACPI_3_0_MEMORY_AFFINITY 0x01
543
547typedef struct {
548 UINT8 Type;
549 UINT8 Length;
550 UINT8 ProximityDomain7To0;
551 UINT8 ApicId;
552 UINT32 Flags;
553 UINT8 LocalSapicEid;
554 UINT8 ProximityDomain31To8[3];
555 UINT8 Reserved[4];
557
561#define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
562
566typedef struct {
567 UINT8 Type;
568 UINT8 Length;
569 UINT32 ProximityDomain;
570 UINT16 Reserved1;
571 UINT32 AddressBaseLow;
572 UINT32 AddressBaseHigh;
573 UINT32 LengthLow;
574 UINT32 LengthHigh;
575 UINT32 Reserved2;
576 UINT32 Flags;
577 UINT64 Reserved3;
579
580//
581// Memory Flags. All other bits are reserved and must be 0.
582//
583#define EFI_ACPI_3_0_MEMORY_ENABLED (1 << 0)
584#define EFI_ACPI_3_0_MEMORY_HOT_PLUGGABLE (1 << 1)
585#define EFI_ACPI_3_0_MEMORY_NONVOLATILE (1 << 2)
586
591typedef struct {
593 UINT64 NumberOfSystemLocalities;
595
599#define EFI_ACPI_3_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_REVISION 0x01
600
601//
602// Known table signatures
603//
604
608#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
609
613#define EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
614
618#define EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('D', 'S', 'D', 'T')
619
623#define EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE SIGNATURE_32('E', 'C', 'D', 'T')
624
628#define EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'P')
629
633#define EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'S')
634
638#define EFI_ACPI_3_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('P', 'S', 'D', 'T')
639
643#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('R', 'S', 'D', 'T')
644
648#define EFI_ACPI_3_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE SIGNATURE_32('S', 'B', 'S', 'T')
649
653#define EFI_ACPI_3_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE SIGNATURE_32('S', 'L', 'I', 'T')
654
658#define EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_SIGNATURE SIGNATURE_32('S', 'R', 'A', 'T')
659
663#define EFI_ACPI_3_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('S', 'S', 'D', 'T')
664
668#define EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('X', 'S', 'D', 'T')
669
673#define EFI_ACPI_3_0_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE SIGNATURE_32('B', 'O', 'O', 'T')
674
678#define EFI_ACPI_3_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_SIGNATURE SIGNATURE_32('C', 'P', 'E', 'P')
679
683#define EFI_ACPI_3_0_DEBUG_PORT_TABLE_SIGNATURE SIGNATURE_32('D', 'B', 'G', 'P')
684
688#define EFI_ACPI_3_0_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('E', 'T', 'D', 'T')
689
693#define EFI_ACPI_3_0_HIGH_PRECISION_EVENT_TIMER_TABLE_SIGNATURE SIGNATURE_32('H', 'P', 'E', 'T')
694
698#define EFI_ACPI_3_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('M', 'C', 'F', 'G')
699
703#define EFI_ACPI_3_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'C', 'R')
704
708#define EFI_ACPI_3_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'M', 'I')
709
713#define EFI_ACPI_3_0_TRUSTED_COMPUTING_PLATFORM_ALLIANCE_CAPABILITIES_TABLE_SIGNATURE SIGNATURE_32('T', 'C', 'P', 'A')
714
718#define EFI_ACPI_3_0_WATCHDOG_RESOURCE_TABLE_SIGNATURE SIGNATURE_32('W', 'D', 'R', 'T')
719
723#define EFI_ACPI_3_0_WATCHDOG_ACTION_TABLE_SIGNATURE SIGNATURE_32('W', 'D', 'A', 'T')
724
728#define EFI_ACPI_3_0_WINDOWS_SPECIFIC_PROPERTIES_TABLE_SIGNATURE SIGNATURE_32('W', 'S', 'P', 'T')
729
733#define EFI_ACPI_3_0_ISCSI_BOOT_FIRMWARE_TABLE_SIGNATURE SIGNATURE_32('i', 'B', 'F', 'T')
734
735#pragma pack()
736
737#endif
PACKED struct @108 EFI_ACPI_EXTENDED_ADDRESS_SPACE_DESCRIPTOR