1 /******************************************************************************
3 * Name: actbl1.h - Additional ACPI table definitions
5 *****************************************************************************/
8 * Copyright (C) 2000 - 2017, Intel Corp.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
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.
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.
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.
47 /*******************************************************************************
49 * Additional ACPI Tables (1)
51 * These tables are not consumed directly by the ACPICA subsystem, but are
52 * included here to support device drivers and the AML disassembler.
54 * The tables in this file are fully defined within the ACPI specification.
56 ******************************************************************************/
59 * Values for description table header signatures for tables defined in this
60 * file. Useful because they make it more difficult to inadvertently type in
61 * the wrong signature.
63 #define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */
64 #define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */
65 #define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */
66 #define ACPI_SIG_EINJ "EINJ" /* Error Injection table */
67 #define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */
68 #define ACPI_SIG_HMAT "HMAT" /* Heterogeneous Memory Attributes Table */
69 #define ACPI_SIG_HEST "HEST" /* Hardware Error Source Table */
70 #define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */
71 #define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table */
72 #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */
73 #define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */
74 #define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */
75 #define ACPI_SIG_NFIT "NFIT" /* NVDIMM Firmware Interface Table */
78 * All tables must be byte-packed to match the ACPI specification, since
79 * the tables are provided by the system BIOS.
84 * Note: C bitfields are not used for this reason:
86 * "Bitfields are great and easy to read, but unfortunately the C language
87 * does not specify the layout of bitfields in memory, which means they are
88 * essentially useless for dealing with packed data in on-disk formats or
89 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
90 * this decision was a design error in C. Ritchie could have picked an order
91 * and stuck with it." Norman Ramsey.
92 * See http://stackoverflow.com/a/1053662/41661
95 /*******************************************************************************
97 * Common subtable headers
99 ******************************************************************************/
101 /* Generic subtable header (used in MADT, SRAT, etc.) */
103 struct acpi_subtable_header {
108 /* Subtable header for WHEA tables (EINJ, ERST, WDAT) */
110 struct acpi_whea_header {
115 struct acpi_generic_address register_region;
116 u64 value; /* Value used with Read/Write register */
117 u64 mask; /* Bitmask required for this register instruction */
120 /*******************************************************************************
122 * BERT - Boot Error Record Table (ACPI 4.0)
125 ******************************************************************************/
127 struct acpi_table_bert {
128 struct acpi_table_header header; /* Common ACPI table header */
129 u32 region_length; /* Length of the boot error region */
130 u64 address; /* Physical address of the error region */
133 /* Boot Error Region (not a subtable, pointed to by Address field above) */
135 struct acpi_bert_region {
136 u32 block_status; /* Type of error information */
137 u32 raw_data_offset; /* Offset to raw error data */
138 u32 raw_data_length; /* Length of raw error data */
139 u32 data_length; /* Length of generic error data */
140 u32 error_severity; /* Severity code */
143 /* Values for block_status flags above */
145 #define ACPI_BERT_UNCORRECTABLE (1)
146 #define ACPI_BERT_CORRECTABLE (1<<1)
147 #define ACPI_BERT_MULTIPLE_UNCORRECTABLE (1<<2)
148 #define ACPI_BERT_MULTIPLE_CORRECTABLE (1<<3)
149 #define ACPI_BERT_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
151 /* Values for error_severity above */
153 enum acpi_bert_error_severity {
154 ACPI_BERT_ERROR_CORRECTABLE = 0,
155 ACPI_BERT_ERROR_FATAL = 1,
156 ACPI_BERT_ERROR_CORRECTED = 2,
157 ACPI_BERT_ERROR_NONE = 3,
158 ACPI_BERT_ERROR_RESERVED = 4 /* 4 and greater are reserved */
162 * Note: The generic error data that follows the error_severity field above
163 * uses the struct acpi_hest_generic_data defined under the HEST table below
166 /*******************************************************************************
168 * CPEP - Corrected Platform Error Polling table (ACPI 4.0)
171 ******************************************************************************/
173 struct acpi_table_cpep {
174 struct acpi_table_header header; /* Common ACPI table header */
180 struct acpi_cpep_polling {
181 struct acpi_subtable_header header;
182 u8 id; /* Processor ID */
183 u8 eid; /* Processor EID */
184 u32 interval; /* Polling interval (msec) */
187 /*******************************************************************************
189 * ECDT - Embedded Controller Boot Resources Table
192 ******************************************************************************/
194 struct acpi_table_ecdt {
195 struct acpi_table_header header; /* Common ACPI table header */
196 struct acpi_generic_address control; /* Address of EC command/status register */
197 struct acpi_generic_address data; /* Address of EC data register */
198 u32 uid; /* Unique ID - must be same as the EC _UID method */
199 u8 gpe; /* The GPE for the EC */
200 u8 id[1]; /* Full namepath of the EC in the ACPI namespace */
203 /*******************************************************************************
205 * EINJ - Error Injection Table (ACPI 4.0)
208 ******************************************************************************/
210 struct acpi_table_einj {
211 struct acpi_table_header header; /* Common ACPI table header */
218 /* EINJ Injection Instruction Entries (actions) */
220 struct acpi_einj_entry {
221 struct acpi_whea_header whea_header; /* Common header for WHEA tables */
224 /* Masks for Flags field above */
226 #define ACPI_EINJ_PRESERVE (1)
228 /* Values for Action field above */
230 enum acpi_einj_actions {
231 ACPI_EINJ_BEGIN_OPERATION = 0,
232 ACPI_EINJ_GET_TRIGGER_TABLE = 1,
233 ACPI_EINJ_SET_ERROR_TYPE = 2,
234 ACPI_EINJ_GET_ERROR_TYPE = 3,
235 ACPI_EINJ_END_OPERATION = 4,
236 ACPI_EINJ_EXECUTE_OPERATION = 5,
237 ACPI_EINJ_CHECK_BUSY_STATUS = 6,
238 ACPI_EINJ_GET_COMMAND_STATUS = 7,
239 ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 8,
240 ACPI_EINJ_GET_EXECUTE_TIMINGS = 9,
241 ACPI_EINJ_ACTION_RESERVED = 10, /* 10 and greater are reserved */
242 ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */
245 /* Values for Instruction field above */
247 enum acpi_einj_instructions {
248 ACPI_EINJ_READ_REGISTER = 0,
249 ACPI_EINJ_READ_REGISTER_VALUE = 1,
250 ACPI_EINJ_WRITE_REGISTER = 2,
251 ACPI_EINJ_WRITE_REGISTER_VALUE = 3,
253 ACPI_EINJ_FLUSH_CACHELINE = 5,
254 ACPI_EINJ_INSTRUCTION_RESERVED = 6 /* 6 and greater are reserved */
257 struct acpi_einj_error_type_with_addr {
259 u32 vendor_struct_offset;
267 struct acpi_einj_vendor {
276 /* EINJ Trigger Error Action Table */
278 struct acpi_einj_trigger {
285 /* Command status return values */
287 enum acpi_einj_command_status {
288 ACPI_EINJ_SUCCESS = 0,
289 ACPI_EINJ_FAILURE = 1,
290 ACPI_EINJ_INVALID_ACCESS = 2,
291 ACPI_EINJ_STATUS_RESERVED = 3 /* 3 and greater are reserved */
294 /* Error types returned from ACPI_EINJ_GET_ERROR_TYPE (bitfield) */
296 #define ACPI_EINJ_PROCESSOR_CORRECTABLE (1)
297 #define ACPI_EINJ_PROCESSOR_UNCORRECTABLE (1<<1)
298 #define ACPI_EINJ_PROCESSOR_FATAL (1<<2)
299 #define ACPI_EINJ_MEMORY_CORRECTABLE (1<<3)
300 #define ACPI_EINJ_MEMORY_UNCORRECTABLE (1<<4)
301 #define ACPI_EINJ_MEMORY_FATAL (1<<5)
302 #define ACPI_EINJ_PCIX_CORRECTABLE (1<<6)
303 #define ACPI_EINJ_PCIX_UNCORRECTABLE (1<<7)
304 #define ACPI_EINJ_PCIX_FATAL (1<<8)
305 #define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9)
306 #define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10)
307 #define ACPI_EINJ_PLATFORM_FATAL (1<<11)
308 #define ACPI_EINJ_VENDOR_DEFINED (1<<31)
310 /*******************************************************************************
312 * ERST - Error Record Serialization Table (ACPI 4.0)
315 ******************************************************************************/
317 struct acpi_table_erst {
318 struct acpi_table_header header; /* Common ACPI table header */
324 /* ERST Serialization Entries (actions) */
326 struct acpi_erst_entry {
327 struct acpi_whea_header whea_header; /* Common header for WHEA tables */
330 /* Masks for Flags field above */
332 #define ACPI_ERST_PRESERVE (1)
334 /* Values for Action field above */
336 enum acpi_erst_actions {
337 ACPI_ERST_BEGIN_WRITE = 0,
338 ACPI_ERST_BEGIN_READ = 1,
339 ACPI_ERST_BEGIN_CLEAR = 2,
341 ACPI_ERST_SET_RECORD_OFFSET = 4,
342 ACPI_ERST_EXECUTE_OPERATION = 5,
343 ACPI_ERST_CHECK_BUSY_STATUS = 6,
344 ACPI_ERST_GET_COMMAND_STATUS = 7,
345 ACPI_ERST_GET_RECORD_ID = 8,
346 ACPI_ERST_SET_RECORD_ID = 9,
347 ACPI_ERST_GET_RECORD_COUNT = 10,
348 ACPI_ERST_BEGIN_DUMMY_WRIITE = 11,
349 ACPI_ERST_NOT_USED = 12,
350 ACPI_ERST_GET_ERROR_RANGE = 13,
351 ACPI_ERST_GET_ERROR_LENGTH = 14,
352 ACPI_ERST_GET_ERROR_ATTRIBUTES = 15,
353 ACPI_ERST_EXECUTE_TIMINGS = 16,
354 ACPI_ERST_ACTION_RESERVED = 17 /* 17 and greater are reserved */
357 /* Values for Instruction field above */
359 enum acpi_erst_instructions {
360 ACPI_ERST_READ_REGISTER = 0,
361 ACPI_ERST_READ_REGISTER_VALUE = 1,
362 ACPI_ERST_WRITE_REGISTER = 2,
363 ACPI_ERST_WRITE_REGISTER_VALUE = 3,
365 ACPI_ERST_LOAD_VAR1 = 5,
366 ACPI_ERST_LOAD_VAR2 = 6,
367 ACPI_ERST_STORE_VAR1 = 7,
369 ACPI_ERST_SUBTRACT = 9,
370 ACPI_ERST_ADD_VALUE = 10,
371 ACPI_ERST_SUBTRACT_VALUE = 11,
372 ACPI_ERST_STALL = 12,
373 ACPI_ERST_STALL_WHILE_TRUE = 13,
374 ACPI_ERST_SKIP_NEXT_IF_TRUE = 14,
376 ACPI_ERST_SET_SRC_ADDRESS_BASE = 16,
377 ACPI_ERST_SET_DST_ADDRESS_BASE = 17,
378 ACPI_ERST_MOVE_DATA = 18,
379 ACPI_ERST_INSTRUCTION_RESERVED = 19 /* 19 and greater are reserved */
382 /* Command status return values */
384 enum acpi_erst_command_status {
385 ACPI_ERST_SUCESS = 0,
386 ACPI_ERST_NO_SPACE = 1,
387 ACPI_ERST_NOT_AVAILABLE = 2,
388 ACPI_ERST_FAILURE = 3,
389 ACPI_ERST_RECORD_EMPTY = 4,
390 ACPI_ERST_NOT_FOUND = 5,
391 ACPI_ERST_STATUS_RESERVED = 6 /* 6 and greater are reserved */
394 /* Error Record Serialization Information */
396 struct acpi_erst_info {
397 u16 signature; /* Should be "ER" */
401 /*******************************************************************************
403 * HEST - Hardware Error Source Table (ACPI 4.0)
406 ******************************************************************************/
408 struct acpi_table_hest {
409 struct acpi_table_header header; /* Common ACPI table header */
410 u32 error_source_count;
413 /* HEST subtable header */
415 struct acpi_hest_header {
420 /* Values for Type field above for subtables */
422 enum acpi_hest_types {
423 ACPI_HEST_TYPE_IA32_CHECK = 0,
424 ACPI_HEST_TYPE_IA32_CORRECTED_CHECK = 1,
425 ACPI_HEST_TYPE_IA32_NMI = 2,
426 ACPI_HEST_TYPE_NOT_USED3 = 3,
427 ACPI_HEST_TYPE_NOT_USED4 = 4,
428 ACPI_HEST_TYPE_NOT_USED5 = 5,
429 ACPI_HEST_TYPE_AER_ROOT_PORT = 6,
430 ACPI_HEST_TYPE_AER_ENDPOINT = 7,
431 ACPI_HEST_TYPE_AER_BRIDGE = 8,
432 ACPI_HEST_TYPE_GENERIC_ERROR = 9,
433 ACPI_HEST_TYPE_GENERIC_ERROR_V2 = 10,
434 ACPI_HEST_TYPE_RESERVED = 11 /* 11 and greater are reserved */
438 * HEST substructures contained in subtables
442 * IA32 Error Bank(s) - Follows the struct acpi_hest_ia_machine_check and
443 * struct acpi_hest_ia_corrected structures.
445 struct acpi_hest_ia_error_bank {
447 u8 clear_status_on_init;
450 u32 control_register;
453 u32 address_register;
457 /* Common HEST sub-structure for PCI/AER structures below (6,7,8) */
459 struct acpi_hest_aer_common {
463 u32 records_to_preallocate;
464 u32 max_sections_per_record;
465 u32 bus; /* Bus and Segment numbers */
470 u32 uncorrectable_mask;
471 u32 uncorrectable_severity;
472 u32 correctable_mask;
473 u32 advanced_capabilities;
476 /* Masks for HEST Flags fields */
478 #define ACPI_HEST_FIRMWARE_FIRST (1)
479 #define ACPI_HEST_GLOBAL (1<<1)
482 * Macros to access the bus/segment numbers in Bus field above:
483 * Bus number is encoded in bits 7:0
484 * Segment number is encoded in bits 23:8
486 #define ACPI_HEST_BUS(bus) ((bus) & 0xFF)
487 #define ACPI_HEST_SEGMENT(bus) (((bus) >> 8) & 0xFFFF)
489 /* Hardware Error Notification */
491 struct acpi_hest_notify {
494 u16 config_write_enable;
497 u32 polling_threshold_value;
498 u32 polling_threshold_window;
499 u32 error_threshold_value;
500 u32 error_threshold_window;
503 /* Values for Notify Type field above */
505 enum acpi_hest_notify_types {
506 ACPI_HEST_NOTIFY_POLLED = 0,
507 ACPI_HEST_NOTIFY_EXTERNAL = 1,
508 ACPI_HEST_NOTIFY_LOCAL = 2,
509 ACPI_HEST_NOTIFY_SCI = 3,
510 ACPI_HEST_NOTIFY_NMI = 4,
511 ACPI_HEST_NOTIFY_CMCI = 5, /* ACPI 5.0 */
512 ACPI_HEST_NOTIFY_MCE = 6, /* ACPI 5.0 */
513 ACPI_HEST_NOTIFY_GPIO = 7, /* ACPI 6.0 */
514 ACPI_HEST_NOTIFY_SEA = 8, /* ACPI 6.1 */
515 ACPI_HEST_NOTIFY_SEI = 9, /* ACPI 6.1 */
516 ACPI_HEST_NOTIFY_GSIV = 10, /* ACPI 6.1 */
517 ACPI_HEST_NOTIFY_RESERVED = 11 /* 11 and greater are reserved */
520 /* Values for config_write_enable bitfield above */
522 #define ACPI_HEST_TYPE (1)
523 #define ACPI_HEST_POLL_INTERVAL (1<<1)
524 #define ACPI_HEST_POLL_THRESHOLD_VALUE (1<<2)
525 #define ACPI_HEST_POLL_THRESHOLD_WINDOW (1<<3)
526 #define ACPI_HEST_ERR_THRESHOLD_VALUE (1<<4)
527 #define ACPI_HEST_ERR_THRESHOLD_WINDOW (1<<5)
533 /* 0: IA32 Machine Check Exception */
535 struct acpi_hest_ia_machine_check {
536 struct acpi_hest_header header;
540 u32 records_to_preallocate;
541 u32 max_sections_per_record;
542 u64 global_capability_data;
543 u64 global_control_data;
544 u8 num_hardware_banks;
548 /* 1: IA32 Corrected Machine Check */
550 struct acpi_hest_ia_corrected {
551 struct acpi_hest_header header;
555 u32 records_to_preallocate;
556 u32 max_sections_per_record;
557 struct acpi_hest_notify notify;
558 u8 num_hardware_banks;
562 /* 2: IA32 Non-Maskable Interrupt */
564 struct acpi_hest_ia_nmi {
565 struct acpi_hest_header header;
567 u32 records_to_preallocate;
568 u32 max_sections_per_record;
569 u32 max_raw_data_length;
572 /* 3,4,5: Not used */
574 /* 6: PCI Express Root Port AER */
576 struct acpi_hest_aer_root {
577 struct acpi_hest_header header;
578 struct acpi_hest_aer_common aer;
579 u32 root_error_command;
582 /* 7: PCI Express AER (AER Endpoint) */
584 struct acpi_hest_aer {
585 struct acpi_hest_header header;
586 struct acpi_hest_aer_common aer;
589 /* 8: PCI Express/PCI-X Bridge AER */
591 struct acpi_hest_aer_bridge {
592 struct acpi_hest_header header;
593 struct acpi_hest_aer_common aer;
594 u32 uncorrectable_mask2;
595 u32 uncorrectable_severity2;
596 u32 advanced_capabilities2;
599 /* 9: Generic Hardware Error Source */
601 struct acpi_hest_generic {
602 struct acpi_hest_header header;
603 u16 related_source_id;
606 u32 records_to_preallocate;
607 u32 max_sections_per_record;
608 u32 max_raw_data_length;
609 struct acpi_generic_address error_status_address;
610 struct acpi_hest_notify notify;
611 u32 error_block_length;
614 /* 10: Generic Hardware Error Source, version 2 */
616 struct acpi_hest_generic_v2 {
617 struct acpi_hest_header header;
618 u16 related_source_id;
621 u32 records_to_preallocate;
622 u32 max_sections_per_record;
623 u32 max_raw_data_length;
624 struct acpi_generic_address error_status_address;
625 struct acpi_hest_notify notify;
626 u32 error_block_length;
627 struct acpi_generic_address read_ack_register;
628 u64 read_ack_preserve;
632 /* Generic Error Status block */
634 struct acpi_hest_generic_status {
642 /* Values for block_status flags above */
644 #define ACPI_HEST_UNCORRECTABLE (1)
645 #define ACPI_HEST_CORRECTABLE (1<<1)
646 #define ACPI_HEST_MULTIPLE_UNCORRECTABLE (1<<2)
647 #define ACPI_HEST_MULTIPLE_CORRECTABLE (1<<3)
648 #define ACPI_HEST_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
650 /* Generic Error Data entry */
652 struct acpi_hest_generic_data {
658 u32 error_data_length;
663 /* Extension for revision 0x0300 */
665 struct acpi_hest_generic_data_v300 {
671 u32 error_data_length;
677 /* Values for error_severity above */
679 #define ACPI_HEST_GEN_ERROR_RECOVERABLE 0
680 #define ACPI_HEST_GEN_ERROR_FATAL 1
681 #define ACPI_HEST_GEN_ERROR_CORRECTED 2
682 #define ACPI_HEST_GEN_ERROR_NONE 3
684 /* Flags for validation_bits above */
686 #define ACPI_HEST_GEN_VALID_FRU_ID (1)
687 #define ACPI_HEST_GEN_VALID_FRU_STRING (1<<1)
688 #define ACPI_HEST_GEN_VALID_TIMESTAMP (1<<2)
690 /*******************************************************************************
692 * HMAT - Heterogeneous Memory Attributes Table (ACPI 6.2)
695 ******************************************************************************/
697 struct acpi_table_hmat {
698 struct acpi_table_header header; /* Common ACPI table header */
702 /* Values for HMAT structure types */
704 enum acpi_hmat_type {
705 ACPI_HMAT_TYPE_ADDRESS_RANGE = 0, /* Memory subystem address range */
706 ACPI_HMAT_TYPE_LOCALITY = 1, /* System locality latency and bandwidth information */
707 ACPI_HMAT_TYPE_CACHE = 2, /* Memory side cache information */
708 ACPI_HMAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */
711 struct acpi_hmat_structure {
718 * HMAT Structures, correspond to Type in struct acpi_hmat_structure
721 /* 0: Memory subystem address range */
723 struct acpi_hmat_address_range {
724 struct acpi_hmat_structure header;
727 u32 processor_PD; /* Processor proximity domain */
728 u32 memory_PD; /* Memory proximity domain */
730 u64 physical_address_base; /* Physical address range base */
731 u64 physical_address_length; /* Physical address range length */
734 /* Masks for Flags field above */
736 #define ACPI_HMAT_PROCESSOR_PD_VALID (1) /* 1: processor_PD field is valid */
737 #define ACPI_HMAT_MEMORY_PD_VALID (1<<1) /* 1: memory_PD field is valid */
738 #define ACPI_HMAT_RESERVATION_HINT (1<<2) /* 1: Reservation hint */
740 /* 1: System locality latency and bandwidth information */
742 struct acpi_hmat_locality {
743 struct acpi_hmat_structure header;
747 u32 number_of_initiator_Pds;
748 u32 number_of_target_Pds;
753 /* Masks for Flags field above */
755 #define ACPI_HMAT_MEMORY_HIERARCHY (0x0F)
757 /* Values for Memory Hierarchy flag */
759 #define ACPI_HMAT_MEMORY 0
760 #define ACPI_HMAT_LAST_LEVEL_CACHE 1
761 #define ACPI_HMAT_1ST_LEVEL_CACHE 2
762 #define ACPI_HMAT_2ND_LEVEL_CACHE 3
763 #define ACPI_HMAT_3RD_LEVEL_CACHE 4
765 /* Values for data_type field above */
767 #define ACPI_HMAT_ACCESS_LATENCY 0
768 #define ACPI_HMAT_READ_LATENCY 1
769 #define ACPI_HMAT_WRITE_LATENCY 2
770 #define ACPI_HMAT_ACCESS_BANDWIDTH 3
771 #define ACPI_HMAT_READ_BANDWIDTH 4
772 #define ACPI_HMAT_WRITE_BANDWIDTH 5
774 /* 2: Memory side cache information */
776 struct acpi_hmat_cache {
777 struct acpi_hmat_structure header;
781 u32 cache_attributes;
783 u16 number_of_SMBIOShandles;
786 /* Masks for cache_attributes field above */
788 #define ACPI_HMAT_TOTAL_CACHE_LEVEL (0x0000000F)
789 #define ACPI_HMAT_CACHE_LEVEL (0x000000F0)
790 #define ACPI_HMAT_CACHE_ASSOCIATIVITY (0x00000F00)
791 #define ACPI_HMAT_WRITE_POLICY (0x0000F000)
792 #define ACPI_HMAT_CACHE_LINE_SIZE (0xFFFF0000)
794 /* Values for cache associativity flag */
796 #define ACPI_HMAT_CA_NONE (0)
797 #define ACPI_HMAT_CA_DIRECT_MAPPED (1)
798 #define ACPI_HMAT_CA_COMPLEX_CACHE_INDEXING (2)
800 /* Values for write policy flag */
802 #define ACPI_HMAT_CP_NONE (0)
803 #define ACPI_HMAT_CP_WB (1)
804 #define ACPI_HMAT_CP_WT (2)
806 /*******************************************************************************
808 * MADT - Multiple APIC Description Table
811 ******************************************************************************/
813 struct acpi_table_madt {
814 struct acpi_table_header header; /* Common ACPI table header */
815 u32 address; /* Physical address of local APIC */
819 /* Masks for Flags field above */
821 #define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */
823 /* Values for PCATCompat flag */
825 #define ACPI_MADT_DUAL_PIC 0
826 #define ACPI_MADT_MULTIPLE_APIC 1
828 /* Values for MADT subtable type in struct acpi_subtable_header */
830 enum acpi_madt_type {
831 ACPI_MADT_TYPE_LOCAL_APIC = 0,
832 ACPI_MADT_TYPE_IO_APIC = 1,
833 ACPI_MADT_TYPE_INTERRUPT_OVERRIDE = 2,
834 ACPI_MADT_TYPE_NMI_SOURCE = 3,
835 ACPI_MADT_TYPE_LOCAL_APIC_NMI = 4,
836 ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE = 5,
837 ACPI_MADT_TYPE_IO_SAPIC = 6,
838 ACPI_MADT_TYPE_LOCAL_SAPIC = 7,
839 ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8,
840 ACPI_MADT_TYPE_LOCAL_X2APIC = 9,
841 ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10,
842 ACPI_MADT_TYPE_GENERIC_INTERRUPT = 11,
843 ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR = 12,
844 ACPI_MADT_TYPE_GENERIC_MSI_FRAME = 13,
845 ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR = 14,
846 ACPI_MADT_TYPE_GENERIC_TRANSLATOR = 15,
847 ACPI_MADT_TYPE_RESERVED = 16 /* 16 and greater are reserved */
851 * MADT Subtables, correspond to Type in struct acpi_subtable_header
854 /* 0: Processor Local APIC */
856 struct acpi_madt_local_apic {
857 struct acpi_subtable_header header;
858 u8 processor_id; /* ACPI processor id */
859 u8 id; /* Processor's local APIC id */
865 struct acpi_madt_io_apic {
866 struct acpi_subtable_header header;
867 u8 id; /* I/O APIC ID */
868 u8 reserved; /* reserved - must be zero */
869 u32 address; /* APIC physical address */
870 u32 global_irq_base; /* Global system interrupt where INTI lines start */
873 /* 2: Interrupt Override */
875 struct acpi_madt_interrupt_override {
876 struct acpi_subtable_header header;
877 u8 bus; /* 0 - ISA */
878 u8 source_irq; /* Interrupt source (IRQ) */
879 u32 global_irq; /* Global system interrupt */
885 struct acpi_madt_nmi_source {
886 struct acpi_subtable_header header;
888 u32 global_irq; /* Global system interrupt */
891 /* 4: Local APIC NMI */
893 struct acpi_madt_local_apic_nmi {
894 struct acpi_subtable_header header;
895 u8 processor_id; /* ACPI processor id */
897 u8 lint; /* LINTn to which NMI is connected */
900 /* 5: Address Override */
902 struct acpi_madt_local_apic_override {
903 struct acpi_subtable_header header;
904 u16 reserved; /* Reserved, must be zero */
905 u64 address; /* APIC physical address */
910 struct acpi_madt_io_sapic {
911 struct acpi_subtable_header header;
912 u8 id; /* I/O SAPIC ID */
913 u8 reserved; /* Reserved, must be zero */
914 u32 global_irq_base; /* Global interrupt for SAPIC start */
915 u64 address; /* SAPIC physical address */
920 struct acpi_madt_local_sapic {
921 struct acpi_subtable_header header;
922 u8 processor_id; /* ACPI processor id */
923 u8 id; /* SAPIC ID */
924 u8 eid; /* SAPIC EID */
925 u8 reserved[3]; /* Reserved, must be zero */
927 u32 uid; /* Numeric UID - ACPI 3.0 */
928 char uid_string[1]; /* String UID - ACPI 3.0 */
931 /* 8: Platform Interrupt Source */
933 struct acpi_madt_interrupt_source {
934 struct acpi_subtable_header header;
936 u8 type; /* 1=PMI, 2=INIT, 3=corrected */
937 u8 id; /* Processor ID */
938 u8 eid; /* Processor EID */
939 u8 io_sapic_vector; /* Vector value for PMI interrupts */
940 u32 global_irq; /* Global system interrupt */
941 u32 flags; /* Interrupt Source Flags */
944 /* Masks for Flags field above */
946 #define ACPI_MADT_CPEI_OVERRIDE (1)
948 /* 9: Processor Local X2APIC (ACPI 4.0) */
950 struct acpi_madt_local_x2apic {
951 struct acpi_subtable_header header;
952 u16 reserved; /* reserved - must be zero */
953 u32 local_apic_id; /* Processor x2APIC ID */
955 u32 uid; /* ACPI processor UID */
958 /* 10: Local X2APIC NMI (ACPI 4.0) */
960 struct acpi_madt_local_x2apic_nmi {
961 struct acpi_subtable_header header;
963 u32 uid; /* ACPI processor UID */
964 u8 lint; /* LINTn to which NMI is connected */
965 u8 reserved[3]; /* reserved - must be zero */
968 /* 11: Generic Interrupt (ACPI 5.0 + ACPI 6.0 changes) */
970 struct acpi_madt_generic_interrupt {
971 struct acpi_subtable_header header;
972 u16 reserved; /* reserved - must be zero */
973 u32 cpu_interface_number;
977 u32 performance_interrupt;
980 u64 gicv_base_address;
981 u64 gich_base_address;
983 u64 gicr_base_address;
989 /* Masks for Flags field above */
991 /* ACPI_MADT_ENABLED (1) Processor is usable if set */
992 #define ACPI_MADT_PERFORMANCE_IRQ_MODE (1<<1) /* 01: Performance Interrupt Mode */
993 #define ACPI_MADT_VGIC_IRQ_MODE (1<<2) /* 02: VGIC Maintenance Interrupt mode */
995 /* 12: Generic Distributor (ACPI 5.0 + ACPI 6.0 changes) */
997 struct acpi_madt_generic_distributor {
998 struct acpi_subtable_header header;
999 u16 reserved; /* reserved - must be zero */
1002 u32 global_irq_base;
1004 u8 reserved2[3]; /* reserved - must be zero */
1007 /* Values for Version field above */
1009 enum acpi_madt_gic_version {
1010 ACPI_MADT_GIC_VERSION_NONE = 0,
1011 ACPI_MADT_GIC_VERSION_V1 = 1,
1012 ACPI_MADT_GIC_VERSION_V2 = 2,
1013 ACPI_MADT_GIC_VERSION_V3 = 3,
1014 ACPI_MADT_GIC_VERSION_V4 = 4,
1015 ACPI_MADT_GIC_VERSION_RESERVED = 5 /* 5 and greater are reserved */
1018 /* 13: Generic MSI Frame (ACPI 5.1) */
1020 struct acpi_madt_generic_msi_frame {
1021 struct acpi_subtable_header header;
1022 u16 reserved; /* reserved - must be zero */
1030 /* Masks for Flags field above */
1032 #define ACPI_MADT_OVERRIDE_SPI_VALUES (1)
1034 /* 14: Generic Redistributor (ACPI 5.1) */
1036 struct acpi_madt_generic_redistributor {
1037 struct acpi_subtable_header header;
1038 u16 reserved; /* reserved - must be zero */
1043 /* 15: Generic Translator (ACPI 6.0) */
1045 struct acpi_madt_generic_translator {
1046 struct acpi_subtable_header header;
1047 u16 reserved; /* reserved - must be zero */
1054 * Common flags fields for MADT subtables
1057 /* MADT Local APIC flags */
1059 #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */
1061 /* MADT MPS INTI flags (inti_flags) */
1063 #define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */
1064 #define ACPI_MADT_TRIGGER_MASK (3<<2) /* 02-03: Trigger mode of APIC input signals */
1066 /* Values for MPS INTI flags */
1068 #define ACPI_MADT_POLARITY_CONFORMS 0
1069 #define ACPI_MADT_POLARITY_ACTIVE_HIGH 1
1070 #define ACPI_MADT_POLARITY_RESERVED 2
1071 #define ACPI_MADT_POLARITY_ACTIVE_LOW 3
1073 #define ACPI_MADT_TRIGGER_CONFORMS (0)
1074 #define ACPI_MADT_TRIGGER_EDGE (1<<2)
1075 #define ACPI_MADT_TRIGGER_RESERVED (2<<2)
1076 #define ACPI_MADT_TRIGGER_LEVEL (3<<2)
1078 /*******************************************************************************
1080 * MSCT - Maximum System Characteristics Table (ACPI 4.0)
1083 ******************************************************************************/
1085 struct acpi_table_msct {
1086 struct acpi_table_header header; /* Common ACPI table header */
1087 u32 proximity_offset; /* Location of proximity info struct(s) */
1088 u32 max_proximity_domains; /* Max number of proximity domains */
1089 u32 max_clock_domains; /* Max number of clock domains */
1090 u64 max_address; /* Max physical address in system */
1093 /* subtable - Maximum Proximity Domain Information. Version 1 */
1095 struct acpi_msct_proximity {
1098 u32 range_start; /* Start of domain range */
1099 u32 range_end; /* End of domain range */
1100 u32 processor_capacity;
1101 u64 memory_capacity; /* In bytes */
1104 /*******************************************************************************
1106 * NFIT - NVDIMM Interface Table (ACPI 6.0+)
1109 ******************************************************************************/
1111 struct acpi_table_nfit {
1112 struct acpi_table_header header; /* Common ACPI table header */
1113 u32 reserved; /* Reserved, must be zero */
1116 /* Subtable header for NFIT */
1118 struct acpi_nfit_header {
1123 /* Values for subtable type in struct acpi_nfit_header */
1125 enum acpi_nfit_type {
1126 ACPI_NFIT_TYPE_SYSTEM_ADDRESS = 0,
1127 ACPI_NFIT_TYPE_MEMORY_MAP = 1,
1128 ACPI_NFIT_TYPE_INTERLEAVE = 2,
1129 ACPI_NFIT_TYPE_SMBIOS = 3,
1130 ACPI_NFIT_TYPE_CONTROL_REGION = 4,
1131 ACPI_NFIT_TYPE_DATA_REGION = 5,
1132 ACPI_NFIT_TYPE_FLUSH_ADDRESS = 6,
1133 ACPI_NFIT_TYPE_RESERVED = 7 /* 7 and greater are reserved */
1140 /* 0: System Physical Address Range Structure */
1142 struct acpi_nfit_system_address {
1143 struct acpi_nfit_header header;
1146 u32 reserved; /* Reseved, must be zero */
1147 u32 proximity_domain;
1156 #define ACPI_NFIT_ADD_ONLINE_ONLY (1) /* 00: Add/Online Operation Only */
1157 #define ACPI_NFIT_PROXIMITY_VALID (1<<1) /* 01: Proximity Domain Valid */
1159 /* Range Type GUIDs appear in the include/acuuid.h file */
1161 /* 1: Memory Device to System Address Range Map Structure */
1163 struct acpi_nfit_memory_map {
1164 struct acpi_nfit_header header;
1173 u16 interleave_index;
1174 u16 interleave_ways;
1176 u16 reserved; /* Reserved, must be zero */
1181 #define ACPI_NFIT_MEM_SAVE_FAILED (1) /* 00: Last SAVE to Memory Device failed */
1182 #define ACPI_NFIT_MEM_RESTORE_FAILED (1<<1) /* 01: Last RESTORE from Memory Device failed */
1183 #define ACPI_NFIT_MEM_FLUSH_FAILED (1<<2) /* 02: Platform flush failed */
1184 #define ACPI_NFIT_MEM_NOT_ARMED (1<<3) /* 03: Memory Device is not armed */
1185 #define ACPI_NFIT_MEM_HEALTH_OBSERVED (1<<4) /* 04: Memory Device observed SMART/health events */
1186 #define ACPI_NFIT_MEM_HEALTH_ENABLED (1<<5) /* 05: SMART/health events enabled */
1187 #define ACPI_NFIT_MEM_MAP_FAILED (1<<6) /* 06: Mapping to SPA failed */
1189 /* 2: Interleave Structure */
1191 struct acpi_nfit_interleave {
1192 struct acpi_nfit_header header;
1193 u16 interleave_index;
1194 u16 reserved; /* Reserved, must be zero */
1197 u32 line_offset[1]; /* Variable length */
1200 /* 3: SMBIOS Management Information Structure */
1202 struct acpi_nfit_smbios {
1203 struct acpi_nfit_header header;
1204 u32 reserved; /* Reserved, must be zero */
1205 u8 data[1]; /* Variable length */
1208 /* 4: NVDIMM Control Region Structure */
1210 struct acpi_nfit_control_region {
1211 struct acpi_nfit_header header;
1216 u16 subsystem_vendor_id;
1217 u16 subsystem_device_id;
1218 u16 subsystem_revision_id;
1220 u8 manufacturing_location;
1221 u16 manufacturing_date;
1222 u8 reserved[2]; /* Reserved, must be zero */
1232 u8 reserved1[6]; /* Reserved, must be zero */
1237 #define ACPI_NFIT_CONTROL_BUFFERED (1) /* Block Data Windows implementation is buffered */
1239 /* valid_fields bits */
1241 #define ACPI_NFIT_CONTROL_MFG_INFO_VALID (1) /* Manufacturing fields are valid */
1243 /* 5: NVDIMM Block Data Window Region Structure */
1245 struct acpi_nfit_data_region {
1246 struct acpi_nfit_header header;
1255 /* 6: Flush Hint Address Structure */
1257 struct acpi_nfit_flush_address {
1258 struct acpi_nfit_header header;
1261 u8 reserved[6]; /* Reserved, must be zero */
1262 u64 hint_address[1]; /* Variable length */
1265 /*******************************************************************************
1267 * SBST - Smart Battery Specification Table
1270 ******************************************************************************/
1272 struct acpi_table_sbst {
1273 struct acpi_table_header header; /* Common ACPI table header */
1279 /*******************************************************************************
1281 * SLIT - System Locality Distance Information Table
1284 ******************************************************************************/
1286 struct acpi_table_slit {
1287 struct acpi_table_header header; /* Common ACPI table header */
1289 u8 entry[1]; /* Real size = localities^2 */
1292 /*******************************************************************************
1294 * SRAT - System Resource Affinity Table
1297 ******************************************************************************/
1299 struct acpi_table_srat {
1300 struct acpi_table_header header; /* Common ACPI table header */
1301 u32 table_revision; /* Must be value '1' */
1302 u64 reserved; /* Reserved, must be zero */
1305 /* Values for subtable type in struct acpi_subtable_header */
1307 enum acpi_srat_type {
1308 ACPI_SRAT_TYPE_CPU_AFFINITY = 0,
1309 ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1,
1310 ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2,
1311 ACPI_SRAT_TYPE_GICC_AFFINITY = 3,
1312 ACPI_SRAT_TYPE_RESERVED = 4 /* 4 and greater are reserved */
1316 * SRAT Subtables, correspond to Type in struct acpi_subtable_header
1319 /* 0: Processor Local APIC/SAPIC Affinity */
1321 struct acpi_srat_cpu_affinity {
1322 struct acpi_subtable_header header;
1323 u8 proximity_domain_lo;
1327 u8 proximity_domain_hi[3];
1333 #define ACPI_SRAT_CPU_USE_AFFINITY (1) /* 00: Use affinity structure */
1335 /* 1: Memory Affinity */
1337 struct acpi_srat_mem_affinity {
1338 struct acpi_subtable_header header;
1339 u32 proximity_domain;
1340 u16 reserved; /* Reserved, must be zero */
1345 u64 reserved2; /* Reserved, must be zero */
1350 #define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */
1351 #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */
1352 #define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */
1354 /* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */
1356 struct acpi_srat_x2apic_cpu_affinity {
1357 struct acpi_subtable_header header;
1358 u16 reserved; /* Reserved, must be zero */
1359 u32 proximity_domain;
1366 /* Flags for struct acpi_srat_cpu_affinity and struct acpi_srat_x2apic_cpu_affinity */
1368 #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
1370 /* 3: GICC Affinity (ACPI 5.1) */
1372 struct acpi_srat_gicc_affinity {
1373 struct acpi_subtable_header header;
1374 u32 proximity_domain;
1375 u32 acpi_processor_uid;
1380 /* Flags for struct acpi_srat_gicc_affinity */
1382 #define ACPI_SRAT_GICC_ENABLED (1) /* 00: Use affinity structure */
1384 /* Reset to default packing */
1388 #endif /* __ACTBL1_H__ */