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