Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 1 | /****************************************************************************** |
| 2 | * |
| 3 | * Name: actbl3.h - ACPI Table Definitions |
| 4 | * |
| 5 | *****************************************************************************/ |
| 6 | |
| 7 | /* |
Bob Moore | da6f832 | 2018-01-04 10:06:38 -0800 | [diff] [blame] | 8 | * Copyright (C) 2000 - 2018, Intel Corp. |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 9 | * All rights reserved. |
| 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without |
| 12 | * modification, are permitted provided that the following conditions |
| 13 | * are met: |
| 14 | * 1. Redistributions of source code must retain the above copyright |
| 15 | * notice, this list of conditions, and the following disclaimer, |
| 16 | * without modification. |
| 17 | * 2. Redistributions in binary form must reproduce at minimum a disclaimer |
| 18 | * substantially similar to the "NO WARRANTY" disclaimer below |
| 19 | * ("Disclaimer") and any redistribution must be conditioned upon |
| 20 | * including a substantially similar Disclaimer requirement for further |
| 21 | * binary redistribution. |
| 22 | * 3. Neither the names of the above-listed copyright holders nor the names |
| 23 | * of any contributors may be used to endorse or promote products derived |
| 24 | * from this software without specific prior written permission. |
| 25 | * |
| 26 | * Alternatively, this software may be distributed under the terms of the |
| 27 | * GNU General Public License ("GPL") version 2 as published by the Free |
| 28 | * Software Foundation. |
| 29 | * |
| 30 | * NO WARRANTY |
| 31 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 32 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 33 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR |
| 34 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 35 | * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 36 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 37 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 38 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
| 39 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
| 40 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 41 | * POSSIBILITY OF SUCH DAMAGES. |
| 42 | */ |
| 43 | |
| 44 | #ifndef __ACTBL3_H__ |
| 45 | #define __ACTBL3_H__ |
| 46 | |
| 47 | /******************************************************************************* |
| 48 | * |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 49 | * Additional ACPI Tables |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 50 | * |
| 51 | * These tables are not consumed directly by the ACPICA subsystem, but are |
| 52 | * included here to support device drivers and the AML disassembler. |
| 53 | * |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 54 | ******************************************************************************/ |
| 55 | |
| 56 | /* |
| 57 | * Values for description table header signatures for tables defined in this |
| 58 | * file. Useful because they make it more difficult to inadvertently type in |
| 59 | * the wrong signature. |
| 60 | */ |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 61 | #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */ |
| 62 | #define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */ |
| 63 | #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */ |
| 64 | #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */ |
| 65 | #define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */ |
Bob Moore | 37e1265 | 2015-05-21 10:30:11 +0800 | [diff] [blame] | 66 | #define ACPI_SIG_STAO "STAO" /* Status Override table */ |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 67 | #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */ |
| 68 | #define ACPI_SIG_TPM2 "TPM2" /* Trusted Platform Module 2.0 H/W interface table */ |
| 69 | #define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */ |
| 70 | #define ACPI_SIG_VRTC "VRTC" /* Virtual Real Time Clock Table */ |
| 71 | #define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */ |
| 72 | #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */ |
| 73 | #define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */ |
| 74 | #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */ |
Bob Moore | 68edb03 | 2015-05-21 10:30:44 +0800 | [diff] [blame] | 75 | #define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */ |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 76 | #define ACPI_SIG_WSMT "WSMT" /* Windows SMM Security Migrations Table */ |
Bob Moore | b6944ef | 2015-05-21 10:30:24 +0800 | [diff] [blame] | 77 | #define ACPI_SIG_XENV "XENV" /* Xen Environment table */ |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 78 | #define ACPI_SIG_XXXX "XXXX" /* Intermediate AML header for ASL/ASL+ converter */ |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 79 | |
| 80 | /* |
| 81 | * All tables must be byte-packed to match the ACPI specification, since |
| 82 | * the tables are provided by the system BIOS. |
| 83 | */ |
| 84 | #pragma pack(1) |
| 85 | |
| 86 | /* |
Bob Moore | be030a5 | 2012-08-17 13:07:54 +0800 | [diff] [blame] | 87 | * Note: C bitfields are not used for this reason: |
| 88 | * |
| 89 | * "Bitfields are great and easy to read, but unfortunately the C language |
| 90 | * does not specify the layout of bitfields in memory, which means they are |
| 91 | * essentially useless for dealing with packed data in on-disk formats or |
| 92 | * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me, |
| 93 | * this decision was a design error in C. Ritchie could have picked an order |
| 94 | * and stuck with it." Norman Ramsey. |
| 95 | * See http://stackoverflow.com/a/1053662/41661 |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 96 | */ |
| 97 | |
| 98 | /******************************************************************************* |
| 99 | * |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 100 | * SLIC - Software Licensing Description Table |
| 101 | * |
| 102 | * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)", |
| 103 | * November 29, 2011. Copyright 2011 Microsoft |
| 104 | * |
| 105 | ******************************************************************************/ |
| 106 | |
| 107 | /* Basic SLIC table is only the common ACPI header */ |
| 108 | |
| 109 | struct acpi_table_slic { |
| 110 | struct acpi_table_header header; /* Common ACPI table header */ |
| 111 | }; |
| 112 | |
| 113 | /******************************************************************************* |
| 114 | * |
| 115 | * SLIT - System Locality Distance Information Table |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 116 | * Version 1 |
| 117 | * |
| 118 | ******************************************************************************/ |
| 119 | |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 120 | struct acpi_table_slit { |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 121 | struct acpi_table_header header; /* Common ACPI table header */ |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 122 | u64 locality_count; |
| 123 | u8 entry[1]; /* Real size = localities^2 */ |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 124 | }; |
| 125 | |
| 126 | /******************************************************************************* |
| 127 | * |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 128 | * SPCR - Serial Port Console Redirection table |
Tomasz Nowicki | 54ea424 | 2014-07-30 12:21:58 +0800 | [diff] [blame] | 129 | * Version 2 |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 130 | * |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 131 | * Conforms to "Serial Port Console Redirection Table", |
| 132 | * Version 1.03, August 10, 2015 |
| 133 | * |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 134 | ******************************************************************************/ |
| 135 | |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 136 | struct acpi_table_spcr { |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 137 | struct acpi_table_header header; /* Common ACPI table header */ |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 138 | u8 interface_type; /* 0=full 16550, 1=subset of 16550 */ |
Tomasz Nowicki | 54ea424 | 2014-07-30 12:21:58 +0800 | [diff] [blame] | 139 | u8 reserved[3]; |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 140 | struct acpi_generic_address serial_port; |
| 141 | u8 interrupt_type; |
| 142 | u8 pc_interrupt; |
| 143 | u32 interrupt; |
| 144 | u8 baud_rate; |
| 145 | u8 parity; |
| 146 | u8 stop_bits; |
| 147 | u8 flow_control; |
| 148 | u8 terminal_type; |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 149 | u8 reserved1; |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 150 | u16 pci_device_id; |
| 151 | u16 pci_vendor_id; |
| 152 | u8 pci_bus; |
| 153 | u8 pci_device; |
| 154 | u8 pci_function; |
| 155 | u32 pci_flags; |
| 156 | u8 pci_segment; |
| 157 | u32 reserved2; |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 158 | }; |
| 159 | |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 160 | /* Masks for pci_flags field above */ |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 161 | |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 162 | #define ACPI_SPCR_DO_NOT_DISABLE (1) |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 163 | |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 164 | /* Values for Interface Type: See the definition of the DBG2 table */ |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 165 | |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 166 | /******************************************************************************* |
| 167 | * |
| 168 | * SPMI - Server Platform Management Interface table |
| 169 | * Version 5 |
| 170 | * |
| 171 | * Conforms to "Intelligent Platform Management Interface Specification |
| 172 | * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with |
| 173 | * June 12, 2009 markup. |
| 174 | * |
| 175 | ******************************************************************************/ |
| 176 | |
| 177 | struct acpi_table_spmi { |
| 178 | struct acpi_table_header header; /* Common ACPI table header */ |
| 179 | u8 interface_type; |
| 180 | u8 reserved; /* Must be 1 */ |
| 181 | u16 spec_revision; /* Version of IPMI */ |
| 182 | u8 interrupt_type; |
| 183 | u8 gpe_number; /* GPE assigned */ |
| 184 | u8 reserved1; |
| 185 | u8 pci_device_flag; |
| 186 | u32 interrupt; |
| 187 | struct acpi_generic_address ipmi_register; |
| 188 | u8 pci_segment; |
| 189 | u8 pci_bus; |
| 190 | u8 pci_device; |
| 191 | u8 pci_function; |
| 192 | u8 reserved2; |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 193 | }; |
| 194 | |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 195 | /* Values for interface_type above */ |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 196 | |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 197 | enum acpi_spmi_interface_types { |
| 198 | ACPI_SPMI_NOT_USED = 0, |
| 199 | ACPI_SPMI_KEYBOARD = 1, |
| 200 | ACPI_SPMI_SMI = 2, |
| 201 | ACPI_SPMI_BLOCK_TRANSFER = 3, |
| 202 | ACPI_SPMI_SMBUS = 4, |
| 203 | ACPI_SPMI_RESERVED = 5 /* 5 and above are reserved */ |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 204 | }; |
| 205 | |
| 206 | /******************************************************************************* |
| 207 | * |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 208 | * SRAT - System Resource Affinity Table |
| 209 | * Version 3 |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 210 | * |
| 211 | ******************************************************************************/ |
| 212 | |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 213 | struct acpi_table_srat { |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 214 | struct acpi_table_header header; /* Common ACPI table header */ |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 215 | u32 table_revision; /* Must be value '1' */ |
| 216 | u64 reserved; /* Reserved, must be zero */ |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 217 | }; |
| 218 | |
Bob Moore | f0d7366 | 2014-01-08 13:43:57 +0800 | [diff] [blame] | 219 | /* Values for subtable type in struct acpi_subtable_header */ |
| 220 | |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 221 | enum acpi_srat_type { |
| 222 | ACPI_SRAT_TYPE_CPU_AFFINITY = 0, |
| 223 | ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1, |
| 224 | ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2, |
| 225 | ACPI_SRAT_TYPE_GICC_AFFINITY = 3, |
| 226 | ACPI_SRAT_TYPE_GIC_ITS_AFFINITY = 4, /* ACPI 6.2 */ |
| 227 | ACPI_SRAT_TYPE_RESERVED = 5 /* 5 and greater are reserved */ |
Bob Moore | f0d7366 | 2014-01-08 13:43:57 +0800 | [diff] [blame] | 228 | }; |
| 229 | |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 230 | /* |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 231 | * SRAT Subtables, correspond to Type in struct acpi_subtable_header |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 232 | */ |
| 233 | |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 234 | /* 0: Processor Local APIC/SAPIC Affinity */ |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 235 | |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 236 | struct acpi_srat_cpu_affinity { |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 237 | struct acpi_subtable_header header; |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 238 | u8 proximity_domain_lo; |
| 239 | u8 apic_id; |
David E. Box | c7a1dfb | 2017-06-05 16:39:08 +0800 | [diff] [blame] | 240 | u32 flags; |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 241 | u8 local_sapic_eid; |
| 242 | u8 proximity_domain_hi[3]; |
| 243 | u32 clock_domain; |
David E. Box | c7a1dfb | 2017-06-05 16:39:08 +0800 | [diff] [blame] | 244 | }; |
| 245 | |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 246 | /* Flags */ |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 247 | |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 248 | #define ACPI_SRAT_CPU_USE_AFFINITY (1) /* 00: Use affinity structure */ |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 249 | |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 250 | /* 1: Memory Affinity */ |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 251 | |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 252 | struct acpi_srat_mem_affinity { |
| 253 | struct acpi_subtable_header header; |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 254 | u32 proximity_domain; |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 255 | u16 reserved; /* Reserved, must be zero */ |
| 256 | u64 base_address; |
| 257 | u64 length; |
| 258 | u32 reserved1; |
| 259 | u32 flags; |
| 260 | u64 reserved2; /* Reserved, must be zero */ |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 261 | }; |
| 262 | |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 263 | /* Flags */ |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 264 | |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 265 | #define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */ |
| 266 | #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */ |
| 267 | #define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */ |
| 268 | |
| 269 | /* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */ |
| 270 | |
| 271 | struct acpi_srat_x2apic_cpu_affinity { |
| 272 | struct acpi_subtable_header header; |
| 273 | u16 reserved; /* Reserved, must be zero */ |
| 274 | u32 proximity_domain; |
| 275 | u32 apic_id; |
| 276 | u32 flags; |
| 277 | u32 clock_domain; |
| 278 | u32 reserved2; |
| 279 | }; |
| 280 | |
| 281 | /* Flags for struct acpi_srat_cpu_affinity and struct acpi_srat_x2apic_cpu_affinity */ |
| 282 | |
| 283 | #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */ |
| 284 | |
| 285 | /* 3: GICC Affinity (ACPI 5.1) */ |
| 286 | |
| 287 | struct acpi_srat_gicc_affinity { |
| 288 | struct acpi_subtable_header header; |
| 289 | u32 proximity_domain; |
| 290 | u32 acpi_processor_uid; |
| 291 | u32 flags; |
| 292 | u32 clock_domain; |
| 293 | }; |
| 294 | |
| 295 | /* Flags for struct acpi_srat_gicc_affinity */ |
| 296 | |
| 297 | #define ACPI_SRAT_GICC_ENABLED (1) /* 00: Use affinity structure */ |
| 298 | |
| 299 | /* 4: GCC ITS Affinity (ACPI 6.2) */ |
| 300 | |
| 301 | struct acpi_srat_gic_its_affinity { |
| 302 | struct acpi_subtable_header header; |
| 303 | u32 proximity_domain; |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 304 | u16 reserved; |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 305 | u32 its_id; |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 306 | }; |
| 307 | |
| 308 | /******************************************************************************* |
| 309 | * |
Bob Moore | 37e1265 | 2015-05-21 10:30:11 +0800 | [diff] [blame] | 310 | * STAO - Status Override Table (_STA override) - ACPI 6.0 |
| 311 | * Version 1 |
| 312 | * |
| 313 | * Conforms to "ACPI Specification for Status Override Table" |
| 314 | * 6 January 2015 |
| 315 | * |
| 316 | ******************************************************************************/ |
| 317 | |
| 318 | struct acpi_table_stao { |
| 319 | struct acpi_table_header header; /* Common ACPI table header */ |
| 320 | u8 ignore_uart; |
| 321 | }; |
| 322 | |
| 323 | /******************************************************************************* |
| 324 | * |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 325 | * TCPA - Trusted Computing Platform Alliance table |
| 326 | * Version 2 |
| 327 | * |
| 328 | * TCG Hardware Interface Table for TPM 1.2 Clients and Servers |
| 329 | * |
| 330 | * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0", |
| 331 | * Version 1.2, Revision 8 |
| 332 | * February 27, 2017 |
| 333 | * |
| 334 | * NOTE: There are two versions of the table with the same signature -- |
| 335 | * the client version and the server version. The common platform_class |
| 336 | * field is used to differentiate the two types of tables. |
| 337 | * |
| 338 | ******************************************************************************/ |
| 339 | |
| 340 | struct acpi_table_tcpa_hdr { |
| 341 | struct acpi_table_header header; /* Common ACPI table header */ |
| 342 | u16 platform_class; |
| 343 | }; |
| 344 | |
| 345 | /* |
| 346 | * Values for platform_class above. |
| 347 | * This is how the client and server subtables are differentiated |
| 348 | */ |
| 349 | #define ACPI_TCPA_CLIENT_TABLE 0 |
| 350 | #define ACPI_TCPA_SERVER_TABLE 1 |
| 351 | |
| 352 | struct acpi_table_tcpa_client { |
| 353 | u32 minimum_log_length; /* Minimum length for the event log area */ |
| 354 | u64 log_address; /* Address of the event log area */ |
| 355 | }; |
| 356 | |
| 357 | struct acpi_table_tcpa_server { |
| 358 | u16 reserved; |
| 359 | u64 minimum_log_length; /* Minimum length for the event log area */ |
| 360 | u64 log_address; /* Address of the event log area */ |
| 361 | u16 spec_revision; |
| 362 | u8 device_flags; |
| 363 | u8 interrupt_flags; |
| 364 | u8 gpe_number; |
| 365 | u8 reserved2[3]; |
| 366 | u32 global_interrupt; |
| 367 | struct acpi_generic_address address; |
| 368 | u32 reserved3; |
| 369 | struct acpi_generic_address config_address; |
| 370 | u8 group; |
| 371 | u8 bus; /* PCI Bus/Segment/Function numbers */ |
| 372 | u8 device; |
| 373 | u8 function; |
| 374 | }; |
| 375 | |
| 376 | /* Values for device_flags above */ |
| 377 | |
| 378 | #define ACPI_TCPA_PCI_DEVICE (1) |
| 379 | #define ACPI_TCPA_BUS_PNP (1<<1) |
| 380 | #define ACPI_TCPA_ADDRESS_VALID (1<<2) |
| 381 | |
| 382 | /* Values for interrupt_flags above */ |
| 383 | |
| 384 | #define ACPI_TCPA_INTERRUPT_MODE (1) |
| 385 | #define ACPI_TCPA_INTERRUPT_POLARITY (1<<1) |
| 386 | #define ACPI_TCPA_SCI_VIA_GPE (1<<2) |
| 387 | #define ACPI_TCPA_GLOBAL_INTERRUPT (1<<3) |
| 388 | |
| 389 | /******************************************************************************* |
| 390 | * |
| 391 | * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table |
| 392 | * Version 4 |
| 393 | * |
| 394 | * TCG Hardware Interface Table for TPM 2.0 Clients and Servers |
| 395 | * |
| 396 | * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0", |
| 397 | * Version 1.2, Revision 8 |
| 398 | * February 27, 2017 |
| 399 | * |
| 400 | ******************************************************************************/ |
| 401 | |
| 402 | struct acpi_table_tpm2 { |
| 403 | struct acpi_table_header header; /* Common ACPI table header */ |
| 404 | u16 platform_class; |
| 405 | u16 reserved; |
| 406 | u64 control_address; |
| 407 | u32 start_method; |
| 408 | |
| 409 | /* Platform-specific data follows */ |
| 410 | }; |
| 411 | |
| 412 | /* Values for start_method above */ |
| 413 | |
| 414 | #define ACPI_TPM2_NOT_ALLOWED 0 |
| 415 | #define ACPI_TPM2_RESERVED1 1 |
| 416 | #define ACPI_TPM2_START_METHOD 2 |
| 417 | #define ACPI_TPM2_RESERVED3 3 |
| 418 | #define ACPI_TPM2_RESERVED4 4 |
| 419 | #define ACPI_TPM2_RESERVED5 5 |
| 420 | #define ACPI_TPM2_MEMORY_MAPPED 6 |
| 421 | #define ACPI_TPM2_COMMAND_BUFFER 7 |
| 422 | #define ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD 8 |
| 423 | #define ACPI_TPM2_RESERVED9 9 |
| 424 | #define ACPI_TPM2_RESERVED10 10 |
| 425 | #define ACPI_TPM2_COMMAND_BUFFER_WITH_ARM_SMC 11 /* V1.2 Rev 8 */ |
| 426 | #define ACPI_TPM2_RESERVED 12 |
| 427 | |
| 428 | /* Optional trailer appears after any start_method subtables */ |
| 429 | |
| 430 | struct acpi_tpm2_trailer { |
| 431 | u8 method_parameters[12]; |
| 432 | u32 minimum_log_length; /* Minimum length for the event log area */ |
| 433 | u64 log_address; /* Address of the event log area */ |
| 434 | }; |
| 435 | |
| 436 | /* |
| 437 | * Subtables (start_method-specific) |
| 438 | */ |
| 439 | |
| 440 | /* 11: Start Method for ARM SMC (V1.2 Rev 8) */ |
| 441 | |
| 442 | struct acpi_tpm2_arm_smc { |
| 443 | u32 global_interrupt; |
| 444 | u8 interrupt_flags; |
| 445 | u8 operation_flags; |
| 446 | u16 reserved; |
| 447 | u32 function_id; |
| 448 | }; |
| 449 | |
| 450 | /* Values for interrupt_flags above */ |
| 451 | |
| 452 | #define ACPI_TPM2_INTERRUPT_SUPPORT (1) |
| 453 | |
| 454 | /* Values for operation_flags above */ |
| 455 | |
| 456 | #define ACPI_TPM2_IDLE_SUPPORT (1) |
| 457 | |
| 458 | /******************************************************************************* |
| 459 | * |
| 460 | * UEFI - UEFI Boot optimization Table |
| 461 | * Version 1 |
| 462 | * |
| 463 | * Conforms to "Unified Extensible Firmware Interface Specification", |
| 464 | * Version 2.3, May 8, 2009 |
| 465 | * |
| 466 | ******************************************************************************/ |
| 467 | |
| 468 | struct acpi_table_uefi { |
| 469 | struct acpi_table_header header; /* Common ACPI table header */ |
| 470 | u8 identifier[16]; /* UUID identifier */ |
| 471 | u16 data_offset; /* Offset of remaining data in table */ |
| 472 | }; |
| 473 | |
| 474 | /******************************************************************************* |
| 475 | * |
| 476 | * VRTC - Virtual Real Time Clock Table |
| 477 | * Version 1 |
| 478 | * |
| 479 | * Conforms to "Simple Firmware Interface Specification", |
| 480 | * Draft 0.8.2, Oct 19, 2010 |
| 481 | * NOTE: The ACPI VRTC is equivalent to The SFI MRTC table. |
| 482 | * |
| 483 | ******************************************************************************/ |
| 484 | |
| 485 | struct acpi_table_vrtc { |
| 486 | struct acpi_table_header header; /* Common ACPI table header */ |
| 487 | }; |
| 488 | |
| 489 | /* VRTC entry */ |
| 490 | |
| 491 | struct acpi_vrtc_entry { |
| 492 | struct acpi_generic_address physical_address; |
| 493 | u32 irq; |
| 494 | }; |
| 495 | |
| 496 | /******************************************************************************* |
| 497 | * |
| 498 | * WAET - Windows ACPI Emulated devices Table |
| 499 | * Version 1 |
| 500 | * |
| 501 | * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009 |
| 502 | * |
| 503 | ******************************************************************************/ |
| 504 | |
| 505 | struct acpi_table_waet { |
| 506 | struct acpi_table_header header; /* Common ACPI table header */ |
| 507 | u32 flags; |
| 508 | }; |
| 509 | |
| 510 | /* Masks for Flags field above */ |
| 511 | |
| 512 | #define ACPI_WAET_RTC_NO_ACK (1) /* RTC requires no int acknowledge */ |
| 513 | #define ACPI_WAET_TIMER_ONE_READ (1<<1) /* PM timer requires only one read */ |
| 514 | |
| 515 | /******************************************************************************* |
| 516 | * |
| 517 | * WDAT - Watchdog Action Table |
| 518 | * Version 1 |
| 519 | * |
| 520 | * Conforms to "Hardware Watchdog Timers Design Specification", |
| 521 | * Copyright 2006 Microsoft Corporation. |
| 522 | * |
| 523 | ******************************************************************************/ |
| 524 | |
| 525 | struct acpi_table_wdat { |
| 526 | struct acpi_table_header header; /* Common ACPI table header */ |
| 527 | u32 header_length; /* Watchdog Header Length */ |
| 528 | u16 pci_segment; /* PCI Segment number */ |
| 529 | u8 pci_bus; /* PCI Bus number */ |
| 530 | u8 pci_device; /* PCI Device number */ |
| 531 | u8 pci_function; /* PCI Function number */ |
| 532 | u8 reserved[3]; |
| 533 | u32 timer_period; /* Period of one timer count (msec) */ |
| 534 | u32 max_count; /* Maximum counter value supported */ |
| 535 | u32 min_count; /* Minimum counter value */ |
| 536 | u8 flags; |
| 537 | u8 reserved2[3]; |
| 538 | u32 entries; /* Number of watchdog entries that follow */ |
| 539 | }; |
| 540 | |
| 541 | /* Masks for Flags field above */ |
| 542 | |
| 543 | #define ACPI_WDAT_ENABLED (1) |
| 544 | #define ACPI_WDAT_STOPPED 0x80 |
| 545 | |
| 546 | /* WDAT Instruction Entries (actions) */ |
| 547 | |
| 548 | struct acpi_wdat_entry { |
| 549 | u8 action; |
| 550 | u8 instruction; |
| 551 | u16 reserved; |
| 552 | struct acpi_generic_address register_region; |
| 553 | u32 value; /* Value used with Read/Write register */ |
| 554 | u32 mask; /* Bitmask required for this register instruction */ |
| 555 | }; |
| 556 | |
| 557 | /* Values for Action field above */ |
| 558 | |
| 559 | enum acpi_wdat_actions { |
| 560 | ACPI_WDAT_RESET = 1, |
| 561 | ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4, |
| 562 | ACPI_WDAT_GET_COUNTDOWN = 5, |
| 563 | ACPI_WDAT_SET_COUNTDOWN = 6, |
| 564 | ACPI_WDAT_GET_RUNNING_STATE = 8, |
| 565 | ACPI_WDAT_SET_RUNNING_STATE = 9, |
| 566 | ACPI_WDAT_GET_STOPPED_STATE = 10, |
| 567 | ACPI_WDAT_SET_STOPPED_STATE = 11, |
| 568 | ACPI_WDAT_GET_REBOOT = 16, |
| 569 | ACPI_WDAT_SET_REBOOT = 17, |
| 570 | ACPI_WDAT_GET_SHUTDOWN = 18, |
| 571 | ACPI_WDAT_SET_SHUTDOWN = 19, |
| 572 | ACPI_WDAT_GET_STATUS = 32, |
| 573 | ACPI_WDAT_SET_STATUS = 33, |
| 574 | ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */ |
| 575 | }; |
| 576 | |
| 577 | /* Values for Instruction field above */ |
| 578 | |
| 579 | enum acpi_wdat_instructions { |
| 580 | ACPI_WDAT_READ_VALUE = 0, |
| 581 | ACPI_WDAT_READ_COUNTDOWN = 1, |
| 582 | ACPI_WDAT_WRITE_VALUE = 2, |
| 583 | ACPI_WDAT_WRITE_COUNTDOWN = 3, |
| 584 | ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */ |
| 585 | ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */ |
| 586 | }; |
| 587 | |
| 588 | /******************************************************************************* |
| 589 | * |
| 590 | * WDDT - Watchdog Descriptor Table |
| 591 | * Version 1 |
| 592 | * |
| 593 | * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)", |
| 594 | * Version 001, September 2002 |
| 595 | * |
| 596 | ******************************************************************************/ |
| 597 | |
| 598 | struct acpi_table_wddt { |
| 599 | struct acpi_table_header header; /* Common ACPI table header */ |
| 600 | u16 spec_version; |
| 601 | u16 table_version; |
| 602 | u16 pci_vendor_id; |
| 603 | struct acpi_generic_address address; |
| 604 | u16 max_count; /* Maximum counter value supported */ |
| 605 | u16 min_count; /* Minimum counter value supported */ |
| 606 | u16 period; |
| 607 | u16 status; |
| 608 | u16 capability; |
| 609 | }; |
| 610 | |
| 611 | /* Flags for Status field above */ |
| 612 | |
| 613 | #define ACPI_WDDT_AVAILABLE (1) |
| 614 | #define ACPI_WDDT_ACTIVE (1<<1) |
| 615 | #define ACPI_WDDT_TCO_OS_OWNED (1<<2) |
| 616 | #define ACPI_WDDT_USER_RESET (1<<11) |
| 617 | #define ACPI_WDDT_WDT_RESET (1<<12) |
| 618 | #define ACPI_WDDT_POWER_FAIL (1<<13) |
| 619 | #define ACPI_WDDT_UNKNOWN_RESET (1<<14) |
| 620 | |
| 621 | /* Flags for Capability field above */ |
| 622 | |
| 623 | #define ACPI_WDDT_AUTO_RESET (1) |
| 624 | #define ACPI_WDDT_ALERT_SUPPORT (1<<1) |
| 625 | |
| 626 | /******************************************************************************* |
| 627 | * |
| 628 | * WDRT - Watchdog Resource Table |
| 629 | * Version 1 |
| 630 | * |
| 631 | * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003", |
| 632 | * Version 1.01, August 28, 2006 |
| 633 | * |
| 634 | ******************************************************************************/ |
| 635 | |
| 636 | struct acpi_table_wdrt { |
| 637 | struct acpi_table_header header; /* Common ACPI table header */ |
| 638 | struct acpi_generic_address control_register; |
| 639 | struct acpi_generic_address count_register; |
| 640 | u16 pci_device_id; |
| 641 | u16 pci_vendor_id; |
| 642 | u8 pci_bus; /* PCI Bus number */ |
| 643 | u8 pci_device; /* PCI Device number */ |
| 644 | u8 pci_function; /* PCI Function number */ |
| 645 | u8 pci_segment; /* PCI Segment number */ |
| 646 | u16 max_count; /* Maximum counter value supported */ |
| 647 | u8 units; |
| 648 | }; |
| 649 | |
| 650 | /******************************************************************************* |
| 651 | * |
Bob Moore | 68edb03 | 2015-05-21 10:30:44 +0800 | [diff] [blame] | 652 | * WPBT - Windows Platform Environment Table (ACPI 6.0) |
| 653 | * Version 1 |
| 654 | * |
| 655 | * Conforms to "Windows Platform Binary Table (WPBT)" 29 November 2011 |
| 656 | * |
| 657 | ******************************************************************************/ |
| 658 | |
| 659 | struct acpi_table_wpbt { |
| 660 | struct acpi_table_header header; /* Common ACPI table header */ |
| 661 | u32 handoff_size; |
| 662 | u64 handoff_address; |
| 663 | u8 layout; |
| 664 | u8 type; |
| 665 | u16 arguments_length; |
| 666 | }; |
| 667 | |
| 668 | /******************************************************************************* |
| 669 | * |
Erik Schmauss | e62f822 | 2018-02-15 13:09:26 -0800 | [diff] [blame^] | 670 | * WSMT - Windows SMM Security Migrations Table |
| 671 | * Version 1 |
| 672 | * |
| 673 | * Conforms to "Windows SMM Security Migrations Table", |
| 674 | * Version 1.0, April 18, 2016 |
| 675 | * |
| 676 | ******************************************************************************/ |
| 677 | |
| 678 | struct acpi_table_wsmt { |
| 679 | struct acpi_table_header header; /* Common ACPI table header */ |
| 680 | u32 protection_flags; |
| 681 | }; |
| 682 | |
| 683 | /* Flags for protection_flags field above */ |
| 684 | |
| 685 | #define ACPI_WSMT_FIXED_COMM_BUFFERS (1) |
| 686 | #define ACPI_WSMT_COMM_BUFFER_NESTED_PTR_PROTECTION (2) |
| 687 | #define ACPI_WSMT_SYSTEM_RESOURCE_PROTECTION (4) |
| 688 | |
| 689 | /******************************************************************************* |
| 690 | * |
Bob Moore | b6944ef | 2015-05-21 10:30:24 +0800 | [diff] [blame] | 691 | * XENV - Xen Environment Table (ACPI 6.0) |
| 692 | * Version 1 |
| 693 | * |
| 694 | * Conforms to "ACPI Specification for Xen Environment Table" 4 January 2015 |
| 695 | * |
| 696 | ******************************************************************************/ |
| 697 | |
| 698 | struct acpi_table_xenv { |
| 699 | struct acpi_table_header header; /* Common ACPI table header */ |
| 700 | u64 grant_table_address; |
| 701 | u64 grant_table_size; |
| 702 | u32 event_interrupt; |
| 703 | u8 event_flags; |
| 704 | }; |
| 705 | |
Robert Moore | 6e59608 | 2014-03-05 14:12:01 +0800 | [diff] [blame] | 706 | /* Reset to default packing */ |
| 707 | |
| 708 | #pragma pack() |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 709 | |
| 710 | #endif /* __ACTBL3_H__ */ |