blob: 9af239bd1153fad17bdaee0b0bfbfcbc671bab80 [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/*
Len Brown75a44ce2008-04-23 23:00:13 -04008 * Copyright (C) 2000 - 2008, Intel Corp.
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 */
Bob Moore970d9c92008-04-10 19:06:42 +040061#define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */
Bob Moore793c2382006-03-31 00:00:00 -050062#define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */
63#define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */
64#define ACPI_SIG_DBGP "DBGP" /* Debug Port table */
Bob Moore2502fff2007-02-02 19:48:19 +030065#define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */
Bob Moore793c2382006-03-31 00:00:00 -050066#define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */
Bob Moore970d9c92008-04-10 19:06:42 +040067#define ACPI_SIG_EINJ "EINJ" /* Error Injection table */
68#define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */
69#define ACPI_SIG_HEST "HEST" /* Hardware Error Source Table */
Bob Moore793c2382006-03-31 00:00:00 -050070#define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */
Bob Moore970d9c92008-04-10 19:06:42 +040071#define ACPI_SIG_IBFT "IBFT" /* i_sCSI Boot Firmware Table */
Bob Moore793c2382006-03-31 00:00:00 -050072#define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */
73#define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
74#define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */
Bob Moore698c0a02008-04-10 19:06:38 +040075#define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */
Bob Moore793c2382006-03-31 00:00:00 -050076#define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */
77#define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
78#define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */
79#define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */
80#define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */
Bob Moore970d9c92008-04-10 19:06:42 +040081#define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */
82#define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */
Bob Moore793c2382006-03-31 00:00:00 -050083#define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */
84
Bob Moore793c2382006-03-31 00:00:00 -050085/*
86 * All tables must be byte-packed to match the ACPI specification, since
87 * the tables are provided by the system BIOS.
88 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070089#pragma pack(1)
90
91/*
Bob Moore793c2382006-03-31 00:00:00 -050092 * Note about bitfields: The u8 type is used for bitfields in ACPI tables.
93 * This is the only type that is even remotely portable. Anything else is not
94 * portable, so do not use any other bitfield types.
Linus Torvalds1da177e2005-04-16 15:20:36 -070095 */
Bob Moore793c2382006-03-31 00:00:00 -050096
Bob Moore970d9c92008-04-10 19:06:42 +040097/* Common Subtable header (used in MADT, SRAT, etc.) */
Bob Mooref3d2e782007-02-02 19:48:18 +030098
99struct acpi_subtable_header {
100 u8 type;
101 u8 length;
102};
103
Bob Moore970d9c92008-04-10 19:06:42 +0400104/* Common Subtable header for WHEA tables (EINJ, ERST, WDAT) */
105
106struct acpi_whea_header {
107 u8 action;
108 u8 instruction;
109 u8 flags;
110 u8 reserved;
111 struct acpi_generic_address register_region;
Bob Moore3fa34772008-04-10 19:06:43 +0400112 u64 value; /* Value used with Read/Write register */
113 u64 mask; /* Bitmask required for this register instruction */
Bob Moore970d9c92008-04-10 19:06:42 +0400114};
115
Bob Moore793c2382006-03-31 00:00:00 -0500116/*******************************************************************************
117 *
118 * ASF - Alert Standard Format table (Signature "ASF!")
119 *
Bob Moore694b0b22007-02-02 19:48:20 +0300120 * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
121 *
Bob Moore793c2382006-03-31 00:00:00 -0500122 ******************************************************************************/
123
124struct acpi_table_asf {
Bob Mooref3d2e782007-02-02 19:48:18 +0300125 struct acpi_table_header header; /* Common ACPI table header */
126};
Bob Moore793c2382006-03-31 00:00:00 -0500127
Bob Mooref3d2e782007-02-02 19:48:18 +0300128/* ASF subtable header */
Bob Moore793c2382006-03-31 00:00:00 -0500129
130struct acpi_asf_header {
Bob Mooref3d2e782007-02-02 19:48:18 +0300131 u8 type;
132 u8 reserved;
133 u16 length;
134};
Bob Moore793c2382006-03-31 00:00:00 -0500135
Bob Mooref3d2e782007-02-02 19:48:18 +0300136/* Values for Type field above */
Bob Moore793c2382006-03-31 00:00:00 -0500137
Bob Mooref3d2e782007-02-02 19:48:18 +0300138enum acpi_asf_type {
139 ACPI_ASF_TYPE_INFO = 0,
140 ACPI_ASF_TYPE_ALERT = 1,
141 ACPI_ASF_TYPE_CONTROL = 2,
142 ACPI_ASF_TYPE_BOOT = 3,
143 ACPI_ASF_TYPE_ADDRESS = 4,
144 ACPI_ASF_TYPE_RESERVED = 5
145};
Linus Torvalds1da177e2005-04-16 15:20:36 -0700146
Linus Torvalds1da177e2005-04-16 15:20:36 -0700147/*
Bob Moore793c2382006-03-31 00:00:00 -0500148 * ASF subtables
Linus Torvalds1da177e2005-04-16 15:20:36 -0700149 */
Bob Moore793c2382006-03-31 00:00:00 -0500150
151/* 0: ASF Information */
152
153struct acpi_asf_info {
Bob Mooref3d2e782007-02-02 19:48:18 +0300154 struct acpi_asf_header header;
155 u8 min_reset_value;
Bob Moore793c2382006-03-31 00:00:00 -0500156 u8 min_poll_interval;
157 u16 system_id;
158 u32 mfg_id;
159 u8 flags;
160 u8 reserved2[3];
161};
162
163/* 1: ASF Alerts */
164
165struct acpi_asf_alert {
Bob Mooref3d2e782007-02-02 19:48:18 +0300166 struct acpi_asf_header header;
167 u8 assert_mask;
Bob Moore793c2382006-03-31 00:00:00 -0500168 u8 deassert_mask;
169 u8 alerts;
170 u8 data_length;
Bob Moore775d85b2007-02-02 19:48:20 +0300171};
172
173struct acpi_asf_alert_data {
174 u8 address;
175 u8 command;
176 u8 mask;
177 u8 value;
178 u8 sensor_type;
179 u8 type;
180 u8 offset;
181 u8 source_type;
182 u8 severity;
183 u8 sensor_number;
184 u8 entity;
185 u8 instance;
Bob Moore793c2382006-03-31 00:00:00 -0500186};
187
188/* 2: ASF Remote Control */
189
190struct acpi_asf_remote {
Bob Mooref3d2e782007-02-02 19:48:18 +0300191 struct acpi_asf_header header;
192 u8 controls;
Bob Moore793c2382006-03-31 00:00:00 -0500193 u8 data_length;
194 u16 reserved2;
Bob Moore775d85b2007-02-02 19:48:20 +0300195};
196
197struct acpi_asf_control_data {
198 u8 function;
199 u8 address;
200 u8 command;
201 u8 value;
Bob Moore793c2382006-03-31 00:00:00 -0500202};
203
204/* 3: ASF RMCP Boot Options */
205
206struct acpi_asf_rmcp {
Bob Mooref3d2e782007-02-02 19:48:18 +0300207 struct acpi_asf_header header;
208 u8 capabilities[7];
Bob Moore793c2382006-03-31 00:00:00 -0500209 u8 completion_code;
210 u32 enterprise_id;
211 u8 command;
212 u16 parameter;
213 u16 boot_options;
214 u16 oem_parameters;
215};
216
217/* 4: ASF Address */
218
219struct acpi_asf_address {
Bob Mooref3d2e782007-02-02 19:48:18 +0300220 struct acpi_asf_header header;
221 u8 eprom_address;
Bob Moore793c2382006-03-31 00:00:00 -0500222 u8 devices;
Bob Moore793c2382006-03-31 00:00:00 -0500223};
224
225/*******************************************************************************
226 *
Bob Moore970d9c92008-04-10 19:06:42 +0400227 * BERT - Boot Error Record Table
228 *
229 ******************************************************************************/
230
231struct acpi_table_bert {
232 struct acpi_table_header header; /* Common ACPI table header */
233 u32 region_length; /* Length of the boot error region */
234 u64 address; /* Physical addresss of the error region */
235};
236
Bob Moore3fa34772008-04-10 19:06:43 +0400237/* Boot Error Region */
238
Bob Moore970d9c92008-04-10 19:06:42 +0400239struct acpi_bert_region {
240 u32 block_status;
241 u32 raw_data_offset;
242 u32 raw_data_length;
243 u32 data_length;
244 u32 error_severity;
Bob Moore970d9c92008-04-10 19:06:42 +0400245};
246
247/* block_status Flags */
248
249#define ACPI_BERT_UNCORRECTABLE (1)
250#define ACPI_BERT_CORRECTABLE (2)
251#define ACPI_BERT_MULTIPLE_UNCORRECTABLE (4)
252#define ACPI_BERT_MULTIPLE_CORRECTABLE (8)
253
254/*******************************************************************************
255 *
Bob Moore793c2382006-03-31 00:00:00 -0500256 * BOOT - Simple Boot Flag Table
257 *
258 ******************************************************************************/
259
260struct acpi_table_boot {
Bob Mooref3d2e782007-02-02 19:48:18 +0300261 struct acpi_table_header header; /* Common ACPI table header */
262 u8 cmos_index; /* Index in CMOS RAM for the boot register */
Bob Moore793c2382006-03-31 00:00:00 -0500263 u8 reserved[3];
264};
265
266/*******************************************************************************
267 *
268 * CPEP - Corrected Platform Error Polling table
269 *
270 ******************************************************************************/
271
272struct acpi_table_cpep {
Bob Mooref3d2e782007-02-02 19:48:18 +0300273 struct acpi_table_header header; /* Common ACPI table header */
274 u64 reserved;
Bob Moore793c2382006-03-31 00:00:00 -0500275};
276
277/* Subtable */
278
279struct acpi_cpep_polling {
280 u8 type;
281 u8 length;
Bob Mooref3d2e782007-02-02 19:48:18 +0300282 u8 id; /* Processor ID */
283 u8 eid; /* Processor EID */
284 u32 interval; /* Polling interval (msec) */
Bob Moore793c2382006-03-31 00:00:00 -0500285};
286
287/*******************************************************************************
288 *
289 * DBGP - Debug Port table
290 *
291 ******************************************************************************/
292
293struct acpi_table_dbgp {
Bob Mooref3d2e782007-02-02 19:48:18 +0300294 struct acpi_table_header header; /* Common ACPI table header */
295 u8 type; /* 0=full 16550, 1=subset of 16550 */
Bob Moore793c2382006-03-31 00:00:00 -0500296 u8 reserved[3];
297 struct acpi_generic_address debug_port;
298};
299
300/*******************************************************************************
301 *
Bob Moore2502fff2007-02-02 19:48:19 +0300302 * DMAR - DMA Remapping table
303 *
304 ******************************************************************************/
305
306struct acpi_table_dmar {
307 struct acpi_table_header header; /* Common ACPI table header */
308 u8 width; /* Host Address Width */
Keshavamurthy, Anil S10e52472007-10-21 16:41:41 -0700309 u8 flags;
310 u8 reserved[10];
Bob Moore2502fff2007-02-02 19:48:19 +0300311};
312
313/* DMAR subtable header */
314
315struct acpi_dmar_header {
316 u16 type;
317 u16 length;
Bob Moore2502fff2007-02-02 19:48:19 +0300318};
319
320/* Values for subtable type in struct acpi_dmar_header */
321
322enum acpi_dmar_type {
323 ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
324 ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
Keshavamurthy, Anil S10e52472007-10-21 16:41:41 -0700325 ACPI_DMAR_TYPE_ATSR = 2,
326 ACPI_DMAR_TYPE_RESERVED = 3 /* 3 and greater are reserved */
Bob Moore2502fff2007-02-02 19:48:19 +0300327};
328
329struct acpi_dmar_device_scope {
330 u8 entry_type;
331 u8 length;
Keshavamurthy, Anil S10e52472007-10-21 16:41:41 -0700332 u16 reserved;
333 u8 enumeration_id;
Bob Moore2502fff2007-02-02 19:48:19 +0300334 u8 bus;
335};
336
337/* Values for entry_type in struct acpi_dmar_device_scope */
338
339enum acpi_dmar_scope_type {
340 ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
341 ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
342 ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
Keshavamurthy, Anil S10e52472007-10-21 16:41:41 -0700343 ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
344 ACPI_DMAR_SCOPE_TYPE_HPET = 4,
345 ACPI_DMAR_SCOPE_TYPE_RESERVED = 5 /* 5 and greater are reserved */
346};
347
348struct acpi_dmar_pci_path {
349 u8 dev;
350 u8 fn;
Bob Moore2502fff2007-02-02 19:48:19 +0300351};
352
353/*
354 * DMAR Sub-tables, correspond to Type in struct acpi_dmar_header
355 */
356
357/* 0: Hardware Unit Definition */
358
359struct acpi_dmar_hardware_unit {
360 struct acpi_dmar_header header;
Keshavamurthy, Anil S10e52472007-10-21 16:41:41 -0700361 u8 flags;
362 u8 reserved;
363 u16 segment;
Bob Moore2502fff2007-02-02 19:48:19 +0300364 u64 address; /* Register Base Address */
365};
366
367/* Flags */
368
369#define ACPI_DMAR_INCLUDE_ALL (1)
370
371/* 1: Reserved Memory Defininition */
372
373struct acpi_dmar_reserved_memory {
374 struct acpi_dmar_header header;
Keshavamurthy, Anil S10e52472007-10-21 16:41:41 -0700375 u16 reserved;
376 u16 segment;
377 u64 base_address; /* 4_k aligned base address */
Bob Moore2502fff2007-02-02 19:48:19 +0300378 u64 end_address; /* 4_k aligned limit address */
379};
380
381/* Flags */
382
383#define ACPI_DMAR_ALLOW_ALL (1)
384
385/*******************************************************************************
386 *
Bob Moore793c2382006-03-31 00:00:00 -0500387 * ECDT - Embedded Controller Boot Resources Table
388 *
389 ******************************************************************************/
390
Bob Mooref3d2e782007-02-02 19:48:18 +0300391struct acpi_table_ecdt {
392 struct acpi_table_header header; /* Common ACPI table header */
393 struct acpi_generic_address control; /* Address of EC command/status register */
394 struct acpi_generic_address data; /* Address of EC data register */
Bob Moore793c2382006-03-31 00:00:00 -0500395 u32 uid; /* Unique ID - must be same as the EC _UID method */
Bob Mooref3d2e782007-02-02 19:48:18 +0300396 u8 gpe; /* The GPE for the EC */
397 u8 id[1]; /* Full namepath of the EC in the ACPI namespace */
Bob Moore793c2382006-03-31 00:00:00 -0500398};
399
400/*******************************************************************************
401 *
Bob Moore970d9c92008-04-10 19:06:42 +0400402 * EINJ - Error Injection Table
403 *
404 ******************************************************************************/
405
406struct acpi_table_einj {
407 struct acpi_table_header header; /* Common ACPI table header */
408 u32 header_length;
409 u32 reserved;
410 u32 entries;
411};
412
413/* EINJ Injection Instruction Entries (actions) */
414
415struct acpi_einj_entry {
416 struct acpi_whea_header whea_header; /* Common header for WHEA tables */
417};
418
419/* Values for Action field above */
420
421enum acpi_einj_actions {
422 ACPI_EINJ_BEGIN_OPERATION = 0,
423 ACPI_EINJ_GET_TRIGGER_TABLE = 1,
424 ACPI_EINJ_SET_ERROR_TYPE = 2,
425 ACPI_EINJ_GET_ERROR_TYPE = 3,
426 ACPI_EINJ_END_OPERATION = 4,
427 ACPI_EINJ_EXECUTE_OPERATION = 5,
428 ACPI_EINJ_CHECK_BUSY_STATUS = 6,
429 ACPI_EINJ_GET_COMMAND_STATUS = 7,
430 ACPI_EINJ_ACTION_RESERVED = 8, /* 8 and greater are reserved */
431 ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */
432};
433
434/* Values for Instruction field above */
435
436enum acpi_einj_instructions {
437 ACPI_EINJ_READ_REGISTER = 0,
438 ACPI_EINJ_READ_REGISTER_VALUE = 1,
439 ACPI_EINJ_WRITE_REGISTER = 2,
440 ACPI_EINJ_WRITE_REGISTER_VALUE = 3,
441 ACPI_EINJ_NOOP = 4,
442 ACPI_EINJ_INSTRUCTION_RESERVED = 5 /* 5 and greater are reserved */
443};
444
Bob Moore3fa34772008-04-10 19:06:43 +0400445/* EINJ Trigger Error Action Table */
446
447struct acpi_einj_trigger {
448 u32 header_size;
449 u32 revision;
450 u32 table_size;
451 u32 entry_count;
452};
453
Bob Moore970d9c92008-04-10 19:06:42 +0400454/*******************************************************************************
455 *
456 * ERST - Error Record Serialization Table
457 *
458 ******************************************************************************/
459
460struct acpi_table_erst {
461 struct acpi_table_header header; /* Common ACPI table header */
462 u32 header_length;
463 u32 reserved;
464 u32 entries;
465};
466
467/* ERST Serialization Entries (actions) */
468
469struct acpi_erst_entry {
470 struct acpi_whea_header whea_header; /* Common header for WHEA tables */
471};
472
473/* Values for Action field above */
474
475enum acpi_erst_actions {
476 ACPI_ERST_BEGIN_WRITE_OPERATION = 0,
477 ACPI_ERST_BEGIN_READ_OPERATION = 1,
478 ACPI_ERST_BETGIN_CLEAR_OPERATION = 2,
479 ACPI_ERST_END_OPERATION = 3,
480 ACPI_ERST_SET_RECORD_OFFSET = 4,
481 ACPI_ERST_EXECUTE_OPERATION = 5,
482 ACPI_ERST_CHECK_BUSY_STATUS = 6,
483 ACPI_ERST_GET_COMMAND_STATUS = 7,
484 ACPI_ERST_GET_RECORD_IDENTIFIER = 8,
485 ACPI_ERST_SET_RECORD_IDENTIFIER = 9,
486 ACPI_ERST_GET_RECORD_COUNT = 10,
487 ACPI_ERST_BEGIN_DUMMY_WRIITE = 11,
488 ACPI_ERST_NOT_USED = 12,
489 ACPI_ERST_GET_ERROR_RANGE = 13,
490 ACPI_ERST_GET_ERROR_LENGTH = 14,
491 ACPI_ERST_GET_ERROR_ATTRIBUTES = 15,
492 ACPI_ERST_ACTION_RESERVED = 16 /* 16 and greater are reserved */
493};
494
495/* Values for Instruction field above */
496
497enum acpi_erst_instructions {
498 ACPI_ERST_READ_REGISTER = 0,
499 ACPI_ERST_READ_REGISTER_VALUE = 1,
500 ACPI_ERST_WRITE_REGISTER = 2,
501 ACPI_ERST_WRITE_REGISTER_VALUE = 3,
502 ACPI_ERST_NOOP = 4,
503 ACPI_ERST_LOAD_VAR1 = 5,
504 ACPI_ERST_LOAD_VAR2 = 6,
505 ACPI_ERST_STORE_VAR1 = 7,
506 ACPI_ERST_ADD = 8,
507 ACPI_ERST_SUBTRACT = 9,
508 ACPI_ERST_ADD_VALUE = 10,
509 ACPI_ERST_SUBTRACT_VALUE = 11,
510 ACPI_ERST_STALL = 12,
511 ACPI_ERST_STALL_WHILE_TRUE = 13,
512 ACPI_ERST_SKIP_NEXT_IF_TRUE = 14,
513 ACPI_ERST_GOTO = 15,
514 ACPI_ERST_SET_SRC_ADDRESS_BASE = 16,
515 ACPI_ERST_SET_DST_ADDRESS_BASE = 17,
516 ACPI_ERST_MOVE_DATA = 18,
517 ACPI_ERST_INSTRUCTION_RESERVED = 19 /* 19 and greater are reserved */
518};
519
520/*******************************************************************************
521 *
522 * HEST - Hardware Error Source Table
523 *
524 ******************************************************************************/
525
526struct acpi_table_hest {
527 struct acpi_table_header header; /* Common ACPI table header */
528 u32 error_source_count;
529};
530
Bob Moore3fa34772008-04-10 19:06:43 +0400531/* HEST subtable header */
532
533struct acpi_hest_header {
534 u16 type;
535};
536
537/* Values for Type field above for subtables */
538
539enum acpi_hest_types {
540 ACPI_HEST_TYPE_XPF_MACHINE_CHECK = 0,
541 ACPI_HEST_TYPE_XPF_CORRECTED_MACHINE_CHECK = 1,
542 ACPI_HEST_TYPE_XPF_UNUSED = 2,
543 ACPI_HEST_TYPE_XPF_NON_MASKABLE_INTERRUPT = 3,
544 ACPI_HEST_TYPE_IPF_CORRECTED_MACHINE_CHECK = 4,
545 ACPI_HEST_TYPE_IPF_CORRECTED_PLATFORM_ERROR = 5,
546 ACPI_HEST_TYPE_AER_ROOT_PORT = 6,
547 ACPI_HEST_TYPE_AER_ENDPOINT = 7,
548 ACPI_HEST_TYPE_AER_BRIDGE = 8,
549 ACPI_HEST_TYPE_GENERIC_HARDWARE_ERROR_SOURCE = 9,
550 ACPI_HEST_TYPE_RESERVED = 10 /* 10 and greater are reserved */
551};
552
553/*
554 * HEST Sub-subtables
555 */
556
557/* XPF Machine Check Error Bank */
558
559struct acpi_hest_xpf_error_bank {
560 u8 bank_number;
561 u8 clear_status_on_init;
562 u8 status_format;
563 u8 config_write_enable;
564 u32 control_register;
565 u64 control_init_data;
566 u32 status_register;
567 u32 address_register;
568 u32 misc_register;
569};
570
571/* Generic Error Status */
572
573struct acpi_hest_generic_status {
574 u32 block_status;
575 u32 raw_data_offset;
576 u32 raw_data_length;
577 u32 data_length;
578 u32 error_severity;
579};
580
581/* Generic Error Data */
582
583struct acpi_hest_generic_data {
584 u8 section_type[16];
585 u32 error_severity;
586 u16 revision;
587 u8 validation_bits;
588 u8 flags;
589 u32 error_data_length;
590 u8 fru_id[16];
591 u8 fru_text[20];
592};
593
594/* Common HEST structure for PCI/AER types below (6,7,8) */
595
596struct acpi_hest_aer_common {
597 u16 source_id;
598 u16 config_write_enable;
599 u8 flags;
600 u8 enabled;
601 u32 records_to_pre_allocate;
602 u32 max_sections_per_record;
603 u32 bus;
604 u16 device;
605 u16 function;
606 u16 device_control;
607 u16 reserved;
608 u32 uncorrectable_error_mask;
609 u32 uncorrectable_error_severity;
610 u32 correctable_error_mask;
611 u32 advanced_error_cababilities;
612};
613
614/* Hardware Error Notification */
615
616struct acpi_hest_notify {
617 u8 type;
618 u8 length;
619 u16 config_write_enable;
620 u32 poll_interval;
621 u32 vector;
622 u32 polling_threshold_value;
623 u32 polling_threshold_window;
624 u32 error_threshold_value;
625 u32 error_threshold_window;
626};
627
628/* Values for Notify Type field above */
629
630enum acpi_hest_notify_types {
631 ACPI_HEST_NOTIFY_POLLED = 0,
632 ACPI_HEST_NOTIFY_EXTERNAL = 1,
633 ACPI_HEST_NOTIFY_LOCAL = 2,
634 ACPI_HEST_NOTIFY_SCI = 3,
635 ACPI_HEST_NOTIFY_NMI = 4,
636 ACPI_HEST_NOTIFY_RESERVED = 5 /* 5 and greater are reserved */
637};
638
639/*
640 * HEST subtables
641 *
642 * From WHEA Design Document, 16 May 2007.
643 * Note: There is no subtable type 2 in this version of the document,
644 * and there are two different subtable type 3s.
645 */
646
647 /* 0: XPF Machine Check Exception */
648
649struct acpi_hest_xpf_machine_check {
650 struct acpi_hest_header header;
651 u16 source_id;
652 u16 config_write_enable;
653 u8 flags;
654 u8 reserved1;
655 u32 records_to_pre_allocate;
656 u32 max_sections_per_record;
657 u64 global_capability_data;
658 u64 global_control_data;
659 u8 num_hardware_banks;
660 u8 reserved2[7];
661};
662
663/* 1: XPF Corrected Machine Check */
664
665struct acpi_table_hest_xpf_corrected {
666 struct acpi_hest_header header;
667 u16 source_id;
668 u16 config_write_enable;
669 u8 flags;
670 u8 enabled;
671 u32 records_to_pre_allocate;
672 u32 max_sections_per_record;
673 struct acpi_hest_notify notify;
674 u8 num_hardware_banks;
675 u8 reserved[3];
676};
677
678/* 3: XPF Non-Maskable Interrupt */
679
680struct acpi_hest_xpf_nmi {
681 struct acpi_hest_header header;
682 u16 source_id;
683 u32 reserved;
684 u32 records_to_pre_allocate;
685 u32 max_sections_per_record;
686 u32 max_raw_data_length;
687};
688
689/* 4: IPF Corrected Machine Check */
690
691struct acpi_hest_ipf_corrected {
692 struct acpi_hest_header header;
693 u8 enabled;
694 u8 reserved;
695};
696
697/* 5: IPF Corrected Platform Error */
698
699struct acpi_hest_ipf_corrected_platform {
700 struct acpi_hest_header header;
701 u8 enabled;
702 u8 reserved;
703};
704
705/* 6: PCI Express Root Port AER */
706
707struct acpi_hest_aer_root {
708 struct acpi_hest_header header;
709 struct acpi_hest_aer_common aer;
710 u32 root_error_command;
711};
712
713/* 7: PCI Express AER (AER Endpoint) */
714
715struct acpi_hest_aer {
716 struct acpi_hest_header header;
717 struct acpi_hest_aer_common aer;
718};
719
720/* 8: PCI Express/PCI-X Bridge AER */
721
722struct acpi_hest_aer_bridge {
723 struct acpi_hest_header header;
724 struct acpi_hest_aer_common aer;
725 u32 secondary_uncorrectable_error_mask;
726 u32 secondary_uncorrectable_error_severity;
727 u32 secondary_advanced_capabilities;
728};
729
730/* 9: Generic Hardware Error Source */
731
732struct acpi_hest_generic {
733 struct acpi_hest_header header;
734 u16 source_id;
735 u16 related_source_id;
736 u8 config_write_enable;
737 u8 enabled;
738 u32 records_to_pre_allocate;
739 u32 max_sections_per_record;
740 u32 max_raw_data_length;
741 struct acpi_generic_address error_status_address;
742 struct acpi_hest_notify notify;
743 u32 error_status_block_length;
744};
Bob Moore970d9c92008-04-10 19:06:42 +0400745
746/*******************************************************************************
747 *
Bob Moore793c2382006-03-31 00:00:00 -0500748 * HPET - High Precision Event Timer table
749 *
750 ******************************************************************************/
751
Bob Mooref3d2e782007-02-02 19:48:18 +0300752struct acpi_table_hpet {
753 struct acpi_table_header header; /* Common ACPI table header */
754 u32 id; /* Hardware ID of event timer block */
755 struct acpi_generic_address address; /* Address of event timer block */
756 u8 sequence; /* HPET sequence number */
757 u16 minimum_tick; /* Main counter min tick, periodic mode */
758 u8 flags;
Bob Moore793c2382006-03-31 00:00:00 -0500759};
760
Bob Mooref3d2e782007-02-02 19:48:18 +0300761/*! Flags */
762
763#define ACPI_HPET_PAGE_PROTECT (1) /* 00: No page protection */
764#define ACPI_HPET_PAGE_PROTECT_4 (1<<1) /* 01: 4KB page protected */
765#define ACPI_HPET_PAGE_PROTECT_64 (1<<2) /* 02: 64KB page protected */
766
767/*! [End] no source code translation !*/
Bob Moore793c2382006-03-31 00:00:00 -0500768
769/*******************************************************************************
770 *
Bob Moore3fa34772008-04-10 19:06:43 +0400771 * IBFT - Boot Firmware Table
Bob Moore970d9c92008-04-10 19:06:42 +0400772 *
773 ******************************************************************************/
774
775struct acpi_table_ibft {
776 struct acpi_table_header header; /* Common ACPI table header */
777 u8 reserved[12];
778};
779
780/* IBFT common subtable header */
781
782struct acpi_ibft_header {
783 u8 type;
784 u8 version;
785 u16 length;
786 u8 index;
787 u8 flags;
788};
789
790/* Values for Type field above */
791
792enum acpi_ibft_type {
793 ACPI_IBFT_TYPE_NOT_USED = 0,
794 ACPI_IBFT_TYPE_CONTROL = 1,
795 ACPI_IBFT_TYPE_INITIATOR = 2,
796 ACPI_IBFT_TYPE_NIC = 3,
797 ACPI_IBFT_TYPE_TARGET = 4,
798 ACPI_IBFT_TYPE_EXTENSIONS = 5,
799 ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */
800};
801
802/* IBFT subtables */
803
804struct acpi_ibft_control {
805 struct acpi_ibft_header header;
806 u16 extensions;
807 u16 initiator_offset;
808 u16 nic0_offset;
809 u16 target0_offset;
810 u16 nic1_offset;
811 u16 target1_offset;
812};
813
814struct acpi_ibft_initiator {
815 struct acpi_ibft_header header;
816 u8 sns_server[16];
817 u8 slp_server[16];
818 u8 primary_server[16];
819 u8 secondary_server[16];
820 u16 name_length;
821 u16 name_offset;
822};
823
824struct acpi_ibft_nic {
825 struct acpi_ibft_header header;
826 u8 ip_address[16];
827 u8 subnet_mask_prefix;
828 u8 origin;
829 u8 gateway[16];
830 u8 primary_dns[16];
831 u8 secondary_dns[16];
832 u8 dhcp[16];
833 u16 vlan;
834 u8 mac_address[6];
835 u16 pci_address;
836 u16 name_length;
837 u16 name_offset;
838};
839
840struct acpi_ibft_target {
841 struct acpi_ibft_header header;
842 u8 target_ip_address[16];
843 u16 target_ip_socket;
844 u8 target_boot_lun[8];
845 u8 chap_type;
846 u8 nic_association;
847 u16 target_name_length;
848 u16 target_name_offset;
849 u16 chap_name_length;
850 u16 chap_name_offset;
851 u16 chap_secret_length;
852 u16 chap_secret_offset;
853 u16 reverse_chap_name_length;
854 u16 reverse_chap_name_offset;
855 u16 reverse_chap_secret_length;
856 u16 reverse_chap_secret_offset;
857};
858
859/*******************************************************************************
860 *
Bob Moore793c2382006-03-31 00:00:00 -0500861 * MADT - Multiple APIC Description Table
862 *
863 ******************************************************************************/
864
Bob Mooref3d2e782007-02-02 19:48:18 +0300865struct acpi_table_madt {
866 struct acpi_table_header header; /* Common ACPI table header */
867 u32 address; /* Physical address of local APIC */
868 u32 flags;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700869};
870
Bob Mooref3d2e782007-02-02 19:48:18 +0300871/* Flags */
Bob Moore793c2382006-03-31 00:00:00 -0500872
Bob Mooref3d2e782007-02-02 19:48:18 +0300873#define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */
Bob Moore793c2382006-03-31 00:00:00 -0500874
Bob Mooref3d2e782007-02-02 19:48:18 +0300875/* Values for PCATCompat flag */
Bob Moore793c2382006-03-31 00:00:00 -0500876
Bob Mooref3d2e782007-02-02 19:48:18 +0300877#define ACPI_MADT_DUAL_PIC 0
878#define ACPI_MADT_MULTIPLE_APIC 1
Bob Moore793c2382006-03-31 00:00:00 -0500879
Bob Mooref3d2e782007-02-02 19:48:18 +0300880/* Values for subtable type in struct acpi_subtable_header */
Bob Moore793c2382006-03-31 00:00:00 -0500881
Bob Mooref3d2e782007-02-02 19:48:18 +0300882enum acpi_madt_type {
883 ACPI_MADT_TYPE_LOCAL_APIC = 0,
884 ACPI_MADT_TYPE_IO_APIC = 1,
885 ACPI_MADT_TYPE_INTERRUPT_OVERRIDE = 2,
886 ACPI_MADT_TYPE_NMI_SOURCE = 3,
887 ACPI_MADT_TYPE_LOCAL_APIC_NMI = 4,
888 ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE = 5,
889 ACPI_MADT_TYPE_IO_SAPIC = 6,
890 ACPI_MADT_TYPE_LOCAL_SAPIC = 7,
891 ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8,
892 ACPI_MADT_TYPE_RESERVED = 9 /* 9 and greater are reserved */
893};
Bob Moore793c2382006-03-31 00:00:00 -0500894
Linus Torvalds1da177e2005-04-16 15:20:36 -0700895/*
Bob Mooref3d2e782007-02-02 19:48:18 +0300896 * MADT Sub-tables, correspond to Type in struct acpi_subtable_header
Linus Torvalds1da177e2005-04-16 15:20:36 -0700897 */
Bob Moore793c2382006-03-31 00:00:00 -0500898
Bob Mooref3d2e782007-02-02 19:48:18 +0300899/* 0: Processor Local APIC */
Bob Moore793c2382006-03-31 00:00:00 -0500900
Bob Mooref3d2e782007-02-02 19:48:18 +0300901struct acpi_madt_local_apic {
902 struct acpi_subtable_header header;
903 u8 processor_id; /* ACPI processor id */
904 u8 id; /* Processor's local APIC id */
905 u32 lapic_flags;
906};
Bob Moore793c2382006-03-31 00:00:00 -0500907
908/* 1: IO APIC */
909
Bob Mooref3d2e782007-02-02 19:48:18 +0300910struct acpi_madt_io_apic {
911 struct acpi_subtable_header header;
912 u8 id; /* I/O APIC ID */
Bob Moore793c2382006-03-31 00:00:00 -0500913 u8 reserved; /* Reserved - must be zero */
914 u32 address; /* APIC physical address */
Bob Mooref3d2e782007-02-02 19:48:18 +0300915 u32 global_irq_base; /* Global system interrupt where INTI lines start */
Bob Moore793c2382006-03-31 00:00:00 -0500916};
917
918/* 2: Interrupt Override */
919
Bob Mooref3d2e782007-02-02 19:48:18 +0300920struct acpi_madt_interrupt_override {
921 struct acpi_subtable_header header;
922 u8 bus; /* 0 - ISA */
923 u8 source_irq; /* Interrupt source (IRQ) */
924 u32 global_irq; /* Global system interrupt */
925 u16 inti_flags;
926};
Bob Moore793c2382006-03-31 00:00:00 -0500927
Bob Mooref3d2e782007-02-02 19:48:18 +0300928/* 3: NMI Source */
Bob Moore793c2382006-03-31 00:00:00 -0500929
Bob Mooref3d2e782007-02-02 19:48:18 +0300930struct acpi_madt_nmi_source {
931 struct acpi_subtable_header header;
932 u16 inti_flags;
933 u32 global_irq; /* Global system interrupt */
Bob Moore793c2382006-03-31 00:00:00 -0500934};
935
936/* 4: Local APIC NMI */
937
Bob Mooref3d2e782007-02-02 19:48:18 +0300938struct acpi_madt_local_apic_nmi {
939 struct acpi_subtable_header header;
940 u8 processor_id; /* ACPI processor id */
941 u16 inti_flags;
942 u8 lint; /* LINTn to which NMI is connected */
Bob Moore793c2382006-03-31 00:00:00 -0500943};
944
945/* 5: Address Override */
946
Bob Mooref3d2e782007-02-02 19:48:18 +0300947struct acpi_madt_local_apic_override {
948 struct acpi_subtable_header header;
949 u16 reserved; /* Reserved, must be zero */
Bob Moore793c2382006-03-31 00:00:00 -0500950 u64 address; /* APIC physical address */
951};
952
953/* 6: I/O Sapic */
954
Bob Mooref3d2e782007-02-02 19:48:18 +0300955struct acpi_madt_io_sapic {
956 struct acpi_subtable_header header;
957 u8 id; /* I/O SAPIC ID */
Bob Moore793c2382006-03-31 00:00:00 -0500958 u8 reserved; /* Reserved, must be zero */
Bob Mooref3d2e782007-02-02 19:48:18 +0300959 u32 global_irq_base; /* Global interrupt for SAPIC start */
Bob Moore793c2382006-03-31 00:00:00 -0500960 u64 address; /* SAPIC physical address */
961};
962
963/* 7: Local Sapic */
964
Bob Mooref3d2e782007-02-02 19:48:18 +0300965struct acpi_madt_local_sapic {
966 struct acpi_subtable_header header;
967 u8 processor_id; /* ACPI processor id */
968 u8 id; /* SAPIC ID */
969 u8 eid; /* SAPIC EID */
Bob Moore793c2382006-03-31 00:00:00 -0500970 u8 reserved[3]; /* Reserved, must be zero */
Bob Mooref3d2e782007-02-02 19:48:18 +0300971 u32 lapic_flags;
972 u32 uid; /* Numeric UID - ACPI 3.0 */
973 char uid_string[1]; /* String UID - ACPI 3.0 */
Bob Moore793c2382006-03-31 00:00:00 -0500974};
975
976/* 8: Platform Interrupt Source */
977
Bob Mooref3d2e782007-02-02 19:48:18 +0300978struct acpi_madt_interrupt_source {
979 struct acpi_subtable_header header;
980 u16 inti_flags;
981 u8 type; /* 1=PMI, 2=INIT, 3=corrected */
982 u8 id; /* Processor ID */
983 u8 eid; /* Processor EID */
Bob Moore793c2382006-03-31 00:00:00 -0500984 u8 io_sapic_vector; /* Vector value for PMI interrupts */
Bob Mooref3d2e782007-02-02 19:48:18 +0300985 u32 global_irq; /* Global system interrupt */
Bob Moore793c2382006-03-31 00:00:00 -0500986 u32 flags; /* Interrupt Source Flags */
987};
988
Bob Mooref3d2e782007-02-02 19:48:18 +0300989/* Flags field above */
990
991#define ACPI_MADT_CPEI_OVERRIDE (1)
992
993/*
994 * Common flags fields for MADT subtables
995 */
996
997/* MADT Local APIC flags (lapic_flags) */
998
999#define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */
1000
1001/* MADT MPS INTI flags (inti_flags) */
1002
1003#define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */
1004#define ACPI_MADT_TRIGGER_MASK (3<<2) /* 02-03: Trigger mode of APIC input signals */
1005
1006/* Values for MPS INTI flags */
1007
1008#define ACPI_MADT_POLARITY_CONFORMS 0
1009#define ACPI_MADT_POLARITY_ACTIVE_HIGH 1
1010#define ACPI_MADT_POLARITY_RESERVED 2
1011#define ACPI_MADT_POLARITY_ACTIVE_LOW 3
1012
1013#define ACPI_MADT_TRIGGER_CONFORMS (0)
1014#define ACPI_MADT_TRIGGER_EDGE (1<<2)
1015#define ACPI_MADT_TRIGGER_RESERVED (2<<2)
1016#define ACPI_MADT_TRIGGER_LEVEL (3<<2)
1017
Bob Moore793c2382006-03-31 00:00:00 -05001018/*******************************************************************************
1019 *
1020 * MCFG - PCI Memory Mapped Configuration table and sub-table
1021 *
1022 ******************************************************************************/
1023
1024struct acpi_table_mcfg {
Bob Mooref3d2e782007-02-02 19:48:18 +03001025 struct acpi_table_header header; /* Common ACPI table header */
1026 u8 reserved[8];
Bob Moore793c2382006-03-31 00:00:00 -05001027};
1028
Bob Mooref3d2e782007-02-02 19:48:18 +03001029/* Subtable */
1030
Bob Moore793c2382006-03-31 00:00:00 -05001031struct acpi_mcfg_allocation {
Bob Mooref3d2e782007-02-02 19:48:18 +03001032 u64 address; /* Base address, processor-relative */
Bob Moore793c2382006-03-31 00:00:00 -05001033 u16 pci_segment; /* PCI segment group number */
1034 u8 start_bus_number; /* Starting PCI Bus number */
1035 u8 end_bus_number; /* Final PCI Bus number */
1036 u32 reserved;
1037};
Bob Moore793c2382006-03-31 00:00:00 -05001038
1039/*******************************************************************************
1040 *
1041 * SBST - Smart Battery Specification Table
1042 *
1043 ******************************************************************************/
1044
Bob Mooref3d2e782007-02-02 19:48:18 +03001045struct acpi_table_sbst {
1046 struct acpi_table_header header; /* Common ACPI table header */
1047 u32 warning_level;
Bob Moore793c2382006-03-31 00:00:00 -05001048 u32 low_level;
1049 u32 critical_level;
1050};
1051
1052/*******************************************************************************
1053 *
1054 * SLIT - System Locality Distance Information Table
1055 *
1056 ******************************************************************************/
1057
Bob Mooref3d2e782007-02-02 19:48:18 +03001058struct acpi_table_slit {
1059 struct acpi_table_header header; /* Common ACPI table header */
1060 u64 locality_count;
1061 u8 entry[1]; /* Real size = localities^2 */
Bob Moore793c2382006-03-31 00:00:00 -05001062};
1063
1064/*******************************************************************************
1065 *
1066 * SPCR - Serial Port Console Redirection table
1067 *
1068 ******************************************************************************/
1069
1070struct acpi_table_spcr {
Bob Mooref3d2e782007-02-02 19:48:18 +03001071 struct acpi_table_header header; /* Common ACPI table header */
1072 u8 interface_type; /* 0=full 16550, 1=subset of 16550 */
Bob Moore793c2382006-03-31 00:00:00 -05001073 u8 reserved[3];
1074 struct acpi_generic_address serial_port;
1075 u8 interrupt_type;
1076 u8 pc_interrupt;
1077 u32 interrupt;
1078 u8 baud_rate;
1079 u8 parity;
1080 u8 stop_bits;
1081 u8 flow_control;
1082 u8 terminal_type;
Bob Mooref3d2e782007-02-02 19:48:18 +03001083 u8 reserved1;
Bob Moore793c2382006-03-31 00:00:00 -05001084 u16 pci_device_id;
1085 u16 pci_vendor_id;
1086 u8 pci_bus;
1087 u8 pci_device;
1088 u8 pci_function;
1089 u32 pci_flags;
1090 u8 pci_segment;
Bob Mooref3d2e782007-02-02 19:48:18 +03001091 u32 reserved2;
Bob Moore793c2382006-03-31 00:00:00 -05001092};
1093
1094/*******************************************************************************
1095 *
1096 * SPMI - Server Platform Management Interface table
1097 *
1098 ******************************************************************************/
1099
1100struct acpi_table_spmi {
Bob Mooref3d2e782007-02-02 19:48:18 +03001101 struct acpi_table_header header; /* Common ACPI table header */
1102 u8 reserved;
Bob Moore793c2382006-03-31 00:00:00 -05001103 u8 interface_type;
1104 u16 spec_revision; /* Version of IPMI */
1105 u8 interrupt_type;
1106 u8 gpe_number; /* GPE assigned */
Bob Mooref3d2e782007-02-02 19:48:18 +03001107 u8 reserved1;
Bob Moore793c2382006-03-31 00:00:00 -05001108 u8 pci_device_flag;
1109 u32 interrupt;
1110 struct acpi_generic_address ipmi_register;
1111 u8 pci_segment;
1112 u8 pci_bus;
1113 u8 pci_device;
1114 u8 pci_function;
1115};
1116
1117/*******************************************************************************
1118 *
1119 * SRAT - System Resource Affinity Table
1120 *
1121 ******************************************************************************/
1122
Bob Mooref3d2e782007-02-02 19:48:18 +03001123struct acpi_table_srat {
1124 struct acpi_table_header header; /* Common ACPI table header */
1125 u32 table_revision; /* Must be value '1' */
1126 u64 reserved; /* Reserved, must be zero */
Bob Moore793c2382006-03-31 00:00:00 -05001127};
1128
Bob Mooref3d2e782007-02-02 19:48:18 +03001129/* Values for subtable type in struct acpi_subtable_header */
Bob Moore793c2382006-03-31 00:00:00 -05001130
Bob Mooref3d2e782007-02-02 19:48:18 +03001131enum acpi_srat_type {
1132 ACPI_SRAT_TYPE_CPU_AFFINITY = 0,
1133 ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1,
1134 ACPI_SRAT_TYPE_RESERVED = 2
1135};
Bob Moore793c2382006-03-31 00:00:00 -05001136
1137/* SRAT sub-tables */
1138
Bob Mooref3d2e782007-02-02 19:48:18 +03001139struct acpi_srat_cpu_affinity {
1140 struct acpi_subtable_header header;
1141 u8 proximity_domain_lo;
Bob Moore793c2382006-03-31 00:00:00 -05001142 u8 apic_id;
Bob Mooref3d2e782007-02-02 19:48:18 +03001143 u32 flags;
Bob Moore793c2382006-03-31 00:00:00 -05001144 u8 local_sapic_eid;
1145 u8 proximity_domain_hi[3];
Bob Mooref3d2e782007-02-02 19:48:18 +03001146 u32 reserved; /* Reserved, must be zero */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001147};
1148
Bob Mooref3d2e782007-02-02 19:48:18 +03001149/* Flags */
1150
1151#define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
1152
1153struct acpi_srat_mem_affinity {
1154 struct acpi_subtable_header header;
1155 u32 proximity_domain;
1156 u16 reserved; /* Reserved, must be zero */
Bob Moore793c2382006-03-31 00:00:00 -05001157 u64 base_address;
Bob Mooref3d2e782007-02-02 19:48:18 +03001158 u64 length;
1159 u32 memory_type; /* See acpi_address_range_id */
1160 u32 flags;
1161 u64 reserved1; /* Reserved, must be zero */
1162};
Bob Moore793c2382006-03-31 00:00:00 -05001163
Bob Mooref3d2e782007-02-02 19:48:18 +03001164/* Flags */
Bob Moore793c2382006-03-31 00:00:00 -05001165
Bob Mooref3d2e782007-02-02 19:48:18 +03001166#define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */
1167#define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */
1168#define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */
Bob Moore793c2382006-03-31 00:00:00 -05001169
Bob Moore793c2382006-03-31 00:00:00 -05001170/*******************************************************************************
1171 *
1172 * TCPA - Trusted Computing Platform Alliance table
1173 *
1174 ******************************************************************************/
1175
1176struct acpi_table_tcpa {
Bob Mooref3d2e782007-02-02 19:48:18 +03001177 struct acpi_table_header header; /* Common ACPI table header */
1178 u16 reserved;
Bob Moore793c2382006-03-31 00:00:00 -05001179 u32 max_log_length; /* Maximum length for the event log area */
1180 u64 log_address; /* Address of the event log area */
1181};
1182
1183/*******************************************************************************
1184 *
Bob Moore970d9c92008-04-10 19:06:42 +04001185 * UEFI - UEFI Boot optimization Table
1186 *
1187 ******************************************************************************/
1188
1189struct acpi_table_uefi {
1190 struct acpi_table_header header; /* Common ACPI table header */
1191 u8 identifier[16]; /* UUID identifier */
1192 u16 data_offset; /* Offset of remaining data in table */
1193 u8 data;
1194};
1195
1196/*******************************************************************************
1197 *
1198 * WDAT - Watchdog Action Table
1199 *
1200 ******************************************************************************/
1201
1202struct acpi_table_wdat {
1203 struct acpi_table_header header; /* Common ACPI table header */
1204 u32 header_length; /* Watchdog Header Length */
1205 u16 pci_segment; /* PCI Segment number */
1206 u8 pci_bus; /* PCI Bus number */
1207 u8 pci_device; /* PCI Device number */
1208 u8 pci_function; /* PCI Function number */
1209 u8 reserved[3];
1210 u32 timer_period; /* Period of one timer count (msec) */
1211 u32 max_count; /* Maximum counter value supported */
1212 u32 min_count; /* Minimum counter value */
1213 u8 flags;
1214 u8 reserved2[3];
1215 u32 entries; /* Number of watchdog entries that follow */
1216};
1217
1218/* WDAT Instruction Entries (actions) */
1219
1220struct acpi_wdat_entry {
1221 struct acpi_whea_header whea_header; /* Common header for WHEA tables */
1222};
1223
1224/* Values for Action field above */
1225
1226enum acpi_wdat_actions {
1227 ACPI_WDAT_RESET = 1,
1228 ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
1229 ACPI_WDAT_GET_COUNTDOWN = 5,
1230 ACPI_WDAT_SET_COUNTDOWN = 6,
1231 ACPI_WDAT_GET_RUNNING_STATE = 8,
1232 ACPI_WDAT_SET_RUNNING_STATE = 9,
1233 ACPI_WDAT_GET_STOPPED_STATE = 10,
1234 ACPI_WDAT_SET_STOPPED_STATE = 11,
1235 ACPI_WDAT_GET_REBOOT = 16,
1236 ACPI_WDAT_SET_REBOOT = 17,
1237 ACPI_WDAT_GET_SHUTDOWN = 18,
1238 ACPI_WDAT_SET_SHUTDOWN = 19,
1239 ACPI_WDAT_GET_STATUS = 32,
1240 ACPI_WDAT_SET_STATUS = 33,
1241 ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */
1242};
1243
1244/* Values for Instruction field above */
1245
1246enum acpi_wdat_instructions {
1247 ACPI_WDAT_READ_VALUE = 0,
1248 ACPI_WDAT_READ_COUNTDOWN = 1,
1249 ACPI_WDAT_WRITE_VALUE = 2,
1250 ACPI_WDAT_WRITE_COUNTDOWN = 3,
1251 ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */
1252 ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */
1253};
1254
1255/*******************************************************************************
1256 *
Bob Moore793c2382006-03-31 00:00:00 -05001257 * WDRT - Watchdog Resource Table
1258 *
1259 ******************************************************************************/
1260
1261struct acpi_table_wdrt {
Bob Mooref3d2e782007-02-02 19:48:18 +03001262 struct acpi_table_header header; /* Common ACPI table header */
1263 u32 header_length; /* Watchdog Header Length */
Bob Moore793c2382006-03-31 00:00:00 -05001264 u8 pci_segment; /* PCI Segment number */
1265 u8 pci_bus; /* PCI Bus number */
1266 u8 pci_device; /* PCI Device number */
1267 u8 pci_function; /* PCI Function number */
1268 u32 timer_period; /* Period of one timer count (msec) */
1269 u32 max_count; /* Maximum counter value supported */
1270 u32 min_count; /* Minimum counter value */
1271 u8 flags;
1272 u8 reserved[3];
1273 u32 entries; /* Number of watchdog entries that follow */
1274};
1275
Bob Mooref3d2e782007-02-02 19:48:18 +03001276/* Flags */
Bob Moore793c2382006-03-31 00:00:00 -05001277
Bob Mooref3d2e782007-02-02 19:48:18 +03001278#define ACPI_WDRT_TIMER_ENABLED (1) /* 00: Timer enabled */
Bob Moore793c2382006-03-31 00:00:00 -05001279
1280/* Reset to default packing */
1281
Linus Torvalds1da177e2005-04-16 15:20:36 -07001282#pragma pack()
1283
Len Brown4be44fc2005-08-05 00:44:28 -04001284#endif /* __ACTBL1_H__ */