1 /******************************************************************************
3 * Name: actbl1.h - Additional ACPI table definitions
5 *****************************************************************************/
7 /******************************************************************************
11 * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp.
12 * All rights reserved.
16 * 2.1. This is your license from Intel Corp. under its intellectual property
17 * rights. You may have additional license terms from the party that provided
18 * you this software, covering your right to use that party's intellectual
21 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
22 * copy of the source code appearing in this file ("Covered Code") an
23 * irrevocable, perpetual, worldwide license under Intel's copyrights in the
24 * base code distributed originally by Intel ("Original Intel Code") to copy,
25 * make derivatives, distribute, use and display any portion of the Covered
26 * Code in any form, with the right to sublicense such rights; and
28 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
29 * license (with the right to sublicense), under only those claims of Intel
30 * patents that are infringed by the Original Intel Code, to make, use, sell,
31 * offer to sell, and import the Covered Code and derivative works thereof
32 * solely to the minimum extent necessary to exercise the above copyright
33 * license, and in no event shall the patent license extend to any additions
34 * to or modifications of the Original Intel Code. No other license or right
35 * is granted directly or by implication, estoppel or otherwise;
37 * The above copyright and patent license is granted only if the following
42 * 3.1. Redistribution of Source with Rights to Further Distribute Source.
43 * Redistribution of source code of any substantial portion of the Covered
44 * Code or modification with rights to further distribute source must include
45 * the above Copyright Notice, the above License, this list of Conditions,
46 * and the following Disclaimer and Export Compliance provision. In addition,
47 * Licensee must cause all Covered Code to which Licensee contributes to
48 * contain a file documenting the changes Licensee made to create that Covered
49 * Code and the date of any change. Licensee must include in that file the
50 * documentation of any changes made by any predecessor Licensee. Licensee
51 * must include a prominent statement that the modification is derived,
52 * directly or indirectly, from Original Intel Code.
54 * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
55 * Redistribution of source code of any substantial portion of the Covered
56 * Code or modification without rights to further distribute source must
57 * include the following Disclaimer and Export Compliance provision in the
58 * documentation and/or other materials provided with distribution. In
59 * addition, Licensee may not authorize further sublicense of source of any
60 * portion of the Covered Code, and must include terms to the effect that the
61 * license from Licensee to its licensee is limited to the intellectual
62 * property embodied in the software Licensee provides to its licensee, and
63 * not to intellectual property embodied in modifications its licensee may
66 * 3.3. Redistribution of Executable. Redistribution in executable form of any
67 * substantial portion of the Covered Code or modification must reproduce the
68 * above Copyright Notice, and the following Disclaimer and Export Compliance
69 * provision in the documentation and/or other materials provided with the
72 * 3.4. Intel retains all right, title, and interest in and to the Original
75 * 3.5. Neither the name Intel nor any other trademark owned or controlled by
76 * Intel shall be used in advertising or otherwise to promote the sale, use or
77 * other dealings in products derived from or relating to the Covered Code
78 * without prior written authorization from Intel.
80 * 4. Disclaimer and Export Compliance
82 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
83 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
84 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
85 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
86 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
87 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
90 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
91 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
92 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
93 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
94 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
95 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
96 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
99 * 4.3. Licensee shall not export, either directly or indirectly, any of this
100 * software or system incorporating such software without first obtaining any
101 * required license or other approval from the U. S. Department of Commerce or
102 * any other agency or department of the United States Government. In the
103 * event Licensee exports any such software from the United States or
104 * re-exports any such software from a foreign destination, Licensee shall
105 * ensure that the distribution and export/re-export of the software is in
106 * compliance with all laws, regulations, orders, or other restrictions of the
107 * U.S. Export Administration Regulations. Licensee agrees that neither it nor
108 * any of its subsidiaries will export/re-export any technical data, process,
109 * software, or service, directly or indirectly, to any country for which the
110 * United States government or any agency thereof requires an export license,
111 * other governmental approval, or letter of assurance, without first obtaining
112 * such license, approval or letter.
114 *****************************************************************************
116 * Alternatively, you may choose to be licensed under the terms of the
119 * Redistribution and use in source and binary forms, with or without
120 * modification, are permitted provided that the following conditions
122 * 1. Redistributions of source code must retain the above copyright
123 * notice, this list of conditions, and the following disclaimer,
124 * without modification.
125 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
126 * substantially similar to the "NO WARRANTY" disclaimer below
127 * ("Disclaimer") and any redistribution must be conditioned upon
128 * including a substantially similar Disclaimer requirement for further
129 * binary redistribution.
130 * 3. Neither the names of the above-listed copyright holders nor the names
131 * of any contributors may be used to endorse or promote products derived
132 * from this software without specific prior written permission.
134 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
135 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
136 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
137 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
138 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
139 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
140 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
141 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
142 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
143 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
144 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
146 * Alternatively, you may choose to be licensed under the terms of the
147 * GNU General Public License ("GPL") version 2 as published by the Free
148 * Software Foundation.
150 *****************************************************************************/
156 /*******************************************************************************
158 * Additional ACPI Tables (1)
160 * These tables are not consumed directly by the ACPICA subsystem, but are
161 * included here to support device drivers and the AML disassembler.
163 * The tables in this file are fully defined within the ACPI specification.
165 ******************************************************************************/
169 * Values for description table header signatures for tables defined in this
170 * file. Useful because they make it more difficult to inadvertently type in
171 * the wrong signature.
173 #define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */
174 #define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */
175 #define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */
176 #define ACPI_SIG_EINJ "EINJ" /* Error Injection table */
177 #define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */
178 #define ACPI_SIG_HEST "HEST" /* Hardware Error Source Table */
179 #define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */
180 #define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table */
181 #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */
182 #define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */
183 #define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */
184 #define ACPI_SIG_NFIT "NFIT" /* NVDIMM Firmware Interface Table */
188 * All tables must be byte-packed to match the ACPI specification, since
189 * the tables are provided by the system BIOS.
194 * Note: C bitfields are not used for this reason:
196 * "Bitfields are great and easy to read, but unfortunately the C language
197 * does not specify the layout of bitfields in memory, which means they are
198 * essentially useless for dealing with packed data in on-disk formats or
199 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
200 * this decision was a design error in C. Ritchie could have picked an order
201 * and stuck with it." Norman Ramsey.
202 * See http://stackoverflow.com/a/1053662/41661
206 /*******************************************************************************
208 * Common subtable headers
210 ******************************************************************************/
212 /* Generic subtable header (used in MADT, SRAT, etc.) */
214 typedef struct acpi_subtable_header
219 } ACPI_SUBTABLE_HEADER;
222 /* Subtable header for WHEA tables (EINJ, ERST, WDAT) */
224 typedef struct acpi_whea_header
230 ACPI_GENERIC_ADDRESS RegisterRegion;
231 UINT64 Value; /* Value used with Read/Write register */
232 UINT64 Mask; /* Bitmask required for this register instruction */
237 /*******************************************************************************
239 * BERT - Boot Error Record Table (ACPI 4.0)
242 ******************************************************************************/
244 typedef struct acpi_table_bert
246 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
247 UINT32 RegionLength; /* Length of the boot error region */
248 UINT64 Address; /* Physical address of the error region */
253 /* Boot Error Region (not a subtable, pointed to by Address field above) */
255 typedef struct acpi_bert_region
257 UINT32 BlockStatus; /* Type of error information */
258 UINT32 RawDataOffset; /* Offset to raw error data */
259 UINT32 RawDataLength; /* Length of raw error data */
260 UINT32 DataLength; /* Length of generic error data */
261 UINT32 ErrorSeverity; /* Severity code */
265 /* Values for BlockStatus flags above */
267 #define ACPI_BERT_UNCORRECTABLE (1)
268 #define ACPI_BERT_CORRECTABLE (1<<1)
269 #define ACPI_BERT_MULTIPLE_UNCORRECTABLE (1<<2)
270 #define ACPI_BERT_MULTIPLE_CORRECTABLE (1<<3)
271 #define ACPI_BERT_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
273 /* Values for ErrorSeverity above */
275 enum AcpiBertErrorSeverity
277 ACPI_BERT_ERROR_CORRECTABLE = 0,
278 ACPI_BERT_ERROR_FATAL = 1,
279 ACPI_BERT_ERROR_CORRECTED = 2,
280 ACPI_BERT_ERROR_NONE = 3,
281 ACPI_BERT_ERROR_RESERVED = 4 /* 4 and greater are reserved */
285 * Note: The generic error data that follows the ErrorSeverity field above
286 * uses the ACPI_HEST_GENERIC_DATA defined under the HEST table below
290 /*******************************************************************************
292 * CPEP - Corrected Platform Error Polling table (ACPI 4.0)
295 ******************************************************************************/
297 typedef struct acpi_table_cpep
299 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
307 typedef struct acpi_cpep_polling
309 ACPI_SUBTABLE_HEADER Header;
310 UINT8 Id; /* Processor ID */
311 UINT8 Eid; /* Processor EID */
312 UINT32 Interval; /* Polling interval (msec) */
317 /*******************************************************************************
319 * ECDT - Embedded Controller Boot Resources Table
322 ******************************************************************************/
324 typedef struct acpi_table_ecdt
326 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
327 ACPI_GENERIC_ADDRESS Control; /* Address of EC command/status register */
328 ACPI_GENERIC_ADDRESS Data; /* Address of EC data register */
329 UINT32 Uid; /* Unique ID - must be same as the EC _UID method */
330 UINT8 Gpe; /* The GPE for the EC */
331 UINT8 Id[1]; /* Full namepath of the EC in the ACPI namespace */
336 /*******************************************************************************
338 * EINJ - Error Injection Table (ACPI 4.0)
341 ******************************************************************************/
343 typedef struct acpi_table_einj
345 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
354 /* EINJ Injection Instruction Entries (actions) */
356 typedef struct acpi_einj_entry
358 ACPI_WHEA_HEADER WheaHeader; /* Common header for WHEA tables */
362 /* Masks for Flags field above */
364 #define ACPI_EINJ_PRESERVE (1)
366 /* Values for Action field above */
370 ACPI_EINJ_BEGIN_OPERATION = 0,
371 ACPI_EINJ_GET_TRIGGER_TABLE = 1,
372 ACPI_EINJ_SET_ERROR_TYPE = 2,
373 ACPI_EINJ_GET_ERROR_TYPE = 3,
374 ACPI_EINJ_END_OPERATION = 4,
375 ACPI_EINJ_EXECUTE_OPERATION = 5,
376 ACPI_EINJ_CHECK_BUSY_STATUS = 6,
377 ACPI_EINJ_GET_COMMAND_STATUS = 7,
378 ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 8,
379 ACPI_EINJ_GET_EXECUTE_TIMINGS = 9,
380 ACPI_EINJ_ACTION_RESERVED = 10, /* 10 and greater are reserved */
381 ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */
384 /* Values for Instruction field above */
386 enum AcpiEinjInstructions
388 ACPI_EINJ_READ_REGISTER = 0,
389 ACPI_EINJ_READ_REGISTER_VALUE = 1,
390 ACPI_EINJ_WRITE_REGISTER = 2,
391 ACPI_EINJ_WRITE_REGISTER_VALUE = 3,
393 ACPI_EINJ_FLUSH_CACHELINE = 5,
394 ACPI_EINJ_INSTRUCTION_RESERVED = 6 /* 6 and greater are reserved */
397 typedef struct acpi_einj_error_type_with_addr
400 UINT32 VendorStructOffset;
407 } ACPI_EINJ_ERROR_TYPE_WITH_ADDR;
409 typedef struct acpi_einj_vendor
421 /* EINJ Trigger Error Action Table */
423 typedef struct acpi_einj_trigger
432 /* Command status return values */
434 enum AcpiEinjCommandStatus
436 ACPI_EINJ_SUCCESS = 0,
437 ACPI_EINJ_FAILURE = 1,
438 ACPI_EINJ_INVALID_ACCESS = 2,
439 ACPI_EINJ_STATUS_RESERVED = 3 /* 3 and greater are reserved */
443 /* Error types returned from ACPI_EINJ_GET_ERROR_TYPE (bitfield) */
445 #define ACPI_EINJ_PROCESSOR_CORRECTABLE (1)
446 #define ACPI_EINJ_PROCESSOR_UNCORRECTABLE (1<<1)
447 #define ACPI_EINJ_PROCESSOR_FATAL (1<<2)
448 #define ACPI_EINJ_MEMORY_CORRECTABLE (1<<3)
449 #define ACPI_EINJ_MEMORY_UNCORRECTABLE (1<<4)
450 #define ACPI_EINJ_MEMORY_FATAL (1<<5)
451 #define ACPI_EINJ_PCIX_CORRECTABLE (1<<6)
452 #define ACPI_EINJ_PCIX_UNCORRECTABLE (1<<7)
453 #define ACPI_EINJ_PCIX_FATAL (1<<8)
454 #define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9)
455 #define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10)
456 #define ACPI_EINJ_PLATFORM_FATAL (1<<11)
457 #define ACPI_EINJ_VENDOR_DEFINED (1<<31)
460 /*******************************************************************************
462 * ERST - Error Record Serialization Table (ACPI 4.0)
465 ******************************************************************************/
467 typedef struct acpi_table_erst
469 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
477 /* ERST Serialization Entries (actions) */
479 typedef struct acpi_erst_entry
481 ACPI_WHEA_HEADER WheaHeader; /* Common header for WHEA tables */
485 /* Masks for Flags field above */
487 #define ACPI_ERST_PRESERVE (1)
489 /* Values for Action field above */
493 ACPI_ERST_BEGIN_WRITE = 0,
494 ACPI_ERST_BEGIN_READ = 1,
495 ACPI_ERST_BEGIN_CLEAR = 2,
497 ACPI_ERST_SET_RECORD_OFFSET = 4,
498 ACPI_ERST_EXECUTE_OPERATION = 5,
499 ACPI_ERST_CHECK_BUSY_STATUS = 6,
500 ACPI_ERST_GET_COMMAND_STATUS = 7,
501 ACPI_ERST_GET_RECORD_ID = 8,
502 ACPI_ERST_SET_RECORD_ID = 9,
503 ACPI_ERST_GET_RECORD_COUNT = 10,
504 ACPI_ERST_BEGIN_DUMMY_WRIITE = 11,
505 ACPI_ERST_NOT_USED = 12,
506 ACPI_ERST_GET_ERROR_RANGE = 13,
507 ACPI_ERST_GET_ERROR_LENGTH = 14,
508 ACPI_ERST_GET_ERROR_ATTRIBUTES = 15,
509 ACPI_ERST_EXECUTE_TIMINGS = 16,
510 ACPI_ERST_ACTION_RESERVED = 17 /* 17 and greater are reserved */
513 /* Values for Instruction field above */
515 enum AcpiErstInstructions
517 ACPI_ERST_READ_REGISTER = 0,
518 ACPI_ERST_READ_REGISTER_VALUE = 1,
519 ACPI_ERST_WRITE_REGISTER = 2,
520 ACPI_ERST_WRITE_REGISTER_VALUE = 3,
522 ACPI_ERST_LOAD_VAR1 = 5,
523 ACPI_ERST_LOAD_VAR2 = 6,
524 ACPI_ERST_STORE_VAR1 = 7,
526 ACPI_ERST_SUBTRACT = 9,
527 ACPI_ERST_ADD_VALUE = 10,
528 ACPI_ERST_SUBTRACT_VALUE = 11,
529 ACPI_ERST_STALL = 12,
530 ACPI_ERST_STALL_WHILE_TRUE = 13,
531 ACPI_ERST_SKIP_NEXT_IF_TRUE = 14,
533 ACPI_ERST_SET_SRC_ADDRESS_BASE = 16,
534 ACPI_ERST_SET_DST_ADDRESS_BASE = 17,
535 ACPI_ERST_MOVE_DATA = 18,
536 ACPI_ERST_INSTRUCTION_RESERVED = 19 /* 19 and greater are reserved */
539 /* Command status return values */
541 enum AcpiErstCommandStatus
543 ACPI_ERST_SUCESS = 0,
544 ACPI_ERST_NO_SPACE = 1,
545 ACPI_ERST_NOT_AVAILABLE = 2,
546 ACPI_ERST_FAILURE = 3,
547 ACPI_ERST_RECORD_EMPTY = 4,
548 ACPI_ERST_NOT_FOUND = 5,
549 ACPI_ERST_STATUS_RESERVED = 6 /* 6 and greater are reserved */
553 /* Error Record Serialization Information */
555 typedef struct acpi_erst_info
557 UINT16 Signature; /* Should be "ER" */
563 /*******************************************************************************
565 * HEST - Hardware Error Source Table (ACPI 4.0)
568 ******************************************************************************/
570 typedef struct acpi_table_hest
572 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
573 UINT32 ErrorSourceCount;
578 /* HEST subtable header */
580 typedef struct acpi_hest_header
588 /* Values for Type field above for subtables */
592 ACPI_HEST_TYPE_IA32_CHECK = 0,
593 ACPI_HEST_TYPE_IA32_CORRECTED_CHECK = 1,
594 ACPI_HEST_TYPE_IA32_NMI = 2,
595 ACPI_HEST_TYPE_NOT_USED3 = 3,
596 ACPI_HEST_TYPE_NOT_USED4 = 4,
597 ACPI_HEST_TYPE_NOT_USED5 = 5,
598 ACPI_HEST_TYPE_AER_ROOT_PORT = 6,
599 ACPI_HEST_TYPE_AER_ENDPOINT = 7,
600 ACPI_HEST_TYPE_AER_BRIDGE = 8,
601 ACPI_HEST_TYPE_GENERIC_ERROR = 9,
602 ACPI_HEST_TYPE_GENERIC_ERROR_V2 = 10,
603 ACPI_HEST_TYPE_RESERVED = 11 /* 11 and greater are reserved */
608 * HEST substructures contained in subtables
612 * IA32 Error Bank(s) - Follows the ACPI_HEST_IA_MACHINE_CHECK and
613 * ACPI_HEST_IA_CORRECTED structures.
615 typedef struct acpi_hest_ia_error_bank
618 UINT8 ClearStatusOnInit;
621 UINT32 ControlRegister;
623 UINT32 StatusRegister;
624 UINT32 AddressRegister;
627 } ACPI_HEST_IA_ERROR_BANK;
630 /* Common HEST sub-structure for PCI/AER structures below (6,7,8) */
632 typedef struct acpi_hest_aer_common
637 UINT32 RecordsToPreallocate;
638 UINT32 MaxSectionsPerRecord;
639 UINT32 Bus; /* Bus and Segment numbers */
642 UINT16 DeviceControl;
644 UINT32 UncorrectableMask;
645 UINT32 UncorrectableSeverity;
646 UINT32 CorrectableMask;
647 UINT32 AdvancedCapabilities;
649 } ACPI_HEST_AER_COMMON;
651 /* Masks for HEST Flags fields */
653 #define ACPI_HEST_FIRMWARE_FIRST (1)
654 #define ACPI_HEST_GLOBAL (1<<1)
657 * Macros to access the bus/segment numbers in Bus field above:
658 * Bus number is encoded in bits 7:0
659 * Segment number is encoded in bits 23:8
661 #define ACPI_HEST_BUS(Bus) ((Bus) & 0xFF)
662 #define ACPI_HEST_SEGMENT(Bus) (((Bus) >> 8) & 0xFFFF)
665 /* Hardware Error Notification */
667 typedef struct acpi_hest_notify
671 UINT16 ConfigWriteEnable;
674 UINT32 PollingThresholdValue;
675 UINT32 PollingThresholdWindow;
676 UINT32 ErrorThresholdValue;
677 UINT32 ErrorThresholdWindow;
681 /* Values for Notify Type field above */
683 enum AcpiHestNotifyTypes
685 ACPI_HEST_NOTIFY_POLLED = 0,
686 ACPI_HEST_NOTIFY_EXTERNAL = 1,
687 ACPI_HEST_NOTIFY_LOCAL = 2,
688 ACPI_HEST_NOTIFY_SCI = 3,
689 ACPI_HEST_NOTIFY_NMI = 4,
690 ACPI_HEST_NOTIFY_CMCI = 5, /* ACPI 5.0 */
691 ACPI_HEST_NOTIFY_MCE = 6, /* ACPI 5.0 */
692 ACPI_HEST_NOTIFY_GPIO = 7, /* ACPI 6.0 */
693 ACPI_HEST_NOTIFY_SEA = 8, /* ACPI 6.1 */
694 ACPI_HEST_NOTIFY_SEI = 9, /* ACPI 6.1 */
695 ACPI_HEST_NOTIFY_GSIV = 10, /* ACPI 6.1 */
696 ACPI_HEST_NOTIFY_RESERVED = 11 /* 11 and greater are reserved */
699 /* Values for ConfigWriteEnable bitfield above */
701 #define ACPI_HEST_TYPE (1)
702 #define ACPI_HEST_POLL_INTERVAL (1<<1)
703 #define ACPI_HEST_POLL_THRESHOLD_VALUE (1<<2)
704 #define ACPI_HEST_POLL_THRESHOLD_WINDOW (1<<3)
705 #define ACPI_HEST_ERR_THRESHOLD_VALUE (1<<4)
706 #define ACPI_HEST_ERR_THRESHOLD_WINDOW (1<<5)
713 /* 0: IA32 Machine Check Exception */
715 typedef struct acpi_hest_ia_machine_check
717 ACPI_HEST_HEADER Header;
721 UINT32 RecordsToPreallocate;
722 UINT32 MaxSectionsPerRecord;
723 UINT64 GlobalCapabilityData;
724 UINT64 GlobalControlData;
725 UINT8 NumHardwareBanks;
728 } ACPI_HEST_IA_MACHINE_CHECK;
731 /* 1: IA32 Corrected Machine Check */
733 typedef struct acpi_hest_ia_corrected
735 ACPI_HEST_HEADER Header;
739 UINT32 RecordsToPreallocate;
740 UINT32 MaxSectionsPerRecord;
741 ACPI_HEST_NOTIFY Notify;
742 UINT8 NumHardwareBanks;
745 } ACPI_HEST_IA_CORRECTED;
748 /* 2: IA32 Non-Maskable Interrupt */
750 typedef struct acpi_hest_ia_nmi
752 ACPI_HEST_HEADER Header;
754 UINT32 RecordsToPreallocate;
755 UINT32 MaxSectionsPerRecord;
756 UINT32 MaxRawDataLength;
761 /* 3,4,5: Not used */
763 /* 6: PCI Express Root Port AER */
765 typedef struct acpi_hest_aer_root
767 ACPI_HEST_HEADER Header;
768 ACPI_HEST_AER_COMMON Aer;
769 UINT32 RootErrorCommand;
771 } ACPI_HEST_AER_ROOT;
774 /* 7: PCI Express AER (AER Endpoint) */
776 typedef struct acpi_hest_aer
778 ACPI_HEST_HEADER Header;
779 ACPI_HEST_AER_COMMON Aer;
784 /* 8: PCI Express/PCI-X Bridge AER */
786 typedef struct acpi_hest_aer_bridge
788 ACPI_HEST_HEADER Header;
789 ACPI_HEST_AER_COMMON Aer;
790 UINT32 UncorrectableMask2;
791 UINT32 UncorrectableSeverity2;
792 UINT32 AdvancedCapabilities2;
794 } ACPI_HEST_AER_BRIDGE;
797 /* 9: Generic Hardware Error Source */
799 typedef struct acpi_hest_generic
801 ACPI_HEST_HEADER Header;
802 UINT16 RelatedSourceId;
805 UINT32 RecordsToPreallocate;
806 UINT32 MaxSectionsPerRecord;
807 UINT32 MaxRawDataLength;
808 ACPI_GENERIC_ADDRESS ErrorStatusAddress;
809 ACPI_HEST_NOTIFY Notify;
810 UINT32 ErrorBlockLength;
815 /* 10: Generic Hardware Error Source, version 2 */
817 typedef struct acpi_hest_generic_v2
819 ACPI_HEST_HEADER Header;
820 UINT16 RelatedSourceId;
823 UINT32 RecordsToPreallocate;
824 UINT32 MaxSectionsPerRecord;
825 UINT32 MaxRawDataLength;
826 ACPI_GENERIC_ADDRESS ErrorStatusAddress;
827 ACPI_HEST_NOTIFY Notify;
828 UINT32 ErrorBlockLength;
829 ACPI_GENERIC_ADDRESS ReadAckRegister;
830 UINT64 ReadAckPreserve;
833 } ACPI_HEST_GENERIC_V2;
836 /* Generic Error Status block */
838 typedef struct acpi_hest_generic_status
841 UINT32 RawDataOffset;
842 UINT32 RawDataLength;
844 UINT32 ErrorSeverity;
846 } ACPI_HEST_GENERIC_STATUS;
848 /* Values for BlockStatus flags above */
850 #define ACPI_HEST_UNCORRECTABLE (1)
851 #define ACPI_HEST_CORRECTABLE (1<<1)
852 #define ACPI_HEST_MULTIPLE_UNCORRECTABLE (1<<2)
853 #define ACPI_HEST_MULTIPLE_CORRECTABLE (1<<3)
854 #define ACPI_HEST_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
857 /* Generic Error Data entry */
859 typedef struct acpi_hest_generic_data
861 UINT8 SectionType[16];
862 UINT32 ErrorSeverity;
864 UINT8 ValidationBits;
866 UINT32 ErrorDataLength;
870 } ACPI_HEST_GENERIC_DATA;
872 /* Extension for revision 0x0300 */
874 typedef struct acpi_hest_generic_data_v300
876 UINT8 SectionType[16];
877 UINT32 ErrorSeverity;
879 UINT8 ValidationBits;
881 UINT32 ErrorDataLength;
886 } ACPI_HEST_GENERIC_DATA_V300;
888 /* Values for ErrorSeverity above */
890 #define ACPI_HEST_GEN_ERROR_RECOVERABLE 0
891 #define ACPI_HEST_GEN_ERROR_FATAL 1
892 #define ACPI_HEST_GEN_ERROR_CORRECTED 2
893 #define ACPI_HEST_GEN_ERROR_NONE 3
895 /* Flags for ValidationBits above */
897 #define ACPI_HEST_GEN_VALID_FRU_ID (1)
898 #define ACPI_HEST_GEN_VALID_FRU_STRING (1<<1)
899 #define ACPI_HEST_GEN_VALID_TIMESTAMP (1<<2)
902 /*******************************************************************************
904 * MADT - Multiple APIC Description Table
907 ******************************************************************************/
909 typedef struct acpi_table_madt
911 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
912 UINT32 Address; /* Physical address of local APIC */
917 /* Masks for Flags field above */
919 #define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */
921 /* Values for PCATCompat flag */
923 #define ACPI_MADT_DUAL_PIC 0
924 #define ACPI_MADT_MULTIPLE_APIC 1
927 /* Values for MADT subtable type in ACPI_SUBTABLE_HEADER */
931 ACPI_MADT_TYPE_LOCAL_APIC = 0,
932 ACPI_MADT_TYPE_IO_APIC = 1,
933 ACPI_MADT_TYPE_INTERRUPT_OVERRIDE = 2,
934 ACPI_MADT_TYPE_NMI_SOURCE = 3,
935 ACPI_MADT_TYPE_LOCAL_APIC_NMI = 4,
936 ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE = 5,
937 ACPI_MADT_TYPE_IO_SAPIC = 6,
938 ACPI_MADT_TYPE_LOCAL_SAPIC = 7,
939 ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8,
940 ACPI_MADT_TYPE_LOCAL_X2APIC = 9,
941 ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10,
942 ACPI_MADT_TYPE_GENERIC_INTERRUPT = 11,
943 ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR = 12,
944 ACPI_MADT_TYPE_GENERIC_MSI_FRAME = 13,
945 ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR = 14,
946 ACPI_MADT_TYPE_GENERIC_TRANSLATOR = 15,
947 ACPI_MADT_TYPE_RESERVED = 16 /* 16 and greater are reserved */
952 * MADT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
955 /* 0: Processor Local APIC */
957 typedef struct acpi_madt_local_apic
959 ACPI_SUBTABLE_HEADER Header;
960 UINT8 ProcessorId; /* ACPI processor id */
961 UINT8 Id; /* Processor's local APIC id */
964 } ACPI_MADT_LOCAL_APIC;
969 typedef struct acpi_madt_io_apic
971 ACPI_SUBTABLE_HEADER Header;
972 UINT8 Id; /* I/O APIC ID */
973 UINT8 Reserved; /* Reserved - must be zero */
974 UINT32 Address; /* APIC physical address */
975 UINT32 GlobalIrqBase; /* Global system interrupt where INTI lines start */
980 /* 2: Interrupt Override */
982 typedef struct acpi_madt_interrupt_override
984 ACPI_SUBTABLE_HEADER Header;
985 UINT8 Bus; /* 0 - ISA */
986 UINT8 SourceIrq; /* Interrupt source (IRQ) */
987 UINT32 GlobalIrq; /* Global system interrupt */
990 } ACPI_MADT_INTERRUPT_OVERRIDE;
995 typedef struct acpi_madt_nmi_source
997 ACPI_SUBTABLE_HEADER Header;
999 UINT32 GlobalIrq; /* Global system interrupt */
1001 } ACPI_MADT_NMI_SOURCE;
1004 /* 4: Local APIC NMI */
1006 typedef struct acpi_madt_local_apic_nmi
1008 ACPI_SUBTABLE_HEADER Header;
1009 UINT8 ProcessorId; /* ACPI processor id */
1011 UINT8 Lint; /* LINTn to which NMI is connected */
1013 } ACPI_MADT_LOCAL_APIC_NMI;
1016 /* 5: Address Override */
1018 typedef struct acpi_madt_local_apic_override
1020 ACPI_SUBTABLE_HEADER Header;
1021 UINT16 Reserved; /* Reserved, must be zero */
1022 UINT64 Address; /* APIC physical address */
1024 } ACPI_MADT_LOCAL_APIC_OVERRIDE;
1029 typedef struct acpi_madt_io_sapic
1031 ACPI_SUBTABLE_HEADER Header;
1032 UINT8 Id; /* I/O SAPIC ID */
1033 UINT8 Reserved; /* Reserved, must be zero */
1034 UINT32 GlobalIrqBase; /* Global interrupt for SAPIC start */
1035 UINT64 Address; /* SAPIC physical address */
1037 } ACPI_MADT_IO_SAPIC;
1040 /* 7: Local Sapic */
1042 typedef struct acpi_madt_local_sapic
1044 ACPI_SUBTABLE_HEADER Header;
1045 UINT8 ProcessorId; /* ACPI processor id */
1046 UINT8 Id; /* SAPIC ID */
1047 UINT8 Eid; /* SAPIC EID */
1048 UINT8 Reserved[3]; /* Reserved, must be zero */
1050 UINT32 Uid; /* Numeric UID - ACPI 3.0 */
1051 char UidString[1]; /* String UID - ACPI 3.0 */
1053 } ACPI_MADT_LOCAL_SAPIC;
1056 /* 8: Platform Interrupt Source */
1058 typedef struct acpi_madt_interrupt_source
1060 ACPI_SUBTABLE_HEADER Header;
1062 UINT8 Type; /* 1=PMI, 2=INIT, 3=corrected */
1063 UINT8 Id; /* Processor ID */
1064 UINT8 Eid; /* Processor EID */
1065 UINT8 IoSapicVector; /* Vector value for PMI interrupts */
1066 UINT32 GlobalIrq; /* Global system interrupt */
1067 UINT32 Flags; /* Interrupt Source Flags */
1069 } ACPI_MADT_INTERRUPT_SOURCE;
1071 /* Masks for Flags field above */
1073 #define ACPI_MADT_CPEI_OVERRIDE (1)
1076 /* 9: Processor Local X2APIC (ACPI 4.0) */
1078 typedef struct acpi_madt_local_x2apic
1080 ACPI_SUBTABLE_HEADER Header;
1081 UINT16 Reserved; /* Reserved - must be zero */
1082 UINT32 LocalApicId; /* Processor x2APIC ID */
1084 UINT32 Uid; /* ACPI processor UID */
1086 } ACPI_MADT_LOCAL_X2APIC;
1089 /* 10: Local X2APIC NMI (ACPI 4.0) */
1091 typedef struct acpi_madt_local_x2apic_nmi
1093 ACPI_SUBTABLE_HEADER Header;
1095 UINT32 Uid; /* ACPI processor UID */
1096 UINT8 Lint; /* LINTn to which NMI is connected */
1097 UINT8 Reserved[3]; /* Reserved - must be zero */
1099 } ACPI_MADT_LOCAL_X2APIC_NMI;
1102 /* 11: Generic Interrupt (ACPI 5.0 + ACPI 6.0 changes) */
1104 typedef struct acpi_madt_generic_interrupt
1106 ACPI_SUBTABLE_HEADER Header;
1107 UINT16 Reserved; /* Reserved - must be zero */
1108 UINT32 CpuInterfaceNumber;
1111 UINT32 ParkingVersion;
1112 UINT32 PerformanceInterrupt;
1113 UINT64 ParkedAddress;
1115 UINT64 GicvBaseAddress;
1116 UINT64 GichBaseAddress;
1117 UINT32 VgicInterrupt;
1118 UINT64 GicrBaseAddress;
1120 UINT8 EfficiencyClass;
1123 } ACPI_MADT_GENERIC_INTERRUPT;
1125 /* Masks for Flags field above */
1127 /* ACPI_MADT_ENABLED (1) Processor is usable if set */
1128 #define ACPI_MADT_PERFORMANCE_IRQ_MODE (1<<1) /* 01: Performance Interrupt Mode */
1129 #define ACPI_MADT_VGIC_IRQ_MODE (1<<2) /* 02: VGIC Maintenance Interrupt mode */
1132 /* 12: Generic Distributor (ACPI 5.0 + ACPI 6.0 changes) */
1134 typedef struct acpi_madt_generic_distributor
1136 ACPI_SUBTABLE_HEADER Header;
1137 UINT16 Reserved; /* Reserved - must be zero */
1140 UINT32 GlobalIrqBase;
1142 UINT8 Reserved2[3]; /* Reserved - must be zero */
1144 } ACPI_MADT_GENERIC_DISTRIBUTOR;
1146 /* Values for Version field above */
1148 enum AcpiMadtGicVersion
1150 ACPI_MADT_GIC_VERSION_NONE = 0,
1151 ACPI_MADT_GIC_VERSION_V1 = 1,
1152 ACPI_MADT_GIC_VERSION_V2 = 2,
1153 ACPI_MADT_GIC_VERSION_V3 = 3,
1154 ACPI_MADT_GIC_VERSION_V4 = 4,
1155 ACPI_MADT_GIC_VERSION_RESERVED = 5 /* 5 and greater are reserved */
1159 /* 13: Generic MSI Frame (ACPI 5.1) */
1161 typedef struct acpi_madt_generic_msi_frame
1163 ACPI_SUBTABLE_HEADER Header;
1164 UINT16 Reserved; /* Reserved - must be zero */
1171 } ACPI_MADT_GENERIC_MSI_FRAME;
1173 /* Masks for Flags field above */
1175 #define ACPI_MADT_OVERRIDE_SPI_VALUES (1)
1178 /* 14: Generic Redistributor (ACPI 5.1) */
1180 typedef struct acpi_madt_generic_redistributor
1182 ACPI_SUBTABLE_HEADER Header;
1183 UINT16 Reserved; /* reserved - must be zero */
1187 } ACPI_MADT_GENERIC_REDISTRIBUTOR;
1190 /* 15: Generic Translator (ACPI 6.0) */
1192 typedef struct acpi_madt_generic_translator
1194 ACPI_SUBTABLE_HEADER Header;
1195 UINT16 Reserved; /* reserved - must be zero */
1196 UINT32 TranslationId;
1200 } ACPI_MADT_GENERIC_TRANSLATOR;
1204 * Common flags fields for MADT subtables
1207 /* MADT Local APIC flags */
1209 #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */
1211 /* MADT MPS INTI flags (IntiFlags) */
1213 #define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */
1214 #define ACPI_MADT_TRIGGER_MASK (3<<2) /* 02-03: Trigger mode of APIC input signals */
1216 /* Values for MPS INTI flags */
1218 #define ACPI_MADT_POLARITY_CONFORMS 0
1219 #define ACPI_MADT_POLARITY_ACTIVE_HIGH 1
1220 #define ACPI_MADT_POLARITY_RESERVED 2
1221 #define ACPI_MADT_POLARITY_ACTIVE_LOW 3
1223 #define ACPI_MADT_TRIGGER_CONFORMS (0)
1224 #define ACPI_MADT_TRIGGER_EDGE (1<<2)
1225 #define ACPI_MADT_TRIGGER_RESERVED (2<<2)
1226 #define ACPI_MADT_TRIGGER_LEVEL (3<<2)
1229 /*******************************************************************************
1231 * MSCT - Maximum System Characteristics Table (ACPI 4.0)
1234 ******************************************************************************/
1236 typedef struct acpi_table_msct
1238 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1239 UINT32 ProximityOffset; /* Location of proximity info struct(s) */
1240 UINT32 MaxProximityDomains;/* Max number of proximity domains */
1241 UINT32 MaxClockDomains; /* Max number of clock domains */
1242 UINT64 MaxAddress; /* Max physical address in system */
1247 /* Subtable - Maximum Proximity Domain Information. Version 1 */
1249 typedef struct acpi_msct_proximity
1253 UINT32 RangeStart; /* Start of domain range */
1254 UINT32 RangeEnd; /* End of domain range */
1255 UINT32 ProcessorCapacity;
1256 UINT64 MemoryCapacity; /* In bytes */
1258 } ACPI_MSCT_PROXIMITY;
1261 /*******************************************************************************
1263 * NFIT - NVDIMM Interface Table (ACPI 6.0+)
1266 ******************************************************************************/
1268 typedef struct acpi_table_nfit
1270 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1271 UINT32 Reserved; /* Reserved, must be zero */
1275 /* Subtable header for NFIT */
1277 typedef struct acpi_nfit_header
1285 /* Values for subtable type in ACPI_NFIT_HEADER */
1289 ACPI_NFIT_TYPE_SYSTEM_ADDRESS = 0,
1290 ACPI_NFIT_TYPE_MEMORY_MAP = 1,
1291 ACPI_NFIT_TYPE_INTERLEAVE = 2,
1292 ACPI_NFIT_TYPE_SMBIOS = 3,
1293 ACPI_NFIT_TYPE_CONTROL_REGION = 4,
1294 ACPI_NFIT_TYPE_DATA_REGION = 5,
1295 ACPI_NFIT_TYPE_FLUSH_ADDRESS = 6,
1296 ACPI_NFIT_TYPE_RESERVED = 7 /* 7 and greater are reserved */
1303 /* 0: System Physical Address Range Structure */
1305 typedef struct acpi_nfit_system_address
1307 ACPI_NFIT_HEADER Header;
1310 UINT32 Reserved; /* Reseved, must be zero */
1311 UINT32 ProximityDomain;
1312 UINT8 RangeGuid[16];
1315 UINT64 MemoryMapping;
1317 } ACPI_NFIT_SYSTEM_ADDRESS;
1321 #define ACPI_NFIT_ADD_ONLINE_ONLY (1) /* 00: Add/Online Operation Only */
1322 #define ACPI_NFIT_PROXIMITY_VALID (1<<1) /* 01: Proximity Domain Valid */
1324 /* Range Type GUIDs appear in the include/acuuid.h file */
1327 /* 1: Memory Device to System Address Range Map Structure */
1329 typedef struct acpi_nfit_memory_map
1331 ACPI_NFIT_HEADER Header;
1332 UINT32 DeviceHandle;
1338 UINT64 RegionOffset;
1340 UINT16 InterleaveIndex;
1341 UINT16 InterleaveWays;
1343 UINT16 Reserved; /* Reserved, must be zero */
1345 } ACPI_NFIT_MEMORY_MAP;
1349 #define ACPI_NFIT_MEM_SAVE_FAILED (1) /* 00: Last SAVE to Memory Device failed */
1350 #define ACPI_NFIT_MEM_RESTORE_FAILED (1<<1) /* 01: Last RESTORE from Memory Device failed */
1351 #define ACPI_NFIT_MEM_FLUSH_FAILED (1<<2) /* 02: Platform flush failed */
1352 #define ACPI_NFIT_MEM_NOT_ARMED (1<<3) /* 03: Memory Device is not armed */
1353 #define ACPI_NFIT_MEM_HEALTH_OBSERVED (1<<4) /* 04: Memory Device observed SMART/health events */
1354 #define ACPI_NFIT_MEM_HEALTH_ENABLED (1<<5) /* 05: SMART/health events enabled */
1355 #define ACPI_NFIT_MEM_MAP_FAILED (1<<6) /* 06: Mapping to SPA failed */
1358 /* 2: Interleave Structure */
1360 typedef struct acpi_nfit_interleave
1362 ACPI_NFIT_HEADER Header;
1363 UINT16 InterleaveIndex;
1364 UINT16 Reserved; /* Reserved, must be zero */
1367 UINT32 LineOffset[1]; /* Variable length */
1369 } ACPI_NFIT_INTERLEAVE;
1372 /* 3: SMBIOS Management Information Structure */
1374 typedef struct acpi_nfit_smbios
1376 ACPI_NFIT_HEADER Header;
1377 UINT32 Reserved; /* Reserved, must be zero */
1378 UINT8 Data[1]; /* Variable length */
1383 /* 4: NVDIMM Control Region Structure */
1385 typedef struct acpi_nfit_control_region
1387 ACPI_NFIT_HEADER Header;
1392 UINT16 SubsystemVendorId;
1393 UINT16 SubsystemDeviceId;
1394 UINT16 SubsystemRevisionId;
1396 UINT8 ManufacturingLocation;
1397 UINT16 ManufacturingDate;
1398 UINT8 Reserved[2]; /* Reserved, must be zero */
1399 UINT32 SerialNumber;
1403 UINT64 CommandOffset;
1405 UINT64 StatusOffset;
1408 UINT8 Reserved1[6]; /* Reserved, must be zero */
1410 } ACPI_NFIT_CONTROL_REGION;
1414 #define ACPI_NFIT_CONTROL_BUFFERED (1) /* Block Data Windows implementation is buffered */
1416 /* ValidFields bits */
1418 #define ACPI_NFIT_CONTROL_MFG_INFO_VALID (1) /* Manufacturing fields are valid */
1421 /* 5: NVDIMM Block Data Window Region Structure */
1423 typedef struct acpi_nfit_data_region
1425 ACPI_NFIT_HEADER Header;
1431 UINT64 StartAddress;
1433 } ACPI_NFIT_DATA_REGION;
1436 /* 6: Flush Hint Address Structure */
1438 typedef struct acpi_nfit_flush_address
1440 ACPI_NFIT_HEADER Header;
1441 UINT32 DeviceHandle;
1443 UINT8 Reserved[6]; /* Reserved, must be zero */
1444 UINT64 HintAddress[1]; /* Variable length */
1446 } ACPI_NFIT_FLUSH_ADDRESS;
1449 /*******************************************************************************
1451 * SBST - Smart Battery Specification Table
1454 ******************************************************************************/
1456 typedef struct acpi_table_sbst
1458 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1459 UINT32 WarningLevel;
1461 UINT32 CriticalLevel;
1466 /*******************************************************************************
1468 * SLIT - System Locality Distance Information Table
1471 ******************************************************************************/
1473 typedef struct acpi_table_slit
1475 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1476 UINT64 LocalityCount;
1477 UINT8 Entry[1]; /* Real size = localities^2 */
1482 /*******************************************************************************
1484 * SRAT - System Resource Affinity Table
1487 ******************************************************************************/
1489 typedef struct acpi_table_srat
1491 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
1492 UINT32 TableRevision; /* Must be value '1' */
1493 UINT64 Reserved; /* Reserved, must be zero */
1497 /* Values for subtable type in ACPI_SUBTABLE_HEADER */
1501 ACPI_SRAT_TYPE_CPU_AFFINITY = 0,
1502 ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1,
1503 ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2,
1504 ACPI_SRAT_TYPE_GICC_AFFINITY = 3,
1505 ACPI_SRAT_TYPE_RESERVED = 4 /* 4 and greater are reserved */
1509 * SRAT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
1512 /* 0: Processor Local APIC/SAPIC Affinity */
1514 typedef struct acpi_srat_cpu_affinity
1516 ACPI_SUBTABLE_HEADER Header;
1517 UINT8 ProximityDomainLo;
1520 UINT8 LocalSapicEid;
1521 UINT8 ProximityDomainHi[3];
1524 } ACPI_SRAT_CPU_AFFINITY;
1528 #define ACPI_SRAT_CPU_USE_AFFINITY (1) /* 00: Use affinity structure */
1531 /* 1: Memory Affinity */
1533 typedef struct acpi_srat_mem_affinity
1535 ACPI_SUBTABLE_HEADER Header;
1536 UINT32 ProximityDomain;
1537 UINT16 Reserved; /* Reserved, must be zero */
1542 UINT64 Reserved2; /* Reserved, must be zero */
1544 } ACPI_SRAT_MEM_AFFINITY;
1548 #define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */
1549 #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */
1550 #define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */
1553 /* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */
1555 typedef struct acpi_srat_x2apic_cpu_affinity
1557 ACPI_SUBTABLE_HEADER Header;
1558 UINT16 Reserved; /* Reserved, must be zero */
1559 UINT32 ProximityDomain;
1565 } ACPI_SRAT_X2APIC_CPU_AFFINITY;
1567 /* Flags for ACPI_SRAT_CPU_AFFINITY and ACPI_SRAT_X2APIC_CPU_AFFINITY */
1569 #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
1572 /* 3: GICC Affinity (ACPI 5.1) */
1574 typedef struct acpi_srat_gicc_affinity
1576 ACPI_SUBTABLE_HEADER Header;
1577 UINT32 ProximityDomain;
1578 UINT32 AcpiProcessorUid;
1582 } ACPI_SRAT_GICC_AFFINITY;
1584 /* Flags for ACPI_SRAT_GICC_AFFINITY */
1586 #define ACPI_SRAT_GICC_ENABLED (1) /* 00: Use affinity structure */
1589 /* Reset to default packing */
1593 #endif /* __ACTBL1_H__ */