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