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 | /* |
Bob Moore | 7735ca0 | 2017-02-08 11:00:08 +0800 | [diff] [blame] | 8 | * Copyright (C) 2000 - 2017, 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 | * |
Bob Moore | b24aad4 | 2009-07-24 13:30:17 +0800 | [diff] [blame] | 49 | * Additional ACPI Tables (1) |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [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 | b24aad4 | 2009-07-24 13:30:17 +0800 | [diff] [blame] | 54 | * The tables in this file are fully defined within the ACPI specification. |
| 55 | * |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 56 | ******************************************************************************/ |
| 57 | |
| 58 | /* |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 59 | * Values for description table header signatures for tables defined in this |
| 60 | * file. Useful because they make it more difficult to inadvertently type in |
| 61 | * the wrong signature. |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 62 | */ |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 63 | #define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 64 | #define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 65 | #define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */ |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 66 | #define ACPI_SIG_EINJ "EINJ" /* Error Injection table */ |
| 67 | #define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */ |
Lv Zheng | fa418dd | 2017-06-05 16:37:16 +0800 | [diff] [blame^] | 68 | #define ACPI_SIG_HMAT "HMAT" /* Heterogeneous Memory Attributes Table */ |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 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_MADT "APIC" /* Multiple APIC Description Table */ |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 71 | #define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 72 | #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */ |
| 73 | #define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 74 | #define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */ |
Bob Moore | 04f8e38 | 2015-05-21 10:31:58 +0800 | [diff] [blame] | 75 | #define ACPI_SIG_NFIT "NFIT" /* NVDIMM Firmware Interface Table */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 76 | |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 77 | /* |
| 78 | * All tables must be byte-packed to match the ACPI specification, since |
| 79 | * the tables are provided by the system BIOS. |
| 80 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 81 | #pragma pack(1) |
| 82 | |
| 83 | /* |
Bob Moore | be030a5 | 2012-08-17 13:07:54 +0800 | [diff] [blame] | 84 | * Note: C bitfields are not used for this reason: |
| 85 | * |
| 86 | * "Bitfields are great and easy to read, but unfortunately the C language |
| 87 | * does not specify the layout of bitfields in memory, which means they are |
| 88 | * essentially useless for dealing with packed data in on-disk formats or |
| 89 | * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me, |
| 90 | * this decision was a design error in C. Ritchie could have picked an order |
| 91 | * and stuck with it." Norman Ramsey. |
| 92 | * See http://stackoverflow.com/a/1053662/41661 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 93 | */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 94 | |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 95 | /******************************************************************************* |
| 96 | * |
| 97 | * Common subtable headers |
| 98 | * |
| 99 | ******************************************************************************/ |
| 100 | |
| 101 | /* Generic subtable header (used in MADT, SRAT, etc.) */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 102 | |
| 103 | struct acpi_subtable_header { |
| 104 | u8 type; |
| 105 | u8 length; |
| 106 | }; |
| 107 | |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 108 | /* Subtable header for WHEA tables (EINJ, ERST, WDAT) */ |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 109 | |
| 110 | struct acpi_whea_header { |
| 111 | u8 action; |
| 112 | u8 instruction; |
| 113 | u8 flags; |
| 114 | u8 reserved; |
| 115 | struct acpi_generic_address register_region; |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 116 | u64 value; /* Value used with Read/Write register */ |
| 117 | u64 mask; /* Bitmask required for this register instruction */ |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 118 | }; |
| 119 | |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 120 | /******************************************************************************* |
| 121 | * |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 122 | * BERT - Boot Error Record Table (ACPI 4.0) |
| 123 | * Version 1 |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 124 | * |
| 125 | ******************************************************************************/ |
| 126 | |
| 127 | struct acpi_table_bert { |
| 128 | struct acpi_table_header header; /* Common ACPI table header */ |
| 129 | u32 region_length; /* Length of the boot error region */ |
Uwe Kleine-König | b595076 | 2010-11-01 15:38:34 -0400 | [diff] [blame] | 130 | u64 address; /* Physical address of the error region */ |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 131 | }; |
| 132 | |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 133 | /* Boot Error Region (not a subtable, pointed to by Address field above) */ |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 134 | |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 135 | struct acpi_bert_region { |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 136 | u32 block_status; /* Type of error information */ |
| 137 | u32 raw_data_offset; /* Offset to raw error data */ |
| 138 | u32 raw_data_length; /* Length of raw error data */ |
| 139 | u32 data_length; /* Length of generic error data */ |
| 140 | u32 error_severity; /* Severity code */ |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 141 | }; |
| 142 | |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 143 | /* Values for block_status flags above */ |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 144 | |
| 145 | #define ACPI_BERT_UNCORRECTABLE (1) |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 146 | #define ACPI_BERT_CORRECTABLE (1<<1) |
| 147 | #define ACPI_BERT_MULTIPLE_UNCORRECTABLE (1<<2) |
| 148 | #define ACPI_BERT_MULTIPLE_CORRECTABLE (1<<3) |
| 149 | #define ACPI_BERT_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */ |
| 150 | |
| 151 | /* Values for error_severity above */ |
| 152 | |
| 153 | enum acpi_bert_error_severity { |
| 154 | ACPI_BERT_ERROR_CORRECTABLE = 0, |
| 155 | ACPI_BERT_ERROR_FATAL = 1, |
| 156 | ACPI_BERT_ERROR_CORRECTED = 2, |
| 157 | ACPI_BERT_ERROR_NONE = 3, |
| 158 | ACPI_BERT_ERROR_RESERVED = 4 /* 4 and greater are reserved */ |
| 159 | }; |
| 160 | |
| 161 | /* |
| 162 | * Note: The generic error data that follows the error_severity field above |
| 163 | * uses the struct acpi_hest_generic_data defined under the HEST table below |
| 164 | */ |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 165 | |
| 166 | /******************************************************************************* |
| 167 | * |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 168 | * CPEP - Corrected Platform Error Polling table (ACPI 4.0) |
| 169 | * Version 1 |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 170 | * |
| 171 | ******************************************************************************/ |
| 172 | |
| 173 | struct acpi_table_cpep { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 174 | struct acpi_table_header header; /* Common ACPI table header */ |
| 175 | u64 reserved; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 176 | }; |
| 177 | |
| 178 | /* Subtable */ |
| 179 | |
| 180 | struct acpi_cpep_polling { |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 181 | struct acpi_subtable_header header; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 182 | u8 id; /* Processor ID */ |
| 183 | u8 eid; /* Processor EID */ |
| 184 | u32 interval; /* Polling interval (msec) */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 185 | }; |
| 186 | |
| 187 | /******************************************************************************* |
| 188 | * |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 189 | * ECDT - Embedded Controller Boot Resources Table |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 190 | * Version 1 |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 191 | * |
| 192 | ******************************************************************************/ |
| 193 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 194 | struct acpi_table_ecdt { |
| 195 | struct acpi_table_header header; /* Common ACPI table header */ |
| 196 | struct acpi_generic_address control; /* Address of EC command/status register */ |
| 197 | struct acpi_generic_address data; /* Address of EC data register */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 198 | u32 uid; /* Unique ID - must be same as the EC _UID method */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 199 | u8 gpe; /* The GPE for the EC */ |
| 200 | u8 id[1]; /* Full namepath of the EC in the ACPI namespace */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 201 | }; |
| 202 | |
| 203 | /******************************************************************************* |
| 204 | * |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 205 | * EINJ - Error Injection Table (ACPI 4.0) |
| 206 | * Version 1 |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 207 | * |
| 208 | ******************************************************************************/ |
| 209 | |
| 210 | struct acpi_table_einj { |
| 211 | struct acpi_table_header header; /* Common ACPI table header */ |
| 212 | u32 header_length; |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 213 | u8 flags; |
| 214 | u8 reserved[3]; |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 215 | u32 entries; |
| 216 | }; |
| 217 | |
| 218 | /* EINJ Injection Instruction Entries (actions) */ |
| 219 | |
| 220 | struct acpi_einj_entry { |
| 221 | struct acpi_whea_header whea_header; /* Common header for WHEA tables */ |
| 222 | }; |
| 223 | |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 224 | /* Masks for Flags field above */ |
| 225 | |
| 226 | #define ACPI_EINJ_PRESERVE (1) |
| 227 | |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 228 | /* Values for Action field above */ |
| 229 | |
| 230 | enum acpi_einj_actions { |
| 231 | ACPI_EINJ_BEGIN_OPERATION = 0, |
| 232 | ACPI_EINJ_GET_TRIGGER_TABLE = 1, |
| 233 | ACPI_EINJ_SET_ERROR_TYPE = 2, |
| 234 | ACPI_EINJ_GET_ERROR_TYPE = 3, |
| 235 | ACPI_EINJ_END_OPERATION = 4, |
| 236 | ACPI_EINJ_EXECUTE_OPERATION = 5, |
| 237 | ACPI_EINJ_CHECK_BUSY_STATUS = 6, |
| 238 | ACPI_EINJ_GET_COMMAND_STATUS = 7, |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 239 | ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 8, |
Bob Moore | a88e0ce | 2016-03-24 09:39:36 +0800 | [diff] [blame] | 240 | ACPI_EINJ_GET_EXECUTE_TIMINGS = 9, |
| 241 | ACPI_EINJ_ACTION_RESERVED = 10, /* 10 and greater are reserved */ |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 242 | ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */ |
| 243 | }; |
| 244 | |
| 245 | /* Values for Instruction field above */ |
| 246 | |
| 247 | enum acpi_einj_instructions { |
| 248 | ACPI_EINJ_READ_REGISTER = 0, |
| 249 | ACPI_EINJ_READ_REGISTER_VALUE = 1, |
| 250 | ACPI_EINJ_WRITE_REGISTER = 2, |
| 251 | ACPI_EINJ_WRITE_REGISTER_VALUE = 3, |
| 252 | ACPI_EINJ_NOOP = 4, |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 253 | ACPI_EINJ_FLUSH_CACHELINE = 5, |
| 254 | ACPI_EINJ_INSTRUCTION_RESERVED = 6 /* 6 and greater are reserved */ |
| 255 | }; |
| 256 | |
| 257 | struct acpi_einj_error_type_with_addr { |
| 258 | u32 error_type; |
| 259 | u32 vendor_struct_offset; |
| 260 | u32 flags; |
| 261 | u32 apic_id; |
| 262 | u64 address; |
| 263 | u64 range; |
| 264 | u32 pcie_id; |
| 265 | }; |
| 266 | |
| 267 | struct acpi_einj_vendor { |
| 268 | u32 length; |
| 269 | u32 pcie_id; |
| 270 | u16 vendor_id; |
| 271 | u16 device_id; |
| 272 | u8 revision_id; |
| 273 | u8 reserved[3]; |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 274 | }; |
| 275 | |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 276 | /* EINJ Trigger Error Action Table */ |
| 277 | |
| 278 | struct acpi_einj_trigger { |
| 279 | u32 header_size; |
| 280 | u32 revision; |
| 281 | u32 table_size; |
| 282 | u32 entry_count; |
| 283 | }; |
| 284 | |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 285 | /* Command status return values */ |
| 286 | |
| 287 | enum acpi_einj_command_status { |
| 288 | ACPI_EINJ_SUCCESS = 0, |
| 289 | ACPI_EINJ_FAILURE = 1, |
| 290 | ACPI_EINJ_INVALID_ACCESS = 2, |
| 291 | ACPI_EINJ_STATUS_RESERVED = 3 /* 3 and greater are reserved */ |
| 292 | }; |
| 293 | |
| 294 | /* Error types returned from ACPI_EINJ_GET_ERROR_TYPE (bitfield) */ |
| 295 | |
| 296 | #define ACPI_EINJ_PROCESSOR_CORRECTABLE (1) |
| 297 | #define ACPI_EINJ_PROCESSOR_UNCORRECTABLE (1<<1) |
| 298 | #define ACPI_EINJ_PROCESSOR_FATAL (1<<2) |
| 299 | #define ACPI_EINJ_MEMORY_CORRECTABLE (1<<3) |
| 300 | #define ACPI_EINJ_MEMORY_UNCORRECTABLE (1<<4) |
| 301 | #define ACPI_EINJ_MEMORY_FATAL (1<<5) |
| 302 | #define ACPI_EINJ_PCIX_CORRECTABLE (1<<6) |
| 303 | #define ACPI_EINJ_PCIX_UNCORRECTABLE (1<<7) |
| 304 | #define ACPI_EINJ_PCIX_FATAL (1<<8) |
| 305 | #define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9) |
| 306 | #define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10) |
| 307 | #define ACPI_EINJ_PLATFORM_FATAL (1<<11) |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 308 | #define ACPI_EINJ_VENDOR_DEFINED (1<<31) |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 309 | |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 310 | /******************************************************************************* |
| 311 | * |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 312 | * ERST - Error Record Serialization Table (ACPI 4.0) |
| 313 | * Version 1 |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 314 | * |
| 315 | ******************************************************************************/ |
| 316 | |
| 317 | struct acpi_table_erst { |
| 318 | struct acpi_table_header header; /* Common ACPI table header */ |
| 319 | u32 header_length; |
| 320 | u32 reserved; |
| 321 | u32 entries; |
| 322 | }; |
| 323 | |
| 324 | /* ERST Serialization Entries (actions) */ |
| 325 | |
| 326 | struct acpi_erst_entry { |
| 327 | struct acpi_whea_header whea_header; /* Common header for WHEA tables */ |
| 328 | }; |
| 329 | |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 330 | /* Masks for Flags field above */ |
| 331 | |
| 332 | #define ACPI_ERST_PRESERVE (1) |
| 333 | |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 334 | /* Values for Action field above */ |
| 335 | |
| 336 | enum acpi_erst_actions { |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 337 | ACPI_ERST_BEGIN_WRITE = 0, |
| 338 | ACPI_ERST_BEGIN_READ = 1, |
| 339 | ACPI_ERST_BEGIN_CLEAR = 2, |
| 340 | ACPI_ERST_END = 3, |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 341 | ACPI_ERST_SET_RECORD_OFFSET = 4, |
| 342 | ACPI_ERST_EXECUTE_OPERATION = 5, |
| 343 | ACPI_ERST_CHECK_BUSY_STATUS = 6, |
| 344 | ACPI_ERST_GET_COMMAND_STATUS = 7, |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 345 | ACPI_ERST_GET_RECORD_ID = 8, |
| 346 | ACPI_ERST_SET_RECORD_ID = 9, |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 347 | ACPI_ERST_GET_RECORD_COUNT = 10, |
| 348 | ACPI_ERST_BEGIN_DUMMY_WRIITE = 11, |
| 349 | ACPI_ERST_NOT_USED = 12, |
| 350 | ACPI_ERST_GET_ERROR_RANGE = 13, |
| 351 | ACPI_ERST_GET_ERROR_LENGTH = 14, |
| 352 | ACPI_ERST_GET_ERROR_ATTRIBUTES = 15, |
Bob Moore | a88e0ce | 2016-03-24 09:39:36 +0800 | [diff] [blame] | 353 | ACPI_ERST_EXECUTE_TIMINGS = 16, |
| 354 | ACPI_ERST_ACTION_RESERVED = 17 /* 17 and greater are reserved */ |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 355 | }; |
| 356 | |
| 357 | /* Values for Instruction field above */ |
| 358 | |
| 359 | enum acpi_erst_instructions { |
| 360 | ACPI_ERST_READ_REGISTER = 0, |
| 361 | ACPI_ERST_READ_REGISTER_VALUE = 1, |
| 362 | ACPI_ERST_WRITE_REGISTER = 2, |
| 363 | ACPI_ERST_WRITE_REGISTER_VALUE = 3, |
| 364 | ACPI_ERST_NOOP = 4, |
| 365 | ACPI_ERST_LOAD_VAR1 = 5, |
| 366 | ACPI_ERST_LOAD_VAR2 = 6, |
| 367 | ACPI_ERST_STORE_VAR1 = 7, |
| 368 | ACPI_ERST_ADD = 8, |
| 369 | ACPI_ERST_SUBTRACT = 9, |
| 370 | ACPI_ERST_ADD_VALUE = 10, |
| 371 | ACPI_ERST_SUBTRACT_VALUE = 11, |
| 372 | ACPI_ERST_STALL = 12, |
| 373 | ACPI_ERST_STALL_WHILE_TRUE = 13, |
| 374 | ACPI_ERST_SKIP_NEXT_IF_TRUE = 14, |
| 375 | ACPI_ERST_GOTO = 15, |
| 376 | ACPI_ERST_SET_SRC_ADDRESS_BASE = 16, |
| 377 | ACPI_ERST_SET_DST_ADDRESS_BASE = 17, |
| 378 | ACPI_ERST_MOVE_DATA = 18, |
| 379 | ACPI_ERST_INSTRUCTION_RESERVED = 19 /* 19 and greater are reserved */ |
| 380 | }; |
| 381 | |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 382 | /* Command status return values */ |
| 383 | |
| 384 | enum acpi_erst_command_status { |
| 385 | ACPI_ERST_SUCESS = 0, |
| 386 | ACPI_ERST_NO_SPACE = 1, |
| 387 | ACPI_ERST_NOT_AVAILABLE = 2, |
| 388 | ACPI_ERST_FAILURE = 3, |
| 389 | ACPI_ERST_RECORD_EMPTY = 4, |
| 390 | ACPI_ERST_NOT_FOUND = 5, |
| 391 | ACPI_ERST_STATUS_RESERVED = 6 /* 6 and greater are reserved */ |
| 392 | }; |
| 393 | |
| 394 | /* Error Record Serialization Information */ |
| 395 | |
| 396 | struct acpi_erst_info { |
| 397 | u16 signature; /* Should be "ER" */ |
| 398 | u8 data[48]; |
| 399 | }; |
| 400 | |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 401 | /******************************************************************************* |
| 402 | * |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 403 | * HEST - Hardware Error Source Table (ACPI 4.0) |
| 404 | * Version 1 |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 405 | * |
| 406 | ******************************************************************************/ |
| 407 | |
| 408 | struct acpi_table_hest { |
| 409 | struct acpi_table_header header; /* Common ACPI table header */ |
| 410 | u32 error_source_count; |
| 411 | }; |
| 412 | |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 413 | /* HEST subtable header */ |
| 414 | |
| 415 | struct acpi_hest_header { |
| 416 | u16 type; |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 417 | u16 source_id; |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 418 | }; |
| 419 | |
| 420 | /* Values for Type field above for subtables */ |
| 421 | |
| 422 | enum acpi_hest_types { |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 423 | ACPI_HEST_TYPE_IA32_CHECK = 0, |
| 424 | ACPI_HEST_TYPE_IA32_CORRECTED_CHECK = 1, |
| 425 | ACPI_HEST_TYPE_IA32_NMI = 2, |
| 426 | ACPI_HEST_TYPE_NOT_USED3 = 3, |
| 427 | ACPI_HEST_TYPE_NOT_USED4 = 4, |
| 428 | ACPI_HEST_TYPE_NOT_USED5 = 5, |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 429 | ACPI_HEST_TYPE_AER_ROOT_PORT = 6, |
| 430 | ACPI_HEST_TYPE_AER_ENDPOINT = 7, |
| 431 | ACPI_HEST_TYPE_AER_BRIDGE = 8, |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 432 | ACPI_HEST_TYPE_GENERIC_ERROR = 9, |
Bob Moore | 7cd55c7 | 2016-03-24 09:38:57 +0800 | [diff] [blame] | 433 | ACPI_HEST_TYPE_GENERIC_ERROR_V2 = 10, |
| 434 | ACPI_HEST_TYPE_RESERVED = 11 /* 11 and greater are reserved */ |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 435 | }; |
| 436 | |
| 437 | /* |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 438 | * HEST substructures contained in subtables |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 439 | */ |
| 440 | |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 441 | /* |
| 442 | * IA32 Error Bank(s) - Follows the struct acpi_hest_ia_machine_check and |
| 443 | * struct acpi_hest_ia_corrected structures. |
| 444 | */ |
| 445 | struct acpi_hest_ia_error_bank { |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 446 | u8 bank_number; |
| 447 | u8 clear_status_on_init; |
| 448 | u8 status_format; |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 449 | u8 reserved; |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 450 | u32 control_register; |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 451 | u64 control_data; |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 452 | u32 status_register; |
| 453 | u32 address_register; |
| 454 | u32 misc_register; |
| 455 | }; |
| 456 | |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 457 | /* Common HEST sub-structure for PCI/AER structures below (6,7,8) */ |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 458 | |
| 459 | struct acpi_hest_aer_common { |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 460 | u16 reserved1; |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 461 | u8 flags; |
| 462 | u8 enabled; |
Bob Moore | c276e38 | 2009-07-27 14:55:02 +0800 | [diff] [blame] | 463 | u32 records_to_preallocate; |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 464 | u32 max_sections_per_record; |
Betty Dall | 4059a31 | 2014-01-13 12:17:47 -0700 | [diff] [blame] | 465 | u32 bus; /* Bus and Segment numbers */ |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 466 | u16 device; |
| 467 | u16 function; |
| 468 | u16 device_control; |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 469 | u16 reserved2; |
Bob Moore | c276e38 | 2009-07-27 14:55:02 +0800 | [diff] [blame] | 470 | u32 uncorrectable_mask; |
| 471 | u32 uncorrectable_severity; |
| 472 | u32 correctable_mask; |
| 473 | u32 advanced_capabilities; |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 474 | }; |
| 475 | |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 476 | /* Masks for HEST Flags fields */ |
| 477 | |
| 478 | #define ACPI_HEST_FIRMWARE_FIRST (1) |
| 479 | #define ACPI_HEST_GLOBAL (1<<1) |
| 480 | |
Betty Dall | 4059a31 | 2014-01-13 12:17:47 -0700 | [diff] [blame] | 481 | /* |
| 482 | * Macros to access the bus/segment numbers in Bus field above: |
| 483 | * Bus number is encoded in bits 7:0 |
| 484 | * Segment number is encoded in bits 23:8 |
| 485 | */ |
| 486 | #define ACPI_HEST_BUS(bus) ((bus) & 0xFF) |
| 487 | #define ACPI_HEST_SEGMENT(bus) (((bus) >> 8) & 0xFFFF) |
| 488 | |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 489 | /* Hardware Error Notification */ |
| 490 | |
| 491 | struct acpi_hest_notify { |
| 492 | u8 type; |
| 493 | u8 length; |
| 494 | u16 config_write_enable; |
| 495 | u32 poll_interval; |
| 496 | u32 vector; |
| 497 | u32 polling_threshold_value; |
| 498 | u32 polling_threshold_window; |
| 499 | u32 error_threshold_value; |
| 500 | u32 error_threshold_window; |
| 501 | }; |
| 502 | |
| 503 | /* Values for Notify Type field above */ |
| 504 | |
| 505 | enum acpi_hest_notify_types { |
| 506 | ACPI_HEST_NOTIFY_POLLED = 0, |
| 507 | ACPI_HEST_NOTIFY_EXTERNAL = 1, |
| 508 | ACPI_HEST_NOTIFY_LOCAL = 2, |
| 509 | ACPI_HEST_NOTIFY_SCI = 3, |
| 510 | ACPI_HEST_NOTIFY_NMI = 4, |
Bob Moore | ca4a0314 | 2012-08-24 10:25:12 -0700 | [diff] [blame] | 511 | ACPI_HEST_NOTIFY_CMCI = 5, /* ACPI 5.0 */ |
| 512 | ACPI_HEST_NOTIFY_MCE = 6, /* ACPI 5.0 */ |
Bob Moore | 7cd55c7 | 2016-03-24 09:38:57 +0800 | [diff] [blame] | 513 | ACPI_HEST_NOTIFY_GPIO = 7, /* ACPI 6.0 */ |
| 514 | ACPI_HEST_NOTIFY_SEA = 8, /* ACPI 6.1 */ |
| 515 | ACPI_HEST_NOTIFY_SEI = 9, /* ACPI 6.1 */ |
| 516 | ACPI_HEST_NOTIFY_GSIV = 10, /* ACPI 6.1 */ |
| 517 | ACPI_HEST_NOTIFY_RESERVED = 11 /* 11 and greater are reserved */ |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 518 | }; |
| 519 | |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 520 | /* Values for config_write_enable bitfield above */ |
| 521 | |
| 522 | #define ACPI_HEST_TYPE (1) |
| 523 | #define ACPI_HEST_POLL_INTERVAL (1<<1) |
| 524 | #define ACPI_HEST_POLL_THRESHOLD_VALUE (1<<2) |
| 525 | #define ACPI_HEST_POLL_THRESHOLD_WINDOW (1<<3) |
| 526 | #define ACPI_HEST_ERR_THRESHOLD_VALUE (1<<4) |
| 527 | #define ACPI_HEST_ERR_THRESHOLD_WINDOW (1<<5) |
| 528 | |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 529 | /* |
| 530 | * HEST subtables |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 531 | */ |
| 532 | |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 533 | /* 0: IA32 Machine Check Exception */ |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 534 | |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 535 | struct acpi_hest_ia_machine_check { |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 536 | struct acpi_hest_header header; |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 537 | u16 reserved1; |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 538 | u8 flags; |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 539 | u8 enabled; |
Bob Moore | c276e38 | 2009-07-27 14:55:02 +0800 | [diff] [blame] | 540 | u32 records_to_preallocate; |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 541 | u32 max_sections_per_record; |
| 542 | u64 global_capability_data; |
| 543 | u64 global_control_data; |
| 544 | u8 num_hardware_banks; |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 545 | u8 reserved3[7]; |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 546 | }; |
| 547 | |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 548 | /* 1: IA32 Corrected Machine Check */ |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 549 | |
Bob Moore | 1872bbc | 2009-08-13 13:31:00 +0800 | [diff] [blame] | 550 | struct acpi_hest_ia_corrected { |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 551 | struct acpi_hest_header header; |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 552 | u16 reserved1; |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 553 | u8 flags; |
| 554 | u8 enabled; |
Bob Moore | c276e38 | 2009-07-27 14:55:02 +0800 | [diff] [blame] | 555 | u32 records_to_preallocate; |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 556 | u32 max_sections_per_record; |
| 557 | struct acpi_hest_notify notify; |
| 558 | u8 num_hardware_banks; |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 559 | u8 reserved2[3]; |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 560 | }; |
| 561 | |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 562 | /* 2: IA32 Non-Maskable Interrupt */ |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 563 | |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 564 | struct acpi_hest_ia_nmi { |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 565 | struct acpi_hest_header header; |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 566 | u32 reserved; |
Bob Moore | c276e38 | 2009-07-27 14:55:02 +0800 | [diff] [blame] | 567 | u32 records_to_preallocate; |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 568 | u32 max_sections_per_record; |
| 569 | u32 max_raw_data_length; |
| 570 | }; |
| 571 | |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 572 | /* 3,4,5: Not used */ |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 573 | |
| 574 | /* 6: PCI Express Root Port AER */ |
| 575 | |
| 576 | struct acpi_hest_aer_root { |
| 577 | struct acpi_hest_header header; |
| 578 | struct acpi_hest_aer_common aer; |
| 579 | u32 root_error_command; |
| 580 | }; |
| 581 | |
| 582 | /* 7: PCI Express AER (AER Endpoint) */ |
| 583 | |
| 584 | struct acpi_hest_aer { |
| 585 | struct acpi_hest_header header; |
| 586 | struct acpi_hest_aer_common aer; |
| 587 | }; |
| 588 | |
| 589 | /* 8: PCI Express/PCI-X Bridge AER */ |
| 590 | |
| 591 | struct acpi_hest_aer_bridge { |
| 592 | struct acpi_hest_header header; |
| 593 | struct acpi_hest_aer_common aer; |
Bob Moore | c276e38 | 2009-07-27 14:55:02 +0800 | [diff] [blame] | 594 | u32 uncorrectable_mask2; |
| 595 | u32 uncorrectable_severity2; |
| 596 | u32 advanced_capabilities2; |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 597 | }; |
| 598 | |
| 599 | /* 9: Generic Hardware Error Source */ |
| 600 | |
| 601 | struct acpi_hest_generic { |
| 602 | struct acpi_hest_header header; |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 603 | u16 related_source_id; |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 604 | u8 reserved; |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 605 | u8 enabled; |
Bob Moore | c276e38 | 2009-07-27 14:55:02 +0800 | [diff] [blame] | 606 | u32 records_to_preallocate; |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 607 | u32 max_sections_per_record; |
| 608 | u32 max_raw_data_length; |
| 609 | struct acpi_generic_address error_status_address; |
| 610 | struct acpi_hest_notify notify; |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 611 | u32 error_block_length; |
| 612 | }; |
| 613 | |
Bob Moore | 7cd55c7 | 2016-03-24 09:38:57 +0800 | [diff] [blame] | 614 | /* 10: Generic Hardware Error Source, version 2 */ |
| 615 | |
| 616 | struct acpi_hest_generic_v2 { |
| 617 | struct acpi_hest_header header; |
| 618 | u16 related_source_id; |
| 619 | u8 reserved; |
| 620 | u8 enabled; |
| 621 | u32 records_to_preallocate; |
| 622 | u32 max_sections_per_record; |
| 623 | u32 max_raw_data_length; |
| 624 | struct acpi_generic_address error_status_address; |
| 625 | struct acpi_hest_notify notify; |
| 626 | u32 error_block_length; |
| 627 | struct acpi_generic_address read_ack_register; |
| 628 | u64 read_ack_preserve; |
| 629 | u64 read_ack_write; |
| 630 | }; |
| 631 | |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 632 | /* Generic Error Status block */ |
| 633 | |
Lv Zheng | 0a00fd5 | 2014-06-03 16:32:53 +0800 | [diff] [blame] | 634 | struct acpi_hest_generic_status { |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 635 | u32 block_status; |
| 636 | u32 raw_data_offset; |
| 637 | u32 raw_data_length; |
| 638 | u32 data_length; |
| 639 | u32 error_severity; |
| 640 | }; |
| 641 | |
| 642 | /* Values for block_status flags above */ |
| 643 | |
Lv Zheng | 0a00fd5 | 2014-06-03 16:32:53 +0800 | [diff] [blame] | 644 | #define ACPI_HEST_UNCORRECTABLE (1) |
| 645 | #define ACPI_HEST_CORRECTABLE (1<<1) |
| 646 | #define ACPI_HEST_MULTIPLE_UNCORRECTABLE (1<<2) |
| 647 | #define ACPI_HEST_MULTIPLE_CORRECTABLE (1<<3) |
| 648 | #define ACPI_HEST_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */ |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 649 | |
| 650 | /* Generic Error Data entry */ |
| 651 | |
Lv Zheng | 0a00fd5 | 2014-06-03 16:32:53 +0800 | [diff] [blame] | 652 | struct acpi_hest_generic_data { |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 653 | u8 section_type[16]; |
| 654 | u32 error_severity; |
| 655 | u16 revision; |
| 656 | u8 validation_bits; |
| 657 | u8 flags; |
| 658 | u32 error_data_length; |
| 659 | u8 fru_id[16]; |
| 660 | u8 fru_text[20]; |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 661 | }; |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 662 | |
Bob Moore | 7cd55c7 | 2016-03-24 09:38:57 +0800 | [diff] [blame] | 663 | /* Extension for revision 0x0300 */ |
| 664 | |
| 665 | struct acpi_hest_generic_data_v300 { |
| 666 | u8 section_type[16]; |
| 667 | u32 error_severity; |
| 668 | u16 revision; |
| 669 | u8 validation_bits; |
| 670 | u8 flags; |
| 671 | u32 error_data_length; |
| 672 | u8 fru_id[16]; |
| 673 | u8 fru_text[20]; |
| 674 | u64 time_stamp; |
| 675 | }; |
| 676 | |
| 677 | /* Values for error_severity above */ |
| 678 | |
| 679 | #define ACPI_HEST_GEN_ERROR_RECOVERABLE 0 |
| 680 | #define ACPI_HEST_GEN_ERROR_FATAL 1 |
| 681 | #define ACPI_HEST_GEN_ERROR_CORRECTED 2 |
| 682 | #define ACPI_HEST_GEN_ERROR_NONE 3 |
| 683 | |
| 684 | /* Flags for validation_bits above */ |
| 685 | |
| 686 | #define ACPI_HEST_GEN_VALID_FRU_ID (1) |
| 687 | #define ACPI_HEST_GEN_VALID_FRU_STRING (1<<1) |
| 688 | #define ACPI_HEST_GEN_VALID_TIMESTAMP (1<<2) |
| 689 | |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 690 | /******************************************************************************* |
| 691 | * |
Lv Zheng | fa418dd | 2017-06-05 16:37:16 +0800 | [diff] [blame^] | 692 | * HMAT - Heterogeneous Memory Attributes Table (ACPI 6.2) |
| 693 | * Version 1 |
| 694 | * |
| 695 | ******************************************************************************/ |
| 696 | |
| 697 | struct acpi_table_hmat { |
| 698 | struct acpi_table_header header; /* Common ACPI table header */ |
| 699 | u32 reserved; |
| 700 | }; |
| 701 | |
| 702 | /* Values for HMAT structure types */ |
| 703 | |
| 704 | enum acpi_hmat_type { |
| 705 | ACPI_HMAT_TYPE_ADDRESS_RANGE = 0, /* Memory subystem address range */ |
| 706 | ACPI_HMAT_TYPE_LOCALITY = 1, /* System locality latency and bandwidth information */ |
| 707 | ACPI_HMAT_TYPE_CACHE = 2, /* Memory side cache information */ |
| 708 | ACPI_HMAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */ |
| 709 | }; |
| 710 | |
| 711 | struct acpi_hmat_structure { |
| 712 | u16 type; |
| 713 | u16 reserved; |
| 714 | u32 length; |
| 715 | }; |
| 716 | |
| 717 | /* |
| 718 | * HMAT Structures, correspond to Type in struct acpi_hmat_structure |
| 719 | */ |
| 720 | |
| 721 | /* 0: Memory subystem address range */ |
| 722 | |
| 723 | struct acpi_hmat_address_range { |
| 724 | struct acpi_hmat_structure header; |
| 725 | u16 flags; |
| 726 | u16 reserved1; |
| 727 | u32 processor_PD; /* Processor proximity domain */ |
| 728 | u32 memory_PD; /* Memory proximity domain */ |
| 729 | u32 reserved2; |
| 730 | u64 physical_address_base; /* Physical address range base */ |
| 731 | u64 physical_address_length; /* Physical address range length */ |
| 732 | }; |
| 733 | |
| 734 | /* Masks for Flags field above */ |
| 735 | |
| 736 | #define ACPI_HMAT_PROCESSOR_PD_VALID (1) /* 1: processor_PD field is valid */ |
| 737 | #define ACPI_HMAT_MEMORY_PD_VALID (1<<1) /* 1: memory_PD field is valid */ |
| 738 | #define ACPI_HMAT_RESERVATION_HINT (1<<2) /* 1: Reservation hint */ |
| 739 | |
| 740 | /* 1: System locality latency and bandwidth information */ |
| 741 | |
| 742 | struct acpi_hmat_locality { |
| 743 | struct acpi_hmat_structure header; |
| 744 | u8 flags; |
| 745 | u8 data_type; |
| 746 | u16 reserved1; |
| 747 | u32 number_of_initiator_Pds; |
| 748 | u32 number_of_target_Pds; |
| 749 | u32 reserved2; |
| 750 | u64 entry_base_unit; |
| 751 | }; |
| 752 | |
| 753 | /* Masks for Flags field above */ |
| 754 | |
| 755 | #define ACPI_HMAT_MEMORY_HIERARCHY (0x0F) |
| 756 | |
| 757 | /* Values for Memory Hierarchy flag */ |
| 758 | |
| 759 | #define ACPI_HMAT_MEMORY 0 |
| 760 | #define ACPI_HMAT_LAST_LEVEL_CACHE 1 |
| 761 | #define ACPI_HMAT_1ST_LEVEL_CACHE 2 |
| 762 | #define ACPI_HMAT_2ND_LEVEL_CACHE 3 |
| 763 | #define ACPI_HMAT_3RD_LEVEL_CACHE 4 |
| 764 | |
| 765 | /* Values for data_type field above */ |
| 766 | |
| 767 | #define ACPI_HMAT_ACCESS_LATENCY 0 |
| 768 | #define ACPI_HMAT_READ_LATENCY 1 |
| 769 | #define ACPI_HMAT_WRITE_LATENCY 2 |
| 770 | #define ACPI_HMAT_ACCESS_BANDWIDTH 3 |
| 771 | #define ACPI_HMAT_READ_BANDWIDTH 4 |
| 772 | #define ACPI_HMAT_WRITE_BANDWIDTH 5 |
| 773 | |
| 774 | /* 2: Memory side cache information */ |
| 775 | |
| 776 | struct acpi_hmat_cache { |
| 777 | struct acpi_hmat_structure header; |
| 778 | u32 memory_PD; |
| 779 | u32 reserved1; |
| 780 | u64 cache_size; |
| 781 | u32 cache_attributes; |
| 782 | u16 reserved2; |
| 783 | u16 number_of_SMBIOShandles; |
| 784 | }; |
| 785 | |
| 786 | /* Masks for cache_attributes field above */ |
| 787 | |
| 788 | #define ACPI_HMAT_TOTAL_CACHE_LEVEL (0x0000000F) |
| 789 | #define ACPI_HMAT_CACHE_LEVEL (0x000000F0) |
| 790 | #define ACPI_HMAT_CACHE_ASSOCIATIVITY (0x00000F00) |
| 791 | #define ACPI_HMAT_WRITE_POLICY (0x0000F000) |
| 792 | #define ACPI_HMAT_CACHE_LINE_SIZE (0xFFFF0000) |
| 793 | |
| 794 | /* Values for cache associativity flag */ |
| 795 | |
| 796 | #define ACPI_HMAT_CA_NONE (0) |
| 797 | #define ACPI_HMAT_CA_DIRECT_MAPPED (1) |
| 798 | #define ACPI_HMAT_CA_COMPLEX_CACHE_INDEXING (2) |
| 799 | |
| 800 | /* Values for write policy flag */ |
| 801 | |
| 802 | #define ACPI_HMAT_CP_NONE (0) |
| 803 | #define ACPI_HMAT_CP_WB (1) |
| 804 | #define ACPI_HMAT_CP_WT (2) |
| 805 | |
| 806 | /******************************************************************************* |
| 807 | * |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 808 | * MADT - Multiple APIC Description Table |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 809 | * Version 3 |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 810 | * |
| 811 | ******************************************************************************/ |
| 812 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 813 | struct acpi_table_madt { |
| 814 | struct acpi_table_header header; /* Common ACPI table header */ |
| 815 | u32 address; /* Physical address of local APIC */ |
| 816 | u32 flags; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 817 | }; |
| 818 | |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 819 | /* Masks for Flags field above */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 820 | |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 821 | #define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 822 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 823 | /* Values for PCATCompat flag */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 824 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 825 | #define ACPI_MADT_DUAL_PIC 0 |
| 826 | #define ACPI_MADT_MULTIPLE_APIC 1 |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 827 | |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 828 | /* Values for MADT subtable type in struct acpi_subtable_header */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 829 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 830 | enum acpi_madt_type { |
| 831 | ACPI_MADT_TYPE_LOCAL_APIC = 0, |
| 832 | ACPI_MADT_TYPE_IO_APIC = 1, |
| 833 | ACPI_MADT_TYPE_INTERRUPT_OVERRIDE = 2, |
| 834 | ACPI_MADT_TYPE_NMI_SOURCE = 3, |
| 835 | ACPI_MADT_TYPE_LOCAL_APIC_NMI = 4, |
| 836 | ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE = 5, |
| 837 | ACPI_MADT_TYPE_IO_SAPIC = 6, |
| 838 | ACPI_MADT_TYPE_LOCAL_SAPIC = 7, |
| 839 | ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8, |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 840 | ACPI_MADT_TYPE_LOCAL_X2APIC = 9, |
| 841 | ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10, |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 842 | ACPI_MADT_TYPE_GENERIC_INTERRUPT = 11, |
| 843 | ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR = 12, |
Tomasz Nowicki | d0c383e | 2014-07-30 12:21:50 +0800 | [diff] [blame] | 844 | ACPI_MADT_TYPE_GENERIC_MSI_FRAME = 13, |
| 845 | ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR = 14, |
Bob Moore | 0cff8dc | 2015-05-21 10:31:18 +0800 | [diff] [blame] | 846 | ACPI_MADT_TYPE_GENERIC_TRANSLATOR = 15, |
| 847 | ACPI_MADT_TYPE_RESERVED = 16 /* 16 and greater are reserved */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 848 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 849 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 850 | /* |
Bob Moore | 1a49b72 | 2014-04-30 10:04:28 +0800 | [diff] [blame] | 851 | * MADT Subtables, correspond to Type in struct acpi_subtable_header |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 852 | */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 853 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 854 | /* 0: Processor Local APIC */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 855 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 856 | struct acpi_madt_local_apic { |
| 857 | struct acpi_subtable_header header; |
| 858 | u8 processor_id; /* ACPI processor id */ |
| 859 | u8 id; /* Processor's local APIC id */ |
| 860 | u32 lapic_flags; |
| 861 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 862 | |
| 863 | /* 1: IO APIC */ |
| 864 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 865 | struct acpi_madt_io_apic { |
| 866 | struct acpi_subtable_header header; |
| 867 | u8 id; /* I/O APIC ID */ |
Bob Moore | ba494be | 2012-07-12 09:40:10 +0800 | [diff] [blame] | 868 | u8 reserved; /* reserved - must be zero */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 869 | u32 address; /* APIC physical address */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 870 | u32 global_irq_base; /* Global system interrupt where INTI lines start */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 871 | }; |
| 872 | |
| 873 | /* 2: Interrupt Override */ |
| 874 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 875 | struct acpi_madt_interrupt_override { |
| 876 | struct acpi_subtable_header header; |
| 877 | u8 bus; /* 0 - ISA */ |
| 878 | u8 source_irq; /* Interrupt source (IRQ) */ |
| 879 | u32 global_irq; /* Global system interrupt */ |
| 880 | u16 inti_flags; |
| 881 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 882 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 883 | /* 3: NMI Source */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 884 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 885 | struct acpi_madt_nmi_source { |
| 886 | struct acpi_subtable_header header; |
| 887 | u16 inti_flags; |
| 888 | u32 global_irq; /* Global system interrupt */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 889 | }; |
| 890 | |
| 891 | /* 4: Local APIC NMI */ |
| 892 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 893 | struct acpi_madt_local_apic_nmi { |
| 894 | struct acpi_subtable_header header; |
| 895 | u8 processor_id; /* ACPI processor id */ |
| 896 | u16 inti_flags; |
| 897 | u8 lint; /* LINTn to which NMI is connected */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 898 | }; |
| 899 | |
| 900 | /* 5: Address Override */ |
| 901 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 902 | struct acpi_madt_local_apic_override { |
| 903 | struct acpi_subtable_header header; |
| 904 | u16 reserved; /* Reserved, must be zero */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 905 | u64 address; /* APIC physical address */ |
| 906 | }; |
| 907 | |
| 908 | /* 6: I/O Sapic */ |
| 909 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 910 | struct acpi_madt_io_sapic { |
| 911 | struct acpi_subtable_header header; |
| 912 | u8 id; /* I/O SAPIC ID */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 913 | u8 reserved; /* Reserved, must be zero */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 914 | u32 global_irq_base; /* Global interrupt for SAPIC start */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 915 | u64 address; /* SAPIC physical address */ |
| 916 | }; |
| 917 | |
| 918 | /* 7: Local Sapic */ |
| 919 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 920 | struct acpi_madt_local_sapic { |
| 921 | struct acpi_subtable_header header; |
| 922 | u8 processor_id; /* ACPI processor id */ |
| 923 | u8 id; /* SAPIC ID */ |
| 924 | u8 eid; /* SAPIC EID */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 925 | u8 reserved[3]; /* Reserved, must be zero */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 926 | u32 lapic_flags; |
| 927 | u32 uid; /* Numeric UID - ACPI 3.0 */ |
| 928 | char uid_string[1]; /* String UID - ACPI 3.0 */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 929 | }; |
| 930 | |
| 931 | /* 8: Platform Interrupt Source */ |
| 932 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 933 | struct acpi_madt_interrupt_source { |
| 934 | struct acpi_subtable_header header; |
| 935 | u16 inti_flags; |
| 936 | u8 type; /* 1=PMI, 2=INIT, 3=corrected */ |
| 937 | u8 id; /* Processor ID */ |
| 938 | u8 eid; /* Processor EID */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 939 | u8 io_sapic_vector; /* Vector value for PMI interrupts */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 940 | u32 global_irq; /* Global system interrupt */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 941 | u32 flags; /* Interrupt Source Flags */ |
| 942 | }; |
| 943 | |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 944 | /* Masks for Flags field above */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 945 | |
| 946 | #define ACPI_MADT_CPEI_OVERRIDE (1) |
| 947 | |
Bob Moore | eb2289b | 2009-06-24 13:42:00 +0800 | [diff] [blame] | 948 | /* 9: Processor Local X2APIC (ACPI 4.0) */ |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 949 | |
| 950 | struct acpi_madt_local_x2apic { |
| 951 | struct acpi_subtable_header header; |
Lv Zheng | 75c8044 | 2012-12-19 05:36:49 +0000 | [diff] [blame] | 952 | u16 reserved; /* reserved - must be zero */ |
Suresh Siddha | 786c221 | 2009-03-30 14:05:50 -0800 | [diff] [blame] | 953 | u32 local_apic_id; /* Processor x2APIC ID */ |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 954 | u32 lapic_flags; |
Suresh Siddha | 786c221 | 2009-03-30 14:05:50 -0800 | [diff] [blame] | 955 | u32 uid; /* ACPI processor UID */ |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 956 | }; |
| 957 | |
Bob Moore | eb2289b | 2009-06-24 13:42:00 +0800 | [diff] [blame] | 958 | /* 10: Local X2APIC NMI (ACPI 4.0) */ |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 959 | |
| 960 | struct acpi_madt_local_x2apic_nmi { |
| 961 | struct acpi_subtable_header header; |
| 962 | u16 inti_flags; |
Suresh Siddha | 786c221 | 2009-03-30 14:05:50 -0800 | [diff] [blame] | 963 | u32 uid; /* ACPI processor UID */ |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 964 | u8 lint; /* LINTn to which NMI is connected */ |
Lv Zheng | 75c8044 | 2012-12-19 05:36:49 +0000 | [diff] [blame] | 965 | u8 reserved[3]; /* reserved - must be zero */ |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 966 | }; |
| 967 | |
Bob Moore | 0cff8dc | 2015-05-21 10:31:18 +0800 | [diff] [blame] | 968 | /* 11: Generic Interrupt (ACPI 5.0 + ACPI 6.0 changes) */ |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 969 | |
| 970 | struct acpi_madt_generic_interrupt { |
| 971 | struct acpi_subtable_header header; |
Lv Zheng | 75c8044 | 2012-12-19 05:36:49 +0000 | [diff] [blame] | 972 | u16 reserved; /* reserved - must be zero */ |
Tomasz Nowicki | d0c383e | 2014-07-30 12:21:50 +0800 | [diff] [blame] | 973 | u32 cpu_interface_number; |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 974 | u32 uid; |
| 975 | u32 flags; |
| 976 | u32 parking_version; |
| 977 | u32 performance_interrupt; |
| 978 | u64 parked_address; |
| 979 | u64 base_address; |
Tomasz Nowicki | d0c383e | 2014-07-30 12:21:50 +0800 | [diff] [blame] | 980 | u64 gicv_base_address; |
| 981 | u64 gich_base_address; |
| 982 | u32 vgic_interrupt; |
| 983 | u64 gicr_base_address; |
| 984 | u64 arm_mpidr; |
Bob Moore | 0cff8dc | 2015-05-21 10:31:18 +0800 | [diff] [blame] | 985 | u8 efficiency_class; |
| 986 | u8 reserved2[3]; |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 987 | }; |
| 988 | |
Tomasz Nowicki | d0c383e | 2014-07-30 12:21:50 +0800 | [diff] [blame] | 989 | /* Masks for Flags field above */ |
| 990 | |
| 991 | /* ACPI_MADT_ENABLED (1) Processor is usable if set */ |
| 992 | #define ACPI_MADT_PERFORMANCE_IRQ_MODE (1<<1) /* 01: Performance Interrupt Mode */ |
| 993 | #define ACPI_MADT_VGIC_IRQ_MODE (1<<2) /* 02: VGIC Maintenance Interrupt mode */ |
| 994 | |
Bob Moore | 0cff8dc | 2015-05-21 10:31:18 +0800 | [diff] [blame] | 995 | /* 12: Generic Distributor (ACPI 5.0 + ACPI 6.0 changes) */ |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 996 | |
| 997 | struct acpi_madt_generic_distributor { |
| 998 | struct acpi_subtable_header header; |
Bob Moore | ba494be | 2012-07-12 09:40:10 +0800 | [diff] [blame] | 999 | u16 reserved; /* reserved - must be zero */ |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 1000 | u32 gic_id; |
| 1001 | u64 base_address; |
| 1002 | u32 global_irq_base; |
Bob Moore | 0cff8dc | 2015-05-21 10:31:18 +0800 | [diff] [blame] | 1003 | u8 version; |
| 1004 | u8 reserved2[3]; /* reserved - must be zero */ |
Bob Moore | c5bd653 | 2011-11-16 11:04:00 +0800 | [diff] [blame] | 1005 | }; |
| 1006 | |
Hanjun Guo | a8bd0f0 | 2015-07-01 14:44:10 +0800 | [diff] [blame] | 1007 | /* Values for Version field above */ |
| 1008 | |
| 1009 | enum acpi_madt_gic_version { |
| 1010 | ACPI_MADT_GIC_VERSION_NONE = 0, |
| 1011 | ACPI_MADT_GIC_VERSION_V1 = 1, |
| 1012 | ACPI_MADT_GIC_VERSION_V2 = 2, |
| 1013 | ACPI_MADT_GIC_VERSION_V3 = 3, |
| 1014 | ACPI_MADT_GIC_VERSION_V4 = 4, |
| 1015 | ACPI_MADT_GIC_VERSION_RESERVED = 5 /* 5 and greater are reserved */ |
| 1016 | }; |
| 1017 | |
Tomasz Nowicki | d0c383e | 2014-07-30 12:21:50 +0800 | [diff] [blame] | 1018 | /* 13: Generic MSI Frame (ACPI 5.1) */ |
| 1019 | |
| 1020 | struct acpi_madt_generic_msi_frame { |
| 1021 | struct acpi_subtable_header header; |
| 1022 | u16 reserved; /* reserved - must be zero */ |
| 1023 | u32 msi_frame_id; |
| 1024 | u64 base_address; |
| 1025 | u32 flags; |
| 1026 | u16 spi_count; |
| 1027 | u16 spi_base; |
| 1028 | }; |
| 1029 | |
| 1030 | /* Masks for Flags field above */ |
| 1031 | |
| 1032 | #define ACPI_MADT_OVERRIDE_SPI_VALUES (1) |
| 1033 | |
| 1034 | /* 14: Generic Redistributor (ACPI 5.1) */ |
| 1035 | |
| 1036 | struct acpi_madt_generic_redistributor { |
| 1037 | struct acpi_subtable_header header; |
| 1038 | u16 reserved; /* reserved - must be zero */ |
| 1039 | u64 base_address; |
| 1040 | u32 length; |
| 1041 | }; |
| 1042 | |
Bob Moore | 0cff8dc | 2015-05-21 10:31:18 +0800 | [diff] [blame] | 1043 | /* 15: Generic Translator (ACPI 6.0) */ |
| 1044 | |
| 1045 | struct acpi_madt_generic_translator { |
| 1046 | struct acpi_subtable_header header; |
| 1047 | u16 reserved; /* reserved - must be zero */ |
| 1048 | u32 translation_id; |
| 1049 | u64 base_address; |
| 1050 | u32 reserved2; |
| 1051 | }; |
| 1052 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1053 | /* |
| 1054 | * Common flags fields for MADT subtables |
| 1055 | */ |
| 1056 | |
Tomasz Nowicki | d0c383e | 2014-07-30 12:21:50 +0800 | [diff] [blame] | 1057 | /* MADT Local APIC flags */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1058 | |
| 1059 | #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */ |
| 1060 | |
| 1061 | /* MADT MPS INTI flags (inti_flags) */ |
| 1062 | |
| 1063 | #define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */ |
| 1064 | #define ACPI_MADT_TRIGGER_MASK (3<<2) /* 02-03: Trigger mode of APIC input signals */ |
| 1065 | |
| 1066 | /* Values for MPS INTI flags */ |
| 1067 | |
| 1068 | #define ACPI_MADT_POLARITY_CONFORMS 0 |
| 1069 | #define ACPI_MADT_POLARITY_ACTIVE_HIGH 1 |
| 1070 | #define ACPI_MADT_POLARITY_RESERVED 2 |
| 1071 | #define ACPI_MADT_POLARITY_ACTIVE_LOW 3 |
| 1072 | |
| 1073 | #define ACPI_MADT_TRIGGER_CONFORMS (0) |
| 1074 | #define ACPI_MADT_TRIGGER_EDGE (1<<2) |
| 1075 | #define ACPI_MADT_TRIGGER_RESERVED (2<<2) |
| 1076 | #define ACPI_MADT_TRIGGER_LEVEL (3<<2) |
| 1077 | |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1078 | /******************************************************************************* |
| 1079 | * |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 1080 | * MSCT - Maximum System Characteristics Table (ACPI 4.0) |
| 1081 | * Version 1 |
| 1082 | * |
| 1083 | ******************************************************************************/ |
| 1084 | |
| 1085 | struct acpi_table_msct { |
| 1086 | struct acpi_table_header header; /* Common ACPI table header */ |
| 1087 | u32 proximity_offset; /* Location of proximity info struct(s) */ |
| 1088 | u32 max_proximity_domains; /* Max number of proximity domains */ |
| 1089 | u32 max_clock_domains; /* Max number of clock domains */ |
| 1090 | u64 max_address; /* Max physical address in system */ |
| 1091 | }; |
| 1092 | |
Bob Moore | ba494be | 2012-07-12 09:40:10 +0800 | [diff] [blame] | 1093 | /* subtable - Maximum Proximity Domain Information. Version 1 */ |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 1094 | |
| 1095 | struct acpi_msct_proximity { |
| 1096 | u8 revision; |
| 1097 | u8 length; |
| 1098 | u32 range_start; /* Start of domain range */ |
| 1099 | u32 range_end; /* End of domain range */ |
| 1100 | u32 processor_capacity; |
| 1101 | u64 memory_capacity; /* In bytes */ |
| 1102 | }; |
| 1103 | |
| 1104 | /******************************************************************************* |
| 1105 | * |
Bob Moore | 138a955 | 2016-03-24 09:39:14 +0800 | [diff] [blame] | 1106 | * NFIT - NVDIMM Interface Table (ACPI 6.0+) |
Bob Moore | 04f8e38 | 2015-05-21 10:31:58 +0800 | [diff] [blame] | 1107 | * Version 1 |
| 1108 | * |
| 1109 | ******************************************************************************/ |
| 1110 | |
| 1111 | struct acpi_table_nfit { |
| 1112 | struct acpi_table_header header; /* Common ACPI table header */ |
| 1113 | u32 reserved; /* Reserved, must be zero */ |
| 1114 | }; |
| 1115 | |
| 1116 | /* Subtable header for NFIT */ |
| 1117 | |
| 1118 | struct acpi_nfit_header { |
| 1119 | u16 type; |
| 1120 | u16 length; |
| 1121 | }; |
| 1122 | |
| 1123 | /* Values for subtable type in struct acpi_nfit_header */ |
| 1124 | |
| 1125 | enum acpi_nfit_type { |
| 1126 | ACPI_NFIT_TYPE_SYSTEM_ADDRESS = 0, |
| 1127 | ACPI_NFIT_TYPE_MEMORY_MAP = 1, |
| 1128 | ACPI_NFIT_TYPE_INTERLEAVE = 2, |
| 1129 | ACPI_NFIT_TYPE_SMBIOS = 3, |
| 1130 | ACPI_NFIT_TYPE_CONTROL_REGION = 4, |
| 1131 | ACPI_NFIT_TYPE_DATA_REGION = 5, |
| 1132 | ACPI_NFIT_TYPE_FLUSH_ADDRESS = 6, |
| 1133 | ACPI_NFIT_TYPE_RESERVED = 7 /* 7 and greater are reserved */ |
| 1134 | }; |
| 1135 | |
| 1136 | /* |
| 1137 | * NFIT Subtables |
| 1138 | */ |
| 1139 | |
| 1140 | /* 0: System Physical Address Range Structure */ |
| 1141 | |
| 1142 | struct acpi_nfit_system_address { |
| 1143 | struct acpi_nfit_header header; |
| 1144 | u16 range_index; |
| 1145 | u16 flags; |
| 1146 | u32 reserved; /* Reseved, must be zero */ |
| 1147 | u32 proximity_domain; |
| 1148 | u8 range_guid[16]; |
| 1149 | u64 address; |
| 1150 | u64 length; |
| 1151 | u64 memory_mapping; |
| 1152 | }; |
| 1153 | |
| 1154 | /* Flags */ |
| 1155 | |
| 1156 | #define ACPI_NFIT_ADD_ONLINE_ONLY (1) /* 00: Add/Online Operation Only */ |
| 1157 | #define ACPI_NFIT_PROXIMITY_VALID (1<<1) /* 01: Proximity Domain Valid */ |
| 1158 | |
| 1159 | /* Range Type GUIDs appear in the include/acuuid.h file */ |
| 1160 | |
| 1161 | /* 1: Memory Device to System Address Range Map Structure */ |
| 1162 | |
| 1163 | struct acpi_nfit_memory_map { |
| 1164 | struct acpi_nfit_header header; |
| 1165 | u32 device_handle; |
| 1166 | u16 physical_id; |
| 1167 | u16 region_id; |
| 1168 | u16 range_index; |
| 1169 | u16 region_index; |
| 1170 | u64 region_size; |
| 1171 | u64 region_offset; |
| 1172 | u64 address; |
| 1173 | u16 interleave_index; |
| 1174 | u16 interleave_ways; |
| 1175 | u16 flags; |
| 1176 | u16 reserved; /* Reserved, must be zero */ |
| 1177 | }; |
| 1178 | |
| 1179 | /* Flags */ |
| 1180 | |
| 1181 | #define ACPI_NFIT_MEM_SAVE_FAILED (1) /* 00: Last SAVE to Memory Device failed */ |
| 1182 | #define ACPI_NFIT_MEM_RESTORE_FAILED (1<<1) /* 01: Last RESTORE from Memory Device failed */ |
| 1183 | #define ACPI_NFIT_MEM_FLUSH_FAILED (1<<2) /* 02: Platform flush failed */ |
Bob Moore | ca321d1 | 2015-10-19 10:24:52 +0800 | [diff] [blame] | 1184 | #define ACPI_NFIT_MEM_NOT_ARMED (1<<3) /* 03: Memory Device is not armed */ |
Bob Moore | 04f8e38 | 2015-05-21 10:31:58 +0800 | [diff] [blame] | 1185 | #define ACPI_NFIT_MEM_HEALTH_OBSERVED (1<<4) /* 04: Memory Device observed SMART/health events */ |
| 1186 | #define ACPI_NFIT_MEM_HEALTH_ENABLED (1<<5) /* 05: SMART/health events enabled */ |
Bob Moore | 138a955 | 2016-03-24 09:39:14 +0800 | [diff] [blame] | 1187 | #define ACPI_NFIT_MEM_MAP_FAILED (1<<6) /* 06: Mapping to SPA failed */ |
Bob Moore | 04f8e38 | 2015-05-21 10:31:58 +0800 | [diff] [blame] | 1188 | |
| 1189 | /* 2: Interleave Structure */ |
| 1190 | |
| 1191 | struct acpi_nfit_interleave { |
| 1192 | struct acpi_nfit_header header; |
| 1193 | u16 interleave_index; |
| 1194 | u16 reserved; /* Reserved, must be zero */ |
| 1195 | u32 line_count; |
| 1196 | u32 line_size; |
| 1197 | u32 line_offset[1]; /* Variable length */ |
| 1198 | }; |
| 1199 | |
| 1200 | /* 3: SMBIOS Management Information Structure */ |
| 1201 | |
| 1202 | struct acpi_nfit_smbios { |
| 1203 | struct acpi_nfit_header header; |
| 1204 | u32 reserved; /* Reserved, must be zero */ |
| 1205 | u8 data[1]; /* Variable length */ |
| 1206 | }; |
| 1207 | |
| 1208 | /* 4: NVDIMM Control Region Structure */ |
| 1209 | |
| 1210 | struct acpi_nfit_control_region { |
| 1211 | struct acpi_nfit_header header; |
| 1212 | u16 region_index; |
| 1213 | u16 vendor_id; |
| 1214 | u16 device_id; |
| 1215 | u16 revision_id; |
| 1216 | u16 subsystem_vendor_id; |
| 1217 | u16 subsystem_device_id; |
| 1218 | u16 subsystem_revision_id; |
Bob Moore | 138a955 | 2016-03-24 09:39:14 +0800 | [diff] [blame] | 1219 | u8 valid_fields; |
| 1220 | u8 manufacturing_location; |
| 1221 | u16 manufacturing_date; |
| 1222 | u8 reserved[2]; /* Reserved, must be zero */ |
Bob Moore | 04f8e38 | 2015-05-21 10:31:58 +0800 | [diff] [blame] | 1223 | u32 serial_number; |
| 1224 | u16 code; |
| 1225 | u16 windows; |
| 1226 | u64 window_size; |
| 1227 | u64 command_offset; |
| 1228 | u64 command_size; |
| 1229 | u64 status_offset; |
| 1230 | u64 status_size; |
| 1231 | u16 flags; |
| 1232 | u8 reserved1[6]; /* Reserved, must be zero */ |
| 1233 | }; |
| 1234 | |
| 1235 | /* Flags */ |
| 1236 | |
Bob Moore | 138a955 | 2016-03-24 09:39:14 +0800 | [diff] [blame] | 1237 | #define ACPI_NFIT_CONTROL_BUFFERED (1) /* Block Data Windows implementation is buffered */ |
| 1238 | |
| 1239 | /* valid_fields bits */ |
| 1240 | |
| 1241 | #define ACPI_NFIT_CONTROL_MFG_INFO_VALID (1) /* Manufacturing fields are valid */ |
Bob Moore | 04f8e38 | 2015-05-21 10:31:58 +0800 | [diff] [blame] | 1242 | |
| 1243 | /* 5: NVDIMM Block Data Window Region Structure */ |
| 1244 | |
| 1245 | struct acpi_nfit_data_region { |
| 1246 | struct acpi_nfit_header header; |
| 1247 | u16 region_index; |
| 1248 | u16 windows; |
| 1249 | u64 offset; |
| 1250 | u64 size; |
| 1251 | u64 capacity; |
| 1252 | u64 start_address; |
| 1253 | }; |
| 1254 | |
| 1255 | /* 6: Flush Hint Address Structure */ |
| 1256 | |
| 1257 | struct acpi_nfit_flush_address { |
| 1258 | struct acpi_nfit_header header; |
| 1259 | u32 device_handle; |
| 1260 | u16 hint_count; |
| 1261 | u8 reserved[6]; /* Reserved, must be zero */ |
| 1262 | u64 hint_address[1]; /* Variable length */ |
| 1263 | }; |
| 1264 | |
| 1265 | /******************************************************************************* |
| 1266 | * |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1267 | * SBST - Smart Battery Specification Table |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 1268 | * Version 1 |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1269 | * |
| 1270 | ******************************************************************************/ |
| 1271 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1272 | struct acpi_table_sbst { |
| 1273 | struct acpi_table_header header; /* Common ACPI table header */ |
| 1274 | u32 warning_level; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1275 | u32 low_level; |
| 1276 | u32 critical_level; |
| 1277 | }; |
| 1278 | |
| 1279 | /******************************************************************************* |
| 1280 | * |
| 1281 | * SLIT - System Locality Distance Information Table |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 1282 | * Version 1 |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1283 | * |
| 1284 | ******************************************************************************/ |
| 1285 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1286 | struct acpi_table_slit { |
| 1287 | struct acpi_table_header header; /* Common ACPI table header */ |
| 1288 | u64 locality_count; |
| 1289 | u8 entry[1]; /* Real size = localities^2 */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1290 | }; |
| 1291 | |
| 1292 | /******************************************************************************* |
| 1293 | * |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1294 | * SRAT - System Resource Affinity Table |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 1295 | * Version 3 |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1296 | * |
| 1297 | ******************************************************************************/ |
| 1298 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1299 | struct acpi_table_srat { |
| 1300 | struct acpi_table_header header; /* Common ACPI table header */ |
| 1301 | u32 table_revision; /* Must be value '1' */ |
| 1302 | u64 reserved; /* Reserved, must be zero */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1303 | }; |
| 1304 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1305 | /* Values for subtable type in struct acpi_subtable_header */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1306 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1307 | enum acpi_srat_type { |
| 1308 | ACPI_SRAT_TYPE_CPU_AFFINITY = 0, |
| 1309 | ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1, |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 1310 | ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2, |
Hanjun Guo | 63b8f8c | 2014-09-02 08:27:12 +0800 | [diff] [blame] | 1311 | ACPI_SRAT_TYPE_GICC_AFFINITY = 3, |
| 1312 | ACPI_SRAT_TYPE_RESERVED = 4 /* 4 and greater are reserved */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1313 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1314 | |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 1315 | /* |
Bob Moore | 1a49b72 | 2014-04-30 10:04:28 +0800 | [diff] [blame] | 1316 | * SRAT Subtables, correspond to Type in struct acpi_subtable_header |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 1317 | */ |
| 1318 | |
| 1319 | /* 0: Processor Local APIC/SAPIC Affinity */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1320 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1321 | struct acpi_srat_cpu_affinity { |
| 1322 | struct acpi_subtable_header header; |
| 1323 | u8 proximity_domain_lo; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1324 | u8 apic_id; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1325 | u32 flags; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1326 | u8 local_sapic_eid; |
| 1327 | u8 proximity_domain_hi[3]; |
Hanjun Guo | 63b8f8c | 2014-09-02 08:27:12 +0800 | [diff] [blame] | 1328 | u32 clock_domain; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1329 | }; |
| 1330 | |
Bob Moore | 6e2d5eb | 2009-07-27 10:53:00 +0800 | [diff] [blame] | 1331 | /* Flags */ |
| 1332 | |
| 1333 | #define ACPI_SRAT_CPU_USE_AFFINITY (1) /* 00: Use affinity structure */ |
| 1334 | |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 1335 | /* 1: Memory Affinity */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1336 | |
| 1337 | struct acpi_srat_mem_affinity { |
| 1338 | struct acpi_subtable_header header; |
| 1339 | u32 proximity_domain; |
| 1340 | u16 reserved; /* Reserved, must be zero */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1341 | u64 base_address; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1342 | u64 length; |
Bob Moore | 19d0cfe | 2008-06-10 15:54:40 +0800 | [diff] [blame] | 1343 | u32 reserved1; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1344 | u32 flags; |
Bob Moore | 19d0cfe | 2008-06-10 15:54:40 +0800 | [diff] [blame] | 1345 | u64 reserved2; /* Reserved, must be zero */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1346 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1347 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1348 | /* Flags */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 1349 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 1350 | #define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */ |
| 1351 | #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */ |
| 1352 | #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] | 1353 | |
Bob Moore | eb2289b | 2009-06-24 13:42:00 +0800 | [diff] [blame] | 1354 | /* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */ |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 1355 | |
| 1356 | struct acpi_srat_x2apic_cpu_affinity { |
| 1357 | struct acpi_subtable_header header; |
| 1358 | u16 reserved; /* Reserved, must be zero */ |
| 1359 | u32 proximity_domain; |
| 1360 | u32 apic_id; |
| 1361 | u32 flags; |
Bob Moore | eb2289b | 2009-06-24 13:42:00 +0800 | [diff] [blame] | 1362 | u32 clock_domain; |
| 1363 | u32 reserved2; |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 1364 | }; |
| 1365 | |
| 1366 | /* Flags for struct acpi_srat_cpu_affinity and struct acpi_srat_x2apic_cpu_affinity */ |
| 1367 | |
| 1368 | #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */ |
| 1369 | |
Hanjun Guo | 63b8f8c | 2014-09-02 08:27:12 +0800 | [diff] [blame] | 1370 | /* 3: GICC Affinity (ACPI 5.1) */ |
| 1371 | |
| 1372 | struct acpi_srat_gicc_affinity { |
| 1373 | struct acpi_subtable_header header; |
| 1374 | u32 proximity_domain; |
| 1375 | u32 acpi_processor_uid; |
| 1376 | u32 flags; |
| 1377 | u32 clock_domain; |
| 1378 | }; |
| 1379 | |
| 1380 | /* Flags for struct acpi_srat_gicc_affinity */ |
| 1381 | |
| 1382 | #define ACPI_SRAT_GICC_ENABLED (1) /* 00: Use affinity structure */ |
| 1383 | |
Robert Moore | 6e59608 | 2014-03-05 14:12:01 +0800 | [diff] [blame] | 1384 | /* Reset to default packing */ |
| 1385 | |
| 1386 | #pragma pack() |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1387 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 1388 | #endif /* __ACTBL1_H__ */ |