]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - include/acpi/actbl1.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[mirror_ubuntu-bionic-kernel.git] / include / acpi / actbl1.h
1 /******************************************************************************
2 *
3 * Name: actbl1.h - Additional ACPI table definitions
4 *
5 *****************************************************************************/
6
7 /*
8 * Copyright (C) 2000 - 2008, Intel Corp.
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
47 /*******************************************************************************
48 *
49 * Additional ACPI Tables
50 *
51 * These tables are not consumed directly by the ACPICA subsystem, but are
52 * included here to support device drivers and the AML disassembler.
53 *
54 ******************************************************************************/
55
56 /*
57 * Values for description table header signatures. Useful because they make
58 * it more difficult to inadvertently type in the wrong signature.
59 */
60 #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */
61 #define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */
62 #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 */
65 #define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */
66 #define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */
67 #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 */
70 #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */
71 #define ACPI_SIG_IBFT "IBFT" /* i_sCSI Boot Firmware Table */
72 #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 */
75 #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */
76 #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 */
81 #define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */
82 #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */
83 #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */
84
85 /*
86 * All tables must be byte-packed to match the ACPI specification, since
87 * the tables are provided by the system BIOS.
88 */
89 #pragma pack(1)
90
91 /*
92 * 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.
95 */
96
97 /* Common Subtable header (used in MADT, SRAT, etc.) */
98
99 struct acpi_subtable_header {
100 u8 type;
101 u8 length;
102 };
103
104 /* Common Subtable header for WHEA tables (EINJ, ERST, WDAT) */
105
106 struct acpi_whea_header {
107 u8 action;
108 u8 instruction;
109 u8 flags;
110 u8 reserved;
111 struct acpi_generic_address register_region;
112 u64 value; /* Value used with Read/Write register */
113 u64 mask; /* Bitmask required for this register instruction */
114 };
115
116 /*******************************************************************************
117 *
118 * ASF - Alert Standard Format table (Signature "ASF!")
119 *
120 * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
121 *
122 ******************************************************************************/
123
124 struct acpi_table_asf {
125 struct acpi_table_header header; /* Common ACPI table header */
126 };
127
128 /* ASF subtable header */
129
130 struct acpi_asf_header {
131 u8 type;
132 u8 reserved;
133 u16 length;
134 };
135
136 /* Values for Type field above */
137
138 enum 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 };
146
147 /*
148 * ASF subtables
149 */
150
151 /* 0: ASF Information */
152
153 struct acpi_asf_info {
154 struct acpi_asf_header header;
155 u8 min_reset_value;
156 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
165 struct acpi_asf_alert {
166 struct acpi_asf_header header;
167 u8 assert_mask;
168 u8 deassert_mask;
169 u8 alerts;
170 u8 data_length;
171 };
172
173 struct 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;
186 };
187
188 /* 2: ASF Remote Control */
189
190 struct acpi_asf_remote {
191 struct acpi_asf_header header;
192 u8 controls;
193 u8 data_length;
194 u16 reserved2;
195 };
196
197 struct acpi_asf_control_data {
198 u8 function;
199 u8 address;
200 u8 command;
201 u8 value;
202 };
203
204 /* 3: ASF RMCP Boot Options */
205
206 struct acpi_asf_rmcp {
207 struct acpi_asf_header header;
208 u8 capabilities[7];
209 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
219 struct acpi_asf_address {
220 struct acpi_asf_header header;
221 u8 eprom_address;
222 u8 devices;
223 };
224
225 /*******************************************************************************
226 *
227 * BERT - Boot Error Record Table
228 *
229 ******************************************************************************/
230
231 struct 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
237 /* Boot Error Region */
238
239 struct 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;
245 };
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 *
256 * BOOT - Simple Boot Flag Table
257 *
258 ******************************************************************************/
259
260 struct acpi_table_boot {
261 struct acpi_table_header header; /* Common ACPI table header */
262 u8 cmos_index; /* Index in CMOS RAM for the boot register */
263 u8 reserved[3];
264 };
265
266 /*******************************************************************************
267 *
268 * CPEP - Corrected Platform Error Polling table
269 *
270 ******************************************************************************/
271
272 struct acpi_table_cpep {
273 struct acpi_table_header header; /* Common ACPI table header */
274 u64 reserved;
275 };
276
277 /* Subtable */
278
279 struct acpi_cpep_polling {
280 u8 type;
281 u8 length;
282 u8 id; /* Processor ID */
283 u8 eid; /* Processor EID */
284 u32 interval; /* Polling interval (msec) */
285 };
286
287 /*******************************************************************************
288 *
289 * DBGP - Debug Port table
290 *
291 ******************************************************************************/
292
293 struct acpi_table_dbgp {
294 struct acpi_table_header header; /* Common ACPI table header */
295 u8 type; /* 0=full 16550, 1=subset of 16550 */
296 u8 reserved[3];
297 struct acpi_generic_address debug_port;
298 };
299
300 /*******************************************************************************
301 *
302 * DMAR - DMA Remapping table
303 *
304 ******************************************************************************/
305
306 struct acpi_table_dmar {
307 struct acpi_table_header header; /* Common ACPI table header */
308 u8 width; /* Host Address Width */
309 u8 flags;
310 u8 reserved[10];
311 };
312
313 /* DMAR subtable header */
314
315 struct acpi_dmar_header {
316 u16 type;
317 u16 length;
318 };
319
320 /* Values for subtable type in struct acpi_dmar_header */
321
322 enum acpi_dmar_type {
323 ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
324 ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
325 ACPI_DMAR_TYPE_ATSR = 2,
326 ACPI_DMAR_TYPE_RESERVED = 3 /* 3 and greater are reserved */
327 };
328
329 struct acpi_dmar_device_scope {
330 u8 entry_type;
331 u8 length;
332 u16 reserved;
333 u8 enumeration_id;
334 u8 bus;
335 };
336
337 /* Values for entry_type in struct acpi_dmar_device_scope */
338
339 enum 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,
343 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
348 struct acpi_dmar_pci_path {
349 u8 dev;
350 u8 fn;
351 };
352
353 /*
354 * DMAR Sub-tables, correspond to Type in struct acpi_dmar_header
355 */
356
357 /* 0: Hardware Unit Definition */
358
359 struct acpi_dmar_hardware_unit {
360 struct acpi_dmar_header header;
361 u8 flags;
362 u8 reserved;
363 u16 segment;
364 u64 address; /* Register Base Address */
365 };
366
367 /* Flags */
368
369 #define ACPI_DMAR_INCLUDE_ALL (1)
370
371 /* 1: Reserved Memory Defininition */
372
373 struct acpi_dmar_reserved_memory {
374 struct acpi_dmar_header header;
375 u16 reserved;
376 u16 segment;
377 u64 base_address; /* 4_k aligned base address */
378 u64 end_address; /* 4_k aligned limit address */
379 };
380
381 /* Flags */
382
383 #define ACPI_DMAR_ALLOW_ALL (1)
384
385 /*******************************************************************************
386 *
387 * ECDT - Embedded Controller Boot Resources Table
388 *
389 ******************************************************************************/
390
391 struct 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 */
395 u32 uid; /* Unique ID - must be same as the EC _UID method */
396 u8 gpe; /* The GPE for the EC */
397 u8 id[1]; /* Full namepath of the EC in the ACPI namespace */
398 };
399
400 /*******************************************************************************
401 *
402 * EINJ - Error Injection Table
403 *
404 ******************************************************************************/
405
406 struct 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
415 struct acpi_einj_entry {
416 struct acpi_whea_header whea_header; /* Common header for WHEA tables */
417 };
418
419 /* Values for Action field above */
420
421 enum 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
436 enum 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
445 /* EINJ Trigger Error Action Table */
446
447 struct acpi_einj_trigger {
448 u32 header_size;
449 u32 revision;
450 u32 table_size;
451 u32 entry_count;
452 };
453
454 /*******************************************************************************
455 *
456 * ERST - Error Record Serialization Table
457 *
458 ******************************************************************************/
459
460 struct 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
469 struct acpi_erst_entry {
470 struct acpi_whea_header whea_header; /* Common header for WHEA tables */
471 };
472
473 /* Values for Action field above */
474
475 enum 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
497 enum 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
526 struct acpi_table_hest {
527 struct acpi_table_header header; /* Common ACPI table header */
528 u32 error_source_count;
529 };
530
531 /* HEST subtable header */
532
533 struct acpi_hest_header {
534 u16 type;
535 };
536
537 /* Values for Type field above for subtables */
538
539 enum 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
559 struct 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
573 struct 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
583 struct 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
596 struct 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
616 struct 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
630 enum 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
649 struct 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
665 struct 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
680 struct 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
691 struct 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
699 struct 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
707 struct 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
715 struct 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
722 struct 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
732 struct 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 };
745
746 /*******************************************************************************
747 *
748 * HPET - High Precision Event Timer table
749 *
750 ******************************************************************************/
751
752 struct 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;
759 };
760
761 /*! 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 !*/
768
769 /*******************************************************************************
770 *
771 * IBFT - Boot Firmware Table
772 *
773 ******************************************************************************/
774
775 struct 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
782 struct 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
792 enum 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
804 struct 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
814 struct 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
824 struct 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
840 struct 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 *
861 * MADT - Multiple APIC Description Table
862 *
863 ******************************************************************************/
864
865 struct acpi_table_madt {
866 struct acpi_table_header header; /* Common ACPI table header */
867 u32 address; /* Physical address of local APIC */
868 u32 flags;
869 };
870
871 /* Flags */
872
873 #define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */
874
875 /* Values for PCATCompat flag */
876
877 #define ACPI_MADT_DUAL_PIC 0
878 #define ACPI_MADT_MULTIPLE_APIC 1
879
880 /* Values for subtable type in struct acpi_subtable_header */
881
882 enum 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 };
894
895 /*
896 * MADT Sub-tables, correspond to Type in struct acpi_subtable_header
897 */
898
899 /* 0: Processor Local APIC */
900
901 struct 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 };
907
908 /* 1: IO APIC */
909
910 struct acpi_madt_io_apic {
911 struct acpi_subtable_header header;
912 u8 id; /* I/O APIC ID */
913 u8 reserved; /* Reserved - must be zero */
914 u32 address; /* APIC physical address */
915 u32 global_irq_base; /* Global system interrupt where INTI lines start */
916 };
917
918 /* 2: Interrupt Override */
919
920 struct 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 };
927
928 /* 3: NMI Source */
929
930 struct acpi_madt_nmi_source {
931 struct acpi_subtable_header header;
932 u16 inti_flags;
933 u32 global_irq; /* Global system interrupt */
934 };
935
936 /* 4: Local APIC NMI */
937
938 struct 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 */
943 };
944
945 /* 5: Address Override */
946
947 struct acpi_madt_local_apic_override {
948 struct acpi_subtable_header header;
949 u16 reserved; /* Reserved, must be zero */
950 u64 address; /* APIC physical address */
951 };
952
953 /* 6: I/O Sapic */
954
955 struct acpi_madt_io_sapic {
956 struct acpi_subtable_header header;
957 u8 id; /* I/O SAPIC ID */
958 u8 reserved; /* Reserved, must be zero */
959 u32 global_irq_base; /* Global interrupt for SAPIC start */
960 u64 address; /* SAPIC physical address */
961 };
962
963 /* 7: Local Sapic */
964
965 struct 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 */
970 u8 reserved[3]; /* Reserved, must be zero */
971 u32 lapic_flags;
972 u32 uid; /* Numeric UID - ACPI 3.0 */
973 char uid_string[1]; /* String UID - ACPI 3.0 */
974 };
975
976 /* 8: Platform Interrupt Source */
977
978 struct 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 */
984 u8 io_sapic_vector; /* Vector value for PMI interrupts */
985 u32 global_irq; /* Global system interrupt */
986 u32 flags; /* Interrupt Source Flags */
987 };
988
989 /* 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
1018 /*******************************************************************************
1019 *
1020 * MCFG - PCI Memory Mapped Configuration table and sub-table
1021 *
1022 ******************************************************************************/
1023
1024 struct acpi_table_mcfg {
1025 struct acpi_table_header header; /* Common ACPI table header */
1026 u8 reserved[8];
1027 };
1028
1029 /* Subtable */
1030
1031 struct acpi_mcfg_allocation {
1032 u64 address; /* Base address, processor-relative */
1033 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 };
1038
1039 /*******************************************************************************
1040 *
1041 * SBST - Smart Battery Specification Table
1042 *
1043 ******************************************************************************/
1044
1045 struct acpi_table_sbst {
1046 struct acpi_table_header header; /* Common ACPI table header */
1047 u32 warning_level;
1048 u32 low_level;
1049 u32 critical_level;
1050 };
1051
1052 /*******************************************************************************
1053 *
1054 * SLIT - System Locality Distance Information Table
1055 *
1056 ******************************************************************************/
1057
1058 struct 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 */
1062 };
1063
1064 /*******************************************************************************
1065 *
1066 * SPCR - Serial Port Console Redirection table
1067 *
1068 ******************************************************************************/
1069
1070 struct acpi_table_spcr {
1071 struct acpi_table_header header; /* Common ACPI table header */
1072 u8 interface_type; /* 0=full 16550, 1=subset of 16550 */
1073 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;
1083 u8 reserved1;
1084 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;
1091 u32 reserved2;
1092 };
1093
1094 /*******************************************************************************
1095 *
1096 * SPMI - Server Platform Management Interface table
1097 *
1098 ******************************************************************************/
1099
1100 struct acpi_table_spmi {
1101 struct acpi_table_header header; /* Common ACPI table header */
1102 u8 reserved;
1103 u8 interface_type;
1104 u16 spec_revision; /* Version of IPMI */
1105 u8 interrupt_type;
1106 u8 gpe_number; /* GPE assigned */
1107 u8 reserved1;
1108 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
1123 struct 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 */
1127 };
1128
1129 /* Values for subtable type in struct acpi_subtable_header */
1130
1131 enum acpi_srat_type {
1132 ACPI_SRAT_TYPE_CPU_AFFINITY = 0,
1133 ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1,
1134 ACPI_SRAT_TYPE_RESERVED = 2
1135 };
1136
1137 /* SRAT sub-tables */
1138
1139 struct acpi_srat_cpu_affinity {
1140 struct acpi_subtable_header header;
1141 u8 proximity_domain_lo;
1142 u8 apic_id;
1143 u32 flags;
1144 u8 local_sapic_eid;
1145 u8 proximity_domain_hi[3];
1146 u32 reserved; /* Reserved, must be zero */
1147 };
1148
1149 /* Flags */
1150
1151 #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
1152
1153 struct acpi_srat_mem_affinity {
1154 struct acpi_subtable_header header;
1155 u32 proximity_domain;
1156 u16 reserved; /* Reserved, must be zero */
1157 u64 base_address;
1158 u64 length;
1159 u32 memory_type; /* See acpi_address_range_id */
1160 u32 flags;
1161 u64 reserved1; /* Reserved, must be zero */
1162 };
1163
1164 /* Flags */
1165
1166 #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 */
1169
1170 /*******************************************************************************
1171 *
1172 * TCPA - Trusted Computing Platform Alliance table
1173 *
1174 ******************************************************************************/
1175
1176 struct acpi_table_tcpa {
1177 struct acpi_table_header header; /* Common ACPI table header */
1178 u16 reserved;
1179 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 *
1185 * UEFI - UEFI Boot optimization Table
1186 *
1187 ******************************************************************************/
1188
1189 struct 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
1202 struct 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
1220 struct acpi_wdat_entry {
1221 struct acpi_whea_header whea_header; /* Common header for WHEA tables */
1222 };
1223
1224 /* Values for Action field above */
1225
1226 enum 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
1246 enum 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 *
1257 * WDRT - Watchdog Resource Table
1258 *
1259 ******************************************************************************/
1260
1261 struct acpi_table_wdrt {
1262 struct acpi_table_header header; /* Common ACPI table header */
1263 u32 header_length; /* Watchdog Header Length */
1264 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
1276 /* Flags */
1277
1278 #define ACPI_WDRT_TIMER_ENABLED (1) /* 00: Timer enabled */
1279
1280 /* Reset to default packing */
1281
1282 #pragma pack()
1283
1284 #endif /* __ACTBL1_H__ */