1 /** @file
2   ACPI 1.0b definitions from the ACPI Specification, revision 1.0b
3 
4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
5 Copyright (c) 2020, Arm Limited. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7 **/
8 
9 #ifndef _ACPI_1_0_H_
10 #define _ACPI_1_0_H_
11 
12 #include <IndustryStandard/AcpiAml.h>
13 
14 ///
15 /// Common table header, this prefaces all ACPI tables, including FACS, but
16 /// excluding the RSD PTR structure.
17 ///
18 typedef struct {
19   UINT32  Signature;
20   UINT32  Length;
21 } EFI_ACPI_COMMON_HEADER;
22 
23 #pragma pack(1)
24 ///
25 /// The common ACPI description table header.  This structure prefaces most ACPI tables.
26 ///
27 typedef struct {
28   UINT32  Signature;
29   UINT32  Length;
30   UINT8   Revision;
31   UINT8   Checksum;
32   UINT8   OemId[6];
33   UINT64  OemTableId;
34   UINT32  OemRevision;
35   UINT32  CreatorId;
36   UINT32  CreatorRevision;
37 } EFI_ACPI_DESCRIPTION_HEADER;
38 #pragma pack()
39 
40 //
41 // Define for Descriptor
42 //
43 #define ACPI_SMALL_ITEM_FLAG                   0x00
44 #define ACPI_LARGE_ITEM_FLAG                   0x01
45 
46 //
47 // Small Item Descriptor Name
48 //
49 #define ACPI_SMALL_IRQ_DESCRIPTOR_NAME                       0x04
50 #define ACPI_SMALL_DMA_DESCRIPTOR_NAME                       0x05
51 #define ACPI_SMALL_START_DEPENDENT_DESCRIPTOR_NAME           0x06
52 #define ACPI_SMALL_END_DEPENDENT_DESCRIPTOR_NAME             0x07
53 #define ACPI_SMALL_IO_PORT_DESCRIPTOR_NAME                   0x08
54 #define ACPI_SMALL_FIXED_IO_PORT_DESCRIPTOR_NAME             0x09
55 #define ACPI_SMALL_VENDOR_DEFINED_DESCRIPTOR_NAME            0x0E
56 #define ACPI_SMALL_END_TAG_DESCRIPTOR_NAME                   0x0F
57 
58 //
59 // Large Item Descriptor Name
60 //
61 #define ACPI_LARGE_24_BIT_MEMORY_RANGE_DESCRIPTOR_NAME       0x01
62 #define ACPI_LARGE_VENDOR_DEFINED_DESCRIPTOR_NAME            0x04
63 #define ACPI_LARGE_32_BIT_MEMORY_RANGE_DESCRIPTOR_NAME       0x05
64 #define ACPI_LARGE_32_BIT_FIXED_MEMORY_RANGE_DESCRIPTOR_NAME 0x06
65 #define ACPI_LARGE_DWORD_ADDRESS_SPACE_DESCRIPTOR_NAME       0x07
66 #define ACPI_LARGE_WORD_ADDRESS_SPACE_DESCRIPTOR_NAME        0x08
67 #define ACPI_LARGE_EXTENDED_IRQ_DESCRIPTOR_NAME              0x09
68 #define ACPI_LARGE_QWORD_ADDRESS_SPACE_DESCRIPTOR_NAME       0x0A
69 
70 //
71 // Small Item Descriptor Value
72 //
73 #define ACPI_IRQ_NOFLAG_DESCRIPTOR                0x22
74 #define ACPI_IRQ_DESCRIPTOR                       0x23
75 #define ACPI_DMA_DESCRIPTOR                       0x2A
76 #define ACPI_START_DEPENDENT_DESCRIPTOR           0x30
77 #define ACPI_START_DEPENDENT_EX_DESCRIPTOR        0x31
78 #define ACPI_END_DEPENDENT_DESCRIPTOR             0x38
79 #define ACPI_IO_PORT_DESCRIPTOR                   0x47
80 #define ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR    0x4B
81 #define ACPI_END_TAG_DESCRIPTOR                   0x79
82 
83 //
84 // Large Item Descriptor Value
85 //
86 #define ACPI_24_BIT_MEMORY_RANGE_DESCRIPTOR       0x81
87 #define ACPI_32_BIT_MEMORY_RANGE_DESCRIPTOR       0x85
88 #define ACPI_32_BIT_FIXED_MEMORY_RANGE_DESCRIPTOR 0x86
89 #define ACPI_DWORD_ADDRESS_SPACE_DESCRIPTOR       0x87
90 #define ACPI_WORD_ADDRESS_SPACE_DESCRIPTOR        0x88
91 #define ACPI_EXTENDED_INTERRUPT_DESCRIPTOR        0x89
92 #define ACPI_QWORD_ADDRESS_SPACE_DESCRIPTOR       0x8A
93 #define ACPI_ADDRESS_SPACE_DESCRIPTOR             0x8A
94 
95 //
96 // Resource Type
97 //
98 #define ACPI_ADDRESS_SPACE_TYPE_MEM   0x00
99 #define ACPI_ADDRESS_SPACE_TYPE_IO    0x01
100 #define ACPI_ADDRESS_SPACE_TYPE_BUS   0x02
101 
102 ///
103 /// Power Management Timer frequency is fixed at 3.579545MHz.
104 ///
105 #define ACPI_TIMER_FREQUENCY       3579545
106 
107 //
108 // Ensure proper structure formats
109 //
110 #pragma pack(1)
111 
112 ///
113 /// The common definition of QWORD, DWORD, and WORD
114 /// Address Space Descriptors.
115 ///
116 typedef PACKED struct {
117   UINT8   Desc;
118   UINT16  Len;
119   UINT8   ResType;
120   UINT8   GenFlag;
121   UINT8   SpecificFlag;
122   UINT64  AddrSpaceGranularity;
123   UINT64  AddrRangeMin;
124   UINT64  AddrRangeMax;
125   UINT64  AddrTranslationOffset;
126   UINT64  AddrLen;
127 } EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR;
128 
129 typedef PACKED union {
130   UINT8     Byte;
131   PACKED struct {
132     UINT8 Length : 3;
133     UINT8 Name : 4;
134     UINT8 Type : 1;
135   } Bits;
136 } ACPI_SMALL_RESOURCE_HEADER;
137 
138 typedef PACKED struct {
139   PACKED union {
140     UINT8 Byte;
141     PACKED struct {
142       UINT8 Name : 7;
143       UINT8 Type : 1;
144     }Bits;
145   } Header;
146   UINT16 Length;
147 } ACPI_LARGE_RESOURCE_HEADER;
148 
149 ///
150 /// IRQ Descriptor.
151 ///
152 typedef PACKED struct {
153   ACPI_SMALL_RESOURCE_HEADER   Header;
154   UINT16                       Mask;
155 } EFI_ACPI_IRQ_NOFLAG_DESCRIPTOR;
156 
157 ///
158 /// IRQ Descriptor.
159 ///
160 typedef PACKED struct {
161   ACPI_SMALL_RESOURCE_HEADER   Header;
162   UINT16                       Mask;
163   UINT8                        Information;
164 } EFI_ACPI_IRQ_DESCRIPTOR;
165 
166 ///
167 /// DMA Descriptor.
168 ///
169 typedef PACKED struct {
170   ACPI_SMALL_RESOURCE_HEADER   Header;
171   UINT8                        ChannelMask;
172   UINT8                        Information;
173 } EFI_ACPI_DMA_DESCRIPTOR;
174 
175 ///
176 /// I/O Port Descriptor
177 ///
178 typedef PACKED struct {
179   ACPI_SMALL_RESOURCE_HEADER   Header;
180   UINT8                        Information;
181   UINT16                       BaseAddressMin;
182   UINT16                       BaseAddressMax;
183   UINT8                        Alignment;
184   UINT8                        Length;
185 } EFI_ACPI_IO_PORT_DESCRIPTOR;
186 
187 ///
188 /// Fixed Location I/O Port Descriptor.
189 ///
190 typedef PACKED struct {
191   ACPI_SMALL_RESOURCE_HEADER   Header;
192   UINT16                       BaseAddress;
193   UINT8                        Length;
194 } EFI_ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR;
195 
196 ///
197 /// 24-Bit Memory Range Descriptor
198 ///
199 typedef PACKED struct {
200   ACPI_LARGE_RESOURCE_HEADER    Header;
201   UINT8                         Information;
202   UINT16                        BaseAddressMin;
203   UINT16                        BaseAddressMax;
204   UINT16                        Alignment;
205   UINT16                        Length;
206 } EFI_ACPI_24_BIT_MEMORY_RANGE_DESCRIPTOR;
207 
208 ///
209 /// 32-Bit Memory Range Descriptor
210 ///
211 typedef PACKED struct {
212   ACPI_LARGE_RESOURCE_HEADER    Header;
213   UINT8                         Information;
214   UINT32                        BaseAddressMin;
215   UINT32                        BaseAddressMax;
216   UINT32                        Alignment;
217   UINT32                        Length;
218 } EFI_ACPI_32_BIT_MEMORY_RANGE_DESCRIPTOR;
219 
220 ///
221 /// Fixed 32-Bit Fixed Memory Range Descriptor
222 ///
223 typedef PACKED struct {
224   ACPI_LARGE_RESOURCE_HEADER    Header;
225   UINT8                         Information;
226   UINT32                        BaseAddress;
227   UINT32                        Length;
228 } EFI_ACPI_32_BIT_FIXED_MEMORY_RANGE_DESCRIPTOR;
229 
230 ///
231 /// QWORD Address Space Descriptor
232 ///
233 typedef PACKED struct {
234   ACPI_LARGE_RESOURCE_HEADER    Header;
235   UINT8                         ResType;
236   UINT8                         GenFlag;
237   UINT8                         SpecificFlag;
238   UINT64                        AddrSpaceGranularity;
239   UINT64                        AddrRangeMin;
240   UINT64                        AddrRangeMax;
241   UINT64                        AddrTranslationOffset;
242   UINT64                        AddrLen;
243 } EFI_ACPI_QWORD_ADDRESS_SPACE_DESCRIPTOR;
244 
245 ///
246 /// DWORD Address Space Descriptor
247 ///
248 typedef PACKED struct {
249   ACPI_LARGE_RESOURCE_HEADER    Header;
250   UINT8                         ResType;
251   UINT8                         GenFlag;
252   UINT8                         SpecificFlag;
253   UINT32                        AddrSpaceGranularity;
254   UINT32                        AddrRangeMin;
255   UINT32                        AddrRangeMax;
256   UINT32                        AddrTranslationOffset;
257   UINT32                        AddrLen;
258 } EFI_ACPI_DWORD_ADDRESS_SPACE_DESCRIPTOR;
259 
260 ///
261 /// WORD Address Space Descriptor
262 ///
263 typedef PACKED struct {
264   ACPI_LARGE_RESOURCE_HEADER    Header;
265   UINT8                         ResType;
266   UINT8                         GenFlag;
267   UINT8                         SpecificFlag;
268   UINT16                        AddrSpaceGranularity;
269   UINT16                        AddrRangeMin;
270   UINT16                        AddrRangeMax;
271   UINT16                        AddrTranslationOffset;
272   UINT16                        AddrLen;
273 } EFI_ACPI_WORD_ADDRESS_SPACE_DESCRIPTOR;
274 
275 ///
276 /// Extended Interrupt Descriptor
277 ///
278 typedef PACKED struct {
279   ACPI_LARGE_RESOURCE_HEADER    Header;
280   UINT8                         InterruptVectorFlags;
281   UINT8                         InterruptTableLength;
282   UINT32                        InterruptNumber[1];
283 } EFI_ACPI_EXTENDED_INTERRUPT_DESCRIPTOR;
284 
285 #pragma pack()
286 
287 ///
288 /// The End tag identifies an end of resource data.
289 ///
290 typedef struct {
291   UINT8 Desc;
292   UINT8 Checksum;
293 } EFI_ACPI_END_TAG_DESCRIPTOR;
294 
295 //
296 // General use definitions
297 //
298 #define EFI_ACPI_RESERVED_BYTE  0x00
299 #define EFI_ACPI_RESERVED_WORD  0x0000
300 #define EFI_ACPI_RESERVED_DWORD 0x00000000
301 #define EFI_ACPI_RESERVED_QWORD 0x0000000000000000
302 
303 //
304 // Resource Type Specific Flags
305 // Ref ACPI specification 6.4.3.5.5
306 //
307 // Bit [0]    : Write Status, _RW
308 //
309 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_WRITE                (1 << 0)
310 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_ONLY                 (0 << 0)
311 //
312 // Bit [2:1]  : Memory Attributes, _MEM
313 //
314 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_NON_CACHEABLE             (0 << 1)
315 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE                 (1 << 1)
316 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_WRITE_COMBINING (2 << 1)
317 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE    (3 << 1)
318 //
319 // Bit [4:3]  : Memory Attributes, _MTP
320 //
321 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_MEMORY      (0 << 3)
322 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_RESERVED    (1 << 3)
323 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_ACPI        (2 << 3)
324 #define EFI_APCI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_NVS         (3 << 3)
325 //
326 // Bit [5]    : Memory to I/O Translation, _TTP
327 //
328 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_TRANSLATION          (1 << 5)
329 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_STATIC               (0 << 5)
330 
331 //
332 // IRQ Information
333 // Ref ACPI specification 6.4.2.1
334 //
335 #define EFI_ACPI_IRQ_SHARABLE_MASK                      0x10
336 #define   EFI_ACPI_IRQ_SHARABLE                         0x10
337 
338 #define EFI_ACPI_IRQ_POLARITY_MASK                      0x08
339 #define   EFI_ACPI_IRQ_HIGH_TRUE                        0x00
340 #define   EFI_ACPI_IRQ_LOW_FALSE                        0x08
341 
342 #define EFI_ACPI_IRQ_MODE                               0x01
343 #define   EFI_ACPI_IRQ_LEVEL_TRIGGERED                  0x00
344 #define   EFI_ACPI_IRQ_EDGE_TRIGGERED                   0x01
345 
346 //
347 // DMA Information
348 // Ref ACPI specification 6.4.2.2
349 //
350 #define EFI_ACPI_DMA_SPEED_TYPE_MASK                    0x60
351 #define   EFI_ACPI_DMA_SPEED_TYPE_COMPATIBILITY         0x00
352 #define   EFI_ACPI_DMA_SPEED_TYPE_A                     0x20
353 #define   EFI_ACPI_DMA_SPEED_TYPE_B                     0x40
354 #define   EFI_ACPI_DMA_SPEED_TYPE_F                     0x60
355 
356 #define EFI_ACPI_DMA_BUS_MASTER_MASK                    0x04
357 #define   EFI_ACPI_DMA_BUS_MASTER                       0x04
358 
359 #define EFI_ACPI_DMA_TRANSFER_TYPE_MASK                 0x03
360 #define   EFI_ACPI_DMA_TRANSFER_TYPE_8_BIT              0x00
361 #define   EFI_ACPI_DMA_TRANSFER_TYPE_8_BIT_AND_16_BIT   0x01
362 #define   EFI_ACPI_DMA_TRANSFER_TYPE_16_BIT             0x02
363 
364 //
365 // IO Information
366 // Ref ACPI specification 6.4.2.5
367 //
368 #define EFI_ACPI_IO_DECODE_MASK                         0x01
369 #define   EFI_ACPI_IO_DECODE_16_BIT                     0x01
370 #define   EFI_ACPI_IO_DECODE_10_BIT                     0x00
371 
372 //
373 // Memory Information
374 // Ref ACPI specification 6.4.3.4
375 //
376 #define EFI_ACPI_MEMORY_WRITE_STATUS_MASK               0x01
377 #define   EFI_ACPI_MEMORY_WRITABLE                      0x01
378 #define   EFI_ACPI_MEMORY_NON_WRITABLE                  0x00
379 
380 //
381 // Interrupt Vector Flags definitions for Extended Interrupt Descriptor
382 // Ref ACPI specification 6.4.3.6
383 //
384 #define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_PRODUCER_CONSUMER_MASK   BIT0
385 #define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_MODE_MASK                BIT1
386 #define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_POLARITY_MASK            BIT2
387 #define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_SHARABLE_MASK            BIT3
388 #define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_WAKE_CAPABLITY_MASK      BIT4
389 
390 //
391 // Ensure proper structure formats
392 //
393 #pragma pack(1)
394 //
395 // ACPI 1.0b table structures
396 //
397 
398 ///
399 /// Root System Description Pointer Structure.
400 ///
401 typedef struct {
402   UINT64  Signature;
403   UINT8   Checksum;
404   UINT8   OemId[6];
405   UINT8   Reserved;
406   UINT32  RsdtAddress;
407 } EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
408 
409 //
410 // Root System Description Table
411 // No definition needed as it is a common description table header, the same with
412 // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
413 //
414 
415 ///
416 /// RSDT Revision (as defined in ACPI 1.0b specification).
417 ///
418 #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
419 
420 ///
421 /// Fixed ACPI Description Table Structure (FADT).
422 ///
423 typedef struct {
424   EFI_ACPI_DESCRIPTION_HEADER Header;
425   UINT32                      FirmwareCtrl;
426   UINT32                      Dsdt;
427   UINT8                       IntModel;
428   UINT8                       Reserved1;
429   UINT16                      SciInt;
430   UINT32                      SmiCmd;
431   UINT8                       AcpiEnable;
432   UINT8                       AcpiDisable;
433   UINT8                       S4BiosReq;
434   UINT8                       Reserved2;
435   UINT32                      Pm1aEvtBlk;
436   UINT32                      Pm1bEvtBlk;
437   UINT32                      Pm1aCntBlk;
438   UINT32                      Pm1bCntBlk;
439   UINT32                      Pm2CntBlk;
440   UINT32                      PmTmrBlk;
441   UINT32                      Gpe0Blk;
442   UINT32                      Gpe1Blk;
443   UINT8                       Pm1EvtLen;
444   UINT8                       Pm1CntLen;
445   UINT8                       Pm2CntLen;
446   UINT8                       PmTmLen;
447   UINT8                       Gpe0BlkLen;
448   UINT8                       Gpe1BlkLen;
449   UINT8                       Gpe1Base;
450   UINT8                       Reserved3;
451   UINT16                      PLvl2Lat;
452   UINT16                      PLvl3Lat;
453   UINT16                      FlushSize;
454   UINT16                      FlushStride;
455   UINT8                       DutyOffset;
456   UINT8                       DutyWidth;
457   UINT8                       DayAlrm;
458   UINT8                       MonAlrm;
459   UINT8                       Century;
460   UINT8                       Reserved4;
461   UINT8                       Reserved5;
462   UINT8                       Reserved6;
463   UINT32                      Flags;
464 } EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE;
465 
466 ///
467 /// FADT Version (as defined in ACPI 1.0b specification).
468 ///
469 #define EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION  0x01
470 
471 #define EFI_ACPI_1_0_INT_MODE_DUAL_PIC         0
472 #define EFI_ACPI_1_0_INT_MODE_MULTIPLE_APIC    1
473 
474 //
475 // Fixed ACPI Description Table Fixed Feature Flags
476 // All other bits are reserved and must be set to 0.
477 //
478 #define EFI_ACPI_1_0_WBINVD               BIT0
479 #define EFI_ACPI_1_0_WBINVD_FLUSH         BIT1
480 #define EFI_ACPI_1_0_PROC_C1              BIT2
481 #define EFI_ACPI_1_0_P_LVL2_UP            BIT3
482 #define EFI_ACPI_1_0_PWR_BUTTON           BIT4
483 #define EFI_ACPI_1_0_SLP_BUTTON           BIT5
484 #define EFI_ACPI_1_0_FIX_RTC              BIT6
485 #define EFI_ACPI_1_0_RTC_S4               BIT7
486 #define EFI_ACPI_1_0_TMR_VAL_EXT          BIT8
487 #define EFI_ACPI_1_0_DCK_CAP              BIT9
488 
489 ///
490 /// Firmware ACPI Control Structure.
491 ///
492 typedef struct {
493   UINT32  Signature;
494   UINT32  Length;
495   UINT32  HardwareSignature;
496   UINT32  FirmwareWakingVector;
497   UINT32  GlobalLock;
498   UINT32  Flags;
499   UINT8   Reserved[40];
500 } EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE;
501 
502 ///
503 /// Firmware Control Structure Feature Flags.
504 /// All other bits are reserved and must be set to 0.
505 ///
506 #define EFI_ACPI_1_0_S4BIOS_F             BIT0
507 
508 ///
509 /// Multiple APIC Description Table header definition.  The rest of the table
510 /// must be defined in a platform-specific manner.
511 ///
512 typedef struct {
513   EFI_ACPI_DESCRIPTION_HEADER Header;
514   UINT32                      LocalApicAddress;
515   UINT32                      Flags;
516 } EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
517 
518 ///
519 /// MADT Revision (as defined in ACPI 1.0b specification).
520 ///
521 #define EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01
522 
523 ///
524 /// Multiple APIC Flags
525 /// All other bits are reserved and must be set to 0.
526 ///
527 #define EFI_ACPI_1_0_PCAT_COMPAT           BIT0
528 
529 //
530 // Multiple APIC Description Table APIC structure types
531 // All other values between 0x05 an 0xFF are reserved and
532 // will be ignored by OSPM.
533 //
534 #define EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC           0x00
535 #define EFI_ACPI_1_0_IO_APIC                        0x01
536 #define EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE      0x02
537 #define EFI_ACPI_1_0_NON_MASKABLE_INTERRUPT_SOURCE  0x03
538 #define EFI_ACPI_1_0_LOCAL_APIC_NMI                 0x04
539 
540 //
541 // APIC Structure Definitions
542 //
543 
544 ///
545 /// Processor Local APIC Structure Definition.
546 ///
547 typedef struct {
548   UINT8   Type;
549   UINT8   Length;
550   UINT8   AcpiProcessorId;
551   UINT8   ApicId;
552   UINT32  Flags;
553 } EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC_STRUCTURE;
554 
555 ///
556 /// Local APIC Flags.  All other bits are reserved and must be 0.
557 ///
558 #define EFI_ACPI_1_0_LOCAL_APIC_ENABLED      BIT0
559 
560 ///
561 /// IO APIC Structure.
562 ///
563 typedef struct {
564   UINT8   Type;
565   UINT8   Length;
566   UINT8   IoApicId;
567   UINT8   Reserved;
568   UINT32  IoApicAddress;
569   UINT32  SystemVectorBase;
570 } EFI_ACPI_1_0_IO_APIC_STRUCTURE;
571 
572 ///
573 /// Interrupt Source Override Structure.
574 ///
575 typedef struct {
576   UINT8   Type;
577   UINT8   Length;
578   UINT8   Bus;
579   UINT8   Source;
580   UINT32  GlobalSystemInterruptVector;
581   UINT16  Flags;
582 } EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
583 
584 ///
585 /// Non-Maskable Interrupt Source Structure.
586 ///
587 typedef struct {
588   UINT8   Type;
589   UINT8   Length;
590   UINT16  Flags;
591   UINT32  GlobalSystemInterruptVector;
592 } EFI_ACPI_1_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
593 
594 ///
595 /// Local APIC NMI Structure.
596 ///
597 typedef struct {
598   UINT8   Type;
599   UINT8   Length;
600   UINT8   AcpiProcessorId;
601   UINT16  Flags;
602   UINT8   LocalApicInti;
603 } EFI_ACPI_1_0_LOCAL_APIC_NMI_STRUCTURE;
604 
605 ///
606 /// Smart Battery Description Table (SBST)
607 ///
608 typedef struct {
609   EFI_ACPI_DESCRIPTION_HEADER Header;
610   UINT32                      WarningEnergyLevel;
611   UINT32                      LowEnergyLevel;
612   UINT32                      CriticalEnergyLevel;
613 } EFI_ACPI_1_0_SMART_BATTERY_DESCRIPTION_TABLE;
614 
615 //
616 // Known table signatures
617 //
618 
619 ///
620 /// "RSD PTR " Root System Description Pointer.
621 ///
622 #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE  SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
623 
624 ///
625 /// "APIC" Multiple APIC Description Table.
626 ///
627 #define EFI_ACPI_1_0_APIC_SIGNATURE  SIGNATURE_32('A', 'P', 'I', 'C')
628 
629 ///
630 /// "DSDT" Differentiated System Description Table.
631 ///
632 #define EFI_ACPI_1_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('D', 'S', 'D', 'T')
633 
634 ///
635 /// "FACS" Firmware ACPI Control Structure.
636 ///
637 #define EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE  SIGNATURE_32('F', 'A', 'C', 'S')
638 
639 ///
640 /// "FACP" Fixed ACPI Description Table.
641 ///
642 #define EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('F', 'A', 'C', 'P')
643 
644 ///
645 /// "PSDT" Persistent System Description Table.
646 ///
647 #define EFI_ACPI_1_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('P', 'S', 'D', 'T')
648 
649 ///
650 /// "RSDT" Root System Description Table.
651 ///
652 #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('R', 'S', 'D', 'T')
653 
654 ///
655 /// "SBST" Smart Battery Specification Table.
656 ///
657 #define EFI_ACPI_1_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE  SIGNATURE_32('S', 'B', 'S', 'T')
658 
659 ///
660 /// "SSDT" Secondary System Description Table.
661 ///
662 #define EFI_ACPI_1_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('S', 'S', 'D', 'T')
663 
664 #pragma pack()
665 
666 #endif
667