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 | 6c9deb7 | 2007-02-02 19:48:24 +0300 | [diff] [blame] | 8 | * Copyright (C) 2000 - 2007, R. Byron Moore |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | * All rights reserved. |
| 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without |
| 12 | * modification, are permitted provided that the following conditions |
| 13 | * are met: |
| 14 | * 1. Redistributions of source code must retain the above copyright |
| 15 | * notice, this list of conditions, and the following disclaimer, |
| 16 | * without modification. |
| 17 | * 2. Redistributions in binary form must reproduce at minimum a disclaimer |
| 18 | * substantially similar to the "NO WARRANTY" disclaimer below |
| 19 | * ("Disclaimer") and any redistribution must be conditioned upon |
| 20 | * including a substantially similar Disclaimer requirement for further |
| 21 | * binary redistribution. |
| 22 | * 3. Neither the names of the above-listed copyright holders nor the names |
| 23 | * of any contributors may be used to endorse or promote products derived |
| 24 | * from this software without specific prior written permission. |
| 25 | * |
| 26 | * Alternatively, this software may be distributed under the terms of the |
| 27 | * GNU General Public License ("GPL") version 2 as published by the Free |
| 28 | * Software Foundation. |
| 29 | * |
| 30 | * NO WARRANTY |
| 31 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 32 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 33 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR |
| 34 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 35 | * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 36 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 37 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 38 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
| 39 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
| 40 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 41 | * POSSIBILITY OF SUCH DAMAGES. |
| 42 | */ |
| 43 | |
| 44 | #ifndef __ACTBL1_H__ |
| 45 | #define __ACTBL1_H__ |
| 46 | |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 47 | /******************************************************************************* |
| 48 | * |
| 49 | * Additional ACPI Tables |
| 50 | * |
| 51 | * These tables are not consumed directly by the ACPICA subsystem, but are |
| 52 | * included here to support device drivers and the AML disassembler. |
| 53 | * |
| 54 | ******************************************************************************/ |
| 55 | |
| 56 | /* |
| 57 | * Values for description table header signatures. Useful because they make |
| 58 | * it more difficult to inadvertently type in the wrong signature. |
| 59 | */ |
| 60 | #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */ |
| 61 | #define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */ |
| 62 | #define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */ |
| 63 | #define ACPI_SIG_DBGP "DBGP" /* Debug Port table */ |
Bob Moore | 2502fff | 2007-02-02 19:48:19 +0300 | [diff] [blame] | 64 | #define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 65 | #define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */ |
| 66 | #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */ |
| 67 | #define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */ |
| 68 | #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ |
| 69 | #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */ |
| 70 | #define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */ |
| 71 | #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */ |
| 72 | #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */ |
| 73 | #define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */ |
| 74 | #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */ |
| 75 | #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */ |
| 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 | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 84 | * Note about bitfields: The u8 type is used for bitfields in ACPI tables. |
| 85 | * This is the only type that is even remotely portable. Anything else is not |
| 86 | * portable, so do not use any other bitfield types. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 87 | */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 88 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 89 | /* Common Sub-table header (used in MADT, SRAT, etc.) */ |
| 90 | |
| 91 | struct acpi_subtable_header { |
| 92 | u8 type; |
| 93 | u8 length; |
| 94 | }; |
| 95 | |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 96 | /******************************************************************************* |
| 97 | * |
| 98 | * ASF - Alert Standard Format table (Signature "ASF!") |
| 99 | * |
Bob Moore | 694b0b2 | 2007-02-02 19:48:20 +0300 | [diff] [blame] | 100 | * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003 |
| 101 | * |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 102 | ******************************************************************************/ |
| 103 | |
| 104 | struct acpi_table_asf { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 105 | struct acpi_table_header header; /* Common ACPI table header */ |
| 106 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 107 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 108 | /* ASF subtable header */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 109 | |
| 110 | struct acpi_asf_header { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 111 | u8 type; |
| 112 | u8 reserved; |
| 113 | u16 length; |
| 114 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 115 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 116 | /* Values for Type field above */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 117 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 118 | enum acpi_asf_type { |
| 119 | ACPI_ASF_TYPE_INFO = 0, |
| 120 | ACPI_ASF_TYPE_ALERT = 1, |
| 121 | ACPI_ASF_TYPE_CONTROL = 2, |
| 122 | ACPI_ASF_TYPE_BOOT = 3, |
| 123 | ACPI_ASF_TYPE_ADDRESS = 4, |
| 124 | ACPI_ASF_TYPE_RESERVED = 5 |
| 125 | }; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 126 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 127 | /* |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 128 | * ASF subtables |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 129 | */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 130 | |
| 131 | /* 0: ASF Information */ |
| 132 | |
| 133 | struct acpi_asf_info { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 134 | struct acpi_asf_header header; |
| 135 | u8 min_reset_value; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 136 | u8 min_poll_interval; |
| 137 | u16 system_id; |
| 138 | u32 mfg_id; |
| 139 | u8 flags; |
| 140 | u8 reserved2[3]; |
| 141 | }; |
| 142 | |
| 143 | /* 1: ASF Alerts */ |
| 144 | |
| 145 | struct acpi_asf_alert { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 146 | struct acpi_asf_header header; |
| 147 | u8 assert_mask; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 148 | u8 deassert_mask; |
| 149 | u8 alerts; |
| 150 | u8 data_length; |
Bob Moore | 775d85b | 2007-02-02 19:48:20 +0300 | [diff] [blame] | 151 | }; |
| 152 | |
| 153 | struct acpi_asf_alert_data { |
| 154 | u8 address; |
| 155 | u8 command; |
| 156 | u8 mask; |
| 157 | u8 value; |
| 158 | u8 sensor_type; |
| 159 | u8 type; |
| 160 | u8 offset; |
| 161 | u8 source_type; |
| 162 | u8 severity; |
| 163 | u8 sensor_number; |
| 164 | u8 entity; |
| 165 | u8 instance; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 166 | }; |
| 167 | |
| 168 | /* 2: ASF Remote Control */ |
| 169 | |
| 170 | struct acpi_asf_remote { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 171 | struct acpi_asf_header header; |
| 172 | u8 controls; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 173 | u8 data_length; |
| 174 | u16 reserved2; |
Bob Moore | 775d85b | 2007-02-02 19:48:20 +0300 | [diff] [blame] | 175 | }; |
| 176 | |
| 177 | struct acpi_asf_control_data { |
| 178 | u8 function; |
| 179 | u8 address; |
| 180 | u8 command; |
| 181 | u8 value; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 182 | }; |
| 183 | |
| 184 | /* 3: ASF RMCP Boot Options */ |
| 185 | |
| 186 | struct acpi_asf_rmcp { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 187 | struct acpi_asf_header header; |
| 188 | u8 capabilities[7]; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 189 | u8 completion_code; |
| 190 | u32 enterprise_id; |
| 191 | u8 command; |
| 192 | u16 parameter; |
| 193 | u16 boot_options; |
| 194 | u16 oem_parameters; |
| 195 | }; |
| 196 | |
| 197 | /* 4: ASF Address */ |
| 198 | |
| 199 | struct acpi_asf_address { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 200 | struct acpi_asf_header header; |
| 201 | u8 eprom_address; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 202 | u8 devices; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 203 | }; |
| 204 | |
| 205 | /******************************************************************************* |
| 206 | * |
| 207 | * BOOT - Simple Boot Flag Table |
| 208 | * |
| 209 | ******************************************************************************/ |
| 210 | |
| 211 | struct acpi_table_boot { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 212 | struct acpi_table_header header; /* Common ACPI table header */ |
| 213 | u8 cmos_index; /* Index in CMOS RAM for the boot register */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 214 | u8 reserved[3]; |
| 215 | }; |
| 216 | |
| 217 | /******************************************************************************* |
| 218 | * |
| 219 | * CPEP - Corrected Platform Error Polling table |
| 220 | * |
| 221 | ******************************************************************************/ |
| 222 | |
| 223 | struct acpi_table_cpep { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 224 | struct acpi_table_header header; /* Common ACPI table header */ |
| 225 | u64 reserved; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 226 | }; |
| 227 | |
| 228 | /* Subtable */ |
| 229 | |
| 230 | struct acpi_cpep_polling { |
| 231 | u8 type; |
| 232 | u8 length; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 233 | u8 id; /* Processor ID */ |
| 234 | u8 eid; /* Processor EID */ |
| 235 | u32 interval; /* Polling interval (msec) */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 236 | }; |
| 237 | |
| 238 | /******************************************************************************* |
| 239 | * |
| 240 | * DBGP - Debug Port table |
| 241 | * |
| 242 | ******************************************************************************/ |
| 243 | |
| 244 | struct acpi_table_dbgp { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 245 | struct acpi_table_header header; /* Common ACPI table header */ |
| 246 | u8 type; /* 0=full 16550, 1=subset of 16550 */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 247 | u8 reserved[3]; |
| 248 | struct acpi_generic_address debug_port; |
| 249 | }; |
| 250 | |
| 251 | /******************************************************************************* |
| 252 | * |
Bob Moore | 2502fff | 2007-02-02 19:48:19 +0300 | [diff] [blame] | 253 | * DMAR - DMA Remapping table |
| 254 | * |
| 255 | ******************************************************************************/ |
| 256 | |
| 257 | struct acpi_table_dmar { |
| 258 | struct acpi_table_header header; /* Common ACPI table header */ |
| 259 | u8 width; /* Host Address Width */ |
| 260 | u8 reserved[11]; |
| 261 | }; |
| 262 | |
| 263 | /* DMAR subtable header */ |
| 264 | |
| 265 | struct acpi_dmar_header { |
| 266 | u16 type; |
| 267 | u16 length; |
| 268 | u8 flags; |
| 269 | u8 reserved[3]; |
| 270 | }; |
| 271 | |
| 272 | /* Values for subtable type in struct acpi_dmar_header */ |
| 273 | |
| 274 | enum acpi_dmar_type { |
| 275 | ACPI_DMAR_TYPE_HARDWARE_UNIT = 0, |
| 276 | ACPI_DMAR_TYPE_RESERVED_MEMORY = 1, |
| 277 | ACPI_DMAR_TYPE_RESERVED = 2 /* 2 and greater are reserved */ |
| 278 | }; |
| 279 | |
| 280 | struct acpi_dmar_device_scope { |
| 281 | u8 entry_type; |
| 282 | u8 length; |
| 283 | u8 segment; |
| 284 | u8 bus; |
| 285 | }; |
| 286 | |
| 287 | /* Values for entry_type in struct acpi_dmar_device_scope */ |
| 288 | |
| 289 | enum acpi_dmar_scope_type { |
| 290 | ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0, |
| 291 | ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1, |
| 292 | ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2, |
| 293 | ACPI_DMAR_SCOPE_TYPE_RESERVED = 3 /* 3 and greater are reserved */ |
| 294 | }; |
| 295 | |
| 296 | /* |
| 297 | * DMAR Sub-tables, correspond to Type in struct acpi_dmar_header |
| 298 | */ |
| 299 | |
| 300 | /* 0: Hardware Unit Definition */ |
| 301 | |
| 302 | struct acpi_dmar_hardware_unit { |
| 303 | struct acpi_dmar_header header; |
| 304 | u64 address; /* Register Base Address */ |
| 305 | }; |
| 306 | |
| 307 | /* Flags */ |
| 308 | |
| 309 | #define ACPI_DMAR_INCLUDE_ALL (1) |
| 310 | |
| 311 | /* 1: Reserved Memory Defininition */ |
| 312 | |
| 313 | struct acpi_dmar_reserved_memory { |
| 314 | struct acpi_dmar_header header; |
| 315 | u64 address; /* 4_k aligned base address */ |
| 316 | u64 end_address; /* 4_k aligned limit address */ |
| 317 | }; |
| 318 | |
| 319 | /* Flags */ |
| 320 | |
| 321 | #define ACPI_DMAR_ALLOW_ALL (1) |
| 322 | |
| 323 | /******************************************************************************* |
| 324 | * |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 325 | * ECDT - Embedded Controller Boot Resources Table |
| 326 | * |
| 327 | ******************************************************************************/ |
| 328 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 329 | struct acpi_table_ecdt { |
| 330 | struct acpi_table_header header; /* Common ACPI table header */ |
| 331 | struct acpi_generic_address control; /* Address of EC command/status register */ |
| 332 | struct acpi_generic_address data; /* Address of EC data register */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 333 | u32 uid; /* Unique ID - must be same as the EC _UID method */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 334 | u8 gpe; /* The GPE for the EC */ |
| 335 | u8 id[1]; /* Full namepath of the EC in the ACPI namespace */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 336 | }; |
| 337 | |
| 338 | /******************************************************************************* |
| 339 | * |
| 340 | * HPET - High Precision Event Timer table |
| 341 | * |
| 342 | ******************************************************************************/ |
| 343 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 344 | struct acpi_table_hpet { |
| 345 | struct acpi_table_header header; /* Common ACPI table header */ |
| 346 | u32 id; /* Hardware ID of event timer block */ |
| 347 | struct acpi_generic_address address; /* Address of event timer block */ |
| 348 | u8 sequence; /* HPET sequence number */ |
| 349 | u16 minimum_tick; /* Main counter min tick, periodic mode */ |
| 350 | u8 flags; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 351 | }; |
| 352 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 353 | /*! Flags */ |
| 354 | |
| 355 | #define ACPI_HPET_PAGE_PROTECT (1) /* 00: No page protection */ |
| 356 | #define ACPI_HPET_PAGE_PROTECT_4 (1<<1) /* 01: 4KB page protected */ |
| 357 | #define ACPI_HPET_PAGE_PROTECT_64 (1<<2) /* 02: 64KB page protected */ |
| 358 | |
| 359 | /*! [End] no source code translation !*/ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 360 | |
| 361 | /******************************************************************************* |
| 362 | * |
| 363 | * MADT - Multiple APIC Description Table |
| 364 | * |
| 365 | ******************************************************************************/ |
| 366 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 367 | struct acpi_table_madt { |
| 368 | struct acpi_table_header header; /* Common ACPI table header */ |
| 369 | u32 address; /* Physical address of local APIC */ |
| 370 | u32 flags; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 371 | }; |
| 372 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 373 | /* Flags */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 374 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 375 | #define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 376 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 377 | /* Values for PCATCompat flag */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 378 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 379 | #define ACPI_MADT_DUAL_PIC 0 |
| 380 | #define ACPI_MADT_MULTIPLE_APIC 1 |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 381 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 382 | /* Values for subtable type in struct acpi_subtable_header */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 383 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 384 | enum acpi_madt_type { |
| 385 | ACPI_MADT_TYPE_LOCAL_APIC = 0, |
| 386 | ACPI_MADT_TYPE_IO_APIC = 1, |
| 387 | ACPI_MADT_TYPE_INTERRUPT_OVERRIDE = 2, |
| 388 | ACPI_MADT_TYPE_NMI_SOURCE = 3, |
| 389 | ACPI_MADT_TYPE_LOCAL_APIC_NMI = 4, |
| 390 | ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE = 5, |
| 391 | ACPI_MADT_TYPE_IO_SAPIC = 6, |
| 392 | ACPI_MADT_TYPE_LOCAL_SAPIC = 7, |
| 393 | ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8, |
| 394 | ACPI_MADT_TYPE_RESERVED = 9 /* 9 and greater are reserved */ |
| 395 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 396 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 397 | /* |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 398 | * MADT Sub-tables, correspond to Type in struct acpi_subtable_header |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 399 | */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 400 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 401 | /* 0: Processor Local APIC */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 402 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 403 | struct acpi_madt_local_apic { |
| 404 | struct acpi_subtable_header header; |
| 405 | u8 processor_id; /* ACPI processor id */ |
| 406 | u8 id; /* Processor's local APIC id */ |
| 407 | u32 lapic_flags; |
| 408 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 409 | |
| 410 | /* 1: IO APIC */ |
| 411 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 412 | struct acpi_madt_io_apic { |
| 413 | struct acpi_subtable_header header; |
| 414 | u8 id; /* I/O APIC ID */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 415 | u8 reserved; /* Reserved - must be zero */ |
| 416 | u32 address; /* APIC physical address */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 417 | u32 global_irq_base; /* Global system interrupt where INTI lines start */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 418 | }; |
| 419 | |
| 420 | /* 2: Interrupt Override */ |
| 421 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 422 | struct acpi_madt_interrupt_override { |
| 423 | struct acpi_subtable_header header; |
| 424 | u8 bus; /* 0 - ISA */ |
| 425 | u8 source_irq; /* Interrupt source (IRQ) */ |
| 426 | u32 global_irq; /* Global system interrupt */ |
| 427 | u16 inti_flags; |
| 428 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 429 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 430 | /* 3: NMI Source */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 431 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 432 | struct acpi_madt_nmi_source { |
| 433 | struct acpi_subtable_header header; |
| 434 | u16 inti_flags; |
| 435 | u32 global_irq; /* Global system interrupt */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 436 | }; |
| 437 | |
| 438 | /* 4: Local APIC NMI */ |
| 439 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 440 | struct acpi_madt_local_apic_nmi { |
| 441 | struct acpi_subtable_header header; |
| 442 | u8 processor_id; /* ACPI processor id */ |
| 443 | u16 inti_flags; |
| 444 | u8 lint; /* LINTn to which NMI is connected */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 445 | }; |
| 446 | |
| 447 | /* 5: Address Override */ |
| 448 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 449 | struct acpi_madt_local_apic_override { |
| 450 | struct acpi_subtable_header header; |
| 451 | u16 reserved; /* Reserved, must be zero */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 452 | u64 address; /* APIC physical address */ |
| 453 | }; |
| 454 | |
| 455 | /* 6: I/O Sapic */ |
| 456 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 457 | struct acpi_madt_io_sapic { |
| 458 | struct acpi_subtable_header header; |
| 459 | u8 id; /* I/O SAPIC ID */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 460 | u8 reserved; /* Reserved, must be zero */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 461 | u32 global_irq_base; /* Global interrupt for SAPIC start */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 462 | u64 address; /* SAPIC physical address */ |
| 463 | }; |
| 464 | |
| 465 | /* 7: Local Sapic */ |
| 466 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 467 | struct acpi_madt_local_sapic { |
| 468 | struct acpi_subtable_header header; |
| 469 | u8 processor_id; /* ACPI processor id */ |
| 470 | u8 id; /* SAPIC ID */ |
| 471 | u8 eid; /* SAPIC EID */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 472 | u8 reserved[3]; /* Reserved, must be zero */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 473 | u32 lapic_flags; |
| 474 | u32 uid; /* Numeric UID - ACPI 3.0 */ |
| 475 | char uid_string[1]; /* String UID - ACPI 3.0 */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 476 | }; |
| 477 | |
| 478 | /* 8: Platform Interrupt Source */ |
| 479 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 480 | struct acpi_madt_interrupt_source { |
| 481 | struct acpi_subtable_header header; |
| 482 | u16 inti_flags; |
| 483 | u8 type; /* 1=PMI, 2=INIT, 3=corrected */ |
| 484 | u8 id; /* Processor ID */ |
| 485 | u8 eid; /* Processor EID */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 486 | u8 io_sapic_vector; /* Vector value for PMI interrupts */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 487 | u32 global_irq; /* Global system interrupt */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 488 | u32 flags; /* Interrupt Source Flags */ |
| 489 | }; |
| 490 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 491 | /* Flags field above */ |
| 492 | |
| 493 | #define ACPI_MADT_CPEI_OVERRIDE (1) |
| 494 | |
| 495 | /* |
| 496 | * Common flags fields for MADT subtables |
| 497 | */ |
| 498 | |
| 499 | /* MADT Local APIC flags (lapic_flags) */ |
| 500 | |
| 501 | #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */ |
| 502 | |
| 503 | /* MADT MPS INTI flags (inti_flags) */ |
| 504 | |
| 505 | #define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */ |
| 506 | #define ACPI_MADT_TRIGGER_MASK (3<<2) /* 02-03: Trigger mode of APIC input signals */ |
| 507 | |
| 508 | /* Values for MPS INTI flags */ |
| 509 | |
| 510 | #define ACPI_MADT_POLARITY_CONFORMS 0 |
| 511 | #define ACPI_MADT_POLARITY_ACTIVE_HIGH 1 |
| 512 | #define ACPI_MADT_POLARITY_RESERVED 2 |
| 513 | #define ACPI_MADT_POLARITY_ACTIVE_LOW 3 |
| 514 | |
| 515 | #define ACPI_MADT_TRIGGER_CONFORMS (0) |
| 516 | #define ACPI_MADT_TRIGGER_EDGE (1<<2) |
| 517 | #define ACPI_MADT_TRIGGER_RESERVED (2<<2) |
| 518 | #define ACPI_MADT_TRIGGER_LEVEL (3<<2) |
| 519 | |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 520 | /******************************************************************************* |
| 521 | * |
| 522 | * MCFG - PCI Memory Mapped Configuration table and sub-table |
| 523 | * |
| 524 | ******************************************************************************/ |
| 525 | |
| 526 | struct acpi_table_mcfg { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 527 | struct acpi_table_header header; /* Common ACPI table header */ |
| 528 | u8 reserved[8]; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 529 | }; |
| 530 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 531 | /* Subtable */ |
| 532 | |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 533 | struct acpi_mcfg_allocation { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 534 | u64 address; /* Base address, processor-relative */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 535 | u16 pci_segment; /* PCI segment group number */ |
| 536 | u8 start_bus_number; /* Starting PCI Bus number */ |
| 537 | u8 end_bus_number; /* Final PCI Bus number */ |
| 538 | u32 reserved; |
| 539 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 540 | |
| 541 | /******************************************************************************* |
| 542 | * |
| 543 | * SBST - Smart Battery Specification Table |
| 544 | * |
| 545 | ******************************************************************************/ |
| 546 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 547 | struct acpi_table_sbst { |
| 548 | struct acpi_table_header header; /* Common ACPI table header */ |
| 549 | u32 warning_level; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 550 | u32 low_level; |
| 551 | u32 critical_level; |
| 552 | }; |
| 553 | |
| 554 | /******************************************************************************* |
| 555 | * |
| 556 | * SLIT - System Locality Distance Information Table |
| 557 | * |
| 558 | ******************************************************************************/ |
| 559 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 560 | struct acpi_table_slit { |
| 561 | struct acpi_table_header header; /* Common ACPI table header */ |
| 562 | u64 locality_count; |
| 563 | u8 entry[1]; /* Real size = localities^2 */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 564 | }; |
| 565 | |
| 566 | /******************************************************************************* |
| 567 | * |
| 568 | * SPCR - Serial Port Console Redirection table |
| 569 | * |
| 570 | ******************************************************************************/ |
| 571 | |
| 572 | struct acpi_table_spcr { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 573 | struct acpi_table_header header; /* Common ACPI table header */ |
| 574 | u8 interface_type; /* 0=full 16550, 1=subset of 16550 */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 575 | u8 reserved[3]; |
| 576 | struct acpi_generic_address serial_port; |
| 577 | u8 interrupt_type; |
| 578 | u8 pc_interrupt; |
| 579 | u32 interrupt; |
| 580 | u8 baud_rate; |
| 581 | u8 parity; |
| 582 | u8 stop_bits; |
| 583 | u8 flow_control; |
| 584 | u8 terminal_type; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 585 | u8 reserved1; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 586 | u16 pci_device_id; |
| 587 | u16 pci_vendor_id; |
| 588 | u8 pci_bus; |
| 589 | u8 pci_device; |
| 590 | u8 pci_function; |
| 591 | u32 pci_flags; |
| 592 | u8 pci_segment; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 593 | u32 reserved2; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 594 | }; |
| 595 | |
| 596 | /******************************************************************************* |
| 597 | * |
| 598 | * SPMI - Server Platform Management Interface table |
| 599 | * |
| 600 | ******************************************************************************/ |
| 601 | |
| 602 | struct acpi_table_spmi { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 603 | struct acpi_table_header header; /* Common ACPI table header */ |
| 604 | u8 reserved; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 605 | u8 interface_type; |
| 606 | u16 spec_revision; /* Version of IPMI */ |
| 607 | u8 interrupt_type; |
| 608 | u8 gpe_number; /* GPE assigned */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 609 | u8 reserved1; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 610 | u8 pci_device_flag; |
| 611 | u32 interrupt; |
| 612 | struct acpi_generic_address ipmi_register; |
| 613 | u8 pci_segment; |
| 614 | u8 pci_bus; |
| 615 | u8 pci_device; |
| 616 | u8 pci_function; |
| 617 | }; |
| 618 | |
| 619 | /******************************************************************************* |
| 620 | * |
| 621 | * SRAT - System Resource Affinity Table |
| 622 | * |
| 623 | ******************************************************************************/ |
| 624 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 625 | struct acpi_table_srat { |
| 626 | struct acpi_table_header header; /* Common ACPI table header */ |
| 627 | u32 table_revision; /* Must be value '1' */ |
| 628 | u64 reserved; /* Reserved, must be zero */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 629 | }; |
| 630 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 631 | /* Values for subtable type in struct acpi_subtable_header */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 632 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 633 | enum acpi_srat_type { |
| 634 | ACPI_SRAT_TYPE_CPU_AFFINITY = 0, |
| 635 | ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1, |
| 636 | ACPI_SRAT_TYPE_RESERVED = 2 |
| 637 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 638 | |
| 639 | /* SRAT sub-tables */ |
| 640 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 641 | struct acpi_srat_cpu_affinity { |
| 642 | struct acpi_subtable_header header; |
| 643 | u8 proximity_domain_lo; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 644 | u8 apic_id; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 645 | u32 flags; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 646 | u8 local_sapic_eid; |
| 647 | u8 proximity_domain_hi[3]; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 648 | u32 reserved; /* Reserved, must be zero */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 649 | }; |
| 650 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 651 | /* Flags */ |
| 652 | |
| 653 | #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */ |
| 654 | |
| 655 | struct acpi_srat_mem_affinity { |
| 656 | struct acpi_subtable_header header; |
| 657 | u32 proximity_domain; |
| 658 | u16 reserved; /* Reserved, must be zero */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 659 | u64 base_address; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 660 | u64 length; |
| 661 | u32 memory_type; /* See acpi_address_range_id */ |
| 662 | u32 flags; |
| 663 | u64 reserved1; /* Reserved, must be zero */ |
| 664 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 665 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 666 | /* Flags */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 667 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 668 | #define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */ |
| 669 | #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */ |
| 670 | #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] | 671 | |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 672 | /******************************************************************************* |
| 673 | * |
| 674 | * TCPA - Trusted Computing Platform Alliance table |
| 675 | * |
| 676 | ******************************************************************************/ |
| 677 | |
| 678 | struct acpi_table_tcpa { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 679 | struct acpi_table_header header; /* Common ACPI table header */ |
| 680 | u16 reserved; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 681 | u32 max_log_length; /* Maximum length for the event log area */ |
| 682 | u64 log_address; /* Address of the event log area */ |
| 683 | }; |
| 684 | |
| 685 | /******************************************************************************* |
| 686 | * |
| 687 | * WDRT - Watchdog Resource Table |
| 688 | * |
| 689 | ******************************************************************************/ |
| 690 | |
| 691 | struct acpi_table_wdrt { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 692 | struct acpi_table_header header; /* Common ACPI table header */ |
| 693 | u32 header_length; /* Watchdog Header Length */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 694 | u8 pci_segment; /* PCI Segment number */ |
| 695 | u8 pci_bus; /* PCI Bus number */ |
| 696 | u8 pci_device; /* PCI Device number */ |
| 697 | u8 pci_function; /* PCI Function number */ |
| 698 | u32 timer_period; /* Period of one timer count (msec) */ |
| 699 | u32 max_count; /* Maximum counter value supported */ |
| 700 | u32 min_count; /* Minimum counter value */ |
| 701 | u8 flags; |
| 702 | u8 reserved[3]; |
| 703 | u32 entries; /* Number of watchdog entries that follow */ |
| 704 | }; |
| 705 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 706 | /* Flags */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 707 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 708 | #define ACPI_WDRT_TIMER_ENABLED (1) /* 00: Timer enabled */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 709 | |
| 710 | /* Reset to default packing */ |
| 711 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 712 | #pragma pack() |
| 713 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 714 | #endif /* __ACTBL1_H__ */ |