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 * The tables in this file are defined by third-party specifications, and are
56 * 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_UEFI "UEFI" /* Uefi Boot Optimization Table */
86 #define ACPI_SIG_VRTC "VRTC" /* Virtual Real Time Clock Table */
87 #define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */
88 #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */
89 #define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */
90 #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */
92 #ifdef ACPI_UNDEFINED_TABLES
94 * These tables have been seen in the field, but no definition has been found
96 #define ACPI_SIG_ATKG "ATKG"
97 #define ACPI_SIG_GSCI "GSCI" /* GMCH SCI table */
98 #define ACPI_SIG_IEIT "IEIT"
102 * All tables must be byte-packed to match the ACPI specification, since
103 * the tables are provided by the system BIOS.
108 * Note: C bitfields are not used for this reason:
110 * "Bitfields are great and easy to read, but unfortunately the C language
111 * does not specify the layout of bitfields in memory, which means they are
112 * essentially useless for dealing with packed data in on-disk formats or
113 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
114 * this decision was a design error in C. Ritchie could have picked an order
115 * and stuck with it." Norman Ramsey.
116 * See http://stackoverflow.com/a/1053662/41661
120 /*******************************************************************************
122 * ASF - Alert Standard Format table (Signature "ASF!")
125 * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
127 ******************************************************************************/
129 typedef struct acpi_table_asf
131 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
136 /* ASF subtable header */
138 typedef struct acpi_asf_header
147 /* Values for Type field above */
151 ACPI_ASF_TYPE_INFO = 0,
152 ACPI_ASF_TYPE_ALERT = 1,
153 ACPI_ASF_TYPE_CONTROL = 2,
154 ACPI_ASF_TYPE_BOOT = 3,
155 ACPI_ASF_TYPE_ADDRESS = 4,
156 ACPI_ASF_TYPE_RESERVED = 5
163 /* 0: ASF Information */
165 typedef struct acpi_asf_info
167 ACPI_ASF_HEADER Header;
169 UINT8 MinPollInterval;
177 /* Masks for Flags field above */
179 #define ACPI_ASF_SMBUS_PROTOCOLS (1)
184 typedef struct acpi_asf_alert
186 ACPI_ASF_HEADER Header;
194 typedef struct acpi_asf_alert_data
209 } ACPI_ASF_ALERT_DATA;
212 /* 2: ASF Remote Control */
214 typedef struct acpi_asf_remote
216 ACPI_ASF_HEADER Header;
223 typedef struct acpi_asf_control_data
230 } ACPI_ASF_CONTROL_DATA;
233 /* 3: ASF RMCP Boot Options */
235 typedef struct acpi_asf_rmcp
237 ACPI_ASF_HEADER Header;
238 UINT8 Capabilities[7];
239 UINT8 CompletionCode;
244 UINT16 OemParameters;
251 typedef struct acpi_asf_address
253 ACPI_ASF_HEADER Header;
260 /*******************************************************************************
262 * BOOT - Simple Boot Flag Table
265 * Conforms to the "Simple Boot Flag Specification", Version 2.1
267 ******************************************************************************/
269 typedef struct acpi_table_boot
271 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
272 UINT8 CmosIndex; /* Index in CMOS RAM for the boot register */
278 /*******************************************************************************
280 * CSRT - Core System Resource Table
283 * Conforms to the "Core System Resource Table (CSRT)", November 14, 2011
285 ******************************************************************************/
287 typedef struct acpi_table_csrt
289 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
294 /* Resource Group subtable */
296 typedef struct acpi_csrt_group
305 UINT32 SharedInfoLength;
307 /* Shared data immediately follows (Length = SharedInfoLength) */
311 /* Shared Info subtable */
313 typedef struct acpi_csrt_shared_info
320 UINT8 InterruptPolarity;
323 UINT8 DmaAddressWidth;
324 UINT16 BaseRequestLine;
325 UINT16 NumHandshakeSignals;
328 /* Resource descriptors immediately follow (Length = Group Length - SharedInfoLength) */
330 } ACPI_CSRT_SHARED_INFO;
332 /* Resource Descriptor subtable */
334 typedef struct acpi_csrt_descriptor
341 /* Resource-specific information immediately follows */
343 } ACPI_CSRT_DESCRIPTOR;
348 #define ACPI_CSRT_TYPE_INTERRUPT 0x0001
349 #define ACPI_CSRT_TYPE_TIMER 0x0002
350 #define ACPI_CSRT_TYPE_DMA 0x0003
352 /* Resource Subtypes */
354 #define ACPI_CSRT_XRUPT_LINE 0x0000
355 #define ACPI_CSRT_XRUPT_CONTROLLER 0x0001
356 #define ACPI_CSRT_TIMER 0x0000
357 #define ACPI_CSRT_DMA_CHANNEL 0x0000
358 #define ACPI_CSRT_DMA_CONTROLLER 0x0001
361 /*******************************************************************************
363 * DBG2 - Debug Port Table 2
364 * Version 0 (Both main table and subtables)
366 * Conforms to "Microsoft Debug Port Table 2 (DBG2)", May 22 2012.
368 ******************************************************************************/
370 typedef struct acpi_table_dbg2
372 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
379 typedef struct acpi_dbg2_header
387 /* Debug Device Information Subtable */
389 typedef struct acpi_dbg2_device
393 UINT8 RegisterCount; /* Number of BaseAddress registers */
394 UINT16 NamepathLength;
395 UINT16 NamepathOffset;
396 UINT16 OemDataLength;
397 UINT16 OemDataOffset;
401 UINT16 BaseAddressOffset;
402 UINT16 AddressSizeOffset;
405 * BaseAddress (required) - Each in 12-byte Generic Address Structure format.
406 * AddressSize (required) - Array of UINT32 sizes corresponding to each BaseAddress register.
407 * Namepath (required) - Null terminated string. Single dot if not supported.
408 * OemData (optional) - Length is OemDataLength.
412 /* Types for PortType field above */
414 #define ACPI_DBG2_SERIAL_PORT 0x8000
415 #define ACPI_DBG2_1394_PORT 0x8001
416 #define ACPI_DBG2_USB_PORT 0x8002
417 #define ACPI_DBG2_NET_PORT 0x8003
419 /* Subtypes for PortSubtype field above */
421 #define ACPI_DBG2_16550_COMPATIBLE 0x0000
422 #define ACPI_DBG2_16550_SUBSET 0x0001
424 #define ACPI_DBG2_1394_STANDARD 0x0000
426 #define ACPI_DBG2_USB_XHCI 0x0000
427 #define ACPI_DBG2_USB_EHCI 0x0001
430 /*******************************************************************************
432 * DBGP - Debug Port table
435 * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000
437 ******************************************************************************/
439 typedef struct acpi_table_dbgp
441 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
442 UINT8 Type; /* 0=full 16550, 1=subset of 16550 */
444 ACPI_GENERIC_ADDRESS DebugPort;
449 /*******************************************************************************
451 * DMAR - DMA Remapping table
454 * Conforms to "Intel Virtualization Technology for Directed I/O",
455 * Version 2.2, Sept. 2013
457 ******************************************************************************/
459 typedef struct acpi_table_dmar
461 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
462 UINT8 Width; /* Host Address Width */
468 /* Masks for Flags field above */
470 #define ACPI_DMAR_INTR_REMAP (1)
473 /* DMAR subtable header */
475 typedef struct acpi_dmar_header
482 /* Values for subtable type in ACPI_DMAR_HEADER */
486 ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
487 ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
488 ACPI_DMAR_TYPE_ROOT_ATS = 2,
489 ACPI_DMAR_TYPE_HARDWARE_AFFINITY = 3,
490 ACPI_DMAR_TYPE_NAMESPACE = 4,
491 ACPI_DMAR_TYPE_RESERVED = 5 /* 5 and greater are reserved */
495 /* DMAR Device Scope structure */
497 typedef struct acpi_dmar_device_scope
505 } ACPI_DMAR_DEVICE_SCOPE;
507 /* Values for EntryType in ACPI_DMAR_DEVICE_SCOPE - device types */
509 enum AcpiDmarScopeType
511 ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
512 ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
513 ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
514 ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
515 ACPI_DMAR_SCOPE_TYPE_HPET = 4,
516 ACPI_DMAR_SCOPE_TYPE_NAMESPACE = 5,
517 ACPI_DMAR_SCOPE_TYPE_RESERVED = 6 /* 6 and greater are reserved */
520 typedef struct acpi_dmar_pci_path
525 } ACPI_DMAR_PCI_PATH;
529 * DMAR Subtables, correspond to Type in ACPI_DMAR_HEADER
532 /* 0: Hardware Unit Definition */
534 typedef struct acpi_dmar_hardware_unit
536 ACPI_DMAR_HEADER Header;
540 UINT64 Address; /* Register Base Address */
542 } ACPI_DMAR_HARDWARE_UNIT;
544 /* Masks for Flags field above */
546 #define ACPI_DMAR_INCLUDE_ALL (1)
549 /* 1: Reserved Memory Defininition */
551 typedef struct acpi_dmar_reserved_memory
553 ACPI_DMAR_HEADER Header;
556 UINT64 BaseAddress; /* 4K aligned base address */
557 UINT64 EndAddress; /* 4K aligned limit address */
559 } ACPI_DMAR_RESERVED_MEMORY;
561 /* Masks for Flags field above */
563 #define ACPI_DMAR_ALLOW_ALL (1)
566 /* 2: Root Port ATS Capability Reporting Structure */
568 typedef struct acpi_dmar_atsr
570 ACPI_DMAR_HEADER Header;
577 /* Masks for Flags field above */
579 #define ACPI_DMAR_ALL_PORTS (1)
582 /* 3: Remapping Hardware Static Affinity Structure */
584 typedef struct acpi_dmar_rhsa
586 ACPI_DMAR_HEADER Header;
589 UINT32 ProximityDomain;
594 /* 4: ACPI Namespace Device Declaration Structure */
596 typedef struct acpi_dmar_andd
598 ACPI_DMAR_HEADER Header;
606 /*******************************************************************************
608 * HPET - High Precision Event Timer table
611 * Conforms to "IA-PC HPET (High Precision Event Timers) Specification",
612 * Version 1.0a, October 2004
614 ******************************************************************************/
616 typedef struct acpi_table_hpet
618 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
619 UINT32 Id; /* Hardware ID of event timer block */
620 ACPI_GENERIC_ADDRESS Address; /* Address of event timer block */
621 UINT8 Sequence; /* HPET sequence number */
622 UINT16 MinimumTick; /* Main counter min tick, periodic mode */
627 /* Masks for Flags field above */
629 #define ACPI_HPET_PAGE_PROTECT_MASK (3)
631 /* Values for Page Protect flags */
633 enum AcpiHpetPageProtect
635 ACPI_HPET_NO_PAGE_PROTECT = 0,
636 ACPI_HPET_PAGE_PROTECT4 = 1,
637 ACPI_HPET_PAGE_PROTECT64 = 2
641 /*******************************************************************************
643 * IBFT - Boot Firmware Table
646 * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b
647 * Specification", Version 1.01, March 1, 2007
649 * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
650 * Therefore, it is not currently supported by the disassembler.
652 ******************************************************************************/
654 typedef struct acpi_table_ibft
656 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
662 /* IBFT common subtable header */
664 typedef struct acpi_ibft_header
674 /* Values for Type field above */
678 ACPI_IBFT_TYPE_NOT_USED = 0,
679 ACPI_IBFT_TYPE_CONTROL = 1,
680 ACPI_IBFT_TYPE_INITIATOR = 2,
681 ACPI_IBFT_TYPE_NIC = 3,
682 ACPI_IBFT_TYPE_TARGET = 4,
683 ACPI_IBFT_TYPE_EXTENSIONS = 5,
684 ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */
690 typedef struct acpi_ibft_control
692 ACPI_IBFT_HEADER Header;
694 UINT16 InitiatorOffset;
696 UINT16 Target0Offset;
698 UINT16 Target1Offset;
702 typedef struct acpi_ibft_initiator
704 ACPI_IBFT_HEADER Header;
707 UINT8 PrimaryServer[16];
708 UINT8 SecondaryServer[16];
712 } ACPI_IBFT_INITIATOR;
714 typedef struct acpi_ibft_nic
716 ACPI_IBFT_HEADER Header;
718 UINT8 SubnetMaskPrefix;
721 UINT8 PrimaryDns[16];
722 UINT8 SecondaryDns[16];
732 typedef struct acpi_ibft_target
734 ACPI_IBFT_HEADER Header;
735 UINT8 TargetIpAddress[16];
736 UINT16 TargetIpSocket;
737 UINT8 TargetBootLun[8];
739 UINT8 NicAssociation;
740 UINT16 TargetNameLength;
741 UINT16 TargetNameOffset;
742 UINT16 ChapNameLength;
743 UINT16 ChapNameOffset;
744 UINT16 ChapSecretLength;
745 UINT16 ChapSecretOffset;
746 UINT16 ReverseChapNameLength;
747 UINT16 ReverseChapNameOffset;
748 UINT16 ReverseChapSecretLength;
749 UINT16 ReverseChapSecretOffset;
754 /*******************************************************************************
756 * IORT - IO Remapping Table
758 * Conforms to "IO Remapping Table System Software on ARM Platforms",
759 * Document number: ARM DEN 0049A, 2015
761 ******************************************************************************/
763 typedef struct acpi_table_iort
765 ACPI_TABLE_HEADER Header;
776 typedef struct acpi_iort_node
783 UINT32 MappingOffset;
788 /* Values for subtable Type above */
790 enum AcpiIortNodeType
792 ACPI_IORT_NODE_ITS_GROUP = 0x00,
793 ACPI_IORT_NODE_NAMED_COMPONENT = 0x01,
794 ACPI_IORT_NODE_PCI_ROOT_COMPLEX = 0x02,
795 ACPI_IORT_NODE_SMMU = 0x03
799 typedef struct acpi_iort_id_mapping
801 UINT32 InputBase; /* Lowest value in input range */
802 UINT32 IdCount; /* Number of IDs */
803 UINT32 OutputBase; /* Lowest value in output range */
804 UINT32 OutputReference; /* A reference to the output node */
807 } ACPI_IORT_ID_MAPPING;
809 /* Masks for Flags field above for IORT subtable */
811 #define ACPI_IORT_ID_SINGLE_MAPPING (1)
814 typedef struct acpi_iort_memory_access
816 UINT32 CacheCoherency;
821 } ACPI_IORT_MEMORY_ACCESS;
823 /* Values for CacheCoherency field above */
825 #define ACPI_IORT_NODE_COHERENT 0x00000001 /* The device node is fully coherent */
826 #define ACPI_IORT_NODE_NOT_COHERENT 0x00000000 /* The device node is not coherent */
828 /* Masks for Hints field above */
830 #define ACPI_IORT_HT_TRANSIENT (1)
831 #define ACPI_IORT_HT_WRITE (1<<1)
832 #define ACPI_IORT_HT_READ (1<<2)
833 #define ACPI_IORT_HT_OVERRIDE (1<<3)
835 /* Masks for MemoryFlags field above */
837 #define ACPI_IORT_MF_COHERENCY (1)
838 #define ACPI_IORT_MF_ATTRIBUTES (1<<1)
842 * IORT node specific subtables
844 typedef struct acpi_iort_its_group
847 UINT32 Identifiers[1]; /* GIC ITS identifier arrary */
849 } ACPI_IORT_ITS_GROUP;
852 typedef struct acpi_iort_named_component
855 UINT64 MemoryProperties; /* Memory access properties */
856 UINT8 MemoryAddressLimit; /* Memory address size limit */
857 char DeviceName[1]; /* Path of namespace object */
859 } ACPI_IORT_NAMED_COMPONENT;
862 typedef struct acpi_iort_root_complex
864 UINT64 MemoryProperties; /* Memory access properties */
866 UINT32 PciSegmentNumber;
868 } ACPI_IORT_ROOT_COMPLEX;
870 /* Values for AtsAttribute field above */
872 #define ACPI_IORT_ATS_SUPPORTED 0x00000001 /* The root complex supports ATS */
873 #define ACPI_IORT_ATS_UNSUPPORTED 0x00000000 /* The root complex doesn't support ATS */
876 typedef struct acpi_iort_smmu
878 UINT64 BaseAddress; /* SMMU base address */
879 UINT64 Span; /* Length of memory range */
882 UINT32 GlobalInterruptOffset;
883 UINT32 ContextInterruptCount;
884 UINT32 ContextInterruptOffset;
885 UINT32 PmuInterruptCount;
886 UINT32 PmuInterruptOffset;
887 UINT64 Interrupts[1]; /* Interrupt array */
891 /* Values for Model field above */
893 #define ACPI_IORT_SMMU_V1 0x00000000 /* Generic SMMUv1 */
894 #define ACPI_IORT_SMMU_V2 0x00000001 /* Generic SMMUv2 */
895 #define ACPI_IORT_SMMU_CORELINK_MMU400 0x00000002 /* ARM Corelink MMU-400 */
896 #define ACPI_IORT_SMMU_CORELINK_MMU500 0x00000003 /* ARM Corelink MMU-500 */
898 /* Masks for Flags field above */
900 #define ACPI_IORT_SMMU_DVM_SUPPORTED (1)
901 #define ACPI_IORT_SMMU_COHERENT_WALK (1<<1)
904 /*******************************************************************************
906 * IVRS - I/O Virtualization Reporting Structure
909 * Conforms to "AMD I/O Virtualization Technology (IOMMU) Specification",
910 * Revision 1.26, February 2009.
912 ******************************************************************************/
914 typedef struct acpi_table_ivrs
916 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
917 UINT32 Info; /* Common virtualization info */
922 /* Values for Info field above */
924 #define ACPI_IVRS_PHYSICAL_SIZE 0x00007F00 /* 7 bits, physical address size */
925 #define ACPI_IVRS_VIRTUAL_SIZE 0x003F8000 /* 7 bits, virtual address size */
926 #define ACPI_IVRS_ATS_RESERVED 0x00400000 /* ATS address translation range reserved */
929 /* IVRS subtable header */
931 typedef struct acpi_ivrs_header
933 UINT8 Type; /* Subtable type */
935 UINT16 Length; /* Subtable length */
936 UINT16 DeviceId; /* ID of IOMMU */
940 /* Values for subtable Type above */
944 ACPI_IVRS_TYPE_HARDWARE = 0x10,
945 ACPI_IVRS_TYPE_MEMORY1 = 0x20,
946 ACPI_IVRS_TYPE_MEMORY2 = 0x21,
947 ACPI_IVRS_TYPE_MEMORY3 = 0x22
950 /* Masks for Flags field above for IVHD subtable */
952 #define ACPI_IVHD_TT_ENABLE (1)
953 #define ACPI_IVHD_PASS_PW (1<<1)
954 #define ACPI_IVHD_RES_PASS_PW (1<<2)
955 #define ACPI_IVHD_ISOC (1<<3)
956 #define ACPI_IVHD_IOTLB (1<<4)
958 /* Masks for Flags field above for IVMD subtable */
960 #define ACPI_IVMD_UNITY (1)
961 #define ACPI_IVMD_READ (1<<1)
962 #define ACPI_IVMD_WRITE (1<<2)
963 #define ACPI_IVMD_EXCLUSION_RANGE (1<<3)
967 * IVRS subtables, correspond to Type in ACPI_IVRS_HEADER
970 /* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */
972 typedef struct acpi_ivrs_hardware
974 ACPI_IVRS_HEADER Header;
975 UINT16 CapabilityOffset; /* Offset for IOMMU control fields */
976 UINT64 BaseAddress; /* IOMMU control registers */
977 UINT16 PciSegmentGroup;
978 UINT16 Info; /* MSI number and unit ID */
981 } ACPI_IVRS_HARDWARE;
983 /* Masks for Info field above */
985 #define ACPI_IVHD_MSI_NUMBER_MASK 0x001F /* 5 bits, MSI message number */
986 #define ACPI_IVHD_UNIT_ID_MASK 0x1F00 /* 5 bits, UnitID */
990 * Device Entries for IVHD subtable, appear after ACPI_IVRS_HARDWARE structure.
991 * Upper two bits of the Type field are the (encoded) length of the structure.
992 * Currently, only 4 and 8 byte entries are defined. 16 and 32 byte entries
993 * are reserved for future use but not defined.
995 typedef struct acpi_ivrs_de_header
1001 } ACPI_IVRS_DE_HEADER;
1003 /* Length of device entry is in the top two bits of Type field above */
1005 #define ACPI_IVHD_ENTRY_LENGTH 0xC0
1007 /* Values for device entry Type field above */
1009 enum AcpiIvrsDeviceEntryType
1011 /* 4-byte device entries, all use ACPI_IVRS_DEVICE4 */
1013 ACPI_IVRS_TYPE_PAD4 = 0,
1014 ACPI_IVRS_TYPE_ALL = 1,
1015 ACPI_IVRS_TYPE_SELECT = 2,
1016 ACPI_IVRS_TYPE_START = 3,
1017 ACPI_IVRS_TYPE_END = 4,
1019 /* 8-byte device entries */
1021 ACPI_IVRS_TYPE_PAD8 = 64,
1022 ACPI_IVRS_TYPE_NOT_USED = 65,
1023 ACPI_IVRS_TYPE_ALIAS_SELECT = 66, /* Uses ACPI_IVRS_DEVICE8A */
1024 ACPI_IVRS_TYPE_ALIAS_START = 67, /* Uses ACPI_IVRS_DEVICE8A */
1025 ACPI_IVRS_TYPE_EXT_SELECT = 70, /* Uses ACPI_IVRS_DEVICE8B */
1026 ACPI_IVRS_TYPE_EXT_START = 71, /* Uses ACPI_IVRS_DEVICE8B */
1027 ACPI_IVRS_TYPE_SPECIAL = 72 /* Uses ACPI_IVRS_DEVICE8C */
1030 /* Values for Data field above */
1032 #define ACPI_IVHD_INIT_PASS (1)
1033 #define ACPI_IVHD_EINT_PASS (1<<1)
1034 #define ACPI_IVHD_NMI_PASS (1<<2)
1035 #define ACPI_IVHD_SYSTEM_MGMT (3<<4)
1036 #define ACPI_IVHD_LINT0_PASS (1<<6)
1037 #define ACPI_IVHD_LINT1_PASS (1<<7)
1040 /* Types 0-4: 4-byte device entry */
1042 typedef struct acpi_ivrs_device4
1044 ACPI_IVRS_DE_HEADER Header;
1046 } ACPI_IVRS_DEVICE4;
1048 /* Types 66-67: 8-byte device entry */
1050 typedef struct acpi_ivrs_device8a
1052 ACPI_IVRS_DE_HEADER Header;
1057 } ACPI_IVRS_DEVICE8A;
1059 /* Types 70-71: 8-byte device entry */
1061 typedef struct acpi_ivrs_device8b
1063 ACPI_IVRS_DE_HEADER Header;
1064 UINT32 ExtendedData;
1066 } ACPI_IVRS_DEVICE8B;
1068 /* Values for ExtendedData above */
1070 #define ACPI_IVHD_ATS_DISABLED (1<<31)
1072 /* Type 72: 8-byte device entry */
1074 typedef struct acpi_ivrs_device8c
1076 ACPI_IVRS_DE_HEADER Header;
1081 } ACPI_IVRS_DEVICE8C;
1083 /* Values for Variety field above */
1085 #define ACPI_IVHD_IOAPIC 1
1086 #define ACPI_IVHD_HPET 2
1089 /* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */
1091 typedef struct acpi_ivrs_memory
1093 ACPI_IVRS_HEADER Header;
1096 UINT64 StartAddress;
1097 UINT64 MemoryLength;
1102 /*******************************************************************************
1104 * LPIT - Low Power Idle Table
1106 * Conforms to "ACPI Low Power Idle Table (LPIT)" July 2014.
1108 ******************************************************************************/
1110 typedef struct acpi_table_lpit
1112 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1117 /* LPIT subtable header */
1119 typedef struct acpi_lpit_header
1121 UINT32 Type; /* Subtable type */
1122 UINT32 Length; /* Subtable length */
1129 /* Values for subtable Type above */
1133 ACPI_LPIT_TYPE_NATIVE_CSTATE = 0x00,
1134 ACPI_LPIT_TYPE_RESERVED = 0x01 /* 1 and above are reserved */
1137 /* Masks for Flags field above */
1139 #define ACPI_LPIT_STATE_DISABLED (1)
1140 #define ACPI_LPIT_NO_COUNTER (1<<1)
1143 * LPIT subtables, correspond to Type in ACPI_LPIT_HEADER
1146 /* 0x00: Native C-state instruction based LPI structure */
1148 typedef struct acpi_lpit_native
1150 ACPI_LPIT_HEADER Header;
1151 ACPI_GENERIC_ADDRESS EntryTrigger;
1154 ACPI_GENERIC_ADDRESS ResidencyCounter;
1155 UINT64 CounterFrequency;
1160 /*******************************************************************************
1162 * MCFG - PCI Memory Mapped Configuration table and subtable
1165 * Conforms to "PCI Firmware Specification", Revision 3.0, June 20, 2005
1167 ******************************************************************************/
1169 typedef struct acpi_table_mcfg
1171 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1179 typedef struct acpi_mcfg_allocation
1181 UINT64 Address; /* Base address, processor-relative */
1182 UINT16 PciSegment; /* PCI segment group number */
1183 UINT8 StartBusNumber; /* Starting PCI Bus number */
1184 UINT8 EndBusNumber; /* Final PCI Bus number */
1187 } ACPI_MCFG_ALLOCATION;
1190 /*******************************************************************************
1192 * MCHI - Management Controller Host Interface Table
1195 * Conforms to "Management Component Transport Protocol (MCTP) Host
1196 * Interface Specification", Revision 1.0.0a, October 13, 2009
1198 ******************************************************************************/
1200 typedef struct acpi_table_mchi
1202 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1203 UINT8 InterfaceType;
1205 UINT64 ProtocolData;
1206 UINT8 InterruptType;
1208 UINT8 PciDeviceFlag;
1209 UINT32 GlobalInterrupt;
1210 ACPI_GENERIC_ADDRESS ControlRegister;
1219 /*******************************************************************************
1221 * MSDM - Microsoft Data Management table
1223 * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
1224 * November 29, 2011. Copyright 2011 Microsoft
1226 ******************************************************************************/
1228 /* Basic MSDM table is only the common ACPI header */
1230 typedef struct acpi_table_msdm
1232 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1237 /*******************************************************************************
1239 * MTMR - MID Timer Table
1242 * Conforms to "Simple Firmware Interface Specification",
1243 * Draft 0.8.2, Oct 19, 2010
1244 * NOTE: The ACPI MTMR is equivalent to the SFI MTMR table.
1246 ******************************************************************************/
1248 typedef struct acpi_table_mtmr
1250 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1256 typedef struct acpi_mtmr_entry
1258 ACPI_GENERIC_ADDRESS PhysicalAddress;
1265 /*******************************************************************************
1267 * SLIC - Software Licensing Description Table
1269 * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
1270 * November 29, 2011. Copyright 2011 Microsoft
1272 ******************************************************************************/
1274 /* Basic SLIC table is only the common ACPI header */
1276 typedef struct acpi_table_slic
1278 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1283 /*******************************************************************************
1285 * SPCR - Serial Port Console Redirection table
1288 * Conforms to "Serial Port Console Redirection Table",
1289 * Version 1.00, January 11, 2002
1291 ******************************************************************************/
1293 typedef struct acpi_table_spcr
1295 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1296 UINT8 InterfaceType; /* 0=full 16550, 1=subset of 16550 */
1298 ACPI_GENERIC_ADDRESS SerialPort;
1299 UINT8 InterruptType;
1319 /* Masks for PciFlags field above */
1321 #define ACPI_SPCR_DO_NOT_DISABLE (1)
1324 /*******************************************************************************
1326 * SPMI - Server Platform Management Interface table
1329 * Conforms to "Intelligent Platform Management Interface Specification
1330 * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with
1331 * June 12, 2009 markup.
1333 ******************************************************************************/
1335 typedef struct acpi_table_spmi
1337 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1338 UINT8 InterfaceType;
1339 UINT8 Reserved; /* Must be 1 */
1340 UINT16 SpecRevision; /* Version of IPMI */
1341 UINT8 InterruptType;
1342 UINT8 GpeNumber; /* GPE assigned */
1344 UINT8 PciDeviceFlag;
1346 ACPI_GENERIC_ADDRESS IpmiRegister;
1355 /* Values for InterfaceType above */
1357 enum AcpiSpmiInterfaceTypes
1359 ACPI_SPMI_NOT_USED = 0,
1360 ACPI_SPMI_KEYBOARD = 1,
1362 ACPI_SPMI_BLOCK_TRANSFER = 3,
1363 ACPI_SPMI_SMBUS = 4,
1364 ACPI_SPMI_RESERVED = 5 /* 5 and above are reserved */
1368 /*******************************************************************************
1370 * TCPA - Trusted Computing Platform Alliance table
1373 * Conforms to "TCG PC Specific Implementation Specification",
1374 * Version 1.1, August 18, 2003
1376 ******************************************************************************/
1378 typedef struct acpi_table_tcpa
1380 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1382 UINT32 MaxLogLength; /* Maximum length for the event log area */
1383 UINT64 LogAddress; /* Address of the event log area */
1388 /*******************************************************************************
1390 * UEFI - UEFI Boot optimization Table
1393 * Conforms to "Unified Extensible Firmware Interface Specification",
1394 * Version 2.3, May 8, 2009
1396 ******************************************************************************/
1398 typedef struct acpi_table_uefi
1400 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1401 UINT8 Identifier[16]; /* UUID identifier */
1402 UINT16 DataOffset; /* Offset of remaining data in table */
1407 /*******************************************************************************
1409 * VRTC - Virtual Real Time Clock Table
1412 * Conforms to "Simple Firmware Interface Specification",
1413 * Draft 0.8.2, Oct 19, 2010
1414 * NOTE: The ACPI VRTC is equivalent to The SFI MRTC table.
1416 ******************************************************************************/
1418 typedef struct acpi_table_vrtc
1420 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1426 typedef struct acpi_vrtc_entry
1428 ACPI_GENERIC_ADDRESS PhysicalAddress;
1434 /*******************************************************************************
1436 * WAET - Windows ACPI Emulated devices Table
1439 * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009
1441 ******************************************************************************/
1443 typedef struct acpi_table_waet
1445 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1450 /* Masks for Flags field above */
1452 #define ACPI_WAET_RTC_NO_ACK (1) /* RTC requires no int acknowledge */
1453 #define ACPI_WAET_TIMER_ONE_READ (1<<1) /* PM timer requires only one read */
1456 /*******************************************************************************
1458 * WDAT - Watchdog Action Table
1461 * Conforms to "Hardware Watchdog Timers Design Specification",
1462 * Copyright 2006 Microsoft Corporation.
1464 ******************************************************************************/
1466 typedef struct acpi_table_wdat
1468 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1469 UINT32 HeaderLength; /* Watchdog Header Length */
1470 UINT16 PciSegment; /* PCI Segment number */
1471 UINT8 PciBus; /* PCI Bus number */
1472 UINT8 PciDevice; /* PCI Device number */
1473 UINT8 PciFunction; /* PCI Function number */
1475 UINT32 TimerPeriod; /* Period of one timer count (msec) */
1476 UINT32 MaxCount; /* Maximum counter value supported */
1477 UINT32 MinCount; /* Minimum counter value */
1480 UINT32 Entries; /* Number of watchdog entries that follow */
1484 /* Masks for Flags field above */
1486 #define ACPI_WDAT_ENABLED (1)
1487 #define ACPI_WDAT_STOPPED 0x80
1490 /* WDAT Instruction Entries (actions) */
1492 typedef struct acpi_wdat_entry
1497 ACPI_GENERIC_ADDRESS RegisterRegion;
1498 UINT32 Value; /* Value used with Read/Write register */
1499 UINT32 Mask; /* Bitmask required for this register instruction */
1503 /* Values for Action field above */
1505 enum AcpiWdatActions
1507 ACPI_WDAT_RESET = 1,
1508 ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
1509 ACPI_WDAT_GET_COUNTDOWN = 5,
1510 ACPI_WDAT_SET_COUNTDOWN = 6,
1511 ACPI_WDAT_GET_RUNNING_STATE = 8,
1512 ACPI_WDAT_SET_RUNNING_STATE = 9,
1513 ACPI_WDAT_GET_STOPPED_STATE = 10,
1514 ACPI_WDAT_SET_STOPPED_STATE = 11,
1515 ACPI_WDAT_GET_REBOOT = 16,
1516 ACPI_WDAT_SET_REBOOT = 17,
1517 ACPI_WDAT_GET_SHUTDOWN = 18,
1518 ACPI_WDAT_SET_SHUTDOWN = 19,
1519 ACPI_WDAT_GET_STATUS = 32,
1520 ACPI_WDAT_SET_STATUS = 33,
1521 ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */
1524 /* Values for Instruction field above */
1526 enum AcpiWdatInstructions
1528 ACPI_WDAT_READ_VALUE = 0,
1529 ACPI_WDAT_READ_COUNTDOWN = 1,
1530 ACPI_WDAT_WRITE_VALUE = 2,
1531 ACPI_WDAT_WRITE_COUNTDOWN = 3,
1532 ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */
1533 ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */
1537 /*******************************************************************************
1539 * WDDT - Watchdog Descriptor Table
1542 * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",
1543 * Version 001, September 2002
1545 ******************************************************************************/
1547 typedef struct acpi_table_wddt
1549 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1551 UINT16 TableVersion;
1553 ACPI_GENERIC_ADDRESS Address;
1554 UINT16 MaxCount; /* Maximum counter value supported */
1555 UINT16 MinCount; /* Minimum counter value supported */
1562 /* Flags for Status field above */
1564 #define ACPI_WDDT_AVAILABLE (1)
1565 #define ACPI_WDDT_ACTIVE (1<<1)
1566 #define ACPI_WDDT_TCO_OS_OWNED (1<<2)
1567 #define ACPI_WDDT_USER_RESET (1<<11)
1568 #define ACPI_WDDT_WDT_RESET (1<<12)
1569 #define ACPI_WDDT_POWER_FAIL (1<<13)
1570 #define ACPI_WDDT_UNKNOWN_RESET (1<<14)
1572 /* Flags for Capability field above */
1574 #define ACPI_WDDT_AUTO_RESET (1)
1575 #define ACPI_WDDT_ALERT_SUPPORT (1<<1)
1578 /*******************************************************************************
1580 * WDRT - Watchdog Resource Table
1583 * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",
1584 * Version 1.01, August 28, 2006
1586 ******************************************************************************/
1588 typedef struct acpi_table_wdrt
1590 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1591 ACPI_GENERIC_ADDRESS ControlRegister;
1592 ACPI_GENERIC_ADDRESS CountRegister;
1595 UINT8 PciBus; /* PCI Bus number */
1596 UINT8 PciDevice; /* PCI Device number */
1597 UINT8 PciFunction; /* PCI Function number */
1598 UINT8 PciSegment; /* PCI Segment number */
1599 UINT16 MaxCount; /* Maximum counter value supported */
1605 /* Reset to default packing */
1609 #endif /* __ACTBL2_H__ */