1 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
2 /******************************************************************************
4 * Name: actbl2.h - ACPI Table Definitions (tables not in ACPI spec)
6 * Copyright (C) 2000 - 2022, Intel Corp.
8 *****************************************************************************/
13 /*******************************************************************************
15 * Additional ACPI Tables (2)
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_AGDI "AGDI" /* Arm Generic Diagnostic Dump and Reset Device Interface */
28 #define ACPI_SIG_APMT "APMT" /* Arm Performance Monitoring Unit table */
29 #define ACPI_SIG_BDAT "BDAT" /* BIOS Data ACPI Table */
30 #define ACPI_SIG_IORT "IORT" /* IO Remapping Table */
31 #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */
32 #define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */
33 #define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */
34 #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
35 #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */
36 #define ACPI_SIG_MPST "MPST" /* Memory Power State Table */
37 #define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table */
38 #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
39 #define ACPI_SIG_NFIT "NFIT" /* NVDIMM Firmware Interface Table */
40 #define ACPI_SIG_NHLT "NHLT" /* Non HD Audio Link Table */
41 #define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */
42 #define ACPI_SIG_PDTT "PDTT" /* Platform Debug Trigger Table */
43 #define ACPI_SIG_PHAT "PHAT" /* Platform Health Assessment Table */
44 #define ACPI_SIG_PMTT "PMTT" /* Platform Memory Topology Table */
45 #define ACPI_SIG_PPTT "PPTT" /* Processor Properties Topology Table */
46 #define ACPI_SIG_PRMT "PRMT" /* Platform Runtime Mechanism Table */
47 #define ACPI_SIG_RASF "RASF" /* RAS Feature table */
48 #define ACPI_SIG_RGRT "RGRT" /* Regulatory Graphics Resource Table */
49 #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */
50 #define ACPI_SIG_SDEI "SDEI" /* Software Delegated Exception Interface Table */
51 #define ACPI_SIG_SDEV "SDEV" /* Secure Devices table */
52 #define ACPI_SIG_SVKL "SVKL" /* Storage Volume Key Location Table */
53 #define ACPI_SIG_TDEL "TDEL" /* TD Event Log Table */
56 * All tables must be byte-packed to match the ACPI specification, since
57 * the tables are provided by the system BIOS.
62 * Note: C bitfields are not used for this reason:
64 * "Bitfields are great and easy to read, but unfortunately the C language
65 * does not specify the layout of bitfields in memory, which means they are
66 * essentially useless for dealing with packed data in on-disk formats or
67 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
68 * this decision was a design error in C. Ritchie could have picked an order
69 * and stuck with it." Norman Ramsey.
70 * See http://stackoverflow.com/a/1053662/41661
73 /*******************************************************************************
75 * AEST - Arm Error Source Table
77 * Conforms to: ACPI for the Armv8 RAS Extensions 1.1 Platform Design Document
80 ******************************************************************************/
82 struct acpi_table_aest {
83 struct acpi_table_header header;
87 /* Common Subtable header - one per Node Structure (Subtable) */
89 struct acpi_aest_hdr {
93 u32 node_specific_offset;
94 u32 node_interface_offset;
95 u32 node_interrupt_offset;
96 u32 node_interrupt_count;
99 u64 error_injection_rate;
102 /* Values for Type above */
104 #define ACPI_AEST_PROCESSOR_ERROR_NODE 0
105 #define ACPI_AEST_MEMORY_ERROR_NODE 1
106 #define ACPI_AEST_SMMU_ERROR_NODE 2
107 #define ACPI_AEST_VENDOR_ERROR_NODE 3
108 #define ACPI_AEST_GIC_ERROR_NODE 4
109 #define ACPI_AEST_NODE_TYPE_RESERVED 5 /* 5 and above are reserved */
112 * AEST subtables (Error nodes)
115 /* 0: Processor Error */
117 typedef struct acpi_aest_processor {
123 u64 processor_affinity;
125 } acpi_aest_processor;
127 /* Values for resource_type above, related structs below */
129 #define ACPI_AEST_CACHE_RESOURCE 0
130 #define ACPI_AEST_TLB_RESOURCE 1
131 #define ACPI_AEST_GENERIC_RESOURCE 2
132 #define ACPI_AEST_RESOURCE_RESERVED 3 /* 3 and above are reserved */
134 /* 0R: Processor Cache Resource Substructure */
136 typedef struct acpi_aest_processor_cache {
140 } acpi_aest_processor_cache;
142 /* Values for cache_type above */
144 #define ACPI_AEST_CACHE_DATA 0
145 #define ACPI_AEST_CACHE_INSTRUCTION 1
146 #define ACPI_AEST_CACHE_UNIFIED 2
147 #define ACPI_AEST_CACHE_RESERVED 3 /* 3 and above are reserved */
149 /* 1R: Processor TLB Resource Substructure */
151 typedef struct acpi_aest_processor_tlb {
155 } acpi_aest_processor_tlb;
157 /* 2R: Processor Generic Resource Substructure */
159 typedef struct acpi_aest_processor_generic {
162 } acpi_aest_processor_generic;
164 /* 1: Memory Error */
166 typedef struct acpi_aest_memory {
167 u32 srat_proximity_domain;
173 typedef struct acpi_aest_smmu {
174 u32 iort_node_reference;
175 u32 subcomponent_reference;
179 /* 3: Vendor Defined */
181 typedef struct acpi_aest_vendor {
184 u8 vendor_specific_data[16];
190 typedef struct acpi_aest_gic {
196 /* Values for interface_type above */
198 #define ACPI_AEST_GIC_CPU 0
199 #define ACPI_AEST_GIC_DISTRIBUTOR 1
200 #define ACPI_AEST_GIC_REDISTRIBUTOR 2
201 #define ACPI_AEST_GIC_ITS 3
202 #define ACPI_AEST_GIC_RESERVED 4 /* 4 and above are reserved */
204 /* Node Interface Structure */
206 typedef struct acpi_aest_node_interface {
211 u32 error_record_index;
212 u32 error_record_count;
213 u64 error_record_implemented;
214 u64 error_status_reporting;
217 } acpi_aest_node_interface;
219 /* Values for Type field above */
221 #define ACPI_AEST_NODE_SYSTEM_REGISTER 0
222 #define ACPI_AEST_NODE_MEMORY_MAPPED 1
223 #define ACPI_AEST_XFACE_RESERVED 2 /* 2 and above are reserved */
225 /* Node Interrupt Structure */
227 typedef struct acpi_aest_node_interrupt {
235 } acpi_aest_node_interrupt;
237 /* Values for Type field above */
239 #define ACPI_AEST_NODE_FAULT_HANDLING 0
240 #define ACPI_AEST_NODE_ERROR_RECOVERY 1
241 #define ACPI_AEST_XRUPT_RESERVED 2 /* 2 and above are reserved */
243 /*******************************************************************************
244 * AGDI - Arm Generic Diagnostic Dump and Reset Device Interface
246 * Conforms to "ACPI for Arm Components 1.1, Platform Design Document"
249 ******************************************************************************/
250 struct acpi_table_agdi {
251 struct acpi_table_header header; /* Common ACPI table header */
258 /* Mask for Flags field above */
260 #define ACPI_AGDI_SIGNALING_MODE (1)
262 /*******************************************************************************
264 * APMT - ARM Performance Monitoring Unit Table
267 * ARM Performance Monitoring Unit Architecture 1.0 Platform Design Document
268 * ARM DEN0117 v1.0 November 25, 2021
270 ******************************************************************************/
272 struct acpi_table_apmt {
273 struct acpi_table_header header; /* Common ACPI table header */
276 #define ACPI_APMT_NODE_ID_LENGTH 4
281 struct acpi_apmt_node {
297 /* Masks for Flags field above */
299 #define ACPI_APMT_FLAGS_DUAL_PAGE (1<<0)
300 #define ACPI_APMT_FLAGS_AFFINITY (1<<1)
301 #define ACPI_APMT_FLAGS_ATOMIC (1<<2)
303 /* Values for Flags dual page field above */
305 #define ACPI_APMT_FLAGS_DUAL_PAGE_NSUPP (0<<0)
306 #define ACPI_APMT_FLAGS_DUAL_PAGE_SUPP (1<<0)
308 /* Values for Flags processor affinity field above */
309 #define ACPI_APMT_FLAGS_AFFINITY_PROC (0<<1)
310 #define ACPI_APMT_FLAGS_AFFINITY_PROC_CONTAINER (1<<1)
312 /* Values for Flags 64-bit atomic field above */
313 #define ACPI_APMT_FLAGS_ATOMIC_NSUPP (0<<2)
314 #define ACPI_APMT_FLAGS_ATOMIC_SUPP (1<<2)
316 /* Values for Type field above */
318 enum acpi_apmt_node_type {
319 ACPI_APMT_NODE_TYPE_MC = 0x00,
320 ACPI_APMT_NODE_TYPE_SMMU = 0x01,
321 ACPI_APMT_NODE_TYPE_PCIE_ROOT = 0x02,
322 ACPI_APMT_NODE_TYPE_ACPI = 0x03,
323 ACPI_APMT_NODE_TYPE_CACHE = 0x04,
324 ACPI_APMT_NODE_TYPE_COUNT
327 /* Masks for ovflw_irq_flags field above */
329 #define ACPI_APMT_OVFLW_IRQ_FLAGS_MODE (1<<0)
330 #define ACPI_APMT_OVFLW_IRQ_FLAGS_TYPE (1<<1)
332 /* Values for ovflw_irq_flags mode field above */
334 #define ACPI_APMT_OVFLW_IRQ_FLAGS_MODE_LEVEL (0<<0)
335 #define ACPI_APMT_OVFLW_IRQ_FLAGS_MODE_EDGE (1<<0)
337 /* Values for ovflw_irq_flags type field above */
339 #define ACPI_APMT_OVFLW_IRQ_FLAGS_TYPE_WIRED (0<<1)
341 /*******************************************************************************
343 * BDAT - BIOS Data ACPI Table
345 * Conforms to "BIOS Data ACPI Table", Interface Specification v4.0 Draft 5
348 ******************************************************************************/
350 struct acpi_table_bdat {
351 struct acpi_table_header header;
352 struct acpi_generic_address gas;
355 /*******************************************************************************
357 * IORT - IO Remapping Table
359 * Conforms to "IO Remapping Table System Software on ARM Platforms",
360 * Document number: ARM DEN 0049E.d, Feb 2022
362 ******************************************************************************/
364 struct acpi_table_iort {
365 struct acpi_table_header header;
374 struct acpi_iort_node {
384 /* Values for subtable Type above */
386 enum acpi_iort_node_type {
387 ACPI_IORT_NODE_ITS_GROUP = 0x00,
388 ACPI_IORT_NODE_NAMED_COMPONENT = 0x01,
389 ACPI_IORT_NODE_PCI_ROOT_COMPLEX = 0x02,
390 ACPI_IORT_NODE_SMMU = 0x03,
391 ACPI_IORT_NODE_SMMU_V3 = 0x04,
392 ACPI_IORT_NODE_PMCG = 0x05,
393 ACPI_IORT_NODE_RMR = 0x06,
396 struct acpi_iort_id_mapping {
397 u32 input_base; /* Lowest value in input range */
398 u32 id_count; /* Number of IDs */
399 u32 output_base; /* Lowest value in output range */
400 u32 output_reference; /* A reference to the output node */
404 /* Masks for Flags field above for IORT subtable */
406 #define ACPI_IORT_ID_SINGLE_MAPPING (1)
408 struct acpi_iort_memory_access {
415 /* Values for cache_coherency field above */
417 #define ACPI_IORT_NODE_COHERENT 0x00000001 /* The device node is fully coherent */
418 #define ACPI_IORT_NODE_NOT_COHERENT 0x00000000 /* The device node is not coherent */
420 /* Masks for Hints field above */
422 #define ACPI_IORT_HT_TRANSIENT (1)
423 #define ACPI_IORT_HT_WRITE (1<<1)
424 #define ACPI_IORT_HT_READ (1<<2)
425 #define ACPI_IORT_HT_OVERRIDE (1<<3)
427 /* Masks for memory_flags field above */
429 #define ACPI_IORT_MF_COHERENCY (1)
430 #define ACPI_IORT_MF_ATTRIBUTES (1<<1)
433 * IORT node specific subtables
435 struct acpi_iort_its_group {
437 u32 identifiers[1]; /* GIC ITS identifier array */
440 struct acpi_iort_named_component {
442 u64 memory_properties; /* Memory access properties */
443 u8 memory_address_limit; /* Memory address size limit */
444 char device_name[1]; /* Path of namespace object */
447 /* Masks for Flags field above */
449 #define ACPI_IORT_NC_STALL_SUPPORTED (1)
450 #define ACPI_IORT_NC_PASID_BITS (31<<1)
452 struct acpi_iort_root_complex {
453 u64 memory_properties; /* Memory access properties */
455 u32 pci_segment_number;
456 u8 memory_address_limit; /* Memory address size limit */
457 u16 pasid_capabilities; /* PASID Capabilities */
458 u8 reserved[1]; /* Reserved, must be zero */
461 /* Masks for ats_attribute field above */
463 #define ACPI_IORT_ATS_SUPPORTED (1) /* The root complex ATS support */
464 #define ACPI_IORT_PRI_SUPPORTED (1<<1) /* The root complex PRI support */
465 #define ACPI_IORT_PASID_FWD_SUPPORTED (1<<2) /* The root complex PASID forward support */
467 /* Masks for pasid_capabilities field above */
468 #define ACPI_IORT_PASID_MAX_WIDTH (0x1F) /* Bits 0-4 */
470 struct acpi_iort_smmu {
471 u64 base_address; /* SMMU base address */
472 u64 span; /* Length of memory range */
475 u32 global_interrupt_offset;
476 u32 context_interrupt_count;
477 u32 context_interrupt_offset;
478 u32 pmu_interrupt_count;
479 u32 pmu_interrupt_offset;
480 u64 interrupts[1]; /* Interrupt array */
483 /* Values for Model field above */
485 #define ACPI_IORT_SMMU_V1 0x00000000 /* Generic SMMUv1 */
486 #define ACPI_IORT_SMMU_V2 0x00000001 /* Generic SMMUv2 */
487 #define ACPI_IORT_SMMU_CORELINK_MMU400 0x00000002 /* ARM Corelink MMU-400 */
488 #define ACPI_IORT_SMMU_CORELINK_MMU500 0x00000003 /* ARM Corelink MMU-500 */
489 #define ACPI_IORT_SMMU_CORELINK_MMU401 0x00000004 /* ARM Corelink MMU-401 */
490 #define ACPI_IORT_SMMU_CAVIUM_THUNDERX 0x00000005 /* Cavium thunder_x SMMUv2 */
492 /* Masks for Flags field above */
494 #define ACPI_IORT_SMMU_DVM_SUPPORTED (1)
495 #define ACPI_IORT_SMMU_COHERENT_WALK (1<<1)
497 /* Global interrupt format */
499 struct acpi_iort_smmu_gsi {
503 u32 nsg_cfg_irpt_flags;
506 struct acpi_iort_smmu_v3 {
507 u64 base_address; /* SMMUv3 base address */
517 u32 id_mapping_index;
520 /* Values for Model field above */
522 #define ACPI_IORT_SMMU_V3_GENERIC 0x00000000 /* Generic SMMUv3 */
523 #define ACPI_IORT_SMMU_V3_HISILICON_HI161X 0x00000001 /* hi_silicon Hi161x SMMUv3 */
524 #define ACPI_IORT_SMMU_V3_CAVIUM_CN99XX 0x00000002 /* Cavium CN99xx SMMUv3 */
526 /* Masks for Flags field above */
528 #define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1)
529 #define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (3<<1)
530 #define ACPI_IORT_SMMU_V3_PXM_VALID (1<<3)
532 struct acpi_iort_pmcg {
533 u64 page0_base_address;
536 u64 page1_base_address;
539 struct acpi_iort_rmr {
545 /* Masks for Flags field above */
546 #define ACPI_IORT_RMR_REMAP_PERMITTED (1)
547 #define ACPI_IORT_RMR_ACCESS_PRIVILEGE (1<<1)
550 * Macro to access the Access Attributes in flags field above:
551 * Access Attributes is encoded in bits 9:2
553 #define ACPI_IORT_RMR_ACCESS_ATTRIBUTES(flags) (((flags) >> 2) & 0xFF)
555 /* Values for above Access Attributes */
557 #define ACPI_IORT_RMR_ATTR_DEVICE_NGNRNE 0x00
558 #define ACPI_IORT_RMR_ATTR_DEVICE_NGNRE 0x01
559 #define ACPI_IORT_RMR_ATTR_DEVICE_NGRE 0x02
560 #define ACPI_IORT_RMR_ATTR_DEVICE_GRE 0x03
561 #define ACPI_IORT_RMR_ATTR_NORMAL_NC 0x04
562 #define ACPI_IORT_RMR_ATTR_NORMAL_IWB_OWB 0x05
564 struct acpi_iort_rmr_desc {
570 /*******************************************************************************
572 * IVRS - I/O Virtualization Reporting Structure
575 * Conforms to "AMD I/O Virtualization Technology (IOMMU) Specification",
576 * Revision 1.26, February 2009.
578 ******************************************************************************/
580 struct acpi_table_ivrs {
581 struct acpi_table_header header; /* Common ACPI table header */
582 u32 info; /* Common virtualization info */
586 /* Values for Info field above */
588 #define ACPI_IVRS_PHYSICAL_SIZE 0x00007F00 /* 7 bits, physical address size */
589 #define ACPI_IVRS_VIRTUAL_SIZE 0x003F8000 /* 7 bits, virtual address size */
590 #define ACPI_IVRS_ATS_RESERVED 0x00400000 /* ATS address translation range reserved */
592 /* IVRS subtable header */
594 struct acpi_ivrs_header {
595 u8 type; /* Subtable type */
597 u16 length; /* Subtable length */
598 u16 device_id; /* ID of IOMMU */
601 /* Values for subtable Type above */
603 enum acpi_ivrs_type {
604 ACPI_IVRS_TYPE_HARDWARE1 = 0x10,
605 ACPI_IVRS_TYPE_HARDWARE2 = 0x11,
606 ACPI_IVRS_TYPE_HARDWARE3 = 0x40,
607 ACPI_IVRS_TYPE_MEMORY1 = 0x20,
608 ACPI_IVRS_TYPE_MEMORY2 = 0x21,
609 ACPI_IVRS_TYPE_MEMORY3 = 0x22
612 /* Masks for Flags field above for IVHD subtable */
614 #define ACPI_IVHD_TT_ENABLE (1)
615 #define ACPI_IVHD_PASS_PW (1<<1)
616 #define ACPI_IVHD_RES_PASS_PW (1<<2)
617 #define ACPI_IVHD_ISOC (1<<3)
618 #define ACPI_IVHD_IOTLB (1<<4)
620 /* Masks for Flags field above for IVMD subtable */
622 #define ACPI_IVMD_UNITY (1)
623 #define ACPI_IVMD_READ (1<<1)
624 #define ACPI_IVMD_WRITE (1<<2)
625 #define ACPI_IVMD_EXCLUSION_RANGE (1<<3)
628 * IVRS subtables, correspond to Type in struct acpi_ivrs_header
631 /* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */
633 struct acpi_ivrs_hardware_10 {
634 struct acpi_ivrs_header header;
635 u16 capability_offset; /* Offset for IOMMU control fields */
636 u64 base_address; /* IOMMU control registers */
637 u16 pci_segment_group;
638 u16 info; /* MSI number and unit ID */
639 u32 feature_reporting;
642 /* 0x11: I/O Virtualization Hardware Definition Block (IVHD) */
644 struct acpi_ivrs_hardware_11 {
645 struct acpi_ivrs_header header;
646 u16 capability_offset; /* Offset for IOMMU control fields */
647 u64 base_address; /* IOMMU control registers */
648 u16 pci_segment_group;
649 u16 info; /* MSI number and unit ID */
651 u64 efr_register_image;
655 /* Masks for Info field above */
657 #define ACPI_IVHD_MSI_NUMBER_MASK 0x001F /* 5 bits, MSI message number */
658 #define ACPI_IVHD_UNIT_ID_MASK 0x1F00 /* 5 bits, unit_ID */
661 * Device Entries for IVHD subtable, appear after struct acpi_ivrs_hardware structure.
662 * Upper two bits of the Type field are the (encoded) length of the structure.
663 * Currently, only 4 and 8 byte entries are defined. 16 and 32 byte entries
664 * are reserved for future use but not defined.
666 struct acpi_ivrs_de_header {
672 /* Length of device entry is in the top two bits of Type field above */
674 #define ACPI_IVHD_ENTRY_LENGTH 0xC0
676 /* Values for device entry Type field above */
678 enum acpi_ivrs_device_entry_type {
679 /* 4-byte device entries, all use struct acpi_ivrs_device4 */
681 ACPI_IVRS_TYPE_PAD4 = 0,
682 ACPI_IVRS_TYPE_ALL = 1,
683 ACPI_IVRS_TYPE_SELECT = 2,
684 ACPI_IVRS_TYPE_START = 3,
685 ACPI_IVRS_TYPE_END = 4,
687 /* 8-byte device entries */
689 ACPI_IVRS_TYPE_PAD8 = 64,
690 ACPI_IVRS_TYPE_NOT_USED = 65,
691 ACPI_IVRS_TYPE_ALIAS_SELECT = 66, /* Uses struct acpi_ivrs_device8a */
692 ACPI_IVRS_TYPE_ALIAS_START = 67, /* Uses struct acpi_ivrs_device8a */
693 ACPI_IVRS_TYPE_EXT_SELECT = 70, /* Uses struct acpi_ivrs_device8b */
694 ACPI_IVRS_TYPE_EXT_START = 71, /* Uses struct acpi_ivrs_device8b */
695 ACPI_IVRS_TYPE_SPECIAL = 72, /* Uses struct acpi_ivrs_device8c */
697 /* Variable-length device entries */
699 ACPI_IVRS_TYPE_HID = 240 /* Uses ACPI_IVRS_DEVICE_HID */
702 /* Values for Data field above */
704 #define ACPI_IVHD_INIT_PASS (1)
705 #define ACPI_IVHD_EINT_PASS (1<<1)
706 #define ACPI_IVHD_NMI_PASS (1<<2)
707 #define ACPI_IVHD_SYSTEM_MGMT (3<<4)
708 #define ACPI_IVHD_LINT0_PASS (1<<6)
709 #define ACPI_IVHD_LINT1_PASS (1<<7)
711 /* Types 0-4: 4-byte device entry */
713 struct acpi_ivrs_device4 {
714 struct acpi_ivrs_de_header header;
717 /* Types 66-67: 8-byte device entry */
719 struct acpi_ivrs_device8a {
720 struct acpi_ivrs_de_header header;
726 /* Types 70-71: 8-byte device entry */
728 struct acpi_ivrs_device8b {
729 struct acpi_ivrs_de_header header;
733 /* Values for extended_data above */
735 #define ACPI_IVHD_ATS_DISABLED (1<<31)
737 /* Type 72: 8-byte device entry */
739 struct acpi_ivrs_device8c {
740 struct acpi_ivrs_de_header header;
746 /* Values for Variety field above */
748 #define ACPI_IVHD_IOAPIC 1
749 #define ACPI_IVHD_HPET 2
751 /* Type 240: variable-length device entry */
753 struct acpi_ivrs_device_hid {
754 struct acpi_ivrs_de_header header;
761 /* Values for uid_type above */
763 #define ACPI_IVRS_UID_NOT_PRESENT 0
764 #define ACPI_IVRS_UID_IS_INTEGER 1
765 #define ACPI_IVRS_UID_IS_STRING 2
767 /* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */
769 struct acpi_ivrs_memory {
770 struct acpi_ivrs_header header;
777 /*******************************************************************************
779 * LPIT - Low Power Idle Table
781 * Conforms to "ACPI Low Power Idle Table (LPIT)" July 2014.
783 ******************************************************************************/
785 struct acpi_table_lpit {
786 struct acpi_table_header header; /* Common ACPI table header */
789 /* LPIT subtable header */
791 struct acpi_lpit_header {
792 u32 type; /* Subtable type */
793 u32 length; /* Subtable length */
799 /* Values for subtable Type above */
801 enum acpi_lpit_type {
802 ACPI_LPIT_TYPE_NATIVE_CSTATE = 0x00,
803 ACPI_LPIT_TYPE_RESERVED = 0x01 /* 1 and above are reserved */
806 /* Masks for Flags field above */
808 #define ACPI_LPIT_STATE_DISABLED (1)
809 #define ACPI_LPIT_NO_COUNTER (1<<1)
812 * LPIT subtables, correspond to Type in struct acpi_lpit_header
815 /* 0x00: Native C-state instruction based LPI structure */
817 struct acpi_lpit_native {
818 struct acpi_lpit_header header;
819 struct acpi_generic_address entry_trigger;
822 struct acpi_generic_address residency_counter;
823 u64 counter_frequency;
826 /*******************************************************************************
828 * MADT - Multiple APIC Description Table
831 ******************************************************************************/
833 struct acpi_table_madt {
834 struct acpi_table_header header; /* Common ACPI table header */
835 u32 address; /* Physical address of local APIC */
839 /* Masks for Flags field above */
841 #define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */
843 /* Values for PCATCompat flag */
845 #define ACPI_MADT_DUAL_PIC 1
846 #define ACPI_MADT_MULTIPLE_APIC 0
848 /* Values for MADT subtable type in struct acpi_subtable_header */
850 enum acpi_madt_type {
851 ACPI_MADT_TYPE_LOCAL_APIC = 0,
852 ACPI_MADT_TYPE_IO_APIC = 1,
853 ACPI_MADT_TYPE_INTERRUPT_OVERRIDE = 2,
854 ACPI_MADT_TYPE_NMI_SOURCE = 3,
855 ACPI_MADT_TYPE_LOCAL_APIC_NMI = 4,
856 ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE = 5,
857 ACPI_MADT_TYPE_IO_SAPIC = 6,
858 ACPI_MADT_TYPE_LOCAL_SAPIC = 7,
859 ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8,
860 ACPI_MADT_TYPE_LOCAL_X2APIC = 9,
861 ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10,
862 ACPI_MADT_TYPE_GENERIC_INTERRUPT = 11,
863 ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR = 12,
864 ACPI_MADT_TYPE_GENERIC_MSI_FRAME = 13,
865 ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR = 14,
866 ACPI_MADT_TYPE_GENERIC_TRANSLATOR = 15,
867 ACPI_MADT_TYPE_MULTIPROC_WAKEUP = 16,
868 ACPI_MADT_TYPE_RESERVED = 17, /* 17 to 0x7F are reserved */
869 ACPI_MADT_TYPE_OEM_RESERVED = 0x80 /* 0x80 to 0xFF are reserved for OEM use */
873 * MADT Subtables, correspond to Type in struct acpi_subtable_header
876 /* 0: Processor Local APIC */
878 struct acpi_madt_local_apic {
879 struct acpi_subtable_header header;
880 u8 processor_id; /* ACPI processor id */
881 u8 id; /* Processor's local APIC id */
887 struct acpi_madt_io_apic {
888 struct acpi_subtable_header header;
889 u8 id; /* I/O APIC ID */
890 u8 reserved; /* reserved - must be zero */
891 u32 address; /* APIC physical address */
892 u32 global_irq_base; /* Global system interrupt where INTI lines start */
895 /* 2: Interrupt Override */
897 struct acpi_madt_interrupt_override {
898 struct acpi_subtable_header header;
899 u8 bus; /* 0 - ISA */
900 u8 source_irq; /* Interrupt source (IRQ) */
901 u32 global_irq; /* Global system interrupt */
907 struct acpi_madt_nmi_source {
908 struct acpi_subtable_header header;
910 u32 global_irq; /* Global system interrupt */
913 /* 4: Local APIC NMI */
915 struct acpi_madt_local_apic_nmi {
916 struct acpi_subtable_header header;
917 u8 processor_id; /* ACPI processor id */
919 u8 lint; /* LINTn to which NMI is connected */
922 /* 5: Address Override */
924 struct acpi_madt_local_apic_override {
925 struct acpi_subtable_header header;
926 u16 reserved; /* Reserved, must be zero */
927 u64 address; /* APIC physical address */
932 struct acpi_madt_io_sapic {
933 struct acpi_subtable_header header;
934 u8 id; /* I/O SAPIC ID */
935 u8 reserved; /* Reserved, must be zero */
936 u32 global_irq_base; /* Global interrupt for SAPIC start */
937 u64 address; /* SAPIC physical address */
942 struct acpi_madt_local_sapic {
943 struct acpi_subtable_header header;
944 u8 processor_id; /* ACPI processor id */
945 u8 id; /* SAPIC ID */
946 u8 eid; /* SAPIC EID */
947 u8 reserved[3]; /* Reserved, must be zero */
949 u32 uid; /* Numeric UID - ACPI 3.0 */
950 char uid_string[1]; /* String UID - ACPI 3.0 */
953 /* 8: Platform Interrupt Source */
955 struct acpi_madt_interrupt_source {
956 struct acpi_subtable_header header;
958 u8 type; /* 1=PMI, 2=INIT, 3=corrected */
959 u8 id; /* Processor ID */
960 u8 eid; /* Processor EID */
961 u8 io_sapic_vector; /* Vector value for PMI interrupts */
962 u32 global_irq; /* Global system interrupt */
963 u32 flags; /* Interrupt Source Flags */
966 /* Masks for Flags field above */
968 #define ACPI_MADT_CPEI_OVERRIDE (1)
970 /* 9: Processor Local X2APIC (ACPI 4.0) */
972 struct acpi_madt_local_x2apic {
973 struct acpi_subtable_header header;
974 u16 reserved; /* reserved - must be zero */
975 u32 local_apic_id; /* Processor x2APIC ID */
977 u32 uid; /* ACPI processor UID */
980 /* 10: Local X2APIC NMI (ACPI 4.0) */
982 struct acpi_madt_local_x2apic_nmi {
983 struct acpi_subtable_header header;
985 u32 uid; /* ACPI processor UID */
986 u8 lint; /* LINTn to which NMI is connected */
987 u8 reserved[3]; /* reserved - must be zero */
990 /* 11: Generic interrupt - GICC (ACPI 5.0 + ACPI 6.0 + ACPI 6.3 changes) */
992 struct acpi_madt_generic_interrupt {
993 struct acpi_subtable_header header;
994 u16 reserved; /* reserved - must be zero */
995 u32 cpu_interface_number;
999 u32 performance_interrupt;
1002 u64 gicv_base_address;
1003 u64 gich_base_address;
1005 u64 gicr_base_address;
1007 u8 efficiency_class;
1009 u16 spe_interrupt; /* ACPI 6.3 */
1012 /* Masks for Flags field above */
1014 /* ACPI_MADT_ENABLED (1) Processor is usable if set */
1015 #define ACPI_MADT_PERFORMANCE_IRQ_MODE (1<<1) /* 01: Performance Interrupt Mode */
1016 #define ACPI_MADT_VGIC_IRQ_MODE (1<<2) /* 02: VGIC Maintenance Interrupt mode */
1018 /* 12: Generic Distributor (ACPI 5.0 + ACPI 6.0 changes) */
1020 struct acpi_madt_generic_distributor {
1021 struct acpi_subtable_header header;
1022 u16 reserved; /* reserved - must be zero */
1025 u32 global_irq_base;
1027 u8 reserved2[3]; /* reserved - must be zero */
1030 /* Values for Version field above */
1032 enum acpi_madt_gic_version {
1033 ACPI_MADT_GIC_VERSION_NONE = 0,
1034 ACPI_MADT_GIC_VERSION_V1 = 1,
1035 ACPI_MADT_GIC_VERSION_V2 = 2,
1036 ACPI_MADT_GIC_VERSION_V3 = 3,
1037 ACPI_MADT_GIC_VERSION_V4 = 4,
1038 ACPI_MADT_GIC_VERSION_RESERVED = 5 /* 5 and greater are reserved */
1041 /* 13: Generic MSI Frame (ACPI 5.1) */
1043 struct acpi_madt_generic_msi_frame {
1044 struct acpi_subtable_header header;
1045 u16 reserved; /* reserved - must be zero */
1053 /* Masks for Flags field above */
1055 #define ACPI_MADT_OVERRIDE_SPI_VALUES (1)
1057 /* 14: Generic Redistributor (ACPI 5.1) */
1059 struct acpi_madt_generic_redistributor {
1060 struct acpi_subtable_header header;
1061 u16 reserved; /* reserved - must be zero */
1066 /* 15: Generic Translator (ACPI 6.0) */
1068 struct acpi_madt_generic_translator {
1069 struct acpi_subtable_header header;
1070 u16 reserved; /* reserved - must be zero */
1076 /* 16: Multiprocessor wakeup (ACPI 6.4) */
1078 struct acpi_madt_multiproc_wakeup {
1079 struct acpi_subtable_header header;
1080 u16 mailbox_version;
1081 u32 reserved; /* reserved - must be zero */
1085 #define ACPI_MULTIPROC_WAKEUP_MB_OS_SIZE 2032
1086 #define ACPI_MULTIPROC_WAKEUP_MB_FIRMWARE_SIZE 2048
1088 struct acpi_madt_multiproc_wakeup_mailbox {
1090 u16 reserved; /* reserved - must be zero */
1093 u8 reserved_os[ACPI_MULTIPROC_WAKEUP_MB_OS_SIZE]; /* reserved for OS use */
1094 u8 reserved_firmware[ACPI_MULTIPROC_WAKEUP_MB_FIRMWARE_SIZE]; /* reserved for firmware use */
1097 #define ACPI_MP_WAKE_COMMAND_WAKEUP 1
1101 struct acpi_madt_oem_data {
1106 * Common flags fields for MADT subtables
1109 /* MADT Local APIC flags */
1111 #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */
1112 #define ACPI_MADT_ONLINE_CAPABLE (2) /* 01: System HW supports enabling processor at runtime */
1114 /* MADT MPS INTI flags (inti_flags) */
1116 #define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */
1117 #define ACPI_MADT_TRIGGER_MASK (3<<2) /* 02-03: Trigger mode of APIC input signals */
1119 /* Values for MPS INTI flags */
1121 #define ACPI_MADT_POLARITY_CONFORMS 0
1122 #define ACPI_MADT_POLARITY_ACTIVE_HIGH 1
1123 #define ACPI_MADT_POLARITY_RESERVED 2
1124 #define ACPI_MADT_POLARITY_ACTIVE_LOW 3
1126 #define ACPI_MADT_TRIGGER_CONFORMS (0)
1127 #define ACPI_MADT_TRIGGER_EDGE (1<<2)
1128 #define ACPI_MADT_TRIGGER_RESERVED (2<<2)
1129 #define ACPI_MADT_TRIGGER_LEVEL (3<<2)
1131 /*******************************************************************************
1133 * MCFG - PCI Memory Mapped Configuration table and subtable
1136 * Conforms to "PCI Firmware Specification", Revision 3.0, June 20, 2005
1138 ******************************************************************************/
1140 struct acpi_table_mcfg {
1141 struct acpi_table_header header; /* Common ACPI table header */
1147 struct acpi_mcfg_allocation {
1148 u64 address; /* Base address, processor-relative */
1149 u16 pci_segment; /* PCI segment group number */
1150 u8 start_bus_number; /* Starting PCI Bus number */
1151 u8 end_bus_number; /* Final PCI Bus number */
1155 /*******************************************************************************
1157 * MCHI - Management Controller Host Interface Table
1160 * Conforms to "Management Component Transport Protocol (MCTP) Host
1161 * Interface Specification", Revision 1.0.0a, October 13, 2009
1163 ******************************************************************************/
1165 struct acpi_table_mchi {
1166 struct acpi_table_header header; /* Common ACPI table header */
1173 u32 global_interrupt;
1174 struct acpi_generic_address control_register;
1181 /*******************************************************************************
1183 * MPST - Memory Power State Table (ACPI 5.0)
1186 ******************************************************************************/
1188 #define ACPI_MPST_CHANNEL_INFO \
1191 u16 power_node_count; \
1196 struct acpi_table_mpst {
1197 struct acpi_table_header header; /* Common ACPI table header */
1198 ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */
1201 /* Memory Platform Communication Channel Info */
1203 struct acpi_mpst_channel {
1204 ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */
1207 /* Memory Power Node Structure */
1209 struct acpi_mpst_power_node {
1216 u32 num_power_states;
1217 u32 num_physical_components;
1220 /* Values for Flags field above */
1222 #define ACPI_MPST_ENABLED 1
1223 #define ACPI_MPST_POWER_MANAGED 2
1224 #define ACPI_MPST_HOT_PLUG_CAPABLE 4
1226 /* Memory Power State Structure (follows POWER_NODE above) */
1228 struct acpi_mpst_power_state {
1233 /* Physical Component ID Structure (follows POWER_STATE above) */
1235 struct acpi_mpst_component {
1239 /* Memory Power State Characteristics Structure (follows all POWER_NODEs) */
1241 struct acpi_mpst_data_hdr {
1242 u16 characteristics_count;
1246 struct acpi_mpst_power_data {
1256 /* Values for Flags field above */
1258 #define ACPI_MPST_PRESERVE 1
1259 #define ACPI_MPST_AUTOENTRY 2
1260 #define ACPI_MPST_AUTOEXIT 4
1262 /* Shared Memory Region (not part of an ACPI table) */
1264 struct acpi_mpst_shared {
1268 u32 command_register;
1269 u32 status_register;
1272 u64 energy_consumed;
1276 /*******************************************************************************
1278 * MSCT - Maximum System Characteristics Table (ACPI 4.0)
1281 ******************************************************************************/
1283 struct acpi_table_msct {
1284 struct acpi_table_header header; /* Common ACPI table header */
1285 u32 proximity_offset; /* Location of proximity info struct(s) */
1286 u32 max_proximity_domains; /* Max number of proximity domains */
1287 u32 max_clock_domains; /* Max number of clock domains */
1288 u64 max_address; /* Max physical address in system */
1291 /* subtable - Maximum Proximity Domain Information. Version 1 */
1293 struct acpi_msct_proximity {
1296 u32 range_start; /* Start of domain range */
1297 u32 range_end; /* End of domain range */
1298 u32 processor_capacity;
1299 u64 memory_capacity; /* In bytes */
1302 /*******************************************************************************
1304 * MSDM - Microsoft Data Management table
1306 * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
1307 * November 29, 2011. Copyright 2011 Microsoft
1309 ******************************************************************************/
1311 /* Basic MSDM table is only the common ACPI header */
1313 struct acpi_table_msdm {
1314 struct acpi_table_header header; /* Common ACPI table header */
1317 /*******************************************************************************
1319 * NFIT - NVDIMM Interface Table (ACPI 6.0+)
1322 ******************************************************************************/
1324 struct acpi_table_nfit {
1325 struct acpi_table_header header; /* Common ACPI table header */
1326 u32 reserved; /* Reserved, must be zero */
1329 /* Subtable header for NFIT */
1331 struct acpi_nfit_header {
1336 /* Values for subtable type in struct acpi_nfit_header */
1338 enum acpi_nfit_type {
1339 ACPI_NFIT_TYPE_SYSTEM_ADDRESS = 0,
1340 ACPI_NFIT_TYPE_MEMORY_MAP = 1,
1341 ACPI_NFIT_TYPE_INTERLEAVE = 2,
1342 ACPI_NFIT_TYPE_SMBIOS = 3,
1343 ACPI_NFIT_TYPE_CONTROL_REGION = 4,
1344 ACPI_NFIT_TYPE_DATA_REGION = 5,
1345 ACPI_NFIT_TYPE_FLUSH_ADDRESS = 6,
1346 ACPI_NFIT_TYPE_CAPABILITIES = 7,
1347 ACPI_NFIT_TYPE_RESERVED = 8 /* 8 and greater are reserved */
1354 /* 0: System Physical Address Range Structure */
1356 struct acpi_nfit_system_address {
1357 struct acpi_nfit_header header;
1360 u32 reserved; /* Reserved, must be zero */
1361 u32 proximity_domain;
1366 u64 location_cookie; /* ACPI 6.4 */
1371 #define ACPI_NFIT_ADD_ONLINE_ONLY (1) /* 00: Add/Online Operation Only */
1372 #define ACPI_NFIT_PROXIMITY_VALID (1<<1) /* 01: Proximity Domain Valid */
1373 #define ACPI_NFIT_LOCATION_COOKIE_VALID (1<<2) /* 02: SPA location cookie valid (ACPI 6.4) */
1375 /* Range Type GUIDs appear in the include/acuuid.h file */
1377 /* 1: Memory Device to System Address Range Map Structure */
1379 struct acpi_nfit_memory_map {
1380 struct acpi_nfit_header header;
1389 u16 interleave_index;
1390 u16 interleave_ways;
1392 u16 reserved; /* Reserved, must be zero */
1397 #define ACPI_NFIT_MEM_SAVE_FAILED (1) /* 00: Last SAVE to Memory Device failed */
1398 #define ACPI_NFIT_MEM_RESTORE_FAILED (1<<1) /* 01: Last RESTORE from Memory Device failed */
1399 #define ACPI_NFIT_MEM_FLUSH_FAILED (1<<2) /* 02: Platform flush failed */
1400 #define ACPI_NFIT_MEM_NOT_ARMED (1<<3) /* 03: Memory Device is not armed */
1401 #define ACPI_NFIT_MEM_HEALTH_OBSERVED (1<<4) /* 04: Memory Device observed SMART/health events */
1402 #define ACPI_NFIT_MEM_HEALTH_ENABLED (1<<5) /* 05: SMART/health events enabled */
1403 #define ACPI_NFIT_MEM_MAP_FAILED (1<<6) /* 06: Mapping to SPA failed */
1405 /* 2: Interleave Structure */
1407 struct acpi_nfit_interleave {
1408 struct acpi_nfit_header header;
1409 u16 interleave_index;
1410 u16 reserved; /* Reserved, must be zero */
1413 u32 line_offset[1]; /* Variable length */
1416 /* 3: SMBIOS Management Information Structure */
1418 struct acpi_nfit_smbios {
1419 struct acpi_nfit_header header;
1420 u32 reserved; /* Reserved, must be zero */
1421 u8 data[1]; /* Variable length */
1424 /* 4: NVDIMM Control Region Structure */
1426 struct acpi_nfit_control_region {
1427 struct acpi_nfit_header header;
1432 u16 subsystem_vendor_id;
1433 u16 subsystem_device_id;
1434 u16 subsystem_revision_id;
1436 u8 manufacturing_location;
1437 u16 manufacturing_date;
1438 u8 reserved[2]; /* Reserved, must be zero */
1448 u8 reserved1[6]; /* Reserved, must be zero */
1453 #define ACPI_NFIT_CONTROL_BUFFERED (1) /* Block Data Windows implementation is buffered */
1455 /* valid_fields bits */
1457 #define ACPI_NFIT_CONTROL_MFG_INFO_VALID (1) /* Manufacturing fields are valid */
1459 /* 5: NVDIMM Block Data Window Region Structure */
1461 struct acpi_nfit_data_region {
1462 struct acpi_nfit_header header;
1471 /* 6: Flush Hint Address Structure */
1473 struct acpi_nfit_flush_address {
1474 struct acpi_nfit_header header;
1477 u8 reserved[6]; /* Reserved, must be zero */
1478 u64 hint_address[1]; /* Variable length */
1481 /* 7: Platform Capabilities Structure */
1483 struct acpi_nfit_capabilities {
1484 struct acpi_nfit_header header;
1485 u8 highest_capability;
1486 u8 reserved[3]; /* Reserved, must be zero */
1491 /* Capabilities Flags */
1493 #define ACPI_NFIT_CAPABILITY_CACHE_FLUSH (1) /* 00: Cache Flush to NVDIMM capable */
1494 #define ACPI_NFIT_CAPABILITY_MEM_FLUSH (1<<1) /* 01: Memory Flush to NVDIMM capable */
1495 #define ACPI_NFIT_CAPABILITY_MEM_MIRRORING (1<<2) /* 02: Memory Mirroring capable */
1498 * NFIT/DVDIMM device handle support - used as the _ADR for each NVDIMM
1500 struct nfit_device_handle {
1504 /* Device handle construction and extraction macros */
1506 #define ACPI_NFIT_DIMM_NUMBER_MASK 0x0000000F
1507 #define ACPI_NFIT_CHANNEL_NUMBER_MASK 0x000000F0
1508 #define ACPI_NFIT_MEMORY_ID_MASK 0x00000F00
1509 #define ACPI_NFIT_SOCKET_ID_MASK 0x0000F000
1510 #define ACPI_NFIT_NODE_ID_MASK 0x0FFF0000
1512 #define ACPI_NFIT_DIMM_NUMBER_OFFSET 0
1513 #define ACPI_NFIT_CHANNEL_NUMBER_OFFSET 4
1514 #define ACPI_NFIT_MEMORY_ID_OFFSET 8
1515 #define ACPI_NFIT_SOCKET_ID_OFFSET 12
1516 #define ACPI_NFIT_NODE_ID_OFFSET 16
1518 /* Macro to construct a NFIT/NVDIMM device handle */
1520 #define ACPI_NFIT_BUILD_DEVICE_HANDLE(dimm, channel, memory, socket, node) \
1522 ((channel) << ACPI_NFIT_CHANNEL_NUMBER_OFFSET) | \
1523 ((memory) << ACPI_NFIT_MEMORY_ID_OFFSET) | \
1524 ((socket) << ACPI_NFIT_SOCKET_ID_OFFSET) | \
1525 ((node) << ACPI_NFIT_NODE_ID_OFFSET))
1527 /* Macros to extract individual fields from a NFIT/NVDIMM device handle */
1529 #define ACPI_NFIT_GET_DIMM_NUMBER(handle) \
1530 ((handle) & ACPI_NFIT_DIMM_NUMBER_MASK)
1532 #define ACPI_NFIT_GET_CHANNEL_NUMBER(handle) \
1533 (((handle) & ACPI_NFIT_CHANNEL_NUMBER_MASK) >> ACPI_NFIT_CHANNEL_NUMBER_OFFSET)
1535 #define ACPI_NFIT_GET_MEMORY_ID(handle) \
1536 (((handle) & ACPI_NFIT_MEMORY_ID_MASK) >> ACPI_NFIT_MEMORY_ID_OFFSET)
1538 #define ACPI_NFIT_GET_SOCKET_ID(handle) \
1539 (((handle) & ACPI_NFIT_SOCKET_ID_MASK) >> ACPI_NFIT_SOCKET_ID_OFFSET)
1541 #define ACPI_NFIT_GET_NODE_ID(handle) \
1542 (((handle) & ACPI_NFIT_NODE_ID_MASK) >> ACPI_NFIT_NODE_ID_OFFSET)
1544 /*******************************************************************************
1546 * NHLT - Non HD Audio Link Table
1548 * Conforms to: Intel Smart Sound Technology NHLT Specification
1549 * Version 0.8.1, January 2020.
1551 ******************************************************************************/
1555 struct acpi_table_nhlt {
1556 struct acpi_table_header header; /* Common ACPI table header */
1560 struct acpi_nhlt_endpoint {
1561 u32 descriptor_length;
1573 /* Types for link_type field above */
1575 #define ACPI_NHLT_RESERVED_HD_AUDIO 0
1576 #define ACPI_NHLT_RESERVED_DSP 1
1577 #define ACPI_NHLT_PDM 2
1578 #define ACPI_NHLT_SSP 3
1579 #define ACPI_NHLT_RESERVED_SLIMBUS 4
1580 #define ACPI_NHLT_RESERVED_SOUNDWIRE 5
1581 #define ACPI_NHLT_TYPE_RESERVED 6 /* 6 and above are reserved */
1583 /* All other values above are reserved */
1585 /* Values for device_id field above */
1587 #define ACPI_NHLT_PDM_DMIC 0xAE20
1588 #define ACPI_NHLT_BT_SIDEBAND 0xAE30
1589 #define ACPI_NHLT_I2S_TDM_CODECS 0xAE23
1591 /* Values for device_type field above */
1595 #define ACPI_NHLT_LINK_BT_SIDEBAND 0
1596 #define ACPI_NHLT_LINK_FM 1
1597 #define ACPI_NHLT_LINK_MODEM 2
1599 #define ACPI_NHLT_LINK_SSP_ANALOG_CODEC 4
1603 #define ACPI_NHLT_PDM_ON_CAVS_1P8 0
1604 #define ACPI_NHLT_PDM_ON_CAVS_1P5 1
1606 /* Values for Direction field above */
1608 #define ACPI_NHLT_DIR_RENDER 0
1609 #define ACPI_NHLT_DIR_CAPTURE 1
1610 #define ACPI_NHLT_DIR_RENDER_LOOPBACK 2
1611 #define ACPI_NHLT_DIR_RENDER_FEEDBACK 3
1612 #define ACPI_NHLT_DIR_RESERVED 4 /* 4 and above are reserved */
1614 struct acpi_nhlt_device_specific_config {
1615 u32 capabilities_size;
1620 struct acpi_nhlt_device_specific_config_a {
1621 u32 capabilities_size;
1627 /* Values for Config Type above */
1629 #define ACPI_NHLT_CONFIG_TYPE_GENERIC 0x00
1630 #define ACPI_NHLT_CONFIG_TYPE_MIC_ARRAY 0x01
1631 #define ACPI_NHLT_CONFIG_TYPE_RENDER_FEEDBACK 0x03
1632 #define ACPI_NHLT_CONFIG_TYPE_RESERVED 0x04 /* 4 and above are reserved */
1634 struct acpi_nhlt_device_specific_config_b {
1635 u32 capabilities_size;
1638 struct acpi_nhlt_device_specific_config_c {
1639 u32 capabilities_size;
1643 struct acpi_nhlt_render_device_specific_config {
1644 u32 capabilities_size;
1648 struct acpi_nhlt_wave_extensible {
1651 u32 samples_per_sec;
1652 u32 avg_bytes_per_sec;
1654 u16 bits_per_sample;
1655 u16 extra_format_size;
1656 u16 valid_bits_per_sample;
1658 u8 sub_format_guid[16];
1661 /* Values for channel_mask above */
1663 #define ACPI_NHLT_SPKR_FRONT_LEFT 0x1
1664 #define ACPI_NHLT_SPKR_FRONT_RIGHT 0x2
1665 #define ACPI_NHLT_SPKR_FRONT_CENTER 0x4
1666 #define ACPI_NHLT_SPKR_LOW_FREQ 0x8
1667 #define ACPI_NHLT_SPKR_BACK_LEFT 0x10
1668 #define ACPI_NHLT_SPKR_BACK_RIGHT 0x20
1669 #define ACPI_NHLT_SPKR_FRONT_LEFT_OF_CENTER 0x40
1670 #define ACPI_NHLT_SPKR_FRONT_RIGHT_OF_CENTER 0x80
1671 #define ACPI_NHLT_SPKR_BACK_CENTER 0x100
1672 #define ACPI_NHLT_SPKR_SIDE_LEFT 0x200
1673 #define ACPI_NHLT_SPKR_SIDE_RIGHT 0x400
1674 #define ACPI_NHLT_SPKR_TOP_CENTER 0x800
1675 #define ACPI_NHLT_SPKR_TOP_FRONT_LEFT 0x1000
1676 #define ACPI_NHLT_SPKR_TOP_FRONT_CENTER 0x2000
1677 #define ACPI_NHLT_SPKR_TOP_FRONT_RIGHT 0x4000
1678 #define ACPI_NHLT_SPKR_TOP_BACK_LEFT 0x8000
1679 #define ACPI_NHLT_SPKR_TOP_BACK_CENTER 0x10000
1680 #define ACPI_NHLT_SPKR_TOP_BACK_RIGHT 0x20000
1682 struct acpi_nhlt_format_config {
1683 struct acpi_nhlt_wave_extensible format;
1684 u32 capability_size;
1688 struct acpi_nhlt_formats_config {
1692 struct acpi_nhlt_device_specific_hdr {
1697 /* Types for config_type above */
1699 #define ACPI_NHLT_GENERIC 0
1700 #define ACPI_NHLT_MIC 1
1701 #define ACPI_NHLT_RENDER 3
1703 struct acpi_nhlt_mic_device_specific_config {
1704 struct acpi_nhlt_device_specific_hdr device_config;
1708 /* Values for array_type_ext above */
1710 #define ACPI_NHLT_ARRAY_TYPE_RESERVED 0x09 /* 9 and below are reserved */
1711 #define ACPI_NHLT_SMALL_LINEAR_2ELEMENT 0x0A
1712 #define ACPI_NHLT_BIG_LINEAR_2ELEMENT 0x0B
1713 #define ACPI_NHLT_FIRST_GEOMETRY_LINEAR_4ELEMENT 0x0C
1714 #define ACPI_NHLT_PLANAR_LSHAPED_4ELEMENT 0x0D
1715 #define ACPI_NHLT_SECOND_GEOMETRY_LINEAR_4ELEMENT 0x0E
1716 #define ACPI_NHLT_VENDOR_DEFINED 0x0F
1717 #define ACPI_NHLT_ARRAY_TYPE_MASK 0x0F
1718 #define ACPI_NHLT_ARRAY_TYPE_EXT_MASK 0x10
1720 #define ACPI_NHLT_NO_EXTENSION 0x0
1721 #define ACPI_NHLT_MIC_SNR_SENSITIVITY_EXT (1<<4)
1723 struct acpi_nhlt_vendor_mic_count {
1724 u8 microphone_count;
1727 struct acpi_nhlt_vendor_mic_config {
1730 u16 speaker_position_distance; /* mm */
1731 u16 horizontal_offset; /* mm */
1732 u16 vertical_offset; /* mm */
1733 u8 frequency_low_band; /* 5*Hz */
1734 u8 frequency_high_band; /* 500*Hz */
1735 u16 direction_angle; /* -180 - + 180 */
1736 u16 elevation_angle; /* -180 - + 180 */
1737 u16 work_vertical_angle_begin; /* -180 - + 180 with 2 deg step */
1738 u16 work_vertical_angle_end; /* -180 - + 180 with 2 deg step */
1739 u16 work_horizontal_angle_begin; /* -180 - + 180 with 2 deg step */
1740 u16 work_horizontal_angle_end; /* -180 - + 180 with 2 deg step */
1743 /* Values for Type field above */
1745 #define ACPI_NHLT_MIC_OMNIDIRECTIONAL 0
1746 #define ACPI_NHLT_MIC_SUBCARDIOID 1
1747 #define ACPI_NHLT_MIC_CARDIOID 2
1748 #define ACPI_NHLT_MIC_SUPER_CARDIOID 3
1749 #define ACPI_NHLT_MIC_HYPER_CARDIOID 4
1750 #define ACPI_NHLT_MIC_8_SHAPED 5
1751 #define ACPI_NHLT_MIC_RESERVED6 6 /* 6 is reserved */
1752 #define ACPI_NHLT_MIC_VENDOR_DEFINED 7
1753 #define ACPI_NHLT_MIC_RESERVED 8 /* 8 and above are reserved */
1755 /* Values for Panel field above */
1757 #define ACPI_NHLT_MIC_POSITION_TOP 0
1758 #define ACPI_NHLT_MIC_POSITION_BOTTOM 1
1759 #define ACPI_NHLT_MIC_POSITION_LEFT 2
1760 #define ACPI_NHLT_MIC_POSITION_RIGHT 3
1761 #define ACPI_NHLT_MIC_POSITION_FRONT 4
1762 #define ACPI_NHLT_MIC_POSITION_BACK 5
1763 #define ACPI_NHLT_MIC_POSITION_RESERVED 6 /* 6 and above are reserved */
1765 struct acpi_nhlt_vendor_mic_device_specific_config {
1766 struct acpi_nhlt_mic_device_specific_config mic_array_device_config;
1767 u8 number_of_microphones;
1768 struct acpi_nhlt_vendor_mic_config mic_config[]; /* Indexed by number_of_microphones */
1771 /* Microphone SNR and Sensitivity extension */
1773 struct acpi_nhlt_mic_snr_sensitivity_extension {
1778 /* Render device with feedback */
1780 struct acpi_nhlt_render_feedback_device_specific_config {
1781 u8 feedback_virtual_slot; /* Render slot in case of capture */
1782 u16 feedback_channels; /* Informative only */
1783 u16 feedback_valid_bits_per_sample;
1786 /* Non documented structures */
1788 struct acpi_nhlt_device_info_count {
1792 struct acpi_nhlt_device_info {
1794 u8 device_instance_id;
1798 /*******************************************************************************
1800 * PCCT - Platform Communications Channel Table (ACPI 5.0)
1801 * Version 2 (ACPI 6.2)
1803 ******************************************************************************/
1805 struct acpi_table_pcct {
1806 struct acpi_table_header header; /* Common ACPI table header */
1811 /* Values for Flags field above */
1813 #define ACPI_PCCT_DOORBELL 1
1815 /* Values for subtable type in struct acpi_subtable_header */
1817 enum acpi_pcct_type {
1818 ACPI_PCCT_TYPE_GENERIC_SUBSPACE = 0,
1819 ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE = 1,
1820 ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 = 2, /* ACPI 6.1 */
1821 ACPI_PCCT_TYPE_EXT_PCC_MASTER_SUBSPACE = 3, /* ACPI 6.2 */
1822 ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE = 4, /* ACPI 6.2 */
1823 ACPI_PCCT_TYPE_HW_REG_COMM_SUBSPACE = 5, /* ACPI 6.4 */
1824 ACPI_PCCT_TYPE_RESERVED = 6 /* 6 and greater are reserved */
1828 * PCCT Subtables, correspond to Type in struct acpi_subtable_header
1831 /* 0: Generic Communications Subspace */
1833 struct acpi_pcct_subspace {
1834 struct acpi_subtable_header header;
1838 struct acpi_generic_address doorbell_register;
1842 u32 max_access_rate;
1843 u16 min_turnaround_time;
1846 /* 1: HW-reduced Communications Subspace (ACPI 5.1) */
1848 struct acpi_pcct_hw_reduced {
1849 struct acpi_subtable_header header;
1850 u32 platform_interrupt;
1855 struct acpi_generic_address doorbell_register;
1859 u32 max_access_rate;
1860 u16 min_turnaround_time;
1863 /* 2: HW-reduced Communications Subspace Type 2 (ACPI 6.1) */
1865 struct acpi_pcct_hw_reduced_type2 {
1866 struct acpi_subtable_header header;
1867 u32 platform_interrupt;
1872 struct acpi_generic_address doorbell_register;
1876 u32 max_access_rate;
1877 u16 min_turnaround_time;
1878 struct acpi_generic_address platform_ack_register;
1879 u64 ack_preserve_mask;
1883 /* 3: Extended PCC Master Subspace Type 3 (ACPI 6.2) */
1885 struct acpi_pcct_ext_pcc_master {
1886 struct acpi_subtable_header header;
1887 u32 platform_interrupt;
1892 struct acpi_generic_address doorbell_register;
1896 u32 max_access_rate;
1897 u32 min_turnaround_time;
1898 struct acpi_generic_address platform_ack_register;
1899 u64 ack_preserve_mask;
1902 struct acpi_generic_address cmd_complete_register;
1903 u64 cmd_complete_mask;
1904 struct acpi_generic_address cmd_update_register;
1905 u64 cmd_update_preserve_mask;
1906 u64 cmd_update_set_mask;
1907 struct acpi_generic_address error_status_register;
1908 u64 error_status_mask;
1911 /* 4: Extended PCC Slave Subspace Type 4 (ACPI 6.2) */
1913 struct acpi_pcct_ext_pcc_slave {
1914 struct acpi_subtable_header header;
1915 u32 platform_interrupt;
1920 struct acpi_generic_address doorbell_register;
1924 u32 max_access_rate;
1925 u32 min_turnaround_time;
1926 struct acpi_generic_address platform_ack_register;
1927 u64 ack_preserve_mask;
1930 struct acpi_generic_address cmd_complete_register;
1931 u64 cmd_complete_mask;
1932 struct acpi_generic_address cmd_update_register;
1933 u64 cmd_update_preserve_mask;
1934 u64 cmd_update_set_mask;
1935 struct acpi_generic_address error_status_register;
1936 u64 error_status_mask;
1939 /* 5: HW Registers based Communications Subspace */
1941 struct acpi_pcct_hw_reg {
1942 struct acpi_subtable_header header;
1946 struct acpi_generic_address doorbell_register;
1947 u64 doorbell_preserve;
1949 struct acpi_generic_address cmd_complete_register;
1950 u64 cmd_complete_mask;
1951 struct acpi_generic_address error_status_register;
1952 u64 error_status_mask;
1953 u32 nominal_latency;
1954 u32 min_turnaround_time;
1957 /* Values for doorbell flags above */
1959 #define ACPI_PCCT_INTERRUPT_POLARITY (1)
1960 #define ACPI_PCCT_INTERRUPT_MODE (1<<1)
1963 * PCC memory structures (not part of the ACPI table)
1966 /* Shared Memory Region */
1968 struct acpi_pcct_shared_memory {
1974 /* Extended PCC Subspace Shared Memory Region (ACPI 6.2) */
1976 struct acpi_pcct_ext_pcc_shared_memory {
1983 /*******************************************************************************
1985 * PDTT - Platform Debug Trigger Table (ACPI 6.2)
1988 ******************************************************************************/
1990 struct acpi_table_pdtt {
1991 struct acpi_table_header header; /* Common ACPI table header */
1998 * PDTT Communication Channel Identifier Structure.
1999 * The number of these structures is defined by trigger_count above,
2000 * starting at array_offset.
2002 struct acpi_pdtt_channel {
2007 /* Flags for above */
2009 #define ACPI_PDTT_RUNTIME_TRIGGER (1)
2010 #define ACPI_PDTT_WAIT_COMPLETION (1<<1)
2011 #define ACPI_PDTT_TRIGGER_ORDER (1<<2)
2013 /*******************************************************************************
2015 * PHAT - Platform Health Assessment Table (ACPI 6.4)
2018 ******************************************************************************/
2020 struct acpi_table_phat {
2021 struct acpi_table_header header; /* Common ACPI table header */
2024 /* Common header for PHAT subtables that follow main table */
2026 struct acpi_phat_header {
2032 /* Values for Type field above */
2034 #define ACPI_PHAT_TYPE_FW_VERSION_DATA 0
2035 #define ACPI_PHAT_TYPE_FW_HEALTH_DATA 1
2036 #define ACPI_PHAT_TYPE_RESERVED 2 /* 0x02-0xFFFF are reserved */
2039 * PHAT subtables, correspond to Type in struct acpi_phat_header
2042 /* 0: Firmware Version Data Record */
2044 struct acpi_phat_version_data {
2045 struct acpi_phat_header header;
2050 struct acpi_phat_version_element {
2056 /* 1: Firmware Health Data Record */
2058 struct acpi_phat_health_data {
2059 struct acpi_phat_header header;
2063 u32 device_specific_offset; /* Zero if no Device-specific data */
2066 /* Values for Health field above */
2068 #define ACPI_PHAT_ERRORS_FOUND 0
2069 #define ACPI_PHAT_NO_ERRORS 1
2070 #define ACPI_PHAT_UNKNOWN_ERRORS 2
2071 #define ACPI_PHAT_ADVISORY 3
2073 /*******************************************************************************
2075 * PMTT - Platform Memory Topology Table (ACPI 5.0)
2078 ******************************************************************************/
2080 struct acpi_table_pmtt {
2081 struct acpi_table_header header; /* Common ACPI table header */
2082 u32 memory_device_count;
2084 * Immediately followed by:
2085 * MEMORY_DEVICE memory_device_struct[memory_device_count];
2089 /* Common header for PMTT subtables that follow main table */
2091 struct acpi_pmtt_header {
2097 u32 memory_device_count; /* Zero means no memory device structs follow */
2099 * Immediately followed by:
2100 * u8 type_specific_data[]
2101 * MEMORY_DEVICE memory_device_struct[memory_device_count];
2105 /* Values for Type field above */
2107 #define ACPI_PMTT_TYPE_SOCKET 0
2108 #define ACPI_PMTT_TYPE_CONTROLLER 1
2109 #define ACPI_PMTT_TYPE_DIMM 2
2110 #define ACPI_PMTT_TYPE_RESERVED 3 /* 0x03-0xFE are reserved */
2111 #define ACPI_PMTT_TYPE_VENDOR 0xFF
2113 /* Values for Flags field above */
2115 #define ACPI_PMTT_TOP_LEVEL 0x0001
2116 #define ACPI_PMTT_PHYSICAL 0x0002
2117 #define ACPI_PMTT_MEMORY_TYPE 0x000C
2120 * PMTT subtables, correspond to Type in struct acpi_pmtt_header
2123 /* 0: Socket Structure */
2125 struct acpi_pmtt_socket {
2126 struct acpi_pmtt_header header;
2131 * Immediately followed by:
2132 * MEMORY_DEVICE memory_device_struct[memory_device_count];
2135 /* 1: Memory Controller subtable */
2137 struct acpi_pmtt_controller {
2138 struct acpi_pmtt_header header;
2143 * Immediately followed by:
2144 * MEMORY_DEVICE memory_device_struct[memory_device_count];
2147 /* 2: Physical Component Identifier (DIMM) */
2149 struct acpi_pmtt_physical_component {
2150 struct acpi_pmtt_header header;
2154 /* 0xFF: Vendor Specific Data */
2156 struct acpi_pmtt_vendor_specific {
2157 struct acpi_pmtt_header header;
2161 * Immediately followed by:
2162 * u8 vendor_specific_data[];
2163 * MEMORY_DEVICE memory_device_struct[memory_device_count];
2167 /*******************************************************************************
2169 * PPTT - Processor Properties Topology Table (ACPI 6.2)
2172 ******************************************************************************/
2174 struct acpi_table_pptt {
2175 struct acpi_table_header header; /* Common ACPI table header */
2178 /* Values for Type field above */
2180 enum acpi_pptt_type {
2181 ACPI_PPTT_TYPE_PROCESSOR = 0,
2182 ACPI_PPTT_TYPE_CACHE = 1,
2183 ACPI_PPTT_TYPE_ID = 2,
2184 ACPI_PPTT_TYPE_RESERVED = 3
2187 /* 0: Processor Hierarchy Node Structure */
2189 struct acpi_pptt_processor {
2190 struct acpi_subtable_header header;
2194 u32 acpi_processor_id;
2195 u32 number_of_priv_resources;
2200 #define ACPI_PPTT_PHYSICAL_PACKAGE (1)
2201 #define ACPI_PPTT_ACPI_PROCESSOR_ID_VALID (1<<1)
2202 #define ACPI_PPTT_ACPI_PROCESSOR_IS_THREAD (1<<2) /* ACPI 6.3 */
2203 #define ACPI_PPTT_ACPI_LEAF_NODE (1<<3) /* ACPI 6.3 */
2204 #define ACPI_PPTT_ACPI_IDENTICAL (1<<4) /* ACPI 6.3 */
2206 /* 1: Cache Type Structure */
2208 struct acpi_pptt_cache {
2209 struct acpi_subtable_header header;
2212 u32 next_level_of_cache;
2220 /* 1: Cache Type Structure for PPTT version 3 */
2222 struct acpi_pptt_cache_v1 {
2228 #define ACPI_PPTT_SIZE_PROPERTY_VALID (1) /* Physical property valid */
2229 #define ACPI_PPTT_NUMBER_OF_SETS_VALID (1<<1) /* Number of sets valid */
2230 #define ACPI_PPTT_ASSOCIATIVITY_VALID (1<<2) /* Associativity valid */
2231 #define ACPI_PPTT_ALLOCATION_TYPE_VALID (1<<3) /* Allocation type valid */
2232 #define ACPI_PPTT_CACHE_TYPE_VALID (1<<4) /* Cache type valid */
2233 #define ACPI_PPTT_WRITE_POLICY_VALID (1<<5) /* Write policy valid */
2234 #define ACPI_PPTT_LINE_SIZE_VALID (1<<6) /* Line size valid */
2235 #define ACPI_PPTT_CACHE_ID_VALID (1<<7) /* Cache ID valid */
2237 /* Masks for Attributes */
2239 #define ACPI_PPTT_MASK_ALLOCATION_TYPE (0x03) /* Allocation type */
2240 #define ACPI_PPTT_MASK_CACHE_TYPE (0x0C) /* Cache type */
2241 #define ACPI_PPTT_MASK_WRITE_POLICY (0x10) /* Write policy */
2243 /* Attributes describing cache */
2244 #define ACPI_PPTT_CACHE_READ_ALLOCATE (0x0) /* Cache line is allocated on read */
2245 #define ACPI_PPTT_CACHE_WRITE_ALLOCATE (0x01) /* Cache line is allocated on write */
2246 #define ACPI_PPTT_CACHE_RW_ALLOCATE (0x02) /* Cache line is allocated on read and write */
2247 #define ACPI_PPTT_CACHE_RW_ALLOCATE_ALT (0x03) /* Alternate representation of above */
2249 #define ACPI_PPTT_CACHE_TYPE_DATA (0x0) /* Data cache */
2250 #define ACPI_PPTT_CACHE_TYPE_INSTR (1<<2) /* Instruction cache */
2251 #define ACPI_PPTT_CACHE_TYPE_UNIFIED (2<<2) /* Unified I & D cache */
2252 #define ACPI_PPTT_CACHE_TYPE_UNIFIED_ALT (3<<2) /* Alternate representation of above */
2254 #define ACPI_PPTT_CACHE_POLICY_WB (0x0) /* Cache is write back */
2255 #define ACPI_PPTT_CACHE_POLICY_WT (1<<4) /* Cache is write through */
2257 /* 2: ID Structure */
2259 struct acpi_pptt_id {
2260 struct acpi_subtable_header header;
2270 /*******************************************************************************
2272 * PRMT - Platform Runtime Mechanism Table
2275 ******************************************************************************/
2277 struct acpi_table_prmt {
2278 struct acpi_table_header header; /* Common ACPI table header */
2281 struct acpi_table_prmt_header {
2282 u8 platform_guid[16];
2283 u32 module_info_offset;
2284 u32 module_info_count;
2287 struct acpi_prmt_module_header {
2292 struct acpi_prmt_module_info {
2298 u16 handler_info_count;
2299 u32 handler_info_offset;
2300 u64 mmio_list_pointer;
2303 struct acpi_prmt_handler_info {
2306 u8 handler_guid[16];
2307 u64 handler_address;
2308 u64 static_data_buffer_address;
2309 u64 acpi_param_buffer_address;
2312 /*******************************************************************************
2314 * RASF - RAS Feature Table (ACPI 5.0)
2317 ******************************************************************************/
2319 struct acpi_table_rasf {
2320 struct acpi_table_header header; /* Common ACPI table header */
2324 /* RASF Platform Communication Channel Shared Memory Region */
2326 struct acpi_rasf_shared_memory {
2331 u8 capabilities[16];
2332 u8 set_capabilities[16];
2333 u16 num_parameter_blocks;
2334 u32 set_capabilities_status;
2337 /* RASF Parameter Block Structure Header */
2339 struct acpi_rasf_parameter_block {
2345 /* RASF Parameter Block Structure for PATROL_SCRUB */
2347 struct acpi_rasf_patrol_scrub_parameter {
2348 struct acpi_rasf_parameter_block header;
2349 u16 patrol_scrub_command;
2350 u64 requested_address_range[2];
2351 u64 actual_address_range[2];
2356 /* Masks for Flags and Speed fields above */
2358 #define ACPI_RASF_SCRUBBER_RUNNING 1
2359 #define ACPI_RASF_SPEED (7<<1)
2360 #define ACPI_RASF_SPEED_SLOW (0<<1)
2361 #define ACPI_RASF_SPEED_MEDIUM (4<<1)
2362 #define ACPI_RASF_SPEED_FAST (7<<1)
2364 /* Channel Commands */
2366 enum acpi_rasf_commands {
2367 ACPI_RASF_EXECUTE_RASF_COMMAND = 1
2370 /* Platform RAS Capabilities */
2372 enum acpi_rasf_capabiliities {
2373 ACPI_HW_PATROL_SCRUB_SUPPORTED = 0,
2374 ACPI_SW_PATROL_SCRUB_EXPOSED = 1
2377 /* Patrol Scrub Commands */
2379 enum acpi_rasf_patrol_scrub_commands {
2380 ACPI_RASF_GET_PATROL_PARAMETERS = 1,
2381 ACPI_RASF_START_PATROL_SCRUBBER = 2,
2382 ACPI_RASF_STOP_PATROL_SCRUBBER = 3
2385 /* Channel Command flags */
2387 #define ACPI_RASF_GENERATE_SCI (1<<15)
2391 enum acpi_rasf_status {
2392 ACPI_RASF_SUCCESS = 0,
2393 ACPI_RASF_NOT_VALID = 1,
2394 ACPI_RASF_NOT_SUPPORTED = 2,
2396 ACPI_RASF_FAILED = 4,
2397 ACPI_RASF_ABORTED = 5,
2398 ACPI_RASF_INVALID_DATA = 6
2403 #define ACPI_RASF_COMMAND_COMPLETE (1)
2404 #define ACPI_RASF_SCI_DOORBELL (1<<1)
2405 #define ACPI_RASF_ERROR (1<<2)
2406 #define ACPI_RASF_STATUS (0x1F<<3)
2408 /*******************************************************************************
2410 * RGRT - Regulatory Graphics Resource Table
2413 * Conforms to "ACPI RGRT" available at:
2414 * https://microsoft.github.io/mu/dyn/mu_plus/ms_core_pkg/acpi_RGRT/feature_acpi_rgrt/
2416 ******************************************************************************/
2418 struct acpi_table_rgrt {
2419 struct acpi_table_header header; /* Common ACPI table header */
2426 /* image_type values */
2428 enum acpi_rgrt_image_type {
2429 ACPI_RGRT_TYPE_RESERVED0 = 0,
2430 ACPI_RGRT_IMAGE_TYPE_PNG = 1,
2431 ACPI_RGRT_TYPE_RESERVED = 2 /* 2 and greater are reserved */
2434 /*******************************************************************************
2436 * SBST - Smart Battery Specification Table
2439 ******************************************************************************/
2441 struct acpi_table_sbst {
2442 struct acpi_table_header header; /* Common ACPI table header */
2448 /*******************************************************************************
2450 * SDEI - Software Delegated Exception Interface Descriptor Table
2452 * Conforms to "Software Delegated Exception Interface (SDEI)" ARM DEN0054A,
2453 * May 8th, 2017. Copyright 2017 ARM Ltd.
2455 ******************************************************************************/
2457 struct acpi_table_sdei {
2458 struct acpi_table_header header; /* Common ACPI table header */
2461 /*******************************************************************************
2463 * SDEV - Secure Devices Table (ACPI 6.2)
2466 ******************************************************************************/
2468 struct acpi_table_sdev {
2469 struct acpi_table_header header; /* Common ACPI table header */
2472 struct acpi_sdev_header {
2478 /* Values for subtable type above */
2480 enum acpi_sdev_type {
2481 ACPI_SDEV_TYPE_NAMESPACE_DEVICE = 0,
2482 ACPI_SDEV_TYPE_PCIE_ENDPOINT_DEVICE = 1,
2483 ACPI_SDEV_TYPE_RESERVED = 2 /* 2 and greater are reserved */
2486 /* Values for flags above */
2488 #define ACPI_SDEV_HANDOFF_TO_UNSECURE_OS (1)
2489 #define ACPI_SDEV_SECURE_COMPONENTS_PRESENT (1<<1)
2495 /* 0: Namespace Device Based Secure Device Structure */
2497 struct acpi_sdev_namespace {
2498 struct acpi_sdev_header header;
2499 u16 device_id_offset;
2500 u16 device_id_length;
2501 u16 vendor_data_offset;
2502 u16 vendor_data_length;
2505 struct acpi_sdev_secure_component {
2506 u16 secure_component_offset;
2507 u16 secure_component_length;
2511 * SDEV sub-subtables ("Components") for above
2513 struct acpi_sdev_component {
2514 struct acpi_sdev_header header;
2517 /* Values for sub-subtable type above */
2519 enum acpi_sac_type {
2520 ACPI_SDEV_TYPE_ID_COMPONENT = 0,
2521 ACPI_SDEV_TYPE_MEM_COMPONENT = 1
2524 struct acpi_sdev_id_component {
2525 struct acpi_sdev_header header;
2526 u16 hardware_id_offset;
2527 u16 hardware_id_length;
2528 u16 subsystem_id_offset;
2529 u16 subsystem_id_length;
2530 u16 hardware_revision;
2531 u8 hardware_rev_present;
2532 u8 class_code_present;
2535 u8 pci_programming_xface;
2538 struct acpi_sdev_mem_component {
2539 struct acpi_sdev_header header;
2541 u64 memory_base_address;
2545 /* 1: PCIe Endpoint Device Based Device Structure */
2547 struct acpi_sdev_pcie {
2548 struct acpi_sdev_header header;
2553 u16 vendor_data_offset;
2554 u16 vendor_data_length;
2557 /* 1a: PCIe Endpoint path entry */
2559 struct acpi_sdev_pcie_path {
2564 /*******************************************************************************
2566 * SVKL - Storage Volume Key Location Table (ACPI 6.4)
2567 * From: "Guest-Host-Communication Interface (GHCI) for Intel
2568 * Trust Domain Extensions (Intel TDX)".
2571 ******************************************************************************/
2573 struct acpi_table_svkl {
2574 struct acpi_table_header header; /* Common ACPI table header */
2578 struct acpi_svkl_key {
2585 enum acpi_svkl_type {
2586 ACPI_SVKL_TYPE_MAIN_STORAGE = 0,
2587 ACPI_SVKL_TYPE_RESERVED = 1 /* 1 and greater are reserved */
2590 enum acpi_svkl_format {
2591 ACPI_SVKL_FORMAT_RAW_BINARY = 0,
2592 ACPI_SVKL_FORMAT_RESERVED = 1 /* 1 and greater are reserved */
2595 /*******************************************************************************
2597 * TDEL - TD-Event Log
2598 * From: "Guest-Host-Communication Interface (GHCI) for Intel
2599 * Trust Domain Extensions (Intel TDX)".
2602 ******************************************************************************/
2604 struct acpi_table_tdel {
2605 struct acpi_table_header header; /* Common ACPI table header */
2607 u64 log_area_minimum_length;
2608 u64 log_area_start_address;
2611 /* Reset to default packing */
2615 #endif /* __ACTBL2_H__ */