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