blob: dd8e11e624fa8bf8995fe961754c5a24491a8b96 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/******************************************************************************
2 *
Bob Moore793c2382006-03-31 00:00:00 -05003 * Name: actbl1.h - Additional ACPI table definitions
Linus Torvalds1da177e2005-04-16 15:20:36 -07004 *
5 *****************************************************************************/
6
7/*
Bob Moore6c9deb72007-02-02 19:48:24 +03008 * Copyright (C) 2000 - 2007, R. Byron Moore
Linus Torvalds1da177e2005-04-16 15:20:36 -07009 * 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 Moore793c2382006-03-31 00:00:00 -050047/*******************************************************************************
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 Moore2502fff2007-02-02 19:48:19 +030064#define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */
Bob Moore793c2382006-03-31 00:00:00 -050065#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 */
Bob Moore698c0a02008-04-10 19:06:38 +040070#define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */
Bob Moore793c2382006-03-31 00:00:00 -050071#define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */
72#define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
73#define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */
74#define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */
75#define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */
76#define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */
77
Bob Moore793c2382006-03-31 00:00:00 -050078/*
79 * All tables must be byte-packed to match the ACPI specification, since
80 * the tables are provided by the system BIOS.
81 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070082#pragma pack(1)
83
84/*
Bob Moore793c2382006-03-31 00:00:00 -050085 * Note about bitfields: The u8 type is used for bitfields in ACPI tables.
86 * This is the only type that is even remotely portable. Anything else is not
87 * portable, so do not use any other bitfield types.
Linus Torvalds1da177e2005-04-16 15:20:36 -070088 */
Bob Moore793c2382006-03-31 00:00:00 -050089
Bob Mooref3d2e782007-02-02 19:48:18 +030090/* Common Sub-table header (used in MADT, SRAT, etc.) */
91
92struct acpi_subtable_header {
93 u8 type;
94 u8 length;
95};
96
Bob Moore793c2382006-03-31 00:00:00 -050097/*******************************************************************************
98 *
99 * ASF - Alert Standard Format table (Signature "ASF!")
100 *
Bob Moore694b0b22007-02-02 19:48:20 +0300101 * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
102 *
Bob Moore793c2382006-03-31 00:00:00 -0500103 ******************************************************************************/
104
105struct acpi_table_asf {
Bob Mooref3d2e782007-02-02 19:48:18 +0300106 struct acpi_table_header header; /* Common ACPI table header */
107};
Bob Moore793c2382006-03-31 00:00:00 -0500108
Bob Mooref3d2e782007-02-02 19:48:18 +0300109/* ASF subtable header */
Bob Moore793c2382006-03-31 00:00:00 -0500110
111struct acpi_asf_header {
Bob Mooref3d2e782007-02-02 19:48:18 +0300112 u8 type;
113 u8 reserved;
114 u16 length;
115};
Bob Moore793c2382006-03-31 00:00:00 -0500116
Bob Mooref3d2e782007-02-02 19:48:18 +0300117/* Values for Type field above */
Bob Moore793c2382006-03-31 00:00:00 -0500118
Bob Mooref3d2e782007-02-02 19:48:18 +0300119enum acpi_asf_type {
120 ACPI_ASF_TYPE_INFO = 0,
121 ACPI_ASF_TYPE_ALERT = 1,
122 ACPI_ASF_TYPE_CONTROL = 2,
123 ACPI_ASF_TYPE_BOOT = 3,
124 ACPI_ASF_TYPE_ADDRESS = 4,
125 ACPI_ASF_TYPE_RESERVED = 5
126};
Linus Torvalds1da177e2005-04-16 15:20:36 -0700127
Linus Torvalds1da177e2005-04-16 15:20:36 -0700128/*
Bob Moore793c2382006-03-31 00:00:00 -0500129 * ASF subtables
Linus Torvalds1da177e2005-04-16 15:20:36 -0700130 */
Bob Moore793c2382006-03-31 00:00:00 -0500131
132/* 0: ASF Information */
133
134struct acpi_asf_info {
Bob Mooref3d2e782007-02-02 19:48:18 +0300135 struct acpi_asf_header header;
136 u8 min_reset_value;
Bob Moore793c2382006-03-31 00:00:00 -0500137 u8 min_poll_interval;
138 u16 system_id;
139 u32 mfg_id;
140 u8 flags;
141 u8 reserved2[3];
142};
143
144/* 1: ASF Alerts */
145
146struct acpi_asf_alert {
Bob Mooref3d2e782007-02-02 19:48:18 +0300147 struct acpi_asf_header header;
148 u8 assert_mask;
Bob Moore793c2382006-03-31 00:00:00 -0500149 u8 deassert_mask;
150 u8 alerts;
151 u8 data_length;
Bob Moore775d85b2007-02-02 19:48:20 +0300152};
153
154struct acpi_asf_alert_data {
155 u8 address;
156 u8 command;
157 u8 mask;
158 u8 value;
159 u8 sensor_type;
160 u8 type;
161 u8 offset;
162 u8 source_type;
163 u8 severity;
164 u8 sensor_number;
165 u8 entity;
166 u8 instance;
Bob Moore793c2382006-03-31 00:00:00 -0500167};
168
169/* 2: ASF Remote Control */
170
171struct acpi_asf_remote {
Bob Mooref3d2e782007-02-02 19:48:18 +0300172 struct acpi_asf_header header;
173 u8 controls;
Bob Moore793c2382006-03-31 00:00:00 -0500174 u8 data_length;
175 u16 reserved2;
Bob Moore775d85b2007-02-02 19:48:20 +0300176};
177
178struct acpi_asf_control_data {
179 u8 function;
180 u8 address;
181 u8 command;
182 u8 value;
Bob Moore793c2382006-03-31 00:00:00 -0500183};
184
185/* 3: ASF RMCP Boot Options */
186
187struct acpi_asf_rmcp {
Bob Mooref3d2e782007-02-02 19:48:18 +0300188 struct acpi_asf_header header;
189 u8 capabilities[7];
Bob Moore793c2382006-03-31 00:00:00 -0500190 u8 completion_code;
191 u32 enterprise_id;
192 u8 command;
193 u16 parameter;
194 u16 boot_options;
195 u16 oem_parameters;
196};
197
198/* 4: ASF Address */
199
200struct acpi_asf_address {
Bob Mooref3d2e782007-02-02 19:48:18 +0300201 struct acpi_asf_header header;
202 u8 eprom_address;
Bob Moore793c2382006-03-31 00:00:00 -0500203 u8 devices;
Bob Moore793c2382006-03-31 00:00:00 -0500204};
205
206/*******************************************************************************
207 *
208 * BOOT - Simple Boot Flag Table
209 *
210 ******************************************************************************/
211
212struct acpi_table_boot {
Bob Mooref3d2e782007-02-02 19:48:18 +0300213 struct acpi_table_header header; /* Common ACPI table header */
214 u8 cmos_index; /* Index in CMOS RAM for the boot register */
Bob Moore793c2382006-03-31 00:00:00 -0500215 u8 reserved[3];
216};
217
218/*******************************************************************************
219 *
220 * CPEP - Corrected Platform Error Polling table
221 *
222 ******************************************************************************/
223
224struct acpi_table_cpep {
Bob Mooref3d2e782007-02-02 19:48:18 +0300225 struct acpi_table_header header; /* Common ACPI table header */
226 u64 reserved;
Bob Moore793c2382006-03-31 00:00:00 -0500227};
228
229/* Subtable */
230
231struct acpi_cpep_polling {
232 u8 type;
233 u8 length;
Bob Mooref3d2e782007-02-02 19:48:18 +0300234 u8 id; /* Processor ID */
235 u8 eid; /* Processor EID */
236 u32 interval; /* Polling interval (msec) */
Bob Moore793c2382006-03-31 00:00:00 -0500237};
238
239/*******************************************************************************
240 *
241 * DBGP - Debug Port table
242 *
243 ******************************************************************************/
244
245struct acpi_table_dbgp {
Bob Mooref3d2e782007-02-02 19:48:18 +0300246 struct acpi_table_header header; /* Common ACPI table header */
247 u8 type; /* 0=full 16550, 1=subset of 16550 */
Bob Moore793c2382006-03-31 00:00:00 -0500248 u8 reserved[3];
249 struct acpi_generic_address debug_port;
250};
251
252/*******************************************************************************
253 *
Bob Moore2502fff2007-02-02 19:48:19 +0300254 * DMAR - DMA Remapping table
255 *
256 ******************************************************************************/
257
258struct acpi_table_dmar {
259 struct acpi_table_header header; /* Common ACPI table header */
260 u8 width; /* Host Address Width */
Keshavamurthy, Anil S10e52472007-10-21 16:41:41 -0700261 u8 flags;
262 u8 reserved[10];
Bob Moore2502fff2007-02-02 19:48:19 +0300263};
264
265/* DMAR subtable header */
266
267struct acpi_dmar_header {
268 u16 type;
269 u16 length;
Bob Moore2502fff2007-02-02 19:48:19 +0300270};
271
272/* Values for subtable type in struct acpi_dmar_header */
273
274enum acpi_dmar_type {
275 ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
276 ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
Keshavamurthy, Anil S10e52472007-10-21 16:41:41 -0700277 ACPI_DMAR_TYPE_ATSR = 2,
278 ACPI_DMAR_TYPE_RESERVED = 3 /* 3 and greater are reserved */
Bob Moore2502fff2007-02-02 19:48:19 +0300279};
280
281struct acpi_dmar_device_scope {
282 u8 entry_type;
283 u8 length;
Keshavamurthy, Anil S10e52472007-10-21 16:41:41 -0700284 u16 reserved;
285 u8 enumeration_id;
Bob Moore2502fff2007-02-02 19:48:19 +0300286 u8 bus;
287};
288
289/* Values for entry_type in struct acpi_dmar_device_scope */
290
291enum acpi_dmar_scope_type {
292 ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
293 ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
294 ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
Keshavamurthy, Anil S10e52472007-10-21 16:41:41 -0700295 ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
296 ACPI_DMAR_SCOPE_TYPE_HPET = 4,
297 ACPI_DMAR_SCOPE_TYPE_RESERVED = 5 /* 5 and greater are reserved */
298};
299
300struct acpi_dmar_pci_path {
301 u8 dev;
302 u8 fn;
Bob Moore2502fff2007-02-02 19:48:19 +0300303};
304
305/*
306 * DMAR Sub-tables, correspond to Type in struct acpi_dmar_header
307 */
308
309/* 0: Hardware Unit Definition */
310
311struct acpi_dmar_hardware_unit {
312 struct acpi_dmar_header header;
Keshavamurthy, Anil S10e52472007-10-21 16:41:41 -0700313 u8 flags;
314 u8 reserved;
315 u16 segment;
Bob Moore2502fff2007-02-02 19:48:19 +0300316 u64 address; /* Register Base Address */
317};
318
319/* Flags */
320
321#define ACPI_DMAR_INCLUDE_ALL (1)
322
323/* 1: Reserved Memory Defininition */
324
325struct acpi_dmar_reserved_memory {
326 struct acpi_dmar_header header;
Keshavamurthy, Anil S10e52472007-10-21 16:41:41 -0700327 u16 reserved;
328 u16 segment;
329 u64 base_address; /* 4_k aligned base address */
Bob Moore2502fff2007-02-02 19:48:19 +0300330 u64 end_address; /* 4_k aligned limit address */
331};
332
333/* Flags */
334
335#define ACPI_DMAR_ALLOW_ALL (1)
336
337/*******************************************************************************
338 *
Bob Moore793c2382006-03-31 00:00:00 -0500339 * ECDT - Embedded Controller Boot Resources Table
340 *
341 ******************************************************************************/
342
Bob Mooref3d2e782007-02-02 19:48:18 +0300343struct acpi_table_ecdt {
344 struct acpi_table_header header; /* Common ACPI table header */
345 struct acpi_generic_address control; /* Address of EC command/status register */
346 struct acpi_generic_address data; /* Address of EC data register */
Bob Moore793c2382006-03-31 00:00:00 -0500347 u32 uid; /* Unique ID - must be same as the EC _UID method */
Bob Mooref3d2e782007-02-02 19:48:18 +0300348 u8 gpe; /* The GPE for the EC */
349 u8 id[1]; /* Full namepath of the EC in the ACPI namespace */
Bob Moore793c2382006-03-31 00:00:00 -0500350};
351
352/*******************************************************************************
353 *
354 * HPET - High Precision Event Timer table
355 *
356 ******************************************************************************/
357
Bob Mooref3d2e782007-02-02 19:48:18 +0300358struct acpi_table_hpet {
359 struct acpi_table_header header; /* Common ACPI table header */
360 u32 id; /* Hardware ID of event timer block */
361 struct acpi_generic_address address; /* Address of event timer block */
362 u8 sequence; /* HPET sequence number */
363 u16 minimum_tick; /* Main counter min tick, periodic mode */
364 u8 flags;
Bob Moore793c2382006-03-31 00:00:00 -0500365};
366
Bob Mooref3d2e782007-02-02 19:48:18 +0300367/*! Flags */
368
369#define ACPI_HPET_PAGE_PROTECT (1) /* 00: No page protection */
370#define ACPI_HPET_PAGE_PROTECT_4 (1<<1) /* 01: 4KB page protected */
371#define ACPI_HPET_PAGE_PROTECT_64 (1<<2) /* 02: 64KB page protected */
372
373/*! [End] no source code translation !*/
Bob Moore793c2382006-03-31 00:00:00 -0500374
375/*******************************************************************************
376 *
377 * MADT - Multiple APIC Description Table
378 *
379 ******************************************************************************/
380
Bob Mooref3d2e782007-02-02 19:48:18 +0300381struct acpi_table_madt {
382 struct acpi_table_header header; /* Common ACPI table header */
383 u32 address; /* Physical address of local APIC */
384 u32 flags;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700385};
386
Bob Mooref3d2e782007-02-02 19:48:18 +0300387/* Flags */
Bob Moore793c2382006-03-31 00:00:00 -0500388
Bob Mooref3d2e782007-02-02 19:48:18 +0300389#define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */
Bob Moore793c2382006-03-31 00:00:00 -0500390
Bob Mooref3d2e782007-02-02 19:48:18 +0300391/* Values for PCATCompat flag */
Bob Moore793c2382006-03-31 00:00:00 -0500392
Bob Mooref3d2e782007-02-02 19:48:18 +0300393#define ACPI_MADT_DUAL_PIC 0
394#define ACPI_MADT_MULTIPLE_APIC 1
Bob Moore793c2382006-03-31 00:00:00 -0500395
Bob Mooref3d2e782007-02-02 19:48:18 +0300396/* Values for subtable type in struct acpi_subtable_header */
Bob Moore793c2382006-03-31 00:00:00 -0500397
Bob Mooref3d2e782007-02-02 19:48:18 +0300398enum acpi_madt_type {
399 ACPI_MADT_TYPE_LOCAL_APIC = 0,
400 ACPI_MADT_TYPE_IO_APIC = 1,
401 ACPI_MADT_TYPE_INTERRUPT_OVERRIDE = 2,
402 ACPI_MADT_TYPE_NMI_SOURCE = 3,
403 ACPI_MADT_TYPE_LOCAL_APIC_NMI = 4,
404 ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE = 5,
405 ACPI_MADT_TYPE_IO_SAPIC = 6,
406 ACPI_MADT_TYPE_LOCAL_SAPIC = 7,
407 ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8,
408 ACPI_MADT_TYPE_RESERVED = 9 /* 9 and greater are reserved */
409};
Bob Moore793c2382006-03-31 00:00:00 -0500410
Linus Torvalds1da177e2005-04-16 15:20:36 -0700411/*
Bob Mooref3d2e782007-02-02 19:48:18 +0300412 * MADT Sub-tables, correspond to Type in struct acpi_subtable_header
Linus Torvalds1da177e2005-04-16 15:20:36 -0700413 */
Bob Moore793c2382006-03-31 00:00:00 -0500414
Bob Mooref3d2e782007-02-02 19:48:18 +0300415/* 0: Processor Local APIC */
Bob Moore793c2382006-03-31 00:00:00 -0500416
Bob Mooref3d2e782007-02-02 19:48:18 +0300417struct acpi_madt_local_apic {
418 struct acpi_subtable_header header;
419 u8 processor_id; /* ACPI processor id */
420 u8 id; /* Processor's local APIC id */
421 u32 lapic_flags;
422};
Bob Moore793c2382006-03-31 00:00:00 -0500423
424/* 1: IO APIC */
425
Bob Mooref3d2e782007-02-02 19:48:18 +0300426struct acpi_madt_io_apic {
427 struct acpi_subtable_header header;
428 u8 id; /* I/O APIC ID */
Bob Moore793c2382006-03-31 00:00:00 -0500429 u8 reserved; /* Reserved - must be zero */
430 u32 address; /* APIC physical address */
Bob Mooref3d2e782007-02-02 19:48:18 +0300431 u32 global_irq_base; /* Global system interrupt where INTI lines start */
Bob Moore793c2382006-03-31 00:00:00 -0500432};
433
434/* 2: Interrupt Override */
435
Bob Mooref3d2e782007-02-02 19:48:18 +0300436struct acpi_madt_interrupt_override {
437 struct acpi_subtable_header header;
438 u8 bus; /* 0 - ISA */
439 u8 source_irq; /* Interrupt source (IRQ) */
440 u32 global_irq; /* Global system interrupt */
441 u16 inti_flags;
442};
Bob Moore793c2382006-03-31 00:00:00 -0500443
Bob Mooref3d2e782007-02-02 19:48:18 +0300444/* 3: NMI Source */
Bob Moore793c2382006-03-31 00:00:00 -0500445
Bob Mooref3d2e782007-02-02 19:48:18 +0300446struct acpi_madt_nmi_source {
447 struct acpi_subtable_header header;
448 u16 inti_flags;
449 u32 global_irq; /* Global system interrupt */
Bob Moore793c2382006-03-31 00:00:00 -0500450};
451
452/* 4: Local APIC NMI */
453
Bob Mooref3d2e782007-02-02 19:48:18 +0300454struct acpi_madt_local_apic_nmi {
455 struct acpi_subtable_header header;
456 u8 processor_id; /* ACPI processor id */
457 u16 inti_flags;
458 u8 lint; /* LINTn to which NMI is connected */
Bob Moore793c2382006-03-31 00:00:00 -0500459};
460
461/* 5: Address Override */
462
Bob Mooref3d2e782007-02-02 19:48:18 +0300463struct acpi_madt_local_apic_override {
464 struct acpi_subtable_header header;
465 u16 reserved; /* Reserved, must be zero */
Bob Moore793c2382006-03-31 00:00:00 -0500466 u64 address; /* APIC physical address */
467};
468
469/* 6: I/O Sapic */
470
Bob Mooref3d2e782007-02-02 19:48:18 +0300471struct acpi_madt_io_sapic {
472 struct acpi_subtable_header header;
473 u8 id; /* I/O SAPIC ID */
Bob Moore793c2382006-03-31 00:00:00 -0500474 u8 reserved; /* Reserved, must be zero */
Bob Mooref3d2e782007-02-02 19:48:18 +0300475 u32 global_irq_base; /* Global interrupt for SAPIC start */
Bob Moore793c2382006-03-31 00:00:00 -0500476 u64 address; /* SAPIC physical address */
477};
478
479/* 7: Local Sapic */
480
Bob Mooref3d2e782007-02-02 19:48:18 +0300481struct acpi_madt_local_sapic {
482 struct acpi_subtable_header header;
483 u8 processor_id; /* ACPI processor id */
484 u8 id; /* SAPIC ID */
485 u8 eid; /* SAPIC EID */
Bob Moore793c2382006-03-31 00:00:00 -0500486 u8 reserved[3]; /* Reserved, must be zero */
Bob Mooref3d2e782007-02-02 19:48:18 +0300487 u32 lapic_flags;
488 u32 uid; /* Numeric UID - ACPI 3.0 */
489 char uid_string[1]; /* String UID - ACPI 3.0 */
Bob Moore793c2382006-03-31 00:00:00 -0500490};
491
492/* 8: Platform Interrupt Source */
493
Bob Mooref3d2e782007-02-02 19:48:18 +0300494struct acpi_madt_interrupt_source {
495 struct acpi_subtable_header header;
496 u16 inti_flags;
497 u8 type; /* 1=PMI, 2=INIT, 3=corrected */
498 u8 id; /* Processor ID */
499 u8 eid; /* Processor EID */
Bob Moore793c2382006-03-31 00:00:00 -0500500 u8 io_sapic_vector; /* Vector value for PMI interrupts */
Bob Mooref3d2e782007-02-02 19:48:18 +0300501 u32 global_irq; /* Global system interrupt */
Bob Moore793c2382006-03-31 00:00:00 -0500502 u32 flags; /* Interrupt Source Flags */
503};
504
Bob Mooref3d2e782007-02-02 19:48:18 +0300505/* Flags field above */
506
507#define ACPI_MADT_CPEI_OVERRIDE (1)
508
509/*
510 * Common flags fields for MADT subtables
511 */
512
513/* MADT Local APIC flags (lapic_flags) */
514
515#define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */
516
517/* MADT MPS INTI flags (inti_flags) */
518
519#define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */
520#define ACPI_MADT_TRIGGER_MASK (3<<2) /* 02-03: Trigger mode of APIC input signals */
521
522/* Values for MPS INTI flags */
523
524#define ACPI_MADT_POLARITY_CONFORMS 0
525#define ACPI_MADT_POLARITY_ACTIVE_HIGH 1
526#define ACPI_MADT_POLARITY_RESERVED 2
527#define ACPI_MADT_POLARITY_ACTIVE_LOW 3
528
529#define ACPI_MADT_TRIGGER_CONFORMS (0)
530#define ACPI_MADT_TRIGGER_EDGE (1<<2)
531#define ACPI_MADT_TRIGGER_RESERVED (2<<2)
532#define ACPI_MADT_TRIGGER_LEVEL (3<<2)
533
Bob Moore793c2382006-03-31 00:00:00 -0500534/*******************************************************************************
535 *
536 * MCFG - PCI Memory Mapped Configuration table and sub-table
537 *
538 ******************************************************************************/
539
540struct acpi_table_mcfg {
Bob Mooref3d2e782007-02-02 19:48:18 +0300541 struct acpi_table_header header; /* Common ACPI table header */
542 u8 reserved[8];
Bob Moore793c2382006-03-31 00:00:00 -0500543};
544
Bob Mooref3d2e782007-02-02 19:48:18 +0300545/* Subtable */
546
Bob Moore793c2382006-03-31 00:00:00 -0500547struct acpi_mcfg_allocation {
Bob Mooref3d2e782007-02-02 19:48:18 +0300548 u64 address; /* Base address, processor-relative */
Bob Moore793c2382006-03-31 00:00:00 -0500549 u16 pci_segment; /* PCI segment group number */
550 u8 start_bus_number; /* Starting PCI Bus number */
551 u8 end_bus_number; /* Final PCI Bus number */
552 u32 reserved;
553};
Bob Moore793c2382006-03-31 00:00:00 -0500554
555/*******************************************************************************
556 *
557 * SBST - Smart Battery Specification Table
558 *
559 ******************************************************************************/
560
Bob Mooref3d2e782007-02-02 19:48:18 +0300561struct acpi_table_sbst {
562 struct acpi_table_header header; /* Common ACPI table header */
563 u32 warning_level;
Bob Moore793c2382006-03-31 00:00:00 -0500564 u32 low_level;
565 u32 critical_level;
566};
567
568/*******************************************************************************
569 *
570 * SLIT - System Locality Distance Information Table
571 *
572 ******************************************************************************/
573
Bob Mooref3d2e782007-02-02 19:48:18 +0300574struct acpi_table_slit {
575 struct acpi_table_header header; /* Common ACPI table header */
576 u64 locality_count;
577 u8 entry[1]; /* Real size = localities^2 */
Bob Moore793c2382006-03-31 00:00:00 -0500578};
579
580/*******************************************************************************
581 *
582 * SPCR - Serial Port Console Redirection table
583 *
584 ******************************************************************************/
585
586struct acpi_table_spcr {
Bob Mooref3d2e782007-02-02 19:48:18 +0300587 struct acpi_table_header header; /* Common ACPI table header */
588 u8 interface_type; /* 0=full 16550, 1=subset of 16550 */
Bob Moore793c2382006-03-31 00:00:00 -0500589 u8 reserved[3];
590 struct acpi_generic_address serial_port;
591 u8 interrupt_type;
592 u8 pc_interrupt;
593 u32 interrupt;
594 u8 baud_rate;
595 u8 parity;
596 u8 stop_bits;
597 u8 flow_control;
598 u8 terminal_type;
Bob Mooref3d2e782007-02-02 19:48:18 +0300599 u8 reserved1;
Bob Moore793c2382006-03-31 00:00:00 -0500600 u16 pci_device_id;
601 u16 pci_vendor_id;
602 u8 pci_bus;
603 u8 pci_device;
604 u8 pci_function;
605 u32 pci_flags;
606 u8 pci_segment;
Bob Mooref3d2e782007-02-02 19:48:18 +0300607 u32 reserved2;
Bob Moore793c2382006-03-31 00:00:00 -0500608};
609
610/*******************************************************************************
611 *
612 * SPMI - Server Platform Management Interface table
613 *
614 ******************************************************************************/
615
616struct acpi_table_spmi {
Bob Mooref3d2e782007-02-02 19:48:18 +0300617 struct acpi_table_header header; /* Common ACPI table header */
618 u8 reserved;
Bob Moore793c2382006-03-31 00:00:00 -0500619 u8 interface_type;
620 u16 spec_revision; /* Version of IPMI */
621 u8 interrupt_type;
622 u8 gpe_number; /* GPE assigned */
Bob Mooref3d2e782007-02-02 19:48:18 +0300623 u8 reserved1;
Bob Moore793c2382006-03-31 00:00:00 -0500624 u8 pci_device_flag;
625 u32 interrupt;
626 struct acpi_generic_address ipmi_register;
627 u8 pci_segment;
628 u8 pci_bus;
629 u8 pci_device;
630 u8 pci_function;
631};
632
633/*******************************************************************************
634 *
635 * SRAT - System Resource Affinity Table
636 *
637 ******************************************************************************/
638
Bob Mooref3d2e782007-02-02 19:48:18 +0300639struct acpi_table_srat {
640 struct acpi_table_header header; /* Common ACPI table header */
641 u32 table_revision; /* Must be value '1' */
642 u64 reserved; /* Reserved, must be zero */
Bob Moore793c2382006-03-31 00:00:00 -0500643};
644
Bob Mooref3d2e782007-02-02 19:48:18 +0300645/* Values for subtable type in struct acpi_subtable_header */
Bob Moore793c2382006-03-31 00:00:00 -0500646
Bob Mooref3d2e782007-02-02 19:48:18 +0300647enum acpi_srat_type {
648 ACPI_SRAT_TYPE_CPU_AFFINITY = 0,
649 ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1,
650 ACPI_SRAT_TYPE_RESERVED = 2
651};
Bob Moore793c2382006-03-31 00:00:00 -0500652
653/* SRAT sub-tables */
654
Bob Mooref3d2e782007-02-02 19:48:18 +0300655struct acpi_srat_cpu_affinity {
656 struct acpi_subtable_header header;
657 u8 proximity_domain_lo;
Bob Moore793c2382006-03-31 00:00:00 -0500658 u8 apic_id;
Bob Mooref3d2e782007-02-02 19:48:18 +0300659 u32 flags;
Bob Moore793c2382006-03-31 00:00:00 -0500660 u8 local_sapic_eid;
661 u8 proximity_domain_hi[3];
Bob Mooref3d2e782007-02-02 19:48:18 +0300662 u32 reserved; /* Reserved, must be zero */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700663};
664
Bob Mooref3d2e782007-02-02 19:48:18 +0300665/* Flags */
666
667#define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
668
669struct acpi_srat_mem_affinity {
670 struct acpi_subtable_header header;
671 u32 proximity_domain;
672 u16 reserved; /* Reserved, must be zero */
Bob Moore793c2382006-03-31 00:00:00 -0500673 u64 base_address;
Bob Mooref3d2e782007-02-02 19:48:18 +0300674 u64 length;
675 u32 memory_type; /* See acpi_address_range_id */
676 u32 flags;
677 u64 reserved1; /* Reserved, must be zero */
678};
Bob Moore793c2382006-03-31 00:00:00 -0500679
Bob Mooref3d2e782007-02-02 19:48:18 +0300680/* Flags */
Bob Moore793c2382006-03-31 00:00:00 -0500681
Bob Mooref3d2e782007-02-02 19:48:18 +0300682#define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */
683#define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */
684#define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */
Bob Moore793c2382006-03-31 00:00:00 -0500685
Bob Moore793c2382006-03-31 00:00:00 -0500686/*******************************************************************************
687 *
688 * TCPA - Trusted Computing Platform Alliance table
689 *
690 ******************************************************************************/
691
692struct acpi_table_tcpa {
Bob Mooref3d2e782007-02-02 19:48:18 +0300693 struct acpi_table_header header; /* Common ACPI table header */
694 u16 reserved;
Bob Moore793c2382006-03-31 00:00:00 -0500695 u32 max_log_length; /* Maximum length for the event log area */
696 u64 log_address; /* Address of the event log area */
697};
698
699/*******************************************************************************
700 *
701 * WDRT - Watchdog Resource Table
702 *
703 ******************************************************************************/
704
705struct acpi_table_wdrt {
Bob Mooref3d2e782007-02-02 19:48:18 +0300706 struct acpi_table_header header; /* Common ACPI table header */
707 u32 header_length; /* Watchdog Header Length */
Bob Moore793c2382006-03-31 00:00:00 -0500708 u8 pci_segment; /* PCI Segment number */
709 u8 pci_bus; /* PCI Bus number */
710 u8 pci_device; /* PCI Device number */
711 u8 pci_function; /* PCI Function number */
712 u32 timer_period; /* Period of one timer count (msec) */
713 u32 max_count; /* Maximum counter value supported */
714 u32 min_count; /* Minimum counter value */
715 u8 flags;
716 u8 reserved[3];
717 u32 entries; /* Number of watchdog entries that follow */
718};
719
Bob Mooref3d2e782007-02-02 19:48:18 +0300720/* Flags */
Bob Moore793c2382006-03-31 00:00:00 -0500721
Bob Mooref3d2e782007-02-02 19:48:18 +0300722#define ACPI_WDRT_TIMER_ENABLED (1) /* 00: Timer enabled */
Bob Moore793c2382006-03-31 00:00:00 -0500723
724/* Reset to default packing */
725
Linus Torvalds1da177e2005-04-16 15:20:36 -0700726#pragma pack()
727
Len Brown4be44fc2005-08-05 00:44:28 -0400728#endif /* __ACTBL1_H__ */