sd: remove 'ssd' driver support
[unleashed/tickless.git] / arch / x86 / include / sys / acpi / actbl2.h
blob625d33fab9ce9b6e2c2f5bcda7550db32b2f7aff
1 /******************************************************************************
3 * Name: actbl2.h - ACPI Table Definitions (tables not in ACPI spec)
5 *****************************************************************************/
7 /*
8 * Copyright (C) 2000 - 2016, Intel Corp.
9 * All rights reserved.
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.
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.
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.
44 #ifndef __ACTBL2_H__
45 #define __ACTBL2_H__
48 /*******************************************************************************
50 * Additional ACPI Tables (2)
52 * These tables are not consumed directly by the ACPICA subsystem, but are
53 * included here to support device drivers and the AML disassembler.
55 * Generally, the tables in this file are defined by third-party specifications,
56 * and are not defined directly by the ACPI specification itself.
58 ******************************************************************************/
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.
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 */
93 #ifdef ACPI_UNDEFINED_TABLES
95 * These tables have been seen in the field, but no definition has been found
97 #define ACPI_SIG_ATKG "ATKG"
98 #define ACPI_SIG_GSCI "GSCI" /* GMCH SCI table */
99 #define ACPI_SIG_IEIT "IEIT"
100 #endif
103 * All tables must be byte-packed to match the ACPI specification, since
104 * the tables are provided by the system BIOS.
106 #pragma pack(1)
109 * Note: C bitfields are not used for this reason:
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
121 /*******************************************************************************
123 * ASF - Alert Standard Format table (Signature "ASF!")
124 * Revision 0x10
126 * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
128 ******************************************************************************/
130 typedef struct acpi_table_asf
132 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
134 } ACPI_TABLE_ASF;
137 /* ASF subtable header */
139 typedef struct acpi_asf_header
141 UINT8 Type;
142 UINT8 Reserved;
143 UINT16 Length;
145 } ACPI_ASF_HEADER;
148 /* Values for Type field above */
150 enum AcpiAsfType
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
161 * ASF subtables
164 /* 0: ASF Information */
166 typedef struct acpi_asf_info
168 ACPI_ASF_HEADER Header;
169 UINT8 MinResetValue;
170 UINT8 MinPollInterval;
171 UINT16 SystemId;
172 UINT32 MfgId;
173 UINT8 Flags;
174 UINT8 Reserved2[3];
176 } ACPI_ASF_INFO;
178 /* Masks for Flags field above */
180 #define ACPI_ASF_SMBUS_PROTOCOLS (1)
183 /* 1: ASF Alerts */
185 typedef struct acpi_asf_alert
187 ACPI_ASF_HEADER Header;
188 UINT8 AssertMask;
189 UINT8 DeassertMask;
190 UINT8 Alerts;
191 UINT8 DataLength;
193 } ACPI_ASF_ALERT;
195 typedef struct acpi_asf_alert_data
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;
210 } ACPI_ASF_ALERT_DATA;
213 /* 2: ASF Remote Control */
215 typedef struct acpi_asf_remote
217 ACPI_ASF_HEADER Header;
218 UINT8 Controls;
219 UINT8 DataLength;
220 UINT16 Reserved2;
222 } ACPI_ASF_REMOTE;
224 typedef struct acpi_asf_control_data
226 UINT8 Function;
227 UINT8 Address;
228 UINT8 Command;
229 UINT8 Value;
231 } ACPI_ASF_CONTROL_DATA;
234 /* 3: ASF RMCP Boot Options */
236 typedef struct acpi_asf_rmcp
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;
247 } ACPI_ASF_RMCP;
250 /* 4: ASF Address */
252 typedef struct acpi_asf_address
254 ACPI_ASF_HEADER Header;
255 UINT8 EpromAddress;
256 UINT8 Devices;
258 } ACPI_ASF_ADDRESS;
261 /*******************************************************************************
263 * BOOT - Simple Boot Flag Table
264 * Version 1
266 * Conforms to the "Simple Boot Flag Specification", Version 2.1
268 ******************************************************************************/
270 typedef struct acpi_table_boot
272 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
273 UINT8 CmosIndex; /* Index in CMOS RAM for the boot register */
274 UINT8 Reserved[3];
276 } ACPI_TABLE_BOOT;
279 /*******************************************************************************
281 * CSRT - Core System Resource Table
282 * Version 0
284 * Conforms to the "Core System Resource Table (CSRT)", November 14, 2011
286 ******************************************************************************/
288 typedef struct acpi_table_csrt
290 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
292 } ACPI_TABLE_CSRT;
295 /* Resource Group subtable */
297 typedef struct acpi_csrt_group
299 UINT32 Length;
300 UINT32 VendorId;
301 UINT32 SubvendorId;
302 UINT16 DeviceId;
303 UINT16 SubdeviceId;
304 UINT16 Revision;
305 UINT16 Reserved;
306 UINT32 SharedInfoLength;
308 /* Shared data immediately follows (Length = SharedInfoLength) */
310 } ACPI_CSRT_GROUP;
312 /* Shared Info subtable */
314 typedef struct acpi_csrt_shared_info
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;
329 /* Resource descriptors immediately follow (Length = Group Length - SharedInfoLength) */
331 } ACPI_CSRT_SHARED_INFO;
333 /* Resource Descriptor subtable */
335 typedef struct acpi_csrt_descriptor
337 UINT32 Length;
338 UINT16 Type;
339 UINT16 Subtype;
340 UINT32 Uid;
342 /* Resource-specific information immediately follows */
344 } ACPI_CSRT_DESCRIPTOR;
347 /* Resource Types */
349 #define ACPI_CSRT_TYPE_INTERRUPT 0x0001
350 #define ACPI_CSRT_TYPE_TIMER 0x0002
351 #define ACPI_CSRT_TYPE_DMA 0x0003
353 /* Resource Subtypes */
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
362 /*******************************************************************************
364 * DBG2 - Debug Port Table 2
365 * Version 0 (Both main table and subtables)
367 * Conforms to "Microsoft Debug Port Table 2 (DBG2)", December 10, 2015
369 ******************************************************************************/
371 typedef struct acpi_table_dbg2
373 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
374 UINT32 InfoOffset;
375 UINT32 InfoCount;
377 } ACPI_TABLE_DBG2;
380 typedef struct acpi_dbg2_header
382 UINT32 InfoOffset;
383 UINT32 InfoCount;
385 } ACPI_DBG2_HEADER;
388 /* Debug Device Information Subtable */
390 typedef struct acpi_dbg2_device
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;
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.
411 } ACPI_DBG2_DEVICE;
413 /* Types for PortType field above */
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
420 /* Subtypes for PortSubtype field above */
422 #define ACPI_DBG2_16550_COMPATIBLE 0x0000
423 #define ACPI_DBG2_16550_SUBSET 0x0001
424 #define ACPI_DBG2_ARM_PL011 0x0003
425 #define ACPI_DBG2_ARM_SBSA_32BIT 0x000D
426 #define ACPI_DBG2_ARM_SBSA_GENERIC 0x000E
427 #define ACPI_DBG2_ARM_DCC 0x000F
428 #define ACPI_DBG2_BCM2835 0x0010
430 #define ACPI_DBG2_1394_STANDARD 0x0000
432 #define ACPI_DBG2_USB_XHCI 0x0000
433 #define ACPI_DBG2_USB_EHCI 0x0001
436 /*******************************************************************************
438 * DBGP - Debug Port table
439 * Version 1
441 * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000
443 ******************************************************************************/
445 typedef struct acpi_table_dbgp
447 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
448 UINT8 Type; /* 0=full 16550, 1=subset of 16550 */
449 UINT8 Reserved[3];
450 ACPI_GENERIC_ADDRESS DebugPort;
452 } ACPI_TABLE_DBGP;
455 /*******************************************************************************
457 * DMAR - DMA Remapping table
458 * Version 1
460 * Conforms to "Intel Virtualization Technology for Directed I/O",
461 * Version 2.3, October 2014
463 ******************************************************************************/
465 typedef struct acpi_table_dmar
467 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
468 UINT8 Width; /* Host Address Width */
469 UINT8 Flags;
470 UINT8 Reserved[10];
472 } ACPI_TABLE_DMAR;
474 /* Masks for Flags field above */
476 #define ACPI_DMAR_INTR_REMAP (1)
477 #define ACPI_DMAR_X2APIC_OPT_OUT (1<<1)
478 #define ACPI_DMAR_X2APIC_MODE (1<<2)
481 /* DMAR subtable header */
483 typedef struct acpi_dmar_header
485 UINT16 Type;
486 UINT16 Length;
488 } ACPI_DMAR_HEADER;
490 /* Values for subtable type in ACPI_DMAR_HEADER */
492 enum AcpiDmarType
494 ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
495 ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
496 ACPI_DMAR_TYPE_ROOT_ATS = 2,
497 ACPI_DMAR_TYPE_HARDWARE_AFFINITY = 3,
498 ACPI_DMAR_TYPE_NAMESPACE = 4,
499 ACPI_DMAR_TYPE_RESERVED = 5 /* 5 and greater are reserved */
503 /* DMAR Device Scope structure */
505 typedef struct acpi_dmar_device_scope
507 UINT8 EntryType;
508 UINT8 Length;
509 UINT16 Reserved;
510 UINT8 EnumerationId;
511 UINT8 Bus;
513 } ACPI_DMAR_DEVICE_SCOPE;
515 /* Values for EntryType in ACPI_DMAR_DEVICE_SCOPE - device types */
517 enum AcpiDmarScopeType
519 ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
520 ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
521 ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
522 ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
523 ACPI_DMAR_SCOPE_TYPE_HPET = 4,
524 ACPI_DMAR_SCOPE_TYPE_NAMESPACE = 5,
525 ACPI_DMAR_SCOPE_TYPE_RESERVED = 6 /* 6 and greater are reserved */
528 typedef struct acpi_dmar_pci_path
530 UINT8 Device;
531 UINT8 Function;
533 } ACPI_DMAR_PCI_PATH;
537 * DMAR Subtables, correspond to Type in ACPI_DMAR_HEADER
540 /* 0: Hardware Unit Definition */
542 typedef struct acpi_dmar_hardware_unit
544 ACPI_DMAR_HEADER Header;
545 UINT8 Flags;
546 UINT8 Reserved;
547 UINT16 Segment;
548 UINT64 Address; /* Register Base Address */
550 } ACPI_DMAR_HARDWARE_UNIT;
552 /* Masks for Flags field above */
554 #define ACPI_DMAR_INCLUDE_ALL (1)
557 /* 1: Reserved Memory Defininition */
559 typedef struct acpi_dmar_reserved_memory
561 ACPI_DMAR_HEADER Header;
562 UINT16 Reserved;
563 UINT16 Segment;
564 UINT64 BaseAddress; /* 4K aligned base address */
565 UINT64 EndAddress; /* 4K aligned limit address */
567 } ACPI_DMAR_RESERVED_MEMORY;
569 /* Masks for Flags field above */
571 #define ACPI_DMAR_ALLOW_ALL (1)
574 /* 2: Root Port ATS Capability Reporting Structure */
576 typedef struct acpi_dmar_atsr
578 ACPI_DMAR_HEADER Header;
579 UINT8 Flags;
580 UINT8 Reserved;
581 UINT16 Segment;
583 } ACPI_DMAR_ATSR;
585 /* Masks for Flags field above */
587 #define ACPI_DMAR_ALL_PORTS (1)
590 /* 3: Remapping Hardware Static Affinity Structure */
592 typedef struct acpi_dmar_rhsa
594 ACPI_DMAR_HEADER Header;
595 UINT32 Reserved;
596 UINT64 BaseAddress;
597 UINT32 ProximityDomain;
599 } ACPI_DMAR_RHSA;
602 /* 4: ACPI Namespace Device Declaration Structure */
604 typedef struct acpi_dmar_andd
606 ACPI_DMAR_HEADER Header;
607 UINT8 Reserved[3];
608 UINT8 DeviceNumber;
609 char DeviceName[1];
611 } ACPI_DMAR_ANDD;
614 /*******************************************************************************
616 * HPET - High Precision Event Timer table
617 * Version 1
619 * Conforms to "IA-PC HPET (High Precision Event Timers) Specification",
620 * Version 1.0a, October 2004
622 ******************************************************************************/
624 typedef struct acpi_table_hpet
626 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
627 UINT32 Id; /* Hardware ID of event timer block */
628 ACPI_GENERIC_ADDRESS Address; /* Address of event timer block */
629 UINT8 Sequence; /* HPET sequence number */
630 UINT16 MinimumTick; /* Main counter min tick, periodic mode */
631 UINT8 Flags;
633 } ACPI_TABLE_HPET;
635 /* Masks for Flags field above */
637 #define ACPI_HPET_PAGE_PROTECT_MASK (3)
639 /* Values for Page Protect flags */
641 enum AcpiHpetPageProtect
643 ACPI_HPET_NO_PAGE_PROTECT = 0,
644 ACPI_HPET_PAGE_PROTECT4 = 1,
645 ACPI_HPET_PAGE_PROTECT64 = 2
649 /*******************************************************************************
651 * IBFT - Boot Firmware Table
652 * Version 1
654 * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b
655 * Specification", Version 1.01, March 1, 2007
657 * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
658 * Therefore, it is not currently supported by the disassembler.
660 ******************************************************************************/
662 typedef struct acpi_table_ibft
664 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
665 UINT8 Reserved[12];
667 } ACPI_TABLE_IBFT;
670 /* IBFT common subtable header */
672 typedef struct acpi_ibft_header
674 UINT8 Type;
675 UINT8 Version;
676 UINT16 Length;
677 UINT8 Index;
678 UINT8 Flags;
680 } ACPI_IBFT_HEADER;
682 /* Values for Type field above */
684 enum AcpiIbftType
686 ACPI_IBFT_TYPE_NOT_USED = 0,
687 ACPI_IBFT_TYPE_CONTROL = 1,
688 ACPI_IBFT_TYPE_INITIATOR = 2,
689 ACPI_IBFT_TYPE_NIC = 3,
690 ACPI_IBFT_TYPE_TARGET = 4,
691 ACPI_IBFT_TYPE_EXTENSIONS = 5,
692 ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */
696 /* IBFT subtables */
698 typedef struct acpi_ibft_control
700 ACPI_IBFT_HEADER Header;
701 UINT16 Extensions;
702 UINT16 InitiatorOffset;
703 UINT16 Nic0Offset;
704 UINT16 Target0Offset;
705 UINT16 Nic1Offset;
706 UINT16 Target1Offset;
708 } ACPI_IBFT_CONTROL;
710 typedef struct acpi_ibft_initiator
712 ACPI_IBFT_HEADER Header;
713 UINT8 SnsServer[16];
714 UINT8 SlpServer[16];
715 UINT8 PrimaryServer[16];
716 UINT8 SecondaryServer[16];
717 UINT16 NameLength;
718 UINT16 NameOffset;
720 } ACPI_IBFT_INITIATOR;
722 typedef struct acpi_ibft_nic
724 ACPI_IBFT_HEADER Header;
725 UINT8 IpAddress[16];
726 UINT8 SubnetMaskPrefix;
727 UINT8 Origin;
728 UINT8 Gateway[16];
729 UINT8 PrimaryDns[16];
730 UINT8 SecondaryDns[16];
731 UINT8 Dhcp[16];
732 UINT16 Vlan;
733 UINT8 MacAddress[6];
734 UINT16 PciAddress;
735 UINT16 NameLength;
736 UINT16 NameOffset;
738 } ACPI_IBFT_NIC;
740 typedef struct acpi_ibft_target
742 ACPI_IBFT_HEADER Header;
743 UINT8 TargetIpAddress[16];
744 UINT16 TargetIpSocket;
745 UINT8 TargetBootLun[8];
746 UINT8 ChapType;
747 UINT8 NicAssociation;
748 UINT16 TargetNameLength;
749 UINT16 TargetNameOffset;
750 UINT16 ChapNameLength;
751 UINT16 ChapNameOffset;
752 UINT16 ChapSecretLength;
753 UINT16 ChapSecretOffset;
754 UINT16 ReverseChapNameLength;
755 UINT16 ReverseChapNameOffset;
756 UINT16 ReverseChapSecretLength;
757 UINT16 ReverseChapSecretOffset;
759 } ACPI_IBFT_TARGET;
762 /*******************************************************************************
764 * IORT - IO Remapping Table
766 * Conforms to "IO Remapping Table System Software on ARM Platforms",
767 * Document number: ARM DEN 0049B, October 2015
769 ******************************************************************************/
771 typedef struct acpi_table_iort
773 ACPI_TABLE_HEADER Header;
774 UINT32 NodeCount;
775 UINT32 NodeOffset;
776 UINT32 Reserved;
778 } ACPI_TABLE_IORT;
782 * IORT subtables
784 typedef struct acpi_iort_node
786 UINT8 Type;
787 UINT16 Length;
788 UINT8 Revision;
789 UINT32 Reserved;
790 UINT32 MappingCount;
791 UINT32 MappingOffset;
792 char NodeData[1];
794 } ACPI_IORT_NODE;
796 /* Values for subtable Type above */
798 enum AcpiIortNodeType
800 ACPI_IORT_NODE_ITS_GROUP = 0x00,
801 ACPI_IORT_NODE_NAMED_COMPONENT = 0x01,
802 ACPI_IORT_NODE_PCI_ROOT_COMPLEX = 0x02,
803 ACPI_IORT_NODE_SMMU = 0x03,
804 ACPI_IORT_NODE_SMMU_V3 = 0x04
808 typedef struct acpi_iort_id_mapping
810 UINT32 InputBase; /* Lowest value in input range */
811 UINT32 IdCount; /* Number of IDs */
812 UINT32 OutputBase; /* Lowest value in output range */
813 UINT32 OutputReference; /* A reference to the output node */
814 UINT32 Flags;
816 } ACPI_IORT_ID_MAPPING;
818 /* Masks for Flags field above for IORT subtable */
820 #define ACPI_IORT_ID_SINGLE_MAPPING (1)
823 typedef struct acpi_iort_memory_access
825 UINT32 CacheCoherency;
826 UINT8 Hints;
827 UINT16 Reserved;
828 UINT8 MemoryFlags;
830 } ACPI_IORT_MEMORY_ACCESS;
832 /* Values for CacheCoherency field above */
834 #define ACPI_IORT_NODE_COHERENT 0x00000001 /* The device node is fully coherent */
835 #define ACPI_IORT_NODE_NOT_COHERENT 0x00000000 /* The device node is not coherent */
837 /* Masks for Hints field above */
839 #define ACPI_IORT_HT_TRANSIENT (1)
840 #define ACPI_IORT_HT_WRITE (1<<1)
841 #define ACPI_IORT_HT_READ (1<<2)
842 #define ACPI_IORT_HT_OVERRIDE (1<<3)
844 /* Masks for MemoryFlags field above */
846 #define ACPI_IORT_MF_COHERENCY (1)
847 #define ACPI_IORT_MF_ATTRIBUTES (1<<1)
851 * IORT node specific subtables
853 typedef struct acpi_iort_its_group
855 UINT32 ItsCount;
856 UINT32 Identifiers[1]; /* GIC ITS identifier arrary */
858 } ACPI_IORT_ITS_GROUP;
861 typedef struct acpi_iort_named_component
863 UINT32 NodeFlags;
864 UINT64 MemoryProperties; /* Memory access properties */
865 UINT8 MemoryAddressLimit; /* Memory address size limit */
866 char DeviceName[1]; /* Path of namespace object */
868 } ACPI_IORT_NAMED_COMPONENT;
871 typedef struct acpi_iort_root_complex
873 UINT64 MemoryProperties; /* Memory access properties */
874 UINT32 AtsAttribute;
875 UINT32 PciSegmentNumber;
877 } ACPI_IORT_ROOT_COMPLEX;
879 /* Values for AtsAttribute field above */
881 #define ACPI_IORT_ATS_SUPPORTED 0x00000001 /* The root complex supports ATS */
882 #define ACPI_IORT_ATS_UNSUPPORTED 0x00000000 /* The root complex doesn't support ATS */
885 typedef struct acpi_iort_smmu
887 UINT64 BaseAddress; /* SMMU base address */
888 UINT64 Span; /* Length of memory range */
889 UINT32 Model;
890 UINT32 Flags;
891 UINT32 GlobalInterruptOffset;
892 UINT32 ContextInterruptCount;
893 UINT32 ContextInterruptOffset;
894 UINT32 PmuInterruptCount;
895 UINT32 PmuInterruptOffset;
896 UINT64 Interrupts[1]; /* Interrupt array */
898 } ACPI_IORT_SMMU;
900 /* Values for Model field above */
902 #define ACPI_IORT_SMMU_V1 0x00000000 /* Generic SMMUv1 */
903 #define ACPI_IORT_SMMU_V2 0x00000001 /* Generic SMMUv2 */
904 #define ACPI_IORT_SMMU_CORELINK_MMU400 0x00000002 /* ARM Corelink MMU-400 */
905 #define ACPI_IORT_SMMU_CORELINK_MMU500 0x00000003 /* ARM Corelink MMU-500 */
907 /* Masks for Flags field above */
909 #define ACPI_IORT_SMMU_DVM_SUPPORTED (1)
910 #define ACPI_IORT_SMMU_COHERENT_WALK (1<<1)
913 typedef struct acpi_iort_smmu_v3
915 UINT64 BaseAddress; /* SMMUv3 base address */
916 UINT32 Flags;
917 UINT32 Reserved;
918 UINT64 VatosAddress;
919 UINT32 Model; /* O: generic SMMUv3 */
920 UINT32 EventGsiv;
921 UINT32 PriGsiv;
922 UINT32 GerrGsiv;
923 UINT32 SyncGsiv;
925 } ACPI_IORT_SMMU_V3;
927 /* Masks for Flags field above */
929 #define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1)
930 #define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (1<<1)
933 /*******************************************************************************
935 * IVRS - I/O Virtualization Reporting Structure
936 * Version 1
938 * Conforms to "AMD I/O Virtualization Technology (IOMMU) Specification",
939 * Revision 1.26, February 2009.
941 ******************************************************************************/
943 typedef struct acpi_table_ivrs
945 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
946 UINT32 Info; /* Common virtualization info */
947 UINT64 Reserved;
949 } ACPI_TABLE_IVRS;
951 /* Values for Info field above */
953 #define ACPI_IVRS_PHYSICAL_SIZE 0x00007F00 /* 7 bits, physical address size */
954 #define ACPI_IVRS_VIRTUAL_SIZE 0x003F8000 /* 7 bits, virtual address size */
955 #define ACPI_IVRS_ATS_RESERVED 0x00400000 /* ATS address translation range reserved */
958 /* IVRS subtable header */
960 typedef struct acpi_ivrs_header
962 UINT8 Type; /* Subtable type */
963 UINT8 Flags;
964 UINT16 Length; /* Subtable length */
965 UINT16 DeviceId; /* ID of IOMMU */
967 } ACPI_IVRS_HEADER;
969 /* Values for subtable Type above */
971 enum AcpiIvrsType
973 ACPI_IVRS_TYPE_HARDWARE = 0x10,
974 ACPI_IVRS_TYPE_MEMORY1 = 0x20,
975 ACPI_IVRS_TYPE_MEMORY2 = 0x21,
976 ACPI_IVRS_TYPE_MEMORY3 = 0x22
979 /* Masks for Flags field above for IVHD subtable */
981 #define ACPI_IVHD_TT_ENABLE (1)
982 #define ACPI_IVHD_PASS_PW (1<<1)
983 #define ACPI_IVHD_RES_PASS_PW (1<<2)
984 #define ACPI_IVHD_ISOC (1<<3)
985 #define ACPI_IVHD_IOTLB (1<<4)
987 /* Masks for Flags field above for IVMD subtable */
989 #define ACPI_IVMD_UNITY (1)
990 #define ACPI_IVMD_READ (1<<1)
991 #define ACPI_IVMD_WRITE (1<<2)
992 #define ACPI_IVMD_EXCLUSION_RANGE (1<<3)
996 * IVRS subtables, correspond to Type in ACPI_IVRS_HEADER
999 /* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */
1001 typedef struct acpi_ivrs_hardware
1003 ACPI_IVRS_HEADER Header;
1004 UINT16 CapabilityOffset; /* Offset for IOMMU control fields */
1005 UINT64 BaseAddress; /* IOMMU control registers */
1006 UINT16 PciSegmentGroup;
1007 UINT16 Info; /* MSI number and unit ID */
1008 UINT32 Reserved;
1010 } ACPI_IVRS_HARDWARE;
1012 /* Masks for Info field above */
1014 #define ACPI_IVHD_MSI_NUMBER_MASK 0x001F /* 5 bits, MSI message number */
1015 #define ACPI_IVHD_UNIT_ID_MASK 0x1F00 /* 5 bits, UnitID */
1019 * Device Entries for IVHD subtable, appear after ACPI_IVRS_HARDWARE structure.
1020 * Upper two bits of the Type field are the (encoded) length of the structure.
1021 * Currently, only 4 and 8 byte entries are defined. 16 and 32 byte entries
1022 * are reserved for future use but not defined.
1024 typedef struct acpi_ivrs_de_header
1026 UINT8 Type;
1027 UINT16 Id;
1028 UINT8 DataSetting;
1030 } ACPI_IVRS_DE_HEADER;
1032 /* Length of device entry is in the top two bits of Type field above */
1034 #define ACPI_IVHD_ENTRY_LENGTH 0xC0
1036 /* Values for device entry Type field above */
1038 enum AcpiIvrsDeviceEntryType
1040 /* 4-byte device entries, all use ACPI_IVRS_DEVICE4 */
1042 ACPI_IVRS_TYPE_PAD4 = 0,
1043 ACPI_IVRS_TYPE_ALL = 1,
1044 ACPI_IVRS_TYPE_SELECT = 2,
1045 ACPI_IVRS_TYPE_START = 3,
1046 ACPI_IVRS_TYPE_END = 4,
1048 /* 8-byte device entries */
1050 ACPI_IVRS_TYPE_PAD8 = 64,
1051 ACPI_IVRS_TYPE_NOT_USED = 65,
1052 ACPI_IVRS_TYPE_ALIAS_SELECT = 66, /* Uses ACPI_IVRS_DEVICE8A */
1053 ACPI_IVRS_TYPE_ALIAS_START = 67, /* Uses ACPI_IVRS_DEVICE8A */
1054 ACPI_IVRS_TYPE_EXT_SELECT = 70, /* Uses ACPI_IVRS_DEVICE8B */
1055 ACPI_IVRS_TYPE_EXT_START = 71, /* Uses ACPI_IVRS_DEVICE8B */
1056 ACPI_IVRS_TYPE_SPECIAL = 72 /* Uses ACPI_IVRS_DEVICE8C */
1059 /* Values for Data field above */
1061 #define ACPI_IVHD_INIT_PASS (1)
1062 #define ACPI_IVHD_EINT_PASS (1<<1)
1063 #define ACPI_IVHD_NMI_PASS (1<<2)
1064 #define ACPI_IVHD_SYSTEM_MGMT (3<<4)
1065 #define ACPI_IVHD_LINT0_PASS (1<<6)
1066 #define ACPI_IVHD_LINT1_PASS (1<<7)
1069 /* Types 0-4: 4-byte device entry */
1071 typedef struct acpi_ivrs_device4
1073 ACPI_IVRS_DE_HEADER Header;
1075 } ACPI_IVRS_DEVICE4;
1077 /* Types 66-67: 8-byte device entry */
1079 typedef struct acpi_ivrs_device8a
1081 ACPI_IVRS_DE_HEADER Header;
1082 UINT8 Reserved1;
1083 UINT16 UsedId;
1084 UINT8 Reserved2;
1086 } ACPI_IVRS_DEVICE8A;
1088 /* Types 70-71: 8-byte device entry */
1090 typedef struct acpi_ivrs_device8b
1092 ACPI_IVRS_DE_HEADER Header;
1093 UINT32 ExtendedData;
1095 } ACPI_IVRS_DEVICE8B;
1097 /* Values for ExtendedData above */
1099 #define ACPI_IVHD_ATS_DISABLED (1<<31)
1101 /* Type 72: 8-byte device entry */
1103 typedef struct acpi_ivrs_device8c
1105 ACPI_IVRS_DE_HEADER Header;
1106 UINT8 Handle;
1107 UINT16 UsedId;
1108 UINT8 Variety;
1110 } ACPI_IVRS_DEVICE8C;
1112 /* Values for Variety field above */
1114 #define ACPI_IVHD_IOAPIC 1
1115 #define ACPI_IVHD_HPET 2
1118 /* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */
1120 typedef struct acpi_ivrs_memory
1122 ACPI_IVRS_HEADER Header;
1123 UINT16 AuxData;
1124 UINT64 Reserved;
1125 UINT64 StartAddress;
1126 UINT64 MemoryLength;
1128 } ACPI_IVRS_MEMORY;
1131 /*******************************************************************************
1133 * LPIT - Low Power Idle Table
1135 * Conforms to "ACPI Low Power Idle Table (LPIT)" July 2014.
1137 ******************************************************************************/
1139 typedef struct acpi_table_lpit
1141 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1143 } ACPI_TABLE_LPIT;
1146 /* LPIT subtable header */
1148 typedef struct acpi_lpit_header
1150 UINT32 Type; /* Subtable type */
1151 UINT32 Length; /* Subtable length */
1152 UINT16 UniqueId;
1153 UINT16 Reserved;
1154 UINT32 Flags;
1156 } ACPI_LPIT_HEADER;
1158 /* Values for subtable Type above */
1160 enum AcpiLpitType
1162 ACPI_LPIT_TYPE_NATIVE_CSTATE = 0x00,
1163 ACPI_LPIT_TYPE_RESERVED = 0x01 /* 1 and above are reserved */
1166 /* Masks for Flags field above */
1168 #define ACPI_LPIT_STATE_DISABLED (1)
1169 #define ACPI_LPIT_NO_COUNTER (1<<1)
1172 * LPIT subtables, correspond to Type in ACPI_LPIT_HEADER
1175 /* 0x00: Native C-state instruction based LPI structure */
1177 typedef struct acpi_lpit_native
1179 ACPI_LPIT_HEADER Header;
1180 ACPI_GENERIC_ADDRESS EntryTrigger;
1181 UINT32 Residency;
1182 UINT32 Latency;
1183 ACPI_GENERIC_ADDRESS ResidencyCounter;
1184 UINT64 CounterFrequency;
1186 } ACPI_LPIT_NATIVE;
1189 /*******************************************************************************
1191 * MCFG - PCI Memory Mapped Configuration table and subtable
1192 * Version 1
1194 * Conforms to "PCI Firmware Specification", Revision 3.0, June 20, 2005
1196 ******************************************************************************/
1198 typedef struct acpi_table_mcfg
1200 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1201 UINT8 Reserved[8];
1203 } ACPI_TABLE_MCFG;
1206 /* Subtable */
1208 typedef struct acpi_mcfg_allocation
1210 UINT64 Address; /* Base address, processor-relative */
1211 UINT16 PciSegment; /* PCI segment group number */
1212 UINT8 StartBusNumber; /* Starting PCI Bus number */
1213 UINT8 EndBusNumber; /* Final PCI Bus number */
1214 UINT32 Reserved;
1216 } ACPI_MCFG_ALLOCATION;
1219 /*******************************************************************************
1221 * MCHI - Management Controller Host Interface Table
1222 * Version 1
1224 * Conforms to "Management Component Transport Protocol (MCTP) Host
1225 * Interface Specification", Revision 1.0.0a, October 13, 2009
1227 ******************************************************************************/
1229 typedef struct acpi_table_mchi
1231 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1232 UINT8 InterfaceType;
1233 UINT8 Protocol;
1234 UINT64 ProtocolData;
1235 UINT8 InterruptType;
1236 UINT8 Gpe;
1237 UINT8 PciDeviceFlag;
1238 UINT32 GlobalInterrupt;
1239 ACPI_GENERIC_ADDRESS ControlRegister;
1240 UINT8 PciSegment;
1241 UINT8 PciBus;
1242 UINT8 PciDevice;
1243 UINT8 PciFunction;
1245 } ACPI_TABLE_MCHI;
1248 /*******************************************************************************
1250 * MSDM - Microsoft Data Management table
1252 * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
1253 * November 29, 2011. Copyright 2011 Microsoft
1255 ******************************************************************************/
1257 /* Basic MSDM table is only the common ACPI header */
1259 typedef struct acpi_table_msdm
1261 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1263 } ACPI_TABLE_MSDM;
1266 /*******************************************************************************
1268 * MTMR - MID Timer Table
1269 * Version 1
1271 * Conforms to "Simple Firmware Interface Specification",
1272 * Draft 0.8.2, Oct 19, 2010
1273 * NOTE: The ACPI MTMR is equivalent to the SFI MTMR table.
1275 ******************************************************************************/
1277 typedef struct acpi_table_mtmr
1279 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1281 } ACPI_TABLE_MTMR;
1283 /* MTMR entry */
1285 typedef struct acpi_mtmr_entry
1287 ACPI_GENERIC_ADDRESS PhysicalAddress;
1288 UINT32 Frequency;
1289 UINT32 Irq;
1291 } ACPI_MTMR_ENTRY;
1294 /*******************************************************************************
1296 * SLIC - Software Licensing Description Table
1298 * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
1299 * November 29, 2011. Copyright 2011 Microsoft
1301 ******************************************************************************/
1303 /* Basic SLIC table is only the common ACPI header */
1305 typedef struct acpi_table_slic
1307 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1309 } ACPI_TABLE_SLIC;
1312 /*******************************************************************************
1314 * SPCR - Serial Port Console Redirection table
1315 * Version 2
1317 * Conforms to "Serial Port Console Redirection Table",
1318 * Version 1.03, August 10, 2015
1320 ******************************************************************************/
1322 typedef struct acpi_table_spcr
1324 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1325 UINT8 InterfaceType; /* 0=full 16550, 1=subset of 16550 */
1326 UINT8 Reserved[3];
1327 ACPI_GENERIC_ADDRESS SerialPort;
1328 UINT8 InterruptType;
1329 UINT8 PcInterrupt;
1330 UINT32 Interrupt;
1331 UINT8 BaudRate;
1332 UINT8 Parity;
1333 UINT8 StopBits;
1334 UINT8 FlowControl;
1335 UINT8 TerminalType;
1336 UINT8 Reserved1;
1337 UINT16 PciDeviceId;
1338 UINT16 PciVendorId;
1339 UINT8 PciBus;
1340 UINT8 PciDevice;
1341 UINT8 PciFunction;
1342 UINT32 PciFlags;
1343 UINT8 PciSegment;
1344 UINT32 Reserved2;
1346 } ACPI_TABLE_SPCR;
1348 /* Masks for PciFlags field above */
1350 #define ACPI_SPCR_DO_NOT_DISABLE (1)
1352 /* Values for Interface Type: See the definition of the DBG2 table */
1355 /*******************************************************************************
1357 * SPMI - Server Platform Management Interface table
1358 * Version 5
1360 * Conforms to "Intelligent Platform Management Interface Specification
1361 * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with
1362 * June 12, 2009 markup.
1364 ******************************************************************************/
1366 typedef struct acpi_table_spmi
1368 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1369 UINT8 InterfaceType;
1370 UINT8 Reserved; /* Must be 1 */
1371 UINT16 SpecRevision; /* Version of IPMI */
1372 UINT8 InterruptType;
1373 UINT8 GpeNumber; /* GPE assigned */
1374 UINT8 Reserved1;
1375 UINT8 PciDeviceFlag;
1376 UINT32 Interrupt;
1377 ACPI_GENERIC_ADDRESS IpmiRegister;
1378 UINT8 PciSegment;
1379 UINT8 PciBus;
1380 UINT8 PciDevice;
1381 UINT8 PciFunction;
1382 UINT8 Reserved2;
1384 } ACPI_TABLE_SPMI;
1386 /* Values for InterfaceType above */
1388 enum AcpiSpmiInterfaceTypes
1390 ACPI_SPMI_NOT_USED = 0,
1391 ACPI_SPMI_KEYBOARD = 1,
1392 ACPI_SPMI_SMI = 2,
1393 ACPI_SPMI_BLOCK_TRANSFER = 3,
1394 ACPI_SPMI_SMBUS = 4,
1395 ACPI_SPMI_RESERVED = 5 /* 5 and above are reserved */
1399 /*******************************************************************************
1401 * TCPA - Trusted Computing Platform Alliance table
1402 * Version 2
1404 * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
1405 * December 19, 2014
1407 * NOTE: There are two versions of the table with the same signature --
1408 * the client version and the server version. The common PlatformClass
1409 * field is used to differentiate the two types of tables.
1411 ******************************************************************************/
1413 typedef struct acpi_table_tcpa_hdr
1415 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1416 UINT16 PlatformClass;
1418 } ACPI_TABLE_TCPA_HDR;
1421 * Values for PlatformClass above.
1422 * This is how the client and server subtables are differentiated
1424 #define ACPI_TCPA_CLIENT_TABLE 0
1425 #define ACPI_TCPA_SERVER_TABLE 1
1428 typedef struct acpi_table_tcpa_client
1430 UINT32 MinimumLogLength; /* Minimum length for the event log area */
1431 UINT64 LogAddress; /* Address of the event log area */
1433 } ACPI_TABLE_TCPA_CLIENT;
1435 typedef struct acpi_table_tcpa_server
1437 UINT16 Reserved;
1438 UINT64 MinimumLogLength; /* Minimum length for the event log area */
1439 UINT64 LogAddress; /* Address of the event log area */
1440 UINT16 SpecRevision;
1441 UINT8 DeviceFlags;
1442 UINT8 InterruptFlags;
1443 UINT8 GpeNumber;
1444 UINT8 Reserved2[3];
1445 UINT32 GlobalInterrupt;
1446 ACPI_GENERIC_ADDRESS Address;
1447 UINT32 Reserved3;
1448 ACPI_GENERIC_ADDRESS ConfigAddress;
1449 UINT8 Group;
1450 UINT8 Bus; /* PCI Bus/Segment/Function numbers */
1451 UINT8 Device;
1452 UINT8 Function;
1454 } ACPI_TABLE_TCPA_SERVER;
1456 /* Values for DeviceFlags above */
1458 #define ACPI_TCPA_PCI_DEVICE (1)
1459 #define ACPI_TCPA_BUS_PNP (1<<1)
1460 #define ACPI_TCPA_ADDRESS_VALID (1<<2)
1462 /* Values for InterruptFlags above */
1464 #define ACPI_TCPA_INTERRUPT_MODE (1)
1465 #define ACPI_TCPA_INTERRUPT_POLARITY (1<<1)
1466 #define ACPI_TCPA_SCI_VIA_GPE (1<<2)
1467 #define ACPI_TCPA_GLOBAL_INTERRUPT (1<<3)
1470 /*******************************************************************************
1472 * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
1473 * Version 4
1475 * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
1476 * December 19, 2014
1478 ******************************************************************************/
1480 typedef struct acpi_table_tpm2
1482 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1483 UINT16 PlatformClass;
1484 UINT16 Reserved;
1485 UINT64 ControlAddress;
1486 UINT32 StartMethod;
1488 /* Platform-specific data follows */
1490 } ACPI_TABLE_TPM2;
1492 /* Values for StartMethod above */
1494 #define ACPI_TPM2_NOT_ALLOWED 0
1495 #define ACPI_TPM2_START_METHOD 2
1496 #define ACPI_TPM2_MEMORY_MAPPED 6
1497 #define ACPI_TPM2_COMMAND_BUFFER 7
1498 #define ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD 8
1501 /*******************************************************************************
1503 * UEFI - UEFI Boot optimization Table
1504 * Version 1
1506 * Conforms to "Unified Extensible Firmware Interface Specification",
1507 * Version 2.3, May 8, 2009
1509 ******************************************************************************/
1511 typedef struct acpi_table_uefi
1513 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1514 UINT8 Identifier[16]; /* UUID identifier */
1515 UINT16 DataOffset; /* Offset of remaining data in table */
1517 } ACPI_TABLE_UEFI;
1520 /*******************************************************************************
1522 * VRTC - Virtual Real Time Clock Table
1523 * Version 1
1525 * Conforms to "Simple Firmware Interface Specification",
1526 * Draft 0.8.2, Oct 19, 2010
1527 * NOTE: The ACPI VRTC is equivalent to The SFI MRTC table.
1529 ******************************************************************************/
1531 typedef struct acpi_table_vrtc
1533 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1535 } ACPI_TABLE_VRTC;
1537 /* VRTC entry */
1539 typedef struct acpi_vrtc_entry
1541 ACPI_GENERIC_ADDRESS PhysicalAddress;
1542 UINT32 Irq;
1544 } ACPI_VRTC_ENTRY;
1547 /*******************************************************************************
1549 * WAET - Windows ACPI Emulated devices Table
1550 * Version 1
1552 * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009
1554 ******************************************************************************/
1556 typedef struct acpi_table_waet
1558 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1559 UINT32 Flags;
1561 } ACPI_TABLE_WAET;
1563 /* Masks for Flags field above */
1565 #define ACPI_WAET_RTC_NO_ACK (1) /* RTC requires no int acknowledge */
1566 #define ACPI_WAET_TIMER_ONE_READ (1<<1) /* PM timer requires only one read */
1569 /*******************************************************************************
1571 * WDAT - Watchdog Action Table
1572 * Version 1
1574 * Conforms to "Hardware Watchdog Timers Design Specification",
1575 * Copyright 2006 Microsoft Corporation.
1577 ******************************************************************************/
1579 typedef struct acpi_table_wdat
1581 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1582 UINT32 HeaderLength; /* Watchdog Header Length */
1583 UINT16 PciSegment; /* PCI Segment number */
1584 UINT8 PciBus; /* PCI Bus number */
1585 UINT8 PciDevice; /* PCI Device number */
1586 UINT8 PciFunction; /* PCI Function number */
1587 UINT8 Reserved[3];
1588 UINT32 TimerPeriod; /* Period of one timer count (msec) */
1589 UINT32 MaxCount; /* Maximum counter value supported */
1590 UINT32 MinCount; /* Minimum counter value */
1591 UINT8 Flags;
1592 UINT8 Reserved2[3];
1593 UINT32 Entries; /* Number of watchdog entries that follow */
1595 } ACPI_TABLE_WDAT;
1597 /* Masks for Flags field above */
1599 #define ACPI_WDAT_ENABLED (1)
1600 #define ACPI_WDAT_STOPPED 0x80
1603 /* WDAT Instruction Entries (actions) */
1605 typedef struct acpi_wdat_entry
1607 UINT8 Action;
1608 UINT8 Instruction;
1609 UINT16 Reserved;
1610 ACPI_GENERIC_ADDRESS RegisterRegion;
1611 UINT32 Value; /* Value used with Read/Write register */
1612 UINT32 Mask; /* Bitmask required for this register instruction */
1614 } ACPI_WDAT_ENTRY;
1616 /* Values for Action field above */
1618 enum AcpiWdatActions
1620 ACPI_WDAT_RESET = 1,
1621 ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
1622 ACPI_WDAT_GET_COUNTDOWN = 5,
1623 ACPI_WDAT_SET_COUNTDOWN = 6,
1624 ACPI_WDAT_GET_RUNNING_STATE = 8,
1625 ACPI_WDAT_SET_RUNNING_STATE = 9,
1626 ACPI_WDAT_GET_STOPPED_STATE = 10,
1627 ACPI_WDAT_SET_STOPPED_STATE = 11,
1628 ACPI_WDAT_GET_REBOOT = 16,
1629 ACPI_WDAT_SET_REBOOT = 17,
1630 ACPI_WDAT_GET_SHUTDOWN = 18,
1631 ACPI_WDAT_SET_SHUTDOWN = 19,
1632 ACPI_WDAT_GET_STATUS = 32,
1633 ACPI_WDAT_SET_STATUS = 33,
1634 ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */
1637 /* Values for Instruction field above */
1639 enum AcpiWdatInstructions
1641 ACPI_WDAT_READ_VALUE = 0,
1642 ACPI_WDAT_READ_COUNTDOWN = 1,
1643 ACPI_WDAT_WRITE_VALUE = 2,
1644 ACPI_WDAT_WRITE_COUNTDOWN = 3,
1645 ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */
1646 ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */
1650 /*******************************************************************************
1652 * WDDT - Watchdog Descriptor Table
1653 * Version 1
1655 * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",
1656 * Version 001, September 2002
1658 ******************************************************************************/
1660 typedef struct acpi_table_wddt
1662 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1663 UINT16 SpecVersion;
1664 UINT16 TableVersion;
1665 UINT16 PciVendorId;
1666 ACPI_GENERIC_ADDRESS Address;
1667 UINT16 MaxCount; /* Maximum counter value supported */
1668 UINT16 MinCount; /* Minimum counter value supported */
1669 UINT16 Period;
1670 UINT16 Status;
1671 UINT16 Capability;
1673 } ACPI_TABLE_WDDT;
1675 /* Flags for Status field above */
1677 #define ACPI_WDDT_AVAILABLE (1)
1678 #define ACPI_WDDT_ACTIVE (1<<1)
1679 #define ACPI_WDDT_TCO_OS_OWNED (1<<2)
1680 #define ACPI_WDDT_USER_RESET (1<<11)
1681 #define ACPI_WDDT_WDT_RESET (1<<12)
1682 #define ACPI_WDDT_POWER_FAIL (1<<13)
1683 #define ACPI_WDDT_UNKNOWN_RESET (1<<14)
1685 /* Flags for Capability field above */
1687 #define ACPI_WDDT_AUTO_RESET (1)
1688 #define ACPI_WDDT_ALERT_SUPPORT (1<<1)
1691 /*******************************************************************************
1693 * WDRT - Watchdog Resource Table
1694 * Version 1
1696 * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",
1697 * Version 1.01, August 28, 2006
1699 ******************************************************************************/
1701 typedef struct acpi_table_wdrt
1703 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1704 ACPI_GENERIC_ADDRESS ControlRegister;
1705 ACPI_GENERIC_ADDRESS CountRegister;
1706 UINT16 PciDeviceId;
1707 UINT16 PciVendorId;
1708 UINT8 PciBus; /* PCI Bus number */
1709 UINT8 PciDevice; /* PCI Device number */
1710 UINT8 PciFunction; /* PCI Function number */
1711 UINT8 PciSegment; /* PCI Segment number */
1712 UINT16 MaxCount; /* Maximum counter value supported */
1713 UINT8 Units;
1715 } ACPI_TABLE_WDRT;
1718 /* Reset to default packing */
1720 #pragma pack()
1722 #endif /* __ACTBL2_H__ */