1 /******************************************************************************
3 * Name: actbl1.h - Additional ACPI table definitions
5 *****************************************************************************/
7 /******************************************************************************
11 * Some or all of this work - Copyright (c) 1999 - 2015, 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 *****************************************************************************/
120 /*******************************************************************************
122 * Additional ACPI Tables (1)
124 * These tables are not consumed directly by the ACPICA subsystem, but are
125 * included here to support device drivers and the AML disassembler.
127 * The tables in this file are fully defined within the ACPI specification.
129 ******************************************************************************/
133 * Values for description table header signatures for tables defined in this
134 * file. Useful because they make it more difficult to inadvertently type in
135 * the wrong signature.
137 #define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */
138 #define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */
139 #define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */
140 #define ACPI_SIG_EINJ "EINJ" /* Error Injection table */
141 #define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */
142 #define ACPI_SIG_HEST "HEST" /* Hardware Error Source Table */
143 #define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */
144 #define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table */
145 #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */
146 #define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */
147 #define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */
148 #define ACPI_SIG_NFIT "NFIT" /* NVDIMM Firmware Interface Table */
152 * All tables must be byte-packed to match the ACPI specification, since
153 * the tables are provided by the system BIOS.
158 * Note: C bitfields are not used for this reason:
160 * "Bitfields are great and easy to read, but unfortunately the C language
161 * does not specify the layout of bitfields in memory, which means they are
162 * essentially useless for dealing with packed data in on-disk formats or
163 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
164 * this decision was a design error in C. Ritchie could have picked an order
165 * and stuck with it." Norman Ramsey.
166 * See http://stackoverflow.com/a/1053662/41661
170 /*******************************************************************************
172 * Common subtable headers
174 ******************************************************************************/
176 /* Generic subtable header (used in MADT, SRAT, etc.) */
178 typedef struct acpi_subtable_header
183 } ACPI_SUBTABLE_HEADER
;
186 /* Subtable header for WHEA tables (EINJ, ERST, WDAT) */
188 typedef struct acpi_whea_header
194 ACPI_GENERIC_ADDRESS RegisterRegion
;
195 UINT64 Value
; /* Value used with Read/Write register */
196 UINT64 Mask
; /* Bitmask required for this register instruction */
201 /*******************************************************************************
203 * BERT - Boot Error Record Table (ACPI 4.0)
206 ******************************************************************************/
208 typedef struct acpi_table_bert
210 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
211 UINT32 RegionLength
; /* Length of the boot error region */
212 UINT64 Address
; /* Physical address of the error region */
217 /* Boot Error Region (not a subtable, pointed to by Address field above) */
219 typedef struct acpi_bert_region
221 UINT32 BlockStatus
; /* Type of error information */
222 UINT32 RawDataOffset
; /* Offset to raw error data */
223 UINT32 RawDataLength
; /* Length of raw error data */
224 UINT32 DataLength
; /* Length of generic error data */
225 UINT32 ErrorSeverity
; /* Severity code */
229 /* Values for BlockStatus flags above */
231 #define ACPI_BERT_UNCORRECTABLE (1)
232 #define ACPI_BERT_CORRECTABLE (1<<1)
233 #define ACPI_BERT_MULTIPLE_UNCORRECTABLE (1<<2)
234 #define ACPI_BERT_MULTIPLE_CORRECTABLE (1<<3)
235 #define ACPI_BERT_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
237 /* Values for ErrorSeverity above */
239 enum AcpiBertErrorSeverity
241 ACPI_BERT_ERROR_CORRECTABLE
= 0,
242 ACPI_BERT_ERROR_FATAL
= 1,
243 ACPI_BERT_ERROR_CORRECTED
= 2,
244 ACPI_BERT_ERROR_NONE
= 3,
245 ACPI_BERT_ERROR_RESERVED
= 4 /* 4 and greater are reserved */
249 * Note: The generic error data that follows the ErrorSeverity field above
250 * uses the ACPI_HEST_GENERIC_DATA defined under the HEST table below
254 /*******************************************************************************
256 * CPEP - Corrected Platform Error Polling table (ACPI 4.0)
259 ******************************************************************************/
261 typedef struct acpi_table_cpep
263 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
271 typedef struct acpi_cpep_polling
273 ACPI_SUBTABLE_HEADER Header
;
274 UINT8 Id
; /* Processor ID */
275 UINT8 Eid
; /* Processor EID */
276 UINT32 Interval
; /* Polling interval (msec) */
281 /*******************************************************************************
283 * ECDT - Embedded Controller Boot Resources Table
286 ******************************************************************************/
288 typedef struct acpi_table_ecdt
290 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
291 ACPI_GENERIC_ADDRESS Control
; /* Address of EC command/status register */
292 ACPI_GENERIC_ADDRESS Data
; /* Address of EC data register */
293 UINT32 Uid
; /* Unique ID - must be same as the EC _UID method */
294 UINT8 Gpe
; /* The GPE for the EC */
295 UINT8 Id
[1]; /* Full namepath of the EC in the ACPI namespace */
300 /*******************************************************************************
302 * EINJ - Error Injection Table (ACPI 4.0)
305 ******************************************************************************/
307 typedef struct acpi_table_einj
309 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
318 /* EINJ Injection Instruction Entries (actions) */
320 typedef struct acpi_einj_entry
322 ACPI_WHEA_HEADER WheaHeader
; /* Common header for WHEA tables */
326 /* Masks for Flags field above */
328 #define ACPI_EINJ_PRESERVE (1)
330 /* Values for Action field above */
334 ACPI_EINJ_BEGIN_OPERATION
= 0,
335 ACPI_EINJ_GET_TRIGGER_TABLE
= 1,
336 ACPI_EINJ_SET_ERROR_TYPE
= 2,
337 ACPI_EINJ_GET_ERROR_TYPE
= 3,
338 ACPI_EINJ_END_OPERATION
= 4,
339 ACPI_EINJ_EXECUTE_OPERATION
= 5,
340 ACPI_EINJ_CHECK_BUSY_STATUS
= 6,
341 ACPI_EINJ_GET_COMMAND_STATUS
= 7,
342 ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS
= 8,
343 ACPI_EINJ_ACTION_RESERVED
= 9, /* 9 and greater are reserved */
344 ACPI_EINJ_TRIGGER_ERROR
= 0xFF /* Except for this value */
347 /* Values for Instruction field above */
349 enum AcpiEinjInstructions
351 ACPI_EINJ_READ_REGISTER
= 0,
352 ACPI_EINJ_READ_REGISTER_VALUE
= 1,
353 ACPI_EINJ_WRITE_REGISTER
= 2,
354 ACPI_EINJ_WRITE_REGISTER_VALUE
= 3,
356 ACPI_EINJ_FLUSH_CACHELINE
= 5,
357 ACPI_EINJ_INSTRUCTION_RESERVED
= 6 /* 6 and greater are reserved */
360 typedef struct acpi_einj_error_type_with_addr
363 UINT32 VendorStructOffset
;
370 } ACPI_EINJ_ERROR_TYPE_WITH_ADDR
;
372 typedef struct acpi_einj_vendor
384 /* EINJ Trigger Error Action Table */
386 typedef struct acpi_einj_trigger
395 /* Command status return values */
397 enum AcpiEinjCommandStatus
399 ACPI_EINJ_SUCCESS
= 0,
400 ACPI_EINJ_FAILURE
= 1,
401 ACPI_EINJ_INVALID_ACCESS
= 2,
402 ACPI_EINJ_STATUS_RESERVED
= 3 /* 3 and greater are reserved */
406 /* Error types returned from ACPI_EINJ_GET_ERROR_TYPE (bitfield) */
408 #define ACPI_EINJ_PROCESSOR_CORRECTABLE (1)
409 #define ACPI_EINJ_PROCESSOR_UNCORRECTABLE (1<<1)
410 #define ACPI_EINJ_PROCESSOR_FATAL (1<<2)
411 #define ACPI_EINJ_MEMORY_CORRECTABLE (1<<3)
412 #define ACPI_EINJ_MEMORY_UNCORRECTABLE (1<<4)
413 #define ACPI_EINJ_MEMORY_FATAL (1<<5)
414 #define ACPI_EINJ_PCIX_CORRECTABLE (1<<6)
415 #define ACPI_EINJ_PCIX_UNCORRECTABLE (1<<7)
416 #define ACPI_EINJ_PCIX_FATAL (1<<8)
417 #define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9)
418 #define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10)
419 #define ACPI_EINJ_PLATFORM_FATAL (1<<11)
420 #define ACPI_EINJ_VENDOR_DEFINED (1<<31)
423 /*******************************************************************************
425 * ERST - Error Record Serialization Table (ACPI 4.0)
428 ******************************************************************************/
430 typedef struct acpi_table_erst
432 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
440 /* ERST Serialization Entries (actions) */
442 typedef struct acpi_erst_entry
444 ACPI_WHEA_HEADER WheaHeader
; /* Common header for WHEA tables */
448 /* Masks for Flags field above */
450 #define ACPI_ERST_PRESERVE (1)
452 /* Values for Action field above */
456 ACPI_ERST_BEGIN_WRITE
= 0,
457 ACPI_ERST_BEGIN_READ
= 1,
458 ACPI_ERST_BEGIN_CLEAR
= 2,
460 ACPI_ERST_SET_RECORD_OFFSET
= 4,
461 ACPI_ERST_EXECUTE_OPERATION
= 5,
462 ACPI_ERST_CHECK_BUSY_STATUS
= 6,
463 ACPI_ERST_GET_COMMAND_STATUS
= 7,
464 ACPI_ERST_GET_RECORD_ID
= 8,
465 ACPI_ERST_SET_RECORD_ID
= 9,
466 ACPI_ERST_GET_RECORD_COUNT
= 10,
467 ACPI_ERST_BEGIN_DUMMY_WRIITE
= 11,
468 ACPI_ERST_NOT_USED
= 12,
469 ACPI_ERST_GET_ERROR_RANGE
= 13,
470 ACPI_ERST_GET_ERROR_LENGTH
= 14,
471 ACPI_ERST_GET_ERROR_ATTRIBUTES
= 15,
472 ACPI_ERST_ACTION_RESERVED
= 16 /* 16 and greater are reserved */
475 /* Values for Instruction field above */
477 enum AcpiErstInstructions
479 ACPI_ERST_READ_REGISTER
= 0,
480 ACPI_ERST_READ_REGISTER_VALUE
= 1,
481 ACPI_ERST_WRITE_REGISTER
= 2,
482 ACPI_ERST_WRITE_REGISTER_VALUE
= 3,
484 ACPI_ERST_LOAD_VAR1
= 5,
485 ACPI_ERST_LOAD_VAR2
= 6,
486 ACPI_ERST_STORE_VAR1
= 7,
488 ACPI_ERST_SUBTRACT
= 9,
489 ACPI_ERST_ADD_VALUE
= 10,
490 ACPI_ERST_SUBTRACT_VALUE
= 11,
491 ACPI_ERST_STALL
= 12,
492 ACPI_ERST_STALL_WHILE_TRUE
= 13,
493 ACPI_ERST_SKIP_NEXT_IF_TRUE
= 14,
495 ACPI_ERST_SET_SRC_ADDRESS_BASE
= 16,
496 ACPI_ERST_SET_DST_ADDRESS_BASE
= 17,
497 ACPI_ERST_MOVE_DATA
= 18,
498 ACPI_ERST_INSTRUCTION_RESERVED
= 19 /* 19 and greater are reserved */
501 /* Command status return values */
503 enum AcpiErstCommandStatus
505 ACPI_ERST_SUCESS
= 0,
506 ACPI_ERST_NO_SPACE
= 1,
507 ACPI_ERST_NOT_AVAILABLE
= 2,
508 ACPI_ERST_FAILURE
= 3,
509 ACPI_ERST_RECORD_EMPTY
= 4,
510 ACPI_ERST_NOT_FOUND
= 5,
511 ACPI_ERST_STATUS_RESERVED
= 6 /* 6 and greater are reserved */
515 /* Error Record Serialization Information */
517 typedef struct acpi_erst_info
519 UINT16 Signature
; /* Should be "ER" */
525 /*******************************************************************************
527 * HEST - Hardware Error Source Table (ACPI 4.0)
530 ******************************************************************************/
532 typedef struct acpi_table_hest
534 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
535 UINT32 ErrorSourceCount
;
540 /* HEST subtable header */
542 typedef struct acpi_hest_header
550 /* Values for Type field above for subtables */
554 ACPI_HEST_TYPE_IA32_CHECK
= 0,
555 ACPI_HEST_TYPE_IA32_CORRECTED_CHECK
= 1,
556 ACPI_HEST_TYPE_IA32_NMI
= 2,
557 ACPI_HEST_TYPE_NOT_USED3
= 3,
558 ACPI_HEST_TYPE_NOT_USED4
= 4,
559 ACPI_HEST_TYPE_NOT_USED5
= 5,
560 ACPI_HEST_TYPE_AER_ROOT_PORT
= 6,
561 ACPI_HEST_TYPE_AER_ENDPOINT
= 7,
562 ACPI_HEST_TYPE_AER_BRIDGE
= 8,
563 ACPI_HEST_TYPE_GENERIC_ERROR
= 9,
564 ACPI_HEST_TYPE_RESERVED
= 10 /* 10 and greater are reserved */
569 * HEST substructures contained in subtables
573 * IA32 Error Bank(s) - Follows the ACPI_HEST_IA_MACHINE_CHECK and
574 * ACPI_HEST_IA_CORRECTED structures.
576 typedef struct acpi_hest_ia_error_bank
579 UINT8 ClearStatusOnInit
;
582 UINT32 ControlRegister
;
584 UINT32 StatusRegister
;
585 UINT32 AddressRegister
;
588 } ACPI_HEST_IA_ERROR_BANK
;
591 /* Common HEST sub-structure for PCI/AER structures below (6,7,8) */
593 typedef struct acpi_hest_aer_common
598 UINT32 RecordsToPreallocate
;
599 UINT32 MaxSectionsPerRecord
;
600 UINT32 Bus
; /* Bus and Segment numbers */
603 UINT16 DeviceControl
;
605 UINT32 UncorrectableMask
;
606 UINT32 UncorrectableSeverity
;
607 UINT32 CorrectableMask
;
608 UINT32 AdvancedCapabilities
;
610 } ACPI_HEST_AER_COMMON
;
612 /* Masks for HEST Flags fields */
614 #define ACPI_HEST_FIRMWARE_FIRST (1)
615 #define ACPI_HEST_GLOBAL (1<<1)
618 * Macros to access the bus/segment numbers in Bus field above:
619 * Bus number is encoded in bits 7:0
620 * Segment number is encoded in bits 23:8
622 #define ACPI_HEST_BUS(Bus) ((Bus) & 0xFF)
623 #define ACPI_HEST_SEGMENT(Bus) (((Bus) >> 8) & 0xFFFF)
626 /* Hardware Error Notification */
628 typedef struct acpi_hest_notify
632 UINT16 ConfigWriteEnable
;
635 UINT32 PollingThresholdValue
;
636 UINT32 PollingThresholdWindow
;
637 UINT32 ErrorThresholdValue
;
638 UINT32 ErrorThresholdWindow
;
642 /* Values for Notify Type field above */
644 enum AcpiHestNotifyTypes
646 ACPI_HEST_NOTIFY_POLLED
= 0,
647 ACPI_HEST_NOTIFY_EXTERNAL
= 1,
648 ACPI_HEST_NOTIFY_LOCAL
= 2,
649 ACPI_HEST_NOTIFY_SCI
= 3,
650 ACPI_HEST_NOTIFY_NMI
= 4,
651 ACPI_HEST_NOTIFY_CMCI
= 5, /* ACPI 5.0 */
652 ACPI_HEST_NOTIFY_MCE
= 6, /* ACPI 5.0 */
653 ACPI_HEST_NOTIFY_RESERVED
= 7 /* 7 and greater are reserved */
656 /* Values for ConfigWriteEnable bitfield above */
658 #define ACPI_HEST_TYPE (1)
659 #define ACPI_HEST_POLL_INTERVAL (1<<1)
660 #define ACPI_HEST_POLL_THRESHOLD_VALUE (1<<2)
661 #define ACPI_HEST_POLL_THRESHOLD_WINDOW (1<<3)
662 #define ACPI_HEST_ERR_THRESHOLD_VALUE (1<<4)
663 #define ACPI_HEST_ERR_THRESHOLD_WINDOW (1<<5)
670 /* 0: IA32 Machine Check Exception */
672 typedef struct acpi_hest_ia_machine_check
674 ACPI_HEST_HEADER Header
;
678 UINT32 RecordsToPreallocate
;
679 UINT32 MaxSectionsPerRecord
;
680 UINT64 GlobalCapabilityData
;
681 UINT64 GlobalControlData
;
682 UINT8 NumHardwareBanks
;
685 } ACPI_HEST_IA_MACHINE_CHECK
;
688 /* 1: IA32 Corrected Machine Check */
690 typedef struct acpi_hest_ia_corrected
692 ACPI_HEST_HEADER Header
;
696 UINT32 RecordsToPreallocate
;
697 UINT32 MaxSectionsPerRecord
;
698 ACPI_HEST_NOTIFY Notify
;
699 UINT8 NumHardwareBanks
;
702 } ACPI_HEST_IA_CORRECTED
;
705 /* 2: IA32 Non-Maskable Interrupt */
707 typedef struct acpi_hest_ia_nmi
709 ACPI_HEST_HEADER Header
;
711 UINT32 RecordsToPreallocate
;
712 UINT32 MaxSectionsPerRecord
;
713 UINT32 MaxRawDataLength
;
718 /* 3,4,5: Not used */
720 /* 6: PCI Express Root Port AER */
722 typedef struct acpi_hest_aer_root
724 ACPI_HEST_HEADER Header
;
725 ACPI_HEST_AER_COMMON Aer
;
726 UINT32 RootErrorCommand
;
728 } ACPI_HEST_AER_ROOT
;
731 /* 7: PCI Express AER (AER Endpoint) */
733 typedef struct acpi_hest_aer
735 ACPI_HEST_HEADER Header
;
736 ACPI_HEST_AER_COMMON Aer
;
741 /* 8: PCI Express/PCI-X Bridge AER */
743 typedef struct acpi_hest_aer_bridge
745 ACPI_HEST_HEADER Header
;
746 ACPI_HEST_AER_COMMON Aer
;
747 UINT32 UncorrectableMask2
;
748 UINT32 UncorrectableSeverity2
;
749 UINT32 AdvancedCapabilities2
;
751 } ACPI_HEST_AER_BRIDGE
;
754 /* 9: Generic Hardware Error Source */
756 typedef struct acpi_hest_generic
758 ACPI_HEST_HEADER Header
;
759 UINT16 RelatedSourceId
;
762 UINT32 RecordsToPreallocate
;
763 UINT32 MaxSectionsPerRecord
;
764 UINT32 MaxRawDataLength
;
765 ACPI_GENERIC_ADDRESS ErrorStatusAddress
;
766 ACPI_HEST_NOTIFY Notify
;
767 UINT32 ErrorBlockLength
;
772 /* Generic Error Status block */
774 typedef struct acpi_hest_generic_status
777 UINT32 RawDataOffset
;
778 UINT32 RawDataLength
;
780 UINT32 ErrorSeverity
;
782 } ACPI_HEST_GENERIC_STATUS
;
784 /* Values for BlockStatus flags above */
786 #define ACPI_HEST_UNCORRECTABLE (1)
787 #define ACPI_HEST_CORRECTABLE (1<<1)
788 #define ACPI_HEST_MULTIPLE_UNCORRECTABLE (1<<2)
789 #define ACPI_HEST_MULTIPLE_CORRECTABLE (1<<3)
790 #define ACPI_HEST_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
793 /* Generic Error Data entry */
795 typedef struct acpi_hest_generic_data
797 UINT8 SectionType
[16];
798 UINT32 ErrorSeverity
;
800 UINT8 ValidationBits
;
802 UINT32 ErrorDataLength
;
806 } ACPI_HEST_GENERIC_DATA
;
809 /*******************************************************************************
811 * MADT - Multiple APIC Description Table
814 ******************************************************************************/
816 typedef struct acpi_table_madt
818 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
819 UINT32 Address
; /* Physical address of local APIC */
824 /* Masks for Flags field above */
826 #define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */
828 /* Values for PCATCompat flag */
830 #define ACPI_MADT_DUAL_PIC 0
831 #define ACPI_MADT_MULTIPLE_APIC 1
834 /* Values for MADT subtable type in ACPI_SUBTABLE_HEADER */
838 ACPI_MADT_TYPE_LOCAL_APIC
= 0,
839 ACPI_MADT_TYPE_IO_APIC
= 1,
840 ACPI_MADT_TYPE_INTERRUPT_OVERRIDE
= 2,
841 ACPI_MADT_TYPE_NMI_SOURCE
= 3,
842 ACPI_MADT_TYPE_LOCAL_APIC_NMI
= 4,
843 ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE
= 5,
844 ACPI_MADT_TYPE_IO_SAPIC
= 6,
845 ACPI_MADT_TYPE_LOCAL_SAPIC
= 7,
846 ACPI_MADT_TYPE_INTERRUPT_SOURCE
= 8,
847 ACPI_MADT_TYPE_LOCAL_X2APIC
= 9,
848 ACPI_MADT_TYPE_LOCAL_X2APIC_NMI
= 10,
849 ACPI_MADT_TYPE_GENERIC_INTERRUPT
= 11,
850 ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR
= 12,
851 ACPI_MADT_TYPE_GENERIC_MSI_FRAME
= 13,
852 ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR
= 14,
853 ACPI_MADT_TYPE_GENERIC_TRANSLATOR
= 15,
854 ACPI_MADT_TYPE_RESERVED
= 16 /* 16 and greater are reserved */
859 * MADT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
862 /* 0: Processor Local APIC */
864 typedef struct acpi_madt_local_apic
866 ACPI_SUBTABLE_HEADER Header
;
867 UINT8 ProcessorId
; /* ACPI processor id */
868 UINT8 Id
; /* Processor's local APIC id */
871 } ACPI_MADT_LOCAL_APIC
;
876 typedef struct acpi_madt_io_apic
878 ACPI_SUBTABLE_HEADER Header
;
879 UINT8 Id
; /* I/O APIC ID */
880 UINT8 Reserved
; /* Reserved - must be zero */
881 UINT32 Address
; /* APIC physical address */
882 UINT32 GlobalIrqBase
; /* Global system interrupt where INTI lines start */
887 /* 2: Interrupt Override */
889 typedef struct acpi_madt_interrupt_override
891 ACPI_SUBTABLE_HEADER Header
;
892 UINT8 Bus
; /* 0 - ISA */
893 UINT8 SourceIrq
; /* Interrupt source (IRQ) */
894 UINT32 GlobalIrq
; /* Global system interrupt */
897 } ACPI_MADT_INTERRUPT_OVERRIDE
;
902 typedef struct acpi_madt_nmi_source
904 ACPI_SUBTABLE_HEADER Header
;
906 UINT32 GlobalIrq
; /* Global system interrupt */
908 } ACPI_MADT_NMI_SOURCE
;
911 /* 4: Local APIC NMI */
913 typedef struct acpi_madt_local_apic_nmi
915 ACPI_SUBTABLE_HEADER Header
;
916 UINT8 ProcessorId
; /* ACPI processor id */
918 UINT8 Lint
; /* LINTn to which NMI is connected */
920 } ACPI_MADT_LOCAL_APIC_NMI
;
923 /* 5: Address Override */
925 typedef struct acpi_madt_local_apic_override
927 ACPI_SUBTABLE_HEADER Header
;
928 UINT16 Reserved
; /* Reserved, must be zero */
929 UINT64 Address
; /* APIC physical address */
931 } ACPI_MADT_LOCAL_APIC_OVERRIDE
;
936 typedef struct acpi_madt_io_sapic
938 ACPI_SUBTABLE_HEADER Header
;
939 UINT8 Id
; /* I/O SAPIC ID */
940 UINT8 Reserved
; /* Reserved, must be zero */
941 UINT32 GlobalIrqBase
; /* Global interrupt for SAPIC start */
942 UINT64 Address
; /* SAPIC physical address */
944 } ACPI_MADT_IO_SAPIC
;
949 typedef struct acpi_madt_local_sapic
951 ACPI_SUBTABLE_HEADER Header
;
952 UINT8 ProcessorId
; /* ACPI processor id */
953 UINT8 Id
; /* SAPIC ID */
954 UINT8 Eid
; /* SAPIC EID */
955 UINT8 Reserved
[3]; /* Reserved, must be zero */
957 UINT32 Uid
; /* Numeric UID - ACPI 3.0 */
958 char UidString
[1]; /* String UID - ACPI 3.0 */
960 } ACPI_MADT_LOCAL_SAPIC
;
963 /* 8: Platform Interrupt Source */
965 typedef struct acpi_madt_interrupt_source
967 ACPI_SUBTABLE_HEADER Header
;
969 UINT8 Type
; /* 1=PMI, 2=INIT, 3=corrected */
970 UINT8 Id
; /* Processor ID */
971 UINT8 Eid
; /* Processor EID */
972 UINT8 IoSapicVector
; /* Vector value for PMI interrupts */
973 UINT32 GlobalIrq
; /* Global system interrupt */
974 UINT32 Flags
; /* Interrupt Source Flags */
976 } ACPI_MADT_INTERRUPT_SOURCE
;
978 /* Masks for Flags field above */
980 #define ACPI_MADT_CPEI_OVERRIDE (1)
983 /* 9: Processor Local X2APIC (ACPI 4.0) */
985 typedef struct acpi_madt_local_x2apic
987 ACPI_SUBTABLE_HEADER Header
;
988 UINT16 Reserved
; /* Reserved - must be zero */
989 UINT32 LocalApicId
; /* Processor x2APIC ID */
991 UINT32 Uid
; /* ACPI processor UID */
993 } ACPI_MADT_LOCAL_X2APIC
;
996 /* 10: Local X2APIC NMI (ACPI 4.0) */
998 typedef struct acpi_madt_local_x2apic_nmi
1000 ACPI_SUBTABLE_HEADER Header
;
1002 UINT32 Uid
; /* ACPI processor UID */
1003 UINT8 Lint
; /* LINTn to which NMI is connected */
1004 UINT8 Reserved
[3]; /* Reserved - must be zero */
1006 } ACPI_MADT_LOCAL_X2APIC_NMI
;
1009 /* 11: Generic Interrupt (ACPI 5.0 + ACPI 6.0 changes) */
1011 typedef struct acpi_madt_generic_interrupt
1013 ACPI_SUBTABLE_HEADER Header
;
1014 UINT16 Reserved
; /* Reserved - must be zero */
1015 UINT32 CpuInterfaceNumber
;
1018 UINT32 ParkingVersion
;
1019 UINT32 PerformanceInterrupt
;
1020 UINT64 ParkedAddress
;
1022 UINT64 GicvBaseAddress
;
1023 UINT64 GichBaseAddress
;
1024 UINT32 VgicInterrupt
;
1025 UINT64 GicrBaseAddress
;
1027 UINT8 EfficiencyClass
;
1030 } ACPI_MADT_GENERIC_INTERRUPT
;
1032 /* Masks for Flags field above */
1034 /* ACPI_MADT_ENABLED (1) Processor is usable if set */
1035 #define ACPI_MADT_PERFORMANCE_IRQ_MODE (1<<1) /* 01: Performance Interrupt Mode */
1036 #define ACPI_MADT_VGIC_IRQ_MODE (1<<2) /* 02: VGIC Maintenance Interrupt mode */
1039 /* 12: Generic Distributor (ACPI 5.0 + ACPI 6.0 changes) */
1041 typedef struct acpi_madt_generic_distributor
1043 ACPI_SUBTABLE_HEADER Header
;
1044 UINT16 Reserved
; /* Reserved - must be zero */
1047 UINT32 GlobalIrqBase
;
1049 UINT8 Reserved2
[3]; /* Reserved - must be zero */
1051 } ACPI_MADT_GENERIC_DISTRIBUTOR
;
1053 /* Values for Version field above */
1055 enum AcpiMadtGicVersion
1057 ACPI_MADT_GIC_VERSION_NONE
= 0,
1058 ACPI_MADT_GIC_VERSION_V1
= 1,
1059 ACPI_MADT_GIC_VERSION_V2
= 2,
1060 ACPI_MADT_GIC_VERSION_V3
= 3,
1061 ACPI_MADT_GIC_VERSION_V4
= 4,
1062 ACPI_MADT_GIC_VERSION_RESERVED
= 5 /* 5 and greater are reserved */
1066 /* 13: Generic MSI Frame (ACPI 5.1) */
1068 typedef struct acpi_madt_generic_msi_frame
1070 ACPI_SUBTABLE_HEADER Header
;
1071 UINT16 Reserved
; /* Reserved - must be zero */
1078 } ACPI_MADT_GENERIC_MSI_FRAME
;
1080 /* Masks for Flags field above */
1082 #define ACPI_MADT_OVERRIDE_SPI_VALUES (1)
1085 /* 14: Generic Redistributor (ACPI 5.1) */
1087 typedef struct acpi_madt_generic_redistributor
1089 ACPI_SUBTABLE_HEADER Header
;
1090 UINT16 Reserved
; /* reserved - must be zero */
1094 } ACPI_MADT_GENERIC_REDISTRIBUTOR
;
1097 /* 15: Generic Translator (ACPI 6.0) */
1099 typedef struct acpi_madt_generic_translator
1101 ACPI_SUBTABLE_HEADER Header
;
1102 UINT16 Reserved
; /* reserved - must be zero */
1103 UINT32 TranslationId
;
1107 } ACPI_MADT_GENERIC_TRANSLATOR
;
1111 * Common flags fields for MADT subtables
1114 /* MADT Local APIC flags */
1116 #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */
1118 /* MADT MPS INTI flags (IntiFlags) */
1120 #define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */
1121 #define ACPI_MADT_TRIGGER_MASK (3<<2) /* 02-03: Trigger mode of APIC input signals */
1123 /* Values for MPS INTI flags */
1125 #define ACPI_MADT_POLARITY_CONFORMS 0
1126 #define ACPI_MADT_POLARITY_ACTIVE_HIGH 1
1127 #define ACPI_MADT_POLARITY_RESERVED 2
1128 #define ACPI_MADT_POLARITY_ACTIVE_LOW 3
1130 #define ACPI_MADT_TRIGGER_CONFORMS (0)
1131 #define ACPI_MADT_TRIGGER_EDGE (1<<2)
1132 #define ACPI_MADT_TRIGGER_RESERVED (2<<2)
1133 #define ACPI_MADT_TRIGGER_LEVEL (3<<2)
1136 /*******************************************************************************
1138 * MSCT - Maximum System Characteristics Table (ACPI 4.0)
1141 ******************************************************************************/
1143 typedef struct acpi_table_msct
1145 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
1146 UINT32 ProximityOffset
; /* Location of proximity info struct(s) */
1147 UINT32 MaxProximityDomains
;/* Max number of proximity domains */
1148 UINT32 MaxClockDomains
; /* Max number of clock domains */
1149 UINT64 MaxAddress
; /* Max physical address in system */
1154 /* Subtable - Maximum Proximity Domain Information. Version 1 */
1156 typedef struct acpi_msct_proximity
1160 UINT32 RangeStart
; /* Start of domain range */
1161 UINT32 RangeEnd
; /* End of domain range */
1162 UINT32 ProcessorCapacity
;
1163 UINT64 MemoryCapacity
; /* In bytes */
1165 } ACPI_MSCT_PROXIMITY
;
1168 /*******************************************************************************
1170 * NFIT - NVDIMM Interface Table (ACPI 6.0)
1173 ******************************************************************************/
1175 typedef struct acpi_table_nfit
1177 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
1178 UINT32 Reserved
; /* Reserved, must be zero */
1182 /* Subtable header for NFIT */
1184 typedef struct acpi_nfit_header
1192 /* Values for subtable type in ACPI_NFIT_HEADER */
1196 ACPI_NFIT_TYPE_SYSTEM_ADDRESS
= 0,
1197 ACPI_NFIT_TYPE_MEMORY_MAP
= 1,
1198 ACPI_NFIT_TYPE_INTERLEAVE
= 2,
1199 ACPI_NFIT_TYPE_SMBIOS
= 3,
1200 ACPI_NFIT_TYPE_CONTROL_REGION
= 4,
1201 ACPI_NFIT_TYPE_DATA_REGION
= 5,
1202 ACPI_NFIT_TYPE_FLUSH_ADDRESS
= 6,
1203 ACPI_NFIT_TYPE_RESERVED
= 7 /* 7 and greater are reserved */
1210 /* 0: System Physical Address Range Structure */
1212 typedef struct acpi_nfit_system_address
1214 ACPI_NFIT_HEADER Header
;
1217 UINT32 Reserved
; /* Reseved, must be zero */
1218 UINT32 ProximityDomain
;
1219 UINT8 RangeGuid
[16];
1222 UINT64 MemoryMapping
;
1224 } ACPI_NFIT_SYSTEM_ADDRESS
;
1228 #define ACPI_NFIT_ADD_ONLINE_ONLY (1) /* 00: Add/Online Operation Only */
1229 #define ACPI_NFIT_PROXIMITY_VALID (1<<1) /* 01: Proximity Domain Valid */
1231 /* Range Type GUIDs appear in the include/acuuid.h file */
1234 /* 1: Memory Device to System Address Range Map Structure */
1236 typedef struct acpi_nfit_memory_map
1238 ACPI_NFIT_HEADER Header
;
1239 UINT32 DeviceHandle
;
1245 UINT64 RegionOffset
;
1247 UINT16 InterleaveIndex
;
1248 UINT16 InterleaveWays
;
1250 UINT16 Reserved
; /* Reserved, must be zero */
1252 } ACPI_NFIT_MEMORY_MAP
;
1256 #define ACPI_NFIT_MEM_SAVE_FAILED (1) /* 00: Last SAVE to Memory Device failed */
1257 #define ACPI_NFIT_MEM_RESTORE_FAILED (1<<1) /* 01: Last RESTORE from Memory Device failed */
1258 #define ACPI_NFIT_MEM_FLUSH_FAILED (1<<2) /* 02: Platform flush failed */
1259 #define ACPI_NFIT_MEM_ARMED (1<<3) /* 03: Memory Device observed to be not armed */
1260 #define ACPI_NFIT_MEM_HEALTH_OBSERVED (1<<4) /* 04: Memory Device observed SMART/health events */
1261 #define ACPI_NFIT_MEM_HEALTH_ENABLED (1<<5) /* 05: SMART/health events enabled */
1264 /* 2: Interleave Structure */
1266 typedef struct acpi_nfit_interleave
1268 ACPI_NFIT_HEADER Header
;
1269 UINT16 InterleaveIndex
;
1270 UINT16 Reserved
; /* Reserved, must be zero */
1273 UINT32 LineOffset
[1]; /* Variable length */
1275 } ACPI_NFIT_INTERLEAVE
;
1278 /* 3: SMBIOS Management Information Structure */
1280 typedef struct acpi_nfit_smbios
1282 ACPI_NFIT_HEADER Header
;
1283 UINT32 Reserved
; /* Reserved, must be zero */
1284 UINT8 Data
[1]; /* Variable length */
1289 /* 4: NVDIMM Control Region Structure */
1291 typedef struct acpi_nfit_control_region
1293 ACPI_NFIT_HEADER Header
;
1298 UINT16 SubsystemVendorId
;
1299 UINT16 SubsystemDeviceId
;
1300 UINT16 SubsystemRevisionId
;
1301 UINT8 Reserved
[6]; /* Reserved, must be zero */
1302 UINT32 SerialNumber
;
1306 UINT64 CommandOffset
;
1308 UINT64 StatusOffset
;
1311 UINT8 Reserved1
[6]; /* Reserved, must be zero */
1313 } ACPI_NFIT_CONTROL_REGION
;
1317 #define ACPI_NFIT_CONTROL_BUFFERED (1) /* Block Data Windows implementation is buffered */
1320 /* 5: NVDIMM Block Data Window Region Structure */
1322 typedef struct acpi_nfit_data_region
1324 ACPI_NFIT_HEADER Header
;
1330 UINT64 StartAddress
;
1332 } ACPI_NFIT_DATA_REGION
;
1335 /* 6: Flush Hint Address Structure */
1337 typedef struct acpi_nfit_flush_address
1339 ACPI_NFIT_HEADER Header
;
1340 UINT32 DeviceHandle
;
1342 UINT8 Reserved
[6]; /* Reserved, must be zero */
1343 UINT64 HintAddress
[1]; /* Variable length */
1345 } ACPI_NFIT_FLUSH_ADDRESS
;
1348 /*******************************************************************************
1350 * SBST - Smart Battery Specification Table
1353 ******************************************************************************/
1355 typedef struct acpi_table_sbst
1357 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
1358 UINT32 WarningLevel
;
1360 UINT32 CriticalLevel
;
1365 /*******************************************************************************
1367 * SLIT - System Locality Distance Information Table
1370 ******************************************************************************/
1372 typedef struct acpi_table_slit
1374 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
1375 UINT64 LocalityCount
;
1376 UINT8 Entry
[1]; /* Real size = localities^2 */
1381 /*******************************************************************************
1383 * SRAT - System Resource Affinity Table
1386 ******************************************************************************/
1388 typedef struct acpi_table_srat
1390 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
1391 UINT32 TableRevision
; /* Must be value '1' */
1392 UINT64 Reserved
; /* Reserved, must be zero */
1396 /* Values for subtable type in ACPI_SUBTABLE_HEADER */
1400 ACPI_SRAT_TYPE_CPU_AFFINITY
= 0,
1401 ACPI_SRAT_TYPE_MEMORY_AFFINITY
= 1,
1402 ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY
= 2,
1403 ACPI_SRAT_TYPE_GICC_AFFINITY
= 3,
1404 ACPI_SRAT_TYPE_RESERVED
= 4 /* 4 and greater are reserved */
1408 * SRAT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
1411 /* 0: Processor Local APIC/SAPIC Affinity */
1413 typedef struct acpi_srat_cpu_affinity
1415 ACPI_SUBTABLE_HEADER Header
;
1416 UINT8 ProximityDomainLo
;
1419 UINT8 LocalSapicEid
;
1420 UINT8 ProximityDomainHi
[3];
1423 } ACPI_SRAT_CPU_AFFINITY
;
1427 #define ACPI_SRAT_CPU_USE_AFFINITY (1) /* 00: Use affinity structure */
1430 /* 1: Memory Affinity */
1432 typedef struct acpi_srat_mem_affinity
1434 ACPI_SUBTABLE_HEADER Header
;
1435 UINT32 ProximityDomain
;
1436 UINT16 Reserved
; /* Reserved, must be zero */
1441 UINT64 Reserved2
; /* Reserved, must be zero */
1443 } ACPI_SRAT_MEM_AFFINITY
;
1447 #define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */
1448 #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */
1449 #define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */
1452 /* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */
1454 typedef struct acpi_srat_x2apic_cpu_affinity
1456 ACPI_SUBTABLE_HEADER Header
;
1457 UINT16 Reserved
; /* Reserved, must be zero */
1458 UINT32 ProximityDomain
;
1464 } ACPI_SRAT_X2APIC_CPU_AFFINITY
;
1466 /* Flags for ACPI_SRAT_CPU_AFFINITY and ACPI_SRAT_X2APIC_CPU_AFFINITY */
1468 #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
1471 /* 3: GICC Affinity (ACPI 5.1) */
1473 typedef struct acpi_srat_gicc_affinity
1475 ACPI_SUBTABLE_HEADER Header
;
1476 UINT32 ProximityDomain
;
1477 UINT32 AcpiProcessorUid
;
1481 } ACPI_SRAT_GICC_AFFINITY
;
1483 /* Flags for ACPI_SRAT_GICC_AFFINITY */
1485 #define ACPI_SRAT_GICC_ENABLED (1) /* 00: Use affinity structure */
1488 /* Reset to default packing */
1492 #endif /* __ACTBL1_H__ */