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 | 4a90c7e | 2006-01-13 16:22:00 -0500 | [diff] [blame] | 8 | * Copyright (C) 2000 - 2006, 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; |
| 151 | u8 array[1]; |
| 152 | }; |
| 153 | |
| 154 | /* 2: ASF Remote Control */ |
| 155 | |
| 156 | struct acpi_asf_remote { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 157 | struct acpi_asf_header header; |
| 158 | u8 controls; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 159 | u8 data_length; |
| 160 | u16 reserved2; |
| 161 | u8 array[1]; |
| 162 | }; |
| 163 | |
| 164 | /* 3: ASF RMCP Boot Options */ |
| 165 | |
| 166 | struct acpi_asf_rmcp { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 167 | struct acpi_asf_header header; |
| 168 | u8 capabilities[7]; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 169 | u8 completion_code; |
| 170 | u32 enterprise_id; |
| 171 | u8 command; |
| 172 | u16 parameter; |
| 173 | u16 boot_options; |
| 174 | u16 oem_parameters; |
| 175 | }; |
| 176 | |
| 177 | /* 4: ASF Address */ |
| 178 | |
| 179 | struct acpi_asf_address { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 180 | struct acpi_asf_header header; |
| 181 | u8 eprom_address; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 182 | u8 devices; |
| 183 | u8 smbus_addresses[1]; |
| 184 | }; |
| 185 | |
| 186 | /******************************************************************************* |
| 187 | * |
| 188 | * BOOT - Simple Boot Flag Table |
| 189 | * |
| 190 | ******************************************************************************/ |
| 191 | |
| 192 | struct acpi_table_boot { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 193 | struct acpi_table_header header; /* Common ACPI table header */ |
| 194 | u8 cmos_index; /* Index in CMOS RAM for the boot register */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 195 | u8 reserved[3]; |
| 196 | }; |
| 197 | |
| 198 | /******************************************************************************* |
| 199 | * |
| 200 | * CPEP - Corrected Platform Error Polling table |
| 201 | * |
| 202 | ******************************************************************************/ |
| 203 | |
| 204 | struct acpi_table_cpep { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 205 | struct acpi_table_header header; /* Common ACPI table header */ |
| 206 | u64 reserved; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 207 | }; |
| 208 | |
| 209 | /* Subtable */ |
| 210 | |
| 211 | struct acpi_cpep_polling { |
| 212 | u8 type; |
| 213 | u8 length; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 214 | u8 id; /* Processor ID */ |
| 215 | u8 eid; /* Processor EID */ |
| 216 | u32 interval; /* Polling interval (msec) */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 217 | }; |
| 218 | |
| 219 | /******************************************************************************* |
| 220 | * |
| 221 | * DBGP - Debug Port table |
| 222 | * |
| 223 | ******************************************************************************/ |
| 224 | |
| 225 | struct acpi_table_dbgp { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 226 | struct acpi_table_header header; /* Common ACPI table header */ |
| 227 | u8 type; /* 0=full 16550, 1=subset of 16550 */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 228 | u8 reserved[3]; |
| 229 | struct acpi_generic_address debug_port; |
| 230 | }; |
| 231 | |
| 232 | /******************************************************************************* |
| 233 | * |
Bob Moore | 2502fff | 2007-02-02 19:48:19 +0300 | [diff] [blame] | 234 | * DMAR - DMA Remapping table |
| 235 | * |
| 236 | ******************************************************************************/ |
| 237 | |
| 238 | struct acpi_table_dmar { |
| 239 | struct acpi_table_header header; /* Common ACPI table header */ |
| 240 | u8 width; /* Host Address Width */ |
| 241 | u8 reserved[11]; |
| 242 | }; |
| 243 | |
| 244 | /* DMAR subtable header */ |
| 245 | |
| 246 | struct acpi_dmar_header { |
| 247 | u16 type; |
| 248 | u16 length; |
| 249 | u8 flags; |
| 250 | u8 reserved[3]; |
| 251 | }; |
| 252 | |
| 253 | /* Values for subtable type in struct acpi_dmar_header */ |
| 254 | |
| 255 | enum acpi_dmar_type { |
| 256 | ACPI_DMAR_TYPE_HARDWARE_UNIT = 0, |
| 257 | ACPI_DMAR_TYPE_RESERVED_MEMORY = 1, |
| 258 | ACPI_DMAR_TYPE_RESERVED = 2 /* 2 and greater are reserved */ |
| 259 | }; |
| 260 | |
| 261 | struct acpi_dmar_device_scope { |
| 262 | u8 entry_type; |
| 263 | u8 length; |
| 264 | u8 segment; |
| 265 | u8 bus; |
| 266 | }; |
| 267 | |
| 268 | /* Values for entry_type in struct acpi_dmar_device_scope */ |
| 269 | |
| 270 | enum acpi_dmar_scope_type { |
| 271 | ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0, |
| 272 | ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1, |
| 273 | ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2, |
| 274 | ACPI_DMAR_SCOPE_TYPE_RESERVED = 3 /* 3 and greater are reserved */ |
| 275 | }; |
| 276 | |
| 277 | /* |
| 278 | * DMAR Sub-tables, correspond to Type in struct acpi_dmar_header |
| 279 | */ |
| 280 | |
| 281 | /* 0: Hardware Unit Definition */ |
| 282 | |
| 283 | struct acpi_dmar_hardware_unit { |
| 284 | struct acpi_dmar_header header; |
| 285 | u64 address; /* Register Base Address */ |
| 286 | }; |
| 287 | |
| 288 | /* Flags */ |
| 289 | |
| 290 | #define ACPI_DMAR_INCLUDE_ALL (1) |
| 291 | |
| 292 | /* 1: Reserved Memory Defininition */ |
| 293 | |
| 294 | struct acpi_dmar_reserved_memory { |
| 295 | struct acpi_dmar_header header; |
| 296 | u64 address; /* 4_k aligned base address */ |
| 297 | u64 end_address; /* 4_k aligned limit address */ |
| 298 | }; |
| 299 | |
| 300 | /* Flags */ |
| 301 | |
| 302 | #define ACPI_DMAR_ALLOW_ALL (1) |
| 303 | |
| 304 | /******************************************************************************* |
| 305 | * |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 306 | * ECDT - Embedded Controller Boot Resources Table |
| 307 | * |
| 308 | ******************************************************************************/ |
| 309 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 310 | struct acpi_table_ecdt { |
| 311 | struct acpi_table_header header; /* Common ACPI table header */ |
| 312 | struct acpi_generic_address control; /* Address of EC command/status register */ |
| 313 | struct acpi_generic_address data; /* Address of EC data register */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 314 | u32 uid; /* Unique ID - must be same as the EC _UID method */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 315 | u8 gpe; /* The GPE for the EC */ |
| 316 | u8 id[1]; /* Full namepath of the EC in the ACPI namespace */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 317 | }; |
| 318 | |
| 319 | /******************************************************************************* |
| 320 | * |
| 321 | * HPET - High Precision Event Timer table |
| 322 | * |
| 323 | ******************************************************************************/ |
| 324 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 325 | struct acpi_table_hpet { |
| 326 | struct acpi_table_header header; /* Common ACPI table header */ |
| 327 | u32 id; /* Hardware ID of event timer block */ |
| 328 | struct acpi_generic_address address; /* Address of event timer block */ |
| 329 | u8 sequence; /* HPET sequence number */ |
| 330 | u16 minimum_tick; /* Main counter min tick, periodic mode */ |
| 331 | u8 flags; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 332 | }; |
| 333 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 334 | /*! Flags */ |
| 335 | |
| 336 | #define ACPI_HPET_PAGE_PROTECT (1) /* 00: No page protection */ |
| 337 | #define ACPI_HPET_PAGE_PROTECT_4 (1<<1) /* 01: 4KB page protected */ |
| 338 | #define ACPI_HPET_PAGE_PROTECT_64 (1<<2) /* 02: 64KB page protected */ |
| 339 | |
| 340 | /*! [End] no source code translation !*/ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 341 | |
| 342 | /******************************************************************************* |
| 343 | * |
| 344 | * MADT - Multiple APIC Description Table |
| 345 | * |
| 346 | ******************************************************************************/ |
| 347 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 348 | struct acpi_table_madt { |
| 349 | struct acpi_table_header header; /* Common ACPI table header */ |
| 350 | u32 address; /* Physical address of local APIC */ |
| 351 | u32 flags; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 352 | }; |
| 353 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 354 | /* Flags */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 355 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 356 | #define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 357 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 358 | /* Values for PCATCompat flag */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 359 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 360 | #define ACPI_MADT_DUAL_PIC 0 |
| 361 | #define ACPI_MADT_MULTIPLE_APIC 1 |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 362 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 363 | /* Values for subtable type in struct acpi_subtable_header */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 364 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 365 | enum acpi_madt_type { |
| 366 | ACPI_MADT_TYPE_LOCAL_APIC = 0, |
| 367 | ACPI_MADT_TYPE_IO_APIC = 1, |
| 368 | ACPI_MADT_TYPE_INTERRUPT_OVERRIDE = 2, |
| 369 | ACPI_MADT_TYPE_NMI_SOURCE = 3, |
| 370 | ACPI_MADT_TYPE_LOCAL_APIC_NMI = 4, |
| 371 | ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE = 5, |
| 372 | ACPI_MADT_TYPE_IO_SAPIC = 6, |
| 373 | ACPI_MADT_TYPE_LOCAL_SAPIC = 7, |
| 374 | ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8, |
| 375 | ACPI_MADT_TYPE_RESERVED = 9 /* 9 and greater are reserved */ |
| 376 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 377 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 378 | /* |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 379 | * MADT Sub-tables, correspond to Type in struct acpi_subtable_header |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 380 | */ |
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 | /* 0: Processor Local APIC */ |
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 | struct acpi_madt_local_apic { |
| 385 | struct acpi_subtable_header header; |
| 386 | u8 processor_id; /* ACPI processor id */ |
| 387 | u8 id; /* Processor's local APIC id */ |
| 388 | u32 lapic_flags; |
| 389 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 390 | |
| 391 | /* 1: IO APIC */ |
| 392 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 393 | struct acpi_madt_io_apic { |
| 394 | struct acpi_subtable_header header; |
| 395 | u8 id; /* I/O APIC ID */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 396 | u8 reserved; /* Reserved - must be zero */ |
| 397 | u32 address; /* APIC physical address */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 398 | u32 global_irq_base; /* Global system interrupt where INTI lines start */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 399 | }; |
| 400 | |
| 401 | /* 2: Interrupt Override */ |
| 402 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 403 | struct acpi_madt_interrupt_override { |
| 404 | struct acpi_subtable_header header; |
| 405 | u8 bus; /* 0 - ISA */ |
| 406 | u8 source_irq; /* Interrupt source (IRQ) */ |
| 407 | u32 global_irq; /* Global system interrupt */ |
| 408 | u16 inti_flags; |
| 409 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 410 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 411 | /* 3: NMI Source */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 412 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 413 | struct acpi_madt_nmi_source { |
| 414 | struct acpi_subtable_header header; |
| 415 | u16 inti_flags; |
| 416 | u32 global_irq; /* Global system interrupt */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 417 | }; |
| 418 | |
| 419 | /* 4: Local APIC NMI */ |
| 420 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 421 | struct acpi_madt_local_apic_nmi { |
| 422 | struct acpi_subtable_header header; |
| 423 | u8 processor_id; /* ACPI processor id */ |
| 424 | u16 inti_flags; |
| 425 | u8 lint; /* LINTn to which NMI is connected */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 426 | }; |
| 427 | |
| 428 | /* 5: Address Override */ |
| 429 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 430 | struct acpi_madt_local_apic_override { |
| 431 | struct acpi_subtable_header header; |
| 432 | u16 reserved; /* Reserved, must be zero */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 433 | u64 address; /* APIC physical address */ |
| 434 | }; |
| 435 | |
| 436 | /* 6: I/O Sapic */ |
| 437 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 438 | struct acpi_madt_io_sapic { |
| 439 | struct acpi_subtable_header header; |
| 440 | u8 id; /* I/O SAPIC ID */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 441 | u8 reserved; /* Reserved, must be zero */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 442 | u32 global_irq_base; /* Global interrupt for SAPIC start */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 443 | u64 address; /* SAPIC physical address */ |
| 444 | }; |
| 445 | |
| 446 | /* 7: Local Sapic */ |
| 447 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 448 | struct acpi_madt_local_sapic { |
| 449 | struct acpi_subtable_header header; |
| 450 | u8 processor_id; /* ACPI processor id */ |
| 451 | u8 id; /* SAPIC ID */ |
| 452 | u8 eid; /* SAPIC EID */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 453 | u8 reserved[3]; /* Reserved, must be zero */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 454 | u32 lapic_flags; |
| 455 | u32 uid; /* Numeric UID - ACPI 3.0 */ |
| 456 | char uid_string[1]; /* String UID - ACPI 3.0 */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 457 | }; |
| 458 | |
| 459 | /* 8: Platform Interrupt Source */ |
| 460 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 461 | struct acpi_madt_interrupt_source { |
| 462 | struct acpi_subtable_header header; |
| 463 | u16 inti_flags; |
| 464 | u8 type; /* 1=PMI, 2=INIT, 3=corrected */ |
| 465 | u8 id; /* Processor ID */ |
| 466 | u8 eid; /* Processor EID */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 467 | u8 io_sapic_vector; /* Vector value for PMI interrupts */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 468 | u32 global_irq; /* Global system interrupt */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 469 | u32 flags; /* Interrupt Source Flags */ |
| 470 | }; |
| 471 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 472 | /* Flags field above */ |
| 473 | |
| 474 | #define ACPI_MADT_CPEI_OVERRIDE (1) |
| 475 | |
| 476 | /* |
| 477 | * Common flags fields for MADT subtables |
| 478 | */ |
| 479 | |
| 480 | /* MADT Local APIC flags (lapic_flags) */ |
| 481 | |
| 482 | #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */ |
| 483 | |
| 484 | /* MADT MPS INTI flags (inti_flags) */ |
| 485 | |
| 486 | #define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */ |
| 487 | #define ACPI_MADT_TRIGGER_MASK (3<<2) /* 02-03: Trigger mode of APIC input signals */ |
| 488 | |
| 489 | /* Values for MPS INTI flags */ |
| 490 | |
| 491 | #define ACPI_MADT_POLARITY_CONFORMS 0 |
| 492 | #define ACPI_MADT_POLARITY_ACTIVE_HIGH 1 |
| 493 | #define ACPI_MADT_POLARITY_RESERVED 2 |
| 494 | #define ACPI_MADT_POLARITY_ACTIVE_LOW 3 |
| 495 | |
| 496 | #define ACPI_MADT_TRIGGER_CONFORMS (0) |
| 497 | #define ACPI_MADT_TRIGGER_EDGE (1<<2) |
| 498 | #define ACPI_MADT_TRIGGER_RESERVED (2<<2) |
| 499 | #define ACPI_MADT_TRIGGER_LEVEL (3<<2) |
| 500 | |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 501 | /******************************************************************************* |
| 502 | * |
| 503 | * MCFG - PCI Memory Mapped Configuration table and sub-table |
| 504 | * |
| 505 | ******************************************************************************/ |
| 506 | |
| 507 | struct acpi_table_mcfg { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 508 | struct acpi_table_header header; /* Common ACPI table header */ |
| 509 | u8 reserved[8]; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 510 | }; |
| 511 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 512 | /* Subtable */ |
| 513 | |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 514 | struct acpi_mcfg_allocation { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 515 | u64 address; /* Base address, processor-relative */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 516 | u16 pci_segment; /* PCI segment group number */ |
| 517 | u8 start_bus_number; /* Starting PCI Bus number */ |
| 518 | u8 end_bus_number; /* Final PCI Bus number */ |
| 519 | u32 reserved; |
| 520 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 521 | |
| 522 | /******************************************************************************* |
| 523 | * |
| 524 | * SBST - Smart Battery Specification Table |
| 525 | * |
| 526 | ******************************************************************************/ |
| 527 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 528 | struct acpi_table_sbst { |
| 529 | struct acpi_table_header header; /* Common ACPI table header */ |
| 530 | u32 warning_level; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 531 | u32 low_level; |
| 532 | u32 critical_level; |
| 533 | }; |
| 534 | |
| 535 | /******************************************************************************* |
| 536 | * |
| 537 | * SLIT - System Locality Distance Information Table |
| 538 | * |
| 539 | ******************************************************************************/ |
| 540 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 541 | struct acpi_table_slit { |
| 542 | struct acpi_table_header header; /* Common ACPI table header */ |
| 543 | u64 locality_count; |
| 544 | u8 entry[1]; /* Real size = localities^2 */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 545 | }; |
| 546 | |
| 547 | /******************************************************************************* |
| 548 | * |
| 549 | * SPCR - Serial Port Console Redirection table |
| 550 | * |
| 551 | ******************************************************************************/ |
| 552 | |
| 553 | struct acpi_table_spcr { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 554 | struct acpi_table_header header; /* Common ACPI table header */ |
| 555 | u8 interface_type; /* 0=full 16550, 1=subset of 16550 */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 556 | u8 reserved[3]; |
| 557 | struct acpi_generic_address serial_port; |
| 558 | u8 interrupt_type; |
| 559 | u8 pc_interrupt; |
| 560 | u32 interrupt; |
| 561 | u8 baud_rate; |
| 562 | u8 parity; |
| 563 | u8 stop_bits; |
| 564 | u8 flow_control; |
| 565 | u8 terminal_type; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 566 | u8 reserved1; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 567 | u16 pci_device_id; |
| 568 | u16 pci_vendor_id; |
| 569 | u8 pci_bus; |
| 570 | u8 pci_device; |
| 571 | u8 pci_function; |
| 572 | u32 pci_flags; |
| 573 | u8 pci_segment; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 574 | u32 reserved2; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 575 | }; |
| 576 | |
| 577 | /******************************************************************************* |
| 578 | * |
| 579 | * SPMI - Server Platform Management Interface table |
| 580 | * |
| 581 | ******************************************************************************/ |
| 582 | |
| 583 | struct acpi_table_spmi { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 584 | struct acpi_table_header header; /* Common ACPI table header */ |
| 585 | u8 reserved; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 586 | u8 interface_type; |
| 587 | u16 spec_revision; /* Version of IPMI */ |
| 588 | u8 interrupt_type; |
| 589 | u8 gpe_number; /* GPE assigned */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 590 | u8 reserved1; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 591 | u8 pci_device_flag; |
| 592 | u32 interrupt; |
| 593 | struct acpi_generic_address ipmi_register; |
| 594 | u8 pci_segment; |
| 595 | u8 pci_bus; |
| 596 | u8 pci_device; |
| 597 | u8 pci_function; |
| 598 | }; |
| 599 | |
| 600 | /******************************************************************************* |
| 601 | * |
| 602 | * SRAT - System Resource Affinity Table |
| 603 | * |
| 604 | ******************************************************************************/ |
| 605 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 606 | struct acpi_table_srat { |
| 607 | struct acpi_table_header header; /* Common ACPI table header */ |
| 608 | u32 table_revision; /* Must be value '1' */ |
| 609 | u64 reserved; /* Reserved, must be zero */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 610 | }; |
| 611 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 612 | /* Values for subtable type in struct acpi_subtable_header */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 613 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 614 | enum acpi_srat_type { |
| 615 | ACPI_SRAT_TYPE_CPU_AFFINITY = 0, |
| 616 | ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1, |
| 617 | ACPI_SRAT_TYPE_RESERVED = 2 |
| 618 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 619 | |
| 620 | /* SRAT sub-tables */ |
| 621 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 622 | struct acpi_srat_cpu_affinity { |
| 623 | struct acpi_subtable_header header; |
| 624 | u8 proximity_domain_lo; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 625 | u8 apic_id; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 626 | u32 flags; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 627 | u8 local_sapic_eid; |
| 628 | u8 proximity_domain_hi[3]; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 629 | u32 reserved; /* Reserved, must be zero */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 630 | }; |
| 631 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 632 | /* Flags */ |
| 633 | |
| 634 | #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */ |
| 635 | |
| 636 | struct acpi_srat_mem_affinity { |
| 637 | struct acpi_subtable_header header; |
| 638 | u32 proximity_domain; |
| 639 | u16 reserved; /* Reserved, must be zero */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 640 | u64 base_address; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 641 | u64 length; |
| 642 | u32 memory_type; /* See acpi_address_range_id */ |
| 643 | u32 flags; |
| 644 | u64 reserved1; /* Reserved, must be zero */ |
| 645 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 646 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 647 | /* Flags */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 648 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 649 | #define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */ |
| 650 | #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */ |
| 651 | #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] | 652 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 653 | /* Memory types */ |
| 654 | |
| 655 | enum acpi_address_range_id { |
| 656 | ACPI_ADDRESS_RANGE_MEMORY = 1, |
| 657 | ACPI_ADDRESS_RANGE_RESERVED = 2, |
| 658 | ACPI_ADDRESS_RANGE_ACPI = 3, |
| 659 | ACPI_ADDRESS_RANGE_NVS = 4, |
| 660 | ACPI_ADDRESS_RANGE_COUNT = 5 |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 661 | }; |
| 662 | |
| 663 | /******************************************************************************* |
| 664 | * |
| 665 | * TCPA - Trusted Computing Platform Alliance table |
| 666 | * |
| 667 | ******************************************************************************/ |
| 668 | |
| 669 | struct acpi_table_tcpa { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 670 | struct acpi_table_header header; /* Common ACPI table header */ |
| 671 | u16 reserved; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 672 | u32 max_log_length; /* Maximum length for the event log area */ |
| 673 | u64 log_address; /* Address of the event log area */ |
| 674 | }; |
| 675 | |
| 676 | /******************************************************************************* |
| 677 | * |
| 678 | * WDRT - Watchdog Resource Table |
| 679 | * |
| 680 | ******************************************************************************/ |
| 681 | |
| 682 | struct acpi_table_wdrt { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 683 | struct acpi_table_header header; /* Common ACPI table header */ |
| 684 | u32 header_length; /* Watchdog Header Length */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 685 | u8 pci_segment; /* PCI Segment number */ |
| 686 | u8 pci_bus; /* PCI Bus number */ |
| 687 | u8 pci_device; /* PCI Device number */ |
| 688 | u8 pci_function; /* PCI Function number */ |
| 689 | u32 timer_period; /* Period of one timer count (msec) */ |
| 690 | u32 max_count; /* Maximum counter value supported */ |
| 691 | u32 min_count; /* Minimum counter value */ |
| 692 | u8 flags; |
| 693 | u8 reserved[3]; |
| 694 | u32 entries; /* Number of watchdog entries that follow */ |
| 695 | }; |
| 696 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 697 | /* Flags */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 698 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 699 | #define ACPI_WDRT_TIMER_ENABLED (1) /* 00: Timer enabled */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 700 | |
| 701 | /* Reset to default packing */ |
| 702 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 703 | #pragma pack() |
| 704 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 705 | #endif /* __ACTBL1_H__ */ |