1 /******************************************************************************
3 * Name: actbl1.h - Additional ACPI table definitions
5 *****************************************************************************/
7 /******************************************************************************
11 * Some or all of this work - Copyright (c) 1999 - 2010, 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 */
151 * All tables must be byte-packed to match the ACPI specification, since
152 * the tables are provided by the system BIOS.
157 * Note about bitfields: The UINT8 type is used for bitfields in ACPI tables.
158 * This is the only type that is even remotely portable. Anything else is not
159 * portable, so do not use any other bitfield types.
163 /*******************************************************************************
165 * Common subtable headers
167 ******************************************************************************/
169 /* Generic subtable header (used in MADT, SRAT, etc.) */
171 typedef struct acpi_subtable_header
176 } ACPI_SUBTABLE_HEADER
;
179 /* Subtable header for WHEA tables (EINJ, ERST, WDAT) */
181 typedef struct acpi_whea_header
187 ACPI_GENERIC_ADDRESS RegisterRegion
;
188 UINT64 Value
; /* Value used with Read/Write register */
189 UINT64 Mask
; /* Bitmask required for this register instruction */
194 /*******************************************************************************
196 * BERT - Boot Error Record Table (ACPI 4.0)
199 ******************************************************************************/
201 typedef struct acpi_table_bert
203 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
204 UINT32 RegionLength
; /* Length of the boot error region */
205 UINT64 Address
; /* Physical addresss of the error region */
210 /* Boot Error Region (not a subtable, pointed to by Address field above) */
212 typedef struct acpi_bert_region
214 UINT32 BlockStatus
; /* Type of error information */
215 UINT32 RawDataOffset
; /* Offset to raw error data */
216 UINT32 RawDataLength
; /* Length of raw error data */
217 UINT32 DataLength
; /* Length of generic error data */
218 UINT32 ErrorSeverity
; /* Severity code */
222 /* Values for BlockStatus flags above */
224 #define ACPI_BERT_UNCORRECTABLE (1)
225 #define ACPI_BERT_CORRECTABLE (1<<1)
226 #define ACPI_BERT_MULTIPLE_UNCORRECTABLE (1<<2)
227 #define ACPI_BERT_MULTIPLE_CORRECTABLE (1<<3)
228 #define ACPI_BERT_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
230 /* Values for ErrorSeverity above */
232 enum AcpiBertErrorSeverity
234 ACPI_BERT_ERROR_CORRECTABLE
= 0,
235 ACPI_BERT_ERROR_FATAL
= 1,
236 ACPI_BERT_ERROR_CORRECTED
= 2,
237 ACPI_BERT_ERROR_NONE
= 3,
238 ACPI_BERT_ERROR_RESERVED
= 4 /* 4 and greater are reserved */
242 * Note: The generic error data that follows the ErrorSeverity field above
243 * uses the ACPI_HEST_GENERIC_DATA defined under the HEST table below
247 /*******************************************************************************
249 * CPEP - Corrected Platform Error Polling table (ACPI 4.0)
252 ******************************************************************************/
254 typedef struct acpi_table_cpep
256 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
264 typedef struct acpi_cpep_polling
266 ACPI_SUBTABLE_HEADER Header
;
267 UINT8 Id
; /* Processor ID */
268 UINT8 Eid
; /* Processor EID */
269 UINT32 Interval
; /* Polling interval (msec) */
274 /*******************************************************************************
276 * ECDT - Embedded Controller Boot Resources Table
279 ******************************************************************************/
281 typedef struct acpi_table_ecdt
283 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
284 ACPI_GENERIC_ADDRESS Control
; /* Address of EC command/status register */
285 ACPI_GENERIC_ADDRESS Data
; /* Address of EC data register */
286 UINT32 Uid
; /* Unique ID - must be same as the EC _UID method */
287 UINT8 Gpe
; /* The GPE for the EC */
288 UINT8 Id
[1]; /* Full namepath of the EC in the ACPI namespace */
293 /*******************************************************************************
295 * EINJ - Error Injection Table (ACPI 4.0)
298 ******************************************************************************/
300 typedef struct acpi_table_einj
302 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
311 /* EINJ Injection Instruction Entries (actions) */
313 typedef struct acpi_einj_entry
315 ACPI_WHEA_HEADER WheaHeader
; /* Common header for WHEA tables */
319 /* Masks for Flags field above */
321 #define ACPI_EINJ_PRESERVE (1)
323 /* Values for Action field above */
327 ACPI_EINJ_BEGIN_OPERATION
= 0,
328 ACPI_EINJ_GET_TRIGGER_TABLE
= 1,
329 ACPI_EINJ_SET_ERROR_TYPE
= 2,
330 ACPI_EINJ_GET_ERROR_TYPE
= 3,
331 ACPI_EINJ_END_OPERATION
= 4,
332 ACPI_EINJ_EXECUTE_OPERATION
= 5,
333 ACPI_EINJ_CHECK_BUSY_STATUS
= 6,
334 ACPI_EINJ_GET_COMMAND_STATUS
= 7,
335 ACPI_EINJ_ACTION_RESERVED
= 8, /* 8 and greater are reserved */
336 ACPI_EINJ_TRIGGER_ERROR
= 0xFF /* Except for this value */
339 /* Values for Instruction field above */
341 enum AcpiEinjInstructions
343 ACPI_EINJ_READ_REGISTER
= 0,
344 ACPI_EINJ_READ_REGISTER_VALUE
= 1,
345 ACPI_EINJ_WRITE_REGISTER
= 2,
346 ACPI_EINJ_WRITE_REGISTER_VALUE
= 3,
348 ACPI_EINJ_INSTRUCTION_RESERVED
= 5 /* 5 and greater are reserved */
352 /* EINJ Trigger Error Action Table */
354 typedef struct acpi_einj_trigger
363 /* Command status return values */
365 enum AcpiEinjCommandStatus
367 ACPI_EINJ_SUCCESS
= 0,
368 ACPI_EINJ_FAILURE
= 1,
369 ACPI_EINJ_INVALID_ACCESS
= 2,
370 ACPI_EINJ_STATUS_RESERVED
= 3 /* 3 and greater are reserved */
374 /* Error types returned from ACPI_EINJ_GET_ERROR_TYPE (bitfield) */
376 #define ACPI_EINJ_PROCESSOR_CORRECTABLE (1)
377 #define ACPI_EINJ_PROCESSOR_UNCORRECTABLE (1<<1)
378 #define ACPI_EINJ_PROCESSOR_FATAL (1<<2)
379 #define ACPI_EINJ_MEMORY_CORRECTABLE (1<<3)
380 #define ACPI_EINJ_MEMORY_UNCORRECTABLE (1<<4)
381 #define ACPI_EINJ_MEMORY_FATAL (1<<5)
382 #define ACPI_EINJ_PCIX_CORRECTABLE (1<<6)
383 #define ACPI_EINJ_PCIX_UNCORRECTABLE (1<<7)
384 #define ACPI_EINJ_PCIX_FATAL (1<<8)
385 #define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9)
386 #define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10)
387 #define ACPI_EINJ_PLATFORM_FATAL (1<<11)
390 /*******************************************************************************
392 * ERST - Error Record Serialization Table (ACPI 4.0)
395 ******************************************************************************/
397 typedef struct acpi_table_erst
399 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
407 /* ERST Serialization Entries (actions) */
409 typedef struct acpi_erst_entry
411 ACPI_WHEA_HEADER WheaHeader
; /* Common header for WHEA tables */
415 /* Masks for Flags field above */
417 #define ACPI_ERST_PRESERVE (1)
419 /* Values for Action field above */
423 ACPI_ERST_BEGIN_WRITE
= 0,
424 ACPI_ERST_BEGIN_READ
= 1,
425 ACPI_ERST_BEGIN_CLEAR
= 2,
427 ACPI_ERST_SET_RECORD_OFFSET
= 4,
428 ACPI_ERST_EXECUTE_OPERATION
= 5,
429 ACPI_ERST_CHECK_BUSY_STATUS
= 6,
430 ACPI_ERST_GET_COMMAND_STATUS
= 7,
431 ACPI_ERST_GET_RECORD_ID
= 8,
432 ACPI_ERST_SET_RECORD_ID
= 9,
433 ACPI_ERST_GET_RECORD_COUNT
= 10,
434 ACPI_ERST_BEGIN_DUMMY_WRIITE
= 11,
435 ACPI_ERST_NOT_USED
= 12,
436 ACPI_ERST_GET_ERROR_RANGE
= 13,
437 ACPI_ERST_GET_ERROR_LENGTH
= 14,
438 ACPI_ERST_GET_ERROR_ATTRIBUTES
= 15,
439 ACPI_ERST_ACTION_RESERVED
= 16 /* 16 and greater are reserved */
442 /* Values for Instruction field above */
444 enum AcpiErstInstructions
446 ACPI_ERST_READ_REGISTER
= 0,
447 ACPI_ERST_READ_REGISTER_VALUE
= 1,
448 ACPI_ERST_WRITE_REGISTER
= 2,
449 ACPI_ERST_WRITE_REGISTER_VALUE
= 3,
451 ACPI_ERST_LOAD_VAR1
= 5,
452 ACPI_ERST_LOAD_VAR2
= 6,
453 ACPI_ERST_STORE_VAR1
= 7,
455 ACPI_ERST_SUBTRACT
= 9,
456 ACPI_ERST_ADD_VALUE
= 10,
457 ACPI_ERST_SUBTRACT_VALUE
= 11,
458 ACPI_ERST_STALL
= 12,
459 ACPI_ERST_STALL_WHILE_TRUE
= 13,
460 ACPI_ERST_SKIP_NEXT_IF_TRUE
= 14,
462 ACPI_ERST_SET_SRC_ADDRESS_BASE
= 16,
463 ACPI_ERST_SET_DST_ADDRESS_BASE
= 17,
464 ACPI_ERST_MOVE_DATA
= 18,
465 ACPI_ERST_INSTRUCTION_RESERVED
= 19 /* 19 and greater are reserved */
468 /* Command status return values */
470 enum AcpiErstCommandStatus
472 ACPI_ERST_SUCESS
= 0,
473 ACPI_ERST_NO_SPACE
= 1,
474 ACPI_ERST_NOT_AVAILABLE
= 2,
475 ACPI_ERST_FAILURE
= 3,
476 ACPI_ERST_RECORD_EMPTY
= 4,
477 ACPI_ERST_NOT_FOUND
= 5,
478 ACPI_ERST_STATUS_RESERVED
= 6 /* 6 and greater are reserved */
482 /* Error Record Serialization Information */
484 typedef struct acpi_erst_info
486 UINT16 Signature
; /* Should be "ER" */
492 /*******************************************************************************
494 * HEST - Hardware Error Source Table (ACPI 4.0)
497 ******************************************************************************/
499 typedef struct acpi_table_hest
501 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
502 UINT32 ErrorSourceCount
;
507 /* HEST subtable header */
509 typedef struct acpi_hest_header
517 /* Values for Type field above for subtables */
521 ACPI_HEST_TYPE_IA32_CHECK
= 0,
522 ACPI_HEST_TYPE_IA32_CORRECTED_CHECK
= 1,
523 ACPI_HEST_TYPE_IA32_NMI
= 2,
524 ACPI_HEST_TYPE_NOT_USED3
= 3,
525 ACPI_HEST_TYPE_NOT_USED4
= 4,
526 ACPI_HEST_TYPE_NOT_USED5
= 5,
527 ACPI_HEST_TYPE_AER_ROOT_PORT
= 6,
528 ACPI_HEST_TYPE_AER_ENDPOINT
= 7,
529 ACPI_HEST_TYPE_AER_BRIDGE
= 8,
530 ACPI_HEST_TYPE_GENERIC_ERROR
= 9,
531 ACPI_HEST_TYPE_RESERVED
= 10 /* 10 and greater are reserved */
536 * HEST substructures contained in subtables
540 * IA32 Error Bank(s) - Follows the ACPI_HEST_IA_MACHINE_CHECK and
541 * ACPI_HEST_IA_CORRECTED structures.
543 typedef struct acpi_hest_ia_error_bank
546 UINT8 ClearStatusOnInit
;
549 UINT32 ControlRegister
;
551 UINT32 StatusRegister
;
552 UINT32 AddressRegister
;
555 } ACPI_HEST_IA_ERROR_BANK
;
558 /* Common HEST sub-structure for PCI/AER structures below (6,7,8) */
560 typedef struct acpi_hest_aer_common
565 UINT32 RecordsToPreallocate
;
566 UINT32 MaxSectionsPerRecord
;
570 UINT16 DeviceControl
;
572 UINT32 UncorrectableMask
;
573 UINT32 UncorrectableSeverity
;
574 UINT32 CorrectableMask
;
575 UINT32 AdvancedCapabilities
;
577 } ACPI_HEST_AER_COMMON
;
579 /* Masks for HEST Flags fields */
581 #define ACPI_HEST_FIRMWARE_FIRST (1)
582 #define ACPI_HEST_GLOBAL (1<<1)
585 /* Hardware Error Notification */
587 typedef struct acpi_hest_notify
591 UINT16 ConfigWriteEnable
;
594 UINT32 PollingThresholdValue
;
595 UINT32 PollingThresholdWindow
;
596 UINT32 ErrorThresholdValue
;
597 UINT32 ErrorThresholdWindow
;
601 /* Values for Notify Type field above */
603 enum AcpiHestNotifyTypes
605 ACPI_HEST_NOTIFY_POLLED
= 0,
606 ACPI_HEST_NOTIFY_EXTERNAL
= 1,
607 ACPI_HEST_NOTIFY_LOCAL
= 2,
608 ACPI_HEST_NOTIFY_SCI
= 3,
609 ACPI_HEST_NOTIFY_NMI
= 4,
610 ACPI_HEST_NOTIFY_RESERVED
= 5 /* 5 and greater are reserved */
613 /* Values for ConfigWriteEnable bitfield above */
615 #define ACPI_HEST_TYPE (1)
616 #define ACPI_HEST_POLL_INTERVAL (1<<1)
617 #define ACPI_HEST_POLL_THRESHOLD_VALUE (1<<2)
618 #define ACPI_HEST_POLL_THRESHOLD_WINDOW (1<<3)
619 #define ACPI_HEST_ERR_THRESHOLD_VALUE (1<<4)
620 #define ACPI_HEST_ERR_THRESHOLD_WINDOW (1<<5)
627 /* 0: IA32 Machine Check Exception */
629 typedef struct acpi_hest_ia_machine_check
631 ACPI_HEST_HEADER Header
;
635 UINT32 RecordsToPreallocate
;
636 UINT32 MaxSectionsPerRecord
;
637 UINT64 GlobalCapabilityData
;
638 UINT64 GlobalControlData
;
639 UINT8 NumHardwareBanks
;
642 } ACPI_HEST_IA_MACHINE_CHECK
;
645 /* 1: IA32 Corrected Machine Check */
647 typedef struct acpi_hest_ia_corrected
649 ACPI_HEST_HEADER Header
;
653 UINT32 RecordsToPreallocate
;
654 UINT32 MaxSectionsPerRecord
;
655 ACPI_HEST_NOTIFY Notify
;
656 UINT8 NumHardwareBanks
;
659 } ACPI_HEST_IA_CORRECTED
;
662 /* 2: IA32 Non-Maskable Interrupt */
664 typedef struct acpi_hest_ia_nmi
666 ACPI_HEST_HEADER Header
;
668 UINT32 RecordsToPreallocate
;
669 UINT32 MaxSectionsPerRecord
;
670 UINT32 MaxRawDataLength
;
675 /* 3,4,5: Not used */
677 /* 6: PCI Express Root Port AER */
679 typedef struct acpi_hest_aer_root
681 ACPI_HEST_HEADER Header
;
682 ACPI_HEST_AER_COMMON Aer
;
683 UINT32 RootErrorCommand
;
685 } ACPI_HEST_AER_ROOT
;
688 /* 7: PCI Express AER (AER Endpoint) */
690 typedef struct acpi_hest_aer
692 ACPI_HEST_HEADER Header
;
693 ACPI_HEST_AER_COMMON Aer
;
698 /* 8: PCI Express/PCI-X Bridge AER */
700 typedef struct acpi_hest_aer_bridge
702 ACPI_HEST_HEADER Header
;
703 ACPI_HEST_AER_COMMON Aer
;
704 UINT32 UncorrectableMask2
;
705 UINT32 UncorrectableSeverity2
;
706 UINT32 AdvancedCapabilities2
;
708 } ACPI_HEST_AER_BRIDGE
;
711 /* 9: Generic Hardware Error Source */
713 typedef struct acpi_hest_generic
715 ACPI_HEST_HEADER Header
;
716 UINT16 RelatedSourceId
;
719 UINT32 RecordsToPreallocate
;
720 UINT32 MaxSectionsPerRecord
;
721 UINT32 MaxRawDataLength
;
722 ACPI_GENERIC_ADDRESS ErrorStatusAddress
;
723 ACPI_HEST_NOTIFY Notify
;
724 UINT32 ErrorBlockLength
;
729 /* Generic Error Status block */
731 typedef struct acpi_hest_generic_status
734 UINT32 RawDataOffset
;
735 UINT32 RawDataLength
;
737 UINT32 ErrorSeverity
;
739 } ACPI_HEST_GENERIC_STATUS
;
741 /* Values for BlockStatus flags above */
743 #define ACPI_HEST_UNCORRECTABLE (1)
744 #define ACPI_HEST_CORRECTABLE (1<<1)
745 #define ACPI_HEST_MULTIPLE_UNCORRECTABLE (1<<2)
746 #define ACPI_HEST_MULTIPLE_CORRECTABLE (1<<3)
747 #define ACPI_HEST_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
750 /* Generic Error Data entry */
752 typedef struct acpi_hest_generic_data
754 UINT8 SectionType
[16];
755 UINT32 ErrorSeverity
;
757 UINT8 ValidationBits
;
759 UINT32 ErrorDataLength
;
763 } ACPI_HEST_GENERIC_DATA
;
766 /*******************************************************************************
768 * MADT - Multiple APIC Description Table
771 ******************************************************************************/
773 typedef struct acpi_table_madt
775 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
776 UINT32 Address
; /* Physical address of local APIC */
781 /* Masks for Flags field above */
783 #define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */
785 /* Values for PCATCompat flag */
787 #define ACPI_MADT_DUAL_PIC 0
788 #define ACPI_MADT_MULTIPLE_APIC 1
791 /* Values for MADT subtable type in ACPI_SUBTABLE_HEADER */
795 ACPI_MADT_TYPE_LOCAL_APIC
= 0,
796 ACPI_MADT_TYPE_IO_APIC
= 1,
797 ACPI_MADT_TYPE_INTERRUPT_OVERRIDE
= 2,
798 ACPI_MADT_TYPE_NMI_SOURCE
= 3,
799 ACPI_MADT_TYPE_LOCAL_APIC_NMI
= 4,
800 ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE
= 5,
801 ACPI_MADT_TYPE_IO_SAPIC
= 6,
802 ACPI_MADT_TYPE_LOCAL_SAPIC
= 7,
803 ACPI_MADT_TYPE_INTERRUPT_SOURCE
= 8,
804 ACPI_MADT_TYPE_LOCAL_X2APIC
= 9,
805 ACPI_MADT_TYPE_LOCAL_X2APIC_NMI
= 10,
806 ACPI_MADT_TYPE_RESERVED
= 11 /* 11 and greater are reserved */
811 * MADT Sub-tables, correspond to Type in ACPI_SUBTABLE_HEADER
814 /* 0: Processor Local APIC */
816 typedef struct acpi_madt_local_apic
818 ACPI_SUBTABLE_HEADER Header
;
819 UINT8 ProcessorId
; /* ACPI processor id */
820 UINT8 Id
; /* Processor's local APIC id */
823 } ACPI_MADT_LOCAL_APIC
;
828 typedef struct acpi_madt_io_apic
830 ACPI_SUBTABLE_HEADER Header
;
831 UINT8 Id
; /* I/O APIC ID */
832 UINT8 Reserved
; /* Reserved - must be zero */
833 UINT32 Address
; /* APIC physical address */
834 UINT32 GlobalIrqBase
; /* Global system interrupt where INTI lines start */
839 /* 2: Interrupt Override */
841 typedef struct acpi_madt_interrupt_override
843 ACPI_SUBTABLE_HEADER Header
;
844 UINT8 Bus
; /* 0 - ISA */
845 UINT8 SourceIrq
; /* Interrupt source (IRQ) */
846 UINT32 GlobalIrq
; /* Global system interrupt */
849 } ACPI_MADT_INTERRUPT_OVERRIDE
;
854 typedef struct acpi_madt_nmi_source
856 ACPI_SUBTABLE_HEADER Header
;
858 UINT32 GlobalIrq
; /* Global system interrupt */
860 } ACPI_MADT_NMI_SOURCE
;
863 /* 4: Local APIC NMI */
865 typedef struct acpi_madt_local_apic_nmi
867 ACPI_SUBTABLE_HEADER Header
;
868 UINT8 ProcessorId
; /* ACPI processor id */
870 UINT8 Lint
; /* LINTn to which NMI is connected */
872 } ACPI_MADT_LOCAL_APIC_NMI
;
875 /* 5: Address Override */
877 typedef struct acpi_madt_local_apic_override
879 ACPI_SUBTABLE_HEADER Header
;
880 UINT16 Reserved
; /* Reserved, must be zero */
881 UINT64 Address
; /* APIC physical address */
883 } ACPI_MADT_LOCAL_APIC_OVERRIDE
;
888 typedef struct acpi_madt_io_sapic
890 ACPI_SUBTABLE_HEADER Header
;
891 UINT8 Id
; /* I/O SAPIC ID */
892 UINT8 Reserved
; /* Reserved, must be zero */
893 UINT32 GlobalIrqBase
; /* Global interrupt for SAPIC start */
894 UINT64 Address
; /* SAPIC physical address */
896 } ACPI_MADT_IO_SAPIC
;
901 typedef struct acpi_madt_local_sapic
903 ACPI_SUBTABLE_HEADER Header
;
904 UINT8 ProcessorId
; /* ACPI processor id */
905 UINT8 Id
; /* SAPIC ID */
906 UINT8 Eid
; /* SAPIC EID */
907 UINT8 Reserved
[3]; /* Reserved, must be zero */
909 UINT32 Uid
; /* Numeric UID - ACPI 3.0 */
910 char UidString
[1]; /* String UID - ACPI 3.0 */
912 } ACPI_MADT_LOCAL_SAPIC
;
915 /* 8: Platform Interrupt Source */
917 typedef struct acpi_madt_interrupt_source
919 ACPI_SUBTABLE_HEADER Header
;
921 UINT8 Type
; /* 1=PMI, 2=INIT, 3=corrected */
922 UINT8 Id
; /* Processor ID */
923 UINT8 Eid
; /* Processor EID */
924 UINT8 IoSapicVector
; /* Vector value for PMI interrupts */
925 UINT32 GlobalIrq
; /* Global system interrupt */
926 UINT32 Flags
; /* Interrupt Source Flags */
928 } ACPI_MADT_INTERRUPT_SOURCE
;
930 /* Masks for Flags field above */
932 #define ACPI_MADT_CPEI_OVERRIDE (1)
935 /* 9: Processor Local X2APIC (ACPI 4.0) */
937 typedef struct acpi_madt_local_x2apic
939 ACPI_SUBTABLE_HEADER Header
;
940 UINT16 Reserved
; /* Reserved - must be zero */
941 UINT32 LocalApicId
; /* Processor x2APIC ID */
943 UINT32 Uid
; /* ACPI processor UID */
945 } ACPI_MADT_LOCAL_X2APIC
;
948 /* 10: Local X2APIC NMI (ACPI 4.0) */
950 typedef struct acpi_madt_local_x2apic_nmi
952 ACPI_SUBTABLE_HEADER Header
;
954 UINT32 Uid
; /* ACPI processor UID */
955 UINT8 Lint
; /* LINTn to which NMI is connected */
956 UINT8 Reserved
[3]; /* Reserved - must be zero */
958 } ACPI_MADT_LOCAL_X2APIC_NMI
;
962 * Common flags fields for MADT subtables
965 /* MADT Local APIC flags (LapicFlags) */
967 #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */
969 /* MADT MPS INTI flags (IntiFlags) */
971 #define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */
972 #define ACPI_MADT_TRIGGER_MASK (3<<2) /* 02-03: Trigger mode of APIC input signals */
974 /* Values for MPS INTI flags */
976 #define ACPI_MADT_POLARITY_CONFORMS 0
977 #define ACPI_MADT_POLARITY_ACTIVE_HIGH 1
978 #define ACPI_MADT_POLARITY_RESERVED 2
979 #define ACPI_MADT_POLARITY_ACTIVE_LOW 3
981 #define ACPI_MADT_TRIGGER_CONFORMS (0)
982 #define ACPI_MADT_TRIGGER_EDGE (1<<2)
983 #define ACPI_MADT_TRIGGER_RESERVED (2<<2)
984 #define ACPI_MADT_TRIGGER_LEVEL (3<<2)
987 /*******************************************************************************
989 * MSCT - Maximum System Characteristics Table (ACPI 4.0)
992 ******************************************************************************/
994 typedef struct acpi_table_msct
996 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
997 UINT32 ProximityOffset
; /* Location of proximity info struct(s) */
998 UINT32 MaxProximityDomains
;/* Max number of proximity domains */
999 UINT32 MaxClockDomains
; /* Max number of clock domains */
1000 UINT64 MaxAddress
; /* Max physical address in system */
1005 /* Subtable - Maximum Proximity Domain Information. Version 1 */
1007 typedef struct acpi_msct_proximity
1011 UINT32 RangeStart
; /* Start of domain range */
1012 UINT32 RangeEnd
; /* End of domain range */
1013 UINT32 ProcessorCapacity
;
1014 UINT64 MemoryCapacity
; /* In bytes */
1016 } ACPI_MSCT_PROXIMITY
;
1019 /*******************************************************************************
1021 * SBST - Smart Battery Specification Table
1024 ******************************************************************************/
1026 typedef struct acpi_table_sbst
1028 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
1029 UINT32 WarningLevel
;
1031 UINT32 CriticalLevel
;
1036 /*******************************************************************************
1038 * SLIT - System Locality Distance Information Table
1041 ******************************************************************************/
1043 typedef struct acpi_table_slit
1045 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
1046 UINT64 LocalityCount
;
1047 UINT8 Entry
[1]; /* Real size = localities^2 */
1052 /*******************************************************************************
1054 * SRAT - System Resource Affinity Table
1057 ******************************************************************************/
1059 typedef struct acpi_table_srat
1061 ACPI_TABLE_HEADER Header
; /* Common ACPI table header */
1062 UINT32 TableRevision
; /* Must be value '1' */
1063 UINT64 Reserved
; /* Reserved, must be zero */
1067 /* Values for subtable type in ACPI_SUBTABLE_HEADER */
1071 ACPI_SRAT_TYPE_CPU_AFFINITY
= 0,
1072 ACPI_SRAT_TYPE_MEMORY_AFFINITY
= 1,
1073 ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY
= 2,
1074 ACPI_SRAT_TYPE_RESERVED
= 3 /* 3 and greater are reserved */
1078 * SRAT Sub-tables, correspond to Type in ACPI_SUBTABLE_HEADER
1081 /* 0: Processor Local APIC/SAPIC Affinity */
1083 typedef struct acpi_srat_cpu_affinity
1085 ACPI_SUBTABLE_HEADER Header
;
1086 UINT8 ProximityDomainLo
;
1089 UINT8 LocalSapicEid
;
1090 UINT8 ProximityDomainHi
[3];
1091 UINT32 Reserved
; /* Reserved, must be zero */
1093 } ACPI_SRAT_CPU_AFFINITY
;
1097 #define ACPI_SRAT_CPU_USE_AFFINITY (1) /* 00: Use affinity structure */
1100 /* 1: Memory Affinity */
1102 typedef struct acpi_srat_mem_affinity
1104 ACPI_SUBTABLE_HEADER Header
;
1105 UINT32 ProximityDomain
;
1106 UINT16 Reserved
; /* Reserved, must be zero */
1111 UINT64 Reserved2
; /* Reserved, must be zero */
1113 } ACPI_SRAT_MEM_AFFINITY
;
1117 #define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */
1118 #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */
1119 #define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */
1122 /* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */
1124 typedef struct acpi_srat_x2apic_cpu_affinity
1126 ACPI_SUBTABLE_HEADER Header
;
1127 UINT16 Reserved
; /* Reserved, must be zero */
1128 UINT32 ProximityDomain
;
1134 } ACPI_SRAT_X2APIC_CPU_AFFINITY
;
1136 /* Flags for ACPI_SRAT_CPU_AFFINITY and ACPI_SRAT_X2APIC_CPU_AFFINITY */
1138 #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
1141 /* Reset to default packing */
1145 #endif /* __ACTBL1_H__ */