Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /****************************************************************************** |
| 2 | * |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 3 | * Name: actbl1.h - Additional ACPI table definitions |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | * |
| 5 | *****************************************************************************/ |
| 6 | |
| 7 | /* |
Len Brown | 75a44ce | 2008-04-23 23:00:13 -0400 | [diff] [blame] | 8 | * Copyright (C) 2000 - 2008, Intel Corp. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [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 __ACTBL1_H__ |
| 45 | #define __ACTBL1_H__ |
| 46 | |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 47 | /******************************************************************************* |
| 48 | * |
| 49 | * Additional ACPI Tables |
| 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 | * |
| 54 | ******************************************************************************/ |
| 55 | |
| 56 | /* |
| 57 | * Values for description table header signatures. Useful because they make |
| 58 | * it more difficult to inadvertently type in the wrong signature. |
| 59 | */ |
| 60 | #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */ |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 61 | #define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 62 | #define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */ |
| 63 | #define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */ |
| 64 | #define ACPI_SIG_DBGP "DBGP" /* Debug Port table */ |
Bob Moore | 2502fff | 2007-02-02 19:48:19 +0300 | [diff] [blame] | 65 | #define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 66 | #define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */ |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 67 | #define ACPI_SIG_EINJ "EINJ" /* Error Injection table */ |
| 68 | #define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */ |
| 69 | #define ACPI_SIG_HEST "HEST" /* Hardware Error Source Table */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 70 | #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */ |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 71 | #define ACPI_SIG_IBFT "IBFT" /* i_sCSI Boot Firmware Table */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 72 | #define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */ |
| 73 | #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ |
| 74 | #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */ |
Bob Moore | 698c0a0 | 2008-04-10 19:06:38 +0400 | [diff] [blame] | 75 | #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 76 | #define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */ |
| 77 | #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */ |
| 78 | #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */ |
| 79 | #define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */ |
| 80 | #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */ |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 81 | #define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */ |
| 82 | #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 83 | #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */ |
| 84 | |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 85 | /* |
| 86 | * All tables must be byte-packed to match the ACPI specification, since |
| 87 | * the tables are provided by the system BIOS. |
| 88 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 89 | #pragma pack(1) |
| 90 | |
| 91 | /* |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 92 | * Note about bitfields: The u8 type is used for bitfields in ACPI tables. |
| 93 | * This is the only type that is even remotely portable. Anything else is not |
| 94 | * portable, so do not use any other bitfield types. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 95 | */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 96 | |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 97 | /* Common Subtable header (used in MADT, SRAT, etc.) */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 98 | |
| 99 | struct acpi_subtable_header { |
| 100 | u8 type; |
| 101 | u8 length; |
| 102 | }; |
| 103 | |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 104 | /* Common Subtable header for WHEA tables (EINJ, ERST, WDAT) */ |
| 105 | |
| 106 | struct acpi_whea_header { |
| 107 | u8 action; |
| 108 | u8 instruction; |
| 109 | u8 flags; |
| 110 | u8 reserved; |
| 111 | struct acpi_generic_address register_region; |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 112 | u64 value; /* Value used with Read/Write register */ |
| 113 | u64 mask; /* Bitmask required for this register instruction */ |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 114 | }; |
| 115 | |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 116 | /******************************************************************************* |
| 117 | * |
| 118 | * ASF - Alert Standard Format table (Signature "ASF!") |
| 119 | * |
Bob Moore | 694b0b2 | 2007-02-02 19:48:20 +0300 | [diff] [blame] | 120 | * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003 |
| 121 | * |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 122 | ******************************************************************************/ |
| 123 | |
| 124 | struct acpi_table_asf { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 125 | struct acpi_table_header header; /* Common ACPI table header */ |
| 126 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 127 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 128 | /* ASF subtable header */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 129 | |
| 130 | struct acpi_asf_header { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 131 | u8 type; |
| 132 | u8 reserved; |
| 133 | u16 length; |
| 134 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 135 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 136 | /* Values for Type field above */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 137 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 138 | enum acpi_asf_type { |
| 139 | ACPI_ASF_TYPE_INFO = 0, |
| 140 | ACPI_ASF_TYPE_ALERT = 1, |
| 141 | ACPI_ASF_TYPE_CONTROL = 2, |
| 142 | ACPI_ASF_TYPE_BOOT = 3, |
| 143 | ACPI_ASF_TYPE_ADDRESS = 4, |
| 144 | ACPI_ASF_TYPE_RESERVED = 5 |
| 145 | }; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 146 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 147 | /* |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 148 | * ASF subtables |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 149 | */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 150 | |
| 151 | /* 0: ASF Information */ |
| 152 | |
| 153 | struct acpi_asf_info { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 154 | struct acpi_asf_header header; |
| 155 | u8 min_reset_value; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 156 | u8 min_poll_interval; |
| 157 | u16 system_id; |
| 158 | u32 mfg_id; |
| 159 | u8 flags; |
| 160 | u8 reserved2[3]; |
| 161 | }; |
| 162 | |
| 163 | /* 1: ASF Alerts */ |
| 164 | |
| 165 | struct acpi_asf_alert { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 166 | struct acpi_asf_header header; |
| 167 | u8 assert_mask; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 168 | u8 deassert_mask; |
| 169 | u8 alerts; |
| 170 | u8 data_length; |
Bob Moore | 775d85b | 2007-02-02 19:48:20 +0300 | [diff] [blame] | 171 | }; |
| 172 | |
| 173 | struct acpi_asf_alert_data { |
| 174 | u8 address; |
| 175 | u8 command; |
| 176 | u8 mask; |
| 177 | u8 value; |
| 178 | u8 sensor_type; |
| 179 | u8 type; |
| 180 | u8 offset; |
| 181 | u8 source_type; |
| 182 | u8 severity; |
| 183 | u8 sensor_number; |
| 184 | u8 entity; |
| 185 | u8 instance; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 186 | }; |
| 187 | |
| 188 | /* 2: ASF Remote Control */ |
| 189 | |
| 190 | struct acpi_asf_remote { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 191 | struct acpi_asf_header header; |
| 192 | u8 controls; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 193 | u8 data_length; |
| 194 | u16 reserved2; |
Bob Moore | 775d85b | 2007-02-02 19:48:20 +0300 | [diff] [blame] | 195 | }; |
| 196 | |
| 197 | struct acpi_asf_control_data { |
| 198 | u8 function; |
| 199 | u8 address; |
| 200 | u8 command; |
| 201 | u8 value; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 202 | }; |
| 203 | |
| 204 | /* 3: ASF RMCP Boot Options */ |
| 205 | |
| 206 | struct acpi_asf_rmcp { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 207 | struct acpi_asf_header header; |
| 208 | u8 capabilities[7]; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 209 | u8 completion_code; |
| 210 | u32 enterprise_id; |
| 211 | u8 command; |
| 212 | u16 parameter; |
| 213 | u16 boot_options; |
| 214 | u16 oem_parameters; |
| 215 | }; |
| 216 | |
| 217 | /* 4: ASF Address */ |
| 218 | |
| 219 | struct acpi_asf_address { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 220 | struct acpi_asf_header header; |
| 221 | u8 eprom_address; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 222 | u8 devices; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 223 | }; |
| 224 | |
| 225 | /******************************************************************************* |
| 226 | * |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 227 | * BERT - Boot Error Record Table |
| 228 | * |
| 229 | ******************************************************************************/ |
| 230 | |
| 231 | struct acpi_table_bert { |
| 232 | struct acpi_table_header header; /* Common ACPI table header */ |
| 233 | u32 region_length; /* Length of the boot error region */ |
| 234 | u64 address; /* Physical addresss of the error region */ |
| 235 | }; |
| 236 | |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 237 | /* Boot Error Region */ |
| 238 | |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 239 | struct acpi_bert_region { |
| 240 | u32 block_status; |
| 241 | u32 raw_data_offset; |
| 242 | u32 raw_data_length; |
| 243 | u32 data_length; |
| 244 | u32 error_severity; |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 245 | }; |
| 246 | |
| 247 | /* block_status Flags */ |
| 248 | |
| 249 | #define ACPI_BERT_UNCORRECTABLE (1) |
| 250 | #define ACPI_BERT_CORRECTABLE (2) |
| 251 | #define ACPI_BERT_MULTIPLE_UNCORRECTABLE (4) |
| 252 | #define ACPI_BERT_MULTIPLE_CORRECTABLE (8) |
| 253 | |
| 254 | /******************************************************************************* |
| 255 | * |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 256 | * BOOT - Simple Boot Flag Table |
| 257 | * |
| 258 | ******************************************************************************/ |
| 259 | |
| 260 | struct acpi_table_boot { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 261 | struct acpi_table_header header; /* Common ACPI table header */ |
| 262 | u8 cmos_index; /* Index in CMOS RAM for the boot register */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 263 | u8 reserved[3]; |
| 264 | }; |
| 265 | |
| 266 | /******************************************************************************* |
| 267 | * |
| 268 | * CPEP - Corrected Platform Error Polling table |
| 269 | * |
| 270 | ******************************************************************************/ |
| 271 | |
| 272 | struct acpi_table_cpep { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 273 | struct acpi_table_header header; /* Common ACPI table header */ |
| 274 | u64 reserved; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 275 | }; |
| 276 | |
| 277 | /* Subtable */ |
| 278 | |
| 279 | struct acpi_cpep_polling { |
| 280 | u8 type; |
| 281 | u8 length; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 282 | u8 id; /* Processor ID */ |
| 283 | u8 eid; /* Processor EID */ |
| 284 | u32 interval; /* Polling interval (msec) */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 285 | }; |
| 286 | |
| 287 | /******************************************************************************* |
| 288 | * |
| 289 | * DBGP - Debug Port table |
| 290 | * |
| 291 | ******************************************************************************/ |
| 292 | |
| 293 | struct acpi_table_dbgp { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 294 | struct acpi_table_header header; /* Common ACPI table header */ |
| 295 | u8 type; /* 0=full 16550, 1=subset of 16550 */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 296 | u8 reserved[3]; |
| 297 | struct acpi_generic_address debug_port; |
| 298 | }; |
| 299 | |
| 300 | /******************************************************************************* |
| 301 | * |
Bob Moore | 2502fff | 2007-02-02 19:48:19 +0300 | [diff] [blame] | 302 | * DMAR - DMA Remapping table |
Bob Moore | 19d0cfe | 2008-06-10 15:54:40 +0800 | [diff] [blame] | 303 | * From "Intel Virtualization Technology for Directed I/O", Sept. 2007 |
Bob Moore | 2502fff | 2007-02-02 19:48:19 +0300 | [diff] [blame] | 304 | * |
| 305 | ******************************************************************************/ |
| 306 | |
| 307 | struct acpi_table_dmar { |
| 308 | struct acpi_table_header header; /* Common ACPI table header */ |
| 309 | u8 width; /* Host Address Width */ |
Keshavamurthy, Anil S | 10e5247 | 2007-10-21 16:41:41 -0700 | [diff] [blame] | 310 | u8 flags; |
| 311 | u8 reserved[10]; |
Bob Moore | 2502fff | 2007-02-02 19:48:19 +0300 | [diff] [blame] | 312 | }; |
| 313 | |
Bob Moore | 75e5b5f | 2008-06-10 14:19:32 +0800 | [diff] [blame] | 314 | /* Flags */ |
| 315 | |
| 316 | #define ACPI_DMAR_INTR_REMAP (1) |
| 317 | |
Bob Moore | 2502fff | 2007-02-02 19:48:19 +0300 | [diff] [blame] | 318 | /* DMAR subtable header */ |
| 319 | |
| 320 | struct acpi_dmar_header { |
| 321 | u16 type; |
| 322 | u16 length; |
Bob Moore | 2502fff | 2007-02-02 19:48:19 +0300 | [diff] [blame] | 323 | }; |
| 324 | |
| 325 | /* Values for subtable type in struct acpi_dmar_header */ |
| 326 | |
| 327 | enum acpi_dmar_type { |
| 328 | ACPI_DMAR_TYPE_HARDWARE_UNIT = 0, |
| 329 | ACPI_DMAR_TYPE_RESERVED_MEMORY = 1, |
Keshavamurthy, Anil S | 10e5247 | 2007-10-21 16:41:41 -0700 | [diff] [blame] | 330 | ACPI_DMAR_TYPE_ATSR = 2, |
| 331 | ACPI_DMAR_TYPE_RESERVED = 3 /* 3 and greater are reserved */ |
Bob Moore | 2502fff | 2007-02-02 19:48:19 +0300 | [diff] [blame] | 332 | }; |
| 333 | |
| 334 | struct acpi_dmar_device_scope { |
| 335 | u8 entry_type; |
| 336 | u8 length; |
Keshavamurthy, Anil S | 10e5247 | 2007-10-21 16:41:41 -0700 | [diff] [blame] | 337 | u16 reserved; |
| 338 | u8 enumeration_id; |
Bob Moore | 2502fff | 2007-02-02 19:48:19 +0300 | [diff] [blame] | 339 | u8 bus; |
| 340 | }; |
| 341 | |
| 342 | /* Values for entry_type in struct acpi_dmar_device_scope */ |
| 343 | |
| 344 | enum acpi_dmar_scope_type { |
| 345 | ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0, |
| 346 | ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1, |
| 347 | ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2, |
Keshavamurthy, Anil S | 10e5247 | 2007-10-21 16:41:41 -0700 | [diff] [blame] | 348 | ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3, |
| 349 | ACPI_DMAR_SCOPE_TYPE_HPET = 4, |
| 350 | ACPI_DMAR_SCOPE_TYPE_RESERVED = 5 /* 5 and greater are reserved */ |
| 351 | }; |
| 352 | |
| 353 | struct acpi_dmar_pci_path { |
| 354 | u8 dev; |
| 355 | u8 fn; |
Bob Moore | 2502fff | 2007-02-02 19:48:19 +0300 | [diff] [blame] | 356 | }; |
| 357 | |
| 358 | /* |
| 359 | * DMAR Sub-tables, correspond to Type in struct acpi_dmar_header |
| 360 | */ |
| 361 | |
| 362 | /* 0: Hardware Unit Definition */ |
| 363 | |
| 364 | struct acpi_dmar_hardware_unit { |
| 365 | struct acpi_dmar_header header; |
Keshavamurthy, Anil S | 10e5247 | 2007-10-21 16:41:41 -0700 | [diff] [blame] | 366 | u8 flags; |
| 367 | u8 reserved; |
| 368 | u16 segment; |
Bob Moore | 2502fff | 2007-02-02 19:48:19 +0300 | [diff] [blame] | 369 | u64 address; /* Register Base Address */ |
| 370 | }; |
| 371 | |
| 372 | /* Flags */ |
| 373 | |
| 374 | #define ACPI_DMAR_INCLUDE_ALL (1) |
| 375 | |
| 376 | /* 1: Reserved Memory Defininition */ |
| 377 | |
| 378 | struct acpi_dmar_reserved_memory { |
| 379 | struct acpi_dmar_header header; |
Keshavamurthy, Anil S | 10e5247 | 2007-10-21 16:41:41 -0700 | [diff] [blame] | 380 | u16 reserved; |
| 381 | u16 segment; |
| 382 | u64 base_address; /* 4_k aligned base address */ |
Bob Moore | 2502fff | 2007-02-02 19:48:19 +0300 | [diff] [blame] | 383 | u64 end_address; /* 4_k aligned limit address */ |
| 384 | }; |
| 385 | |
| 386 | /* Flags */ |
| 387 | |
| 388 | #define ACPI_DMAR_ALLOW_ALL (1) |
| 389 | |
Bob Moore | 19d0cfe | 2008-06-10 15:54:40 +0800 | [diff] [blame] | 390 | |
| 391 | /* 2: Root Port ATS Capability Reporting Structure */ |
| 392 | |
| 393 | struct acpi_dmar_atsr { |
| 394 | struct acpi_dmar_header header; |
| 395 | u8 flags; |
| 396 | u8 reserved; |
| 397 | u16 segment; |
| 398 | }; |
| 399 | |
| 400 | /* Flags */ |
| 401 | |
| 402 | #define ACPI_DMAR_ALL_PORTS (1) |
| 403 | |
Bob Moore | 2502fff | 2007-02-02 19:48:19 +0300 | [diff] [blame] | 404 | /******************************************************************************* |
| 405 | * |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 406 | * ECDT - Embedded Controller Boot Resources Table |
| 407 | * |
| 408 | ******************************************************************************/ |
| 409 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 410 | struct acpi_table_ecdt { |
| 411 | struct acpi_table_header header; /* Common ACPI table header */ |
| 412 | struct acpi_generic_address control; /* Address of EC command/status register */ |
| 413 | struct acpi_generic_address data; /* Address of EC data register */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 414 | u32 uid; /* Unique ID - must be same as the EC _UID method */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 415 | u8 gpe; /* The GPE for the EC */ |
| 416 | u8 id[1]; /* Full namepath of the EC in the ACPI namespace */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 417 | }; |
| 418 | |
| 419 | /******************************************************************************* |
| 420 | * |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 421 | * EINJ - Error Injection Table |
| 422 | * |
| 423 | ******************************************************************************/ |
| 424 | |
| 425 | struct acpi_table_einj { |
| 426 | struct acpi_table_header header; /* Common ACPI table header */ |
| 427 | u32 header_length; |
| 428 | u32 reserved; |
| 429 | u32 entries; |
| 430 | }; |
| 431 | |
| 432 | /* EINJ Injection Instruction Entries (actions) */ |
| 433 | |
| 434 | struct acpi_einj_entry { |
| 435 | struct acpi_whea_header whea_header; /* Common header for WHEA tables */ |
| 436 | }; |
| 437 | |
| 438 | /* Values for Action field above */ |
| 439 | |
| 440 | enum acpi_einj_actions { |
| 441 | ACPI_EINJ_BEGIN_OPERATION = 0, |
| 442 | ACPI_EINJ_GET_TRIGGER_TABLE = 1, |
| 443 | ACPI_EINJ_SET_ERROR_TYPE = 2, |
| 444 | ACPI_EINJ_GET_ERROR_TYPE = 3, |
| 445 | ACPI_EINJ_END_OPERATION = 4, |
| 446 | ACPI_EINJ_EXECUTE_OPERATION = 5, |
| 447 | ACPI_EINJ_CHECK_BUSY_STATUS = 6, |
| 448 | ACPI_EINJ_GET_COMMAND_STATUS = 7, |
| 449 | ACPI_EINJ_ACTION_RESERVED = 8, /* 8 and greater are reserved */ |
| 450 | ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */ |
| 451 | }; |
| 452 | |
| 453 | /* Values for Instruction field above */ |
| 454 | |
| 455 | enum acpi_einj_instructions { |
| 456 | ACPI_EINJ_READ_REGISTER = 0, |
| 457 | ACPI_EINJ_READ_REGISTER_VALUE = 1, |
| 458 | ACPI_EINJ_WRITE_REGISTER = 2, |
| 459 | ACPI_EINJ_WRITE_REGISTER_VALUE = 3, |
| 460 | ACPI_EINJ_NOOP = 4, |
| 461 | ACPI_EINJ_INSTRUCTION_RESERVED = 5 /* 5 and greater are reserved */ |
| 462 | }; |
| 463 | |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 464 | /* EINJ Trigger Error Action Table */ |
| 465 | |
| 466 | struct acpi_einj_trigger { |
| 467 | u32 header_size; |
| 468 | u32 revision; |
| 469 | u32 table_size; |
| 470 | u32 entry_count; |
| 471 | }; |
| 472 | |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 473 | /******************************************************************************* |
| 474 | * |
| 475 | * ERST - Error Record Serialization Table |
| 476 | * |
| 477 | ******************************************************************************/ |
| 478 | |
| 479 | struct acpi_table_erst { |
| 480 | struct acpi_table_header header; /* Common ACPI table header */ |
| 481 | u32 header_length; |
| 482 | u32 reserved; |
| 483 | u32 entries; |
| 484 | }; |
| 485 | |
| 486 | /* ERST Serialization Entries (actions) */ |
| 487 | |
| 488 | struct acpi_erst_entry { |
| 489 | struct acpi_whea_header whea_header; /* Common header for WHEA tables */ |
| 490 | }; |
| 491 | |
| 492 | /* Values for Action field above */ |
| 493 | |
| 494 | enum acpi_erst_actions { |
| 495 | ACPI_ERST_BEGIN_WRITE_OPERATION = 0, |
| 496 | ACPI_ERST_BEGIN_READ_OPERATION = 1, |
| 497 | ACPI_ERST_BETGIN_CLEAR_OPERATION = 2, |
| 498 | ACPI_ERST_END_OPERATION = 3, |
| 499 | ACPI_ERST_SET_RECORD_OFFSET = 4, |
| 500 | ACPI_ERST_EXECUTE_OPERATION = 5, |
| 501 | ACPI_ERST_CHECK_BUSY_STATUS = 6, |
| 502 | ACPI_ERST_GET_COMMAND_STATUS = 7, |
| 503 | ACPI_ERST_GET_RECORD_IDENTIFIER = 8, |
| 504 | ACPI_ERST_SET_RECORD_IDENTIFIER = 9, |
| 505 | ACPI_ERST_GET_RECORD_COUNT = 10, |
| 506 | ACPI_ERST_BEGIN_DUMMY_WRIITE = 11, |
| 507 | ACPI_ERST_NOT_USED = 12, |
| 508 | ACPI_ERST_GET_ERROR_RANGE = 13, |
| 509 | ACPI_ERST_GET_ERROR_LENGTH = 14, |
| 510 | ACPI_ERST_GET_ERROR_ATTRIBUTES = 15, |
| 511 | ACPI_ERST_ACTION_RESERVED = 16 /* 16 and greater are reserved */ |
| 512 | }; |
| 513 | |
| 514 | /* Values for Instruction field above */ |
| 515 | |
| 516 | enum acpi_erst_instructions { |
| 517 | ACPI_ERST_READ_REGISTER = 0, |
| 518 | ACPI_ERST_READ_REGISTER_VALUE = 1, |
| 519 | ACPI_ERST_WRITE_REGISTER = 2, |
| 520 | ACPI_ERST_WRITE_REGISTER_VALUE = 3, |
| 521 | ACPI_ERST_NOOP = 4, |
| 522 | ACPI_ERST_LOAD_VAR1 = 5, |
| 523 | ACPI_ERST_LOAD_VAR2 = 6, |
| 524 | ACPI_ERST_STORE_VAR1 = 7, |
| 525 | ACPI_ERST_ADD = 8, |
| 526 | ACPI_ERST_SUBTRACT = 9, |
| 527 | ACPI_ERST_ADD_VALUE = 10, |
| 528 | ACPI_ERST_SUBTRACT_VALUE = 11, |
| 529 | ACPI_ERST_STALL = 12, |
| 530 | ACPI_ERST_STALL_WHILE_TRUE = 13, |
| 531 | ACPI_ERST_SKIP_NEXT_IF_TRUE = 14, |
| 532 | ACPI_ERST_GOTO = 15, |
| 533 | ACPI_ERST_SET_SRC_ADDRESS_BASE = 16, |
| 534 | ACPI_ERST_SET_DST_ADDRESS_BASE = 17, |
| 535 | ACPI_ERST_MOVE_DATA = 18, |
| 536 | ACPI_ERST_INSTRUCTION_RESERVED = 19 /* 19 and greater are reserved */ |
| 537 | }; |
| 538 | |
| 539 | /******************************************************************************* |
| 540 | * |
| 541 | * HEST - Hardware Error Source Table |
| 542 | * |
| 543 | ******************************************************************************/ |
| 544 | |
| 545 | struct acpi_table_hest { |
| 546 | struct acpi_table_header header; /* Common ACPI table header */ |
| 547 | u32 error_source_count; |
| 548 | }; |
| 549 | |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 550 | /* HEST subtable header */ |
| 551 | |
| 552 | struct acpi_hest_header { |
| 553 | u16 type; |
| 554 | }; |
| 555 | |
| 556 | /* Values for Type field above for subtables */ |
| 557 | |
| 558 | enum acpi_hest_types { |
| 559 | ACPI_HEST_TYPE_XPF_MACHINE_CHECK = 0, |
| 560 | ACPI_HEST_TYPE_XPF_CORRECTED_MACHINE_CHECK = 1, |
| 561 | ACPI_HEST_TYPE_XPF_UNUSED = 2, |
| 562 | ACPI_HEST_TYPE_XPF_NON_MASKABLE_INTERRUPT = 3, |
| 563 | ACPI_HEST_TYPE_IPF_CORRECTED_MACHINE_CHECK = 4, |
| 564 | ACPI_HEST_TYPE_IPF_CORRECTED_PLATFORM_ERROR = 5, |
| 565 | ACPI_HEST_TYPE_AER_ROOT_PORT = 6, |
| 566 | ACPI_HEST_TYPE_AER_ENDPOINT = 7, |
| 567 | ACPI_HEST_TYPE_AER_BRIDGE = 8, |
| 568 | ACPI_HEST_TYPE_GENERIC_HARDWARE_ERROR_SOURCE = 9, |
| 569 | ACPI_HEST_TYPE_RESERVED = 10 /* 10 and greater are reserved */ |
| 570 | }; |
| 571 | |
| 572 | /* |
| 573 | * HEST Sub-subtables |
| 574 | */ |
| 575 | |
| 576 | /* XPF Machine Check Error Bank */ |
| 577 | |
| 578 | struct acpi_hest_xpf_error_bank { |
| 579 | u8 bank_number; |
| 580 | u8 clear_status_on_init; |
| 581 | u8 status_format; |
| 582 | u8 config_write_enable; |
| 583 | u32 control_register; |
| 584 | u64 control_init_data; |
| 585 | u32 status_register; |
| 586 | u32 address_register; |
| 587 | u32 misc_register; |
| 588 | }; |
| 589 | |
| 590 | /* Generic Error Status */ |
| 591 | |
| 592 | struct acpi_hest_generic_status { |
| 593 | u32 block_status; |
| 594 | u32 raw_data_offset; |
| 595 | u32 raw_data_length; |
| 596 | u32 data_length; |
| 597 | u32 error_severity; |
| 598 | }; |
| 599 | |
| 600 | /* Generic Error Data */ |
| 601 | |
| 602 | struct acpi_hest_generic_data { |
| 603 | u8 section_type[16]; |
| 604 | u32 error_severity; |
| 605 | u16 revision; |
| 606 | u8 validation_bits; |
| 607 | u8 flags; |
| 608 | u32 error_data_length; |
| 609 | u8 fru_id[16]; |
| 610 | u8 fru_text[20]; |
| 611 | }; |
| 612 | |
| 613 | /* Common HEST structure for PCI/AER types below (6,7,8) */ |
| 614 | |
| 615 | struct acpi_hest_aer_common { |
| 616 | u16 source_id; |
| 617 | u16 config_write_enable; |
| 618 | u8 flags; |
| 619 | u8 enabled; |
| 620 | u32 records_to_pre_allocate; |
| 621 | u32 max_sections_per_record; |
| 622 | u32 bus; |
| 623 | u16 device; |
| 624 | u16 function; |
| 625 | u16 device_control; |
| 626 | u16 reserved; |
| 627 | u32 uncorrectable_error_mask; |
| 628 | u32 uncorrectable_error_severity; |
| 629 | u32 correctable_error_mask; |
Bob Moore | 7488c8d | 2008-12-16 16:04:29 +0800 | [diff] [blame] | 630 | u32 advanced_error_capabilities; |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 631 | }; |
| 632 | |
| 633 | /* Hardware Error Notification */ |
| 634 | |
| 635 | struct acpi_hest_notify { |
| 636 | u8 type; |
| 637 | u8 length; |
| 638 | u16 config_write_enable; |
| 639 | u32 poll_interval; |
| 640 | u32 vector; |
| 641 | u32 polling_threshold_value; |
| 642 | u32 polling_threshold_window; |
| 643 | u32 error_threshold_value; |
| 644 | u32 error_threshold_window; |
| 645 | }; |
| 646 | |
| 647 | /* Values for Notify Type field above */ |
| 648 | |
| 649 | enum acpi_hest_notify_types { |
| 650 | ACPI_HEST_NOTIFY_POLLED = 0, |
| 651 | ACPI_HEST_NOTIFY_EXTERNAL = 1, |
| 652 | ACPI_HEST_NOTIFY_LOCAL = 2, |
| 653 | ACPI_HEST_NOTIFY_SCI = 3, |
| 654 | ACPI_HEST_NOTIFY_NMI = 4, |
| 655 | ACPI_HEST_NOTIFY_RESERVED = 5 /* 5 and greater are reserved */ |
| 656 | }; |
| 657 | |
| 658 | /* |
| 659 | * HEST subtables |
| 660 | * |
| 661 | * From WHEA Design Document, 16 May 2007. |
| 662 | * Note: There is no subtable type 2 in this version of the document, |
| 663 | * and there are two different subtable type 3s. |
| 664 | */ |
| 665 | |
| 666 | /* 0: XPF Machine Check Exception */ |
| 667 | |
| 668 | struct acpi_hest_xpf_machine_check { |
| 669 | struct acpi_hest_header header; |
| 670 | u16 source_id; |
| 671 | u16 config_write_enable; |
| 672 | u8 flags; |
| 673 | u8 reserved1; |
| 674 | u32 records_to_pre_allocate; |
| 675 | u32 max_sections_per_record; |
| 676 | u64 global_capability_data; |
| 677 | u64 global_control_data; |
| 678 | u8 num_hardware_banks; |
| 679 | u8 reserved2[7]; |
| 680 | }; |
| 681 | |
| 682 | /* 1: XPF Corrected Machine Check */ |
| 683 | |
| 684 | struct acpi_table_hest_xpf_corrected { |
| 685 | struct acpi_hest_header header; |
| 686 | u16 source_id; |
| 687 | u16 config_write_enable; |
| 688 | u8 flags; |
| 689 | u8 enabled; |
| 690 | u32 records_to_pre_allocate; |
| 691 | u32 max_sections_per_record; |
| 692 | struct acpi_hest_notify notify; |
| 693 | u8 num_hardware_banks; |
| 694 | u8 reserved[3]; |
| 695 | }; |
| 696 | |
| 697 | /* 3: XPF Non-Maskable Interrupt */ |
| 698 | |
| 699 | struct acpi_hest_xpf_nmi { |
| 700 | struct acpi_hest_header header; |
| 701 | u16 source_id; |
| 702 | u32 reserved; |
| 703 | u32 records_to_pre_allocate; |
| 704 | u32 max_sections_per_record; |
| 705 | u32 max_raw_data_length; |
| 706 | }; |
| 707 | |
| 708 | /* 4: IPF Corrected Machine Check */ |
| 709 | |
| 710 | struct acpi_hest_ipf_corrected { |
| 711 | struct acpi_hest_header header; |
| 712 | u8 enabled; |
| 713 | u8 reserved; |
| 714 | }; |
| 715 | |
| 716 | /* 5: IPF Corrected Platform Error */ |
| 717 | |
| 718 | struct acpi_hest_ipf_corrected_platform { |
| 719 | struct acpi_hest_header header; |
| 720 | u8 enabled; |
| 721 | u8 reserved; |
| 722 | }; |
| 723 | |
| 724 | /* 6: PCI Express Root Port AER */ |
| 725 | |
| 726 | struct acpi_hest_aer_root { |
| 727 | struct acpi_hest_header header; |
| 728 | struct acpi_hest_aer_common aer; |
| 729 | u32 root_error_command; |
| 730 | }; |
| 731 | |
| 732 | /* 7: PCI Express AER (AER Endpoint) */ |
| 733 | |
| 734 | struct acpi_hest_aer { |
| 735 | struct acpi_hest_header header; |
| 736 | struct acpi_hest_aer_common aer; |
| 737 | }; |
| 738 | |
| 739 | /* 8: PCI Express/PCI-X Bridge AER */ |
| 740 | |
| 741 | struct acpi_hest_aer_bridge { |
| 742 | struct acpi_hest_header header; |
| 743 | struct acpi_hest_aer_common aer; |
| 744 | u32 secondary_uncorrectable_error_mask; |
| 745 | u32 secondary_uncorrectable_error_severity; |
| 746 | u32 secondary_advanced_capabilities; |
| 747 | }; |
| 748 | |
| 749 | /* 9: Generic Hardware Error Source */ |
| 750 | |
| 751 | struct acpi_hest_generic { |
| 752 | struct acpi_hest_header header; |
| 753 | u16 source_id; |
| 754 | u16 related_source_id; |
| 755 | u8 config_write_enable; |
| 756 | u8 enabled; |
| 757 | u32 records_to_pre_allocate; |
| 758 | u32 max_sections_per_record; |
| 759 | u32 max_raw_data_length; |
| 760 | struct acpi_generic_address error_status_address; |
| 761 | struct acpi_hest_notify notify; |
| 762 | u32 error_status_block_length; |
| 763 | }; |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 764 | |
| 765 | /******************************************************************************* |
| 766 | * |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 767 | * HPET - High Precision Event Timer table |
| 768 | * |
| 769 | ******************************************************************************/ |
| 770 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 771 | struct acpi_table_hpet { |
| 772 | struct acpi_table_header header; /* Common ACPI table header */ |
| 773 | u32 id; /* Hardware ID of event timer block */ |
| 774 | struct acpi_generic_address address; /* Address of event timer block */ |
| 775 | u8 sequence; /* HPET sequence number */ |
| 776 | u16 minimum_tick; /* Main counter min tick, periodic mode */ |
| 777 | u8 flags; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 778 | }; |
| 779 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 780 | /*! Flags */ |
| 781 | |
| 782 | #define ACPI_HPET_PAGE_PROTECT (1) /* 00: No page protection */ |
| 783 | #define ACPI_HPET_PAGE_PROTECT_4 (1<<1) /* 01: 4KB page protected */ |
| 784 | #define ACPI_HPET_PAGE_PROTECT_64 (1<<2) /* 02: 64KB page protected */ |
| 785 | |
| 786 | /*! [End] no source code translation !*/ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 787 | |
| 788 | /******************************************************************************* |
| 789 | * |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 790 | * IBFT - Boot Firmware Table |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 791 | * |
| 792 | ******************************************************************************/ |
| 793 | |
| 794 | struct acpi_table_ibft { |
| 795 | struct acpi_table_header header; /* Common ACPI table header */ |
| 796 | u8 reserved[12]; |
| 797 | }; |
| 798 | |
| 799 | /* IBFT common subtable header */ |
| 800 | |
| 801 | struct acpi_ibft_header { |
| 802 | u8 type; |
| 803 | u8 version; |
| 804 | u16 length; |
| 805 | u8 index; |
| 806 | u8 flags; |
| 807 | }; |
| 808 | |
| 809 | /* Values for Type field above */ |
| 810 | |
| 811 | enum acpi_ibft_type { |
| 812 | ACPI_IBFT_TYPE_NOT_USED = 0, |
| 813 | ACPI_IBFT_TYPE_CONTROL = 1, |
| 814 | ACPI_IBFT_TYPE_INITIATOR = 2, |
| 815 | ACPI_IBFT_TYPE_NIC = 3, |
| 816 | ACPI_IBFT_TYPE_TARGET = 4, |
| 817 | ACPI_IBFT_TYPE_EXTENSIONS = 5, |
| 818 | ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */ |
| 819 | }; |
| 820 | |
| 821 | /* IBFT subtables */ |
| 822 | |
| 823 | struct acpi_ibft_control { |
| 824 | struct acpi_ibft_header header; |
| 825 | u16 extensions; |
| 826 | u16 initiator_offset; |
| 827 | u16 nic0_offset; |
| 828 | u16 target0_offset; |
| 829 | u16 nic1_offset; |
| 830 | u16 target1_offset; |
| 831 | }; |
| 832 | |
| 833 | struct acpi_ibft_initiator { |
| 834 | struct acpi_ibft_header header; |
| 835 | u8 sns_server[16]; |
| 836 | u8 slp_server[16]; |
| 837 | u8 primary_server[16]; |
| 838 | u8 secondary_server[16]; |
| 839 | u16 name_length; |
| 840 | u16 name_offset; |
| 841 | }; |
| 842 | |
| 843 | struct acpi_ibft_nic { |
| 844 | struct acpi_ibft_header header; |
| 845 | u8 ip_address[16]; |
| 846 | u8 subnet_mask_prefix; |
| 847 | u8 origin; |
| 848 | u8 gateway[16]; |
| 849 | u8 primary_dns[16]; |
| 850 | u8 secondary_dns[16]; |
| 851 | u8 dhcp[16]; |
| 852 | u16 vlan; |
| 853 | u8 mac_address[6]; |
| 854 | u16 pci_address; |
| 855 | u16 name_length; |
| 856 | u16 name_offset; |
| 857 | }; |
| 858 | |
| 859 | struct acpi_ibft_target { |
| 860 | struct acpi_ibft_header header; |
| 861 | u8 target_ip_address[16]; |
| 862 | u16 target_ip_socket; |
| 863 | u8 target_boot_lun[8]; |
| 864 | u8 chap_type; |
| 865 | u8 nic_association; |
| 866 | u16 target_name_length; |
| 867 | u16 target_name_offset; |
| 868 | u16 chap_name_length; |
| 869 | u16 chap_name_offset; |
| 870 | u16 chap_secret_length; |
| 871 | u16 chap_secret_offset; |
| 872 | u16 reverse_chap_name_length; |
| 873 | u16 reverse_chap_name_offset; |
| 874 | u16 reverse_chap_secret_length; |
| 875 | u16 reverse_chap_secret_offset; |
| 876 | }; |
| 877 | |
| 878 | /******************************************************************************* |
| 879 | * |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 880 | * MADT - Multiple APIC Description Table |
| 881 | * |
| 882 | ******************************************************************************/ |
| 883 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 884 | struct acpi_table_madt { |
| 885 | struct acpi_table_header header; /* Common ACPI table header */ |
| 886 | u32 address; /* Physical address of local APIC */ |
| 887 | u32 flags; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 888 | }; |
| 889 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 890 | /* Flags */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 891 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 892 | #define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 893 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 894 | /* Values for PCATCompat flag */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 895 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 896 | #define ACPI_MADT_DUAL_PIC 0 |
| 897 | #define ACPI_MADT_MULTIPLE_APIC 1 |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 898 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 899 | /* Values for subtable type in struct acpi_subtable_header */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 900 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 901 | enum acpi_madt_type { |
| 902 | ACPI_MADT_TYPE_LOCAL_APIC = 0, |
| 903 | ACPI_MADT_TYPE_IO_APIC = 1, |
| 904 | ACPI_MADT_TYPE_INTERRUPT_OVERRIDE = 2, |
| 905 | ACPI_MADT_TYPE_NMI_SOURCE = 3, |
| 906 | ACPI_MADT_TYPE_LOCAL_APIC_NMI = 4, |
| 907 | ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE = 5, |
| 908 | ACPI_MADT_TYPE_IO_SAPIC = 6, |
| 909 | ACPI_MADT_TYPE_LOCAL_SAPIC = 7, |
| 910 | ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8, |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 911 | ACPI_MADT_TYPE_LOCAL_X2APIC = 9, |
| 912 | ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10, |
| 913 | ACPI_MADT_TYPE_RESERVED = 11 /* 11 and greater are reserved */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 914 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 915 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 916 | /* |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 917 | * MADT Sub-tables, correspond to Type in struct acpi_subtable_header |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 918 | */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 919 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 920 | /* 0: Processor Local APIC */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 921 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 922 | struct acpi_madt_local_apic { |
| 923 | struct acpi_subtable_header header; |
| 924 | u8 processor_id; /* ACPI processor id */ |
| 925 | u8 id; /* Processor's local APIC id */ |
| 926 | u32 lapic_flags; |
| 927 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 928 | |
| 929 | /* 1: IO APIC */ |
| 930 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 931 | struct acpi_madt_io_apic { |
| 932 | struct acpi_subtable_header header; |
| 933 | u8 id; /* I/O APIC ID */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 934 | u8 reserved; /* Reserved - must be zero */ |
| 935 | u32 address; /* APIC physical address */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 936 | u32 global_irq_base; /* Global system interrupt where INTI lines start */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 937 | }; |
| 938 | |
| 939 | /* 2: Interrupt Override */ |
| 940 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 941 | struct acpi_madt_interrupt_override { |
| 942 | struct acpi_subtable_header header; |
| 943 | u8 bus; /* 0 - ISA */ |
| 944 | u8 source_irq; /* Interrupt source (IRQ) */ |
| 945 | u32 global_irq; /* Global system interrupt */ |
| 946 | u16 inti_flags; |
| 947 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 948 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 949 | /* 3: NMI Source */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 950 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 951 | struct acpi_madt_nmi_source { |
| 952 | struct acpi_subtable_header header; |
| 953 | u16 inti_flags; |
| 954 | u32 global_irq; /* Global system interrupt */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 955 | }; |
| 956 | |
| 957 | /* 4: Local APIC NMI */ |
| 958 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 959 | struct acpi_madt_local_apic_nmi { |
| 960 | struct acpi_subtable_header header; |
| 961 | u8 processor_id; /* ACPI processor id */ |
| 962 | u16 inti_flags; |
| 963 | u8 lint; /* LINTn to which NMI is connected */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 964 | }; |
| 965 | |
| 966 | /* 5: Address Override */ |
| 967 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 968 | struct acpi_madt_local_apic_override { |
| 969 | struct acpi_subtable_header header; |
| 970 | u16 reserved; /* Reserved, must be zero */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 971 | u64 address; /* APIC physical address */ |
| 972 | }; |
| 973 | |
| 974 | /* 6: I/O Sapic */ |
| 975 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 976 | struct acpi_madt_io_sapic { |
| 977 | struct acpi_subtable_header header; |
| 978 | u8 id; /* I/O SAPIC ID */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 979 | u8 reserved; /* Reserved, must be zero */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 980 | u32 global_irq_base; /* Global interrupt for SAPIC start */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 981 | u64 address; /* SAPIC physical address */ |
| 982 | }; |
| 983 | |
| 984 | /* 7: Local Sapic */ |
| 985 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 986 | struct acpi_madt_local_sapic { |
| 987 | struct acpi_subtable_header header; |
| 988 | u8 processor_id; /* ACPI processor id */ |
| 989 | u8 id; /* SAPIC ID */ |
| 990 | u8 eid; /* SAPIC EID */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 991 | u8 reserved[3]; /* Reserved, must be zero */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 992 | u32 lapic_flags; |
| 993 | u32 uid; /* Numeric UID - ACPI 3.0 */ |
| 994 | char uid_string[1]; /* String UID - ACPI 3.0 */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 995 | }; |
| 996 | |
| 997 | /* 8: Platform Interrupt Source */ |
| 998 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 999 | struct acpi_madt_interrupt_source { |
| 1000 | struct acpi_subtable_header header; |
| 1001 | u16 inti_flags; |
| 1002 | u8 type; /* 1=PMI, 2=INIT, 3=corrected */ |
| 1003 | u8 id; /* Processor ID */ |
| 1004 | u8 eid; /* Processor EID */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1005 | u8 io_sapic_vector; /* Vector value for PMI interrupts */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1006 | u32 global_irq; /* Global system interrupt */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1007 | u32 flags; /* Interrupt Source Flags */ |
| 1008 | }; |
| 1009 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1010 | /* Flags field above */ |
| 1011 | |
| 1012 | #define ACPI_MADT_CPEI_OVERRIDE (1) |
| 1013 | |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 1014 | /* 9: Processor Local X2_APIC (07/2008) */ |
| 1015 | |
| 1016 | struct acpi_madt_local_x2apic { |
| 1017 | struct acpi_subtable_header header; |
| 1018 | u16 reserved; /* Reserved - must be zero */ |
Suresh Siddha | 786c221 | 2009-03-30 14:05:50 -0800 | [diff] [blame] | 1019 | u32 local_apic_id; /* Processor x2APIC ID */ |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 1020 | u32 lapic_flags; |
Suresh Siddha | 786c221 | 2009-03-30 14:05:50 -0800 | [diff] [blame] | 1021 | u32 uid; /* ACPI processor UID */ |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 1022 | }; |
| 1023 | |
| 1024 | /* 10: Local X2APIC NMI (07/2008) */ |
| 1025 | |
| 1026 | struct acpi_madt_local_x2apic_nmi { |
| 1027 | struct acpi_subtable_header header; |
| 1028 | u16 inti_flags; |
Suresh Siddha | 786c221 | 2009-03-30 14:05:50 -0800 | [diff] [blame] | 1029 | u32 uid; /* ACPI processor UID */ |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 1030 | u8 lint; /* LINTn to which NMI is connected */ |
| 1031 | u8 reserved[3]; |
| 1032 | }; |
| 1033 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1034 | /* |
| 1035 | * Common flags fields for MADT subtables |
| 1036 | */ |
| 1037 | |
| 1038 | /* MADT Local APIC flags (lapic_flags) */ |
| 1039 | |
| 1040 | #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */ |
| 1041 | |
| 1042 | /* MADT MPS INTI flags (inti_flags) */ |
| 1043 | |
| 1044 | #define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */ |
| 1045 | #define ACPI_MADT_TRIGGER_MASK (3<<2) /* 02-03: Trigger mode of APIC input signals */ |
| 1046 | |
| 1047 | /* Values for MPS INTI flags */ |
| 1048 | |
| 1049 | #define ACPI_MADT_POLARITY_CONFORMS 0 |
| 1050 | #define ACPI_MADT_POLARITY_ACTIVE_HIGH 1 |
| 1051 | #define ACPI_MADT_POLARITY_RESERVED 2 |
| 1052 | #define ACPI_MADT_POLARITY_ACTIVE_LOW 3 |
| 1053 | |
| 1054 | #define ACPI_MADT_TRIGGER_CONFORMS (0) |
| 1055 | #define ACPI_MADT_TRIGGER_EDGE (1<<2) |
| 1056 | #define ACPI_MADT_TRIGGER_RESERVED (2<<2) |
| 1057 | #define ACPI_MADT_TRIGGER_LEVEL (3<<2) |
| 1058 | |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1059 | /******************************************************************************* |
| 1060 | * |
| 1061 | * MCFG - PCI Memory Mapped Configuration table and sub-table |
| 1062 | * |
| 1063 | ******************************************************************************/ |
| 1064 | |
| 1065 | struct acpi_table_mcfg { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1066 | struct acpi_table_header header; /* Common ACPI table header */ |
| 1067 | u8 reserved[8]; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1068 | }; |
| 1069 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1070 | /* Subtable */ |
| 1071 | |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1072 | struct acpi_mcfg_allocation { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1073 | u64 address; /* Base address, processor-relative */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1074 | u16 pci_segment; /* PCI segment group number */ |
| 1075 | u8 start_bus_number; /* Starting PCI Bus number */ |
| 1076 | u8 end_bus_number; /* Final PCI Bus number */ |
| 1077 | u32 reserved; |
| 1078 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1079 | |
| 1080 | /******************************************************************************* |
| 1081 | * |
| 1082 | * SBST - Smart Battery Specification Table |
| 1083 | * |
| 1084 | ******************************************************************************/ |
| 1085 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1086 | struct acpi_table_sbst { |
| 1087 | struct acpi_table_header header; /* Common ACPI table header */ |
| 1088 | u32 warning_level; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1089 | u32 low_level; |
| 1090 | u32 critical_level; |
| 1091 | }; |
| 1092 | |
| 1093 | /******************************************************************************* |
| 1094 | * |
| 1095 | * SLIT - System Locality Distance Information Table |
| 1096 | * |
| 1097 | ******************************************************************************/ |
| 1098 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1099 | struct acpi_table_slit { |
| 1100 | struct acpi_table_header header; /* Common ACPI table header */ |
| 1101 | u64 locality_count; |
| 1102 | u8 entry[1]; /* Real size = localities^2 */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1103 | }; |
| 1104 | |
| 1105 | /******************************************************************************* |
| 1106 | * |
| 1107 | * SPCR - Serial Port Console Redirection table |
| 1108 | * |
| 1109 | ******************************************************************************/ |
| 1110 | |
| 1111 | struct acpi_table_spcr { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1112 | struct acpi_table_header header; /* Common ACPI table header */ |
| 1113 | u8 interface_type; /* 0=full 16550, 1=subset of 16550 */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1114 | u8 reserved[3]; |
| 1115 | struct acpi_generic_address serial_port; |
| 1116 | u8 interrupt_type; |
| 1117 | u8 pc_interrupt; |
| 1118 | u32 interrupt; |
| 1119 | u8 baud_rate; |
| 1120 | u8 parity; |
| 1121 | u8 stop_bits; |
| 1122 | u8 flow_control; |
| 1123 | u8 terminal_type; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1124 | u8 reserved1; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1125 | u16 pci_device_id; |
| 1126 | u16 pci_vendor_id; |
| 1127 | u8 pci_bus; |
| 1128 | u8 pci_device; |
| 1129 | u8 pci_function; |
| 1130 | u32 pci_flags; |
| 1131 | u8 pci_segment; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1132 | u32 reserved2; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1133 | }; |
| 1134 | |
| 1135 | /******************************************************************************* |
| 1136 | * |
| 1137 | * SPMI - Server Platform Management Interface table |
| 1138 | * |
| 1139 | ******************************************************************************/ |
| 1140 | |
| 1141 | struct acpi_table_spmi { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1142 | struct acpi_table_header header; /* Common ACPI table header */ |
| 1143 | u8 reserved; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1144 | u8 interface_type; |
| 1145 | u16 spec_revision; /* Version of IPMI */ |
| 1146 | u8 interrupt_type; |
| 1147 | u8 gpe_number; /* GPE assigned */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1148 | u8 reserved1; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1149 | u8 pci_device_flag; |
| 1150 | u32 interrupt; |
| 1151 | struct acpi_generic_address ipmi_register; |
| 1152 | u8 pci_segment; |
| 1153 | u8 pci_bus; |
| 1154 | u8 pci_device; |
| 1155 | u8 pci_function; |
| 1156 | }; |
| 1157 | |
| 1158 | /******************************************************************************* |
| 1159 | * |
| 1160 | * SRAT - System Resource Affinity Table |
| 1161 | * |
| 1162 | ******************************************************************************/ |
| 1163 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1164 | struct acpi_table_srat { |
| 1165 | struct acpi_table_header header; /* Common ACPI table header */ |
| 1166 | u32 table_revision; /* Must be value '1' */ |
| 1167 | u64 reserved; /* Reserved, must be zero */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1168 | }; |
| 1169 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1170 | /* Values for subtable type in struct acpi_subtable_header */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1171 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1172 | enum acpi_srat_type { |
| 1173 | ACPI_SRAT_TYPE_CPU_AFFINITY = 0, |
| 1174 | ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1, |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 1175 | ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2, |
| 1176 | ACPI_SRAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1177 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1178 | |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 1179 | /* |
| 1180 | * SRAT Sub-tables, correspond to Type in struct acpi_subtable_header |
| 1181 | */ |
| 1182 | |
| 1183 | /* 0: Processor Local APIC/SAPIC Affinity */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1184 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1185 | struct acpi_srat_cpu_affinity { |
| 1186 | struct acpi_subtable_header header; |
| 1187 | u8 proximity_domain_lo; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1188 | u8 apic_id; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1189 | u32 flags; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1190 | u8 local_sapic_eid; |
| 1191 | u8 proximity_domain_hi[3]; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1192 | u32 reserved; /* Reserved, must be zero */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1193 | }; |
| 1194 | |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 1195 | /* 1: Memory Affinity */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1196 | |
| 1197 | struct acpi_srat_mem_affinity { |
| 1198 | struct acpi_subtable_header header; |
| 1199 | u32 proximity_domain; |
| 1200 | u16 reserved; /* Reserved, must be zero */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1201 | u64 base_address; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1202 | u64 length; |
Bob Moore | 19d0cfe | 2008-06-10 15:54:40 +0800 | [diff] [blame] | 1203 | u32 reserved1; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1204 | u32 flags; |
Bob Moore | 19d0cfe | 2008-06-10 15:54:40 +0800 | [diff] [blame] | 1205 | u64 reserved2; /* Reserved, must be zero */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1206 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1207 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1208 | /* Flags */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1209 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1210 | #define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */ |
| 1211 | #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */ |
| 1212 | #define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1213 | |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 1214 | /* 2: Processor Local X2_APIC Affinity (07/2008) */ |
| 1215 | |
| 1216 | struct acpi_srat_x2apic_cpu_affinity { |
| 1217 | struct acpi_subtable_header header; |
| 1218 | u16 reserved; /* Reserved, must be zero */ |
| 1219 | u32 proximity_domain; |
| 1220 | u32 apic_id; |
| 1221 | u32 flags; |
| 1222 | }; |
| 1223 | |
| 1224 | /* Flags for struct acpi_srat_cpu_affinity and struct acpi_srat_x2apic_cpu_affinity */ |
| 1225 | |
| 1226 | #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */ |
| 1227 | |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1228 | /******************************************************************************* |
| 1229 | * |
| 1230 | * TCPA - Trusted Computing Platform Alliance table |
| 1231 | * |
| 1232 | ******************************************************************************/ |
| 1233 | |
| 1234 | struct acpi_table_tcpa { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1235 | struct acpi_table_header header; /* Common ACPI table header */ |
| 1236 | u16 reserved; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1237 | u32 max_log_length; /* Maximum length for the event log area */ |
| 1238 | u64 log_address; /* Address of the event log area */ |
| 1239 | }; |
| 1240 | |
| 1241 | /******************************************************************************* |
| 1242 | * |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 1243 | * UEFI - UEFI Boot optimization Table |
| 1244 | * |
| 1245 | ******************************************************************************/ |
| 1246 | |
| 1247 | struct acpi_table_uefi { |
| 1248 | struct acpi_table_header header; /* Common ACPI table header */ |
| 1249 | u8 identifier[16]; /* UUID identifier */ |
| 1250 | u16 data_offset; /* Offset of remaining data in table */ |
| 1251 | u8 data; |
| 1252 | }; |
| 1253 | |
| 1254 | /******************************************************************************* |
| 1255 | * |
| 1256 | * WDAT - Watchdog Action Table |
| 1257 | * |
| 1258 | ******************************************************************************/ |
| 1259 | |
| 1260 | struct acpi_table_wdat { |
| 1261 | struct acpi_table_header header; /* Common ACPI table header */ |
| 1262 | u32 header_length; /* Watchdog Header Length */ |
| 1263 | u16 pci_segment; /* PCI Segment number */ |
| 1264 | u8 pci_bus; /* PCI Bus number */ |
| 1265 | u8 pci_device; /* PCI Device number */ |
| 1266 | u8 pci_function; /* PCI Function number */ |
| 1267 | u8 reserved[3]; |
| 1268 | u32 timer_period; /* Period of one timer count (msec) */ |
| 1269 | u32 max_count; /* Maximum counter value supported */ |
| 1270 | u32 min_count; /* Minimum counter value */ |
| 1271 | u8 flags; |
| 1272 | u8 reserved2[3]; |
| 1273 | u32 entries; /* Number of watchdog entries that follow */ |
| 1274 | }; |
| 1275 | |
| 1276 | /* WDAT Instruction Entries (actions) */ |
| 1277 | |
| 1278 | struct acpi_wdat_entry { |
| 1279 | struct acpi_whea_header whea_header; /* Common header for WHEA tables */ |
| 1280 | }; |
| 1281 | |
| 1282 | /* Values for Action field above */ |
| 1283 | |
| 1284 | enum acpi_wdat_actions { |
| 1285 | ACPI_WDAT_RESET = 1, |
| 1286 | ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4, |
| 1287 | ACPI_WDAT_GET_COUNTDOWN = 5, |
| 1288 | ACPI_WDAT_SET_COUNTDOWN = 6, |
| 1289 | ACPI_WDAT_GET_RUNNING_STATE = 8, |
| 1290 | ACPI_WDAT_SET_RUNNING_STATE = 9, |
| 1291 | ACPI_WDAT_GET_STOPPED_STATE = 10, |
| 1292 | ACPI_WDAT_SET_STOPPED_STATE = 11, |
| 1293 | ACPI_WDAT_GET_REBOOT = 16, |
| 1294 | ACPI_WDAT_SET_REBOOT = 17, |
| 1295 | ACPI_WDAT_GET_SHUTDOWN = 18, |
| 1296 | ACPI_WDAT_SET_SHUTDOWN = 19, |
| 1297 | ACPI_WDAT_GET_STATUS = 32, |
| 1298 | ACPI_WDAT_SET_STATUS = 33, |
| 1299 | ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */ |
| 1300 | }; |
| 1301 | |
| 1302 | /* Values for Instruction field above */ |
| 1303 | |
| 1304 | enum acpi_wdat_instructions { |
| 1305 | ACPI_WDAT_READ_VALUE = 0, |
| 1306 | ACPI_WDAT_READ_COUNTDOWN = 1, |
| 1307 | ACPI_WDAT_WRITE_VALUE = 2, |
| 1308 | ACPI_WDAT_WRITE_COUNTDOWN = 3, |
| 1309 | ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */ |
| 1310 | ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */ |
| 1311 | }; |
| 1312 | |
| 1313 | /******************************************************************************* |
| 1314 | * |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1315 | * WDRT - Watchdog Resource Table |
| 1316 | * |
| 1317 | ******************************************************************************/ |
| 1318 | |
| 1319 | struct acpi_table_wdrt { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1320 | struct acpi_table_header header; /* Common ACPI table header */ |
| 1321 | u32 header_length; /* Watchdog Header Length */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1322 | u8 pci_segment; /* PCI Segment number */ |
| 1323 | u8 pci_bus; /* PCI Bus number */ |
| 1324 | u8 pci_device; /* PCI Device number */ |
| 1325 | u8 pci_function; /* PCI Function number */ |
| 1326 | u32 timer_period; /* Period of one timer count (msec) */ |
| 1327 | u32 max_count; /* Maximum counter value supported */ |
| 1328 | u32 min_count; /* Minimum counter value */ |
| 1329 | u8 flags; |
| 1330 | u8 reserved[3]; |
| 1331 | u32 entries; /* Number of watchdog entries that follow */ |
| 1332 | }; |
| 1333 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1334 | /* Flags */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1335 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1336 | #define ACPI_WDRT_TIMER_ENABLED (1) /* 00: Timer enabled */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1337 | |
| 1338 | /* Reset to default packing */ |
| 1339 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1340 | #pragma pack() |
| 1341 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 1342 | #endif /* __ACTBL1_H__ */ |