1 /******************************************************************************
3 * Name: actbl2.h - ACPI Table Definitions (tables not in ACPI spec)
5 *****************************************************************************/
8 * Copyright (C) 2000 - 2015, Intel Corp.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
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.
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.
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"
103 * All tables must be byte-packed to match the ACPI specification, since
104 * the tables are provided by the system BIOS.
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!")
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 */
137 /* ASF subtable header */
139 typedef struct acpi_asf_header
148 /* Values for Type field above */
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
164 /* 0: ASF Information */
166 typedef struct acpi_asf_info
168 ACPI_ASF_HEADER Header;
170 UINT8 MinPollInterval;
178 /* Masks for Flags field above */
180 #define ACPI_ASF_SMBUS_PROTOCOLS (1)
185 typedef struct acpi_asf_alert
187 ACPI_ASF_HEADER Header;
195 typedef struct acpi_asf_alert_data
210 } ACPI_ASF_ALERT_DATA;
213 /* 2: ASF Remote Control */
215 typedef struct acpi_asf_remote
217 ACPI_ASF_HEADER Header;
224 typedef struct acpi_asf_control_data
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;
245 UINT16 OemParameters;
252 typedef struct acpi_asf_address
254 ACPI_ASF_HEADER Header;
261 /*******************************************************************************
263 * BOOT - Simple Boot Flag Table
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 */
279 /*******************************************************************************
281 * CSRT - Core System Resource Table
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 */
295 /* Resource Group subtable */
297 typedef struct acpi_csrt_group
306 UINT32 SharedInfoLength;
308 /* Shared data immediately follows (Length = SharedInfoLength) */
312 /* Shared Info subtable */
314 typedef struct acpi_csrt_shared_info
321 UINT8 InterruptPolarity;
324 UINT8 DmaAddressWidth;
325 UINT16 BaseRequestLine;
326 UINT16 NumHandshakeSignals;
329 /* Resource descriptors immediately follow (Length = Group Length - SharedInfoLength) */
331 } ACPI_CSRT_SHARED_INFO;
333 /* Resource Descriptor subtable */
335 typedef struct acpi_csrt_descriptor
342 /* Resource-specific information immediately follows */
344 } ACPI_CSRT_DESCRIPTOR;
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)", May 22 2012.
369 ******************************************************************************/
371 typedef struct acpi_table_dbg2
373 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
380 typedef struct acpi_dbg2_header
388 /* Debug Device Information Subtable */
390 typedef struct acpi_dbg2_device
394 UINT8 RegisterCount; /* Number of BaseAddress registers */
395 UINT16 NamepathLength;
396 UINT16 NamepathOffset;
397 UINT16 OemDataLength;
398 UINT16 OemDataOffset;
402 UINT16 BaseAddressOffset;
403 UINT16 AddressSizeOffset;
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.
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
425 #define ACPI_DBG2_1394_STANDARD 0x0000
427 #define ACPI_DBG2_USB_XHCI 0x0000
428 #define ACPI_DBG2_USB_EHCI 0x0001
431 /*******************************************************************************
433 * DBGP - Debug Port table
436 * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000
438 ******************************************************************************/
440 typedef struct acpi_table_dbgp
442 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
443 UINT8 Type; /* 0=full 16550, 1=subset of 16550 */
445 ACPI_GENERIC_ADDRESS DebugPort;
450 /*******************************************************************************
452 * DMAR - DMA Remapping table
455 * Conforms to "Intel Virtualization Technology for Directed I/O",
456 * Version 2.2, Sept. 2013
458 ******************************************************************************/
460 typedef struct acpi_table_dmar
462 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
463 UINT8 Width; /* Host Address Width */
469 /* Masks for Flags field above */
471 #define ACPI_DMAR_INTR_REMAP (1)
472 #define ACPI_DMAR_X2APIC_OPT_OUT (2)
475 /* DMAR subtable header */
477 typedef struct acpi_dmar_header
484 /* Values for subtable type in ACPI_DMAR_HEADER */
488 ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
489 ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
490 ACPI_DMAR_TYPE_ROOT_ATS = 2,
491 ACPI_DMAR_TYPE_HARDWARE_AFFINITY = 3,
492 ACPI_DMAR_TYPE_NAMESPACE = 4,
493 ACPI_DMAR_TYPE_RESERVED = 5 /* 5 and greater are reserved */
497 /* DMAR Device Scope structure */
499 typedef struct acpi_dmar_device_scope
507 } ACPI_DMAR_DEVICE_SCOPE;
509 /* Values for EntryType in ACPI_DMAR_DEVICE_SCOPE - device types */
511 enum AcpiDmarScopeType
513 ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
514 ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
515 ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
516 ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
517 ACPI_DMAR_SCOPE_TYPE_HPET = 4,
518 ACPI_DMAR_SCOPE_TYPE_NAMESPACE = 5,
519 ACPI_DMAR_SCOPE_TYPE_RESERVED = 6 /* 6 and greater are reserved */
522 typedef struct acpi_dmar_pci_path
527 } ACPI_DMAR_PCI_PATH;
531 * DMAR Subtables, correspond to Type in ACPI_DMAR_HEADER
534 /* 0: Hardware Unit Definition */
536 typedef struct acpi_dmar_hardware_unit
538 ACPI_DMAR_HEADER Header;
542 UINT64 Address; /* Register Base Address */
544 } ACPI_DMAR_HARDWARE_UNIT;
546 /* Masks for Flags field above */
548 #define ACPI_DMAR_INCLUDE_ALL (1)
551 /* 1: Reserved Memory Defininition */
553 typedef struct acpi_dmar_reserved_memory
555 ACPI_DMAR_HEADER Header;
558 UINT64 BaseAddress; /* 4K aligned base address */
559 UINT64 EndAddress; /* 4K aligned limit address */
561 } ACPI_DMAR_RESERVED_MEMORY;
563 /* Masks for Flags field above */
565 #define ACPI_DMAR_ALLOW_ALL (1)
568 /* 2: Root Port ATS Capability Reporting Structure */
570 typedef struct acpi_dmar_atsr
572 ACPI_DMAR_HEADER Header;
579 /* Masks for Flags field above */
581 #define ACPI_DMAR_ALL_PORTS (1)
584 /* 3: Remapping Hardware Static Affinity Structure */
586 typedef struct acpi_dmar_rhsa
588 ACPI_DMAR_HEADER Header;
591 UINT32 ProximityDomain;
596 /* 4: ACPI Namespace Device Declaration Structure */
598 typedef struct acpi_dmar_andd
600 ACPI_DMAR_HEADER Header;
608 /*******************************************************************************
610 * HPET - High Precision Event Timer table
613 * Conforms to "IA-PC HPET (High Precision Event Timers) Specification",
614 * Version 1.0a, October 2004
616 ******************************************************************************/
618 typedef struct acpi_table_hpet
620 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
621 UINT32 Id; /* Hardware ID of event timer block */
622 ACPI_GENERIC_ADDRESS Address; /* Address of event timer block */
623 UINT8 Sequence; /* HPET sequence number */
624 UINT16 MinimumTick; /* Main counter min tick, periodic mode */
629 /* Masks for Flags field above */
631 #define ACPI_HPET_PAGE_PROTECT_MASK (3)
633 /* Values for Page Protect flags */
635 enum AcpiHpetPageProtect
637 ACPI_HPET_NO_PAGE_PROTECT = 0,
638 ACPI_HPET_PAGE_PROTECT4 = 1,
639 ACPI_HPET_PAGE_PROTECT64 = 2
643 /*******************************************************************************
645 * IBFT - Boot Firmware Table
648 * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b
649 * Specification", Version 1.01, March 1, 2007
651 * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
652 * Therefore, it is not currently supported by the disassembler.
654 ******************************************************************************/
656 typedef struct acpi_table_ibft
658 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
664 /* IBFT common subtable header */
666 typedef struct acpi_ibft_header
676 /* Values for Type field above */
680 ACPI_IBFT_TYPE_NOT_USED = 0,
681 ACPI_IBFT_TYPE_CONTROL = 1,
682 ACPI_IBFT_TYPE_INITIATOR = 2,
683 ACPI_IBFT_TYPE_NIC = 3,
684 ACPI_IBFT_TYPE_TARGET = 4,
685 ACPI_IBFT_TYPE_EXTENSIONS = 5,
686 ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */
692 typedef struct acpi_ibft_control
694 ACPI_IBFT_HEADER Header;
696 UINT16 InitiatorOffset;
698 UINT16 Target0Offset;
700 UINT16 Target1Offset;
704 typedef struct acpi_ibft_initiator
706 ACPI_IBFT_HEADER Header;
709 UINT8 PrimaryServer[16];
710 UINT8 SecondaryServer[16];
714 } ACPI_IBFT_INITIATOR;
716 typedef struct acpi_ibft_nic
718 ACPI_IBFT_HEADER Header;
720 UINT8 SubnetMaskPrefix;
723 UINT8 PrimaryDns[16];
724 UINT8 SecondaryDns[16];
734 typedef struct acpi_ibft_target
736 ACPI_IBFT_HEADER Header;
737 UINT8 TargetIpAddress[16];
738 UINT16 TargetIpSocket;
739 UINT8 TargetBootLun[8];
741 UINT8 NicAssociation;
742 UINT16 TargetNameLength;
743 UINT16 TargetNameOffset;
744 UINT16 ChapNameLength;
745 UINT16 ChapNameOffset;
746 UINT16 ChapSecretLength;
747 UINT16 ChapSecretOffset;
748 UINT16 ReverseChapNameLength;
749 UINT16 ReverseChapNameOffset;
750 UINT16 ReverseChapSecretLength;
751 UINT16 ReverseChapSecretOffset;
756 /*******************************************************************************
758 * IORT - IO Remapping Table
760 * Conforms to "IO Remapping Table System Software on ARM Platforms",
761 * Document number: ARM DEN 0049A, 2015
763 ******************************************************************************/
765 typedef struct acpi_table_iort
767 ACPI_TABLE_HEADER Header;
778 typedef struct acpi_iort_node
785 UINT32 MappingOffset;
790 /* Values for subtable Type above */
792 enum AcpiIortNodeType
794 ACPI_IORT_NODE_ITS_GROUP = 0x00,
795 ACPI_IORT_NODE_NAMED_COMPONENT = 0x01,
796 ACPI_IORT_NODE_PCI_ROOT_COMPLEX = 0x02,
797 ACPI_IORT_NODE_SMMU = 0x03
801 typedef struct acpi_iort_id_mapping
803 UINT32 InputBase; /* Lowest value in input range */
804 UINT32 IdCount; /* Number of IDs */
805 UINT32 OutputBase; /* Lowest value in output range */
806 UINT32 OutputReference; /* A reference to the output node */
809 } ACPI_IORT_ID_MAPPING;
811 /* Masks for Flags field above for IORT subtable */
813 #define ACPI_IORT_ID_SINGLE_MAPPING (1)
816 typedef struct acpi_iort_memory_access
818 UINT32 CacheCoherency;
823 } ACPI_IORT_MEMORY_ACCESS;
825 /* Values for CacheCoherency field above */
827 #define ACPI_IORT_NODE_COHERENT 0x00000001 /* The device node is fully coherent */
828 #define ACPI_IORT_NODE_NOT_COHERENT 0x00000000 /* The device node is not coherent */
830 /* Masks for Hints field above */
832 #define ACPI_IORT_HT_TRANSIENT (1)
833 #define ACPI_IORT_HT_WRITE (1<<1)
834 #define ACPI_IORT_HT_READ (1<<2)
835 #define ACPI_IORT_HT_OVERRIDE (1<<3)
837 /* Masks for MemoryFlags field above */
839 #define ACPI_IORT_MF_COHERENCY (1)
840 #define ACPI_IORT_MF_ATTRIBUTES (1<<1)
844 * IORT node specific subtables
846 typedef struct acpi_iort_its_group
849 UINT32 Identifiers[1]; /* GIC ITS identifier arrary */
851 } ACPI_IORT_ITS_GROUP;
854 typedef struct acpi_iort_named_component
857 UINT64 MemoryProperties; /* Memory access properties */
858 UINT8 MemoryAddressLimit; /* Memory address size limit */
859 char DeviceName[1]; /* Path of namespace object */
861 } ACPI_IORT_NAMED_COMPONENT;
864 typedef struct acpi_iort_root_complex
866 UINT64 MemoryProperties; /* Memory access properties */
868 UINT32 PciSegmentNumber;
870 } ACPI_IORT_ROOT_COMPLEX;
872 /* Values for AtsAttribute field above */
874 #define ACPI_IORT_ATS_SUPPORTED 0x00000001 /* The root complex supports ATS */
875 #define ACPI_IORT_ATS_UNSUPPORTED 0x00000000 /* The root complex doesn't support ATS */
878 typedef struct acpi_iort_smmu
880 UINT64 BaseAddress; /* SMMU base address */
881 UINT64 Span; /* Length of memory range */
884 UINT32 GlobalInterruptOffset;
885 UINT32 ContextInterruptCount;
886 UINT32 ContextInterruptOffset;
887 UINT32 PmuInterruptCount;
888 UINT32 PmuInterruptOffset;
889 UINT64 Interrupts[1]; /* Interrupt array */
893 /* Values for Model field above */
895 #define ACPI_IORT_SMMU_V1 0x00000000 /* Generic SMMUv1 */
896 #define ACPI_IORT_SMMU_V2 0x00000001 /* Generic SMMUv2 */
897 #define ACPI_IORT_SMMU_CORELINK_MMU400 0x00000002 /* ARM Corelink MMU-400 */
898 #define ACPI_IORT_SMMU_CORELINK_MMU500 0x00000003 /* ARM Corelink MMU-500 */
900 /* Masks for Flags field above */
902 #define ACPI_IORT_SMMU_DVM_SUPPORTED (1)
903 #define ACPI_IORT_SMMU_COHERENT_WALK (1<<1)
906 /*******************************************************************************
908 * IVRS - I/O Virtualization Reporting Structure
911 * Conforms to "AMD I/O Virtualization Technology (IOMMU) Specification",
912 * Revision 1.26, February 2009.
914 ******************************************************************************/
916 typedef struct acpi_table_ivrs
918 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
919 UINT32 Info; /* Common virtualization info */
924 /* Values for Info field above */
926 #define ACPI_IVRS_PHYSICAL_SIZE 0x00007F00 /* 7 bits, physical address size */
927 #define ACPI_IVRS_VIRTUAL_SIZE 0x003F8000 /* 7 bits, virtual address size */
928 #define ACPI_IVRS_ATS_RESERVED 0x00400000 /* ATS address translation range reserved */
931 /* IVRS subtable header */
933 typedef struct acpi_ivrs_header
935 UINT8 Type; /* Subtable type */
937 UINT16 Length; /* Subtable length */
938 UINT16 DeviceId; /* ID of IOMMU */
942 /* Values for subtable Type above */
946 ACPI_IVRS_TYPE_HARDWARE = 0x10,
947 ACPI_IVRS_TYPE_MEMORY1 = 0x20,
948 ACPI_IVRS_TYPE_MEMORY2 = 0x21,
949 ACPI_IVRS_TYPE_MEMORY3 = 0x22
952 /* Masks for Flags field above for IVHD subtable */
954 #define ACPI_IVHD_TT_ENABLE (1)
955 #define ACPI_IVHD_PASS_PW (1<<1)
956 #define ACPI_IVHD_RES_PASS_PW (1<<2)
957 #define ACPI_IVHD_ISOC (1<<3)
958 #define ACPI_IVHD_IOTLB (1<<4)
960 /* Masks for Flags field above for IVMD subtable */
962 #define ACPI_IVMD_UNITY (1)
963 #define ACPI_IVMD_READ (1<<1)
964 #define ACPI_IVMD_WRITE (1<<2)
965 #define ACPI_IVMD_EXCLUSION_RANGE (1<<3)
969 * IVRS subtables, correspond to Type in ACPI_IVRS_HEADER
972 /* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */
974 typedef struct acpi_ivrs_hardware
976 ACPI_IVRS_HEADER Header;
977 UINT16 CapabilityOffset; /* Offset for IOMMU control fields */
978 UINT64 BaseAddress; /* IOMMU control registers */
979 UINT16 PciSegmentGroup;
980 UINT16 Info; /* MSI number and unit ID */
983 } ACPI_IVRS_HARDWARE;
985 /* Masks for Info field above */
987 #define ACPI_IVHD_MSI_NUMBER_MASK 0x001F /* 5 bits, MSI message number */
988 #define ACPI_IVHD_UNIT_ID_MASK 0x1F00 /* 5 bits, UnitID */
992 * Device Entries for IVHD subtable, appear after ACPI_IVRS_HARDWARE structure.
993 * Upper two bits of the Type field are the (encoded) length of the structure.
994 * Currently, only 4 and 8 byte entries are defined. 16 and 32 byte entries
995 * are reserved for future use but not defined.
997 typedef struct acpi_ivrs_de_header
1003 } ACPI_IVRS_DE_HEADER;
1005 /* Length of device entry is in the top two bits of Type field above */
1007 #define ACPI_IVHD_ENTRY_LENGTH 0xC0
1009 /* Values for device entry Type field above */
1011 enum AcpiIvrsDeviceEntryType
1013 /* 4-byte device entries, all use ACPI_IVRS_DEVICE4 */
1015 ACPI_IVRS_TYPE_PAD4 = 0,
1016 ACPI_IVRS_TYPE_ALL = 1,
1017 ACPI_IVRS_TYPE_SELECT = 2,
1018 ACPI_IVRS_TYPE_START = 3,
1019 ACPI_IVRS_TYPE_END = 4,
1021 /* 8-byte device entries */
1023 ACPI_IVRS_TYPE_PAD8 = 64,
1024 ACPI_IVRS_TYPE_NOT_USED = 65,
1025 ACPI_IVRS_TYPE_ALIAS_SELECT = 66, /* Uses ACPI_IVRS_DEVICE8A */
1026 ACPI_IVRS_TYPE_ALIAS_START = 67, /* Uses ACPI_IVRS_DEVICE8A */
1027 ACPI_IVRS_TYPE_EXT_SELECT = 70, /* Uses ACPI_IVRS_DEVICE8B */
1028 ACPI_IVRS_TYPE_EXT_START = 71, /* Uses ACPI_IVRS_DEVICE8B */
1029 ACPI_IVRS_TYPE_SPECIAL = 72 /* Uses ACPI_IVRS_DEVICE8C */
1032 /* Values for Data field above */
1034 #define ACPI_IVHD_INIT_PASS (1)
1035 #define ACPI_IVHD_EINT_PASS (1<<1)
1036 #define ACPI_IVHD_NMI_PASS (1<<2)
1037 #define ACPI_IVHD_SYSTEM_MGMT (3<<4)
1038 #define ACPI_IVHD_LINT0_PASS (1<<6)
1039 #define ACPI_IVHD_LINT1_PASS (1<<7)
1042 /* Types 0-4: 4-byte device entry */
1044 typedef struct acpi_ivrs_device4
1046 ACPI_IVRS_DE_HEADER Header;
1048 } ACPI_IVRS_DEVICE4;
1050 /* Types 66-67: 8-byte device entry */
1052 typedef struct acpi_ivrs_device8a
1054 ACPI_IVRS_DE_HEADER Header;
1059 } ACPI_IVRS_DEVICE8A;
1061 /* Types 70-71: 8-byte device entry */
1063 typedef struct acpi_ivrs_device8b
1065 ACPI_IVRS_DE_HEADER Header;
1066 UINT32 ExtendedData;
1068 } ACPI_IVRS_DEVICE8B;
1070 /* Values for ExtendedData above */
1072 #define ACPI_IVHD_ATS_DISABLED (1<<31)
1074 /* Type 72: 8-byte device entry */
1076 typedef struct acpi_ivrs_device8c
1078 ACPI_IVRS_DE_HEADER Header;
1083 } ACPI_IVRS_DEVICE8C;
1085 /* Values for Variety field above */
1087 #define ACPI_IVHD_IOAPIC 1
1088 #define ACPI_IVHD_HPET 2
1091 /* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */
1093 typedef struct acpi_ivrs_memory
1095 ACPI_IVRS_HEADER Header;
1098 UINT64 StartAddress;
1099 UINT64 MemoryLength;
1104 /*******************************************************************************
1106 * LPIT - Low Power Idle Table
1108 * Conforms to "ACPI Low Power Idle Table (LPIT)" July 2014.
1110 ******************************************************************************/
1112 typedef struct acpi_table_lpit
1114 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1119 /* LPIT subtable header */
1121 typedef struct acpi_lpit_header
1123 UINT32 Type; /* Subtable type */
1124 UINT32 Length; /* Subtable length */
1131 /* Values for subtable Type above */
1135 ACPI_LPIT_TYPE_NATIVE_CSTATE = 0x00,
1136 ACPI_LPIT_TYPE_RESERVED = 0x01 /* 1 and above are reserved */
1139 /* Masks for Flags field above */
1141 #define ACPI_LPIT_STATE_DISABLED (1)
1142 #define ACPI_LPIT_NO_COUNTER (1<<1)
1145 * LPIT subtables, correspond to Type in ACPI_LPIT_HEADER
1148 /* 0x00: Native C-state instruction based LPI structure */
1150 typedef struct acpi_lpit_native
1152 ACPI_LPIT_HEADER Header;
1153 ACPI_GENERIC_ADDRESS EntryTrigger;
1156 ACPI_GENERIC_ADDRESS ResidencyCounter;
1157 UINT64 CounterFrequency;
1162 /*******************************************************************************
1164 * MCFG - PCI Memory Mapped Configuration table and subtable
1167 * Conforms to "PCI Firmware Specification", Revision 3.0, June 20, 2005
1169 ******************************************************************************/
1171 typedef struct acpi_table_mcfg
1173 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1181 typedef struct acpi_mcfg_allocation
1183 UINT64 Address; /* Base address, processor-relative */
1184 UINT16 PciSegment; /* PCI segment group number */
1185 UINT8 StartBusNumber; /* Starting PCI Bus number */
1186 UINT8 EndBusNumber; /* Final PCI Bus number */
1189 } ACPI_MCFG_ALLOCATION;
1192 /*******************************************************************************
1194 * MCHI - Management Controller Host Interface Table
1197 * Conforms to "Management Component Transport Protocol (MCTP) Host
1198 * Interface Specification", Revision 1.0.0a, October 13, 2009
1200 ******************************************************************************/
1202 typedef struct acpi_table_mchi
1204 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1205 UINT8 InterfaceType;
1207 UINT64 ProtocolData;
1208 UINT8 InterruptType;
1210 UINT8 PciDeviceFlag;
1211 UINT32 GlobalInterrupt;
1212 ACPI_GENERIC_ADDRESS ControlRegister;
1221 /*******************************************************************************
1223 * MSDM - Microsoft Data Management table
1225 * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
1226 * November 29, 2011. Copyright 2011 Microsoft
1228 ******************************************************************************/
1230 /* Basic MSDM table is only the common ACPI header */
1232 typedef struct acpi_table_msdm
1234 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1239 /*******************************************************************************
1241 * MTMR - MID Timer Table
1244 * Conforms to "Simple Firmware Interface Specification",
1245 * Draft 0.8.2, Oct 19, 2010
1246 * NOTE: The ACPI MTMR is equivalent to the SFI MTMR table.
1248 ******************************************************************************/
1250 typedef struct acpi_table_mtmr
1252 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1258 typedef struct acpi_mtmr_entry
1260 ACPI_GENERIC_ADDRESS PhysicalAddress;
1267 /*******************************************************************************
1269 * SLIC - Software Licensing Description Table
1271 * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
1272 * November 29, 2011. Copyright 2011 Microsoft
1274 ******************************************************************************/
1276 /* Basic SLIC table is only the common ACPI header */
1278 typedef struct acpi_table_slic
1280 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1285 /*******************************************************************************
1287 * SPCR - Serial Port Console Redirection table
1290 * Conforms to "Serial Port Console Redirection Table",
1291 * Version 1.00, January 11, 2002
1293 ******************************************************************************/
1295 typedef struct acpi_table_spcr
1297 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1298 UINT8 InterfaceType; /* 0=full 16550, 1=subset of 16550 */
1300 ACPI_GENERIC_ADDRESS SerialPort;
1301 UINT8 InterruptType;
1321 /* Masks for PciFlags field above */
1323 #define ACPI_SPCR_DO_NOT_DISABLE (1)
1326 /*******************************************************************************
1328 * SPMI - Server Platform Management Interface table
1331 * Conforms to "Intelligent Platform Management Interface Specification
1332 * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with
1333 * June 12, 2009 markup.
1335 ******************************************************************************/
1337 typedef struct acpi_table_spmi
1339 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1340 UINT8 InterfaceType;
1341 UINT8 Reserved; /* Must be 1 */
1342 UINT16 SpecRevision; /* Version of IPMI */
1343 UINT8 InterruptType;
1344 UINT8 GpeNumber; /* GPE assigned */
1346 UINT8 PciDeviceFlag;
1348 ACPI_GENERIC_ADDRESS IpmiRegister;
1357 /* Values for InterfaceType above */
1359 enum AcpiSpmiInterfaceTypes
1361 ACPI_SPMI_NOT_USED = 0,
1362 ACPI_SPMI_KEYBOARD = 1,
1364 ACPI_SPMI_BLOCK_TRANSFER = 3,
1365 ACPI_SPMI_SMBUS = 4,
1366 ACPI_SPMI_RESERVED = 5 /* 5 and above are reserved */
1370 /*******************************************************************************
1372 * TCPA - Trusted Computing Platform Alliance table
1375 * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
1378 * NOTE: There are two versions of the table with the same signature --
1379 * the client version and the server version. The common PlatformClass
1380 * field is used to differentiate the two types of tables.
1382 ******************************************************************************/
1384 typedef struct acpi_table_tcpa_hdr
1386 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1387 UINT16 PlatformClass;
1389 } ACPI_TABLE_TCPA_HDR;
1392 * Values for PlatformClass above.
1393 * This is how the client and server subtables are differentiated
1395 #define ACPI_TCPA_CLIENT_TABLE 0
1396 #define ACPI_TCPA_SERVER_TABLE 1
1399 typedef struct acpi_table_tcpa_client
1401 UINT32 MinimumLogLength; /* Minimum length for the event log area */
1402 UINT64 LogAddress; /* Address of the event log area */
1404 } ACPI_TABLE_TCPA_CLIENT;
1406 typedef struct acpi_table_tcpa_server
1409 UINT64 MinimumLogLength; /* Minimum length for the event log area */
1410 UINT64 LogAddress; /* Address of the event log area */
1411 UINT16 SpecRevision;
1413 UINT8 InterruptFlags;
1416 UINT32 GlobalInterrupt;
1417 ACPI_GENERIC_ADDRESS Address;
1419 ACPI_GENERIC_ADDRESS ConfigAddress;
1421 UINT8 Bus; /* PCI Bus/Segment/Function numbers */
1425 } ACPI_TABLE_TCPA_SERVER;
1427 /* Values for DeviceFlags above */
1429 #define ACPI_TCPA_PCI_DEVICE (1)
1430 #define ACPI_TCPA_BUS_PNP (1<<1)
1431 #define ACPI_TCPA_ADDRESS_VALID (1<<2)
1433 /* Values for InterruptFlags above */
1435 #define ACPI_TCPA_INTERRUPT_MODE (1)
1436 #define ACPI_TCPA_INTERRUPT_POLARITY (1<<1)
1437 #define ACPI_TCPA_SCI_VIA_GPE (1<<2)
1438 #define ACPI_TCPA_GLOBAL_INTERRUPT (1<<3)
1441 /*******************************************************************************
1443 * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
1446 * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
1449 ******************************************************************************/
1451 typedef struct acpi_table_tpm2
1453 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1454 UINT16 PlatformClass;
1456 UINT64 ControlAddress;
1459 /* Platform-specific data follows */
1463 /* Values for StartMethod above */
1465 #define ACPI_TPM2_NOT_ALLOWED 0
1466 #define ACPI_TPM2_START_METHOD 2
1467 #define ACPI_TPM2_MEMORY_MAPPED 6
1468 #define ACPI_TPM2_COMMAND_BUFFER 7
1469 #define ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD 8
1472 /*******************************************************************************
1474 * UEFI - UEFI Boot optimization Table
1477 * Conforms to "Unified Extensible Firmware Interface Specification",
1478 * Version 2.3, May 8, 2009
1480 ******************************************************************************/
1482 typedef struct acpi_table_uefi
1484 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1485 UINT8 Identifier[16]; /* UUID identifier */
1486 UINT16 DataOffset; /* Offset of remaining data in table */
1491 /*******************************************************************************
1493 * VRTC - Virtual Real Time Clock Table
1496 * Conforms to "Simple Firmware Interface Specification",
1497 * Draft 0.8.2, Oct 19, 2010
1498 * NOTE: The ACPI VRTC is equivalent to The SFI MRTC table.
1500 ******************************************************************************/
1502 typedef struct acpi_table_vrtc
1504 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1510 typedef struct acpi_vrtc_entry
1512 ACPI_GENERIC_ADDRESS PhysicalAddress;
1518 /*******************************************************************************
1520 * WAET - Windows ACPI Emulated devices Table
1523 * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009
1525 ******************************************************************************/
1527 typedef struct acpi_table_waet
1529 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1534 /* Masks for Flags field above */
1536 #define ACPI_WAET_RTC_NO_ACK (1) /* RTC requires no int acknowledge */
1537 #define ACPI_WAET_TIMER_ONE_READ (1<<1) /* PM timer requires only one read */
1540 /*******************************************************************************
1542 * WDAT - Watchdog Action Table
1545 * Conforms to "Hardware Watchdog Timers Design Specification",
1546 * Copyright 2006 Microsoft Corporation.
1548 ******************************************************************************/
1550 typedef struct acpi_table_wdat
1552 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1553 UINT32 HeaderLength; /* Watchdog Header Length */
1554 UINT16 PciSegment; /* PCI Segment number */
1555 UINT8 PciBus; /* PCI Bus number */
1556 UINT8 PciDevice; /* PCI Device number */
1557 UINT8 PciFunction; /* PCI Function number */
1559 UINT32 TimerPeriod; /* Period of one timer count (msec) */
1560 UINT32 MaxCount; /* Maximum counter value supported */
1561 UINT32 MinCount; /* Minimum counter value */
1564 UINT32 Entries; /* Number of watchdog entries that follow */
1568 /* Masks for Flags field above */
1570 #define ACPI_WDAT_ENABLED (1)
1571 #define ACPI_WDAT_STOPPED 0x80
1574 /* WDAT Instruction Entries (actions) */
1576 typedef struct acpi_wdat_entry
1581 ACPI_GENERIC_ADDRESS RegisterRegion;
1582 UINT32 Value; /* Value used with Read/Write register */
1583 UINT32 Mask; /* Bitmask required for this register instruction */
1587 /* Values for Action field above */
1589 enum AcpiWdatActions
1591 ACPI_WDAT_RESET = 1,
1592 ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
1593 ACPI_WDAT_GET_COUNTDOWN = 5,
1594 ACPI_WDAT_SET_COUNTDOWN = 6,
1595 ACPI_WDAT_GET_RUNNING_STATE = 8,
1596 ACPI_WDAT_SET_RUNNING_STATE = 9,
1597 ACPI_WDAT_GET_STOPPED_STATE = 10,
1598 ACPI_WDAT_SET_STOPPED_STATE = 11,
1599 ACPI_WDAT_GET_REBOOT = 16,
1600 ACPI_WDAT_SET_REBOOT = 17,
1601 ACPI_WDAT_GET_SHUTDOWN = 18,
1602 ACPI_WDAT_SET_SHUTDOWN = 19,
1603 ACPI_WDAT_GET_STATUS = 32,
1604 ACPI_WDAT_SET_STATUS = 33,
1605 ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */
1608 /* Values for Instruction field above */
1610 enum AcpiWdatInstructions
1612 ACPI_WDAT_READ_VALUE = 0,
1613 ACPI_WDAT_READ_COUNTDOWN = 1,
1614 ACPI_WDAT_WRITE_VALUE = 2,
1615 ACPI_WDAT_WRITE_COUNTDOWN = 3,
1616 ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */
1617 ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */
1621 /*******************************************************************************
1623 * WDDT - Watchdog Descriptor Table
1626 * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",
1627 * Version 001, September 2002
1629 ******************************************************************************/
1631 typedef struct acpi_table_wddt
1633 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1635 UINT16 TableVersion;
1637 ACPI_GENERIC_ADDRESS Address;
1638 UINT16 MaxCount; /* Maximum counter value supported */
1639 UINT16 MinCount; /* Minimum counter value supported */
1646 /* Flags for Status field above */
1648 #define ACPI_WDDT_AVAILABLE (1)
1649 #define ACPI_WDDT_ACTIVE (1<<1)
1650 #define ACPI_WDDT_TCO_OS_OWNED (1<<2)
1651 #define ACPI_WDDT_USER_RESET (1<<11)
1652 #define ACPI_WDDT_WDT_RESET (1<<12)
1653 #define ACPI_WDDT_POWER_FAIL (1<<13)
1654 #define ACPI_WDDT_UNKNOWN_RESET (1<<14)
1656 /* Flags for Capability field above */
1658 #define ACPI_WDDT_AUTO_RESET (1)
1659 #define ACPI_WDDT_ALERT_SUPPORT (1<<1)
1662 /*******************************************************************************
1664 * WDRT - Watchdog Resource Table
1667 * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",
1668 * Version 1.01, August 28, 2006
1670 ******************************************************************************/
1672 typedef struct acpi_table_wdrt
1674 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1675 ACPI_GENERIC_ADDRESS ControlRegister;
1676 ACPI_GENERIC_ADDRESS CountRegister;
1679 UINT8 PciBus; /* PCI Bus number */
1680 UINT8 PciDevice; /* PCI Device number */
1681 UINT8 PciFunction; /* PCI Function number */
1682 UINT8 PciSegment; /* PCI Segment number */
1683 UINT16 MaxCount; /* Maximum counter value supported */
1689 /* Reset to default packing */
1693 #endif /* __ACTBL2_H__ */