ACPICA: Split large ACPI table header
[deliverable/linux.git] / include / acpi / actbl1.h
CommitLineData
1da177e4
LT
1/******************************************************************************
2 *
793c2388 3 * Name: actbl1.h - Additional ACPI table definitions
1da177e4
LT
4 *
5 *****************************************************************************/
6
7/*
75a44ce0 8 * Copyright (C) 2000 - 2008, Intel Corp.
1da177e4
LT
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
793c2388
BM
47/*******************************************************************************
48 *
b24aad44 49 * Additional ACPI Tables (1)
793c2388
BM
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 *
b24aad44
BM
54 * The tables in this file are fully defined within the ACPI specification.
55 *
793c2388
BM
56 ******************************************************************************/
57
58/*
59 * Values for description table header signatures. Useful because they make
60 * it more difficult to inadvertently type in the wrong signature.
61 */
970d9c9e 62#define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */
793c2388 63#define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */
793c2388 64#define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */
970d9c9e
BM
65#define ACPI_SIG_EINJ "EINJ" /* Error Injection table */
66#define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */
67#define ACPI_SIG_HEST "HEST" /* Hardware Error Source Table */
793c2388 68#define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */
793c2388
BM
69#define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */
70#define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */
793c2388 71#define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */
793c2388 72
793c2388
BM
73/*
74 * All tables must be byte-packed to match the ACPI specification, since
75 * the tables are provided by the system BIOS.
76 */
1da177e4
LT
77#pragma pack(1)
78
79/*
793c2388
BM
80 * Note about bitfields: The u8 type is used for bitfields in ACPI tables.
81 * This is the only type that is even remotely portable. Anything else is not
82 * portable, so do not use any other bitfield types.
1da177e4 83 */
793c2388 84
970d9c9e 85/* Common Subtable header (used in MADT, SRAT, etc.) */
f3d2e786
BM
86
87struct acpi_subtable_header {
88 u8 type;
89 u8 length;
90};
91
970d9c9e
BM
92/* Common Subtable header for WHEA tables (EINJ, ERST, WDAT) */
93
94struct acpi_whea_header {
95 u8 action;
96 u8 instruction;
97 u8 flags;
98 u8 reserved;
99 struct acpi_generic_address register_region;
3fa34777
BM
100 u64 value; /* Value used with Read/Write register */
101 u64 mask; /* Bitmask required for this register instruction */
970d9c9e
BM
102};
103
970d9c9e
BM
104/*******************************************************************************
105 *
106 * BERT - Boot Error Record Table
107 *
108 ******************************************************************************/
109
110struct acpi_table_bert {
111 struct acpi_table_header header; /* Common ACPI table header */
112 u32 region_length; /* Length of the boot error region */
113 u64 address; /* Physical addresss of the error region */
114};
115
3fa34777
BM
116/* Boot Error Region */
117
970d9c9e
BM
118struct acpi_bert_region {
119 u32 block_status;
120 u32 raw_data_offset;
121 u32 raw_data_length;
122 u32 data_length;
123 u32 error_severity;
970d9c9e
BM
124};
125
126/* block_status Flags */
127
128#define ACPI_BERT_UNCORRECTABLE (1)
129#define ACPI_BERT_CORRECTABLE (2)
130#define ACPI_BERT_MULTIPLE_UNCORRECTABLE (4)
131#define ACPI_BERT_MULTIPLE_CORRECTABLE (8)
132
793c2388
BM
133/*******************************************************************************
134 *
135 * CPEP - Corrected Platform Error Polling table
136 *
137 ******************************************************************************/
138
139struct acpi_table_cpep {
f3d2e786
BM
140 struct acpi_table_header header; /* Common ACPI table header */
141 u64 reserved;
793c2388
BM
142};
143
144/* Subtable */
145
146struct acpi_cpep_polling {
147 u8 type;
148 u8 length;
f3d2e786
BM
149 u8 id; /* Processor ID */
150 u8 eid; /* Processor EID */
151 u32 interval; /* Polling interval (msec) */
793c2388
BM
152};
153
793c2388
BM
154/*******************************************************************************
155 *
156 * ECDT - Embedded Controller Boot Resources Table
157 *
158 ******************************************************************************/
159
f3d2e786
BM
160struct acpi_table_ecdt {
161 struct acpi_table_header header; /* Common ACPI table header */
162 struct acpi_generic_address control; /* Address of EC command/status register */
163 struct acpi_generic_address data; /* Address of EC data register */
793c2388 164 u32 uid; /* Unique ID - must be same as the EC _UID method */
f3d2e786
BM
165 u8 gpe; /* The GPE for the EC */
166 u8 id[1]; /* Full namepath of the EC in the ACPI namespace */
793c2388
BM
167};
168
970d9c9e
BM
169/*******************************************************************************
170 *
171 * EINJ - Error Injection Table
172 *
173 ******************************************************************************/
174
175struct acpi_table_einj {
176 struct acpi_table_header header; /* Common ACPI table header */
177 u32 header_length;
178 u32 reserved;
179 u32 entries;
180};
181
182/* EINJ Injection Instruction Entries (actions) */
183
184struct acpi_einj_entry {
185 struct acpi_whea_header whea_header; /* Common header for WHEA tables */
186};
187
188/* Values for Action field above */
189
190enum acpi_einj_actions {
191 ACPI_EINJ_BEGIN_OPERATION = 0,
192 ACPI_EINJ_GET_TRIGGER_TABLE = 1,
193 ACPI_EINJ_SET_ERROR_TYPE = 2,
194 ACPI_EINJ_GET_ERROR_TYPE = 3,
195 ACPI_EINJ_END_OPERATION = 4,
196 ACPI_EINJ_EXECUTE_OPERATION = 5,
197 ACPI_EINJ_CHECK_BUSY_STATUS = 6,
198 ACPI_EINJ_GET_COMMAND_STATUS = 7,
199 ACPI_EINJ_ACTION_RESERVED = 8, /* 8 and greater are reserved */
200 ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */
201};
202
203/* Values for Instruction field above */
204
205enum acpi_einj_instructions {
206 ACPI_EINJ_READ_REGISTER = 0,
207 ACPI_EINJ_READ_REGISTER_VALUE = 1,
208 ACPI_EINJ_WRITE_REGISTER = 2,
209 ACPI_EINJ_WRITE_REGISTER_VALUE = 3,
210 ACPI_EINJ_NOOP = 4,
211 ACPI_EINJ_INSTRUCTION_RESERVED = 5 /* 5 and greater are reserved */
212};
213
3fa34777
BM
214/* EINJ Trigger Error Action Table */
215
216struct acpi_einj_trigger {
217 u32 header_size;
218 u32 revision;
219 u32 table_size;
220 u32 entry_count;
221};
222
970d9c9e
BM
223/*******************************************************************************
224 *
225 * ERST - Error Record Serialization Table
226 *
227 ******************************************************************************/
228
229struct acpi_table_erst {
230 struct acpi_table_header header; /* Common ACPI table header */
231 u32 header_length;
232 u32 reserved;
233 u32 entries;
234};
235
236/* ERST Serialization Entries (actions) */
237
238struct acpi_erst_entry {
239 struct acpi_whea_header whea_header; /* Common header for WHEA tables */
240};
241
242/* Values for Action field above */
243
244enum acpi_erst_actions {
245 ACPI_ERST_BEGIN_WRITE_OPERATION = 0,
246 ACPI_ERST_BEGIN_READ_OPERATION = 1,
247 ACPI_ERST_BETGIN_CLEAR_OPERATION = 2,
248 ACPI_ERST_END_OPERATION = 3,
249 ACPI_ERST_SET_RECORD_OFFSET = 4,
250 ACPI_ERST_EXECUTE_OPERATION = 5,
251 ACPI_ERST_CHECK_BUSY_STATUS = 6,
252 ACPI_ERST_GET_COMMAND_STATUS = 7,
253 ACPI_ERST_GET_RECORD_IDENTIFIER = 8,
254 ACPI_ERST_SET_RECORD_IDENTIFIER = 9,
255 ACPI_ERST_GET_RECORD_COUNT = 10,
256 ACPI_ERST_BEGIN_DUMMY_WRIITE = 11,
257 ACPI_ERST_NOT_USED = 12,
258 ACPI_ERST_GET_ERROR_RANGE = 13,
259 ACPI_ERST_GET_ERROR_LENGTH = 14,
260 ACPI_ERST_GET_ERROR_ATTRIBUTES = 15,
261 ACPI_ERST_ACTION_RESERVED = 16 /* 16 and greater are reserved */
262};
263
264/* Values for Instruction field above */
265
266enum acpi_erst_instructions {
267 ACPI_ERST_READ_REGISTER = 0,
268 ACPI_ERST_READ_REGISTER_VALUE = 1,
269 ACPI_ERST_WRITE_REGISTER = 2,
270 ACPI_ERST_WRITE_REGISTER_VALUE = 3,
271 ACPI_ERST_NOOP = 4,
272 ACPI_ERST_LOAD_VAR1 = 5,
273 ACPI_ERST_LOAD_VAR2 = 6,
274 ACPI_ERST_STORE_VAR1 = 7,
275 ACPI_ERST_ADD = 8,
276 ACPI_ERST_SUBTRACT = 9,
277 ACPI_ERST_ADD_VALUE = 10,
278 ACPI_ERST_SUBTRACT_VALUE = 11,
279 ACPI_ERST_STALL = 12,
280 ACPI_ERST_STALL_WHILE_TRUE = 13,
281 ACPI_ERST_SKIP_NEXT_IF_TRUE = 14,
282 ACPI_ERST_GOTO = 15,
283 ACPI_ERST_SET_SRC_ADDRESS_BASE = 16,
284 ACPI_ERST_SET_DST_ADDRESS_BASE = 17,
285 ACPI_ERST_MOVE_DATA = 18,
286 ACPI_ERST_INSTRUCTION_RESERVED = 19 /* 19 and greater are reserved */
287};
288
289/*******************************************************************************
290 *
291 * HEST - Hardware Error Source Table
292 *
293 ******************************************************************************/
294
295struct acpi_table_hest {
296 struct acpi_table_header header; /* Common ACPI table header */
297 u32 error_source_count;
298};
299
3fa34777
BM
300/* HEST subtable header */
301
302struct acpi_hest_header {
303 u16 type;
304};
305
306/* Values for Type field above for subtables */
307
308enum acpi_hest_types {
309 ACPI_HEST_TYPE_XPF_MACHINE_CHECK = 0,
310 ACPI_HEST_TYPE_XPF_CORRECTED_MACHINE_CHECK = 1,
311 ACPI_HEST_TYPE_XPF_UNUSED = 2,
312 ACPI_HEST_TYPE_XPF_NON_MASKABLE_INTERRUPT = 3,
313 ACPI_HEST_TYPE_IPF_CORRECTED_MACHINE_CHECK = 4,
314 ACPI_HEST_TYPE_IPF_CORRECTED_PLATFORM_ERROR = 5,
315 ACPI_HEST_TYPE_AER_ROOT_PORT = 6,
316 ACPI_HEST_TYPE_AER_ENDPOINT = 7,
317 ACPI_HEST_TYPE_AER_BRIDGE = 8,
318 ACPI_HEST_TYPE_GENERIC_HARDWARE_ERROR_SOURCE = 9,
319 ACPI_HEST_TYPE_RESERVED = 10 /* 10 and greater are reserved */
320};
321
322/*
323 * HEST Sub-subtables
324 */
325
326/* XPF Machine Check Error Bank */
327
328struct acpi_hest_xpf_error_bank {
329 u8 bank_number;
330 u8 clear_status_on_init;
331 u8 status_format;
332 u8 config_write_enable;
333 u32 control_register;
334 u64 control_init_data;
335 u32 status_register;
336 u32 address_register;
337 u32 misc_register;
338};
339
340/* Generic Error Status */
341
342struct acpi_hest_generic_status {
343 u32 block_status;
344 u32 raw_data_offset;
345 u32 raw_data_length;
346 u32 data_length;
347 u32 error_severity;
348};
349
350/* Generic Error Data */
351
352struct acpi_hest_generic_data {
353 u8 section_type[16];
354 u32 error_severity;
355 u16 revision;
356 u8 validation_bits;
357 u8 flags;
358 u32 error_data_length;
359 u8 fru_id[16];
360 u8 fru_text[20];
361};
362
363/* Common HEST structure for PCI/AER types below (6,7,8) */
364
365struct acpi_hest_aer_common {
366 u16 source_id;
367 u16 config_write_enable;
368 u8 flags;
369 u8 enabled;
370 u32 records_to_pre_allocate;
371 u32 max_sections_per_record;
372 u32 bus;
373 u16 device;
374 u16 function;
375 u16 device_control;
376 u16 reserved;
377 u32 uncorrectable_error_mask;
378 u32 uncorrectable_error_severity;
379 u32 correctable_error_mask;
7488c8d5 380 u32 advanced_error_capabilities;
3fa34777
BM
381};
382
383/* Hardware Error Notification */
384
385struct acpi_hest_notify {
386 u8 type;
387 u8 length;
388 u16 config_write_enable;
389 u32 poll_interval;
390 u32 vector;
391 u32 polling_threshold_value;
392 u32 polling_threshold_window;
393 u32 error_threshold_value;
394 u32 error_threshold_window;
395};
396
397/* Values for Notify Type field above */
398
399enum acpi_hest_notify_types {
400 ACPI_HEST_NOTIFY_POLLED = 0,
401 ACPI_HEST_NOTIFY_EXTERNAL = 1,
402 ACPI_HEST_NOTIFY_LOCAL = 2,
403 ACPI_HEST_NOTIFY_SCI = 3,
404 ACPI_HEST_NOTIFY_NMI = 4,
405 ACPI_HEST_NOTIFY_RESERVED = 5 /* 5 and greater are reserved */
406};
407
408/*
409 * HEST subtables
410 *
411 * From WHEA Design Document, 16 May 2007.
412 * Note: There is no subtable type 2 in this version of the document,
413 * and there are two different subtable type 3s.
414 */
415
416 /* 0: XPF Machine Check Exception */
417
418struct acpi_hest_xpf_machine_check {
419 struct acpi_hest_header header;
420 u16 source_id;
421 u16 config_write_enable;
422 u8 flags;
423 u8 reserved1;
424 u32 records_to_pre_allocate;
425 u32 max_sections_per_record;
426 u64 global_capability_data;
427 u64 global_control_data;
428 u8 num_hardware_banks;
429 u8 reserved2[7];
430};
431
432/* 1: XPF Corrected Machine Check */
433
434struct acpi_table_hest_xpf_corrected {
435 struct acpi_hest_header header;
436 u16 source_id;
437 u16 config_write_enable;
438 u8 flags;
439 u8 enabled;
440 u32 records_to_pre_allocate;
441 u32 max_sections_per_record;
442 struct acpi_hest_notify notify;
443 u8 num_hardware_banks;
444 u8 reserved[3];
445};
446
447/* 3: XPF Non-Maskable Interrupt */
448
449struct acpi_hest_xpf_nmi {
450 struct acpi_hest_header header;
451 u16 source_id;
452 u32 reserved;
453 u32 records_to_pre_allocate;
454 u32 max_sections_per_record;
455 u32 max_raw_data_length;
456};
457
458/* 4: IPF Corrected Machine Check */
459
460struct acpi_hest_ipf_corrected {
461 struct acpi_hest_header header;
462 u8 enabled;
463 u8 reserved;
464};
465
466/* 5: IPF Corrected Platform Error */
467
468struct acpi_hest_ipf_corrected_platform {
469 struct acpi_hest_header header;
470 u8 enabled;
471 u8 reserved;
472};
473
474/* 6: PCI Express Root Port AER */
475
476struct acpi_hest_aer_root {
477 struct acpi_hest_header header;
478 struct acpi_hest_aer_common aer;
479 u32 root_error_command;
480};
481
482/* 7: PCI Express AER (AER Endpoint) */
483
484struct acpi_hest_aer {
485 struct acpi_hest_header header;
486 struct acpi_hest_aer_common aer;
487};
488
489/* 8: PCI Express/PCI-X Bridge AER */
490
491struct acpi_hest_aer_bridge {
492 struct acpi_hest_header header;
493 struct acpi_hest_aer_common aer;
494 u32 secondary_uncorrectable_error_mask;
495 u32 secondary_uncorrectable_error_severity;
496 u32 secondary_advanced_capabilities;
497};
498
499/* 9: Generic Hardware Error Source */
500
501struct acpi_hest_generic {
502 struct acpi_hest_header header;
503 u16 source_id;
504 u16 related_source_id;
505 u8 config_write_enable;
506 u8 enabled;
507 u32 records_to_pre_allocate;
508 u32 max_sections_per_record;
509 u32 max_raw_data_length;
510 struct acpi_generic_address error_status_address;
511 struct acpi_hest_notify notify;
512 u32 error_status_block_length;
513};
970d9c9e 514
793c2388
BM
515/*******************************************************************************
516 *
517 * MADT - Multiple APIC Description Table
518 *
519 ******************************************************************************/
520
f3d2e786
BM
521struct acpi_table_madt {
522 struct acpi_table_header header; /* Common ACPI table header */
523 u32 address; /* Physical address of local APIC */
524 u32 flags;
1da177e4
LT
525};
526
f3d2e786 527/* Flags */
793c2388 528
f3d2e786 529#define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */
793c2388 530
f3d2e786 531/* Values for PCATCompat flag */
793c2388 532
f3d2e786
BM
533#define ACPI_MADT_DUAL_PIC 0
534#define ACPI_MADT_MULTIPLE_APIC 1
793c2388 535
f3d2e786 536/* Values for subtable type in struct acpi_subtable_header */
793c2388 537
f3d2e786
BM
538enum acpi_madt_type {
539 ACPI_MADT_TYPE_LOCAL_APIC = 0,
540 ACPI_MADT_TYPE_IO_APIC = 1,
541 ACPI_MADT_TYPE_INTERRUPT_OVERRIDE = 2,
542 ACPI_MADT_TYPE_NMI_SOURCE = 3,
543 ACPI_MADT_TYPE_LOCAL_APIC_NMI = 4,
544 ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE = 5,
545 ACPI_MADT_TYPE_IO_SAPIC = 6,
546 ACPI_MADT_TYPE_LOCAL_SAPIC = 7,
547 ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8,
1d7cc030
BM
548 ACPI_MADT_TYPE_LOCAL_X2APIC = 9,
549 ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10,
550 ACPI_MADT_TYPE_RESERVED = 11 /* 11 and greater are reserved */
f3d2e786 551};
793c2388 552
1da177e4 553/*
f3d2e786 554 * MADT Sub-tables, correspond to Type in struct acpi_subtable_header
1da177e4 555 */
793c2388 556
f3d2e786 557/* 0: Processor Local APIC */
793c2388 558
f3d2e786
BM
559struct acpi_madt_local_apic {
560 struct acpi_subtable_header header;
561 u8 processor_id; /* ACPI processor id */
562 u8 id; /* Processor's local APIC id */
563 u32 lapic_flags;
564};
793c2388
BM
565
566/* 1: IO APIC */
567
f3d2e786
BM
568struct acpi_madt_io_apic {
569 struct acpi_subtable_header header;
570 u8 id; /* I/O APIC ID */
793c2388
BM
571 u8 reserved; /* Reserved - must be zero */
572 u32 address; /* APIC physical address */
f3d2e786 573 u32 global_irq_base; /* Global system interrupt where INTI lines start */
793c2388
BM
574};
575
576/* 2: Interrupt Override */
577
f3d2e786
BM
578struct acpi_madt_interrupt_override {
579 struct acpi_subtable_header header;
580 u8 bus; /* 0 - ISA */
581 u8 source_irq; /* Interrupt source (IRQ) */
582 u32 global_irq; /* Global system interrupt */
583 u16 inti_flags;
584};
793c2388 585
f3d2e786 586/* 3: NMI Source */
793c2388 587
f3d2e786
BM
588struct acpi_madt_nmi_source {
589 struct acpi_subtable_header header;
590 u16 inti_flags;
591 u32 global_irq; /* Global system interrupt */
793c2388
BM
592};
593
594/* 4: Local APIC NMI */
595
f3d2e786
BM
596struct acpi_madt_local_apic_nmi {
597 struct acpi_subtable_header header;
598 u8 processor_id; /* ACPI processor id */
599 u16 inti_flags;
600 u8 lint; /* LINTn to which NMI is connected */
793c2388
BM
601};
602
603/* 5: Address Override */
604
f3d2e786
BM
605struct acpi_madt_local_apic_override {
606 struct acpi_subtable_header header;
607 u16 reserved; /* Reserved, must be zero */
793c2388
BM
608 u64 address; /* APIC physical address */
609};
610
611/* 6: I/O Sapic */
612
f3d2e786
BM
613struct acpi_madt_io_sapic {
614 struct acpi_subtable_header header;
615 u8 id; /* I/O SAPIC ID */
793c2388 616 u8 reserved; /* Reserved, must be zero */
f3d2e786 617 u32 global_irq_base; /* Global interrupt for SAPIC start */
793c2388
BM
618 u64 address; /* SAPIC physical address */
619};
620
621/* 7: Local Sapic */
622
f3d2e786
BM
623struct acpi_madt_local_sapic {
624 struct acpi_subtable_header header;
625 u8 processor_id; /* ACPI processor id */
626 u8 id; /* SAPIC ID */
627 u8 eid; /* SAPIC EID */
793c2388 628 u8 reserved[3]; /* Reserved, must be zero */
f3d2e786
BM
629 u32 lapic_flags;
630 u32 uid; /* Numeric UID - ACPI 3.0 */
631 char uid_string[1]; /* String UID - ACPI 3.0 */
793c2388
BM
632};
633
634/* 8: Platform Interrupt Source */
635
f3d2e786
BM
636struct acpi_madt_interrupt_source {
637 struct acpi_subtable_header header;
638 u16 inti_flags;
639 u8 type; /* 1=PMI, 2=INIT, 3=corrected */
640 u8 id; /* Processor ID */
641 u8 eid; /* Processor EID */
793c2388 642 u8 io_sapic_vector; /* Vector value for PMI interrupts */
f3d2e786 643 u32 global_irq; /* Global system interrupt */
793c2388
BM
644 u32 flags; /* Interrupt Source Flags */
645};
646
f3d2e786
BM
647/* Flags field above */
648
649#define ACPI_MADT_CPEI_OVERRIDE (1)
650
eb2289ba 651/* 9: Processor Local X2APIC (ACPI 4.0) */
1d7cc030
BM
652
653struct acpi_madt_local_x2apic {
654 struct acpi_subtable_header header;
655 u16 reserved; /* Reserved - must be zero */
786c221a 656 u32 local_apic_id; /* Processor x2APIC ID */
1d7cc030 657 u32 lapic_flags;
786c221a 658 u32 uid; /* ACPI processor UID */
1d7cc030
BM
659};
660
eb2289ba 661/* 10: Local X2APIC NMI (ACPI 4.0) */
1d7cc030
BM
662
663struct acpi_madt_local_x2apic_nmi {
664 struct acpi_subtable_header header;
665 u16 inti_flags;
786c221a 666 u32 uid; /* ACPI processor UID */
1d7cc030
BM
667 u8 lint; /* LINTn to which NMI is connected */
668 u8 reserved[3];
669};
670
f3d2e786
BM
671/*
672 * Common flags fields for MADT subtables
673 */
674
675/* MADT Local APIC flags (lapic_flags) */
676
677#define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */
678
679/* MADT MPS INTI flags (inti_flags) */
680
681#define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */
682#define ACPI_MADT_TRIGGER_MASK (3<<2) /* 02-03: Trigger mode of APIC input signals */
683
684/* Values for MPS INTI flags */
685
686#define ACPI_MADT_POLARITY_CONFORMS 0
687#define ACPI_MADT_POLARITY_ACTIVE_HIGH 1
688#define ACPI_MADT_POLARITY_RESERVED 2
689#define ACPI_MADT_POLARITY_ACTIVE_LOW 3
690
691#define ACPI_MADT_TRIGGER_CONFORMS (0)
692#define ACPI_MADT_TRIGGER_EDGE (1<<2)
693#define ACPI_MADT_TRIGGER_RESERVED (2<<2)
694#define ACPI_MADT_TRIGGER_LEVEL (3<<2)
695
793c2388
BM
696/*******************************************************************************
697 *
698 * SBST - Smart Battery Specification Table
699 *
700 ******************************************************************************/
701
f3d2e786
BM
702struct acpi_table_sbst {
703 struct acpi_table_header header; /* Common ACPI table header */
704 u32 warning_level;
793c2388
BM
705 u32 low_level;
706 u32 critical_level;
707};
708
709/*******************************************************************************
710 *
711 * SLIT - System Locality Distance Information Table
712 *
713 ******************************************************************************/
714
f3d2e786
BM
715struct acpi_table_slit {
716 struct acpi_table_header header; /* Common ACPI table header */
717 u64 locality_count;
718 u8 entry[1]; /* Real size = localities^2 */
793c2388
BM
719};
720
793c2388
BM
721/*******************************************************************************
722 *
723 * SRAT - System Resource Affinity Table
724 *
725 ******************************************************************************/
726
f3d2e786
BM
727struct acpi_table_srat {
728 struct acpi_table_header header; /* Common ACPI table header */
729 u32 table_revision; /* Must be value '1' */
730 u64 reserved; /* Reserved, must be zero */
793c2388
BM
731};
732
f3d2e786 733/* Values for subtable type in struct acpi_subtable_header */
793c2388 734
f3d2e786
BM
735enum acpi_srat_type {
736 ACPI_SRAT_TYPE_CPU_AFFINITY = 0,
737 ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1,
1d7cc030
BM
738 ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2,
739 ACPI_SRAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */
f3d2e786 740};
793c2388 741
1d7cc030
BM
742/*
743 * SRAT Sub-tables, correspond to Type in struct acpi_subtable_header
744 */
745
746/* 0: Processor Local APIC/SAPIC Affinity */
793c2388 747
f3d2e786
BM
748struct acpi_srat_cpu_affinity {
749 struct acpi_subtable_header header;
750 u8 proximity_domain_lo;
793c2388 751 u8 apic_id;
f3d2e786 752 u32 flags;
793c2388
BM
753 u8 local_sapic_eid;
754 u8 proximity_domain_hi[3];
f3d2e786 755 u32 reserved; /* Reserved, must be zero */
793c2388
BM
756};
757
1d7cc030 758/* 1: Memory Affinity */
f3d2e786
BM
759
760struct acpi_srat_mem_affinity {
761 struct acpi_subtable_header header;
762 u32 proximity_domain;
763 u16 reserved; /* Reserved, must be zero */
793c2388 764 u64 base_address;
f3d2e786 765 u64 length;
19d0cfe9 766 u32 reserved1;
f3d2e786 767 u32 flags;
19d0cfe9 768 u64 reserved2; /* Reserved, must be zero */
f3d2e786
BM
769};
770
771/* Flags */
f9f4601f 772
f3d2e786
BM
773#define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */
774#define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */
775#define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */
f9f4601f 776
eb2289ba 777/* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */
1d7cc030
BM
778
779struct acpi_srat_x2apic_cpu_affinity {
780 struct acpi_subtable_header header;
781 u16 reserved; /* Reserved, must be zero */
782 u32 proximity_domain;
783 u32 apic_id;
784 u32 flags;
eb2289ba
BM
785 u32 clock_domain;
786 u32 reserved2;
1d7cc030
BM
787};
788
789/* Flags for struct acpi_srat_cpu_affinity and struct acpi_srat_x2apic_cpu_affinity */
790
791#define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
792
793c2388
BM
793/* Reset to default packing */
794
1da177e4
LT
795#pragma pack()
796
4be44fcd 797#endif /* __ACTBL1_H__ */
This page took 0.440516 seconds and 5 git commands to generate.