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)
474 /* DMAR subtable header */
476 typedef struct acpi_dmar_header
483 /* Values for subtable type in ACPI_DMAR_HEADER */
487 ACPI_DMAR_TYPE_HARDWARE_UNIT
= 0,
488 ACPI_DMAR_TYPE_RESERVED_MEMORY
= 1,
489 ACPI_DMAR_TYPE_ROOT_ATS
= 2,
490 ACPI_DMAR_TYPE_HARDWARE_AFFINITY
= 3,
491 ACPI_DMAR_TYPE_NAMESPACE
= 4,
492 ACPI_DMAR_TYPE_RESERVED
= 5 /* 5 and greater are reserved */
496 /* DMAR Device Scope structure */
498 typedef struct acpi_dmar_device_scope
506 } ACPI_DMAR_DEVICE_SCOPE
;
508 /* Values for EntryType in ACPI_DMAR_DEVICE_SCOPE - device types */
510 enum AcpiDmarScopeType
512 ACPI_DMAR_SCOPE_TYPE_NOT_USED
= 0,
513 ACPI_DMAR_SCOPE_TYPE_ENDPOINT
= 1,
514 ACPI_DMAR_SCOPE_TYPE_BRIDGE
= 2,
515 ACPI_DMAR_SCOPE_TYPE_IOAPIC
= 3,
516 ACPI_DMAR_SCOPE_TYPE_HPET
= 4,
517 ACPI_DMAR_SCOPE_TYPE_NAMESPACE
= 5,
518 ACPI_DMAR_SCOPE_TYPE_RESERVED
= 6 /* 6 and greater are reserved */
521 typedef struct acpi_dmar_pci_path
526 } ACPI_DMAR_PCI_PATH
;
530 * DMAR Subtables, correspond to Type in ACPI_DMAR_HEADER
533 /* 0: Hardware Unit Definition */
535 typedef struct acpi_dmar_hardware_unit
537 ACPI_DMAR_HEADER Header
;
541 UINT64 Address
; /* Register Base Address */
543 } ACPI_DMAR_HARDWARE_UNIT
;
545 /* Masks for Flags field above */
547 #define ACPI_DMAR_INCLUDE_ALL (1)
550 /* 1: Reserved Memory Defininition */
552 typedef struct acpi_dmar_reserved_memory
554 ACPI_DMAR_HEADER Header
;
557 UINT64 BaseAddress
; /* 4K aligned base address */
558 UINT64 EndAddress
; /* 4K aligned limit address */
560 } ACPI_DMAR_RESERVED_MEMORY
;
562 /* Masks for Flags field above */
564 #define ACPI_DMAR_ALLOW_ALL (1)
567 /* 2: Root Port ATS Capability Reporting Structure */
569 typedef struct acpi_dmar_atsr
571 ACPI_DMAR_HEADER Header
;
578 /* Masks for Flags field above */
580 #define ACPI_DMAR_ALL_PORTS (1)
583 /* 3: Remapping Hardware Static Affinity Structure */
585 typedef struct acpi_dmar_rhsa
587 ACPI_DMAR_HEADER Header
;
590 UINT32 ProximityDomain
;
595 /* 4: ACPI Namespace Device Declaration Structure */
597 typedef struct acpi_dmar_andd
599 ACPI_DMAR_HEADER Header
;
607 /*******************************************************************************
609 * HPET - High Precision Event Timer table
612 * Conforms to "IA-PC HPET (High Precision Event Timers) Specification",
613 * Version 1.0a, October 2004
615 ******************************************************************************/
617 typedef struct acpi_table_hpet
619 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
620 UINT32 Id
; /* Hardware ID of event timer block */
621 ACPI_GENERIC_ADDRESS Address
; /* Address of event timer block */
622 UINT8 Sequence
; /* HPET sequence number */
623 UINT16 MinimumTick
; /* Main counter min tick, periodic mode */
628 /* Masks for Flags field above */
630 #define ACPI_HPET_PAGE_PROTECT_MASK (3)
632 /* Values for Page Protect flags */
634 enum AcpiHpetPageProtect
636 ACPI_HPET_NO_PAGE_PROTECT
= 0,
637 ACPI_HPET_PAGE_PROTECT4
= 1,
638 ACPI_HPET_PAGE_PROTECT64
= 2
642 /*******************************************************************************
644 * IBFT - Boot Firmware Table
647 * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b
648 * Specification", Version 1.01, March 1, 2007
650 * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
651 * Therefore, it is not currently supported by the disassembler.
653 ******************************************************************************/
655 typedef struct acpi_table_ibft
657 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
663 /* IBFT common subtable header */
665 typedef struct acpi_ibft_header
675 /* Values for Type field above */
679 ACPI_IBFT_TYPE_NOT_USED
= 0,
680 ACPI_IBFT_TYPE_CONTROL
= 1,
681 ACPI_IBFT_TYPE_INITIATOR
= 2,
682 ACPI_IBFT_TYPE_NIC
= 3,
683 ACPI_IBFT_TYPE_TARGET
= 4,
684 ACPI_IBFT_TYPE_EXTENSIONS
= 5,
685 ACPI_IBFT_TYPE_RESERVED
= 6 /* 6 and greater are reserved */
691 typedef struct acpi_ibft_control
693 ACPI_IBFT_HEADER Header
;
695 UINT16 InitiatorOffset
;
697 UINT16 Target0Offset
;
699 UINT16 Target1Offset
;
703 typedef struct acpi_ibft_initiator
705 ACPI_IBFT_HEADER Header
;
708 UINT8 PrimaryServer
[16];
709 UINT8 SecondaryServer
[16];
713 } ACPI_IBFT_INITIATOR
;
715 typedef struct acpi_ibft_nic
717 ACPI_IBFT_HEADER Header
;
719 UINT8 SubnetMaskPrefix
;
722 UINT8 PrimaryDns
[16];
723 UINT8 SecondaryDns
[16];
733 typedef struct acpi_ibft_target
735 ACPI_IBFT_HEADER Header
;
736 UINT8 TargetIpAddress
[16];
737 UINT16 TargetIpSocket
;
738 UINT8 TargetBootLun
[8];
740 UINT8 NicAssociation
;
741 UINT16 TargetNameLength
;
742 UINT16 TargetNameOffset
;
743 UINT16 ChapNameLength
;
744 UINT16 ChapNameOffset
;
745 UINT16 ChapSecretLength
;
746 UINT16 ChapSecretOffset
;
747 UINT16 ReverseChapNameLength
;
748 UINT16 ReverseChapNameOffset
;
749 UINT16 ReverseChapSecretLength
;
750 UINT16 ReverseChapSecretOffset
;
755 /*******************************************************************************
757 * IORT - IO Remapping Table
759 * Conforms to "IO Remapping Table System Software on ARM Platforms",
760 * Document number: ARM DEN 0049A, 2015
762 ******************************************************************************/
764 typedef struct acpi_table_iort
766 ACPI_TABLE_HEADER Header
;
777 typedef struct acpi_iort_node
784 UINT32 MappingOffset
;
789 /* Values for subtable Type above */
791 enum AcpiIortNodeType
793 ACPI_IORT_NODE_ITS_GROUP
= 0x00,
794 ACPI_IORT_NODE_NAMED_COMPONENT
= 0x01,
795 ACPI_IORT_NODE_PCI_ROOT_COMPLEX
= 0x02,
796 ACPI_IORT_NODE_SMMU
= 0x03
800 typedef struct acpi_iort_id_mapping
802 UINT32 InputBase
; /* Lowest value in input range */
803 UINT32 IdCount
; /* Number of IDs */
804 UINT32 OutputBase
; /* Lowest value in output range */
805 UINT32 OutputReference
; /* A reference to the output node */
808 } ACPI_IORT_ID_MAPPING
;
810 /* Masks for Flags field above for IORT subtable */
812 #define ACPI_IORT_ID_SINGLE_MAPPING (1)
815 typedef struct acpi_iort_memory_access
817 UINT32 CacheCoherency
;
822 } ACPI_IORT_MEMORY_ACCESS
;
824 /* Values for CacheCoherency field above */
826 #define ACPI_IORT_NODE_COHERENT 0x00000001 /* The device node is fully coherent */
827 #define ACPI_IORT_NODE_NOT_COHERENT 0x00000000 /* The device node is not coherent */
829 /* Masks for Hints field above */
831 #define ACPI_IORT_HT_TRANSIENT (1)
832 #define ACPI_IORT_HT_WRITE (1<<1)
833 #define ACPI_IORT_HT_READ (1<<2)
834 #define ACPI_IORT_HT_OVERRIDE (1<<3)
836 /* Masks for MemoryFlags field above */
838 #define ACPI_IORT_MF_COHERENCY (1)
839 #define ACPI_IORT_MF_ATTRIBUTES (1<<1)
843 * IORT node specific subtables
845 typedef struct acpi_iort_its_group
848 UINT32 Identifiers
[1]; /* GIC ITS identifier arrary */
850 } ACPI_IORT_ITS_GROUP
;
853 typedef struct acpi_iort_named_component
856 UINT64 MemoryProperties
; /* Memory access properties */
857 UINT8 MemoryAddressLimit
; /* Memory address size limit */
858 char DeviceName
[1]; /* Path of namespace object */
860 } ACPI_IORT_NAMED_COMPONENT
;
863 typedef struct acpi_iort_root_complex
865 UINT64 MemoryProperties
; /* Memory access properties */
867 UINT32 PciSegmentNumber
;
869 } ACPI_IORT_ROOT_COMPLEX
;
871 /* Values for AtsAttribute field above */
873 #define ACPI_IORT_ATS_SUPPORTED 0x00000001 /* The root complex supports ATS */
874 #define ACPI_IORT_ATS_UNSUPPORTED 0x00000000 /* The root complex doesn't support ATS */
877 typedef struct acpi_iort_smmu
879 UINT64 BaseAddress
; /* SMMU base address */
880 UINT64 Span
; /* Length of memory range */
883 UINT32 GlobalInterruptOffset
;
884 UINT32 ContextInterruptCount
;
885 UINT32 ContextInterruptOffset
;
886 UINT32 PmuInterruptCount
;
887 UINT32 PmuInterruptOffset
;
888 UINT64 Interrupts
[1]; /* Interrupt array */
892 /* Values for Model field above */
894 #define ACPI_IORT_SMMU_V1 0x00000000 /* Generic SMMUv1 */
895 #define ACPI_IORT_SMMU_V2 0x00000001 /* Generic SMMUv2 */
896 #define ACPI_IORT_SMMU_CORELINK_MMU400 0x00000002 /* ARM Corelink MMU-400 */
897 #define ACPI_IORT_SMMU_CORELINK_MMU500 0x00000003 /* ARM Corelink MMU-500 */
899 /* Masks for Flags field above */
901 #define ACPI_IORT_SMMU_DVM_SUPPORTED (1)
902 #define ACPI_IORT_SMMU_COHERENT_WALK (1<<1)
905 /*******************************************************************************
907 * IVRS - I/O Virtualization Reporting Structure
910 * Conforms to "AMD I/O Virtualization Technology (IOMMU) Specification",
911 * Revision 1.26, February 2009.
913 ******************************************************************************/
915 typedef struct acpi_table_ivrs
917 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
918 UINT32 Info
; /* Common virtualization info */
923 /* Values for Info field above */
925 #define ACPI_IVRS_PHYSICAL_SIZE 0x00007F00 /* 7 bits, physical address size */
926 #define ACPI_IVRS_VIRTUAL_SIZE 0x003F8000 /* 7 bits, virtual address size */
927 #define ACPI_IVRS_ATS_RESERVED 0x00400000 /* ATS address translation range reserved */
930 /* IVRS subtable header */
932 typedef struct acpi_ivrs_header
934 UINT8 Type
; /* Subtable type */
936 UINT16 Length
; /* Subtable length */
937 UINT16 DeviceId
; /* ID of IOMMU */
941 /* Values for subtable Type above */
945 ACPI_IVRS_TYPE_HARDWARE
= 0x10,
946 ACPI_IVRS_TYPE_MEMORY1
= 0x20,
947 ACPI_IVRS_TYPE_MEMORY2
= 0x21,
948 ACPI_IVRS_TYPE_MEMORY3
= 0x22
951 /* Masks for Flags field above for IVHD subtable */
953 #define ACPI_IVHD_TT_ENABLE (1)
954 #define ACPI_IVHD_PASS_PW (1<<1)
955 #define ACPI_IVHD_RES_PASS_PW (1<<2)
956 #define ACPI_IVHD_ISOC (1<<3)
957 #define ACPI_IVHD_IOTLB (1<<4)
959 /* Masks for Flags field above for IVMD subtable */
961 #define ACPI_IVMD_UNITY (1)
962 #define ACPI_IVMD_READ (1<<1)
963 #define ACPI_IVMD_WRITE (1<<2)
964 #define ACPI_IVMD_EXCLUSION_RANGE (1<<3)
968 * IVRS subtables, correspond to Type in ACPI_IVRS_HEADER
971 /* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */
973 typedef struct acpi_ivrs_hardware
975 ACPI_IVRS_HEADER Header
;
976 UINT16 CapabilityOffset
; /* Offset for IOMMU control fields */
977 UINT64 BaseAddress
; /* IOMMU control registers */
978 UINT16 PciSegmentGroup
;
979 UINT16 Info
; /* MSI number and unit ID */
982 } ACPI_IVRS_HARDWARE
;
984 /* Masks for Info field above */
986 #define ACPI_IVHD_MSI_NUMBER_MASK 0x001F /* 5 bits, MSI message number */
987 #define ACPI_IVHD_UNIT_ID_MASK 0x1F00 /* 5 bits, UnitID */
991 * Device Entries for IVHD subtable, appear after ACPI_IVRS_HARDWARE structure.
992 * Upper two bits of the Type field are the (encoded) length of the structure.
993 * Currently, only 4 and 8 byte entries are defined. 16 and 32 byte entries
994 * are reserved for future use but not defined.
996 typedef struct acpi_ivrs_de_header
1002 } ACPI_IVRS_DE_HEADER
;
1004 /* Length of device entry is in the top two bits of Type field above */
1006 #define ACPI_IVHD_ENTRY_LENGTH 0xC0
1008 /* Values for device entry Type field above */
1010 enum AcpiIvrsDeviceEntryType
1012 /* 4-byte device entries, all use ACPI_IVRS_DEVICE4 */
1014 ACPI_IVRS_TYPE_PAD4
= 0,
1015 ACPI_IVRS_TYPE_ALL
= 1,
1016 ACPI_IVRS_TYPE_SELECT
= 2,
1017 ACPI_IVRS_TYPE_START
= 3,
1018 ACPI_IVRS_TYPE_END
= 4,
1020 /* 8-byte device entries */
1022 ACPI_IVRS_TYPE_PAD8
= 64,
1023 ACPI_IVRS_TYPE_NOT_USED
= 65,
1024 ACPI_IVRS_TYPE_ALIAS_SELECT
= 66, /* Uses ACPI_IVRS_DEVICE8A */
1025 ACPI_IVRS_TYPE_ALIAS_START
= 67, /* Uses ACPI_IVRS_DEVICE8A */
1026 ACPI_IVRS_TYPE_EXT_SELECT
= 70, /* Uses ACPI_IVRS_DEVICE8B */
1027 ACPI_IVRS_TYPE_EXT_START
= 71, /* Uses ACPI_IVRS_DEVICE8B */
1028 ACPI_IVRS_TYPE_SPECIAL
= 72 /* Uses ACPI_IVRS_DEVICE8C */
1031 /* Values for Data field above */
1033 #define ACPI_IVHD_INIT_PASS (1)
1034 #define ACPI_IVHD_EINT_PASS (1<<1)
1035 #define ACPI_IVHD_NMI_PASS (1<<2)
1036 #define ACPI_IVHD_SYSTEM_MGMT (3<<4)
1037 #define ACPI_IVHD_LINT0_PASS (1<<6)
1038 #define ACPI_IVHD_LINT1_PASS (1<<7)
1041 /* Types 0-4: 4-byte device entry */
1043 typedef struct acpi_ivrs_device4
1045 ACPI_IVRS_DE_HEADER Header
;
1047 } ACPI_IVRS_DEVICE4
;
1049 /* Types 66-67: 8-byte device entry */
1051 typedef struct acpi_ivrs_device8a
1053 ACPI_IVRS_DE_HEADER Header
;
1058 } ACPI_IVRS_DEVICE8A
;
1060 /* Types 70-71: 8-byte device entry */
1062 typedef struct acpi_ivrs_device8b
1064 ACPI_IVRS_DE_HEADER Header
;
1065 UINT32 ExtendedData
;
1067 } ACPI_IVRS_DEVICE8B
;
1069 /* Values for ExtendedData above */
1071 #define ACPI_IVHD_ATS_DISABLED (1<<31)
1073 /* Type 72: 8-byte device entry */
1075 typedef struct acpi_ivrs_device8c
1077 ACPI_IVRS_DE_HEADER Header
;
1082 } ACPI_IVRS_DEVICE8C
;
1084 /* Values for Variety field above */
1086 #define ACPI_IVHD_IOAPIC 1
1087 #define ACPI_IVHD_HPET 2
1090 /* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */
1092 typedef struct acpi_ivrs_memory
1094 ACPI_IVRS_HEADER Header
;
1097 UINT64 StartAddress
;
1098 UINT64 MemoryLength
;
1103 /*******************************************************************************
1105 * LPIT - Low Power Idle Table
1107 * Conforms to "ACPI Low Power Idle Table (LPIT)" July 2014.
1109 ******************************************************************************/
1111 typedef struct acpi_table_lpit
1113 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
1118 /* LPIT subtable header */
1120 typedef struct acpi_lpit_header
1122 UINT32 Type
; /* Subtable type */
1123 UINT32 Length
; /* Subtable length */
1130 /* Values for subtable Type above */
1134 ACPI_LPIT_TYPE_NATIVE_CSTATE
= 0x00,
1135 ACPI_LPIT_TYPE_RESERVED
= 0x01 /* 1 and above are reserved */
1138 /* Masks for Flags field above */
1140 #define ACPI_LPIT_STATE_DISABLED (1)
1141 #define ACPI_LPIT_NO_COUNTER (1<<1)
1144 * LPIT subtables, correspond to Type in ACPI_LPIT_HEADER
1147 /* 0x00: Native C-state instruction based LPI structure */
1149 typedef struct acpi_lpit_native
1151 ACPI_LPIT_HEADER Header
;
1152 ACPI_GENERIC_ADDRESS EntryTrigger
;
1155 ACPI_GENERIC_ADDRESS ResidencyCounter
;
1156 UINT64 CounterFrequency
;
1161 /*******************************************************************************
1163 * MCFG - PCI Memory Mapped Configuration table and subtable
1166 * Conforms to "PCI Firmware Specification", Revision 3.0, June 20, 2005
1168 ******************************************************************************/
1170 typedef struct acpi_table_mcfg
1172 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
1180 typedef struct acpi_mcfg_allocation
1182 UINT64 Address
; /* Base address, processor-relative */
1183 UINT16 PciSegment
; /* PCI segment group number */
1184 UINT8 StartBusNumber
; /* Starting PCI Bus number */
1185 UINT8 EndBusNumber
; /* Final PCI Bus number */
1188 } ACPI_MCFG_ALLOCATION
;
1191 /*******************************************************************************
1193 * MCHI - Management Controller Host Interface Table
1196 * Conforms to "Management Component Transport Protocol (MCTP) Host
1197 * Interface Specification", Revision 1.0.0a, October 13, 2009
1199 ******************************************************************************/
1201 typedef struct acpi_table_mchi
1203 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
1204 UINT8 InterfaceType
;
1206 UINT64 ProtocolData
;
1207 UINT8 InterruptType
;
1209 UINT8 PciDeviceFlag
;
1210 UINT32 GlobalInterrupt
;
1211 ACPI_GENERIC_ADDRESS ControlRegister
;
1220 /*******************************************************************************
1222 * MSDM - Microsoft Data Management table
1224 * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
1225 * November 29, 2011. Copyright 2011 Microsoft
1227 ******************************************************************************/
1229 /* Basic MSDM table is only the common ACPI header */
1231 typedef struct acpi_table_msdm
1233 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
1238 /*******************************************************************************
1240 * MTMR - MID Timer Table
1243 * Conforms to "Simple Firmware Interface Specification",
1244 * Draft 0.8.2, Oct 19, 2010
1245 * NOTE: The ACPI MTMR is equivalent to the SFI MTMR table.
1247 ******************************************************************************/
1249 typedef struct acpi_table_mtmr
1251 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
1257 typedef struct acpi_mtmr_entry
1259 ACPI_GENERIC_ADDRESS PhysicalAddress
;
1266 /*******************************************************************************
1268 * SLIC - Software Licensing Description Table
1270 * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
1271 * November 29, 2011. Copyright 2011 Microsoft
1273 ******************************************************************************/
1275 /* Basic SLIC table is only the common ACPI header */
1277 typedef struct acpi_table_slic
1279 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
1284 /*******************************************************************************
1286 * SPCR - Serial Port Console Redirection table
1289 * Conforms to "Serial Port Console Redirection Table",
1290 * Version 1.00, January 11, 2002
1292 ******************************************************************************/
1294 typedef struct acpi_table_spcr
1296 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
1297 UINT8 InterfaceType
; /* 0=full 16550, 1=subset of 16550 */
1299 ACPI_GENERIC_ADDRESS SerialPort
;
1300 UINT8 InterruptType
;
1320 /* Masks for PciFlags field above */
1322 #define ACPI_SPCR_DO_NOT_DISABLE (1)
1325 /*******************************************************************************
1327 * SPMI - Server Platform Management Interface table
1330 * Conforms to "Intelligent Platform Management Interface Specification
1331 * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with
1332 * June 12, 2009 markup.
1334 ******************************************************************************/
1336 typedef struct acpi_table_spmi
1338 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
1339 UINT8 InterfaceType
;
1340 UINT8 Reserved
; /* Must be 1 */
1341 UINT16 SpecRevision
; /* Version of IPMI */
1342 UINT8 InterruptType
;
1343 UINT8 GpeNumber
; /* GPE assigned */
1345 UINT8 PciDeviceFlag
;
1347 ACPI_GENERIC_ADDRESS IpmiRegister
;
1356 /* Values for InterfaceType above */
1358 enum AcpiSpmiInterfaceTypes
1360 ACPI_SPMI_NOT_USED
= 0,
1361 ACPI_SPMI_KEYBOARD
= 1,
1363 ACPI_SPMI_BLOCK_TRANSFER
= 3,
1364 ACPI_SPMI_SMBUS
= 4,
1365 ACPI_SPMI_RESERVED
= 5 /* 5 and above are reserved */
1369 /*******************************************************************************
1371 * TCPA - Trusted Computing Platform Alliance table
1374 * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
1377 * NOTE: There are two versions of the table with the same signature --
1378 * the client version and the server version. The common PlatformClass
1379 * field is used to differentiate the two types of tables.
1381 ******************************************************************************/
1383 typedef struct acpi_table_tcpa_hdr
1385 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
1386 UINT16 PlatformClass
;
1388 } ACPI_TABLE_TCPA_HDR
;
1391 * Values for PlatformClass above.
1392 * This is how the client and server subtables are differentiated
1394 #define ACPI_TCPA_CLIENT_TABLE 0
1395 #define ACPI_TCPA_SERVER_TABLE 1
1398 typedef struct acpi_table_tcpa_client
1400 UINT32 MinimumLogLength
; /* Minimum length for the event log area */
1401 UINT64 LogAddress
; /* Address of the event log area */
1403 } ACPI_TABLE_TCPA_CLIENT
;
1405 typedef struct acpi_table_tcpa_server
1408 UINT64 MinimumLogLength
; /* Minimum length for the event log area */
1409 UINT64 LogAddress
; /* Address of the event log area */
1410 UINT16 SpecRevision
;
1412 UINT8 InterruptFlags
;
1415 UINT32 GlobalInterrupt
;
1416 ACPI_GENERIC_ADDRESS Address
;
1418 ACPI_GENERIC_ADDRESS ConfigAddress
;
1420 UINT8 Bus
; /* PCI Bus/Segment/Function numbers */
1424 } ACPI_TABLE_TCPA_SERVER
;
1426 /* Values for DeviceFlags above */
1428 #define ACPI_TCPA_PCI_DEVICE (1)
1429 #define ACPI_TCPA_BUS_PNP (1<<1)
1430 #define ACPI_TCPA_ADDRESS_VALID (1<<2)
1432 /* Values for InterruptFlags above */
1434 #define ACPI_TCPA_INTERRUPT_MODE (1)
1435 #define ACPI_TCPA_INTERRUPT_POLARITY (1<<1)
1436 #define ACPI_TCPA_SCI_VIA_GPE (1<<2)
1437 #define ACPI_TCPA_GLOBAL_INTERRUPT (1<<3)
1440 /*******************************************************************************
1442 * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
1445 * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
1448 ******************************************************************************/
1450 typedef struct acpi_table_tpm2
1452 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
1453 UINT16 PlatformClass
;
1455 UINT64 ControlAddress
;
1458 /* Platform-specific data follows */
1462 /* Values for StartMethod above */
1464 #define ACPI_TPM2_NOT_ALLOWED 0
1465 #define ACPI_TPM2_START_METHOD 2
1466 #define ACPI_TPM2_MEMORY_MAPPED 6
1467 #define ACPI_TPM2_COMMAND_BUFFER 7
1468 #define ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD 8
1471 /*******************************************************************************
1473 * UEFI - UEFI Boot optimization Table
1476 * Conforms to "Unified Extensible Firmware Interface Specification",
1477 * Version 2.3, May 8, 2009
1479 ******************************************************************************/
1481 typedef struct acpi_table_uefi
1483 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
1484 UINT8 Identifier
[16]; /* UUID identifier */
1485 UINT16 DataOffset
; /* Offset of remaining data in table */
1490 /*******************************************************************************
1492 * VRTC - Virtual Real Time Clock Table
1495 * Conforms to "Simple Firmware Interface Specification",
1496 * Draft 0.8.2, Oct 19, 2010
1497 * NOTE: The ACPI VRTC is equivalent to The SFI MRTC table.
1499 ******************************************************************************/
1501 typedef struct acpi_table_vrtc
1503 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
1509 typedef struct acpi_vrtc_entry
1511 ACPI_GENERIC_ADDRESS PhysicalAddress
;
1517 /*******************************************************************************
1519 * WAET - Windows ACPI Emulated devices Table
1522 * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009
1524 ******************************************************************************/
1526 typedef struct acpi_table_waet
1528 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
1533 /* Masks for Flags field above */
1535 #define ACPI_WAET_RTC_NO_ACK (1) /* RTC requires no int acknowledge */
1536 #define ACPI_WAET_TIMER_ONE_READ (1<<1) /* PM timer requires only one read */
1539 /*******************************************************************************
1541 * WDAT - Watchdog Action Table
1544 * Conforms to "Hardware Watchdog Timers Design Specification",
1545 * Copyright 2006 Microsoft Corporation.
1547 ******************************************************************************/
1549 typedef struct acpi_table_wdat
1551 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
1552 UINT32 HeaderLength
; /* Watchdog Header Length */
1553 UINT16 PciSegment
; /* PCI Segment number */
1554 UINT8 PciBus
; /* PCI Bus number */
1555 UINT8 PciDevice
; /* PCI Device number */
1556 UINT8 PciFunction
; /* PCI Function number */
1558 UINT32 TimerPeriod
; /* Period of one timer count (msec) */
1559 UINT32 MaxCount
; /* Maximum counter value supported */
1560 UINT32 MinCount
; /* Minimum counter value */
1563 UINT32 Entries
; /* Number of watchdog entries that follow */
1567 /* Masks for Flags field above */
1569 #define ACPI_WDAT_ENABLED (1)
1570 #define ACPI_WDAT_STOPPED 0x80
1573 /* WDAT Instruction Entries (actions) */
1575 typedef struct acpi_wdat_entry
1580 ACPI_GENERIC_ADDRESS RegisterRegion
;
1581 UINT32 Value
; /* Value used with Read/Write register */
1582 UINT32 Mask
; /* Bitmask required for this register instruction */
1586 /* Values for Action field above */
1588 enum AcpiWdatActions
1590 ACPI_WDAT_RESET
= 1,
1591 ACPI_WDAT_GET_CURRENT_COUNTDOWN
= 4,
1592 ACPI_WDAT_GET_COUNTDOWN
= 5,
1593 ACPI_WDAT_SET_COUNTDOWN
= 6,
1594 ACPI_WDAT_GET_RUNNING_STATE
= 8,
1595 ACPI_WDAT_SET_RUNNING_STATE
= 9,
1596 ACPI_WDAT_GET_STOPPED_STATE
= 10,
1597 ACPI_WDAT_SET_STOPPED_STATE
= 11,
1598 ACPI_WDAT_GET_REBOOT
= 16,
1599 ACPI_WDAT_SET_REBOOT
= 17,
1600 ACPI_WDAT_GET_SHUTDOWN
= 18,
1601 ACPI_WDAT_SET_SHUTDOWN
= 19,
1602 ACPI_WDAT_GET_STATUS
= 32,
1603 ACPI_WDAT_SET_STATUS
= 33,
1604 ACPI_WDAT_ACTION_RESERVED
= 34 /* 34 and greater are reserved */
1607 /* Values for Instruction field above */
1609 enum AcpiWdatInstructions
1611 ACPI_WDAT_READ_VALUE
= 0,
1612 ACPI_WDAT_READ_COUNTDOWN
= 1,
1613 ACPI_WDAT_WRITE_VALUE
= 2,
1614 ACPI_WDAT_WRITE_COUNTDOWN
= 3,
1615 ACPI_WDAT_INSTRUCTION_RESERVED
= 4, /* 4 and greater are reserved */
1616 ACPI_WDAT_PRESERVE_REGISTER
= 0x80 /* Except for this value */
1620 /*******************************************************************************
1622 * WDDT - Watchdog Descriptor Table
1625 * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",
1626 * Version 001, September 2002
1628 ******************************************************************************/
1630 typedef struct acpi_table_wddt
1632 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
1634 UINT16 TableVersion
;
1636 ACPI_GENERIC_ADDRESS Address
;
1637 UINT16 MaxCount
; /* Maximum counter value supported */
1638 UINT16 MinCount
; /* Minimum counter value supported */
1645 /* Flags for Status field above */
1647 #define ACPI_WDDT_AVAILABLE (1)
1648 #define ACPI_WDDT_ACTIVE (1<<1)
1649 #define ACPI_WDDT_TCO_OS_OWNED (1<<2)
1650 #define ACPI_WDDT_USER_RESET (1<<11)
1651 #define ACPI_WDDT_WDT_RESET (1<<12)
1652 #define ACPI_WDDT_POWER_FAIL (1<<13)
1653 #define ACPI_WDDT_UNKNOWN_RESET (1<<14)
1655 /* Flags for Capability field above */
1657 #define ACPI_WDDT_AUTO_RESET (1)
1658 #define ACPI_WDDT_ALERT_SUPPORT (1<<1)
1661 /*******************************************************************************
1663 * WDRT - Watchdog Resource Table
1666 * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",
1667 * Version 1.01, August 28, 2006
1669 ******************************************************************************/
1671 typedef struct acpi_table_wdrt
1673 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
1674 ACPI_GENERIC_ADDRESS ControlRegister
;
1675 ACPI_GENERIC_ADDRESS CountRegister
;
1678 UINT8 PciBus
; /* PCI Bus number */
1679 UINT8 PciDevice
; /* PCI Device number */
1680 UINT8 PciFunction
; /* PCI Function number */
1681 UINT8 PciSegment
; /* PCI Segment number */
1682 UINT16 MaxCount
; /* Maximum counter value supported */
1688 /* Reset to default packing */
1692 #endif /* __ACTBL2_H__ */