1 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
2 /******************************************************************************
4 * Name: actbl1.h - Additional ACPI table definitions
6 * Copyright (C) 2000 - 2021, Intel Corp.
8 *****************************************************************************/
13 /*******************************************************************************
15 * Additional ACPI Tables
17 * These tables are not consumed directly by the ACPICA subsystem, but are
18 * included here to support device drivers and the AML disassembler.
20 ******************************************************************************/
23 * Values for description table header signatures for tables defined in this
24 * file. Useful because they make it more difficult to inadvertently type in
25 * the wrong signature.
27 #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */
28 #define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */
29 #define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */
30 #define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */
31 #define ACPI_SIG_CEDT "CEDT" /* CXL Early Discovery Table */
32 #define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */
33 #define ACPI_SIG_CSRT "CSRT" /* Core System Resource Table */
34 #define ACPI_SIG_DBG2 "DBG2" /* Debug Port table type 2 */
35 #define ACPI_SIG_DBGP "DBGP" /* Debug Port table */
36 #define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */
37 #define ACPI_SIG_DRTM "DRTM" /* Dynamic Root of Trust for Measurement table */
38 #define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */
39 #define ACPI_SIG_EINJ "EINJ" /* Error Injection table */
40 #define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */
41 #define ACPI_SIG_FPDT "FPDT" /* Firmware Performance Data Table */
42 #define ACPI_SIG_GTDT "GTDT" /* Generic Timer Description Table */
43 #define ACPI_SIG_HEST "HEST" /* Hardware Error Source Table */
44 #define ACPI_SIG_HMAT "HMAT" /* Heterogeneous Memory Attributes Table */
45 #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */
46 #define ACPI_SIG_IBFT "IBFT" /* iSCSI Boot Firmware Table */
48 #define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */
49 #define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */
51 /* Reserved table signatures */
53 #define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */
54 #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
57 * These tables have been seen in the field, but no definition has been found
59 #ifdef ACPI_UNDEFINED_TABLES
60 #define ACPI_SIG_ATKG "ATKG"
61 #define ACPI_SIG_GSCI "GSCI" /* GMCH SCI table */
62 #define ACPI_SIG_IEIT "IEIT"
66 * All tables must be byte-packed to match the ACPI specification, since
67 * the tables are provided by the system BIOS.
72 * Note: C bitfields are not used for this reason:
74 * "Bitfields are great and easy to read, but unfortunately the C language
75 * does not specify the layout of bitfields in memory, which means they are
76 * essentially useless for dealing with packed data in on-disk formats or
77 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
78 * this decision was a design error in C. Ritchie could have picked an order
79 * and stuck with it." Norman Ramsey.
80 * See http://stackoverflow.com/a/1053662/41661
83 /*******************************************************************************
85 * Common subtable headers
87 ******************************************************************************/
89 /* Generic subtable header (used in MADT, SRAT, etc.) */
91 struct acpi_subtable_header {
96 /* Subtable header for WHEA tables (EINJ, ERST, WDAT) */
98 struct acpi_whea_header {
103 struct acpi_generic_address register_region;
104 u64 value; /* Value used with Read/Write register */
105 u64 mask; /* Bitmask required for this register instruction */
108 /*******************************************************************************
110 * ASF - Alert Standard Format table (Signature "ASF!")
113 * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
115 ******************************************************************************/
117 struct acpi_table_asf {
118 struct acpi_table_header header; /* Common ACPI table header */
121 /* ASF subtable header */
123 struct acpi_asf_header {
129 /* Values for Type field above */
132 ACPI_ASF_TYPE_INFO = 0,
133 ACPI_ASF_TYPE_ALERT = 1,
134 ACPI_ASF_TYPE_CONTROL = 2,
135 ACPI_ASF_TYPE_BOOT = 3,
136 ACPI_ASF_TYPE_ADDRESS = 4,
137 ACPI_ASF_TYPE_RESERVED = 5
144 /* 0: ASF Information */
146 struct acpi_asf_info {
147 struct acpi_asf_header header;
149 u8 min_poll_interval;
156 /* Masks for Flags field above */
158 #define ACPI_ASF_SMBUS_PROTOCOLS (1)
162 struct acpi_asf_alert {
163 struct acpi_asf_header header;
170 struct acpi_asf_alert_data {
185 /* 2: ASF Remote Control */
187 struct acpi_asf_remote {
188 struct acpi_asf_header header;
194 struct acpi_asf_control_data {
201 /* 3: ASF RMCP Boot Options */
203 struct acpi_asf_rmcp {
204 struct acpi_asf_header header;
216 struct acpi_asf_address {
217 struct acpi_asf_header header;
222 /*******************************************************************************
224 * BERT - Boot Error Record Table (ACPI 4.0)
227 ******************************************************************************/
229 struct acpi_table_bert {
230 struct acpi_table_header header; /* Common ACPI table header */
231 u32 region_length; /* Length of the boot error region */
232 u64 address; /* Physical address of the error region */
235 /* Boot Error Region (not a subtable, pointed to by Address field above) */
237 struct acpi_bert_region {
238 u32 block_status; /* Type of error information */
239 u32 raw_data_offset; /* Offset to raw error data */
240 u32 raw_data_length; /* Length of raw error data */
241 u32 data_length; /* Length of generic error data */
242 u32 error_severity; /* Severity code */
245 /* Values for block_status flags above */
247 #define ACPI_BERT_UNCORRECTABLE (1)
248 #define ACPI_BERT_CORRECTABLE (1<<1)
249 #define ACPI_BERT_MULTIPLE_UNCORRECTABLE (1<<2)
250 #define ACPI_BERT_MULTIPLE_CORRECTABLE (1<<3)
251 #define ACPI_BERT_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
253 /* Values for error_severity above */
255 enum acpi_bert_error_severity {
256 ACPI_BERT_ERROR_CORRECTABLE = 0,
257 ACPI_BERT_ERROR_FATAL = 1,
258 ACPI_BERT_ERROR_CORRECTED = 2,
259 ACPI_BERT_ERROR_NONE = 3,
260 ACPI_BERT_ERROR_RESERVED = 4 /* 4 and greater are reserved */
264 * Note: The generic error data that follows the error_severity field above
265 * uses the struct acpi_hest_generic_data defined under the HEST table below
268 /*******************************************************************************
270 * BGRT - Boot Graphics Resource Table (ACPI 5.0)
273 ******************************************************************************/
275 struct acpi_table_bgrt {
276 struct acpi_table_header header; /* Common ACPI table header */
285 /* Flags for Status field above */
287 #define ACPI_BGRT_DISPLAYED (1)
288 #define ACPI_BGRT_ORIENTATION_OFFSET (3 << 1)
290 /*******************************************************************************
292 * BOOT - Simple Boot Flag Table
295 * Conforms to the "Simple Boot Flag Specification", Version 2.1
297 ******************************************************************************/
299 struct acpi_table_boot {
300 struct acpi_table_header header; /* Common ACPI table header */
301 u8 cmos_index; /* Index in CMOS RAM for the boot register */
305 /*******************************************************************************
307 * CEDT - CXL Early Discovery Table
310 * Conforms to the "CXL Early Discovery Table" (CXL 2.0)
312 ******************************************************************************/
314 struct acpi_table_cedt {
315 struct acpi_table_header header; /* Common ACPI table header */
318 /* CEDT subtable header (Performance Record Structure) */
320 struct acpi_cedt_header {
326 /* Values for Type field above */
328 enum acpi_cedt_type {
329 ACPI_CEDT_TYPE_CHBS = 0,
330 ACPI_CEDT_TYPE_RESERVED = 1
337 /* 0: CXL Host Bridge Structure */
339 struct acpi_cedt_chbs {
340 struct acpi_cedt_header header;
348 /*******************************************************************************
350 * CPEP - Corrected Platform Error Polling table (ACPI 4.0)
353 ******************************************************************************/
355 struct acpi_table_cpep {
356 struct acpi_table_header header; /* Common ACPI table header */
362 struct acpi_cpep_polling {
363 struct acpi_subtable_header header;
364 u8 id; /* Processor ID */
365 u8 eid; /* Processor EID */
366 u32 interval; /* Polling interval (msec) */
369 /*******************************************************************************
371 * CSRT - Core System Resource Table
374 * Conforms to the "Core System Resource Table (CSRT)", November 14, 2011
376 ******************************************************************************/
378 struct acpi_table_csrt {
379 struct acpi_table_header header; /* Common ACPI table header */
382 /* Resource Group subtable */
384 struct acpi_csrt_group {
392 u32 shared_info_length;
394 /* Shared data immediately follows (Length = shared_info_length) */
397 /* Shared Info subtable */
399 struct acpi_csrt_shared_info {
405 u8 interrupt_polarity;
408 u8 dma_address_width;
409 u16 base_request_line;
410 u16 num_handshake_signals;
413 /* Resource descriptors immediately follow (Length = Group length - shared_info_length) */
416 /* Resource Descriptor subtable */
418 struct acpi_csrt_descriptor {
424 /* Resource-specific information immediately follows */
429 #define ACPI_CSRT_TYPE_INTERRUPT 0x0001
430 #define ACPI_CSRT_TYPE_TIMER 0x0002
431 #define ACPI_CSRT_TYPE_DMA 0x0003
433 /* Resource Subtypes */
435 #define ACPI_CSRT_XRUPT_LINE 0x0000
436 #define ACPI_CSRT_XRUPT_CONTROLLER 0x0001
437 #define ACPI_CSRT_TIMER 0x0000
438 #define ACPI_CSRT_DMA_CHANNEL 0x0000
439 #define ACPI_CSRT_DMA_CONTROLLER 0x0001
441 /*******************************************************************************
443 * DBG2 - Debug Port Table 2
444 * Version 0 (Both main table and subtables)
446 * Conforms to "Microsoft Debug Port Table 2 (DBG2)", December 10, 2015
448 ******************************************************************************/
450 struct acpi_table_dbg2 {
451 struct acpi_table_header header; /* Common ACPI table header */
456 struct acpi_dbg2_header {
461 /* Debug Device Information Subtable */
463 struct acpi_dbg2_device {
466 u8 register_count; /* Number of base_address registers */
474 u16 base_address_offset;
475 u16 address_size_offset;
478 * base_address (required) - Each in 12-byte Generic Address Structure format.
479 * address_size (required) - Array of u32 sizes corresponding to each base_address register.
480 * Namepath (required) - Null terminated string. Single dot if not supported.
481 * oem_data (optional) - Length is oem_data_length.
485 /* Types for port_type field above */
487 #define ACPI_DBG2_SERIAL_PORT 0x8000
488 #define ACPI_DBG2_1394_PORT 0x8001
489 #define ACPI_DBG2_USB_PORT 0x8002
490 #define ACPI_DBG2_NET_PORT 0x8003
492 /* Subtypes for port_subtype field above */
494 #define ACPI_DBG2_16550_COMPATIBLE 0x0000
495 #define ACPI_DBG2_16550_SUBSET 0x0001
496 #define ACPI_DBG2_ARM_PL011 0x0003
497 #define ACPI_DBG2_ARM_SBSA_32BIT 0x000D
498 #define ACPI_DBG2_ARM_SBSA_GENERIC 0x000E
499 #define ACPI_DBG2_ARM_DCC 0x000F
500 #define ACPI_DBG2_BCM2835 0x0010
502 #define ACPI_DBG2_1394_STANDARD 0x0000
504 #define ACPI_DBG2_USB_XHCI 0x0000
505 #define ACPI_DBG2_USB_EHCI 0x0001
507 /*******************************************************************************
509 * DBGP - Debug Port table
512 * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000
514 ******************************************************************************/
516 struct acpi_table_dbgp {
517 struct acpi_table_header header; /* Common ACPI table header */
518 u8 type; /* 0=full 16550, 1=subset of 16550 */
520 struct acpi_generic_address debug_port;
523 /*******************************************************************************
525 * DMAR - DMA Remapping table
528 * Conforms to "Intel Virtualization Technology for Directed I/O",
529 * Version 2.3, October 2014
531 ******************************************************************************/
533 struct acpi_table_dmar {
534 struct acpi_table_header header; /* Common ACPI table header */
535 u8 width; /* Host Address Width */
540 /* Masks for Flags field above */
542 #define ACPI_DMAR_INTR_REMAP (1)
543 #define ACPI_DMAR_X2APIC_OPT_OUT (1<<1)
544 #define ACPI_DMAR_X2APIC_MODE (1<<2)
546 /* DMAR subtable header */
548 struct acpi_dmar_header {
553 /* Values for subtable type in struct acpi_dmar_header */
555 enum acpi_dmar_type {
556 ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
557 ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
558 ACPI_DMAR_TYPE_ROOT_ATS = 2,
559 ACPI_DMAR_TYPE_HARDWARE_AFFINITY = 3,
560 ACPI_DMAR_TYPE_NAMESPACE = 4,
561 ACPI_DMAR_TYPE_SATC = 5,
562 ACPI_DMAR_TYPE_RESERVED = 6 /* 6 and greater are reserved */
565 /* DMAR Device Scope structure */
567 struct acpi_dmar_device_scope {
575 /* Values for entry_type in struct acpi_dmar_device_scope - device types */
577 enum acpi_dmar_scope_type {
578 ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
579 ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
580 ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
581 ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
582 ACPI_DMAR_SCOPE_TYPE_HPET = 4,
583 ACPI_DMAR_SCOPE_TYPE_NAMESPACE = 5,
584 ACPI_DMAR_SCOPE_TYPE_RESERVED = 6 /* 6 and greater are reserved */
587 struct acpi_dmar_pci_path {
593 * DMAR Subtables, correspond to Type in struct acpi_dmar_header
596 /* 0: Hardware Unit Definition */
598 struct acpi_dmar_hardware_unit {
599 struct acpi_dmar_header header;
603 u64 address; /* Register Base Address */
606 /* Masks for Flags field above */
608 #define ACPI_DMAR_INCLUDE_ALL (1)
610 /* 1: Reserved Memory Definition */
612 struct acpi_dmar_reserved_memory {
613 struct acpi_dmar_header header;
616 u64 base_address; /* 4K aligned base address */
617 u64 end_address; /* 4K aligned limit address */
620 /* Masks for Flags field above */
622 #define ACPI_DMAR_ALLOW_ALL (1)
624 /* 2: Root Port ATS Capability Reporting Structure */
626 struct acpi_dmar_atsr {
627 struct acpi_dmar_header header;
633 /* Masks for Flags field above */
635 #define ACPI_DMAR_ALL_PORTS (1)
637 /* 3: Remapping Hardware Static Affinity Structure */
639 struct acpi_dmar_rhsa {
640 struct acpi_dmar_header header;
643 u32 proximity_domain;
646 /* 4: ACPI Namespace Device Declaration Structure */
648 struct acpi_dmar_andd {
649 struct acpi_dmar_header header;
655 /* 5: SOC Integrated Address Translation Cache Reporting Structure */
657 struct acpi_dmar_satc {
658 struct acpi_dmar_header header;
663 /*******************************************************************************
665 * DRTM - Dynamic Root of Trust for Measurement table
666 * Conforms to "TCG D-RTM Architecture" June 17 2013, Version 1.0.0
669 ******************************************************************************/
671 struct acpi_table_drtm {
672 struct acpi_table_header header; /* Common ACPI table header */
673 u64 entry_base_address;
678 u64 log_area_address;
680 u64 arch_dependent_address;
684 /* Flag Definitions for above */
686 #define ACPI_DRTM_ACCESS_ALLOWED (1)
687 #define ACPI_DRTM_ENABLE_GAP_CODE (1<<1)
688 #define ACPI_DRTM_INCOMPLETE_MEASUREMENTS (1<<2)
689 #define ACPI_DRTM_AUTHORITY_ORDER (1<<3)
691 /* 1) Validated Tables List (64-bit addresses) */
693 struct acpi_drtm_vtable_list {
694 u32 validated_table_count;
695 u64 validated_tables[1];
698 /* 2) Resources List (of Resource Descriptors) */
700 /* Resource Descriptor */
702 struct acpi_drtm_resource {
708 struct acpi_drtm_resource_list {
710 struct acpi_drtm_resource resources[1];
713 /* 3) Platform-specific Identifiers List */
715 struct acpi_drtm_dps_id {
720 /*******************************************************************************
722 * ECDT - Embedded Controller Boot Resources Table
725 ******************************************************************************/
727 struct acpi_table_ecdt {
728 struct acpi_table_header header; /* Common ACPI table header */
729 struct acpi_generic_address control; /* Address of EC command/status register */
730 struct acpi_generic_address data; /* Address of EC data register */
731 u32 uid; /* Unique ID - must be same as the EC _UID method */
732 u8 gpe; /* The GPE for the EC */
733 u8 id[1]; /* Full namepath of the EC in the ACPI namespace */
736 /*******************************************************************************
738 * EINJ - Error Injection Table (ACPI 4.0)
741 ******************************************************************************/
743 struct acpi_table_einj {
744 struct acpi_table_header header; /* Common ACPI table header */
751 /* EINJ Injection Instruction Entries (actions) */
753 struct acpi_einj_entry {
754 struct acpi_whea_header whea_header; /* Common header for WHEA tables */
757 /* Masks for Flags field above */
759 #define ACPI_EINJ_PRESERVE (1)
761 /* Values for Action field above */
763 enum acpi_einj_actions {
764 ACPI_EINJ_BEGIN_OPERATION = 0,
765 ACPI_EINJ_GET_TRIGGER_TABLE = 1,
766 ACPI_EINJ_SET_ERROR_TYPE = 2,
767 ACPI_EINJ_GET_ERROR_TYPE = 3,
768 ACPI_EINJ_END_OPERATION = 4,
769 ACPI_EINJ_EXECUTE_OPERATION = 5,
770 ACPI_EINJ_CHECK_BUSY_STATUS = 6,
771 ACPI_EINJ_GET_COMMAND_STATUS = 7,
772 ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 8,
773 ACPI_EINJ_GET_EXECUTE_TIMINGS = 9,
774 ACPI_EINJ_ACTION_RESERVED = 10, /* 10 and greater are reserved */
775 ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */
778 /* Values for Instruction field above */
780 enum acpi_einj_instructions {
781 ACPI_EINJ_READ_REGISTER = 0,
782 ACPI_EINJ_READ_REGISTER_VALUE = 1,
783 ACPI_EINJ_WRITE_REGISTER = 2,
784 ACPI_EINJ_WRITE_REGISTER_VALUE = 3,
786 ACPI_EINJ_FLUSH_CACHELINE = 5,
787 ACPI_EINJ_INSTRUCTION_RESERVED = 6 /* 6 and greater are reserved */
790 struct acpi_einj_error_type_with_addr {
792 u32 vendor_struct_offset;
800 struct acpi_einj_vendor {
809 /* EINJ Trigger Error Action Table */
811 struct acpi_einj_trigger {
818 /* Command status return values */
820 enum acpi_einj_command_status {
821 ACPI_EINJ_SUCCESS = 0,
822 ACPI_EINJ_FAILURE = 1,
823 ACPI_EINJ_INVALID_ACCESS = 2,
824 ACPI_EINJ_STATUS_RESERVED = 3 /* 3 and greater are reserved */
827 /* Error types returned from ACPI_EINJ_GET_ERROR_TYPE (bitfield) */
829 #define ACPI_EINJ_PROCESSOR_CORRECTABLE (1)
830 #define ACPI_EINJ_PROCESSOR_UNCORRECTABLE (1<<1)
831 #define ACPI_EINJ_PROCESSOR_FATAL (1<<2)
832 #define ACPI_EINJ_MEMORY_CORRECTABLE (1<<3)
833 #define ACPI_EINJ_MEMORY_UNCORRECTABLE (1<<4)
834 #define ACPI_EINJ_MEMORY_FATAL (1<<5)
835 #define ACPI_EINJ_PCIX_CORRECTABLE (1<<6)
836 #define ACPI_EINJ_PCIX_UNCORRECTABLE (1<<7)
837 #define ACPI_EINJ_PCIX_FATAL (1<<8)
838 #define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9)
839 #define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10)
840 #define ACPI_EINJ_PLATFORM_FATAL (1<<11)
841 #define ACPI_EINJ_VENDOR_DEFINED (1<<31)
843 /*******************************************************************************
845 * ERST - Error Record Serialization Table (ACPI 4.0)
848 ******************************************************************************/
850 struct acpi_table_erst {
851 struct acpi_table_header header; /* Common ACPI table header */
857 /* ERST Serialization Entries (actions) */
859 struct acpi_erst_entry {
860 struct acpi_whea_header whea_header; /* Common header for WHEA tables */
863 /* Masks for Flags field above */
865 #define ACPI_ERST_PRESERVE (1)
867 /* Values for Action field above */
869 enum acpi_erst_actions {
870 ACPI_ERST_BEGIN_WRITE = 0,
871 ACPI_ERST_BEGIN_READ = 1,
872 ACPI_ERST_BEGIN_CLEAR = 2,
874 ACPI_ERST_SET_RECORD_OFFSET = 4,
875 ACPI_ERST_EXECUTE_OPERATION = 5,
876 ACPI_ERST_CHECK_BUSY_STATUS = 6,
877 ACPI_ERST_GET_COMMAND_STATUS = 7,
878 ACPI_ERST_GET_RECORD_ID = 8,
879 ACPI_ERST_SET_RECORD_ID = 9,
880 ACPI_ERST_GET_RECORD_COUNT = 10,
881 ACPI_ERST_BEGIN_DUMMY_WRIITE = 11,
882 ACPI_ERST_NOT_USED = 12,
883 ACPI_ERST_GET_ERROR_RANGE = 13,
884 ACPI_ERST_GET_ERROR_LENGTH = 14,
885 ACPI_ERST_GET_ERROR_ATTRIBUTES = 15,
886 ACPI_ERST_EXECUTE_TIMINGS = 16,
887 ACPI_ERST_ACTION_RESERVED = 17 /* 17 and greater are reserved */
890 /* Values for Instruction field above */
892 enum acpi_erst_instructions {
893 ACPI_ERST_READ_REGISTER = 0,
894 ACPI_ERST_READ_REGISTER_VALUE = 1,
895 ACPI_ERST_WRITE_REGISTER = 2,
896 ACPI_ERST_WRITE_REGISTER_VALUE = 3,
898 ACPI_ERST_LOAD_VAR1 = 5,
899 ACPI_ERST_LOAD_VAR2 = 6,
900 ACPI_ERST_STORE_VAR1 = 7,
902 ACPI_ERST_SUBTRACT = 9,
903 ACPI_ERST_ADD_VALUE = 10,
904 ACPI_ERST_SUBTRACT_VALUE = 11,
905 ACPI_ERST_STALL = 12,
906 ACPI_ERST_STALL_WHILE_TRUE = 13,
907 ACPI_ERST_SKIP_NEXT_IF_TRUE = 14,
909 ACPI_ERST_SET_SRC_ADDRESS_BASE = 16,
910 ACPI_ERST_SET_DST_ADDRESS_BASE = 17,
911 ACPI_ERST_MOVE_DATA = 18,
912 ACPI_ERST_INSTRUCTION_RESERVED = 19 /* 19 and greater are reserved */
915 /* Command status return values */
917 enum acpi_erst_command_status {
918 ACPI_ERST_SUCCESS = 0,
919 ACPI_ERST_NO_SPACE = 1,
920 ACPI_ERST_NOT_AVAILABLE = 2,
921 ACPI_ERST_FAILURE = 3,
922 ACPI_ERST_RECORD_EMPTY = 4,
923 ACPI_ERST_NOT_FOUND = 5,
924 ACPI_ERST_STATUS_RESERVED = 6 /* 6 and greater are reserved */
927 /* Error Record Serialization Information */
929 struct acpi_erst_info {
930 u16 signature; /* Should be "ER" */
934 /*******************************************************************************
936 * FPDT - Firmware Performance Data Table (ACPI 5.0)
939 ******************************************************************************/
941 struct acpi_table_fpdt {
942 struct acpi_table_header header; /* Common ACPI table header */
945 /* FPDT subtable header (Performance Record Structure) */
947 struct acpi_fpdt_header {
953 /* Values for Type field above */
955 enum acpi_fpdt_type {
956 ACPI_FPDT_TYPE_BOOT = 0,
957 ACPI_FPDT_TYPE_S3PERF = 1
964 /* 0: Firmware Basic Boot Performance Record */
966 struct acpi_fpdt_boot_pointer {
967 struct acpi_fpdt_header header;
972 /* 1: S3 Performance Table Pointer Record */
974 struct acpi_fpdt_s3pt_pointer {
975 struct acpi_fpdt_header header;
981 * S3PT - S3 Performance Table. This table is pointed to by the
982 * S3 Pointer Record above.
984 struct acpi_table_s3pt {
985 u8 signature[4]; /* "S3PT" */
990 * S3PT Subtables (Not part of the actual FPDT)
993 /* Values for Type field in S3PT header */
995 enum acpi_s3pt_type {
996 ACPI_S3PT_TYPE_RESUME = 0,
997 ACPI_S3PT_TYPE_SUSPEND = 1,
998 ACPI_FPDT_BOOT_PERFORMANCE = 2
1001 struct acpi_s3pt_resume {
1002 struct acpi_fpdt_header header;
1008 struct acpi_s3pt_suspend {
1009 struct acpi_fpdt_header header;
1015 * FPDT Boot Performance Record (Not part of the actual FPDT)
1017 struct acpi_fpdt_boot {
1018 struct acpi_fpdt_header header;
1023 u64 exit_services_entry;
1024 u64 exit_services_exit;
1027 /*******************************************************************************
1029 * GTDT - Generic Timer Description Table (ACPI 5.1)
1032 ******************************************************************************/
1034 struct acpi_table_gtdt {
1035 struct acpi_table_header header; /* Common ACPI table header */
1036 u64 counter_block_addresss;
1038 u32 secure_el1_interrupt;
1039 u32 secure_el1_flags;
1040 u32 non_secure_el1_interrupt;
1041 u32 non_secure_el1_flags;
1042 u32 virtual_timer_interrupt;
1043 u32 virtual_timer_flags;
1044 u32 non_secure_el2_interrupt;
1045 u32 non_secure_el2_flags;
1046 u64 counter_read_block_address;
1047 u32 platform_timer_count;
1048 u32 platform_timer_offset;
1051 /* Flag Definitions: Timer Block Physical Timers and Virtual timers */
1053 #define ACPI_GTDT_INTERRUPT_MODE (1)
1054 #define ACPI_GTDT_INTERRUPT_POLARITY (1<<1)
1055 #define ACPI_GTDT_ALWAYS_ON (1<<2)
1057 struct acpi_gtdt_el2 {
1058 u32 virtual_el2_timer_gsiv;
1059 u32 virtual_el2_timer_flags;
1062 /* Common GTDT subtable header */
1064 struct acpi_gtdt_header {
1069 /* Values for GTDT subtable type above */
1071 enum acpi_gtdt_type {
1072 ACPI_GTDT_TYPE_TIMER_BLOCK = 0,
1073 ACPI_GTDT_TYPE_WATCHDOG = 1,
1074 ACPI_GTDT_TYPE_RESERVED = 2 /* 2 and greater are reserved */
1077 /* GTDT Subtables, correspond to Type in struct acpi_gtdt_header */
1079 /* 0: Generic Timer Block */
1081 struct acpi_gtdt_timer_block {
1082 struct acpi_gtdt_header header;
1089 /* Timer Sub-Structure, one per timer */
1091 struct acpi_gtdt_timer_entry {
1095 u64 el0_base_address;
1096 u32 timer_interrupt;
1098 u32 virtual_timer_interrupt;
1099 u32 virtual_timer_flags;
1103 /* Flag Definitions: timer_flags and virtual_timer_flags above */
1105 #define ACPI_GTDT_GT_IRQ_MODE (1)
1106 #define ACPI_GTDT_GT_IRQ_POLARITY (1<<1)
1108 /* Flag Definitions: common_flags above */
1110 #define ACPI_GTDT_GT_IS_SECURE_TIMER (1)
1111 #define ACPI_GTDT_GT_ALWAYS_ON (1<<1)
1113 /* 1: SBSA Generic Watchdog Structure */
1115 struct acpi_gtdt_watchdog {
1116 struct acpi_gtdt_header header;
1118 u64 refresh_frame_address;
1119 u64 control_frame_address;
1120 u32 timer_interrupt;
1124 /* Flag Definitions: timer_flags above */
1126 #define ACPI_GTDT_WATCHDOG_IRQ_MODE (1)
1127 #define ACPI_GTDT_WATCHDOG_IRQ_POLARITY (1<<1)
1128 #define ACPI_GTDT_WATCHDOG_SECURE (1<<2)
1130 /*******************************************************************************
1132 * HEST - Hardware Error Source Table (ACPI 4.0)
1135 ******************************************************************************/
1137 struct acpi_table_hest {
1138 struct acpi_table_header header; /* Common ACPI table header */
1139 u32 error_source_count;
1142 /* HEST subtable header */
1144 struct acpi_hest_header {
1149 /* Values for Type field above for subtables */
1151 enum acpi_hest_types {
1152 ACPI_HEST_TYPE_IA32_CHECK = 0,
1153 ACPI_HEST_TYPE_IA32_CORRECTED_CHECK = 1,
1154 ACPI_HEST_TYPE_IA32_NMI = 2,
1155 ACPI_HEST_TYPE_NOT_USED3 = 3,
1156 ACPI_HEST_TYPE_NOT_USED4 = 4,
1157 ACPI_HEST_TYPE_NOT_USED5 = 5,
1158 ACPI_HEST_TYPE_AER_ROOT_PORT = 6,
1159 ACPI_HEST_TYPE_AER_ENDPOINT = 7,
1160 ACPI_HEST_TYPE_AER_BRIDGE = 8,
1161 ACPI_HEST_TYPE_GENERIC_ERROR = 9,
1162 ACPI_HEST_TYPE_GENERIC_ERROR_V2 = 10,
1163 ACPI_HEST_TYPE_IA32_DEFERRED_CHECK = 11,
1164 ACPI_HEST_TYPE_RESERVED = 12 /* 12 and greater are reserved */
1168 * HEST substructures contained in subtables
1172 * IA32 Error Bank(s) - Follows the struct acpi_hest_ia_machine_check and
1173 * struct acpi_hest_ia_corrected structures.
1175 struct acpi_hest_ia_error_bank {
1177 u8 clear_status_on_init;
1180 u32 control_register;
1182 u32 status_register;
1183 u32 address_register;
1187 /* Common HEST sub-structure for PCI/AER structures below (6,7,8) */
1189 struct acpi_hest_aer_common {
1193 u32 records_to_preallocate;
1194 u32 max_sections_per_record;
1195 u32 bus; /* Bus and Segment numbers */
1200 u32 uncorrectable_mask;
1201 u32 uncorrectable_severity;
1202 u32 correctable_mask;
1203 u32 advanced_capabilities;
1206 /* Masks for HEST Flags fields */
1208 #define ACPI_HEST_FIRMWARE_FIRST (1)
1209 #define ACPI_HEST_GLOBAL (1<<1)
1210 #define ACPI_HEST_GHES_ASSIST (1<<2)
1213 * Macros to access the bus/segment numbers in Bus field above:
1214 * Bus number is encoded in bits 7:0
1215 * Segment number is encoded in bits 23:8
1217 #define ACPI_HEST_BUS(bus) ((bus) & 0xFF)
1218 #define ACPI_HEST_SEGMENT(bus) (((bus) >> 8) & 0xFFFF)
1220 /* Hardware Error Notification */
1222 struct acpi_hest_notify {
1225 u16 config_write_enable;
1228 u32 polling_threshold_value;
1229 u32 polling_threshold_window;
1230 u32 error_threshold_value;
1231 u32 error_threshold_window;
1234 /* Values for Notify Type field above */
1236 enum acpi_hest_notify_types {
1237 ACPI_HEST_NOTIFY_POLLED = 0,
1238 ACPI_HEST_NOTIFY_EXTERNAL = 1,
1239 ACPI_HEST_NOTIFY_LOCAL = 2,
1240 ACPI_HEST_NOTIFY_SCI = 3,
1241 ACPI_HEST_NOTIFY_NMI = 4,
1242 ACPI_HEST_NOTIFY_CMCI = 5, /* ACPI 5.0 */
1243 ACPI_HEST_NOTIFY_MCE = 6, /* ACPI 5.0 */
1244 ACPI_HEST_NOTIFY_GPIO = 7, /* ACPI 6.0 */
1245 ACPI_HEST_NOTIFY_SEA = 8, /* ACPI 6.1 */
1246 ACPI_HEST_NOTIFY_SEI = 9, /* ACPI 6.1 */
1247 ACPI_HEST_NOTIFY_GSIV = 10, /* ACPI 6.1 */
1248 ACPI_HEST_NOTIFY_SOFTWARE_DELEGATED = 11, /* ACPI 6.2 */
1249 ACPI_HEST_NOTIFY_RESERVED = 12 /* 12 and greater are reserved */
1252 /* Values for config_write_enable bitfield above */
1254 #define ACPI_HEST_TYPE (1)
1255 #define ACPI_HEST_POLL_INTERVAL (1<<1)
1256 #define ACPI_HEST_POLL_THRESHOLD_VALUE (1<<2)
1257 #define ACPI_HEST_POLL_THRESHOLD_WINDOW (1<<3)
1258 #define ACPI_HEST_ERR_THRESHOLD_VALUE (1<<4)
1259 #define ACPI_HEST_ERR_THRESHOLD_WINDOW (1<<5)
1265 /* 0: IA32 Machine Check Exception */
1267 struct acpi_hest_ia_machine_check {
1268 struct acpi_hest_header header;
1270 u8 flags; /* See flags ACPI_HEST_GLOBAL, etc. above */
1272 u32 records_to_preallocate;
1273 u32 max_sections_per_record;
1274 u64 global_capability_data;
1275 u64 global_control_data;
1276 u8 num_hardware_banks;
1280 /* 1: IA32 Corrected Machine Check */
1282 struct acpi_hest_ia_corrected {
1283 struct acpi_hest_header header;
1285 u8 flags; /* See flags ACPI_HEST_GLOBAL, etc. above */
1287 u32 records_to_preallocate;
1288 u32 max_sections_per_record;
1289 struct acpi_hest_notify notify;
1290 u8 num_hardware_banks;
1294 /* 2: IA32 Non-Maskable Interrupt */
1296 struct acpi_hest_ia_nmi {
1297 struct acpi_hest_header header;
1299 u32 records_to_preallocate;
1300 u32 max_sections_per_record;
1301 u32 max_raw_data_length;
1304 /* 3,4,5: Not used */
1306 /* 6: PCI Express Root Port AER */
1308 struct acpi_hest_aer_root {
1309 struct acpi_hest_header header;
1310 struct acpi_hest_aer_common aer;
1311 u32 root_error_command;
1314 /* 7: PCI Express AER (AER Endpoint) */
1316 struct acpi_hest_aer {
1317 struct acpi_hest_header header;
1318 struct acpi_hest_aer_common aer;
1321 /* 8: PCI Express/PCI-X Bridge AER */
1323 struct acpi_hest_aer_bridge {
1324 struct acpi_hest_header header;
1325 struct acpi_hest_aer_common aer;
1326 u32 uncorrectable_mask2;
1327 u32 uncorrectable_severity2;
1328 u32 advanced_capabilities2;
1331 /* 9: Generic Hardware Error Source */
1333 struct acpi_hest_generic {
1334 struct acpi_hest_header header;
1335 u16 related_source_id;
1338 u32 records_to_preallocate;
1339 u32 max_sections_per_record;
1340 u32 max_raw_data_length;
1341 struct acpi_generic_address error_status_address;
1342 struct acpi_hest_notify notify;
1343 u32 error_block_length;
1346 /* 10: Generic Hardware Error Source, version 2 */
1348 struct acpi_hest_generic_v2 {
1349 struct acpi_hest_header header;
1350 u16 related_source_id;
1353 u32 records_to_preallocate;
1354 u32 max_sections_per_record;
1355 u32 max_raw_data_length;
1356 struct acpi_generic_address error_status_address;
1357 struct acpi_hest_notify notify;
1358 u32 error_block_length;
1359 struct acpi_generic_address read_ack_register;
1360 u64 read_ack_preserve;
1364 /* Generic Error Status block */
1366 struct acpi_hest_generic_status {
1368 u32 raw_data_offset;
1369 u32 raw_data_length;
1374 /* Values for block_status flags above */
1376 #define ACPI_HEST_UNCORRECTABLE (1)
1377 #define ACPI_HEST_CORRECTABLE (1<<1)
1378 #define ACPI_HEST_MULTIPLE_UNCORRECTABLE (1<<2)
1379 #define ACPI_HEST_MULTIPLE_CORRECTABLE (1<<3)
1380 #define ACPI_HEST_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
1382 /* Generic Error Data entry */
1384 struct acpi_hest_generic_data {
1385 u8 section_type[16];
1390 u32 error_data_length;
1395 /* Extension for revision 0x0300 */
1397 struct acpi_hest_generic_data_v300 {
1398 u8 section_type[16];
1403 u32 error_data_length;
1409 /* Values for error_severity above */
1411 #define ACPI_HEST_GEN_ERROR_RECOVERABLE 0
1412 #define ACPI_HEST_GEN_ERROR_FATAL 1
1413 #define ACPI_HEST_GEN_ERROR_CORRECTED 2
1414 #define ACPI_HEST_GEN_ERROR_NONE 3
1416 /* Flags for validation_bits above */
1418 #define ACPI_HEST_GEN_VALID_FRU_ID (1)
1419 #define ACPI_HEST_GEN_VALID_FRU_STRING (1<<1)
1420 #define ACPI_HEST_GEN_VALID_TIMESTAMP (1<<2)
1422 /* 11: IA32 Deferred Machine Check Exception (ACPI 6.2) */
1424 struct acpi_hest_ia_deferred_check {
1425 struct acpi_hest_header header;
1427 u8 flags; /* See flags ACPI_HEST_GLOBAL, etc. above */
1429 u32 records_to_preallocate;
1430 u32 max_sections_per_record;
1431 struct acpi_hest_notify notify;
1432 u8 num_hardware_banks;
1436 /*******************************************************************************
1438 * HMAT - Heterogeneous Memory Attributes Table (ACPI 6.2)
1441 ******************************************************************************/
1443 struct acpi_table_hmat {
1444 struct acpi_table_header header; /* Common ACPI table header */
1448 /* Values for HMAT structure types */
1450 enum acpi_hmat_type {
1451 ACPI_HMAT_TYPE_PROXIMITY = 0, /* Memory proximity domain attributes */
1452 ACPI_HMAT_TYPE_LOCALITY = 1, /* System locality latency and bandwidth information */
1453 ACPI_HMAT_TYPE_CACHE = 2, /* Memory side cache information */
1454 ACPI_HMAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */
1457 struct acpi_hmat_structure {
1464 * HMAT Structures, correspond to Type in struct acpi_hmat_structure
1467 /* 0: Memory proximity domain attributes */
1469 struct acpi_hmat_proximity_domain {
1470 struct acpi_hmat_structure header;
1473 u32 processor_PD; /* Processor proximity domain */
1474 u32 memory_PD; /* Memory proximity domain */
1480 /* Masks for Flags field above */
1482 #define ACPI_HMAT_PROCESSOR_PD_VALID (1) /* 1: processor_PD field is valid */
1483 #define ACPI_HMAT_MEMORY_PD_VALID (1<<1) /* 1: memory_PD field is valid */
1484 #define ACPI_HMAT_RESERVATION_HINT (1<<2) /* 1: Reservation hint */
1486 /* 1: System locality latency and bandwidth information */
1488 struct acpi_hmat_locality {
1489 struct acpi_hmat_structure header;
1492 u8 min_transfer_size;
1494 u32 number_of_initiator_Pds;
1495 u32 number_of_target_Pds;
1497 u64 entry_base_unit;
1500 /* Masks for Flags field above */
1502 #define ACPI_HMAT_MEMORY_HIERARCHY (0x0F) /* Bits 0-3 */
1504 /* Values for Memory Hierarchy flags */
1506 #define ACPI_HMAT_MEMORY 0
1507 #define ACPI_HMAT_LAST_LEVEL_CACHE 1
1508 #define ACPI_HMAT_1ST_LEVEL_CACHE 2
1509 #define ACPI_HMAT_2ND_LEVEL_CACHE 3
1510 #define ACPI_HMAT_3RD_LEVEL_CACHE 4
1511 #define ACPI_HMAT_MINIMUM_XFER_SIZE 0x10 /* Bit 4: ACPI 6.4 */
1512 #define ACPI_HMAT_NON_SEQUENTIAL_XFERS 0x20 /* Bit 5: ACPI 6.4 */
1515 /* Values for data_type field above */
1517 #define ACPI_HMAT_ACCESS_LATENCY 0
1518 #define ACPI_HMAT_READ_LATENCY 1
1519 #define ACPI_HMAT_WRITE_LATENCY 2
1520 #define ACPI_HMAT_ACCESS_BANDWIDTH 3
1521 #define ACPI_HMAT_READ_BANDWIDTH 4
1522 #define ACPI_HMAT_WRITE_BANDWIDTH 5
1524 /* 2: Memory side cache information */
1526 struct acpi_hmat_cache {
1527 struct acpi_hmat_structure header;
1531 u32 cache_attributes;
1533 u16 number_of_SMBIOShandles;
1536 /* Masks for cache_attributes field above */
1538 #define ACPI_HMAT_TOTAL_CACHE_LEVEL (0x0000000F)
1539 #define ACPI_HMAT_CACHE_LEVEL (0x000000F0)
1540 #define ACPI_HMAT_CACHE_ASSOCIATIVITY (0x00000F00)
1541 #define ACPI_HMAT_WRITE_POLICY (0x0000F000)
1542 #define ACPI_HMAT_CACHE_LINE_SIZE (0xFFFF0000)
1544 /* Values for cache associativity flag */
1546 #define ACPI_HMAT_CA_NONE (0)
1547 #define ACPI_HMAT_CA_DIRECT_MAPPED (1)
1548 #define ACPI_HMAT_CA_COMPLEX_CACHE_INDEXING (2)
1550 /* Values for write policy flag */
1552 #define ACPI_HMAT_CP_NONE (0)
1553 #define ACPI_HMAT_CP_WB (1)
1554 #define ACPI_HMAT_CP_WT (2)
1556 /*******************************************************************************
1558 * HPET - High Precision Event Timer table
1561 * Conforms to "IA-PC HPET (High Precision Event Timers) Specification",
1562 * Version 1.0a, October 2004
1564 ******************************************************************************/
1566 struct acpi_table_hpet {
1567 struct acpi_table_header header; /* Common ACPI table header */
1568 u32 id; /* Hardware ID of event timer block */
1569 struct acpi_generic_address address; /* Address of event timer block */
1570 u8 sequence; /* HPET sequence number */
1571 u16 minimum_tick; /* Main counter min tick, periodic mode */
1575 /* Masks for Flags field above */
1577 #define ACPI_HPET_PAGE_PROTECT_MASK (3)
1579 /* Values for Page Protect flags */
1581 enum acpi_hpet_page_protect {
1582 ACPI_HPET_NO_PAGE_PROTECT = 0,
1583 ACPI_HPET_PAGE_PROTECT4 = 1,
1584 ACPI_HPET_PAGE_PROTECT64 = 2
1587 /*******************************************************************************
1589 * IBFT - Boot Firmware Table
1592 * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b
1593 * Specification", Version 1.01, March 1, 2007
1595 * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
1596 * Therefore, it is not currently supported by the disassembler.
1598 ******************************************************************************/
1600 struct acpi_table_ibft {
1601 struct acpi_table_header header; /* Common ACPI table header */
1605 /* IBFT common subtable header */
1607 struct acpi_ibft_header {
1615 /* Values for Type field above */
1617 enum acpi_ibft_type {
1618 ACPI_IBFT_TYPE_NOT_USED = 0,
1619 ACPI_IBFT_TYPE_CONTROL = 1,
1620 ACPI_IBFT_TYPE_INITIATOR = 2,
1621 ACPI_IBFT_TYPE_NIC = 3,
1622 ACPI_IBFT_TYPE_TARGET = 4,
1623 ACPI_IBFT_TYPE_EXTENSIONS = 5,
1624 ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */
1627 /* IBFT subtables */
1629 struct acpi_ibft_control {
1630 struct acpi_ibft_header header;
1632 u16 initiator_offset;
1639 struct acpi_ibft_initiator {
1640 struct acpi_ibft_header header;
1643 u8 primary_server[16];
1644 u8 secondary_server[16];
1649 struct acpi_ibft_nic {
1650 struct acpi_ibft_header header;
1652 u8 subnet_mask_prefix;
1656 u8 secondary_dns[16];
1665 struct acpi_ibft_target {
1666 struct acpi_ibft_header header;
1667 u8 target_ip_address[16];
1668 u16 target_ip_socket;
1669 u8 target_boot_lun[8];
1672 u16 target_name_length;
1673 u16 target_name_offset;
1674 u16 chap_name_length;
1675 u16 chap_name_offset;
1676 u16 chap_secret_length;
1677 u16 chap_secret_offset;
1678 u16 reverse_chap_name_length;
1679 u16 reverse_chap_name_offset;
1680 u16 reverse_chap_secret_length;
1681 u16 reverse_chap_secret_offset;
1684 /* Reset to default packing */
1688 #endif /* __ACTBL1_H__ */