actbl2.h revision 1.1.1.11 1 /******************************************************************************
2 *
3 * Name: actbl2.h - ACPI Table Definitions (tables not in ACPI spec)
4 *
5 *****************************************************************************/
6
7 /*
8 * Copyright (C) 2000 - 2017, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44 #ifndef __ACTBL2_H__
45 #define __ACTBL2_H__
46
47
48 /*******************************************************************************
49 *
50 * Additional ACPI Tables (2)
51 *
52 * These tables are not consumed directly by the ACPICA subsystem, but are
53 * included here to support device drivers and the AML disassembler.
54 *
55 * Generally, the tables in this file are defined by third-party specifications,
56 * and are not defined directly by the ACPI specification itself.
57 *
58 ******************************************************************************/
59
60
61 /*
62 * Values for description table header signatures for tables defined in this
63 * file. Useful because they make it more difficult to inadvertently type in
64 * the wrong signature.
65 */
66 #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */
67 #define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */
68 #define ACPI_SIG_CSRT "CSRT" /* Core System Resource Table */
69 #define ACPI_SIG_DBG2 "DBG2" /* Debug Port table type 2 */
70 #define ACPI_SIG_DBGP "DBGP" /* Debug Port table */
71 #define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */
72 #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */
73 #define ACPI_SIG_IBFT "IBFT" /* iSCSI Boot Firmware Table */
74 #define ACPI_SIG_IORT "IORT" /* IO Remapping Table */
75 #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */
76 #define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */
77 #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
78 #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */
79 #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
80 #define ACPI_SIG_MTMR "MTMR" /* MID Timer table */
81 #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */
82 #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
83 #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */
84 #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */
85 #define ACPI_SIG_TPM2 "TPM2" /* Trusted Platform Module 2.0 H/W interface table */
86 #define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */
87 #define ACPI_SIG_VRTC "VRTC" /* Virtual Real Time Clock Table */
88 #define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */
89 #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */
90 #define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */
91 #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */
92 #define ACPI_SIG_XXXX "XXXX" /* Intermediate AML header for ASL/ASL+ converter */
93
94 #ifdef ACPI_UNDEFINED_TABLES
95 /*
96 * These tables have been seen in the field, but no definition has been found
97 */
98 #define ACPI_SIG_ATKG "ATKG"
99 #define ACPI_SIG_GSCI "GSCI" /* GMCH SCI table */
100 #define ACPI_SIG_IEIT "IEIT"
101 #endif
102
103 /*
104 * All tables must be byte-packed to match the ACPI specification, since
105 * the tables are provided by the system BIOS.
106 */
107 #pragma pack(1)
108
109 /*
110 * Note: C bitfields are not used for this reason:
111 *
112 * "Bitfields are great and easy to read, but unfortunately the C language
113 * does not specify the layout of bitfields in memory, which means they are
114 * essentially useless for dealing with packed data in on-disk formats or
115 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
116 * this decision was a design error in C. Ritchie could have picked an order
117 * and stuck with it." Norman Ramsey.
118 * See http://stackoverflow.com/a/1053662/41661
119 */
120
121
122 /*******************************************************************************
123 *
124 * ASF - Alert Standard Format table (Signature "ASF!")
125 * Revision 0x10
126 *
127 * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
128 *
129 ******************************************************************************/
130
131 typedef struct acpi_table_asf
132 {
133 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
134
135 } ACPI_TABLE_ASF;
136
137
138 /* ASF subtable header */
139
140 typedef struct acpi_asf_header
141 {
142 UINT8 Type;
143 UINT8 Reserved;
144 UINT16 Length;
145
146 } ACPI_ASF_HEADER;
147
148
149 /* Values for Type field above */
150
151 enum AcpiAsfType
152 {
153 ACPI_ASF_TYPE_INFO = 0,
154 ACPI_ASF_TYPE_ALERT = 1,
155 ACPI_ASF_TYPE_CONTROL = 2,
156 ACPI_ASF_TYPE_BOOT = 3,
157 ACPI_ASF_TYPE_ADDRESS = 4,
158 ACPI_ASF_TYPE_RESERVED = 5
159 };
160
161 /*
162 * ASF subtables
163 */
164
165 /* 0: ASF Information */
166
167 typedef struct acpi_asf_info
168 {
169 ACPI_ASF_HEADER Header;
170 UINT8 MinResetValue;
171 UINT8 MinPollInterval;
172 UINT16 SystemId;
173 UINT32 MfgId;
174 UINT8 Flags;
175 UINT8 Reserved2[3];
176
177 } ACPI_ASF_INFO;
178
179 /* Masks for Flags field above */
180
181 #define ACPI_ASF_SMBUS_PROTOCOLS (1)
182
183
184 /* 1: ASF Alerts */
185
186 typedef struct acpi_asf_alert
187 {
188 ACPI_ASF_HEADER Header;
189 UINT8 AssertMask;
190 UINT8 DeassertMask;
191 UINT8 Alerts;
192 UINT8 DataLength;
193
194 } ACPI_ASF_ALERT;
195
196 typedef struct acpi_asf_alert_data
197 {
198 UINT8 Address;
199 UINT8 Command;
200 UINT8 Mask;
201 UINT8 Value;
202 UINT8 SensorType;
203 UINT8 Type;
204 UINT8 Offset;
205 UINT8 SourceType;
206 UINT8 Severity;
207 UINT8 SensorNumber;
208 UINT8 Entity;
209 UINT8 Instance;
210
211 } ACPI_ASF_ALERT_DATA;
212
213
214 /* 2: ASF Remote Control */
215
216 typedef struct acpi_asf_remote
217 {
218 ACPI_ASF_HEADER Header;
219 UINT8 Controls;
220 UINT8 DataLength;
221 UINT16 Reserved2;
222
223 } ACPI_ASF_REMOTE;
224
225 typedef struct acpi_asf_control_data
226 {
227 UINT8 Function;
228 UINT8 Address;
229 UINT8 Command;
230 UINT8 Value;
231
232 } ACPI_ASF_CONTROL_DATA;
233
234
235 /* 3: ASF RMCP Boot Options */
236
237 typedef struct acpi_asf_rmcp
238 {
239 ACPI_ASF_HEADER Header;
240 UINT8 Capabilities[7];
241 UINT8 CompletionCode;
242 UINT32 EnterpriseId;
243 UINT8 Command;
244 UINT16 Parameter;
245 UINT16 BootOptions;
246 UINT16 OemParameters;
247
248 } ACPI_ASF_RMCP;
249
250
251 /* 4: ASF Address */
252
253 typedef struct acpi_asf_address
254 {
255 ACPI_ASF_HEADER Header;
256 UINT8 EpromAddress;
257 UINT8 Devices;
258
259 } ACPI_ASF_ADDRESS;
260
261
262 /*******************************************************************************
263 *
264 * BOOT - Simple Boot Flag Table
265 * Version 1
266 *
267 * Conforms to the "Simple Boot Flag Specification", Version 2.1
268 *
269 ******************************************************************************/
270
271 typedef struct acpi_table_boot
272 {
273 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
274 UINT8 CmosIndex; /* Index in CMOS RAM for the boot register */
275 UINT8 Reserved[3];
276
277 } ACPI_TABLE_BOOT;
278
279
280 /*******************************************************************************
281 *
282 * CSRT - Core System Resource Table
283 * Version 0
284 *
285 * Conforms to the "Core System Resource Table (CSRT)", November 14, 2011
286 *
287 ******************************************************************************/
288
289 typedef struct acpi_table_csrt
290 {
291 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
292
293 } ACPI_TABLE_CSRT;
294
295
296 /* Resource Group subtable */
297
298 typedef struct acpi_csrt_group
299 {
300 UINT32 Length;
301 UINT32 VendorId;
302 UINT32 SubvendorId;
303 UINT16 DeviceId;
304 UINT16 SubdeviceId;
305 UINT16 Revision;
306 UINT16 Reserved;
307 UINT32 SharedInfoLength;
308
309 /* Shared data immediately follows (Length = SharedInfoLength) */
310
311 } ACPI_CSRT_GROUP;
312
313 /* Shared Info subtable */
314
315 typedef struct acpi_csrt_shared_info
316 {
317 UINT16 MajorVersion;
318 UINT16 MinorVersion;
319 UINT32 MmioBaseLow;
320 UINT32 MmioBaseHigh;
321 UINT32 GsiInterrupt;
322 UINT8 InterruptPolarity;
323 UINT8 InterruptMode;
324 UINT8 NumChannels;
325 UINT8 DmaAddressWidth;
326 UINT16 BaseRequestLine;
327 UINT16 NumHandshakeSignals;
328 UINT32 MaxBlockSize;
329
330 /* Resource descriptors immediately follow (Length = Group Length - SharedInfoLength) */
331
332 } ACPI_CSRT_SHARED_INFO;
333
334 /* Resource Descriptor subtable */
335
336 typedef struct acpi_csrt_descriptor
337 {
338 UINT32 Length;
339 UINT16 Type;
340 UINT16 Subtype;
341 UINT32 Uid;
342
343 /* Resource-specific information immediately follows */
344
345 } ACPI_CSRT_DESCRIPTOR;
346
347
348 /* Resource Types */
349
350 #define ACPI_CSRT_TYPE_INTERRUPT 0x0001
351 #define ACPI_CSRT_TYPE_TIMER 0x0002
352 #define ACPI_CSRT_TYPE_DMA 0x0003
353
354 /* Resource Subtypes */
355
356 #define ACPI_CSRT_XRUPT_LINE 0x0000
357 #define ACPI_CSRT_XRUPT_CONTROLLER 0x0001
358 #define ACPI_CSRT_TIMER 0x0000
359 #define ACPI_CSRT_DMA_CHANNEL 0x0000
360 #define ACPI_CSRT_DMA_CONTROLLER 0x0001
361
362
363 /*******************************************************************************
364 *
365 * DBG2 - Debug Port Table 2
366 * Version 0 (Both main table and subtables)
367 *
368 * Conforms to "Microsoft Debug Port Table 2 (DBG2)", December 10, 2015
369 *
370 ******************************************************************************/
371
372 typedef struct acpi_table_dbg2
373 {
374 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
375 UINT32 InfoOffset;
376 UINT32 InfoCount;
377
378 } ACPI_TABLE_DBG2;
379
380
381 typedef struct acpi_dbg2_header
382 {
383 UINT32 InfoOffset;
384 UINT32 InfoCount;
385
386 } ACPI_DBG2_HEADER;
387
388
389 /* Debug Device Information Subtable */
390
391 typedef struct acpi_dbg2_device
392 {
393 UINT8 Revision;
394 UINT16 Length;
395 UINT8 RegisterCount; /* Number of BaseAddress registers */
396 UINT16 NamepathLength;
397 UINT16 NamepathOffset;
398 UINT16 OemDataLength;
399 UINT16 OemDataOffset;
400 UINT16 PortType;
401 UINT16 PortSubtype;
402 UINT16 Reserved;
403 UINT16 BaseAddressOffset;
404 UINT16 AddressSizeOffset;
405 /*
406 * Data that follows:
407 * BaseAddress (required) - Each in 12-byte Generic Address Structure format.
408 * AddressSize (required) - Array of UINT32 sizes corresponding to each BaseAddress register.
409 * Namepath (required) - Null terminated string. Single dot if not supported.
410 * OemData (optional) - Length is OemDataLength.
411 */
412 } ACPI_DBG2_DEVICE;
413
414 /* Types for PortType field above */
415
416 #define ACPI_DBG2_SERIAL_PORT 0x8000
417 #define ACPI_DBG2_1394_PORT 0x8001
418 #define ACPI_DBG2_USB_PORT 0x8002
419 #define ACPI_DBG2_NET_PORT 0x8003
420
421 /* Subtypes for PortSubtype field above */
422
423 #define ACPI_DBG2_16550_COMPATIBLE 0x0000
424 #define ACPI_DBG2_16550_SUBSET 0x0001
425 #define ACPI_DBG2_ARM_PL011 0x0003
426 #define ACPI_DBG2_ARM_SBSA_32BIT 0x000D
427 #define ACPI_DBG2_ARM_SBSA_GENERIC 0x000E
428 #define ACPI_DBG2_ARM_DCC 0x000F
429 #define ACPI_DBG2_BCM2835 0x0010
430
431 #define ACPI_DBG2_1394_STANDARD 0x0000
432
433 #define ACPI_DBG2_USB_XHCI 0x0000
434 #define ACPI_DBG2_USB_EHCI 0x0001
435
436
437 /*******************************************************************************
438 *
439 * DBGP - Debug Port table
440 * Version 1
441 *
442 * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000
443 *
444 ******************************************************************************/
445
446 typedef struct acpi_table_dbgp
447 {
448 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
449 UINT8 Type; /* 0=full 16550, 1=subset of 16550 */
450 UINT8 Reserved[3];
451 ACPI_GENERIC_ADDRESS DebugPort;
452
453 } ACPI_TABLE_DBGP;
454
455
456 /*******************************************************************************
457 *
458 * DMAR - DMA Remapping table
459 * Version 1
460 *
461 * Conforms to "Intel Virtualization Technology for Directed I/O",
462 * Version 2.3, October 2014
463 *
464 ******************************************************************************/
465
466 typedef struct acpi_table_dmar
467 {
468 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
469 UINT8 Width; /* Host Address Width */
470 UINT8 Flags;
471 UINT8 Reserved[10];
472
473 } ACPI_TABLE_DMAR;
474
475 /* Masks for Flags field above */
476
477 #define ACPI_DMAR_INTR_REMAP (1)
478 #define ACPI_DMAR_X2APIC_OPT_OUT (1<<1)
479 #define ACPI_DMAR_X2APIC_MODE (1<<2)
480
481
482 /* DMAR subtable header */
483
484 typedef struct acpi_dmar_header
485 {
486 UINT16 Type;
487 UINT16 Length;
488
489 } ACPI_DMAR_HEADER;
490
491 /* Values for subtable type in ACPI_DMAR_HEADER */
492
493 enum AcpiDmarType
494 {
495 ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
496 ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
497 ACPI_DMAR_TYPE_ROOT_ATS = 2,
498 ACPI_DMAR_TYPE_HARDWARE_AFFINITY = 3,
499 ACPI_DMAR_TYPE_NAMESPACE = 4,
500 ACPI_DMAR_TYPE_RESERVED = 5 /* 5 and greater are reserved */
501 };
502
503
504 /* DMAR Device Scope structure */
505
506 typedef struct acpi_dmar_device_scope
507 {
508 UINT8 EntryType;
509 UINT8 Length;
510 UINT16 Reserved;
511 UINT8 EnumerationId;
512 UINT8 Bus;
513
514 } ACPI_DMAR_DEVICE_SCOPE;
515
516 /* Values for EntryType in ACPI_DMAR_DEVICE_SCOPE - device types */
517
518 enum AcpiDmarScopeType
519 {
520 ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
521 ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
522 ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
523 ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
524 ACPI_DMAR_SCOPE_TYPE_HPET = 4,
525 ACPI_DMAR_SCOPE_TYPE_NAMESPACE = 5,
526 ACPI_DMAR_SCOPE_TYPE_RESERVED = 6 /* 6 and greater are reserved */
527 };
528
529 typedef struct acpi_dmar_pci_path
530 {
531 UINT8 Device;
532 UINT8 Function;
533
534 } ACPI_DMAR_PCI_PATH;
535
536
537 /*
538 * DMAR Subtables, correspond to Type in ACPI_DMAR_HEADER
539 */
540
541 /* 0: Hardware Unit Definition */
542
543 typedef struct acpi_dmar_hardware_unit
544 {
545 ACPI_DMAR_HEADER Header;
546 UINT8 Flags;
547 UINT8 Reserved;
548 UINT16 Segment;
549 UINT64 Address; /* Register Base Address */
550
551 } ACPI_DMAR_HARDWARE_UNIT;
552
553 /* Masks for Flags field above */
554
555 #define ACPI_DMAR_INCLUDE_ALL (1)
556
557
558 /* 1: Reserved Memory Defininition */
559
560 typedef struct acpi_dmar_reserved_memory
561 {
562 ACPI_DMAR_HEADER Header;
563 UINT16 Reserved;
564 UINT16 Segment;
565 UINT64 BaseAddress; /* 4K aligned base address */
566 UINT64 EndAddress; /* 4K aligned limit address */
567
568 } ACPI_DMAR_RESERVED_MEMORY;
569
570 /* Masks for Flags field above */
571
572 #define ACPI_DMAR_ALLOW_ALL (1)
573
574
575 /* 2: Root Port ATS Capability Reporting Structure */
576
577 typedef struct acpi_dmar_atsr
578 {
579 ACPI_DMAR_HEADER Header;
580 UINT8 Flags;
581 UINT8 Reserved;
582 UINT16 Segment;
583
584 } ACPI_DMAR_ATSR;
585
586 /* Masks for Flags field above */
587
588 #define ACPI_DMAR_ALL_PORTS (1)
589
590
591 /* 3: Remapping Hardware Static Affinity Structure */
592
593 typedef struct acpi_dmar_rhsa
594 {
595 ACPI_DMAR_HEADER Header;
596 UINT32 Reserved;
597 UINT64 BaseAddress;
598 UINT32 ProximityDomain;
599
600 } ACPI_DMAR_RHSA;
601
602
603 /* 4: ACPI Namespace Device Declaration Structure */
604
605 typedef struct acpi_dmar_andd
606 {
607 ACPI_DMAR_HEADER Header;
608 UINT8 Reserved[3];
609 UINT8 DeviceNumber;
610 char DeviceName[1];
611
612 } ACPI_DMAR_ANDD;
613
614
615 /*******************************************************************************
616 *
617 * HPET - High Precision Event Timer table
618 * Version 1
619 *
620 * Conforms to "IA-PC HPET (High Precision Event Timers) Specification",
621 * Version 1.0a, October 2004
622 *
623 ******************************************************************************/
624
625 typedef struct acpi_table_hpet
626 {
627 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
628 UINT32 Id; /* Hardware ID of event timer block */
629 ACPI_GENERIC_ADDRESS Address; /* Address of event timer block */
630 UINT8 Sequence; /* HPET sequence number */
631 UINT16 MinimumTick; /* Main counter min tick, periodic mode */
632 UINT8 Flags;
633
634 } ACPI_TABLE_HPET;
635
636 /* Masks for Flags field above */
637
638 #define ACPI_HPET_PAGE_PROTECT_MASK (3)
639
640 /* Values for Page Protect flags */
641
642 enum AcpiHpetPageProtect
643 {
644 ACPI_HPET_NO_PAGE_PROTECT = 0,
645 ACPI_HPET_PAGE_PROTECT4 = 1,
646 ACPI_HPET_PAGE_PROTECT64 = 2
647 };
648
649
650 /*******************************************************************************
651 *
652 * IBFT - Boot Firmware Table
653 * Version 1
654 *
655 * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b
656 * Specification", Version 1.01, March 1, 2007
657 *
658 * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
659 * Therefore, it is not currently supported by the disassembler.
660 *
661 ******************************************************************************/
662
663 typedef struct acpi_table_ibft
664 {
665 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
666 UINT8 Reserved[12];
667
668 } ACPI_TABLE_IBFT;
669
670
671 /* IBFT common subtable header */
672
673 typedef struct acpi_ibft_header
674 {
675 UINT8 Type;
676 UINT8 Version;
677 UINT16 Length;
678 UINT8 Index;
679 UINT8 Flags;
680
681 } ACPI_IBFT_HEADER;
682
683 /* Values for Type field above */
684
685 enum AcpiIbftType
686 {
687 ACPI_IBFT_TYPE_NOT_USED = 0,
688 ACPI_IBFT_TYPE_CONTROL = 1,
689 ACPI_IBFT_TYPE_INITIATOR = 2,
690 ACPI_IBFT_TYPE_NIC = 3,
691 ACPI_IBFT_TYPE_TARGET = 4,
692 ACPI_IBFT_TYPE_EXTENSIONS = 5,
693 ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */
694 };
695
696
697 /* IBFT subtables */
698
699 typedef struct acpi_ibft_control
700 {
701 ACPI_IBFT_HEADER Header;
702 UINT16 Extensions;
703 UINT16 InitiatorOffset;
704 UINT16 Nic0Offset;
705 UINT16 Target0Offset;
706 UINT16 Nic1Offset;
707 UINT16 Target1Offset;
708
709 } ACPI_IBFT_CONTROL;
710
711 typedef struct acpi_ibft_initiator
712 {
713 ACPI_IBFT_HEADER Header;
714 UINT8 SnsServer[16];
715 UINT8 SlpServer[16];
716 UINT8 PrimaryServer[16];
717 UINT8 SecondaryServer[16];
718 UINT16 NameLength;
719 UINT16 NameOffset;
720
721 } ACPI_IBFT_INITIATOR;
722
723 typedef struct acpi_ibft_nic
724 {
725 ACPI_IBFT_HEADER Header;
726 UINT8 IpAddress[16];
727 UINT8 SubnetMaskPrefix;
728 UINT8 Origin;
729 UINT8 Gateway[16];
730 UINT8 PrimaryDns[16];
731 UINT8 SecondaryDns[16];
732 UINT8 Dhcp[16];
733 UINT16 Vlan;
734 UINT8 MacAddress[6];
735 UINT16 PciAddress;
736 UINT16 NameLength;
737 UINT16 NameOffset;
738
739 } ACPI_IBFT_NIC;
740
741 typedef struct acpi_ibft_target
742 {
743 ACPI_IBFT_HEADER Header;
744 UINT8 TargetIpAddress[16];
745 UINT16 TargetIpSocket;
746 UINT8 TargetBootLun[8];
747 UINT8 ChapType;
748 UINT8 NicAssociation;
749 UINT16 TargetNameLength;
750 UINT16 TargetNameOffset;
751 UINT16 ChapNameLength;
752 UINT16 ChapNameOffset;
753 UINT16 ChapSecretLength;
754 UINT16 ChapSecretOffset;
755 UINT16 ReverseChapNameLength;
756 UINT16 ReverseChapNameOffset;
757 UINT16 ReverseChapSecretLength;
758 UINT16 ReverseChapSecretOffset;
759
760 } ACPI_IBFT_TARGET;
761
762
763 /*******************************************************************************
764 *
765 * IORT - IO Remapping Table
766 *
767 * Conforms to "IO Remapping Table System Software on ARM Platforms",
768 * Document number: ARM DEN 0049B, October 2015
769 *
770 ******************************************************************************/
771
772 typedef struct acpi_table_iort
773 {
774 ACPI_TABLE_HEADER Header;
775 UINT32 NodeCount;
776 UINT32 NodeOffset;
777 UINT32 Reserved;
778
779 } ACPI_TABLE_IORT;
780
781
782 /*
783 * IORT subtables
784 */
785 typedef struct acpi_iort_node
786 {
787 UINT8 Type;
788 UINT16 Length;
789 UINT8 Revision;
790 UINT32 Reserved;
791 UINT32 MappingCount;
792 UINT32 MappingOffset;
793 char NodeData[1];
794
795 } ACPI_IORT_NODE;
796
797 /* Values for subtable Type above */
798
799 enum AcpiIortNodeType
800 {
801 ACPI_IORT_NODE_ITS_GROUP = 0x00,
802 ACPI_IORT_NODE_NAMED_COMPONENT = 0x01,
803 ACPI_IORT_NODE_PCI_ROOT_COMPLEX = 0x02,
804 ACPI_IORT_NODE_SMMU = 0x03,
805 ACPI_IORT_NODE_SMMU_V3 = 0x04
806 };
807
808
809 typedef struct acpi_iort_id_mapping
810 {
811 UINT32 InputBase; /* Lowest value in input range */
812 UINT32 IdCount; /* Number of IDs */
813 UINT32 OutputBase; /* Lowest value in output range */
814 UINT32 OutputReference; /* A reference to the output node */
815 UINT32 Flags;
816
817 } ACPI_IORT_ID_MAPPING;
818
819 /* Masks for Flags field above for IORT subtable */
820
821 #define ACPI_IORT_ID_SINGLE_MAPPING (1)
822
823
824 typedef struct acpi_iort_memory_access
825 {
826 UINT32 CacheCoherency;
827 UINT8 Hints;
828 UINT16 Reserved;
829 UINT8 MemoryFlags;
830
831 } ACPI_IORT_MEMORY_ACCESS;
832
833 /* Values for CacheCoherency field above */
834
835 #define ACPI_IORT_NODE_COHERENT 0x00000001 /* The device node is fully coherent */
836 #define ACPI_IORT_NODE_NOT_COHERENT 0x00000000 /* The device node is not coherent */
837
838 /* Masks for Hints field above */
839
840 #define ACPI_IORT_HT_TRANSIENT (1)
841 #define ACPI_IORT_HT_WRITE (1<<1)
842 #define ACPI_IORT_HT_READ (1<<2)
843 #define ACPI_IORT_HT_OVERRIDE (1<<3)
844
845 /* Masks for MemoryFlags field above */
846
847 #define ACPI_IORT_MF_COHERENCY (1)
848 #define ACPI_IORT_MF_ATTRIBUTES (1<<1)
849
850
851 /*
852 * IORT node specific subtables
853 */
854 typedef struct acpi_iort_its_group
855 {
856 UINT32 ItsCount;
857 UINT32 Identifiers[1]; /* GIC ITS identifier arrary */
858
859 } ACPI_IORT_ITS_GROUP;
860
861
862 typedef struct acpi_iort_named_component
863 {
864 UINT32 NodeFlags;
865 UINT64 MemoryProperties; /* Memory access properties */
866 UINT8 MemoryAddressLimit; /* Memory address size limit */
867 char DeviceName[1]; /* Path of namespace object */
868
869 } ACPI_IORT_NAMED_COMPONENT;
870
871
872 typedef struct acpi_iort_root_complex
873 {
874 UINT64 MemoryProperties; /* Memory access properties */
875 UINT32 AtsAttribute;
876 UINT32 PciSegmentNumber;
877
878 } ACPI_IORT_ROOT_COMPLEX;
879
880 /* Values for AtsAttribute field above */
881
882 #define ACPI_IORT_ATS_SUPPORTED 0x00000001 /* The root complex supports ATS */
883 #define ACPI_IORT_ATS_UNSUPPORTED 0x00000000 /* The root complex doesn't support ATS */
884
885
886 typedef struct acpi_iort_smmu
887 {
888 UINT64 BaseAddress; /* SMMU base address */
889 UINT64 Span; /* Length of memory range */
890 UINT32 Model;
891 UINT32 Flags;
892 UINT32 GlobalInterruptOffset;
893 UINT32 ContextInterruptCount;
894 UINT32 ContextInterruptOffset;
895 UINT32 PmuInterruptCount;
896 UINT32 PmuInterruptOffset;
897 UINT64 Interrupts[1]; /* Interrupt array */
898
899 } ACPI_IORT_SMMU;
900
901 /* Values for Model field above */
902
903 #define ACPI_IORT_SMMU_V1 0x00000000 /* Generic SMMUv1 */
904 #define ACPI_IORT_SMMU_V2 0x00000001 /* Generic SMMUv2 */
905 #define ACPI_IORT_SMMU_CORELINK_MMU400 0x00000002 /* ARM Corelink MMU-400 */
906 #define ACPI_IORT_SMMU_CORELINK_MMU500 0x00000003 /* ARM Corelink MMU-500 */
907
908 /* Masks for Flags field above */
909
910 #define ACPI_IORT_SMMU_DVM_SUPPORTED (1)
911 #define ACPI_IORT_SMMU_COHERENT_WALK (1<<1)
912
913 /* Global interrupt format */
914
915 typedef struct acpi_iort_smmu_gsi
916 {
917 UINT32 NSgIrpt;
918 UINT32 NSgIrptFlags;
919 UINT32 NSgCfgIrpt;
920 UINT32 NSgCfgIrptFlags;
921 } ACPI_IORT_SMMU_GSI;
922
923
924 typedef struct acpi_iort_smmu_v3
925 {
926 UINT64 BaseAddress; /* SMMUv3 base address */
927 UINT32 Flags;
928 UINT32 Reserved;
929 UINT64 VatosAddress;
930 UINT32 Model; /* O: generic SMMUv3 */
931 UINT32 EventGsiv;
932 UINT32 PriGsiv;
933 UINT32 GerrGsiv;
934 UINT32 SyncGsiv;
935
936 } ACPI_IORT_SMMU_V3;
937
938 /* Masks for Flags field above */
939
940 #define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1)
941 #define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (1<<1)
942
943
944 /*******************************************************************************
945 *
946 * IVRS - I/O Virtualization Reporting Structure
947 * Version 1
948 *
949 * Conforms to "AMD I/O Virtualization Technology (IOMMU) Specification",
950 * Revision 1.26, February 2009.
951 *
952 ******************************************************************************/
953
954 typedef struct acpi_table_ivrs
955 {
956 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
957 UINT32 Info; /* Common virtualization info */
958 UINT64 Reserved;
959
960 } ACPI_TABLE_IVRS;
961
962 /* Values for Info field above */
963
964 #define ACPI_IVRS_PHYSICAL_SIZE 0x00007F00 /* 7 bits, physical address size */
965 #define ACPI_IVRS_VIRTUAL_SIZE 0x003F8000 /* 7 bits, virtual address size */
966 #define ACPI_IVRS_ATS_RESERVED 0x00400000 /* ATS address translation range reserved */
967
968
969 /* IVRS subtable header */
970
971 typedef struct acpi_ivrs_header
972 {
973 UINT8 Type; /* Subtable type */
974 UINT8 Flags;
975 UINT16 Length; /* Subtable length */
976 UINT16 DeviceId; /* ID of IOMMU */
977
978 } ACPI_IVRS_HEADER;
979
980 /* Values for subtable Type above */
981
982 enum AcpiIvrsType
983 {
984 ACPI_IVRS_TYPE_HARDWARE = 0x10,
985 ACPI_IVRS_TYPE_MEMORY1 = 0x20,
986 ACPI_IVRS_TYPE_MEMORY2 = 0x21,
987 ACPI_IVRS_TYPE_MEMORY3 = 0x22
988 };
989
990 /* Masks for Flags field above for IVHD subtable */
991
992 #define ACPI_IVHD_TT_ENABLE (1)
993 #define ACPI_IVHD_PASS_PW (1<<1)
994 #define ACPI_IVHD_RES_PASS_PW (1<<2)
995 #define ACPI_IVHD_ISOC (1<<3)
996 #define ACPI_IVHD_IOTLB (1<<4)
997
998 /* Masks for Flags field above for IVMD subtable */
999
1000 #define ACPI_IVMD_UNITY (1)
1001 #define ACPI_IVMD_READ (1<<1)
1002 #define ACPI_IVMD_WRITE (1<<2)
1003 #define ACPI_IVMD_EXCLUSION_RANGE (1<<3)
1004
1005
1006 /*
1007 * IVRS subtables, correspond to Type in ACPI_IVRS_HEADER
1008 */
1009
1010 /* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */
1011
1012 typedef struct acpi_ivrs_hardware
1013 {
1014 ACPI_IVRS_HEADER Header;
1015 UINT16 CapabilityOffset; /* Offset for IOMMU control fields */
1016 UINT64 BaseAddress; /* IOMMU control registers */
1017 UINT16 PciSegmentGroup;
1018 UINT16 Info; /* MSI number and unit ID */
1019 UINT32 Reserved;
1020
1021 } ACPI_IVRS_HARDWARE;
1022
1023 /* Masks for Info field above */
1024
1025 #define ACPI_IVHD_MSI_NUMBER_MASK 0x001F /* 5 bits, MSI message number */
1026 #define ACPI_IVHD_UNIT_ID_MASK 0x1F00 /* 5 bits, UnitID */
1027
1028
1029 /*
1030 * Device Entries for IVHD subtable, appear after ACPI_IVRS_HARDWARE structure.
1031 * Upper two bits of the Type field are the (encoded) length of the structure.
1032 * Currently, only 4 and 8 byte entries are defined. 16 and 32 byte entries
1033 * are reserved for future use but not defined.
1034 */
1035 typedef struct acpi_ivrs_de_header
1036 {
1037 UINT8 Type;
1038 UINT16 Id;
1039 UINT8 DataSetting;
1040
1041 } ACPI_IVRS_DE_HEADER;
1042
1043 /* Length of device entry is in the top two bits of Type field above */
1044
1045 #define ACPI_IVHD_ENTRY_LENGTH 0xC0
1046
1047 /* Values for device entry Type field above */
1048
1049 enum AcpiIvrsDeviceEntryType
1050 {
1051 /* 4-byte device entries, all use ACPI_IVRS_DEVICE4 */
1052
1053 ACPI_IVRS_TYPE_PAD4 = 0,
1054 ACPI_IVRS_TYPE_ALL = 1,
1055 ACPI_IVRS_TYPE_SELECT = 2,
1056 ACPI_IVRS_TYPE_START = 3,
1057 ACPI_IVRS_TYPE_END = 4,
1058
1059 /* 8-byte device entries */
1060
1061 ACPI_IVRS_TYPE_PAD8 = 64,
1062 ACPI_IVRS_TYPE_NOT_USED = 65,
1063 ACPI_IVRS_TYPE_ALIAS_SELECT = 66, /* Uses ACPI_IVRS_DEVICE8A */
1064 ACPI_IVRS_TYPE_ALIAS_START = 67, /* Uses ACPI_IVRS_DEVICE8A */
1065 ACPI_IVRS_TYPE_EXT_SELECT = 70, /* Uses ACPI_IVRS_DEVICE8B */
1066 ACPI_IVRS_TYPE_EXT_START = 71, /* Uses ACPI_IVRS_DEVICE8B */
1067 ACPI_IVRS_TYPE_SPECIAL = 72 /* Uses ACPI_IVRS_DEVICE8C */
1068 };
1069
1070 /* Values for Data field above */
1071
1072 #define ACPI_IVHD_INIT_PASS (1)
1073 #define ACPI_IVHD_EINT_PASS (1<<1)
1074 #define ACPI_IVHD_NMI_PASS (1<<2)
1075 #define ACPI_IVHD_SYSTEM_MGMT (3<<4)
1076 #define ACPI_IVHD_LINT0_PASS (1<<6)
1077 #define ACPI_IVHD_LINT1_PASS (1<<7)
1078
1079
1080 /* Types 0-4: 4-byte device entry */
1081
1082 typedef struct acpi_ivrs_device4
1083 {
1084 ACPI_IVRS_DE_HEADER Header;
1085
1086 } ACPI_IVRS_DEVICE4;
1087
1088 /* Types 66-67: 8-byte device entry */
1089
1090 typedef struct acpi_ivrs_device8a
1091 {
1092 ACPI_IVRS_DE_HEADER Header;
1093 UINT8 Reserved1;
1094 UINT16 UsedId;
1095 UINT8 Reserved2;
1096
1097 } ACPI_IVRS_DEVICE8A;
1098
1099 /* Types 70-71: 8-byte device entry */
1100
1101 typedef struct acpi_ivrs_device8b
1102 {
1103 ACPI_IVRS_DE_HEADER Header;
1104 UINT32 ExtendedData;
1105
1106 } ACPI_IVRS_DEVICE8B;
1107
1108 /* Values for ExtendedData above */
1109
1110 #define ACPI_IVHD_ATS_DISABLED (1<<31)
1111
1112 /* Type 72: 8-byte device entry */
1113
1114 typedef struct acpi_ivrs_device8c
1115 {
1116 ACPI_IVRS_DE_HEADER Header;
1117 UINT8 Handle;
1118 UINT16 UsedId;
1119 UINT8 Variety;
1120
1121 } ACPI_IVRS_DEVICE8C;
1122
1123 /* Values for Variety field above */
1124
1125 #define ACPI_IVHD_IOAPIC 1
1126 #define ACPI_IVHD_HPET 2
1127
1128
1129 /* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */
1130
1131 typedef struct acpi_ivrs_memory
1132 {
1133 ACPI_IVRS_HEADER Header;
1134 UINT16 AuxData;
1135 UINT64 Reserved;
1136 UINT64 StartAddress;
1137 UINT64 MemoryLength;
1138
1139 } ACPI_IVRS_MEMORY;
1140
1141
1142 /*******************************************************************************
1143 *
1144 * LPIT - Low Power Idle Table
1145 *
1146 * Conforms to "ACPI Low Power Idle Table (LPIT)" July 2014.
1147 *
1148 ******************************************************************************/
1149
1150 typedef struct acpi_table_lpit
1151 {
1152 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1153
1154 } ACPI_TABLE_LPIT;
1155
1156
1157 /* LPIT subtable header */
1158
1159 typedef struct acpi_lpit_header
1160 {
1161 UINT32 Type; /* Subtable type */
1162 UINT32 Length; /* Subtable length */
1163 UINT16 UniqueId;
1164 UINT16 Reserved;
1165 UINT32 Flags;
1166
1167 } ACPI_LPIT_HEADER;
1168
1169 /* Values for subtable Type above */
1170
1171 enum AcpiLpitType
1172 {
1173 ACPI_LPIT_TYPE_NATIVE_CSTATE = 0x00,
1174 ACPI_LPIT_TYPE_RESERVED = 0x01 /* 1 and above are reserved */
1175 };
1176
1177 /* Masks for Flags field above */
1178
1179 #define ACPI_LPIT_STATE_DISABLED (1)
1180 #define ACPI_LPIT_NO_COUNTER (1<<1)
1181
1182 /*
1183 * LPIT subtables, correspond to Type in ACPI_LPIT_HEADER
1184 */
1185
1186 /* 0x00: Native C-state instruction based LPI structure */
1187
1188 typedef struct acpi_lpit_native
1189 {
1190 ACPI_LPIT_HEADER Header;
1191 ACPI_GENERIC_ADDRESS EntryTrigger;
1192 UINT32 Residency;
1193 UINT32 Latency;
1194 ACPI_GENERIC_ADDRESS ResidencyCounter;
1195 UINT64 CounterFrequency;
1196
1197 } ACPI_LPIT_NATIVE;
1198
1199
1200 /*******************************************************************************
1201 *
1202 * MCFG - PCI Memory Mapped Configuration table and subtable
1203 * Version 1
1204 *
1205 * Conforms to "PCI Firmware Specification", Revision 3.0, June 20, 2005
1206 *
1207 ******************************************************************************/
1208
1209 typedef struct acpi_table_mcfg
1210 {
1211 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1212 UINT8 Reserved[8];
1213
1214 } ACPI_TABLE_MCFG;
1215
1216
1217 /* Subtable */
1218
1219 typedef struct acpi_mcfg_allocation
1220 {
1221 UINT64 Address; /* Base address, processor-relative */
1222 UINT16 PciSegment; /* PCI segment group number */
1223 UINT8 StartBusNumber; /* Starting PCI Bus number */
1224 UINT8 EndBusNumber; /* Final PCI Bus number */
1225 UINT32 Reserved;
1226
1227 } ACPI_MCFG_ALLOCATION;
1228
1229
1230 /*******************************************************************************
1231 *
1232 * MCHI - Management Controller Host Interface Table
1233 * Version 1
1234 *
1235 * Conforms to "Management Component Transport Protocol (MCTP) Host
1236 * Interface Specification", Revision 1.0.0a, October 13, 2009
1237 *
1238 ******************************************************************************/
1239
1240 typedef struct acpi_table_mchi
1241 {
1242 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1243 UINT8 InterfaceType;
1244 UINT8 Protocol;
1245 UINT64 ProtocolData;
1246 UINT8 InterruptType;
1247 UINT8 Gpe;
1248 UINT8 PciDeviceFlag;
1249 UINT32 GlobalInterrupt;
1250 ACPI_GENERIC_ADDRESS ControlRegister;
1251 UINT8 PciSegment;
1252 UINT8 PciBus;
1253 UINT8 PciDevice;
1254 UINT8 PciFunction;
1255
1256 } ACPI_TABLE_MCHI;
1257
1258
1259 /*******************************************************************************
1260 *
1261 * MSDM - Microsoft Data Management table
1262 *
1263 * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
1264 * November 29, 2011. Copyright 2011 Microsoft
1265 *
1266 ******************************************************************************/
1267
1268 /* Basic MSDM table is only the common ACPI header */
1269
1270 typedef struct acpi_table_msdm
1271 {
1272 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1273
1274 } ACPI_TABLE_MSDM;
1275
1276
1277 /*******************************************************************************
1278 *
1279 * MTMR - MID Timer Table
1280 * Version 1
1281 *
1282 * Conforms to "Simple Firmware Interface Specification",
1283 * Draft 0.8.2, Oct 19, 2010
1284 * NOTE: The ACPI MTMR is equivalent to the SFI MTMR table.
1285 *
1286 ******************************************************************************/
1287
1288 typedef struct acpi_table_mtmr
1289 {
1290 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1291
1292 } ACPI_TABLE_MTMR;
1293
1294 /* MTMR entry */
1295
1296 typedef struct acpi_mtmr_entry
1297 {
1298 ACPI_GENERIC_ADDRESS PhysicalAddress;
1299 UINT32 Frequency;
1300 UINT32 Irq;
1301
1302 } ACPI_MTMR_ENTRY;
1303
1304
1305 /*******************************************************************************
1306 *
1307 * SLIC - Software Licensing Description Table
1308 *
1309 * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
1310 * November 29, 2011. Copyright 2011 Microsoft
1311 *
1312 ******************************************************************************/
1313
1314 /* Basic SLIC table is only the common ACPI header */
1315
1316 typedef struct acpi_table_slic
1317 {
1318 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1319
1320 } ACPI_TABLE_SLIC;
1321
1322
1323 /*******************************************************************************
1324 *
1325 * SPCR - Serial Port Console Redirection table
1326 * Version 2
1327 *
1328 * Conforms to "Serial Port Console Redirection Table",
1329 * Version 1.03, August 10, 2015
1330 *
1331 ******************************************************************************/
1332
1333 typedef struct acpi_table_spcr
1334 {
1335 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1336 UINT8 InterfaceType; /* 0=full 16550, 1=subset of 16550 */
1337 UINT8 Reserved[3];
1338 ACPI_GENERIC_ADDRESS SerialPort;
1339 UINT8 InterruptType;
1340 UINT8 PcInterrupt;
1341 UINT32 Interrupt;
1342 UINT8 BaudRate;
1343 UINT8 Parity;
1344 UINT8 StopBits;
1345 UINT8 FlowControl;
1346 UINT8 TerminalType;
1347 UINT8 Reserved1;
1348 UINT16 PciDeviceId;
1349 UINT16 PciVendorId;
1350 UINT8 PciBus;
1351 UINT8 PciDevice;
1352 UINT8 PciFunction;
1353 UINT32 PciFlags;
1354 UINT8 PciSegment;
1355 UINT32 Reserved2;
1356
1357 } ACPI_TABLE_SPCR;
1358
1359 /* Masks for PciFlags field above */
1360
1361 #define ACPI_SPCR_DO_NOT_DISABLE (1)
1362
1363 /* Values for Interface Type: See the definition of the DBG2 table */
1364
1365
1366 /*******************************************************************************
1367 *
1368 * SPMI - Server Platform Management Interface table
1369 * Version 5
1370 *
1371 * Conforms to "Intelligent Platform Management Interface Specification
1372 * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with
1373 * June 12, 2009 markup.
1374 *
1375 ******************************************************************************/
1376
1377 typedef struct acpi_table_spmi
1378 {
1379 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1380 UINT8 InterfaceType;
1381 UINT8 Reserved; /* Must be 1 */
1382 UINT16 SpecRevision; /* Version of IPMI */
1383 UINT8 InterruptType;
1384 UINT8 GpeNumber; /* GPE assigned */
1385 UINT8 Reserved1;
1386 UINT8 PciDeviceFlag;
1387 UINT32 Interrupt;
1388 ACPI_GENERIC_ADDRESS IpmiRegister;
1389 UINT8 PciSegment;
1390 UINT8 PciBus;
1391 UINT8 PciDevice;
1392 UINT8 PciFunction;
1393 UINT8 Reserved2;
1394
1395 } ACPI_TABLE_SPMI;
1396
1397 /* Values for InterfaceType above */
1398
1399 enum AcpiSpmiInterfaceTypes
1400 {
1401 ACPI_SPMI_NOT_USED = 0,
1402 ACPI_SPMI_KEYBOARD = 1,
1403 ACPI_SPMI_SMI = 2,
1404 ACPI_SPMI_BLOCK_TRANSFER = 3,
1405 ACPI_SPMI_SMBUS = 4,
1406 ACPI_SPMI_RESERVED = 5 /* 5 and above are reserved */
1407 };
1408
1409
1410 /*******************************************************************************
1411 *
1412 * TCPA - Trusted Computing Platform Alliance table
1413 * Version 2
1414 *
1415 * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
1416 * December 19, 2014
1417 *
1418 * NOTE: There are two versions of the table with the same signature --
1419 * the client version and the server version. The common PlatformClass
1420 * field is used to differentiate the two types of tables.
1421 *
1422 ******************************************************************************/
1423
1424 typedef struct acpi_table_tcpa_hdr
1425 {
1426 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1427 UINT16 PlatformClass;
1428
1429 } ACPI_TABLE_TCPA_HDR;
1430
1431 /*
1432 * Values for PlatformClass above.
1433 * This is how the client and server subtables are differentiated
1434 */
1435 #define ACPI_TCPA_CLIENT_TABLE 0
1436 #define ACPI_TCPA_SERVER_TABLE 1
1437
1438
1439 typedef struct acpi_table_tcpa_client
1440 {
1441 UINT32 MinimumLogLength; /* Minimum length for the event log area */
1442 UINT64 LogAddress; /* Address of the event log area */
1443
1444 } ACPI_TABLE_TCPA_CLIENT;
1445
1446 typedef struct acpi_table_tcpa_server
1447 {
1448 UINT16 Reserved;
1449 UINT64 MinimumLogLength; /* Minimum length for the event log area */
1450 UINT64 LogAddress; /* Address of the event log area */
1451 UINT16 SpecRevision;
1452 UINT8 DeviceFlags;
1453 UINT8 InterruptFlags;
1454 UINT8 GpeNumber;
1455 UINT8 Reserved2[3];
1456 UINT32 GlobalInterrupt;
1457 ACPI_GENERIC_ADDRESS Address;
1458 UINT32 Reserved3;
1459 ACPI_GENERIC_ADDRESS ConfigAddress;
1460 UINT8 Group;
1461 UINT8 Bus; /* PCI Bus/Segment/Function numbers */
1462 UINT8 Device;
1463 UINT8 Function;
1464
1465 } ACPI_TABLE_TCPA_SERVER;
1466
1467 /* Values for DeviceFlags above */
1468
1469 #define ACPI_TCPA_PCI_DEVICE (1)
1470 #define ACPI_TCPA_BUS_PNP (1<<1)
1471 #define ACPI_TCPA_ADDRESS_VALID (1<<2)
1472
1473 /* Values for InterruptFlags above */
1474
1475 #define ACPI_TCPA_INTERRUPT_MODE (1)
1476 #define ACPI_TCPA_INTERRUPT_POLARITY (1<<1)
1477 #define ACPI_TCPA_SCI_VIA_GPE (1<<2)
1478 #define ACPI_TCPA_GLOBAL_INTERRUPT (1<<3)
1479
1480
1481 /*******************************************************************************
1482 *
1483 * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
1484 * Version 4
1485 *
1486 * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
1487 * December 19, 2014
1488 *
1489 ******************************************************************************/
1490
1491 typedef struct acpi_table_tpm2
1492 {
1493 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1494 UINT16 PlatformClass;
1495 UINT16 Reserved;
1496 UINT64 ControlAddress;
1497 UINT32 StartMethod;
1498
1499 /* Platform-specific data follows */
1500
1501 } ACPI_TABLE_TPM2;
1502
1503 /* Values for StartMethod above */
1504
1505 #define ACPI_TPM2_NOT_ALLOWED 0
1506 #define ACPI_TPM2_START_METHOD 2
1507 #define ACPI_TPM2_MEMORY_MAPPED 6
1508 #define ACPI_TPM2_COMMAND_BUFFER 7
1509 #define ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD 8
1510
1511
1512 /*******************************************************************************
1513 *
1514 * UEFI - UEFI Boot optimization Table
1515 * Version 1
1516 *
1517 * Conforms to "Unified Extensible Firmware Interface Specification",
1518 * Version 2.3, May 8, 2009
1519 *
1520 ******************************************************************************/
1521
1522 typedef struct acpi_table_uefi
1523 {
1524 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1525 UINT8 Identifier[16]; /* UUID identifier */
1526 UINT16 DataOffset; /* Offset of remaining data in table */
1527
1528 } ACPI_TABLE_UEFI;
1529
1530
1531 /*******************************************************************************
1532 *
1533 * VRTC - Virtual Real Time Clock Table
1534 * Version 1
1535 *
1536 * Conforms to "Simple Firmware Interface Specification",
1537 * Draft 0.8.2, Oct 19, 2010
1538 * NOTE: The ACPI VRTC is equivalent to The SFI MRTC table.
1539 *
1540 ******************************************************************************/
1541
1542 typedef struct acpi_table_vrtc
1543 {
1544 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1545
1546 } ACPI_TABLE_VRTC;
1547
1548 /* VRTC entry */
1549
1550 typedef struct acpi_vrtc_entry
1551 {
1552 ACPI_GENERIC_ADDRESS PhysicalAddress;
1553 UINT32 Irq;
1554
1555 } ACPI_VRTC_ENTRY;
1556
1557
1558 /*******************************************************************************
1559 *
1560 * WAET - Windows ACPI Emulated devices Table
1561 * Version 1
1562 *
1563 * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009
1564 *
1565 ******************************************************************************/
1566
1567 typedef struct acpi_table_waet
1568 {
1569 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1570 UINT32 Flags;
1571
1572 } ACPI_TABLE_WAET;
1573
1574 /* Masks for Flags field above */
1575
1576 #define ACPI_WAET_RTC_NO_ACK (1) /* RTC requires no int acknowledge */
1577 #define ACPI_WAET_TIMER_ONE_READ (1<<1) /* PM timer requires only one read */
1578
1579
1580 /*******************************************************************************
1581 *
1582 * WDAT - Watchdog Action Table
1583 * Version 1
1584 *
1585 * Conforms to "Hardware Watchdog Timers Design Specification",
1586 * Copyright 2006 Microsoft Corporation.
1587 *
1588 ******************************************************************************/
1589
1590 typedef struct acpi_table_wdat
1591 {
1592 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1593 UINT32 HeaderLength; /* Watchdog Header Length */
1594 UINT16 PciSegment; /* PCI Segment number */
1595 UINT8 PciBus; /* PCI Bus number */
1596 UINT8 PciDevice; /* PCI Device number */
1597 UINT8 PciFunction; /* PCI Function number */
1598 UINT8 Reserved[3];
1599 UINT32 TimerPeriod; /* Period of one timer count (msec) */
1600 UINT32 MaxCount; /* Maximum counter value supported */
1601 UINT32 MinCount; /* Minimum counter value */
1602 UINT8 Flags;
1603 UINT8 Reserved2[3];
1604 UINT32 Entries; /* Number of watchdog entries that follow */
1605
1606 } ACPI_TABLE_WDAT;
1607
1608 /* Masks for Flags field above */
1609
1610 #define ACPI_WDAT_ENABLED (1)
1611 #define ACPI_WDAT_STOPPED 0x80
1612
1613
1614 /* WDAT Instruction Entries (actions) */
1615
1616 typedef struct acpi_wdat_entry
1617 {
1618 UINT8 Action;
1619 UINT8 Instruction;
1620 UINT16 Reserved;
1621 ACPI_GENERIC_ADDRESS RegisterRegion;
1622 UINT32 Value; /* Value used with Read/Write register */
1623 UINT32 Mask; /* Bitmask required for this register instruction */
1624
1625 } ACPI_WDAT_ENTRY;
1626
1627 /* Values for Action field above */
1628
1629 enum AcpiWdatActions
1630 {
1631 ACPI_WDAT_RESET = 1,
1632 ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
1633 ACPI_WDAT_GET_COUNTDOWN = 5,
1634 ACPI_WDAT_SET_COUNTDOWN = 6,
1635 ACPI_WDAT_GET_RUNNING_STATE = 8,
1636 ACPI_WDAT_SET_RUNNING_STATE = 9,
1637 ACPI_WDAT_GET_STOPPED_STATE = 10,
1638 ACPI_WDAT_SET_STOPPED_STATE = 11,
1639 ACPI_WDAT_GET_REBOOT = 16,
1640 ACPI_WDAT_SET_REBOOT = 17,
1641 ACPI_WDAT_GET_SHUTDOWN = 18,
1642 ACPI_WDAT_SET_SHUTDOWN = 19,
1643 ACPI_WDAT_GET_STATUS = 32,
1644 ACPI_WDAT_SET_STATUS = 33,
1645 ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */
1646 };
1647
1648 /* Values for Instruction field above */
1649
1650 enum AcpiWdatInstructions
1651 {
1652 ACPI_WDAT_READ_VALUE = 0,
1653 ACPI_WDAT_READ_COUNTDOWN = 1,
1654 ACPI_WDAT_WRITE_VALUE = 2,
1655 ACPI_WDAT_WRITE_COUNTDOWN = 3,
1656 ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */
1657 ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */
1658 };
1659
1660
1661 /*******************************************************************************
1662 *
1663 * WDDT - Watchdog Descriptor Table
1664 * Version 1
1665 *
1666 * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",
1667 * Version 001, September 2002
1668 *
1669 ******************************************************************************/
1670
1671 typedef struct acpi_table_wddt
1672 {
1673 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1674 UINT16 SpecVersion;
1675 UINT16 TableVersion;
1676 UINT16 PciVendorId;
1677 ACPI_GENERIC_ADDRESS Address;
1678 UINT16 MaxCount; /* Maximum counter value supported */
1679 UINT16 MinCount; /* Minimum counter value supported */
1680 UINT16 Period;
1681 UINT16 Status;
1682 UINT16 Capability;
1683
1684 } ACPI_TABLE_WDDT;
1685
1686 /* Flags for Status field above */
1687
1688 #define ACPI_WDDT_AVAILABLE (1)
1689 #define ACPI_WDDT_ACTIVE (1<<1)
1690 #define ACPI_WDDT_TCO_OS_OWNED (1<<2)
1691 #define ACPI_WDDT_USER_RESET (1<<11)
1692 #define ACPI_WDDT_WDT_RESET (1<<12)
1693 #define ACPI_WDDT_POWER_FAIL (1<<13)
1694 #define ACPI_WDDT_UNKNOWN_RESET (1<<14)
1695
1696 /* Flags for Capability field above */
1697
1698 #define ACPI_WDDT_AUTO_RESET (1)
1699 #define ACPI_WDDT_ALERT_SUPPORT (1<<1)
1700
1701
1702 /*******************************************************************************
1703 *
1704 * WDRT - Watchdog Resource Table
1705 * Version 1
1706 *
1707 * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",
1708 * Version 1.01, August 28, 2006
1709 *
1710 ******************************************************************************/
1711
1712 typedef struct acpi_table_wdrt
1713 {
1714 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1715 ACPI_GENERIC_ADDRESS ControlRegister;
1716 ACPI_GENERIC_ADDRESS CountRegister;
1717 UINT16 PciDeviceId;
1718 UINT16 PciVendorId;
1719 UINT8 PciBus; /* PCI Bus number */
1720 UINT8 PciDevice; /* PCI Device number */
1721 UINT8 PciFunction; /* PCI Function number */
1722 UINT8 PciSegment; /* PCI Segment number */
1723 UINT16 MaxCount; /* Maximum counter value supported */
1724 UINT8 Units;
1725
1726 } ACPI_TABLE_WDRT;
1727
1728
1729 /* Reset to default packing */
1730
1731 #pragma pack()
1732
1733 #endif /* __ACTBL2_H__ */
1734