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 */ |
| 64 | #define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */ |
| 65 | #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */ |
| 66 | #define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */ |
| 67 | #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ |
| 68 | #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */ |
| 69 | #define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */ |
| 70 | #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */ |
| 71 | #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */ |
| 72 | #define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */ |
| 73 | #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */ |
| 74 | #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */ |
| 75 | |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 76 | /* |
| 77 | * All tables must be byte-packed to match the ACPI specification, since |
| 78 | * the tables are provided by the system BIOS. |
| 79 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 80 | #pragma pack(1) |
| 81 | |
| 82 | /* |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 83 | * Note about bitfields: The u8 type is used for bitfields in ACPI tables. |
| 84 | * This is the only type that is even remotely portable. Anything else is not |
| 85 | * portable, so do not use any other bitfield types. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 86 | */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 87 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 88 | /* Common Sub-table header (used in MADT, SRAT, etc.) */ |
| 89 | |
| 90 | struct acpi_subtable_header { |
| 91 | u8 type; |
| 92 | u8 length; |
| 93 | }; |
| 94 | |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 95 | /******************************************************************************* |
| 96 | * |
| 97 | * ASF - Alert Standard Format table (Signature "ASF!") |
| 98 | * |
| 99 | ******************************************************************************/ |
| 100 | |
| 101 | struct acpi_table_asf { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 102 | struct acpi_table_header header; /* Common ACPI table header */ |
| 103 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 104 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 105 | /* ASF subtable header */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 106 | |
| 107 | struct acpi_asf_header { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 108 | u8 type; |
| 109 | u8 reserved; |
| 110 | u16 length; |
| 111 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 112 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 113 | /* Values for Type field above */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 114 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 115 | enum acpi_asf_type { |
| 116 | ACPI_ASF_TYPE_INFO = 0, |
| 117 | ACPI_ASF_TYPE_ALERT = 1, |
| 118 | ACPI_ASF_TYPE_CONTROL = 2, |
| 119 | ACPI_ASF_TYPE_BOOT = 3, |
| 120 | ACPI_ASF_TYPE_ADDRESS = 4, |
| 121 | ACPI_ASF_TYPE_RESERVED = 5 |
| 122 | }; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 123 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 124 | /* |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 125 | * ASF subtables |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 126 | */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 127 | |
| 128 | /* 0: ASF Information */ |
| 129 | |
| 130 | struct acpi_asf_info { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 131 | struct acpi_asf_header header; |
| 132 | u8 min_reset_value; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 133 | u8 min_poll_interval; |
| 134 | u16 system_id; |
| 135 | u32 mfg_id; |
| 136 | u8 flags; |
| 137 | u8 reserved2[3]; |
| 138 | }; |
| 139 | |
| 140 | /* 1: ASF Alerts */ |
| 141 | |
| 142 | struct acpi_asf_alert { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 143 | struct acpi_asf_header header; |
| 144 | u8 assert_mask; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 145 | u8 deassert_mask; |
| 146 | u8 alerts; |
| 147 | u8 data_length; |
| 148 | u8 array[1]; |
| 149 | }; |
| 150 | |
| 151 | /* 2: ASF Remote Control */ |
| 152 | |
| 153 | struct acpi_asf_remote { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 154 | struct acpi_asf_header header; |
| 155 | u8 controls; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 156 | u8 data_length; |
| 157 | u16 reserved2; |
| 158 | u8 array[1]; |
| 159 | }; |
| 160 | |
| 161 | /* 3: ASF RMCP Boot Options */ |
| 162 | |
| 163 | struct acpi_asf_rmcp { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 164 | struct acpi_asf_header header; |
| 165 | u8 capabilities[7]; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 166 | u8 completion_code; |
| 167 | u32 enterprise_id; |
| 168 | u8 command; |
| 169 | u16 parameter; |
| 170 | u16 boot_options; |
| 171 | u16 oem_parameters; |
| 172 | }; |
| 173 | |
| 174 | /* 4: ASF Address */ |
| 175 | |
| 176 | struct acpi_asf_address { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 177 | struct acpi_asf_header header; |
| 178 | u8 eprom_address; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 179 | u8 devices; |
| 180 | u8 smbus_addresses[1]; |
| 181 | }; |
| 182 | |
| 183 | /******************************************************************************* |
| 184 | * |
| 185 | * BOOT - Simple Boot Flag Table |
| 186 | * |
| 187 | ******************************************************************************/ |
| 188 | |
| 189 | struct acpi_table_boot { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 190 | struct acpi_table_header header; /* Common ACPI table header */ |
| 191 | u8 cmos_index; /* Index in CMOS RAM for the boot register */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 192 | u8 reserved[3]; |
| 193 | }; |
| 194 | |
| 195 | /******************************************************************************* |
| 196 | * |
| 197 | * CPEP - Corrected Platform Error Polling table |
| 198 | * |
| 199 | ******************************************************************************/ |
| 200 | |
| 201 | struct acpi_table_cpep { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 202 | struct acpi_table_header header; /* Common ACPI table header */ |
| 203 | u64 reserved; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 204 | }; |
| 205 | |
| 206 | /* Subtable */ |
| 207 | |
| 208 | struct acpi_cpep_polling { |
| 209 | u8 type; |
| 210 | u8 length; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 211 | u8 id; /* Processor ID */ |
| 212 | u8 eid; /* Processor EID */ |
| 213 | u32 interval; /* Polling interval (msec) */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 214 | }; |
| 215 | |
| 216 | /******************************************************************************* |
| 217 | * |
| 218 | * DBGP - Debug Port table |
| 219 | * |
| 220 | ******************************************************************************/ |
| 221 | |
| 222 | struct acpi_table_dbgp { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 223 | struct acpi_table_header header; /* Common ACPI table header */ |
| 224 | u8 type; /* 0=full 16550, 1=subset of 16550 */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 225 | u8 reserved[3]; |
| 226 | struct acpi_generic_address debug_port; |
| 227 | }; |
| 228 | |
| 229 | /******************************************************************************* |
| 230 | * |
| 231 | * ECDT - Embedded Controller Boot Resources Table |
| 232 | * |
| 233 | ******************************************************************************/ |
| 234 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 235 | struct acpi_table_ecdt { |
| 236 | struct acpi_table_header header; /* Common ACPI table header */ |
| 237 | struct acpi_generic_address control; /* Address of EC command/status register */ |
| 238 | struct acpi_generic_address data; /* Address of EC data register */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 239 | u32 uid; /* Unique ID - must be same as the EC _UID method */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 240 | u8 gpe; /* The GPE for the EC */ |
| 241 | u8 id[1]; /* Full namepath of the EC in the ACPI namespace */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 242 | }; |
| 243 | |
| 244 | /******************************************************************************* |
| 245 | * |
| 246 | * HPET - High Precision Event Timer table |
| 247 | * |
| 248 | ******************************************************************************/ |
| 249 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 250 | struct acpi_table_hpet { |
| 251 | struct acpi_table_header header; /* Common ACPI table header */ |
| 252 | u32 id; /* Hardware ID of event timer block */ |
| 253 | struct acpi_generic_address address; /* Address of event timer block */ |
| 254 | u8 sequence; /* HPET sequence number */ |
| 255 | u16 minimum_tick; /* Main counter min tick, periodic mode */ |
| 256 | u8 flags; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 257 | }; |
| 258 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 259 | /*! Flags */ |
| 260 | |
| 261 | #define ACPI_HPET_PAGE_PROTECT (1) /* 00: No page protection */ |
| 262 | #define ACPI_HPET_PAGE_PROTECT_4 (1<<1) /* 01: 4KB page protected */ |
| 263 | #define ACPI_HPET_PAGE_PROTECT_64 (1<<2) /* 02: 64KB page protected */ |
| 264 | |
| 265 | /*! [End] no source code translation !*/ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 266 | |
| 267 | /******************************************************************************* |
| 268 | * |
| 269 | * MADT - Multiple APIC Description Table |
| 270 | * |
| 271 | ******************************************************************************/ |
| 272 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 273 | struct acpi_table_madt { |
| 274 | struct acpi_table_header header; /* Common ACPI table header */ |
| 275 | u32 address; /* Physical address of local APIC */ |
| 276 | u32 flags; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 277 | }; |
| 278 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 279 | /* Flags */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 280 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 281 | #define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 282 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 283 | /* Values for PCATCompat flag */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 284 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 285 | #define ACPI_MADT_DUAL_PIC 0 |
| 286 | #define ACPI_MADT_MULTIPLE_APIC 1 |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 287 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 288 | /* Values for subtable type in struct acpi_subtable_header */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 289 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 290 | enum acpi_madt_type { |
| 291 | ACPI_MADT_TYPE_LOCAL_APIC = 0, |
| 292 | ACPI_MADT_TYPE_IO_APIC = 1, |
| 293 | ACPI_MADT_TYPE_INTERRUPT_OVERRIDE = 2, |
| 294 | ACPI_MADT_TYPE_NMI_SOURCE = 3, |
| 295 | ACPI_MADT_TYPE_LOCAL_APIC_NMI = 4, |
| 296 | ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE = 5, |
| 297 | ACPI_MADT_TYPE_IO_SAPIC = 6, |
| 298 | ACPI_MADT_TYPE_LOCAL_SAPIC = 7, |
| 299 | ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8, |
| 300 | ACPI_MADT_TYPE_RESERVED = 9 /* 9 and greater are reserved */ |
| 301 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 302 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 303 | /* |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 304 | * MADT Sub-tables, correspond to Type in struct acpi_subtable_header |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 305 | */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 306 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 307 | /* 0: Processor Local APIC */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 308 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 309 | struct acpi_madt_local_apic { |
| 310 | struct acpi_subtable_header header; |
| 311 | u8 processor_id; /* ACPI processor id */ |
| 312 | u8 id; /* Processor's local APIC id */ |
| 313 | u32 lapic_flags; |
| 314 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 315 | |
| 316 | /* 1: IO APIC */ |
| 317 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 318 | struct acpi_madt_io_apic { |
| 319 | struct acpi_subtable_header header; |
| 320 | u8 id; /* I/O APIC ID */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 321 | u8 reserved; /* Reserved - must be zero */ |
| 322 | u32 address; /* APIC physical address */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 323 | u32 global_irq_base; /* Global system interrupt where INTI lines start */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 324 | }; |
| 325 | |
| 326 | /* 2: Interrupt Override */ |
| 327 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 328 | struct acpi_madt_interrupt_override { |
| 329 | struct acpi_subtable_header header; |
| 330 | u8 bus; /* 0 - ISA */ |
| 331 | u8 source_irq; /* Interrupt source (IRQ) */ |
| 332 | u32 global_irq; /* Global system interrupt */ |
| 333 | u16 inti_flags; |
| 334 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 335 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 336 | /* 3: NMI Source */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 337 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 338 | struct acpi_madt_nmi_source { |
| 339 | struct acpi_subtable_header header; |
| 340 | u16 inti_flags; |
| 341 | u32 global_irq; /* Global system interrupt */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 342 | }; |
| 343 | |
| 344 | /* 4: Local APIC NMI */ |
| 345 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 346 | struct acpi_madt_local_apic_nmi { |
| 347 | struct acpi_subtable_header header; |
| 348 | u8 processor_id; /* ACPI processor id */ |
| 349 | u16 inti_flags; |
| 350 | u8 lint; /* LINTn to which NMI is connected */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 351 | }; |
| 352 | |
| 353 | /* 5: Address Override */ |
| 354 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 355 | struct acpi_madt_local_apic_override { |
| 356 | struct acpi_subtable_header header; |
| 357 | u16 reserved; /* Reserved, must be zero */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 358 | u64 address; /* APIC physical address */ |
| 359 | }; |
| 360 | |
| 361 | /* 6: I/O Sapic */ |
| 362 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 363 | struct acpi_madt_io_sapic { |
| 364 | struct acpi_subtable_header header; |
| 365 | u8 id; /* I/O SAPIC ID */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 366 | u8 reserved; /* Reserved, must be zero */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 367 | u32 global_irq_base; /* Global interrupt for SAPIC start */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 368 | u64 address; /* SAPIC physical address */ |
| 369 | }; |
| 370 | |
| 371 | /* 7: Local Sapic */ |
| 372 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 373 | struct acpi_madt_local_sapic { |
| 374 | struct acpi_subtable_header header; |
| 375 | u8 processor_id; /* ACPI processor id */ |
| 376 | u8 id; /* SAPIC ID */ |
| 377 | u8 eid; /* SAPIC EID */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 378 | u8 reserved[3]; /* Reserved, must be zero */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 379 | u32 lapic_flags; |
| 380 | u32 uid; /* Numeric UID - ACPI 3.0 */ |
| 381 | char uid_string[1]; /* String UID - ACPI 3.0 */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 382 | }; |
| 383 | |
| 384 | /* 8: Platform Interrupt Source */ |
| 385 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 386 | struct acpi_madt_interrupt_source { |
| 387 | struct acpi_subtable_header header; |
| 388 | u16 inti_flags; |
| 389 | u8 type; /* 1=PMI, 2=INIT, 3=corrected */ |
| 390 | u8 id; /* Processor ID */ |
| 391 | u8 eid; /* Processor EID */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 392 | u8 io_sapic_vector; /* Vector value for PMI interrupts */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 393 | u32 global_irq; /* Global system interrupt */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 394 | u32 flags; /* Interrupt Source Flags */ |
| 395 | }; |
| 396 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 397 | /* Flags field above */ |
| 398 | |
| 399 | #define ACPI_MADT_CPEI_OVERRIDE (1) |
| 400 | |
| 401 | /* |
| 402 | * Common flags fields for MADT subtables |
| 403 | */ |
| 404 | |
| 405 | /* MADT Local APIC flags (lapic_flags) */ |
| 406 | |
| 407 | #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */ |
| 408 | |
| 409 | /* MADT MPS INTI flags (inti_flags) */ |
| 410 | |
| 411 | #define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */ |
| 412 | #define ACPI_MADT_TRIGGER_MASK (3<<2) /* 02-03: Trigger mode of APIC input signals */ |
| 413 | |
| 414 | /* Values for MPS INTI flags */ |
| 415 | |
| 416 | #define ACPI_MADT_POLARITY_CONFORMS 0 |
| 417 | #define ACPI_MADT_POLARITY_ACTIVE_HIGH 1 |
| 418 | #define ACPI_MADT_POLARITY_RESERVED 2 |
| 419 | #define ACPI_MADT_POLARITY_ACTIVE_LOW 3 |
| 420 | |
| 421 | #define ACPI_MADT_TRIGGER_CONFORMS (0) |
| 422 | #define ACPI_MADT_TRIGGER_EDGE (1<<2) |
| 423 | #define ACPI_MADT_TRIGGER_RESERVED (2<<2) |
| 424 | #define ACPI_MADT_TRIGGER_LEVEL (3<<2) |
| 425 | |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 426 | /******************************************************************************* |
| 427 | * |
| 428 | * MCFG - PCI Memory Mapped Configuration table and sub-table |
| 429 | * |
| 430 | ******************************************************************************/ |
| 431 | |
| 432 | struct acpi_table_mcfg { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 433 | struct acpi_table_header header; /* Common ACPI table header */ |
| 434 | u8 reserved[8]; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 435 | }; |
| 436 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 437 | /* Subtable */ |
| 438 | |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 439 | struct acpi_mcfg_allocation { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 440 | u64 address; /* Base address, processor-relative */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 441 | u16 pci_segment; /* PCI segment group number */ |
| 442 | u8 start_bus_number; /* Starting PCI Bus number */ |
| 443 | u8 end_bus_number; /* Final PCI Bus number */ |
| 444 | u32 reserved; |
| 445 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 446 | |
| 447 | /******************************************************************************* |
| 448 | * |
| 449 | * SBST - Smart Battery Specification Table |
| 450 | * |
| 451 | ******************************************************************************/ |
| 452 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 453 | struct acpi_table_sbst { |
| 454 | struct acpi_table_header header; /* Common ACPI table header */ |
| 455 | u32 warning_level; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 456 | u32 low_level; |
| 457 | u32 critical_level; |
| 458 | }; |
| 459 | |
| 460 | /******************************************************************************* |
| 461 | * |
| 462 | * SLIT - System Locality Distance Information Table |
| 463 | * |
| 464 | ******************************************************************************/ |
| 465 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 466 | struct acpi_table_slit { |
| 467 | struct acpi_table_header header; /* Common ACPI table header */ |
| 468 | u64 locality_count; |
| 469 | u8 entry[1]; /* Real size = localities^2 */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 470 | }; |
| 471 | |
| 472 | /******************************************************************************* |
| 473 | * |
| 474 | * SPCR - Serial Port Console Redirection table |
| 475 | * |
| 476 | ******************************************************************************/ |
| 477 | |
| 478 | struct acpi_table_spcr { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 479 | struct acpi_table_header header; /* Common ACPI table header */ |
| 480 | u8 interface_type; /* 0=full 16550, 1=subset of 16550 */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 481 | u8 reserved[3]; |
| 482 | struct acpi_generic_address serial_port; |
| 483 | u8 interrupt_type; |
| 484 | u8 pc_interrupt; |
| 485 | u32 interrupt; |
| 486 | u8 baud_rate; |
| 487 | u8 parity; |
| 488 | u8 stop_bits; |
| 489 | u8 flow_control; |
| 490 | u8 terminal_type; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 491 | u8 reserved1; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 492 | u16 pci_device_id; |
| 493 | u16 pci_vendor_id; |
| 494 | u8 pci_bus; |
| 495 | u8 pci_device; |
| 496 | u8 pci_function; |
| 497 | u32 pci_flags; |
| 498 | u8 pci_segment; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 499 | u32 reserved2; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 500 | }; |
| 501 | |
| 502 | /******************************************************************************* |
| 503 | * |
| 504 | * SPMI - Server Platform Management Interface table |
| 505 | * |
| 506 | ******************************************************************************/ |
| 507 | |
| 508 | struct acpi_table_spmi { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 509 | struct acpi_table_header header; /* Common ACPI table header */ |
| 510 | u8 reserved; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 511 | u8 interface_type; |
| 512 | u16 spec_revision; /* Version of IPMI */ |
| 513 | u8 interrupt_type; |
| 514 | u8 gpe_number; /* GPE assigned */ |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 515 | u8 reserved1; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 516 | u8 pci_device_flag; |
| 517 | u32 interrupt; |
| 518 | struct acpi_generic_address ipmi_register; |
| 519 | u8 pci_segment; |
| 520 | u8 pci_bus; |
| 521 | u8 pci_device; |
| 522 | u8 pci_function; |
| 523 | }; |
| 524 | |
| 525 | /******************************************************************************* |
| 526 | * |
| 527 | * SRAT - System Resource Affinity Table |
| 528 | * |
| 529 | ******************************************************************************/ |
| 530 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 531 | struct acpi_table_srat { |
| 532 | struct acpi_table_header header; /* Common ACPI table header */ |
| 533 | u32 table_revision; /* Must be value '1' */ |
| 534 | u64 reserved; /* Reserved, must be zero */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 535 | }; |
| 536 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 537 | /* Values for subtable type in struct acpi_subtable_header */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 538 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 539 | enum acpi_srat_type { |
| 540 | ACPI_SRAT_TYPE_CPU_AFFINITY = 0, |
| 541 | ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1, |
| 542 | ACPI_SRAT_TYPE_RESERVED = 2 |
| 543 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 544 | |
| 545 | /* SRAT sub-tables */ |
| 546 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 547 | struct acpi_srat_cpu_affinity { |
| 548 | struct acpi_subtable_header header; |
| 549 | u8 proximity_domain_lo; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 550 | u8 apic_id; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 551 | u32 flags; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 552 | u8 local_sapic_eid; |
| 553 | u8 proximity_domain_hi[3]; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 554 | u32 reserved; /* Reserved, must be zero */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 555 | }; |
| 556 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 557 | /* Flags */ |
| 558 | |
| 559 | #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */ |
| 560 | |
| 561 | struct acpi_srat_mem_affinity { |
| 562 | struct acpi_subtable_header header; |
| 563 | u32 proximity_domain; |
| 564 | u16 reserved; /* Reserved, must be zero */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 565 | u64 base_address; |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 566 | u64 length; |
| 567 | u32 memory_type; /* See acpi_address_range_id */ |
| 568 | u32 flags; |
| 569 | u64 reserved1; /* Reserved, must be zero */ |
| 570 | }; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 571 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 572 | /* Flags */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 573 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 574 | #define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */ |
| 575 | #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */ |
| 576 | #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] | 577 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 578 | /* Memory types */ |
| 579 | |
| 580 | enum acpi_address_range_id { |
| 581 | ACPI_ADDRESS_RANGE_MEMORY = 1, |
| 582 | ACPI_ADDRESS_RANGE_RESERVED = 2, |
| 583 | ACPI_ADDRESS_RANGE_ACPI = 3, |
| 584 | ACPI_ADDRESS_RANGE_NVS = 4, |
| 585 | ACPI_ADDRESS_RANGE_COUNT = 5 |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 586 | }; |
| 587 | |
| 588 | /******************************************************************************* |
| 589 | * |
| 590 | * TCPA - Trusted Computing Platform Alliance table |
| 591 | * |
| 592 | ******************************************************************************/ |
| 593 | |
| 594 | struct acpi_table_tcpa { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 595 | struct acpi_table_header header; /* Common ACPI table header */ |
| 596 | u16 reserved; |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 597 | u32 max_log_length; /* Maximum length for the event log area */ |
| 598 | u64 log_address; /* Address of the event log area */ |
| 599 | }; |
| 600 | |
| 601 | /******************************************************************************* |
| 602 | * |
| 603 | * WDRT - Watchdog Resource Table |
| 604 | * |
| 605 | ******************************************************************************/ |
| 606 | |
| 607 | struct acpi_table_wdrt { |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 608 | struct acpi_table_header header; /* Common ACPI table header */ |
| 609 | u32 header_length; /* Watchdog Header Length */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 610 | u8 pci_segment; /* PCI Segment number */ |
| 611 | u8 pci_bus; /* PCI Bus number */ |
| 612 | u8 pci_device; /* PCI Device number */ |
| 613 | u8 pci_function; /* PCI Function number */ |
| 614 | u32 timer_period; /* Period of one timer count (msec) */ |
| 615 | u32 max_count; /* Maximum counter value supported */ |
| 616 | u32 min_count; /* Minimum counter value */ |
| 617 | u8 flags; |
| 618 | u8 reserved[3]; |
| 619 | u32 entries; /* Number of watchdog entries that follow */ |
| 620 | }; |
| 621 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 622 | /* Flags */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 623 | |
Bob Moore | f3d2e78 | 2007-02-02 19:48:18 +0300 | [diff] [blame^] | 624 | #define ACPI_WDRT_TIMER_ENABLED (1) /* 00: Timer enabled */ |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 625 | |
| 626 | /* Reset to default packing */ |
| 627 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 628 | #pragma pack() |
| 629 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 630 | #endif /* __ACTBL1_H__ */ |