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 | * |
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 | /* |
| 59 | * Values for description table header signatures. Useful because they make |
| 60 | * it more difficult to inadvertently type in the wrong signature. |
| 61 | */ |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 62 | #define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 63 | #define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 64 | #define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */ |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 65 | #define ACPI_SIG_EINJ "EINJ" /* Error Injection table */ |
| 66 | #define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */ |
| 67 | #define ACPI_SIG_HEST "HEST" /* Hardware Error Source Table */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 68 | #define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 69 | #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */ |
| 70 | #define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 71 | #define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 72 | |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 73 | /* |
| 74 | * All tables must be byte-packed to match the ACPI specification, since |
| 75 | * the tables are provided by the system BIOS. |
| 76 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 77 | #pragma pack(1) |
| 78 | |
| 79 | /* |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 80 | * Note about bitfields: The u8 type is used for bitfields in ACPI tables. |
| 81 | * This is the only type that is even remotely portable. Anything else is not |
| 82 | * portable, so do not use any other bitfield types. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 83 | */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 84 | |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 85 | /* Common Subtable header (used in MADT, SRAT, etc.) */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 86 | |
| 87 | struct acpi_subtable_header { |
| 88 | u8 type; |
| 89 | u8 length; |
| 90 | }; |
| 91 | |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 92 | /* Common Subtable header for WHEA tables (EINJ, ERST, WDAT) */ |
| 93 | |
| 94 | struct acpi_whea_header { |
| 95 | u8 action; |
| 96 | u8 instruction; |
| 97 | u8 flags; |
| 98 | u8 reserved; |
| 99 | struct acpi_generic_address register_region; |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 100 | u64 value; /* Value used with Read/Write register */ |
| 101 | u64 mask; /* Bitmask required for this register instruction */ |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 102 | }; |
| 103 | |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 104 | /******************************************************************************* |
| 105 | * |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 106 | * BERT - Boot Error Record Table |
| 107 | * |
| 108 | ******************************************************************************/ |
| 109 | |
| 110 | struct acpi_table_bert { |
| 111 | struct acpi_table_header header; /* Common ACPI table header */ |
| 112 | u32 region_length; /* Length of the boot error region */ |
| 113 | u64 address; /* Physical addresss of the error region */ |
| 114 | }; |
| 115 | |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 116 | /* Boot Error Region */ |
| 117 | |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 118 | struct acpi_bert_region { |
| 119 | u32 block_status; |
| 120 | u32 raw_data_offset; |
| 121 | u32 raw_data_length; |
| 122 | u32 data_length; |
| 123 | u32 error_severity; |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 124 | }; |
| 125 | |
| 126 | /* block_status Flags */ |
| 127 | |
| 128 | #define ACPI_BERT_UNCORRECTABLE (1) |
| 129 | #define ACPI_BERT_CORRECTABLE (2) |
| 130 | #define ACPI_BERT_MULTIPLE_UNCORRECTABLE (4) |
| 131 | #define ACPI_BERT_MULTIPLE_CORRECTABLE (8) |
| 132 | |
| 133 | /******************************************************************************* |
| 134 | * |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 135 | * CPEP - Corrected Platform Error Polling table |
| 136 | * |
| 137 | ******************************************************************************/ |
| 138 | |
| 139 | struct acpi_table_cpep { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 140 | struct acpi_table_header header; /* Common ACPI table header */ |
| 141 | u64 reserved; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 142 | }; |
| 143 | |
| 144 | /* Subtable */ |
| 145 | |
| 146 | struct acpi_cpep_polling { |
| 147 | u8 type; |
| 148 | u8 length; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 149 | u8 id; /* Processor ID */ |
| 150 | u8 eid; /* Processor EID */ |
| 151 | u32 interval; /* Polling interval (msec) */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 152 | }; |
| 153 | |
| 154 | /******************************************************************************* |
| 155 | * |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 156 | * ECDT - Embedded Controller Boot Resources Table |
| 157 | * |
| 158 | ******************************************************************************/ |
| 159 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 160 | struct acpi_table_ecdt { |
| 161 | struct acpi_table_header header; /* Common ACPI table header */ |
| 162 | struct acpi_generic_address control; /* Address of EC command/status register */ |
| 163 | struct acpi_generic_address data; /* Address of EC data register */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 164 | u32 uid; /* Unique ID - must be same as the EC _UID method */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 165 | u8 gpe; /* The GPE for the EC */ |
| 166 | u8 id[1]; /* Full namepath of the EC in the ACPI namespace */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 167 | }; |
| 168 | |
| 169 | /******************************************************************************* |
| 170 | * |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 171 | * EINJ - Error Injection Table |
| 172 | * |
| 173 | ******************************************************************************/ |
| 174 | |
| 175 | struct acpi_table_einj { |
| 176 | struct acpi_table_header header; /* Common ACPI table header */ |
| 177 | u32 header_length; |
| 178 | u32 reserved; |
| 179 | u32 entries; |
| 180 | }; |
| 181 | |
| 182 | /* EINJ Injection Instruction Entries (actions) */ |
| 183 | |
| 184 | struct acpi_einj_entry { |
| 185 | struct acpi_whea_header whea_header; /* Common header for WHEA tables */ |
| 186 | }; |
| 187 | |
| 188 | /* Values for Action field above */ |
| 189 | |
| 190 | enum acpi_einj_actions { |
| 191 | ACPI_EINJ_BEGIN_OPERATION = 0, |
| 192 | ACPI_EINJ_GET_TRIGGER_TABLE = 1, |
| 193 | ACPI_EINJ_SET_ERROR_TYPE = 2, |
| 194 | ACPI_EINJ_GET_ERROR_TYPE = 3, |
| 195 | ACPI_EINJ_END_OPERATION = 4, |
| 196 | ACPI_EINJ_EXECUTE_OPERATION = 5, |
| 197 | ACPI_EINJ_CHECK_BUSY_STATUS = 6, |
| 198 | ACPI_EINJ_GET_COMMAND_STATUS = 7, |
| 199 | ACPI_EINJ_ACTION_RESERVED = 8, /* 8 and greater are reserved */ |
| 200 | ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */ |
| 201 | }; |
| 202 | |
| 203 | /* Values for Instruction field above */ |
| 204 | |
| 205 | enum acpi_einj_instructions { |
| 206 | ACPI_EINJ_READ_REGISTER = 0, |
| 207 | ACPI_EINJ_READ_REGISTER_VALUE = 1, |
| 208 | ACPI_EINJ_WRITE_REGISTER = 2, |
| 209 | ACPI_EINJ_WRITE_REGISTER_VALUE = 3, |
| 210 | ACPI_EINJ_NOOP = 4, |
| 211 | ACPI_EINJ_INSTRUCTION_RESERVED = 5 /* 5 and greater are reserved */ |
| 212 | }; |
| 213 | |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 214 | /* EINJ Trigger Error Action Table */ |
| 215 | |
| 216 | struct acpi_einj_trigger { |
| 217 | u32 header_size; |
| 218 | u32 revision; |
| 219 | u32 table_size; |
| 220 | u32 entry_count; |
| 221 | }; |
| 222 | |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 223 | /******************************************************************************* |
| 224 | * |
| 225 | * ERST - Error Record Serialization Table |
| 226 | * |
| 227 | ******************************************************************************/ |
| 228 | |
| 229 | struct acpi_table_erst { |
| 230 | struct acpi_table_header header; /* Common ACPI table header */ |
| 231 | u32 header_length; |
| 232 | u32 reserved; |
| 233 | u32 entries; |
| 234 | }; |
| 235 | |
| 236 | /* ERST Serialization Entries (actions) */ |
| 237 | |
| 238 | struct acpi_erst_entry { |
| 239 | struct acpi_whea_header whea_header; /* Common header for WHEA tables */ |
| 240 | }; |
| 241 | |
| 242 | /* Values for Action field above */ |
| 243 | |
| 244 | enum acpi_erst_actions { |
| 245 | ACPI_ERST_BEGIN_WRITE_OPERATION = 0, |
| 246 | ACPI_ERST_BEGIN_READ_OPERATION = 1, |
| 247 | ACPI_ERST_BETGIN_CLEAR_OPERATION = 2, |
| 248 | ACPI_ERST_END_OPERATION = 3, |
| 249 | ACPI_ERST_SET_RECORD_OFFSET = 4, |
| 250 | ACPI_ERST_EXECUTE_OPERATION = 5, |
| 251 | ACPI_ERST_CHECK_BUSY_STATUS = 6, |
| 252 | ACPI_ERST_GET_COMMAND_STATUS = 7, |
| 253 | ACPI_ERST_GET_RECORD_IDENTIFIER = 8, |
| 254 | ACPI_ERST_SET_RECORD_IDENTIFIER = 9, |
| 255 | ACPI_ERST_GET_RECORD_COUNT = 10, |
| 256 | ACPI_ERST_BEGIN_DUMMY_WRIITE = 11, |
| 257 | ACPI_ERST_NOT_USED = 12, |
| 258 | ACPI_ERST_GET_ERROR_RANGE = 13, |
| 259 | ACPI_ERST_GET_ERROR_LENGTH = 14, |
| 260 | ACPI_ERST_GET_ERROR_ATTRIBUTES = 15, |
| 261 | ACPI_ERST_ACTION_RESERVED = 16 /* 16 and greater are reserved */ |
| 262 | }; |
| 263 | |
| 264 | /* Values for Instruction field above */ |
| 265 | |
| 266 | enum acpi_erst_instructions { |
| 267 | ACPI_ERST_READ_REGISTER = 0, |
| 268 | ACPI_ERST_READ_REGISTER_VALUE = 1, |
| 269 | ACPI_ERST_WRITE_REGISTER = 2, |
| 270 | ACPI_ERST_WRITE_REGISTER_VALUE = 3, |
| 271 | ACPI_ERST_NOOP = 4, |
| 272 | ACPI_ERST_LOAD_VAR1 = 5, |
| 273 | ACPI_ERST_LOAD_VAR2 = 6, |
| 274 | ACPI_ERST_STORE_VAR1 = 7, |
| 275 | ACPI_ERST_ADD = 8, |
| 276 | ACPI_ERST_SUBTRACT = 9, |
| 277 | ACPI_ERST_ADD_VALUE = 10, |
| 278 | ACPI_ERST_SUBTRACT_VALUE = 11, |
| 279 | ACPI_ERST_STALL = 12, |
| 280 | ACPI_ERST_STALL_WHILE_TRUE = 13, |
| 281 | ACPI_ERST_SKIP_NEXT_IF_TRUE = 14, |
| 282 | ACPI_ERST_GOTO = 15, |
| 283 | ACPI_ERST_SET_SRC_ADDRESS_BASE = 16, |
| 284 | ACPI_ERST_SET_DST_ADDRESS_BASE = 17, |
| 285 | ACPI_ERST_MOVE_DATA = 18, |
| 286 | ACPI_ERST_INSTRUCTION_RESERVED = 19 /* 19 and greater are reserved */ |
| 287 | }; |
| 288 | |
| 289 | /******************************************************************************* |
| 290 | * |
| 291 | * HEST - Hardware Error Source Table |
| 292 | * |
| 293 | ******************************************************************************/ |
| 294 | |
| 295 | struct acpi_table_hest { |
| 296 | struct acpi_table_header header; /* Common ACPI table header */ |
| 297 | u32 error_source_count; |
| 298 | }; |
| 299 | |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 300 | /* HEST subtable header */ |
| 301 | |
| 302 | struct acpi_hest_header { |
| 303 | u16 type; |
| 304 | }; |
| 305 | |
| 306 | /* Values for Type field above for subtables */ |
| 307 | |
| 308 | enum acpi_hest_types { |
| 309 | ACPI_HEST_TYPE_XPF_MACHINE_CHECK = 0, |
| 310 | ACPI_HEST_TYPE_XPF_CORRECTED_MACHINE_CHECK = 1, |
| 311 | ACPI_HEST_TYPE_XPF_UNUSED = 2, |
| 312 | ACPI_HEST_TYPE_XPF_NON_MASKABLE_INTERRUPT = 3, |
| 313 | ACPI_HEST_TYPE_IPF_CORRECTED_MACHINE_CHECK = 4, |
| 314 | ACPI_HEST_TYPE_IPF_CORRECTED_PLATFORM_ERROR = 5, |
| 315 | ACPI_HEST_TYPE_AER_ROOT_PORT = 6, |
| 316 | ACPI_HEST_TYPE_AER_ENDPOINT = 7, |
| 317 | ACPI_HEST_TYPE_AER_BRIDGE = 8, |
| 318 | ACPI_HEST_TYPE_GENERIC_HARDWARE_ERROR_SOURCE = 9, |
| 319 | ACPI_HEST_TYPE_RESERVED = 10 /* 10 and greater are reserved */ |
| 320 | }; |
| 321 | |
| 322 | /* |
| 323 | * HEST Sub-subtables |
| 324 | */ |
| 325 | |
| 326 | /* XPF Machine Check Error Bank */ |
| 327 | |
| 328 | struct acpi_hest_xpf_error_bank { |
| 329 | u8 bank_number; |
| 330 | u8 clear_status_on_init; |
| 331 | u8 status_format; |
| 332 | u8 config_write_enable; |
| 333 | u32 control_register; |
| 334 | u64 control_init_data; |
| 335 | u32 status_register; |
| 336 | u32 address_register; |
| 337 | u32 misc_register; |
| 338 | }; |
| 339 | |
| 340 | /* Generic Error Status */ |
| 341 | |
| 342 | struct acpi_hest_generic_status { |
| 343 | u32 block_status; |
| 344 | u32 raw_data_offset; |
| 345 | u32 raw_data_length; |
| 346 | u32 data_length; |
| 347 | u32 error_severity; |
| 348 | }; |
| 349 | |
| 350 | /* Generic Error Data */ |
| 351 | |
| 352 | struct acpi_hest_generic_data { |
| 353 | u8 section_type[16]; |
| 354 | u32 error_severity; |
| 355 | u16 revision; |
| 356 | u8 validation_bits; |
| 357 | u8 flags; |
| 358 | u32 error_data_length; |
| 359 | u8 fru_id[16]; |
| 360 | u8 fru_text[20]; |
| 361 | }; |
| 362 | |
| 363 | /* Common HEST structure for PCI/AER types below (6,7,8) */ |
| 364 | |
| 365 | struct acpi_hest_aer_common { |
| 366 | u16 source_id; |
| 367 | u16 config_write_enable; |
| 368 | u8 flags; |
| 369 | u8 enabled; |
| 370 | u32 records_to_pre_allocate; |
| 371 | u32 max_sections_per_record; |
| 372 | u32 bus; |
| 373 | u16 device; |
| 374 | u16 function; |
| 375 | u16 device_control; |
| 376 | u16 reserved; |
| 377 | u32 uncorrectable_error_mask; |
| 378 | u32 uncorrectable_error_severity; |
| 379 | u32 correctable_error_mask; |
Bob Moore | 7488c8d | 2008-12-16 16:04:29 +0800 | [diff] [blame] | 380 | u32 advanced_error_capabilities; |
Bob Moore | 3fa3477 | 2008-04-10 19:06:43 +0400 | [diff] [blame] | 381 | }; |
| 382 | |
| 383 | /* Hardware Error Notification */ |
| 384 | |
| 385 | struct acpi_hest_notify { |
| 386 | u8 type; |
| 387 | u8 length; |
| 388 | u16 config_write_enable; |
| 389 | u32 poll_interval; |
| 390 | u32 vector; |
| 391 | u32 polling_threshold_value; |
| 392 | u32 polling_threshold_window; |
| 393 | u32 error_threshold_value; |
| 394 | u32 error_threshold_window; |
| 395 | }; |
| 396 | |
| 397 | /* Values for Notify Type field above */ |
| 398 | |
| 399 | enum acpi_hest_notify_types { |
| 400 | ACPI_HEST_NOTIFY_POLLED = 0, |
| 401 | ACPI_HEST_NOTIFY_EXTERNAL = 1, |
| 402 | ACPI_HEST_NOTIFY_LOCAL = 2, |
| 403 | ACPI_HEST_NOTIFY_SCI = 3, |
| 404 | ACPI_HEST_NOTIFY_NMI = 4, |
| 405 | ACPI_HEST_NOTIFY_RESERVED = 5 /* 5 and greater are reserved */ |
| 406 | }; |
| 407 | |
| 408 | /* |
| 409 | * HEST subtables |
| 410 | * |
| 411 | * From WHEA Design Document, 16 May 2007. |
| 412 | * Note: There is no subtable type 2 in this version of the document, |
| 413 | * and there are two different subtable type 3s. |
| 414 | */ |
| 415 | |
| 416 | /* 0: XPF Machine Check Exception */ |
| 417 | |
| 418 | struct acpi_hest_xpf_machine_check { |
| 419 | struct acpi_hest_header header; |
| 420 | u16 source_id; |
| 421 | u16 config_write_enable; |
| 422 | u8 flags; |
| 423 | u8 reserved1; |
| 424 | u32 records_to_pre_allocate; |
| 425 | u32 max_sections_per_record; |
| 426 | u64 global_capability_data; |
| 427 | u64 global_control_data; |
| 428 | u8 num_hardware_banks; |
| 429 | u8 reserved2[7]; |
| 430 | }; |
| 431 | |
| 432 | /* 1: XPF Corrected Machine Check */ |
| 433 | |
| 434 | struct acpi_table_hest_xpf_corrected { |
| 435 | struct acpi_hest_header header; |
| 436 | u16 source_id; |
| 437 | u16 config_write_enable; |
| 438 | u8 flags; |
| 439 | u8 enabled; |
| 440 | u32 records_to_pre_allocate; |
| 441 | u32 max_sections_per_record; |
| 442 | struct acpi_hest_notify notify; |
| 443 | u8 num_hardware_banks; |
| 444 | u8 reserved[3]; |
| 445 | }; |
| 446 | |
| 447 | /* 3: XPF Non-Maskable Interrupt */ |
| 448 | |
| 449 | struct acpi_hest_xpf_nmi { |
| 450 | struct acpi_hest_header header; |
| 451 | u16 source_id; |
| 452 | u32 reserved; |
| 453 | u32 records_to_pre_allocate; |
| 454 | u32 max_sections_per_record; |
| 455 | u32 max_raw_data_length; |
| 456 | }; |
| 457 | |
| 458 | /* 4: IPF Corrected Machine Check */ |
| 459 | |
| 460 | struct acpi_hest_ipf_corrected { |
| 461 | struct acpi_hest_header header; |
| 462 | u8 enabled; |
| 463 | u8 reserved; |
| 464 | }; |
| 465 | |
| 466 | /* 5: IPF Corrected Platform Error */ |
| 467 | |
| 468 | struct acpi_hest_ipf_corrected_platform { |
| 469 | struct acpi_hest_header header; |
| 470 | u8 enabled; |
| 471 | u8 reserved; |
| 472 | }; |
| 473 | |
| 474 | /* 6: PCI Express Root Port AER */ |
| 475 | |
| 476 | struct acpi_hest_aer_root { |
| 477 | struct acpi_hest_header header; |
| 478 | struct acpi_hest_aer_common aer; |
| 479 | u32 root_error_command; |
| 480 | }; |
| 481 | |
| 482 | /* 7: PCI Express AER (AER Endpoint) */ |
| 483 | |
| 484 | struct acpi_hest_aer { |
| 485 | struct acpi_hest_header header; |
| 486 | struct acpi_hest_aer_common aer; |
| 487 | }; |
| 488 | |
| 489 | /* 8: PCI Express/PCI-X Bridge AER */ |
| 490 | |
| 491 | struct acpi_hest_aer_bridge { |
| 492 | struct acpi_hest_header header; |
| 493 | struct acpi_hest_aer_common aer; |
| 494 | u32 secondary_uncorrectable_error_mask; |
| 495 | u32 secondary_uncorrectable_error_severity; |
| 496 | u32 secondary_advanced_capabilities; |
| 497 | }; |
| 498 | |
| 499 | /* 9: Generic Hardware Error Source */ |
| 500 | |
| 501 | struct acpi_hest_generic { |
| 502 | struct acpi_hest_header header; |
| 503 | u16 source_id; |
| 504 | u16 related_source_id; |
| 505 | u8 config_write_enable; |
| 506 | u8 enabled; |
| 507 | u32 records_to_pre_allocate; |
| 508 | u32 max_sections_per_record; |
| 509 | u32 max_raw_data_length; |
| 510 | struct acpi_generic_address error_status_address; |
| 511 | struct acpi_hest_notify notify; |
| 512 | u32 error_status_block_length; |
| 513 | }; |
Bob Moore | 970d9c9 | 2008-04-10 19:06:42 +0400 | [diff] [blame] | 514 | |
| 515 | /******************************************************************************* |
| 516 | * |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 517 | * MADT - Multiple APIC Description Table |
| 518 | * |
| 519 | ******************************************************************************/ |
| 520 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 521 | struct acpi_table_madt { |
| 522 | struct acpi_table_header header; /* Common ACPI table header */ |
| 523 | u32 address; /* Physical address of local APIC */ |
| 524 | u32 flags; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 525 | }; |
| 526 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 527 | /* Flags */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 528 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 529 | #define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 530 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 531 | /* Values for PCATCompat flag */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 532 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 533 | #define ACPI_MADT_DUAL_PIC 0 |
| 534 | #define ACPI_MADT_MULTIPLE_APIC 1 |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 535 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 536 | /* Values for subtable type in struct acpi_subtable_header */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 537 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 538 | enum acpi_madt_type { |
| 539 | ACPI_MADT_TYPE_LOCAL_APIC = 0, |
| 540 | ACPI_MADT_TYPE_IO_APIC = 1, |
| 541 | ACPI_MADT_TYPE_INTERRUPT_OVERRIDE = 2, |
| 542 | ACPI_MADT_TYPE_NMI_SOURCE = 3, |
| 543 | ACPI_MADT_TYPE_LOCAL_APIC_NMI = 4, |
| 544 | ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE = 5, |
| 545 | ACPI_MADT_TYPE_IO_SAPIC = 6, |
| 546 | ACPI_MADT_TYPE_LOCAL_SAPIC = 7, |
| 547 | ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8, |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 548 | ACPI_MADT_TYPE_LOCAL_X2APIC = 9, |
| 549 | ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10, |
| 550 | ACPI_MADT_TYPE_RESERVED = 11 /* 11 and greater are reserved */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 551 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 552 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 553 | /* |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 554 | * MADT Sub-tables, correspond to Type in struct acpi_subtable_header |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 555 | */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 556 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 557 | /* 0: Processor Local APIC */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 558 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 559 | struct acpi_madt_local_apic { |
| 560 | struct acpi_subtable_header header; |
| 561 | u8 processor_id; /* ACPI processor id */ |
| 562 | u8 id; /* Processor's local APIC id */ |
| 563 | u32 lapic_flags; |
| 564 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 565 | |
| 566 | /* 1: IO APIC */ |
| 567 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 568 | struct acpi_madt_io_apic { |
| 569 | struct acpi_subtable_header header; |
| 570 | u8 id; /* I/O APIC ID */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 571 | u8 reserved; /* Reserved - must be zero */ |
| 572 | u32 address; /* APIC physical address */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 573 | u32 global_irq_base; /* Global system interrupt where INTI lines start */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 574 | }; |
| 575 | |
| 576 | /* 2: Interrupt Override */ |
| 577 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 578 | struct acpi_madt_interrupt_override { |
| 579 | struct acpi_subtable_header header; |
| 580 | u8 bus; /* 0 - ISA */ |
| 581 | u8 source_irq; /* Interrupt source (IRQ) */ |
| 582 | u32 global_irq; /* Global system interrupt */ |
| 583 | u16 inti_flags; |
| 584 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 585 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 586 | /* 3: NMI Source */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 587 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 588 | struct acpi_madt_nmi_source { |
| 589 | struct acpi_subtable_header header; |
| 590 | u16 inti_flags; |
| 591 | u32 global_irq; /* Global system interrupt */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 592 | }; |
| 593 | |
| 594 | /* 4: Local APIC NMI */ |
| 595 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 596 | struct acpi_madt_local_apic_nmi { |
| 597 | struct acpi_subtable_header header; |
| 598 | u8 processor_id; /* ACPI processor id */ |
| 599 | u16 inti_flags; |
| 600 | u8 lint; /* LINTn to which NMI is connected */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 601 | }; |
| 602 | |
| 603 | /* 5: Address Override */ |
| 604 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 605 | struct acpi_madt_local_apic_override { |
| 606 | struct acpi_subtable_header header; |
| 607 | u16 reserved; /* Reserved, must be zero */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 608 | u64 address; /* APIC physical address */ |
| 609 | }; |
| 610 | |
| 611 | /* 6: I/O Sapic */ |
| 612 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 613 | struct acpi_madt_io_sapic { |
| 614 | struct acpi_subtable_header header; |
| 615 | u8 id; /* I/O SAPIC ID */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 616 | u8 reserved; /* Reserved, must be zero */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 617 | u32 global_irq_base; /* Global interrupt for SAPIC start */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 618 | u64 address; /* SAPIC physical address */ |
| 619 | }; |
| 620 | |
| 621 | /* 7: Local Sapic */ |
| 622 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 623 | struct acpi_madt_local_sapic { |
| 624 | struct acpi_subtable_header header; |
| 625 | u8 processor_id; /* ACPI processor id */ |
| 626 | u8 id; /* SAPIC ID */ |
| 627 | u8 eid; /* SAPIC EID */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 628 | u8 reserved[3]; /* Reserved, must be zero */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 629 | u32 lapic_flags; |
| 630 | u32 uid; /* Numeric UID - ACPI 3.0 */ |
| 631 | char uid_string[1]; /* String UID - ACPI 3.0 */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 632 | }; |
| 633 | |
| 634 | /* 8: Platform Interrupt Source */ |
| 635 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 636 | struct acpi_madt_interrupt_source { |
| 637 | struct acpi_subtable_header header; |
| 638 | u16 inti_flags; |
| 639 | u8 type; /* 1=PMI, 2=INIT, 3=corrected */ |
| 640 | u8 id; /* Processor ID */ |
| 641 | u8 eid; /* Processor EID */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 642 | u8 io_sapic_vector; /* Vector value for PMI interrupts */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 643 | u32 global_irq; /* Global system interrupt */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 644 | u32 flags; /* Interrupt Source Flags */ |
| 645 | }; |
| 646 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 647 | /* Flags field above */ |
| 648 | |
| 649 | #define ACPI_MADT_CPEI_OVERRIDE (1) |
| 650 | |
Bob Moore | eb2289b | 2009-06-24 13:42:00 +0800 | [diff] [blame] | 651 | /* 9: Processor Local X2APIC (ACPI 4.0) */ |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 652 | |
| 653 | struct acpi_madt_local_x2apic { |
| 654 | struct acpi_subtable_header header; |
| 655 | u16 reserved; /* Reserved - must be zero */ |
Suresh Siddha | 786c221 | 2009-03-30 14:05:50 -0800 | [diff] [blame] | 656 | u32 local_apic_id; /* Processor x2APIC ID */ |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 657 | u32 lapic_flags; |
Suresh Siddha | 786c221 | 2009-03-30 14:05:50 -0800 | [diff] [blame] | 658 | u32 uid; /* ACPI processor UID */ |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 659 | }; |
| 660 | |
Bob Moore | eb2289b | 2009-06-24 13:42:00 +0800 | [diff] [blame] | 661 | /* 10: Local X2APIC NMI (ACPI 4.0) */ |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 662 | |
| 663 | struct acpi_madt_local_x2apic_nmi { |
| 664 | struct acpi_subtable_header header; |
| 665 | u16 inti_flags; |
Suresh Siddha | 786c221 | 2009-03-30 14:05:50 -0800 | [diff] [blame] | 666 | u32 uid; /* ACPI processor UID */ |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 667 | u8 lint; /* LINTn to which NMI is connected */ |
| 668 | u8 reserved[3]; |
| 669 | }; |
| 670 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 671 | /* |
| 672 | * Common flags fields for MADT subtables |
| 673 | */ |
| 674 | |
| 675 | /* MADT Local APIC flags (lapic_flags) */ |
| 676 | |
| 677 | #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */ |
| 678 | |
| 679 | /* MADT MPS INTI flags (inti_flags) */ |
| 680 | |
| 681 | #define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */ |
| 682 | #define ACPI_MADT_TRIGGER_MASK (3<<2) /* 02-03: Trigger mode of APIC input signals */ |
| 683 | |
| 684 | /* Values for MPS INTI flags */ |
| 685 | |
| 686 | #define ACPI_MADT_POLARITY_CONFORMS 0 |
| 687 | #define ACPI_MADT_POLARITY_ACTIVE_HIGH 1 |
| 688 | #define ACPI_MADT_POLARITY_RESERVED 2 |
| 689 | #define ACPI_MADT_POLARITY_ACTIVE_LOW 3 |
| 690 | |
| 691 | #define ACPI_MADT_TRIGGER_CONFORMS (0) |
| 692 | #define ACPI_MADT_TRIGGER_EDGE (1<<2) |
| 693 | #define ACPI_MADT_TRIGGER_RESERVED (2<<2) |
| 694 | #define ACPI_MADT_TRIGGER_LEVEL (3<<2) |
| 695 | |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 696 | /******************************************************************************* |
| 697 | * |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 698 | * SBST - Smart Battery Specification Table |
| 699 | * |
| 700 | ******************************************************************************/ |
| 701 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 702 | struct acpi_table_sbst { |
| 703 | struct acpi_table_header header; /* Common ACPI table header */ |
| 704 | u32 warning_level; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 705 | u32 low_level; |
| 706 | u32 critical_level; |
| 707 | }; |
| 708 | |
| 709 | /******************************************************************************* |
| 710 | * |
| 711 | * SLIT - System Locality Distance Information Table |
| 712 | * |
| 713 | ******************************************************************************/ |
| 714 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 715 | struct acpi_table_slit { |
| 716 | struct acpi_table_header header; /* Common ACPI table header */ |
| 717 | u64 locality_count; |
| 718 | u8 entry[1]; /* Real size = localities^2 */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 719 | }; |
| 720 | |
| 721 | /******************************************************************************* |
| 722 | * |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 723 | * SRAT - System Resource Affinity Table |
| 724 | * |
| 725 | ******************************************************************************/ |
| 726 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 727 | struct acpi_table_srat { |
| 728 | struct acpi_table_header header; /* Common ACPI table header */ |
| 729 | u32 table_revision; /* Must be value '1' */ |
| 730 | u64 reserved; /* Reserved, must be zero */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 731 | }; |
| 732 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 733 | /* Values for subtable type in struct acpi_subtable_header */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 734 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 735 | enum acpi_srat_type { |
| 736 | ACPI_SRAT_TYPE_CPU_AFFINITY = 0, |
| 737 | ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1, |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 738 | ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2, |
| 739 | ACPI_SRAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 740 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 741 | |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 742 | /* |
| 743 | * SRAT Sub-tables, correspond to Type in struct acpi_subtable_header |
| 744 | */ |
| 745 | |
| 746 | /* 0: Processor Local APIC/SAPIC Affinity */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 747 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 748 | struct acpi_srat_cpu_affinity { |
| 749 | struct acpi_subtable_header header; |
| 750 | u8 proximity_domain_lo; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 751 | u8 apic_id; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 752 | u32 flags; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 753 | u8 local_sapic_eid; |
| 754 | u8 proximity_domain_hi[3]; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 755 | u32 reserved; /* Reserved, must be zero */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 756 | }; |
| 757 | |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 758 | /* 1: Memory Affinity */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 759 | |
| 760 | struct acpi_srat_mem_affinity { |
| 761 | struct acpi_subtable_header header; |
| 762 | u32 proximity_domain; |
| 763 | u16 reserved; /* Reserved, must be zero */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 764 | u64 base_address; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 765 | u64 length; |
Bob Moore | 19d0cfe | 2008-06-10 15:54:40 +0800 | [diff] [blame] | 766 | u32 reserved1; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 767 | u32 flags; |
Bob Moore | 19d0cfe | 2008-06-10 15:54:40 +0800 | [diff] [blame] | 768 | u64 reserved2; /* Reserved, must be zero */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 769 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 770 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 771 | /* Flags */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 772 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 773 | #define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */ |
| 774 | #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */ |
| 775 | #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] | 776 | |
Bob Moore | eb2289b | 2009-06-24 13:42:00 +0800 | [diff] [blame] | 777 | /* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */ |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 778 | |
| 779 | struct acpi_srat_x2apic_cpu_affinity { |
| 780 | struct acpi_subtable_header header; |
| 781 | u16 reserved; /* Reserved, must be zero */ |
| 782 | u32 proximity_domain; |
| 783 | u32 apic_id; |
| 784 | u32 flags; |
Bob Moore | eb2289b | 2009-06-24 13:42:00 +0800 | [diff] [blame] | 785 | u32 clock_domain; |
| 786 | u32 reserved2; |
Bob Moore | 1d7cc03 | 2008-08-04 10:42:47 +0800 | [diff] [blame] | 787 | }; |
| 788 | |
| 789 | /* Flags for struct acpi_srat_cpu_affinity and struct acpi_srat_x2apic_cpu_affinity */ |
| 790 | |
| 791 | #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */ |
| 792 | |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 793 | /* Reset to default packing */ |
| 794 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 795 | #pragma pack() |
| 796 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 797 | #endif /* __ACTBL1_H__ */ |