195857638SErik Schmauss /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */ 2a8357b0cSBob Moore /****************************************************************************** 3a8357b0cSBob Moore * 45cf4d733SBob Moore * Name: actbl2.h - ACPI Table Definitions (tables not in ACPI spec) 5a8357b0cSBob Moore * 6487ea80aSBob Moore * Copyright (C) 2000 - 2022, Intel Corp. 7a8357b0cSBob Moore * 895857638SErik Schmauss *****************************************************************************/ 9a8357b0cSBob Moore 10b24aad44SBob Moore #ifndef __ACTBL2_H__ 11b24aad44SBob Moore #define __ACTBL2_H__ 12b24aad44SBob Moore 13b24aad44SBob Moore /******************************************************************************* 14b24aad44SBob Moore * 15b24aad44SBob Moore * Additional ACPI Tables (2) 16b24aad44SBob Moore * 17b24aad44SBob Moore * These tables are not consumed directly by the ACPICA subsystem, but are 18b24aad44SBob Moore * included here to support device drivers and the AML disassembler. 19b24aad44SBob Moore * 20b24aad44SBob Moore ******************************************************************************/ 21b24aad44SBob Moore 22b24aad44SBob Moore /* 236e2d5ebdSBob Moore * Values for description table header signatures for tables defined in this 246e2d5ebdSBob Moore * file. Useful because they make it more difficult to inadvertently type in 256e2d5ebdSBob Moore * the wrong signature. 26b24aad44SBob Moore */ 275579649eSIlkka Koskinen #define ACPI_SIG_AGDI "AGDI" /* Arm Generic Diagnostic Dump and Reset Device Interface */ 28*1c5d62f5SBesar Wicaksono #define ACPI_SIG_APMT "APMT" /* Arm Performance Monitoring Unit table */ 299401eafaSBob Moore #define ACPI_SIG_BDAT "BDAT" /* BIOS Data ACPI Table */ 30874f6a72SLv Zheng #define ACPI_SIG_IORT "IORT" /* IO Remapping Table */ 316e2d5ebdSBob Moore #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */ 32d36d4e30SBob Moore #define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */ 33e62f8227SErik Schmauss #define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */ 34b24aad44SBob Moore #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ 350e264f0bSBob Moore #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */ 36e62f8227SErik Schmauss #define ACPI_SIG_MPST "MPST" /* Memory Power State Table */ 37e62f8227SErik Schmauss #define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table */ 385132f2faSBob Moore #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */ 39e62f8227SErik Schmauss #define ACPI_SIG_NFIT "NFIT" /* NVDIMM Firmware Interface Table */ 40a805aab8SBob Moore #define ACPI_SIG_NHLT "NHLT" /* Non HD Audio Link Table */ 41e62f8227SErik Schmauss #define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */ 42e62f8227SErik Schmauss #define ACPI_SIG_PDTT "PDTT" /* Platform Debug Trigger Table */ 439f400337SErik Kaneda #define ACPI_SIG_PHAT "PHAT" /* Platform Health Assessment Table */ 44e62f8227SErik Schmauss #define ACPI_SIG_PMTT "PMTT" /* Platform Memory Topology Table */ 45e62f8227SErik Schmauss #define ACPI_SIG_PPTT "PPTT" /* Processor Properties Topology Table */ 46d71df85aSErik Kaneda #define ACPI_SIG_PRMT "PRMT" /* Platform Runtime Mechanism Table */ 47e62f8227SErik Schmauss #define ACPI_SIG_RASF "RASF" /* RAS Feature table */ 48536e35c9SBob Moore #define ACPI_SIG_RGRT "RGRT" /* Regulatory Graphics Resource Table */ 49e62f8227SErik Schmauss #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */ 503bd38469SJames Morse #define ACPI_SIG_SDEI "SDEI" /* Software Delegated Exception Interface Table */ 51e62f8227SErik Schmauss #define ACPI_SIG_SDEV "SDEV" /* Secure Devices table */ 528288f69eSKuppuswamy Sathyanarayanan #define ACPI_SIG_SVKL "SVKL" /* Storage Volume Key Location Table */ 532de6bb92SBob Moore #define ACPI_SIG_TDEL "TDEL" /* TD Event Log Table */ 544461cf54SBob Moore 55b24aad44SBob Moore /* 56b24aad44SBob Moore * All tables must be byte-packed to match the ACPI specification, since 57b24aad44SBob Moore * the tables are provided by the system BIOS. 58b24aad44SBob Moore */ 59b24aad44SBob Moore #pragma pack(1) 60b24aad44SBob Moore 61b24aad44SBob Moore /* 62be030a57SBob Moore * Note: C bitfields are not used for this reason: 63be030a57SBob Moore * 64be030a57SBob Moore * "Bitfields are great and easy to read, but unfortunately the C language 65be030a57SBob Moore * does not specify the layout of bitfields in memory, which means they are 66be030a57SBob Moore * essentially useless for dealing with packed data in on-disk formats or 67be030a57SBob Moore * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me, 68be030a57SBob Moore * this decision was a design error in C. Ritchie could have picked an order 69be030a57SBob Moore * and stuck with it." Norman Ramsey. 70be030a57SBob Moore * See http://stackoverflow.com/a/1053662/41661 71b24aad44SBob Moore */ 72b24aad44SBob Moore 73b24aad44SBob Moore /******************************************************************************* 74b24aad44SBob Moore * 75e692fa13SBob Moore * AEST - Arm Error Source Table 76e692fa13SBob Moore * 77e692fa13SBob Moore * Conforms to: ACPI for the Armv8 RAS Extensions 1.1 Platform Design Document 78e692fa13SBob Moore * September 2020. 79e692fa13SBob Moore * 80e692fa13SBob Moore ******************************************************************************/ 81e692fa13SBob Moore 82e692fa13SBob Moore struct acpi_table_aest { 83e692fa13SBob Moore struct acpi_table_header header; 84e692fa13SBob Moore void *node_array[]; 85e692fa13SBob Moore }; 86e692fa13SBob Moore 87e692fa13SBob Moore /* Common Subtable header - one per Node Structure (Subtable) */ 88e692fa13SBob Moore 89e692fa13SBob Moore struct acpi_aest_hdr { 90e692fa13SBob Moore u8 type; 91e692fa13SBob Moore u16 length; 92e692fa13SBob Moore u8 reserved; 93e692fa13SBob Moore u32 node_specific_offset; 94e692fa13SBob Moore u32 node_interface_offset; 95e692fa13SBob Moore u32 node_interrupt_offset; 96e692fa13SBob Moore u32 node_interrupt_count; 97e692fa13SBob Moore u64 timestamp_rate; 98e692fa13SBob Moore u64 reserved1; 99e692fa13SBob Moore u64 error_injection_rate; 100e692fa13SBob Moore }; 101e692fa13SBob Moore 102e692fa13SBob Moore /* Values for Type above */ 103e692fa13SBob Moore 104e692fa13SBob Moore #define ACPI_AEST_PROCESSOR_ERROR_NODE 0 105e692fa13SBob Moore #define ACPI_AEST_MEMORY_ERROR_NODE 1 106e692fa13SBob Moore #define ACPI_AEST_SMMU_ERROR_NODE 2 107e692fa13SBob Moore #define ACPI_AEST_VENDOR_ERROR_NODE 3 108e692fa13SBob Moore #define ACPI_AEST_GIC_ERROR_NODE 4 109e692fa13SBob Moore #define ACPI_AEST_NODE_TYPE_RESERVED 5 /* 5 and above are reserved */ 110e692fa13SBob Moore 111e692fa13SBob Moore /* 112e692fa13SBob Moore * AEST subtables (Error nodes) 113e692fa13SBob Moore */ 114e692fa13SBob Moore 115e692fa13SBob Moore /* 0: Processor Error */ 116e692fa13SBob Moore 117e692fa13SBob Moore typedef struct acpi_aest_processor { 118e692fa13SBob Moore u32 processor_id; 119e692fa13SBob Moore u8 resource_type; 120e692fa13SBob Moore u8 reserved; 121e692fa13SBob Moore u8 flags; 122e692fa13SBob Moore u8 revision; 123e692fa13SBob Moore u64 processor_affinity; 124e692fa13SBob Moore 125e692fa13SBob Moore } acpi_aest_processor; 126e692fa13SBob Moore 127e692fa13SBob Moore /* Values for resource_type above, related structs below */ 128e692fa13SBob Moore 129e692fa13SBob Moore #define ACPI_AEST_CACHE_RESOURCE 0 130e692fa13SBob Moore #define ACPI_AEST_TLB_RESOURCE 1 131e692fa13SBob Moore #define ACPI_AEST_GENERIC_RESOURCE 2 132e692fa13SBob Moore #define ACPI_AEST_RESOURCE_RESERVED 3 /* 3 and above are reserved */ 133e692fa13SBob Moore 134e692fa13SBob Moore /* 0R: Processor Cache Resource Substructure */ 135e692fa13SBob Moore 136e692fa13SBob Moore typedef struct acpi_aest_processor_cache { 137e692fa13SBob Moore u32 cache_reference; 138e692fa13SBob Moore u32 reserved; 139e692fa13SBob Moore 140e692fa13SBob Moore } acpi_aest_processor_cache; 141e692fa13SBob Moore 142e692fa13SBob Moore /* Values for cache_type above */ 143e692fa13SBob Moore 144e692fa13SBob Moore #define ACPI_AEST_CACHE_DATA 0 145e692fa13SBob Moore #define ACPI_AEST_CACHE_INSTRUCTION 1 146e692fa13SBob Moore #define ACPI_AEST_CACHE_UNIFIED 2 147e692fa13SBob Moore #define ACPI_AEST_CACHE_RESERVED 3 /* 3 and above are reserved */ 148e692fa13SBob Moore 149e692fa13SBob Moore /* 1R: Processor TLB Resource Substructure */ 150e692fa13SBob Moore 151e692fa13SBob Moore typedef struct acpi_aest_processor_tlb { 152e692fa13SBob Moore u32 tlb_level; 153e692fa13SBob Moore u32 reserved; 154e692fa13SBob Moore 155e692fa13SBob Moore } acpi_aest_processor_tlb; 156e692fa13SBob Moore 157e692fa13SBob Moore /* 2R: Processor Generic Resource Substructure */ 158e692fa13SBob Moore 159e692fa13SBob Moore typedef struct acpi_aest_processor_generic { 16000395b74SShuuichirou Ishii u32 resource; 161e692fa13SBob Moore 162e692fa13SBob Moore } acpi_aest_processor_generic; 163e692fa13SBob Moore 164e692fa13SBob Moore /* 1: Memory Error */ 165e692fa13SBob Moore 166e692fa13SBob Moore typedef struct acpi_aest_memory { 167e692fa13SBob Moore u32 srat_proximity_domain; 168e692fa13SBob Moore 169e692fa13SBob Moore } acpi_aest_memory; 170e692fa13SBob Moore 171e692fa13SBob Moore /* 2: Smmu Error */ 172e692fa13SBob Moore 173e692fa13SBob Moore typedef struct acpi_aest_smmu { 174e692fa13SBob Moore u32 iort_node_reference; 175e692fa13SBob Moore u32 subcomponent_reference; 176e692fa13SBob Moore 177e692fa13SBob Moore } acpi_aest_smmu; 178e692fa13SBob Moore 179e692fa13SBob Moore /* 3: Vendor Defined */ 180e692fa13SBob Moore 181e692fa13SBob Moore typedef struct acpi_aest_vendor { 182e692fa13SBob Moore u32 acpi_hid; 183e692fa13SBob Moore u32 acpi_uid; 184e692fa13SBob Moore u8 vendor_specific_data[16]; 185e692fa13SBob Moore 186e692fa13SBob Moore } acpi_aest_vendor; 187e692fa13SBob Moore 188e692fa13SBob Moore /* 4: Gic Error */ 189e692fa13SBob Moore 190e692fa13SBob Moore typedef struct acpi_aest_gic { 191e692fa13SBob Moore u32 interface_type; 192e692fa13SBob Moore u32 instance_id; 193e692fa13SBob Moore 194e692fa13SBob Moore } acpi_aest_gic; 195e692fa13SBob Moore 196e692fa13SBob Moore /* Values for interface_type above */ 197e692fa13SBob Moore 198e692fa13SBob Moore #define ACPI_AEST_GIC_CPU 0 199e692fa13SBob Moore #define ACPI_AEST_GIC_DISTRIBUTOR 1 200e692fa13SBob Moore #define ACPI_AEST_GIC_REDISTRIBUTOR 2 201e692fa13SBob Moore #define ACPI_AEST_GIC_ITS 3 202e692fa13SBob Moore #define ACPI_AEST_GIC_RESERVED 4 /* 4 and above are reserved */ 203e692fa13SBob Moore 204e692fa13SBob Moore /* Node Interface Structure */ 205e692fa13SBob Moore 206e692fa13SBob Moore typedef struct acpi_aest_node_interface { 207e692fa13SBob Moore u8 type; 208e692fa13SBob Moore u8 reserved[3]; 209e692fa13SBob Moore u32 flags; 210e692fa13SBob Moore u64 address; 211e692fa13SBob Moore u32 error_record_index; 212e692fa13SBob Moore u32 error_record_count; 213e692fa13SBob Moore u64 error_record_implemented; 214e692fa13SBob Moore u64 error_status_reporting; 215e692fa13SBob Moore u64 addressing_mode; 216e692fa13SBob Moore 217e692fa13SBob Moore } acpi_aest_node_interface; 218e692fa13SBob Moore 219e692fa13SBob Moore /* Values for Type field above */ 220e692fa13SBob Moore 221e692fa13SBob Moore #define ACPI_AEST_NODE_SYSTEM_REGISTER 0 222e692fa13SBob Moore #define ACPI_AEST_NODE_MEMORY_MAPPED 1 223e692fa13SBob Moore #define ACPI_AEST_XFACE_RESERVED 2 /* 2 and above are reserved */ 224e692fa13SBob Moore 225e692fa13SBob Moore /* Node Interrupt Structure */ 226e692fa13SBob Moore 227e692fa13SBob Moore typedef struct acpi_aest_node_interrupt { 228e692fa13SBob Moore u8 type; 229e692fa13SBob Moore u8 reserved[2]; 230e692fa13SBob Moore u8 flags; 231e692fa13SBob Moore u32 gsiv; 232e692fa13SBob Moore u8 iort_id; 233e692fa13SBob Moore u8 reserved1[3]; 234e692fa13SBob Moore 235e692fa13SBob Moore } acpi_aest_node_interrupt; 236e692fa13SBob Moore 237e692fa13SBob Moore /* Values for Type field above */ 238e692fa13SBob Moore 239e692fa13SBob Moore #define ACPI_AEST_NODE_FAULT_HANDLING 0 240e692fa13SBob Moore #define ACPI_AEST_NODE_ERROR_RECOVERY 1 241e692fa13SBob Moore #define ACPI_AEST_XRUPT_RESERVED 2 /* 2 and above are reserved */ 242e692fa13SBob Moore 243e692fa13SBob Moore /******************************************************************************* 2445579649eSIlkka Koskinen * AGDI - Arm Generic Diagnostic Dump and Reset Device Interface 2455579649eSIlkka Koskinen * 2465579649eSIlkka Koskinen * Conforms to "ACPI for Arm Components 1.1, Platform Design Document" 2475579649eSIlkka Koskinen * ARM DEN0093 v1.1 2485579649eSIlkka Koskinen * 2495579649eSIlkka Koskinen ******************************************************************************/ 2505579649eSIlkka Koskinen struct acpi_table_agdi { 2515579649eSIlkka Koskinen struct acpi_table_header header; /* Common ACPI table header */ 2525579649eSIlkka Koskinen u8 flags; 2535579649eSIlkka Koskinen u8 reserved[3]; 2545579649eSIlkka Koskinen u32 sdei_event; 2555579649eSIlkka Koskinen u32 gsiv; 2565579649eSIlkka Koskinen }; 2575579649eSIlkka Koskinen 2585579649eSIlkka Koskinen /* Mask for Flags field above */ 2595579649eSIlkka Koskinen 2605579649eSIlkka Koskinen #define ACPI_AGDI_SIGNALING_MODE (1) 2615579649eSIlkka Koskinen 2625579649eSIlkka Koskinen /******************************************************************************* 263e692fa13SBob Moore * 264*1c5d62f5SBesar Wicaksono * APMT - ARM Performance Monitoring Unit Table 265*1c5d62f5SBesar Wicaksono * 266*1c5d62f5SBesar Wicaksono * Conforms to: 267*1c5d62f5SBesar Wicaksono * ARM Performance Monitoring Unit Architecture 1.0 Platform Design Document 268*1c5d62f5SBesar Wicaksono * ARM DEN0117 v1.0 November 25, 2021 269*1c5d62f5SBesar Wicaksono * 270*1c5d62f5SBesar Wicaksono ******************************************************************************/ 271*1c5d62f5SBesar Wicaksono 272*1c5d62f5SBesar Wicaksono struct acpi_table_apmt { 273*1c5d62f5SBesar Wicaksono struct acpi_table_header header; /* Common ACPI table header */ 274*1c5d62f5SBesar Wicaksono }; 275*1c5d62f5SBesar Wicaksono 276*1c5d62f5SBesar Wicaksono #define ACPI_APMT_NODE_ID_LENGTH 4 277*1c5d62f5SBesar Wicaksono 278*1c5d62f5SBesar Wicaksono /* 279*1c5d62f5SBesar Wicaksono * APMT subtables 280*1c5d62f5SBesar Wicaksono */ 281*1c5d62f5SBesar Wicaksono struct acpi_apmt_node { 282*1c5d62f5SBesar Wicaksono u16 length; 283*1c5d62f5SBesar Wicaksono u8 flags; 284*1c5d62f5SBesar Wicaksono u8 type; 285*1c5d62f5SBesar Wicaksono u32 id; 286*1c5d62f5SBesar Wicaksono u64 inst_primary; 287*1c5d62f5SBesar Wicaksono u32 inst_secondary; 288*1c5d62f5SBesar Wicaksono u64 base_address0; 289*1c5d62f5SBesar Wicaksono u64 base_address1; 290*1c5d62f5SBesar Wicaksono u32 ovflw_irq; 291*1c5d62f5SBesar Wicaksono u32 reserved; 292*1c5d62f5SBesar Wicaksono u32 ovflw_irq_flags; 293*1c5d62f5SBesar Wicaksono u32 proc_affinity; 294*1c5d62f5SBesar Wicaksono u32 impl_id; 295*1c5d62f5SBesar Wicaksono }; 296*1c5d62f5SBesar Wicaksono 297*1c5d62f5SBesar Wicaksono /* Masks for Flags field above */ 298*1c5d62f5SBesar Wicaksono 299*1c5d62f5SBesar Wicaksono #define ACPI_APMT_FLAGS_DUAL_PAGE (1<<0) 300*1c5d62f5SBesar Wicaksono #define ACPI_APMT_FLAGS_AFFINITY (1<<1) 301*1c5d62f5SBesar Wicaksono #define ACPI_APMT_FLAGS_ATOMIC (1<<2) 302*1c5d62f5SBesar Wicaksono 303*1c5d62f5SBesar Wicaksono /* Values for Flags dual page field above */ 304*1c5d62f5SBesar Wicaksono 305*1c5d62f5SBesar Wicaksono #define ACPI_APMT_FLAGS_DUAL_PAGE_NSUPP (0<<0) 306*1c5d62f5SBesar Wicaksono #define ACPI_APMT_FLAGS_DUAL_PAGE_SUPP (1<<0) 307*1c5d62f5SBesar Wicaksono 308*1c5d62f5SBesar Wicaksono /* Values for Flags processor affinity field above */ 309*1c5d62f5SBesar Wicaksono #define ACPI_APMT_FLAGS_AFFINITY_PROC (0<<1) 310*1c5d62f5SBesar Wicaksono #define ACPI_APMT_FLAGS_AFFINITY_PROC_CONTAINER (1<<1) 311*1c5d62f5SBesar Wicaksono 312*1c5d62f5SBesar Wicaksono /* Values for Flags 64-bit atomic field above */ 313*1c5d62f5SBesar Wicaksono #define ACPI_APMT_FLAGS_ATOMIC_NSUPP (0<<2) 314*1c5d62f5SBesar Wicaksono #define ACPI_APMT_FLAGS_ATOMIC_SUPP (1<<2) 315*1c5d62f5SBesar Wicaksono 316*1c5d62f5SBesar Wicaksono /* Values for Type field above */ 317*1c5d62f5SBesar Wicaksono 318*1c5d62f5SBesar Wicaksono enum acpi_apmt_node_type { 319*1c5d62f5SBesar Wicaksono ACPI_APMT_NODE_TYPE_MC = 0x00, 320*1c5d62f5SBesar Wicaksono ACPI_APMT_NODE_TYPE_SMMU = 0x01, 321*1c5d62f5SBesar Wicaksono ACPI_APMT_NODE_TYPE_PCIE_ROOT = 0x02, 322*1c5d62f5SBesar Wicaksono ACPI_APMT_NODE_TYPE_ACPI = 0x03, 323*1c5d62f5SBesar Wicaksono ACPI_APMT_NODE_TYPE_CACHE = 0x04, 324*1c5d62f5SBesar Wicaksono ACPI_APMT_NODE_TYPE_COUNT 325*1c5d62f5SBesar Wicaksono }; 326*1c5d62f5SBesar Wicaksono 327*1c5d62f5SBesar Wicaksono /* Masks for ovflw_irq_flags field above */ 328*1c5d62f5SBesar Wicaksono 329*1c5d62f5SBesar Wicaksono #define ACPI_APMT_OVFLW_IRQ_FLAGS_MODE (1<<0) 330*1c5d62f5SBesar Wicaksono #define ACPI_APMT_OVFLW_IRQ_FLAGS_TYPE (1<<1) 331*1c5d62f5SBesar Wicaksono 332*1c5d62f5SBesar Wicaksono /* Values for ovflw_irq_flags mode field above */ 333*1c5d62f5SBesar Wicaksono 334*1c5d62f5SBesar Wicaksono #define ACPI_APMT_OVFLW_IRQ_FLAGS_MODE_LEVEL (0<<0) 335*1c5d62f5SBesar Wicaksono #define ACPI_APMT_OVFLW_IRQ_FLAGS_MODE_EDGE (1<<0) 336*1c5d62f5SBesar Wicaksono 337*1c5d62f5SBesar Wicaksono /* Values for ovflw_irq_flags type field above */ 338*1c5d62f5SBesar Wicaksono 339*1c5d62f5SBesar Wicaksono #define ACPI_APMT_OVFLW_IRQ_FLAGS_TYPE_WIRED (0<<1) 340*1c5d62f5SBesar Wicaksono 341*1c5d62f5SBesar Wicaksono /******************************************************************************* 342*1c5d62f5SBesar Wicaksono * 3439401eafaSBob Moore * BDAT - BIOS Data ACPI Table 3449401eafaSBob Moore * 3459401eafaSBob Moore * Conforms to "BIOS Data ACPI Table", Interface Specification v4.0 Draft 5 3469401eafaSBob Moore * Nov 2020 3479401eafaSBob Moore * 3489401eafaSBob Moore ******************************************************************************/ 3499401eafaSBob Moore 3509401eafaSBob Moore struct acpi_table_bdat { 3519401eafaSBob Moore struct acpi_table_header header; 3529401eafaSBob Moore struct acpi_generic_address gas; 3539401eafaSBob Moore }; 3549401eafaSBob Moore 3559401eafaSBob Moore /******************************************************************************* 3569401eafaSBob Moore * 357874f6a72SLv Zheng * IORT - IO Remapping Table 358874f6a72SLv Zheng * 359874f6a72SLv Zheng * Conforms to "IO Remapping Table System Software on ARM Platforms", 3608e1fdd7fSShameer Kolothum * Document number: ARM DEN 0049E.b, Feb 2021 361874f6a72SLv Zheng * 362874f6a72SLv Zheng ******************************************************************************/ 363874f6a72SLv Zheng 364874f6a72SLv Zheng struct acpi_table_iort { 365874f6a72SLv Zheng struct acpi_table_header header; 366874f6a72SLv Zheng u32 node_count; 367874f6a72SLv Zheng u32 node_offset; 368874f6a72SLv Zheng u32 reserved; 369874f6a72SLv Zheng }; 370874f6a72SLv Zheng 371874f6a72SLv Zheng /* 372874f6a72SLv Zheng * IORT subtables 373874f6a72SLv Zheng */ 374874f6a72SLv Zheng struct acpi_iort_node { 375874f6a72SLv Zheng u8 type; 376874f6a72SLv Zheng u16 length; 377874f6a72SLv Zheng u8 revision; 3788e1fdd7fSShameer Kolothum u32 identifier; 379874f6a72SLv Zheng u32 mapping_count; 380874f6a72SLv Zheng u32 mapping_offset; 381874f6a72SLv Zheng char node_data[1]; 382874f6a72SLv Zheng }; 383874f6a72SLv Zheng 384874f6a72SLv Zheng /* Values for subtable Type above */ 385874f6a72SLv Zheng 386874f6a72SLv Zheng enum acpi_iort_node_type { 387874f6a72SLv Zheng ACPI_IORT_NODE_ITS_GROUP = 0x00, 388874f6a72SLv Zheng ACPI_IORT_NODE_NAMED_COMPONENT = 0x01, 389874f6a72SLv Zheng ACPI_IORT_NODE_PCI_ROOT_COMPLEX = 0x02, 3904ac78bafSAl Stone ACPI_IORT_NODE_SMMU = 0x03, 391a53eaef6SRobin Murphy ACPI_IORT_NODE_SMMU_V3 = 0x04, 3928e1fdd7fSShameer Kolothum ACPI_IORT_NODE_PMCG = 0x05, 3938e1fdd7fSShameer Kolothum ACPI_IORT_NODE_RMR = 0x06, 394874f6a72SLv Zheng }; 395874f6a72SLv Zheng 396874f6a72SLv Zheng struct acpi_iort_id_mapping { 397874f6a72SLv Zheng u32 input_base; /* Lowest value in input range */ 398874f6a72SLv Zheng u32 id_count; /* Number of IDs */ 399874f6a72SLv Zheng u32 output_base; /* Lowest value in output range */ 400874f6a72SLv Zheng u32 output_reference; /* A reference to the output node */ 401874f6a72SLv Zheng u32 flags; 402874f6a72SLv Zheng }; 403874f6a72SLv Zheng 404874f6a72SLv Zheng /* Masks for Flags field above for IORT subtable */ 405874f6a72SLv Zheng 406874f6a72SLv Zheng #define ACPI_IORT_ID_SINGLE_MAPPING (1) 407874f6a72SLv Zheng 408874f6a72SLv Zheng struct acpi_iort_memory_access { 409874f6a72SLv Zheng u32 cache_coherency; 410874f6a72SLv Zheng u8 hints; 411874f6a72SLv Zheng u16 reserved; 412874f6a72SLv Zheng u8 memory_flags; 413874f6a72SLv Zheng }; 414874f6a72SLv Zheng 415874f6a72SLv Zheng /* Values for cache_coherency field above */ 416874f6a72SLv Zheng 417874f6a72SLv Zheng #define ACPI_IORT_NODE_COHERENT 0x00000001 /* The device node is fully coherent */ 418874f6a72SLv Zheng #define ACPI_IORT_NODE_NOT_COHERENT 0x00000000 /* The device node is not coherent */ 419874f6a72SLv Zheng 420874f6a72SLv Zheng /* Masks for Hints field above */ 421874f6a72SLv Zheng 422874f6a72SLv Zheng #define ACPI_IORT_HT_TRANSIENT (1) 423874f6a72SLv Zheng #define ACPI_IORT_HT_WRITE (1<<1) 424874f6a72SLv Zheng #define ACPI_IORT_HT_READ (1<<2) 425874f6a72SLv Zheng #define ACPI_IORT_HT_OVERRIDE (1<<3) 426874f6a72SLv Zheng 427874f6a72SLv Zheng /* Masks for memory_flags field above */ 428874f6a72SLv Zheng 429874f6a72SLv Zheng #define ACPI_IORT_MF_COHERENCY (1) 430874f6a72SLv Zheng #define ACPI_IORT_MF_ATTRIBUTES (1<<1) 431874f6a72SLv Zheng 432874f6a72SLv Zheng /* 433874f6a72SLv Zheng * IORT node specific subtables 434874f6a72SLv Zheng */ 435874f6a72SLv Zheng struct acpi_iort_its_group { 436874f6a72SLv Zheng u32 its_count; 437c163f90cSErik Schmauss u32 identifiers[1]; /* GIC ITS identifier array */ 438874f6a72SLv Zheng }; 439874f6a72SLv Zheng 440874f6a72SLv Zheng struct acpi_iort_named_component { 441874f6a72SLv Zheng u32 node_flags; 442874f6a72SLv Zheng u64 memory_properties; /* Memory access properties */ 443874f6a72SLv Zheng u8 memory_address_limit; /* Memory address size limit */ 444874f6a72SLv Zheng char device_name[1]; /* Path of namespace object */ 445874f6a72SLv Zheng }; 446874f6a72SLv Zheng 447d87be043SRobin Murphy /* Masks for Flags field above */ 448d87be043SRobin Murphy 449d87be043SRobin Murphy #define ACPI_IORT_NC_STALL_SUPPORTED (1) 450d87be043SRobin Murphy #define ACPI_IORT_NC_PASID_BITS (31<<1) 451d87be043SRobin Murphy 452874f6a72SLv Zheng struct acpi_iort_root_complex { 453874f6a72SLv Zheng u64 memory_properties; /* Memory access properties */ 454874f6a72SLv Zheng u32 ats_attribute; 455874f6a72SLv Zheng u32 pci_segment_number; 456d87be043SRobin Murphy u8 memory_address_limit; /* Memory address size limit */ 457d87be043SRobin Murphy u8 reserved[3]; /* Reserved, must be zero */ 458874f6a72SLv Zheng }; 459874f6a72SLv Zheng 4608e1fdd7fSShameer Kolothum /* Masks for ats_attribute field above */ 461874f6a72SLv Zheng 4628e1fdd7fSShameer Kolothum #define ACPI_IORT_ATS_SUPPORTED (1) /* The root complex ATS support */ 4638e1fdd7fSShameer Kolothum #define ACPI_IORT_PRI_SUPPORTED (1<<1) /* The root complex PRI support */ 4648e1fdd7fSShameer Kolothum #define ACPI_IORT_PASID_FWD_SUPPORTED (1<<2) /* The root complex PASID forward support */ 465874f6a72SLv Zheng 466874f6a72SLv Zheng struct acpi_iort_smmu { 467874f6a72SLv Zheng u64 base_address; /* SMMU base address */ 468874f6a72SLv Zheng u64 span; /* Length of memory range */ 469874f6a72SLv Zheng u32 model; 470874f6a72SLv Zheng u32 flags; 471874f6a72SLv Zheng u32 global_interrupt_offset; 472874f6a72SLv Zheng u32 context_interrupt_count; 473874f6a72SLv Zheng u32 context_interrupt_offset; 474874f6a72SLv Zheng u32 pmu_interrupt_count; 475874f6a72SLv Zheng u32 pmu_interrupt_offset; 476874f6a72SLv Zheng u64 interrupts[1]; /* Interrupt array */ 477874f6a72SLv Zheng }; 478874f6a72SLv Zheng 479874f6a72SLv Zheng /* Values for Model field above */ 480874f6a72SLv Zheng 481874f6a72SLv Zheng #define ACPI_IORT_SMMU_V1 0x00000000 /* Generic SMMUv1 */ 482874f6a72SLv Zheng #define ACPI_IORT_SMMU_V2 0x00000001 /* Generic SMMUv2 */ 483874f6a72SLv Zheng #define ACPI_IORT_SMMU_CORELINK_MMU400 0x00000002 /* ARM Corelink MMU-400 */ 484874f6a72SLv Zheng #define ACPI_IORT_SMMU_CORELINK_MMU500 0x00000003 /* ARM Corelink MMU-500 */ 4850c2021c0SRobin Murphy #define ACPI_IORT_SMMU_CORELINK_MMU401 0x00000004 /* ARM Corelink MMU-401 */ 4860c2021c0SRobin Murphy #define ACPI_IORT_SMMU_CAVIUM_THUNDERX 0x00000005 /* Cavium thunder_x SMMUv2 */ 487874f6a72SLv Zheng 488874f6a72SLv Zheng /* Masks for Flags field above */ 489874f6a72SLv Zheng 490874f6a72SLv Zheng #define ACPI_IORT_SMMU_DVM_SUPPORTED (1) 491874f6a72SLv Zheng #define ACPI_IORT_SMMU_COHERENT_WALK (1<<1) 492874f6a72SLv Zheng 493bb1e23e6SLv Zheng /* Global interrupt format */ 494bb1e23e6SLv Zheng 495bb1e23e6SLv Zheng struct acpi_iort_smmu_gsi { 496bb1e23e6SLv Zheng u32 nsg_irpt; 497bb1e23e6SLv Zheng u32 nsg_irpt_flags; 498bb1e23e6SLv Zheng u32 nsg_cfg_irpt; 499bb1e23e6SLv Zheng u32 nsg_cfg_irpt_flags; 500bb1e23e6SLv Zheng }; 501bb1e23e6SLv Zheng 5024ac78bafSAl Stone struct acpi_iort_smmu_v3 { 5034ac78bafSAl Stone u64 base_address; /* SMMUv3 base address */ 5044ac78bafSAl Stone u32 flags; 5054ac78bafSAl Stone u32 reserved; 5064ac78bafSAl Stone u64 vatos_address; 5070c2021c0SRobin Murphy u32 model; 5084ac78bafSAl Stone u32 event_gsiv; 5094ac78bafSAl Stone u32 pri_gsiv; 5104ac78bafSAl Stone u32 gerr_gsiv; 5114ac78bafSAl Stone u32 sync_gsiv; 512d87be043SRobin Murphy u32 pxm; 5134c106aa4SHanjun Guo u32 id_mapping_index; 5144ac78bafSAl Stone }; 5154ac78bafSAl Stone 5160c2021c0SRobin Murphy /* Values for Model field above */ 5170c2021c0SRobin Murphy 5180c2021c0SRobin Murphy #define ACPI_IORT_SMMU_V3_GENERIC 0x00000000 /* Generic SMMUv3 */ 5190c2021c0SRobin Murphy #define ACPI_IORT_SMMU_V3_HISILICON_HI161X 0x00000001 /* hi_silicon Hi161x SMMUv3 */ 5200c2021c0SRobin Murphy #define ACPI_IORT_SMMU_V3_CAVIUM_CN99XX 0x00000002 /* Cavium CN99xx SMMUv3 */ 5210c2021c0SRobin Murphy 5224ac78bafSAl Stone /* Masks for Flags field above */ 5234ac78bafSAl Stone 5244ac78bafSAl Stone #define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1) 525d87be043SRobin Murphy #define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (3<<1) 526c9442300SGanapatrao Kulkarni #define ACPI_IORT_SMMU_V3_PXM_VALID (1<<3) 5274ac78bafSAl Stone 528a53eaef6SRobin Murphy struct acpi_iort_pmcg { 529a53eaef6SRobin Murphy u64 page0_base_address; 530a53eaef6SRobin Murphy u32 overflow_gsiv; 531a53eaef6SRobin Murphy u32 node_reference; 532a53eaef6SRobin Murphy u64 page1_base_address; 533a53eaef6SRobin Murphy }; 534a53eaef6SRobin Murphy 5358e1fdd7fSShameer Kolothum struct acpi_iort_rmr { 5368e1fdd7fSShameer Kolothum u32 flags; 5378e1fdd7fSShameer Kolothum u32 rmr_count; 5388e1fdd7fSShameer Kolothum u32 rmr_offset; 5398e1fdd7fSShameer Kolothum }; 5408e1fdd7fSShameer Kolothum 5418e1fdd7fSShameer Kolothum struct acpi_iort_rmr_desc { 5428e1fdd7fSShameer Kolothum u64 base_address; 5438e1fdd7fSShameer Kolothum u64 length; 5448e1fdd7fSShameer Kolothum u32 reserved; 5458e1fdd7fSShameer Kolothum }; 5468e1fdd7fSShameer Kolothum 547874f6a72SLv Zheng /******************************************************************************* 548874f6a72SLv Zheng * 5496e2d5ebdSBob Moore * IVRS - I/O Virtualization Reporting Structure 5506e2d5ebdSBob Moore * Version 1 5516e2d5ebdSBob Moore * 5526e2d5ebdSBob Moore * Conforms to "AMD I/O Virtualization Technology (IOMMU) Specification", 5536e2d5ebdSBob Moore * Revision 1.26, February 2009. 5546e2d5ebdSBob Moore * 5556e2d5ebdSBob Moore ******************************************************************************/ 5566e2d5ebdSBob Moore 5576e2d5ebdSBob Moore struct acpi_table_ivrs { 5586e2d5ebdSBob Moore struct acpi_table_header header; /* Common ACPI table header */ 5596e2d5ebdSBob Moore u32 info; /* Common virtualization info */ 5606e2d5ebdSBob Moore u64 reserved; 5616e2d5ebdSBob Moore }; 5626e2d5ebdSBob Moore 5636e2d5ebdSBob Moore /* Values for Info field above */ 5646e2d5ebdSBob Moore 5656e2d5ebdSBob Moore #define ACPI_IVRS_PHYSICAL_SIZE 0x00007F00 /* 7 bits, physical address size */ 5666e2d5ebdSBob Moore #define ACPI_IVRS_VIRTUAL_SIZE 0x003F8000 /* 7 bits, virtual address size */ 5676e2d5ebdSBob Moore #define ACPI_IVRS_ATS_RESERVED 0x00400000 /* ATS address translation range reserved */ 5686e2d5ebdSBob Moore 5696e2d5ebdSBob Moore /* IVRS subtable header */ 5706e2d5ebdSBob Moore 5716e2d5ebdSBob Moore struct acpi_ivrs_header { 5726e2d5ebdSBob Moore u8 type; /* Subtable type */ 5736e2d5ebdSBob Moore u8 flags; 5746e2d5ebdSBob Moore u16 length; /* Subtable length */ 5756e2d5ebdSBob Moore u16 device_id; /* ID of IOMMU */ 5766e2d5ebdSBob Moore }; 5776e2d5ebdSBob Moore 5786e2d5ebdSBob Moore /* Values for subtable Type above */ 5796e2d5ebdSBob Moore 5806e2d5ebdSBob Moore enum acpi_ivrs_type { 5811f6239caSMichał Żygowski ACPI_IVRS_TYPE_HARDWARE1 = 0x10, 5821f6239caSMichał Żygowski ACPI_IVRS_TYPE_HARDWARE2 = 0x11, 5837ce7a445SAlexander Monakov ACPI_IVRS_TYPE_HARDWARE3 = 0x40, 5846e2d5ebdSBob Moore ACPI_IVRS_TYPE_MEMORY1 = 0x20, 5856e2d5ebdSBob Moore ACPI_IVRS_TYPE_MEMORY2 = 0x21, 5866e2d5ebdSBob Moore ACPI_IVRS_TYPE_MEMORY3 = 0x22 5876e2d5ebdSBob Moore }; 5886e2d5ebdSBob Moore 5896e2d5ebdSBob Moore /* Masks for Flags field above for IVHD subtable */ 5906e2d5ebdSBob Moore 5916e2d5ebdSBob Moore #define ACPI_IVHD_TT_ENABLE (1) 5926e2d5ebdSBob Moore #define ACPI_IVHD_PASS_PW (1<<1) 5936e2d5ebdSBob Moore #define ACPI_IVHD_RES_PASS_PW (1<<2) 5946e2d5ebdSBob Moore #define ACPI_IVHD_ISOC (1<<3) 5956e2d5ebdSBob Moore #define ACPI_IVHD_IOTLB (1<<4) 5966e2d5ebdSBob Moore 5976e2d5ebdSBob Moore /* Masks for Flags field above for IVMD subtable */ 5986e2d5ebdSBob Moore 5996e2d5ebdSBob Moore #define ACPI_IVMD_UNITY (1) 6006e2d5ebdSBob Moore #define ACPI_IVMD_READ (1<<1) 6016e2d5ebdSBob Moore #define ACPI_IVMD_WRITE (1<<2) 6026e2d5ebdSBob Moore #define ACPI_IVMD_EXCLUSION_RANGE (1<<3) 6036e2d5ebdSBob Moore 6046e2d5ebdSBob Moore /* 6056e2d5ebdSBob Moore * IVRS subtables, correspond to Type in struct acpi_ivrs_header 6066e2d5ebdSBob Moore */ 6076e2d5ebdSBob Moore 6086e2d5ebdSBob Moore /* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */ 6096e2d5ebdSBob Moore 6101f6239caSMichał Żygowski struct acpi_ivrs_hardware_10 { 6116e2d5ebdSBob Moore struct acpi_ivrs_header header; 6126e2d5ebdSBob Moore u16 capability_offset; /* Offset for IOMMU control fields */ 6136e2d5ebdSBob Moore u64 base_address; /* IOMMU control registers */ 6146e2d5ebdSBob Moore u16 pci_segment_group; 6156e2d5ebdSBob Moore u16 info; /* MSI number and unit ID */ 6160dc7e795SMichał Żygowski u32 feature_reporting; 6176e2d5ebdSBob Moore }; 6186e2d5ebdSBob Moore 6191f6239caSMichał Żygowski /* 0x11: I/O Virtualization Hardware Definition Block (IVHD) */ 6201f6239caSMichał Żygowski 6211f6239caSMichał Żygowski struct acpi_ivrs_hardware_11 { 6221f6239caSMichał Żygowski struct acpi_ivrs_header header; 6231f6239caSMichał Żygowski u16 capability_offset; /* Offset for IOMMU control fields */ 6241f6239caSMichał Żygowski u64 base_address; /* IOMMU control registers */ 6251f6239caSMichał Żygowski u16 pci_segment_group; 6261f6239caSMichał Żygowski u16 info; /* MSI number and unit ID */ 6271f6239caSMichał Żygowski u32 attributes; 6281f6239caSMichał Żygowski u64 efr_register_image; 6291f6239caSMichał Żygowski u64 reserved; 6301f6239caSMichał Żygowski }; 6311f6239caSMichał Żygowski 6326e2d5ebdSBob Moore /* Masks for Info field above */ 6336e2d5ebdSBob Moore 6346e2d5ebdSBob Moore #define ACPI_IVHD_MSI_NUMBER_MASK 0x001F /* 5 bits, MSI message number */ 635ba494beeSBob Moore #define ACPI_IVHD_UNIT_ID_MASK 0x1F00 /* 5 bits, unit_ID */ 6366e2d5ebdSBob Moore 6376e2d5ebdSBob Moore /* 6386e2d5ebdSBob Moore * Device Entries for IVHD subtable, appear after struct acpi_ivrs_hardware structure. 6396e2d5ebdSBob Moore * Upper two bits of the Type field are the (encoded) length of the structure. 6406e2d5ebdSBob Moore * Currently, only 4 and 8 byte entries are defined. 16 and 32 byte entries 6416e2d5ebdSBob Moore * are reserved for future use but not defined. 6426e2d5ebdSBob Moore */ 6436e2d5ebdSBob Moore struct acpi_ivrs_de_header { 6446e2d5ebdSBob Moore u8 type; 6456e2d5ebdSBob Moore u16 id; 6466e2d5ebdSBob Moore u8 data_setting; 6476e2d5ebdSBob Moore }; 6486e2d5ebdSBob Moore 6496e2d5ebdSBob Moore /* Length of device entry is in the top two bits of Type field above */ 6506e2d5ebdSBob Moore 6516e2d5ebdSBob Moore #define ACPI_IVHD_ENTRY_LENGTH 0xC0 6526e2d5ebdSBob Moore 6536e2d5ebdSBob Moore /* Values for device entry Type field above */ 6546e2d5ebdSBob Moore 6556e2d5ebdSBob Moore enum acpi_ivrs_device_entry_type { 6566e2d5ebdSBob Moore /* 4-byte device entries, all use struct acpi_ivrs_device4 */ 6576e2d5ebdSBob Moore 6586e2d5ebdSBob Moore ACPI_IVRS_TYPE_PAD4 = 0, 6596e2d5ebdSBob Moore ACPI_IVRS_TYPE_ALL = 1, 6606e2d5ebdSBob Moore ACPI_IVRS_TYPE_SELECT = 2, 6616e2d5ebdSBob Moore ACPI_IVRS_TYPE_START = 3, 6626e2d5ebdSBob Moore ACPI_IVRS_TYPE_END = 4, 6636e2d5ebdSBob Moore 6646e2d5ebdSBob Moore /* 8-byte device entries */ 6656e2d5ebdSBob Moore 6666e2d5ebdSBob Moore ACPI_IVRS_TYPE_PAD8 = 64, 6676e2d5ebdSBob Moore ACPI_IVRS_TYPE_NOT_USED = 65, 6686e2d5ebdSBob Moore ACPI_IVRS_TYPE_ALIAS_SELECT = 66, /* Uses struct acpi_ivrs_device8a */ 6696e2d5ebdSBob Moore ACPI_IVRS_TYPE_ALIAS_START = 67, /* Uses struct acpi_ivrs_device8a */ 6706e2d5ebdSBob Moore ACPI_IVRS_TYPE_EXT_SELECT = 70, /* Uses struct acpi_ivrs_device8b */ 6716e2d5ebdSBob Moore ACPI_IVRS_TYPE_EXT_START = 71, /* Uses struct acpi_ivrs_device8b */ 6727ce7a445SAlexander Monakov ACPI_IVRS_TYPE_SPECIAL = 72, /* Uses struct acpi_ivrs_device8c */ 6737ce7a445SAlexander Monakov 6747ce7a445SAlexander Monakov /* Variable-length device entries */ 6757ce7a445SAlexander Monakov 6767ce7a445SAlexander Monakov ACPI_IVRS_TYPE_HID = 240 /* Uses ACPI_IVRS_DEVICE_HID */ 6776e2d5ebdSBob Moore }; 6786e2d5ebdSBob Moore 6796e2d5ebdSBob Moore /* Values for Data field above */ 6806e2d5ebdSBob Moore 6816e2d5ebdSBob Moore #define ACPI_IVHD_INIT_PASS (1) 6826e2d5ebdSBob Moore #define ACPI_IVHD_EINT_PASS (1<<1) 6836e2d5ebdSBob Moore #define ACPI_IVHD_NMI_PASS (1<<2) 6846e2d5ebdSBob Moore #define ACPI_IVHD_SYSTEM_MGMT (3<<4) 6856e2d5ebdSBob Moore #define ACPI_IVHD_LINT0_PASS (1<<6) 6866e2d5ebdSBob Moore #define ACPI_IVHD_LINT1_PASS (1<<7) 6876e2d5ebdSBob Moore 6886e2d5ebdSBob Moore /* Types 0-4: 4-byte device entry */ 6896e2d5ebdSBob Moore 6906e2d5ebdSBob Moore struct acpi_ivrs_device4 { 6916e2d5ebdSBob Moore struct acpi_ivrs_de_header header; 6926e2d5ebdSBob Moore }; 6936e2d5ebdSBob Moore 6946e2d5ebdSBob Moore /* Types 66-67: 8-byte device entry */ 6956e2d5ebdSBob Moore 6966e2d5ebdSBob Moore struct acpi_ivrs_device8a { 6976e2d5ebdSBob Moore struct acpi_ivrs_de_header header; 6986e2d5ebdSBob Moore u8 reserved1; 6996e2d5ebdSBob Moore u16 used_id; 7006e2d5ebdSBob Moore u8 reserved2; 7016e2d5ebdSBob Moore }; 7026e2d5ebdSBob Moore 7036e2d5ebdSBob Moore /* Types 70-71: 8-byte device entry */ 7046e2d5ebdSBob Moore 7056e2d5ebdSBob Moore struct acpi_ivrs_device8b { 7066e2d5ebdSBob Moore struct acpi_ivrs_de_header header; 7076e2d5ebdSBob Moore u32 extended_data; 7086e2d5ebdSBob Moore }; 7096e2d5ebdSBob Moore 7106e2d5ebdSBob Moore /* Values for extended_data above */ 7116e2d5ebdSBob Moore 7126e2d5ebdSBob Moore #define ACPI_IVHD_ATS_DISABLED (1<<31) 7136e2d5ebdSBob Moore 7146e2d5ebdSBob Moore /* Type 72: 8-byte device entry */ 7156e2d5ebdSBob Moore 7166e2d5ebdSBob Moore struct acpi_ivrs_device8c { 7176e2d5ebdSBob Moore struct acpi_ivrs_de_header header; 7186e2d5ebdSBob Moore u8 handle; 7196e2d5ebdSBob Moore u16 used_id; 7206e2d5ebdSBob Moore u8 variety; 7216e2d5ebdSBob Moore }; 7226e2d5ebdSBob Moore 7236e2d5ebdSBob Moore /* Values for Variety field above */ 7246e2d5ebdSBob Moore 7256e2d5ebdSBob Moore #define ACPI_IVHD_IOAPIC 1 7266e2d5ebdSBob Moore #define ACPI_IVHD_HPET 2 7276e2d5ebdSBob Moore 7287ce7a445SAlexander Monakov /* Type 240: variable-length device entry */ 7297ce7a445SAlexander Monakov 7307ce7a445SAlexander Monakov struct acpi_ivrs_device_hid { 7317ce7a445SAlexander Monakov struct acpi_ivrs_de_header header; 7327ce7a445SAlexander Monakov u64 acpi_hid; 7337ce7a445SAlexander Monakov u64 acpi_cid; 7347ce7a445SAlexander Monakov u8 uid_type; 7357ce7a445SAlexander Monakov u8 uid_length; 7367ce7a445SAlexander Monakov }; 7377ce7a445SAlexander Monakov 738c160b7d2SBob Moore /* Values for uid_type above */ 739c160b7d2SBob Moore 740c160b7d2SBob Moore #define ACPI_IVRS_UID_NOT_PRESENT 0 741c160b7d2SBob Moore #define ACPI_IVRS_UID_IS_INTEGER 1 742c160b7d2SBob Moore #define ACPI_IVRS_UID_IS_STRING 2 743c160b7d2SBob Moore 7446e2d5ebdSBob Moore /* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */ 7456e2d5ebdSBob Moore 7466e2d5ebdSBob Moore struct acpi_ivrs_memory { 7476e2d5ebdSBob Moore struct acpi_ivrs_header header; 7486e2d5ebdSBob Moore u16 aux_data; 7496e2d5ebdSBob Moore u64 reserved; 7506e2d5ebdSBob Moore u64 start_address; 7516e2d5ebdSBob Moore u64 memory_length; 7526e2d5ebdSBob Moore }; 7536e2d5ebdSBob Moore 7546e2d5ebdSBob Moore /******************************************************************************* 7556e2d5ebdSBob Moore * 756d36d4e30SBob Moore * LPIT - Low Power Idle Table 757d36d4e30SBob Moore * 7589ab8cf1bSBob Moore * Conforms to "ACPI Low Power Idle Table (LPIT)" July 2014. 759d36d4e30SBob Moore * 760d36d4e30SBob Moore ******************************************************************************/ 761d36d4e30SBob Moore 762d36d4e30SBob Moore struct acpi_table_lpit { 763d36d4e30SBob Moore struct acpi_table_header header; /* Common ACPI table header */ 764d36d4e30SBob Moore }; 765d36d4e30SBob Moore 766d36d4e30SBob Moore /* LPIT subtable header */ 767d36d4e30SBob Moore 768d36d4e30SBob Moore struct acpi_lpit_header { 769d36d4e30SBob Moore u32 type; /* Subtable type */ 770d36d4e30SBob Moore u32 length; /* Subtable length */ 771d36d4e30SBob Moore u16 unique_id; 772d36d4e30SBob Moore u16 reserved; 773d36d4e30SBob Moore u32 flags; 774d36d4e30SBob Moore }; 775d36d4e30SBob Moore 776d36d4e30SBob Moore /* Values for subtable Type above */ 777d36d4e30SBob Moore 778d36d4e30SBob Moore enum acpi_lpit_type { 779d36d4e30SBob Moore ACPI_LPIT_TYPE_NATIVE_CSTATE = 0x00, 7809ab8cf1bSBob Moore ACPI_LPIT_TYPE_RESERVED = 0x01 /* 1 and above are reserved */ 781d36d4e30SBob Moore }; 782d36d4e30SBob Moore 783d36d4e30SBob Moore /* Masks for Flags field above */ 784d36d4e30SBob Moore 785d36d4e30SBob Moore #define ACPI_LPIT_STATE_DISABLED (1) 786d36d4e30SBob Moore #define ACPI_LPIT_NO_COUNTER (1<<1) 787d36d4e30SBob Moore 788d36d4e30SBob Moore /* 789d36d4e30SBob Moore * LPIT subtables, correspond to Type in struct acpi_lpit_header 790d36d4e30SBob Moore */ 791d36d4e30SBob Moore 792d36d4e30SBob Moore /* 0x00: Native C-state instruction based LPI structure */ 793d36d4e30SBob Moore 794d36d4e30SBob Moore struct acpi_lpit_native { 795d36d4e30SBob Moore struct acpi_lpit_header header; 796d36d4e30SBob Moore struct acpi_generic_address entry_trigger; 797d36d4e30SBob Moore u32 residency; 798d36d4e30SBob Moore u32 latency; 799d36d4e30SBob Moore struct acpi_generic_address residency_counter; 800d36d4e30SBob Moore u64 counter_frequency; 801d36d4e30SBob Moore }; 802d36d4e30SBob Moore 803d36d4e30SBob Moore /******************************************************************************* 804d36d4e30SBob Moore * 805e62f8227SErik Schmauss * MADT - Multiple APIC Description Table 806e62f8227SErik Schmauss * Version 3 807e62f8227SErik Schmauss * 808e62f8227SErik Schmauss ******************************************************************************/ 809e62f8227SErik Schmauss 810e62f8227SErik Schmauss struct acpi_table_madt { 811e62f8227SErik Schmauss struct acpi_table_header header; /* Common ACPI table header */ 812e62f8227SErik Schmauss u32 address; /* Physical address of local APIC */ 813e62f8227SErik Schmauss u32 flags; 814e62f8227SErik Schmauss }; 815e62f8227SErik Schmauss 816e62f8227SErik Schmauss /* Masks for Flags field above */ 817e62f8227SErik Schmauss 818e62f8227SErik Schmauss #define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */ 819e62f8227SErik Schmauss 820e62f8227SErik Schmauss /* Values for PCATCompat flag */ 821e62f8227SErik Schmauss 822e62f8227SErik Schmauss #define ACPI_MADT_DUAL_PIC 1 823e62f8227SErik Schmauss #define ACPI_MADT_MULTIPLE_APIC 0 824e62f8227SErik Schmauss 825e62f8227SErik Schmauss /* Values for MADT subtable type in struct acpi_subtable_header */ 826e62f8227SErik Schmauss 827e62f8227SErik Schmauss enum acpi_madt_type { 828e62f8227SErik Schmauss ACPI_MADT_TYPE_LOCAL_APIC = 0, 829e62f8227SErik Schmauss ACPI_MADT_TYPE_IO_APIC = 1, 830e62f8227SErik Schmauss ACPI_MADT_TYPE_INTERRUPT_OVERRIDE = 2, 831e62f8227SErik Schmauss ACPI_MADT_TYPE_NMI_SOURCE = 3, 832e62f8227SErik Schmauss ACPI_MADT_TYPE_LOCAL_APIC_NMI = 4, 833e62f8227SErik Schmauss ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE = 5, 834e62f8227SErik Schmauss ACPI_MADT_TYPE_IO_SAPIC = 6, 835e62f8227SErik Schmauss ACPI_MADT_TYPE_LOCAL_SAPIC = 7, 836e62f8227SErik Schmauss ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8, 837e62f8227SErik Schmauss ACPI_MADT_TYPE_LOCAL_X2APIC = 9, 838e62f8227SErik Schmauss ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10, 839e62f8227SErik Schmauss ACPI_MADT_TYPE_GENERIC_INTERRUPT = 11, 840e62f8227SErik Schmauss ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR = 12, 841e62f8227SErik Schmauss ACPI_MADT_TYPE_GENERIC_MSI_FRAME = 13, 842e62f8227SErik Schmauss ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR = 14, 843e62f8227SErik Schmauss ACPI_MADT_TYPE_GENERIC_TRANSLATOR = 15, 8449557cb8cSErik Kaneda ACPI_MADT_TYPE_MULTIPROC_WAKEUP = 16, 8459557cb8cSErik Kaneda ACPI_MADT_TYPE_RESERVED = 17 /* 17 and greater are reserved */ 846e62f8227SErik Schmauss }; 847e62f8227SErik Schmauss 848e62f8227SErik Schmauss /* 849e62f8227SErik Schmauss * MADT Subtables, correspond to Type in struct acpi_subtable_header 850e62f8227SErik Schmauss */ 851e62f8227SErik Schmauss 852e62f8227SErik Schmauss /* 0: Processor Local APIC */ 853e62f8227SErik Schmauss 854e62f8227SErik Schmauss struct acpi_madt_local_apic { 855e62f8227SErik Schmauss struct acpi_subtable_header header; 856e62f8227SErik Schmauss u8 processor_id; /* ACPI processor id */ 857e62f8227SErik Schmauss u8 id; /* Processor's local APIC id */ 858e62f8227SErik Schmauss u32 lapic_flags; 859e62f8227SErik Schmauss }; 860e62f8227SErik Schmauss 861e62f8227SErik Schmauss /* 1: IO APIC */ 862e62f8227SErik Schmauss 863e62f8227SErik Schmauss struct acpi_madt_io_apic { 864e62f8227SErik Schmauss struct acpi_subtable_header header; 865e62f8227SErik Schmauss u8 id; /* I/O APIC ID */ 866e62f8227SErik Schmauss u8 reserved; /* reserved - must be zero */ 867e62f8227SErik Schmauss u32 address; /* APIC physical address */ 868e62f8227SErik Schmauss u32 global_irq_base; /* Global system interrupt where INTI lines start */ 869e62f8227SErik Schmauss }; 870e62f8227SErik Schmauss 871e62f8227SErik Schmauss /* 2: Interrupt Override */ 872e62f8227SErik Schmauss 873e62f8227SErik Schmauss struct acpi_madt_interrupt_override { 874e62f8227SErik Schmauss struct acpi_subtable_header header; 875e62f8227SErik Schmauss u8 bus; /* 0 - ISA */ 876e62f8227SErik Schmauss u8 source_irq; /* Interrupt source (IRQ) */ 877e62f8227SErik Schmauss u32 global_irq; /* Global system interrupt */ 878e62f8227SErik Schmauss u16 inti_flags; 879e62f8227SErik Schmauss }; 880e62f8227SErik Schmauss 881e62f8227SErik Schmauss /* 3: NMI Source */ 882e62f8227SErik Schmauss 883e62f8227SErik Schmauss struct acpi_madt_nmi_source { 884e62f8227SErik Schmauss struct acpi_subtable_header header; 885e62f8227SErik Schmauss u16 inti_flags; 886e62f8227SErik Schmauss u32 global_irq; /* Global system interrupt */ 887e62f8227SErik Schmauss }; 888e62f8227SErik Schmauss 889e62f8227SErik Schmauss /* 4: Local APIC NMI */ 890e62f8227SErik Schmauss 891e62f8227SErik Schmauss struct acpi_madt_local_apic_nmi { 892e62f8227SErik Schmauss struct acpi_subtable_header header; 893e62f8227SErik Schmauss u8 processor_id; /* ACPI processor id */ 894e62f8227SErik Schmauss u16 inti_flags; 895e62f8227SErik Schmauss u8 lint; /* LINTn to which NMI is connected */ 896e62f8227SErik Schmauss }; 897e62f8227SErik Schmauss 898e62f8227SErik Schmauss /* 5: Address Override */ 899e62f8227SErik Schmauss 900e62f8227SErik Schmauss struct acpi_madt_local_apic_override { 901e62f8227SErik Schmauss struct acpi_subtable_header header; 902e62f8227SErik Schmauss u16 reserved; /* Reserved, must be zero */ 903e62f8227SErik Schmauss u64 address; /* APIC physical address */ 904e62f8227SErik Schmauss }; 905e62f8227SErik Schmauss 906e62f8227SErik Schmauss /* 6: I/O Sapic */ 907e62f8227SErik Schmauss 908e62f8227SErik Schmauss struct acpi_madt_io_sapic { 909e62f8227SErik Schmauss struct acpi_subtable_header header; 910e62f8227SErik Schmauss u8 id; /* I/O SAPIC ID */ 911e62f8227SErik Schmauss u8 reserved; /* Reserved, must be zero */ 912e62f8227SErik Schmauss u32 global_irq_base; /* Global interrupt for SAPIC start */ 913e62f8227SErik Schmauss u64 address; /* SAPIC physical address */ 914e62f8227SErik Schmauss }; 915e62f8227SErik Schmauss 916e62f8227SErik Schmauss /* 7: Local Sapic */ 917e62f8227SErik Schmauss 918e62f8227SErik Schmauss struct acpi_madt_local_sapic { 919e62f8227SErik Schmauss struct acpi_subtable_header header; 920e62f8227SErik Schmauss u8 processor_id; /* ACPI processor id */ 921e62f8227SErik Schmauss u8 id; /* SAPIC ID */ 922e62f8227SErik Schmauss u8 eid; /* SAPIC EID */ 923e62f8227SErik Schmauss u8 reserved[3]; /* Reserved, must be zero */ 924e62f8227SErik Schmauss u32 lapic_flags; 925e62f8227SErik Schmauss u32 uid; /* Numeric UID - ACPI 3.0 */ 926e62f8227SErik Schmauss char uid_string[1]; /* String UID - ACPI 3.0 */ 927e62f8227SErik Schmauss }; 928e62f8227SErik Schmauss 929e62f8227SErik Schmauss /* 8: Platform Interrupt Source */ 930e62f8227SErik Schmauss 931e62f8227SErik Schmauss struct acpi_madt_interrupt_source { 932e62f8227SErik Schmauss struct acpi_subtable_header header; 933e62f8227SErik Schmauss u16 inti_flags; 934e62f8227SErik Schmauss u8 type; /* 1=PMI, 2=INIT, 3=corrected */ 935e62f8227SErik Schmauss u8 id; /* Processor ID */ 936e62f8227SErik Schmauss u8 eid; /* Processor EID */ 937e62f8227SErik Schmauss u8 io_sapic_vector; /* Vector value for PMI interrupts */ 938e62f8227SErik Schmauss u32 global_irq; /* Global system interrupt */ 939e62f8227SErik Schmauss u32 flags; /* Interrupt Source Flags */ 940e62f8227SErik Schmauss }; 941e62f8227SErik Schmauss 942e62f8227SErik Schmauss /* Masks for Flags field above */ 943e62f8227SErik Schmauss 944e62f8227SErik Schmauss #define ACPI_MADT_CPEI_OVERRIDE (1) 945e62f8227SErik Schmauss 946e62f8227SErik Schmauss /* 9: Processor Local X2APIC (ACPI 4.0) */ 947e62f8227SErik Schmauss 948e62f8227SErik Schmauss struct acpi_madt_local_x2apic { 949e62f8227SErik Schmauss struct acpi_subtable_header header; 950e62f8227SErik Schmauss u16 reserved; /* reserved - must be zero */ 951e62f8227SErik Schmauss u32 local_apic_id; /* Processor x2APIC ID */ 952e62f8227SErik Schmauss u32 lapic_flags; 953e62f8227SErik Schmauss u32 uid; /* ACPI processor UID */ 954e62f8227SErik Schmauss }; 955e62f8227SErik Schmauss 956e62f8227SErik Schmauss /* 10: Local X2APIC NMI (ACPI 4.0) */ 957e62f8227SErik Schmauss 958e62f8227SErik Schmauss struct acpi_madt_local_x2apic_nmi { 959e62f8227SErik Schmauss struct acpi_subtable_header header; 960e62f8227SErik Schmauss u16 inti_flags; 961e62f8227SErik Schmauss u32 uid; /* ACPI processor UID */ 962e62f8227SErik Schmauss u8 lint; /* LINTn to which NMI is connected */ 963e62f8227SErik Schmauss u8 reserved[3]; /* reserved - must be zero */ 964e62f8227SErik Schmauss }; 965e62f8227SErik Schmauss 966e646e0a5SErik Schmauss /* 11: Generic interrupt - GICC (ACPI 5.0 + ACPI 6.0 + ACPI 6.3 changes) */ 967e62f8227SErik Schmauss 968e62f8227SErik Schmauss struct acpi_madt_generic_interrupt { 969e62f8227SErik Schmauss struct acpi_subtable_header header; 970e62f8227SErik Schmauss u16 reserved; /* reserved - must be zero */ 971e62f8227SErik Schmauss u32 cpu_interface_number; 972e62f8227SErik Schmauss u32 uid; 973e62f8227SErik Schmauss u32 flags; 974e62f8227SErik Schmauss u32 parking_version; 975e62f8227SErik Schmauss u32 performance_interrupt; 976e62f8227SErik Schmauss u64 parked_address; 977e62f8227SErik Schmauss u64 base_address; 978e62f8227SErik Schmauss u64 gicv_base_address; 979e62f8227SErik Schmauss u64 gich_base_address; 980e62f8227SErik Schmauss u32 vgic_interrupt; 981e62f8227SErik Schmauss u64 gicr_base_address; 982e62f8227SErik Schmauss u64 arm_mpidr; 983e62f8227SErik Schmauss u8 efficiency_class; 984e646e0a5SErik Schmauss u8 reserved2[1]; 985e646e0a5SErik Schmauss u16 spe_interrupt; /* ACPI 6.3 */ 986e62f8227SErik Schmauss }; 987e62f8227SErik Schmauss 988e62f8227SErik Schmauss /* Masks for Flags field above */ 989e62f8227SErik Schmauss 990e62f8227SErik Schmauss /* ACPI_MADT_ENABLED (1) Processor is usable if set */ 991e62f8227SErik Schmauss #define ACPI_MADT_PERFORMANCE_IRQ_MODE (1<<1) /* 01: Performance Interrupt Mode */ 992e62f8227SErik Schmauss #define ACPI_MADT_VGIC_IRQ_MODE (1<<2) /* 02: VGIC Maintenance Interrupt mode */ 993e62f8227SErik Schmauss 994e62f8227SErik Schmauss /* 12: Generic Distributor (ACPI 5.0 + ACPI 6.0 changes) */ 995e62f8227SErik Schmauss 996e62f8227SErik Schmauss struct acpi_madt_generic_distributor { 997e62f8227SErik Schmauss struct acpi_subtable_header header; 998e62f8227SErik Schmauss u16 reserved; /* reserved - must be zero */ 999e62f8227SErik Schmauss u32 gic_id; 1000e62f8227SErik Schmauss u64 base_address; 1001e62f8227SErik Schmauss u32 global_irq_base; 1002e62f8227SErik Schmauss u8 version; 1003e62f8227SErik Schmauss u8 reserved2[3]; /* reserved - must be zero */ 1004e62f8227SErik Schmauss }; 1005e62f8227SErik Schmauss 1006e62f8227SErik Schmauss /* Values for Version field above */ 1007e62f8227SErik Schmauss 1008e62f8227SErik Schmauss enum acpi_madt_gic_version { 1009e62f8227SErik Schmauss ACPI_MADT_GIC_VERSION_NONE = 0, 1010e62f8227SErik Schmauss ACPI_MADT_GIC_VERSION_V1 = 1, 1011e62f8227SErik Schmauss ACPI_MADT_GIC_VERSION_V2 = 2, 1012e62f8227SErik Schmauss ACPI_MADT_GIC_VERSION_V3 = 3, 1013e62f8227SErik Schmauss ACPI_MADT_GIC_VERSION_V4 = 4, 1014e62f8227SErik Schmauss ACPI_MADT_GIC_VERSION_RESERVED = 5 /* 5 and greater are reserved */ 1015e62f8227SErik Schmauss }; 1016e62f8227SErik Schmauss 1017e62f8227SErik Schmauss /* 13: Generic MSI Frame (ACPI 5.1) */ 1018e62f8227SErik Schmauss 1019e62f8227SErik Schmauss struct acpi_madt_generic_msi_frame { 1020e62f8227SErik Schmauss struct acpi_subtable_header header; 1021e62f8227SErik Schmauss u16 reserved; /* reserved - must be zero */ 1022e62f8227SErik Schmauss u32 msi_frame_id; 1023e62f8227SErik Schmauss u64 base_address; 1024e62f8227SErik Schmauss u32 flags; 1025e62f8227SErik Schmauss u16 spi_count; 1026e62f8227SErik Schmauss u16 spi_base; 1027e62f8227SErik Schmauss }; 1028e62f8227SErik Schmauss 1029e62f8227SErik Schmauss /* Masks for Flags field above */ 1030e62f8227SErik Schmauss 1031e62f8227SErik Schmauss #define ACPI_MADT_OVERRIDE_SPI_VALUES (1) 1032e62f8227SErik Schmauss 1033e62f8227SErik Schmauss /* 14: Generic Redistributor (ACPI 5.1) */ 1034e62f8227SErik Schmauss 1035e62f8227SErik Schmauss struct acpi_madt_generic_redistributor { 1036e62f8227SErik Schmauss struct acpi_subtable_header header; 1037e62f8227SErik Schmauss u16 reserved; /* reserved - must be zero */ 1038e62f8227SErik Schmauss u64 base_address; 1039e62f8227SErik Schmauss u32 length; 1040e62f8227SErik Schmauss }; 1041e62f8227SErik Schmauss 1042e62f8227SErik Schmauss /* 15: Generic Translator (ACPI 6.0) */ 1043e62f8227SErik Schmauss 1044e62f8227SErik Schmauss struct acpi_madt_generic_translator { 1045e62f8227SErik Schmauss struct acpi_subtable_header header; 1046e62f8227SErik Schmauss u16 reserved; /* reserved - must be zero */ 1047e62f8227SErik Schmauss u32 translation_id; 1048e62f8227SErik Schmauss u64 base_address; 1049e62f8227SErik Schmauss u32 reserved2; 1050e62f8227SErik Schmauss }; 1051e62f8227SErik Schmauss 10529557cb8cSErik Kaneda /* 16: Multiprocessor wakeup (ACPI 6.4) */ 10539557cb8cSErik Kaneda 10549557cb8cSErik Kaneda struct acpi_madt_multiproc_wakeup { 10559557cb8cSErik Kaneda struct acpi_subtable_header header; 10569557cb8cSErik Kaneda u16 mailbox_version; 10579557cb8cSErik Kaneda u32 reserved; /* reserved - must be zero */ 10589557cb8cSErik Kaneda u64 base_address; 10599557cb8cSErik Kaneda }; 10609557cb8cSErik Kaneda 106142d96e16SKuppuswamy Sathyanarayanan #define ACPI_MULTIPROC_WAKEUP_MB_OS_SIZE 2032 106242d96e16SKuppuswamy Sathyanarayanan #define ACPI_MULTIPROC_WAKEUP_MB_FIRMWARE_SIZE 2048 106342d96e16SKuppuswamy Sathyanarayanan 106442d96e16SKuppuswamy Sathyanarayanan struct acpi_madt_multiproc_wakeup_mailbox { 106542d96e16SKuppuswamy Sathyanarayanan u16 command; 106642d96e16SKuppuswamy Sathyanarayanan u16 reserved; /* reserved - must be zero */ 106742d96e16SKuppuswamy Sathyanarayanan u32 apic_id; 106842d96e16SKuppuswamy Sathyanarayanan u64 wakeup_vector; 106942d96e16SKuppuswamy Sathyanarayanan u8 reserved_os[ACPI_MULTIPROC_WAKEUP_MB_OS_SIZE]; /* reserved for OS use */ 107042d96e16SKuppuswamy Sathyanarayanan u8 reserved_firmware[ACPI_MULTIPROC_WAKEUP_MB_FIRMWARE_SIZE]; /* reserved for firmware use */ 107142d96e16SKuppuswamy Sathyanarayanan }; 107242d96e16SKuppuswamy Sathyanarayanan 107342d96e16SKuppuswamy Sathyanarayanan #define ACPI_MP_WAKE_COMMAND_WAKEUP 1 107442d96e16SKuppuswamy Sathyanarayanan 1075e62f8227SErik Schmauss /* 1076e62f8227SErik Schmauss * Common flags fields for MADT subtables 1077e62f8227SErik Schmauss */ 1078e62f8227SErik Schmauss 1079e62f8227SErik Schmauss /* MADT Local APIC flags */ 1080e62f8227SErik Schmauss 1081e62f8227SErik Schmauss #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */ 1082435a8dc8SMario Limonciello #define ACPI_MADT_ONLINE_CAPABLE (2) /* 01: System HW supports enabling processor at runtime */ 1083e62f8227SErik Schmauss 1084e62f8227SErik Schmauss /* MADT MPS INTI flags (inti_flags) */ 1085e62f8227SErik Schmauss 1086e62f8227SErik Schmauss #define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */ 1087e62f8227SErik Schmauss #define ACPI_MADT_TRIGGER_MASK (3<<2) /* 02-03: Trigger mode of APIC input signals */ 1088e62f8227SErik Schmauss 1089e62f8227SErik Schmauss /* Values for MPS INTI flags */ 1090e62f8227SErik Schmauss 1091e62f8227SErik Schmauss #define ACPI_MADT_POLARITY_CONFORMS 0 1092e62f8227SErik Schmauss #define ACPI_MADT_POLARITY_ACTIVE_HIGH 1 1093e62f8227SErik Schmauss #define ACPI_MADT_POLARITY_RESERVED 2 1094e62f8227SErik Schmauss #define ACPI_MADT_POLARITY_ACTIVE_LOW 3 1095e62f8227SErik Schmauss 1096e62f8227SErik Schmauss #define ACPI_MADT_TRIGGER_CONFORMS (0) 1097e62f8227SErik Schmauss #define ACPI_MADT_TRIGGER_EDGE (1<<2) 1098e62f8227SErik Schmauss #define ACPI_MADT_TRIGGER_RESERVED (2<<2) 1099e62f8227SErik Schmauss #define ACPI_MADT_TRIGGER_LEVEL (3<<2) 1100e62f8227SErik Schmauss 1101e62f8227SErik Schmauss /******************************************************************************* 1102e62f8227SErik Schmauss * 11031a49b72cSBob Moore * MCFG - PCI Memory Mapped Configuration table and subtable 11046e2d5ebdSBob Moore * Version 1 11056e2d5ebdSBob Moore * 11066e2d5ebdSBob Moore * Conforms to "PCI Firmware Specification", Revision 3.0, June 20, 2005 1107b24aad44SBob Moore * 1108b24aad44SBob Moore ******************************************************************************/ 1109b24aad44SBob Moore 1110b24aad44SBob Moore struct acpi_table_mcfg { 1111b24aad44SBob Moore struct acpi_table_header header; /* Common ACPI table header */ 1112b24aad44SBob Moore u8 reserved[8]; 1113b24aad44SBob Moore }; 1114b24aad44SBob Moore 1115b24aad44SBob Moore /* Subtable */ 1116b24aad44SBob Moore 1117b24aad44SBob Moore struct acpi_mcfg_allocation { 1118b24aad44SBob Moore u64 address; /* Base address, processor-relative */ 1119b24aad44SBob Moore u16 pci_segment; /* PCI segment group number */ 1120b24aad44SBob Moore u8 start_bus_number; /* Starting PCI Bus number */ 1121b24aad44SBob Moore u8 end_bus_number; /* Final PCI Bus number */ 1122b24aad44SBob Moore u32 reserved; 1123b24aad44SBob Moore }; 1124b24aad44SBob Moore 1125b24aad44SBob Moore /******************************************************************************* 1126b24aad44SBob Moore * 11270e264f0bSBob Moore * MCHI - Management Controller Host Interface Table 11280e264f0bSBob Moore * Version 1 11290e264f0bSBob Moore * 11300e264f0bSBob Moore * Conforms to "Management Component Transport Protocol (MCTP) Host 11310e264f0bSBob Moore * Interface Specification", Revision 1.0.0a, October 13, 2009 11320e264f0bSBob Moore * 11330e264f0bSBob Moore ******************************************************************************/ 11340e264f0bSBob Moore 11350e264f0bSBob Moore struct acpi_table_mchi { 11360e264f0bSBob Moore struct acpi_table_header header; /* Common ACPI table header */ 11370e264f0bSBob Moore u8 interface_type; 11380e264f0bSBob Moore u8 protocol; 11390e264f0bSBob Moore u64 protocol_data; 11400e264f0bSBob Moore u8 interrupt_type; 11410e264f0bSBob Moore u8 gpe; 11420e264f0bSBob Moore u8 pci_device_flag; 11430e264f0bSBob Moore u32 global_interrupt; 11440e264f0bSBob Moore struct acpi_generic_address control_register; 11450e264f0bSBob Moore u8 pci_segment; 11460e264f0bSBob Moore u8 pci_bus; 11470e264f0bSBob Moore u8 pci_device; 11480e264f0bSBob Moore u8 pci_function; 11490e264f0bSBob Moore }; 11500e264f0bSBob Moore 11510e264f0bSBob Moore /******************************************************************************* 11520e264f0bSBob Moore * 1153e62f8227SErik Schmauss * MPST - Memory Power State Table (ACPI 5.0) 1154e62f8227SErik Schmauss * Version 1 1155e62f8227SErik Schmauss * 1156e62f8227SErik Schmauss ******************************************************************************/ 1157e62f8227SErik Schmauss 1158e62f8227SErik Schmauss #define ACPI_MPST_CHANNEL_INFO \ 1159e62f8227SErik Schmauss u8 channel_id; \ 1160e62f8227SErik Schmauss u8 reserved1[3]; \ 1161e62f8227SErik Schmauss u16 power_node_count; \ 1162e62f8227SErik Schmauss u16 reserved2; 1163e62f8227SErik Schmauss 1164e62f8227SErik Schmauss /* Main table */ 1165e62f8227SErik Schmauss 1166e62f8227SErik Schmauss struct acpi_table_mpst { 1167e62f8227SErik Schmauss struct acpi_table_header header; /* Common ACPI table header */ 1168e62f8227SErik Schmauss ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */ 1169e62f8227SErik Schmauss }; 1170e62f8227SErik Schmauss 1171e62f8227SErik Schmauss /* Memory Platform Communication Channel Info */ 1172e62f8227SErik Schmauss 1173e62f8227SErik Schmauss struct acpi_mpst_channel { 1174e62f8227SErik Schmauss ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */ 1175e62f8227SErik Schmauss }; 1176e62f8227SErik Schmauss 1177e62f8227SErik Schmauss /* Memory Power Node Structure */ 1178e62f8227SErik Schmauss 1179e62f8227SErik Schmauss struct acpi_mpst_power_node { 1180e62f8227SErik Schmauss u8 flags; 1181e62f8227SErik Schmauss u8 reserved1; 1182e62f8227SErik Schmauss u16 node_id; 1183e62f8227SErik Schmauss u32 length; 1184e62f8227SErik Schmauss u64 range_address; 1185e62f8227SErik Schmauss u64 range_length; 1186e62f8227SErik Schmauss u32 num_power_states; 1187e62f8227SErik Schmauss u32 num_physical_components; 1188e62f8227SErik Schmauss }; 1189e62f8227SErik Schmauss 1190e62f8227SErik Schmauss /* Values for Flags field above */ 1191e62f8227SErik Schmauss 1192e62f8227SErik Schmauss #define ACPI_MPST_ENABLED 1 1193e62f8227SErik Schmauss #define ACPI_MPST_POWER_MANAGED 2 1194e62f8227SErik Schmauss #define ACPI_MPST_HOT_PLUG_CAPABLE 4 1195e62f8227SErik Schmauss 1196e62f8227SErik Schmauss /* Memory Power State Structure (follows POWER_NODE above) */ 1197e62f8227SErik Schmauss 1198e62f8227SErik Schmauss struct acpi_mpst_power_state { 1199e62f8227SErik Schmauss u8 power_state; 1200e62f8227SErik Schmauss u8 info_index; 1201e62f8227SErik Schmauss }; 1202e62f8227SErik Schmauss 1203e62f8227SErik Schmauss /* Physical Component ID Structure (follows POWER_STATE above) */ 1204e62f8227SErik Schmauss 1205e62f8227SErik Schmauss struct acpi_mpst_component { 1206e62f8227SErik Schmauss u16 component_id; 1207e62f8227SErik Schmauss }; 1208e62f8227SErik Schmauss 1209e62f8227SErik Schmauss /* Memory Power State Characteristics Structure (follows all POWER_NODEs) */ 1210e62f8227SErik Schmauss 1211e62f8227SErik Schmauss struct acpi_mpst_data_hdr { 1212e62f8227SErik Schmauss u16 characteristics_count; 1213e62f8227SErik Schmauss u16 reserved; 1214e62f8227SErik Schmauss }; 1215e62f8227SErik Schmauss 1216e62f8227SErik Schmauss struct acpi_mpst_power_data { 1217e62f8227SErik Schmauss u8 structure_id; 1218e62f8227SErik Schmauss u8 flags; 1219e62f8227SErik Schmauss u16 reserved1; 1220e62f8227SErik Schmauss u32 average_power; 1221e62f8227SErik Schmauss u32 power_saving; 1222e62f8227SErik Schmauss u64 exit_latency; 1223e62f8227SErik Schmauss u64 reserved2; 1224e62f8227SErik Schmauss }; 1225e62f8227SErik Schmauss 1226e62f8227SErik Schmauss /* Values for Flags field above */ 1227e62f8227SErik Schmauss 1228e62f8227SErik Schmauss #define ACPI_MPST_PRESERVE 1 1229e62f8227SErik Schmauss #define ACPI_MPST_AUTOENTRY 2 1230e62f8227SErik Schmauss #define ACPI_MPST_AUTOEXIT 4 1231e62f8227SErik Schmauss 1232e62f8227SErik Schmauss /* Shared Memory Region (not part of an ACPI table) */ 1233e62f8227SErik Schmauss 1234e62f8227SErik Schmauss struct acpi_mpst_shared { 1235e62f8227SErik Schmauss u32 signature; 1236e62f8227SErik Schmauss u16 pcc_command; 1237e62f8227SErik Schmauss u16 pcc_status; 1238e62f8227SErik Schmauss u32 command_register; 1239e62f8227SErik Schmauss u32 status_register; 1240e62f8227SErik Schmauss u32 power_state_id; 1241e62f8227SErik Schmauss u32 power_node_id; 1242e62f8227SErik Schmauss u64 energy_consumed; 1243e62f8227SErik Schmauss u64 average_power; 1244e62f8227SErik Schmauss }; 1245e62f8227SErik Schmauss 1246e62f8227SErik Schmauss /******************************************************************************* 1247e62f8227SErik Schmauss * 1248e62f8227SErik Schmauss * MSCT - Maximum System Characteristics Table (ACPI 4.0) 1249e62f8227SErik Schmauss * Version 1 1250e62f8227SErik Schmauss * 1251e62f8227SErik Schmauss ******************************************************************************/ 1252e62f8227SErik Schmauss 1253e62f8227SErik Schmauss struct acpi_table_msct { 1254e62f8227SErik Schmauss struct acpi_table_header header; /* Common ACPI table header */ 1255e62f8227SErik Schmauss u32 proximity_offset; /* Location of proximity info struct(s) */ 1256e62f8227SErik Schmauss u32 max_proximity_domains; /* Max number of proximity domains */ 1257e62f8227SErik Schmauss u32 max_clock_domains; /* Max number of clock domains */ 1258e62f8227SErik Schmauss u64 max_address; /* Max physical address in system */ 1259e62f8227SErik Schmauss }; 1260e62f8227SErik Schmauss 1261e62f8227SErik Schmauss /* subtable - Maximum Proximity Domain Information. Version 1 */ 1262e62f8227SErik Schmauss 1263e62f8227SErik Schmauss struct acpi_msct_proximity { 1264e62f8227SErik Schmauss u8 revision; 1265e62f8227SErik Schmauss u8 length; 1266e62f8227SErik Schmauss u32 range_start; /* Start of domain range */ 1267e62f8227SErik Schmauss u32 range_end; /* End of domain range */ 1268e62f8227SErik Schmauss u32 processor_capacity; 1269e62f8227SErik Schmauss u64 memory_capacity; /* In bytes */ 1270e62f8227SErik Schmauss }; 1271e62f8227SErik Schmauss 1272e62f8227SErik Schmauss /******************************************************************************* 1273e62f8227SErik Schmauss * 12745132f2faSBob Moore * MSDM - Microsoft Data Management table 12755132f2faSBob Moore * 12765132f2faSBob Moore * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)", 12775132f2faSBob Moore * November 29, 2011. Copyright 2011 Microsoft 12785132f2faSBob Moore * 12795132f2faSBob Moore ******************************************************************************/ 12805132f2faSBob Moore 12815132f2faSBob Moore /* Basic MSDM table is only the common ACPI header */ 12825132f2faSBob Moore 12835132f2faSBob Moore struct acpi_table_msdm { 12845132f2faSBob Moore struct acpi_table_header header; /* Common ACPI table header */ 12855132f2faSBob Moore }; 12865132f2faSBob Moore 12875132f2faSBob Moore /******************************************************************************* 12885132f2faSBob Moore * 1289e62f8227SErik Schmauss * NFIT - NVDIMM Interface Table (ACPI 6.0+) 1290e62f8227SErik Schmauss * Version 1 1291e62f8227SErik Schmauss * 1292e62f8227SErik Schmauss ******************************************************************************/ 1293e62f8227SErik Schmauss 1294e62f8227SErik Schmauss struct acpi_table_nfit { 1295e62f8227SErik Schmauss struct acpi_table_header header; /* Common ACPI table header */ 1296e62f8227SErik Schmauss u32 reserved; /* Reserved, must be zero */ 1297e62f8227SErik Schmauss }; 1298e62f8227SErik Schmauss 1299e62f8227SErik Schmauss /* Subtable header for NFIT */ 1300e62f8227SErik Schmauss 1301e62f8227SErik Schmauss struct acpi_nfit_header { 1302e62f8227SErik Schmauss u16 type; 1303e62f8227SErik Schmauss u16 length; 1304e62f8227SErik Schmauss }; 1305e62f8227SErik Schmauss 1306e62f8227SErik Schmauss /* Values for subtable type in struct acpi_nfit_header */ 1307e62f8227SErik Schmauss 1308e62f8227SErik Schmauss enum acpi_nfit_type { 1309e62f8227SErik Schmauss ACPI_NFIT_TYPE_SYSTEM_ADDRESS = 0, 1310e62f8227SErik Schmauss ACPI_NFIT_TYPE_MEMORY_MAP = 1, 1311e62f8227SErik Schmauss ACPI_NFIT_TYPE_INTERLEAVE = 2, 1312e62f8227SErik Schmauss ACPI_NFIT_TYPE_SMBIOS = 3, 1313e62f8227SErik Schmauss ACPI_NFIT_TYPE_CONTROL_REGION = 4, 1314e62f8227SErik Schmauss ACPI_NFIT_TYPE_DATA_REGION = 5, 1315e62f8227SErik Schmauss ACPI_NFIT_TYPE_FLUSH_ADDRESS = 6, 1316e62f8227SErik Schmauss ACPI_NFIT_TYPE_CAPABILITIES = 7, 1317e62f8227SErik Schmauss ACPI_NFIT_TYPE_RESERVED = 8 /* 8 and greater are reserved */ 1318e62f8227SErik Schmauss }; 1319e62f8227SErik Schmauss 1320e62f8227SErik Schmauss /* 1321e62f8227SErik Schmauss * NFIT Subtables 1322e62f8227SErik Schmauss */ 1323e62f8227SErik Schmauss 1324e62f8227SErik Schmauss /* 0: System Physical Address Range Structure */ 1325e62f8227SErik Schmauss 1326e62f8227SErik Schmauss struct acpi_nfit_system_address { 1327e62f8227SErik Schmauss struct acpi_nfit_header header; 1328e62f8227SErik Schmauss u16 range_index; 1329e62f8227SErik Schmauss u16 flags; 1330e62f8227SErik Schmauss u32 reserved; /* Reserved, must be zero */ 1331e62f8227SErik Schmauss u32 proximity_domain; 1332e62f8227SErik Schmauss u8 range_guid[16]; 1333e62f8227SErik Schmauss u64 address; 1334e62f8227SErik Schmauss u64 length; 1335e62f8227SErik Schmauss u64 memory_mapping; 1336cf16b05cSBob Moore u64 location_cookie; /* ACPI 6.4 */ 1337e62f8227SErik Schmauss }; 1338e62f8227SErik Schmauss 1339e62f8227SErik Schmauss /* Flags */ 1340e62f8227SErik Schmauss 1341e62f8227SErik Schmauss #define ACPI_NFIT_ADD_ONLINE_ONLY (1) /* 00: Add/Online Operation Only */ 1342e62f8227SErik Schmauss #define ACPI_NFIT_PROXIMITY_VALID (1<<1) /* 01: Proximity Domain Valid */ 1343cf16b05cSBob Moore #define ACPI_NFIT_LOCATION_COOKIE_VALID (1<<2) /* 02: SPA location cookie valid (ACPI 6.4) */ 1344e62f8227SErik Schmauss 1345e62f8227SErik Schmauss /* Range Type GUIDs appear in the include/acuuid.h file */ 1346e62f8227SErik Schmauss 1347e62f8227SErik Schmauss /* 1: Memory Device to System Address Range Map Structure */ 1348e62f8227SErik Schmauss 1349e62f8227SErik Schmauss struct acpi_nfit_memory_map { 1350e62f8227SErik Schmauss struct acpi_nfit_header header; 1351e62f8227SErik Schmauss u32 device_handle; 1352e62f8227SErik Schmauss u16 physical_id; 1353e62f8227SErik Schmauss u16 region_id; 1354e62f8227SErik Schmauss u16 range_index; 1355e62f8227SErik Schmauss u16 region_index; 1356e62f8227SErik Schmauss u64 region_size; 1357e62f8227SErik Schmauss u64 region_offset; 1358e62f8227SErik Schmauss u64 address; 1359e62f8227SErik Schmauss u16 interleave_index; 1360e62f8227SErik Schmauss u16 interleave_ways; 1361e62f8227SErik Schmauss u16 flags; 1362e62f8227SErik Schmauss u16 reserved; /* Reserved, must be zero */ 1363e62f8227SErik Schmauss }; 1364e62f8227SErik Schmauss 1365e62f8227SErik Schmauss /* Flags */ 1366e62f8227SErik Schmauss 1367e62f8227SErik Schmauss #define ACPI_NFIT_MEM_SAVE_FAILED (1) /* 00: Last SAVE to Memory Device failed */ 1368e62f8227SErik Schmauss #define ACPI_NFIT_MEM_RESTORE_FAILED (1<<1) /* 01: Last RESTORE from Memory Device failed */ 1369e62f8227SErik Schmauss #define ACPI_NFIT_MEM_FLUSH_FAILED (1<<2) /* 02: Platform flush failed */ 1370e62f8227SErik Schmauss #define ACPI_NFIT_MEM_NOT_ARMED (1<<3) /* 03: Memory Device is not armed */ 1371e62f8227SErik Schmauss #define ACPI_NFIT_MEM_HEALTH_OBSERVED (1<<4) /* 04: Memory Device observed SMART/health events */ 1372e62f8227SErik Schmauss #define ACPI_NFIT_MEM_HEALTH_ENABLED (1<<5) /* 05: SMART/health events enabled */ 1373e62f8227SErik Schmauss #define ACPI_NFIT_MEM_MAP_FAILED (1<<6) /* 06: Mapping to SPA failed */ 1374e62f8227SErik Schmauss 1375e62f8227SErik Schmauss /* 2: Interleave Structure */ 1376e62f8227SErik Schmauss 1377e62f8227SErik Schmauss struct acpi_nfit_interleave { 1378e62f8227SErik Schmauss struct acpi_nfit_header header; 1379e62f8227SErik Schmauss u16 interleave_index; 1380e62f8227SErik Schmauss u16 reserved; /* Reserved, must be zero */ 1381e62f8227SErik Schmauss u32 line_count; 1382e62f8227SErik Schmauss u32 line_size; 1383e62f8227SErik Schmauss u32 line_offset[1]; /* Variable length */ 1384e62f8227SErik Schmauss }; 1385e62f8227SErik Schmauss 1386e62f8227SErik Schmauss /* 3: SMBIOS Management Information Structure */ 1387e62f8227SErik Schmauss 1388e62f8227SErik Schmauss struct acpi_nfit_smbios { 1389e62f8227SErik Schmauss struct acpi_nfit_header header; 1390e62f8227SErik Schmauss u32 reserved; /* Reserved, must be zero */ 1391e62f8227SErik Schmauss u8 data[1]; /* Variable length */ 1392e62f8227SErik Schmauss }; 1393e62f8227SErik Schmauss 1394e62f8227SErik Schmauss /* 4: NVDIMM Control Region Structure */ 1395e62f8227SErik Schmauss 1396e62f8227SErik Schmauss struct acpi_nfit_control_region { 1397e62f8227SErik Schmauss struct acpi_nfit_header header; 1398e62f8227SErik Schmauss u16 region_index; 1399e62f8227SErik Schmauss u16 vendor_id; 1400e62f8227SErik Schmauss u16 device_id; 1401e62f8227SErik Schmauss u16 revision_id; 1402e62f8227SErik Schmauss u16 subsystem_vendor_id; 1403e62f8227SErik Schmauss u16 subsystem_device_id; 1404e62f8227SErik Schmauss u16 subsystem_revision_id; 1405e62f8227SErik Schmauss u8 valid_fields; 1406e62f8227SErik Schmauss u8 manufacturing_location; 1407e62f8227SErik Schmauss u16 manufacturing_date; 1408e62f8227SErik Schmauss u8 reserved[2]; /* Reserved, must be zero */ 1409e62f8227SErik Schmauss u32 serial_number; 1410e62f8227SErik Schmauss u16 code; 1411e62f8227SErik Schmauss u16 windows; 1412e62f8227SErik Schmauss u64 window_size; 1413e62f8227SErik Schmauss u64 command_offset; 1414e62f8227SErik Schmauss u64 command_size; 1415e62f8227SErik Schmauss u64 status_offset; 1416e62f8227SErik Schmauss u64 status_size; 1417e62f8227SErik Schmauss u16 flags; 1418e62f8227SErik Schmauss u8 reserved1[6]; /* Reserved, must be zero */ 1419e62f8227SErik Schmauss }; 1420e62f8227SErik Schmauss 1421e62f8227SErik Schmauss /* Flags */ 1422e62f8227SErik Schmauss 1423e62f8227SErik Schmauss #define ACPI_NFIT_CONTROL_BUFFERED (1) /* Block Data Windows implementation is buffered */ 1424e62f8227SErik Schmauss 1425e62f8227SErik Schmauss /* valid_fields bits */ 1426e62f8227SErik Schmauss 1427e62f8227SErik Schmauss #define ACPI_NFIT_CONTROL_MFG_INFO_VALID (1) /* Manufacturing fields are valid */ 1428e62f8227SErik Schmauss 1429e62f8227SErik Schmauss /* 5: NVDIMM Block Data Window Region Structure */ 1430e62f8227SErik Schmauss 1431e62f8227SErik Schmauss struct acpi_nfit_data_region { 1432e62f8227SErik Schmauss struct acpi_nfit_header header; 1433e62f8227SErik Schmauss u16 region_index; 1434e62f8227SErik Schmauss u16 windows; 1435e62f8227SErik Schmauss u64 offset; 1436e62f8227SErik Schmauss u64 size; 1437e62f8227SErik Schmauss u64 capacity; 1438e62f8227SErik Schmauss u64 start_address; 1439e62f8227SErik Schmauss }; 1440e62f8227SErik Schmauss 1441e62f8227SErik Schmauss /* 6: Flush Hint Address Structure */ 1442e62f8227SErik Schmauss 1443e62f8227SErik Schmauss struct acpi_nfit_flush_address { 1444e62f8227SErik Schmauss struct acpi_nfit_header header; 1445e62f8227SErik Schmauss u32 device_handle; 1446e62f8227SErik Schmauss u16 hint_count; 1447e62f8227SErik Schmauss u8 reserved[6]; /* Reserved, must be zero */ 1448e62f8227SErik Schmauss u64 hint_address[1]; /* Variable length */ 1449e62f8227SErik Schmauss }; 1450e62f8227SErik Schmauss 1451e62f8227SErik Schmauss /* 7: Platform Capabilities Structure */ 1452e62f8227SErik Schmauss 1453e62f8227SErik Schmauss struct acpi_nfit_capabilities { 1454e62f8227SErik Schmauss struct acpi_nfit_header header; 1455e62f8227SErik Schmauss u8 highest_capability; 1456e62f8227SErik Schmauss u8 reserved[3]; /* Reserved, must be zero */ 1457e62f8227SErik Schmauss u32 capabilities; 1458e62f8227SErik Schmauss u32 reserved2; 1459e62f8227SErik Schmauss }; 1460e62f8227SErik Schmauss 1461e62f8227SErik Schmauss /* Capabilities Flags */ 1462e62f8227SErik Schmauss 1463e62f8227SErik Schmauss #define ACPI_NFIT_CAPABILITY_CACHE_FLUSH (1) /* 00: Cache Flush to NVDIMM capable */ 1464e62f8227SErik Schmauss #define ACPI_NFIT_CAPABILITY_MEM_FLUSH (1<<1) /* 01: Memory Flush to NVDIMM capable */ 1465e62f8227SErik Schmauss #define ACPI_NFIT_CAPABILITY_MEM_MIRRORING (1<<2) /* 02: Memory Mirroring capable */ 1466e62f8227SErik Schmauss 1467e62f8227SErik Schmauss /* 1468e62f8227SErik Schmauss * NFIT/DVDIMM device handle support - used as the _ADR for each NVDIMM 1469e62f8227SErik Schmauss */ 1470e62f8227SErik Schmauss struct nfit_device_handle { 1471e62f8227SErik Schmauss u32 handle; 1472e62f8227SErik Schmauss }; 1473e62f8227SErik Schmauss 1474e62f8227SErik Schmauss /* Device handle construction and extraction macros */ 1475e62f8227SErik Schmauss 1476e62f8227SErik Schmauss #define ACPI_NFIT_DIMM_NUMBER_MASK 0x0000000F 1477e62f8227SErik Schmauss #define ACPI_NFIT_CHANNEL_NUMBER_MASK 0x000000F0 1478e62f8227SErik Schmauss #define ACPI_NFIT_MEMORY_ID_MASK 0x00000F00 1479e62f8227SErik Schmauss #define ACPI_NFIT_SOCKET_ID_MASK 0x0000F000 1480e62f8227SErik Schmauss #define ACPI_NFIT_NODE_ID_MASK 0x0FFF0000 1481e62f8227SErik Schmauss 1482e62f8227SErik Schmauss #define ACPI_NFIT_DIMM_NUMBER_OFFSET 0 1483e62f8227SErik Schmauss #define ACPI_NFIT_CHANNEL_NUMBER_OFFSET 4 1484e62f8227SErik Schmauss #define ACPI_NFIT_MEMORY_ID_OFFSET 8 1485e62f8227SErik Schmauss #define ACPI_NFIT_SOCKET_ID_OFFSET 12 1486e62f8227SErik Schmauss #define ACPI_NFIT_NODE_ID_OFFSET 16 1487e62f8227SErik Schmauss 1488e62f8227SErik Schmauss /* Macro to construct a NFIT/NVDIMM device handle */ 1489e62f8227SErik Schmauss 1490e62f8227SErik Schmauss #define ACPI_NFIT_BUILD_DEVICE_HANDLE(dimm, channel, memory, socket, node) \ 1491e62f8227SErik Schmauss ((dimm) | \ 1492e62f8227SErik Schmauss ((channel) << ACPI_NFIT_CHANNEL_NUMBER_OFFSET) | \ 1493e62f8227SErik Schmauss ((memory) << ACPI_NFIT_MEMORY_ID_OFFSET) | \ 1494e62f8227SErik Schmauss ((socket) << ACPI_NFIT_SOCKET_ID_OFFSET) | \ 1495e62f8227SErik Schmauss ((node) << ACPI_NFIT_NODE_ID_OFFSET)) 1496e62f8227SErik Schmauss 1497e62f8227SErik Schmauss /* Macros to extract individual fields from a NFIT/NVDIMM device handle */ 1498e62f8227SErik Schmauss 1499e62f8227SErik Schmauss #define ACPI_NFIT_GET_DIMM_NUMBER(handle) \ 1500e62f8227SErik Schmauss ((handle) & ACPI_NFIT_DIMM_NUMBER_MASK) 1501e62f8227SErik Schmauss 1502e62f8227SErik Schmauss #define ACPI_NFIT_GET_CHANNEL_NUMBER(handle) \ 1503e62f8227SErik Schmauss (((handle) & ACPI_NFIT_CHANNEL_NUMBER_MASK) >> ACPI_NFIT_CHANNEL_NUMBER_OFFSET) 1504e62f8227SErik Schmauss 1505e62f8227SErik Schmauss #define ACPI_NFIT_GET_MEMORY_ID(handle) \ 1506e62f8227SErik Schmauss (((handle) & ACPI_NFIT_MEMORY_ID_MASK) >> ACPI_NFIT_MEMORY_ID_OFFSET) 1507e62f8227SErik Schmauss 1508e62f8227SErik Schmauss #define ACPI_NFIT_GET_SOCKET_ID(handle) \ 1509e62f8227SErik Schmauss (((handle) & ACPI_NFIT_SOCKET_ID_MASK) >> ACPI_NFIT_SOCKET_ID_OFFSET) 1510e62f8227SErik Schmauss 1511e62f8227SErik Schmauss #define ACPI_NFIT_GET_NODE_ID(handle) \ 1512e62f8227SErik Schmauss (((handle) & ACPI_NFIT_NODE_ID_MASK) >> ACPI_NFIT_NODE_ID_OFFSET) 1513e62f8227SErik Schmauss 1514e62f8227SErik Schmauss /******************************************************************************* 1515e62f8227SErik Schmauss * 1516a805aab8SBob Moore * NHLT - Non HD Audio Link Table 1517a805aab8SBob Moore * 1518a805aab8SBob Moore * Conforms to: Intel Smart Sound Technology NHLT Specification 1519a805aab8SBob Moore * Version 0.8.1, January 2020. 1520a805aab8SBob Moore * 1521a805aab8SBob Moore ******************************************************************************/ 1522a805aab8SBob Moore 1523a805aab8SBob Moore /* Main table */ 1524a805aab8SBob Moore 1525a805aab8SBob Moore struct acpi_table_nhlt { 1526a805aab8SBob Moore struct acpi_table_header header; /* Common ACPI table header */ 1527a805aab8SBob Moore u8 endpoint_count; 1528a805aab8SBob Moore }; 1529a805aab8SBob Moore 1530a805aab8SBob Moore struct acpi_nhlt_endpoint { 1531a805aab8SBob Moore u32 descriptor_length; 1532a805aab8SBob Moore u8 link_type; 1533a805aab8SBob Moore u8 instance_id; 1534a805aab8SBob Moore u16 vendor_id; 1535a805aab8SBob Moore u16 device_id; 1536a805aab8SBob Moore u16 revision_id; 1537a805aab8SBob Moore u32 subsystem_id; 1538a805aab8SBob Moore u8 device_type; 1539a805aab8SBob Moore u8 direction; 1540a805aab8SBob Moore u8 virtual_bus_id; 1541a805aab8SBob Moore }; 1542a805aab8SBob Moore 1543a805aab8SBob Moore /* Types for link_type field above */ 1544a805aab8SBob Moore 1545a805aab8SBob Moore #define ACPI_NHLT_RESERVED_HD_AUDIO 0 1546a805aab8SBob Moore #define ACPI_NHLT_RESERVED_DSP 1 1547a805aab8SBob Moore #define ACPI_NHLT_PDM 2 1548a805aab8SBob Moore #define ACPI_NHLT_SSP 3 1549a805aab8SBob Moore #define ACPI_NHLT_RESERVED_SLIMBUS 4 1550a805aab8SBob Moore #define ACPI_NHLT_RESERVED_SOUNDWIRE 5 1551a805aab8SBob Moore #define ACPI_NHLT_TYPE_RESERVED 6 /* 6 and above are reserved */ 1552a805aab8SBob Moore 1553a805aab8SBob Moore /* All other values above are reserved */ 1554a805aab8SBob Moore 1555a805aab8SBob Moore /* Values for device_id field above */ 1556a805aab8SBob Moore 1557a805aab8SBob Moore #define ACPI_NHLT_PDM_DMIC 0xAE20 1558a805aab8SBob Moore #define ACPI_NHLT_BT_SIDEBAND 0xAE30 1559a805aab8SBob Moore #define ACPI_NHLT_I2S_TDM_CODECS 0xAE23 1560a805aab8SBob Moore 1561a805aab8SBob Moore /* Values for device_type field above */ 1562a805aab8SBob Moore 1563a805aab8SBob Moore /* SSP Link */ 1564a805aab8SBob Moore 1565a805aab8SBob Moore #define ACPI_NHLT_LINK_BT_SIDEBAND 0 1566a805aab8SBob Moore #define ACPI_NHLT_LINK_FM 1 1567a805aab8SBob Moore #define ACPI_NHLT_LINK_MODEM 2 1568a805aab8SBob Moore /* 3 is reserved */ 1569a805aab8SBob Moore #define ACPI_NHLT_LINK_SSP_ANALOG_CODEC 4 1570a805aab8SBob Moore 1571a805aab8SBob Moore /* PDM Link */ 1572a805aab8SBob Moore 1573a805aab8SBob Moore #define ACPI_NHLT_PDM_ON_CAVS_1P8 0 1574a805aab8SBob Moore #define ACPI_NHLT_PDM_ON_CAVS_1P5 1 1575a805aab8SBob Moore 1576a805aab8SBob Moore /* Values for Direction field above */ 1577a805aab8SBob Moore 1578a805aab8SBob Moore #define ACPI_NHLT_DIR_RENDER 0 1579a805aab8SBob Moore #define ACPI_NHLT_DIR_CAPTURE 1 1580a805aab8SBob Moore #define ACPI_NHLT_DIR_RENDER_LOOPBACK 2 1581a805aab8SBob Moore #define ACPI_NHLT_DIR_RENDER_FEEDBACK 3 1582a805aab8SBob Moore #define ACPI_NHLT_DIR_RESERVED 4 /* 4 and above are reserved */ 1583a805aab8SBob Moore 1584a805aab8SBob Moore struct acpi_nhlt_device_specific_config { 1585a805aab8SBob Moore u32 capabilities_size; 1586a805aab8SBob Moore u8 virtual_slot; 1587a805aab8SBob Moore u8 config_type; 1588a805aab8SBob Moore }; 1589a805aab8SBob Moore 1590a805aab8SBob Moore struct acpi_nhlt_device_specific_config_a { 1591a805aab8SBob Moore u32 capabilities_size; 1592a805aab8SBob Moore u8 virtual_slot; 1593a805aab8SBob Moore u8 config_type; 1594a805aab8SBob Moore u8 array_type; 1595a805aab8SBob Moore }; 1596a805aab8SBob Moore 1597a805aab8SBob Moore /* Values for Config Type above */ 1598a805aab8SBob Moore 1599e4a07f5aSBob Moore #define ACPI_NHLT_CONFIG_TYPE_GENERIC 0x00 1600e4a07f5aSBob Moore #define ACPI_NHLT_CONFIG_TYPE_MIC_ARRAY 0x01 1601e4a07f5aSBob Moore #define ACPI_NHLT_CONFIG_TYPE_RENDER_FEEDBACK 0x03 1602e4a07f5aSBob Moore #define ACPI_NHLT_CONFIG_TYPE_RESERVED 0x04 /* 4 and above are reserved */ 1603a805aab8SBob Moore 1604a805aab8SBob Moore struct acpi_nhlt_device_specific_config_b { 1605a805aab8SBob Moore u32 capabilities_size; 1606a805aab8SBob Moore }; 1607a805aab8SBob Moore 1608a805aab8SBob Moore struct acpi_nhlt_device_specific_config_c { 1609a805aab8SBob Moore u32 capabilities_size; 1610a805aab8SBob Moore u8 virtual_slot; 1611a805aab8SBob Moore }; 1612a805aab8SBob Moore 1613e4a07f5aSBob Moore struct acpi_nhlt_render_device_specific_config { 1614e4a07f5aSBob Moore u32 capabilities_size; 1615e4a07f5aSBob Moore u8 virtual_slot; 1616e4a07f5aSBob Moore }; 1617e4a07f5aSBob Moore 1618a805aab8SBob Moore struct acpi_nhlt_wave_extensible { 1619a805aab8SBob Moore u16 format_tag; 1620a805aab8SBob Moore u16 channel_count; 1621a805aab8SBob Moore u32 samples_per_sec; 1622a805aab8SBob Moore u32 avg_bytes_per_sec; 1623a805aab8SBob Moore u16 block_align; 1624a805aab8SBob Moore u16 bits_per_sample; 1625a805aab8SBob Moore u16 extra_format_size; 1626a805aab8SBob Moore u16 valid_bits_per_sample; 1627a805aab8SBob Moore u32 channel_mask; 1628a805aab8SBob Moore u8 sub_format_guid[16]; 1629a805aab8SBob Moore }; 1630a805aab8SBob Moore 1631a805aab8SBob Moore /* Values for channel_mask above */ 1632a805aab8SBob Moore 1633a805aab8SBob Moore #define ACPI_NHLT_SPKR_FRONT_LEFT 0x1 1634a805aab8SBob Moore #define ACPI_NHLT_SPKR_FRONT_RIGHT 0x2 1635a805aab8SBob Moore #define ACPI_NHLT_SPKR_FRONT_CENTER 0x4 1636a805aab8SBob Moore #define ACPI_NHLT_SPKR_LOW_FREQ 0x8 1637a805aab8SBob Moore #define ACPI_NHLT_SPKR_BACK_LEFT 0x10 1638a805aab8SBob Moore #define ACPI_NHLT_SPKR_BACK_RIGHT 0x20 1639a805aab8SBob Moore #define ACPI_NHLT_SPKR_FRONT_LEFT_OF_CENTER 0x40 1640a805aab8SBob Moore #define ACPI_NHLT_SPKR_FRONT_RIGHT_OF_CENTER 0x80 1641a805aab8SBob Moore #define ACPI_NHLT_SPKR_BACK_CENTER 0x100 1642a805aab8SBob Moore #define ACPI_NHLT_SPKR_SIDE_LEFT 0x200 1643a805aab8SBob Moore #define ACPI_NHLT_SPKR_SIDE_RIGHT 0x400 1644a805aab8SBob Moore #define ACPI_NHLT_SPKR_TOP_CENTER 0x800 1645a805aab8SBob Moore #define ACPI_NHLT_SPKR_TOP_FRONT_LEFT 0x1000 1646a805aab8SBob Moore #define ACPI_NHLT_SPKR_TOP_FRONT_CENTER 0x2000 1647a805aab8SBob Moore #define ACPI_NHLT_SPKR_TOP_FRONT_RIGHT 0x4000 1648a805aab8SBob Moore #define ACPI_NHLT_SPKR_TOP_BACK_LEFT 0x8000 1649a805aab8SBob Moore #define ACPI_NHLT_SPKR_TOP_BACK_CENTER 0x10000 1650a805aab8SBob Moore #define ACPI_NHLT_SPKR_TOP_BACK_RIGHT 0x20000 1651a805aab8SBob Moore 1652a805aab8SBob Moore struct acpi_nhlt_format_config { 1653a805aab8SBob Moore struct acpi_nhlt_wave_extensible format; 1654a805aab8SBob Moore u32 capability_size; 1655a805aab8SBob Moore u8 capabilities[]; 1656a805aab8SBob Moore }; 1657a805aab8SBob Moore 1658a805aab8SBob Moore struct acpi_nhlt_formats_config { 1659a805aab8SBob Moore u8 formats_count; 1660a805aab8SBob Moore }; 1661a805aab8SBob Moore 1662a805aab8SBob Moore struct acpi_nhlt_device_specific_hdr { 1663a805aab8SBob Moore u8 virtual_slot; 1664a805aab8SBob Moore u8 config_type; 1665a805aab8SBob Moore }; 1666a805aab8SBob Moore 1667a805aab8SBob Moore /* Types for config_type above */ 1668a805aab8SBob Moore 1669a805aab8SBob Moore #define ACPI_NHLT_GENERIC 0 1670a805aab8SBob Moore #define ACPI_NHLT_MIC 1 1671a805aab8SBob Moore #define ACPI_NHLT_RENDER 3 1672a805aab8SBob Moore 1673a805aab8SBob Moore struct acpi_nhlt_mic_device_specific_config { 1674a805aab8SBob Moore struct acpi_nhlt_device_specific_hdr device_config; 1675a805aab8SBob Moore u8 array_type_ext; 1676a805aab8SBob Moore }; 1677a805aab8SBob Moore 1678a805aab8SBob Moore /* Values for array_type_ext above */ 1679a805aab8SBob Moore 168045882a81SBob Moore #define ACPI_NHLT_ARRAY_TYPE_RESERVED 0x09 /* 9 and below are reserved */ 1681e4a07f5aSBob Moore #define ACPI_NHLT_SMALL_LINEAR_2ELEMENT 0x0A 1682e4a07f5aSBob Moore #define ACPI_NHLT_BIG_LINEAR_2ELEMENT 0x0B 1683e4a07f5aSBob Moore #define ACPI_NHLT_FIRST_GEOMETRY_LINEAR_4ELEMENT 0x0C 1684e4a07f5aSBob Moore #define ACPI_NHLT_PLANAR_LSHAPED_4ELEMENT 0x0D 1685e4a07f5aSBob Moore #define ACPI_NHLT_SECOND_GEOMETRY_LINEAR_4ELEMENT 0x0E 1686e4a07f5aSBob Moore #define ACPI_NHLT_VENDOR_DEFINED 0x0F 1687e4a07f5aSBob Moore #define ACPI_NHLT_ARRAY_TYPE_MASK 0x0F 1688e4a07f5aSBob Moore #define ACPI_NHLT_ARRAY_TYPE_EXT_MASK 0x10 1689a805aab8SBob Moore 1690e4a07f5aSBob Moore #define ACPI_NHLT_NO_EXTENSION 0x0 1691e4a07f5aSBob Moore #define ACPI_NHLT_MIC_SNR_SENSITIVITY_EXT (1<<4) 1692e4a07f5aSBob Moore 1693e4a07f5aSBob Moore struct acpi_nhlt_vendor_mic_count { 1694e4a07f5aSBob Moore u8 microphone_count; 1695e4a07f5aSBob Moore }; 1696a805aab8SBob Moore 1697a805aab8SBob Moore struct acpi_nhlt_vendor_mic_config { 1698a805aab8SBob Moore u8 type; 1699a805aab8SBob Moore u8 panel; 170045882a81SBob Moore u16 speaker_position_distance; /* mm */ 170145882a81SBob Moore u16 horizontal_offset; /* mm */ 170245882a81SBob Moore u16 vertical_offset; /* mm */ 170345882a81SBob Moore u8 frequency_low_band; /* 5*Hz */ 170445882a81SBob Moore u8 frequency_high_band; /* 500*Hz */ 170545882a81SBob Moore u16 direction_angle; /* -180 - + 180 */ 170645882a81SBob Moore u16 elevation_angle; /* -180 - + 180 */ 170745882a81SBob Moore u16 work_vertical_angle_begin; /* -180 - + 180 with 2 deg step */ 170845882a81SBob Moore u16 work_vertical_angle_end; /* -180 - + 180 with 2 deg step */ 170945882a81SBob Moore u16 work_horizontal_angle_begin; /* -180 - + 180 with 2 deg step */ 171045882a81SBob Moore u16 work_horizontal_angle_end; /* -180 - + 180 with 2 deg step */ 1711a805aab8SBob Moore }; 1712a805aab8SBob Moore 1713a805aab8SBob Moore /* Values for Type field above */ 1714a805aab8SBob Moore 1715e4a07f5aSBob Moore #define ACPI_NHLT_MIC_OMNIDIRECTIONAL 0 1716e4a07f5aSBob Moore #define ACPI_NHLT_MIC_SUBCARDIOID 1 1717e4a07f5aSBob Moore #define ACPI_NHLT_MIC_CARDIOID 2 1718e4a07f5aSBob Moore #define ACPI_NHLT_MIC_SUPER_CARDIOID 3 1719e4a07f5aSBob Moore #define ACPI_NHLT_MIC_HYPER_CARDIOID 4 1720e4a07f5aSBob Moore #define ACPI_NHLT_MIC_8_SHAPED 5 172145882a81SBob Moore #define ACPI_NHLT_MIC_RESERVED6 6 /* 6 is reserved */ 1722e4a07f5aSBob Moore #define ACPI_NHLT_MIC_VENDOR_DEFINED 7 172345882a81SBob Moore #define ACPI_NHLT_MIC_RESERVED 8 /* 8 and above are reserved */ 1724a805aab8SBob Moore 1725a805aab8SBob Moore /* Values for Panel field above */ 1726a805aab8SBob Moore 1727e4a07f5aSBob Moore #define ACPI_NHLT_MIC_POSITION_TOP 0 1728e4a07f5aSBob Moore #define ACPI_NHLT_MIC_POSITION_BOTTOM 1 1729e4a07f5aSBob Moore #define ACPI_NHLT_MIC_POSITION_LEFT 2 1730e4a07f5aSBob Moore #define ACPI_NHLT_MIC_POSITION_RIGHT 3 1731e4a07f5aSBob Moore #define ACPI_NHLT_MIC_POSITION_FRONT 4 1732e4a07f5aSBob Moore #define ACPI_NHLT_MIC_POSITION_BACK 5 173345882a81SBob Moore #define ACPI_NHLT_MIC_POSITION_RESERVED 6 /* 6 and above are reserved */ 1734a805aab8SBob Moore 1735a805aab8SBob Moore struct acpi_nhlt_vendor_mic_device_specific_config { 1736a805aab8SBob Moore struct acpi_nhlt_mic_device_specific_config mic_array_device_config; 1737a805aab8SBob Moore u8 number_of_microphones; 173845882a81SBob Moore struct acpi_nhlt_vendor_mic_config mic_config[]; /* Indexed by number_of_microphones */ 1739a805aab8SBob Moore }; 1740a805aab8SBob Moore 1741a805aab8SBob Moore /* Microphone SNR and Sensitivity extension */ 1742a805aab8SBob Moore 1743a805aab8SBob Moore struct acpi_nhlt_mic_snr_sensitivity_extension { 1744a805aab8SBob Moore u32 SNR; 1745a805aab8SBob Moore u32 sensitivity; 1746a805aab8SBob Moore }; 1747a805aab8SBob Moore 1748e4a07f5aSBob Moore /* Render device with feedback */ 1749e4a07f5aSBob Moore 1750a805aab8SBob Moore struct acpi_nhlt_render_feedback_device_specific_config { 175145882a81SBob Moore u8 feedback_virtual_slot; /* Render slot in case of capture */ 175245882a81SBob Moore u16 feedback_channels; /* Informative only */ 1753a805aab8SBob Moore u16 feedback_valid_bits_per_sample; 1754a805aab8SBob Moore }; 1755a805aab8SBob Moore 17568bd24835SPiotr Maziarz /* Non documented structures */ 1757a805aab8SBob Moore 17588bd24835SPiotr Maziarz struct acpi_nhlt_device_info_count { 1759a805aab8SBob Moore u8 structure_count; 1760a805aab8SBob Moore }; 1761a805aab8SBob Moore 17628bd24835SPiotr Maziarz struct acpi_nhlt_device_info { 1763a805aab8SBob Moore u8 device_id[16]; 1764a805aab8SBob Moore u8 device_instance_id; 1765a805aab8SBob Moore u8 device_port_id; 17660c9a6727SBob Moore }; 17670c9a6727SBob Moore 1768a805aab8SBob Moore /******************************************************************************* 1769a805aab8SBob Moore * 1770e62f8227SErik Schmauss * PCCT - Platform Communications Channel Table (ACPI 5.0) 1771e62f8227SErik Schmauss * Version 2 (ACPI 6.2) 1772e62f8227SErik Schmauss * 1773e62f8227SErik Schmauss ******************************************************************************/ 1774e62f8227SErik Schmauss 1775e62f8227SErik Schmauss struct acpi_table_pcct { 1776e62f8227SErik Schmauss struct acpi_table_header header; /* Common ACPI table header */ 1777e62f8227SErik Schmauss u32 flags; 1778e62f8227SErik Schmauss u64 reserved; 1779e62f8227SErik Schmauss }; 1780e62f8227SErik Schmauss 1781e62f8227SErik Schmauss /* Values for Flags field above */ 1782e62f8227SErik Schmauss 1783e62f8227SErik Schmauss #define ACPI_PCCT_DOORBELL 1 1784e62f8227SErik Schmauss 1785e62f8227SErik Schmauss /* Values for subtable type in struct acpi_subtable_header */ 1786e62f8227SErik Schmauss 1787e62f8227SErik Schmauss enum acpi_pcct_type { 1788e62f8227SErik Schmauss ACPI_PCCT_TYPE_GENERIC_SUBSPACE = 0, 1789e62f8227SErik Schmauss ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE = 1, 1790e62f8227SErik Schmauss ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 = 2, /* ACPI 6.1 */ 1791e62f8227SErik Schmauss ACPI_PCCT_TYPE_EXT_PCC_MASTER_SUBSPACE = 3, /* ACPI 6.2 */ 1792e62f8227SErik Schmauss ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE = 4, /* ACPI 6.2 */ 179371f79a3fSErik Kaneda ACPI_PCCT_TYPE_HW_REG_COMM_SUBSPACE = 5, /* ACPI 6.4 */ 179471f79a3fSErik Kaneda ACPI_PCCT_TYPE_RESERVED = 6 /* 6 and greater are reserved */ 1795e62f8227SErik Schmauss }; 1796e62f8227SErik Schmauss 1797e62f8227SErik Schmauss /* 1798e62f8227SErik Schmauss * PCCT Subtables, correspond to Type in struct acpi_subtable_header 1799e62f8227SErik Schmauss */ 1800e62f8227SErik Schmauss 1801e62f8227SErik Schmauss /* 0: Generic Communications Subspace */ 1802e62f8227SErik Schmauss 1803e62f8227SErik Schmauss struct acpi_pcct_subspace { 1804e62f8227SErik Schmauss struct acpi_subtable_header header; 1805e62f8227SErik Schmauss u8 reserved[6]; 1806e62f8227SErik Schmauss u64 base_address; 1807e62f8227SErik Schmauss u64 length; 1808e62f8227SErik Schmauss struct acpi_generic_address doorbell_register; 1809e62f8227SErik Schmauss u64 preserve_mask; 1810e62f8227SErik Schmauss u64 write_mask; 1811e62f8227SErik Schmauss u32 latency; 1812e62f8227SErik Schmauss u32 max_access_rate; 1813e62f8227SErik Schmauss u16 min_turnaround_time; 1814e62f8227SErik Schmauss }; 1815e62f8227SErik Schmauss 1816e62f8227SErik Schmauss /* 1: HW-reduced Communications Subspace (ACPI 5.1) */ 1817e62f8227SErik Schmauss 1818e62f8227SErik Schmauss struct acpi_pcct_hw_reduced { 1819e62f8227SErik Schmauss struct acpi_subtable_header header; 1820e62f8227SErik Schmauss u32 platform_interrupt; 1821e62f8227SErik Schmauss u8 flags; 1822e62f8227SErik Schmauss u8 reserved; 1823e62f8227SErik Schmauss u64 base_address; 1824e62f8227SErik Schmauss u64 length; 1825e62f8227SErik Schmauss struct acpi_generic_address doorbell_register; 1826e62f8227SErik Schmauss u64 preserve_mask; 1827e62f8227SErik Schmauss u64 write_mask; 1828e62f8227SErik Schmauss u32 latency; 1829e62f8227SErik Schmauss u32 max_access_rate; 1830e62f8227SErik Schmauss u16 min_turnaround_time; 1831e62f8227SErik Schmauss }; 1832e62f8227SErik Schmauss 1833e62f8227SErik Schmauss /* 2: HW-reduced Communications Subspace Type 2 (ACPI 6.1) */ 1834e62f8227SErik Schmauss 1835e62f8227SErik Schmauss struct acpi_pcct_hw_reduced_type2 { 1836e62f8227SErik Schmauss struct acpi_subtable_header header; 1837e62f8227SErik Schmauss u32 platform_interrupt; 1838e62f8227SErik Schmauss u8 flags; 1839e62f8227SErik Schmauss u8 reserved; 1840e62f8227SErik Schmauss u64 base_address; 1841e62f8227SErik Schmauss u64 length; 1842e62f8227SErik Schmauss struct acpi_generic_address doorbell_register; 1843e62f8227SErik Schmauss u64 preserve_mask; 1844e62f8227SErik Schmauss u64 write_mask; 1845e62f8227SErik Schmauss u32 latency; 1846e62f8227SErik Schmauss u32 max_access_rate; 1847e62f8227SErik Schmauss u16 min_turnaround_time; 1848e62f8227SErik Schmauss struct acpi_generic_address platform_ack_register; 1849e62f8227SErik Schmauss u64 ack_preserve_mask; 1850e62f8227SErik Schmauss u64 ack_write_mask; 1851e62f8227SErik Schmauss }; 1852e62f8227SErik Schmauss 1853e62f8227SErik Schmauss /* 3: Extended PCC Master Subspace Type 3 (ACPI 6.2) */ 1854e62f8227SErik Schmauss 1855e62f8227SErik Schmauss struct acpi_pcct_ext_pcc_master { 1856e62f8227SErik Schmauss struct acpi_subtable_header header; 1857e62f8227SErik Schmauss u32 platform_interrupt; 1858e62f8227SErik Schmauss u8 flags; 1859e62f8227SErik Schmauss u8 reserved1; 1860e62f8227SErik Schmauss u64 base_address; 1861e62f8227SErik Schmauss u32 length; 1862e62f8227SErik Schmauss struct acpi_generic_address doorbell_register; 1863e62f8227SErik Schmauss u64 preserve_mask; 1864e62f8227SErik Schmauss u64 write_mask; 1865e62f8227SErik Schmauss u32 latency; 1866e62f8227SErik Schmauss u32 max_access_rate; 1867e62f8227SErik Schmauss u32 min_turnaround_time; 1868e62f8227SErik Schmauss struct acpi_generic_address platform_ack_register; 1869e62f8227SErik Schmauss u64 ack_preserve_mask; 1870e62f8227SErik Schmauss u64 ack_set_mask; 1871e62f8227SErik Schmauss u64 reserved2; 1872e62f8227SErik Schmauss struct acpi_generic_address cmd_complete_register; 1873e62f8227SErik Schmauss u64 cmd_complete_mask; 1874e62f8227SErik Schmauss struct acpi_generic_address cmd_update_register; 1875e62f8227SErik Schmauss u64 cmd_update_preserve_mask; 1876e62f8227SErik Schmauss u64 cmd_update_set_mask; 1877e62f8227SErik Schmauss struct acpi_generic_address error_status_register; 1878e62f8227SErik Schmauss u64 error_status_mask; 1879e62f8227SErik Schmauss }; 1880e62f8227SErik Schmauss 1881e62f8227SErik Schmauss /* 4: Extended PCC Slave Subspace Type 4 (ACPI 6.2) */ 1882e62f8227SErik Schmauss 1883e62f8227SErik Schmauss struct acpi_pcct_ext_pcc_slave { 1884e62f8227SErik Schmauss struct acpi_subtable_header header; 1885e62f8227SErik Schmauss u32 platform_interrupt; 1886e62f8227SErik Schmauss u8 flags; 1887e62f8227SErik Schmauss u8 reserved1; 1888e62f8227SErik Schmauss u64 base_address; 1889e62f8227SErik Schmauss u32 length; 1890e62f8227SErik Schmauss struct acpi_generic_address doorbell_register; 1891e62f8227SErik Schmauss u64 preserve_mask; 1892e62f8227SErik Schmauss u64 write_mask; 1893e62f8227SErik Schmauss u32 latency; 1894e62f8227SErik Schmauss u32 max_access_rate; 1895e62f8227SErik Schmauss u32 min_turnaround_time; 1896e62f8227SErik Schmauss struct acpi_generic_address platform_ack_register; 1897e62f8227SErik Schmauss u64 ack_preserve_mask; 1898e62f8227SErik Schmauss u64 ack_set_mask; 1899e62f8227SErik Schmauss u64 reserved2; 1900e62f8227SErik Schmauss struct acpi_generic_address cmd_complete_register; 1901e62f8227SErik Schmauss u64 cmd_complete_mask; 1902e62f8227SErik Schmauss struct acpi_generic_address cmd_update_register; 1903e62f8227SErik Schmauss u64 cmd_update_preserve_mask; 1904e62f8227SErik Schmauss u64 cmd_update_set_mask; 1905e62f8227SErik Schmauss struct acpi_generic_address error_status_register; 1906e62f8227SErik Schmauss u64 error_status_mask; 1907e62f8227SErik Schmauss }; 1908e62f8227SErik Schmauss 190971f79a3fSErik Kaneda /* 5: HW Registers based Communications Subspace */ 191071f79a3fSErik Kaneda 191171f79a3fSErik Kaneda struct acpi_pcct_hw_reg { 191271f79a3fSErik Kaneda struct acpi_subtable_header header; 191371f79a3fSErik Kaneda u16 version; 191471f79a3fSErik Kaneda u64 base_address; 191571f79a3fSErik Kaneda u64 length; 191671f79a3fSErik Kaneda struct acpi_generic_address doorbell_register; 191771f79a3fSErik Kaneda u64 doorbell_preserve; 191871f79a3fSErik Kaneda u64 doorbell_write; 191971f79a3fSErik Kaneda struct acpi_generic_address cmd_complete_register; 192071f79a3fSErik Kaneda u64 cmd_complete_mask; 192171f79a3fSErik Kaneda struct acpi_generic_address error_status_register; 192271f79a3fSErik Kaneda u64 error_status_mask; 192371f79a3fSErik Kaneda u32 nominal_latency; 192471f79a3fSErik Kaneda u32 min_turnaround_time; 192571f79a3fSErik Kaneda }; 192671f79a3fSErik Kaneda 1927e62f8227SErik Schmauss /* Values for doorbell flags above */ 1928e62f8227SErik Schmauss 1929e62f8227SErik Schmauss #define ACPI_PCCT_INTERRUPT_POLARITY (1) 1930e62f8227SErik Schmauss #define ACPI_PCCT_INTERRUPT_MODE (1<<1) 1931e62f8227SErik Schmauss 1932e62f8227SErik Schmauss /* 1933e62f8227SErik Schmauss * PCC memory structures (not part of the ACPI table) 1934e62f8227SErik Schmauss */ 1935e62f8227SErik Schmauss 1936e62f8227SErik Schmauss /* Shared Memory Region */ 1937e62f8227SErik Schmauss 1938e62f8227SErik Schmauss struct acpi_pcct_shared_memory { 1939e62f8227SErik Schmauss u32 signature; 1940e62f8227SErik Schmauss u16 command; 1941e62f8227SErik Schmauss u16 status; 1942e62f8227SErik Schmauss }; 1943e62f8227SErik Schmauss 1944e62f8227SErik Schmauss /* Extended PCC Subspace Shared Memory Region (ACPI 6.2) */ 1945e62f8227SErik Schmauss 1946e62f8227SErik Schmauss struct acpi_pcct_ext_pcc_shared_memory { 1947e62f8227SErik Schmauss u32 signature; 1948e62f8227SErik Schmauss u32 flags; 1949e62f8227SErik Schmauss u32 length; 1950e62f8227SErik Schmauss u32 command; 1951e62f8227SErik Schmauss }; 1952e62f8227SErik Schmauss 1953e62f8227SErik Schmauss /******************************************************************************* 1954e62f8227SErik Schmauss * 1955e62f8227SErik Schmauss * PDTT - Platform Debug Trigger Table (ACPI 6.2) 1956e62f8227SErik Schmauss * Version 0 1957e62f8227SErik Schmauss * 1958e62f8227SErik Schmauss ******************************************************************************/ 1959e62f8227SErik Schmauss 1960e62f8227SErik Schmauss struct acpi_table_pdtt { 1961e62f8227SErik Schmauss struct acpi_table_header header; /* Common ACPI table header */ 1962e62f8227SErik Schmauss u8 trigger_count; 1963e62f8227SErik Schmauss u8 reserved[3]; 1964e62f8227SErik Schmauss u32 array_offset; 1965e62f8227SErik Schmauss }; 1966e62f8227SErik Schmauss 1967e62f8227SErik Schmauss /* 1968e62f8227SErik Schmauss * PDTT Communication Channel Identifier Structure. 1969e62f8227SErik Schmauss * The number of these structures is defined by trigger_count above, 1970e62f8227SErik Schmauss * starting at array_offset. 1971e62f8227SErik Schmauss */ 1972e62f8227SErik Schmauss struct acpi_pdtt_channel { 1973e62f8227SErik Schmauss u8 subchannel_id; 1974e62f8227SErik Schmauss u8 flags; 1975e62f8227SErik Schmauss }; 1976e62f8227SErik Schmauss 1977e62f8227SErik Schmauss /* Flags for above */ 1978e62f8227SErik Schmauss 1979e62f8227SErik Schmauss #define ACPI_PDTT_RUNTIME_TRIGGER (1) 1980e62f8227SErik Schmauss #define ACPI_PDTT_WAIT_COMPLETION (1<<1) 1981f00175d0SErik Schmauss #define ACPI_PDTT_TRIGGER_ORDER (1<<2) 1982e62f8227SErik Schmauss 1983e62f8227SErik Schmauss /******************************************************************************* 1984e62f8227SErik Schmauss * 19859f400337SErik Kaneda * PHAT - Platform Health Assessment Table (ACPI 6.4) 19869f400337SErik Kaneda * Version 1 19879f400337SErik Kaneda * 19889f400337SErik Kaneda ******************************************************************************/ 19899f400337SErik Kaneda 19909f400337SErik Kaneda struct acpi_table_phat { 19919f400337SErik Kaneda struct acpi_table_header header; /* Common ACPI table header */ 19929f400337SErik Kaneda }; 19939f400337SErik Kaneda 19949f400337SErik Kaneda /* Common header for PHAT subtables that follow main table */ 19959f400337SErik Kaneda 19969f400337SErik Kaneda struct acpi_phat_header { 19979f400337SErik Kaneda u16 type; 19989f400337SErik Kaneda u16 length; 19999f400337SErik Kaneda u8 revision; 20009f400337SErik Kaneda }; 20019f400337SErik Kaneda 20029f400337SErik Kaneda /* Values for Type field above */ 20039f400337SErik Kaneda 20049f400337SErik Kaneda #define ACPI_PHAT_TYPE_FW_VERSION_DATA 0 20059f400337SErik Kaneda #define ACPI_PHAT_TYPE_FW_HEALTH_DATA 1 20069f400337SErik Kaneda #define ACPI_PHAT_TYPE_RESERVED 2 /* 0x02-0xFFFF are reserved */ 20079f400337SErik Kaneda 20089f400337SErik Kaneda /* 20099f400337SErik Kaneda * PHAT subtables, correspond to Type in struct acpi_phat_header 20109f400337SErik Kaneda */ 20119f400337SErik Kaneda 20129f400337SErik Kaneda /* 0: Firmware Version Data Record */ 20139f400337SErik Kaneda 20149f400337SErik Kaneda struct acpi_phat_version_data { 20159f400337SErik Kaneda struct acpi_phat_header header; 20169f400337SErik Kaneda u8 reserved[3]; 20179f400337SErik Kaneda u32 element_count; 20189f400337SErik Kaneda }; 20199f400337SErik Kaneda 20209f400337SErik Kaneda struct acpi_phat_version_element { 20219f400337SErik Kaneda u8 guid[16]; 20229f400337SErik Kaneda u64 version_value; 20239f400337SErik Kaneda u32 producer_id; 20249f400337SErik Kaneda }; 20259f400337SErik Kaneda 20269f400337SErik Kaneda /* 1: Firmware Health Data Record */ 20279f400337SErik Kaneda 20289f400337SErik Kaneda struct acpi_phat_health_data { 20299f400337SErik Kaneda struct acpi_phat_header header; 20309f400337SErik Kaneda u8 reserved[2]; 20319f400337SErik Kaneda u8 health; 20329f400337SErik Kaneda u8 device_guid[16]; 20339f400337SErik Kaneda u32 device_specific_offset; /* Zero if no Device-specific data */ 20349f400337SErik Kaneda }; 20359f400337SErik Kaneda 20369f400337SErik Kaneda /* Values for Health field above */ 20379f400337SErik Kaneda 20389f400337SErik Kaneda #define ACPI_PHAT_ERRORS_FOUND 0 20399f400337SErik Kaneda #define ACPI_PHAT_NO_ERRORS 1 20409f400337SErik Kaneda #define ACPI_PHAT_UNKNOWN_ERRORS 2 20419f400337SErik Kaneda #define ACPI_PHAT_ADVISORY 3 20429f400337SErik Kaneda 20439f400337SErik Kaneda /******************************************************************************* 20449f400337SErik Kaneda * 2045e62f8227SErik Schmauss * PMTT - Platform Memory Topology Table (ACPI 5.0) 2046e62f8227SErik Schmauss * Version 1 2047e62f8227SErik Schmauss * 2048e62f8227SErik Schmauss ******************************************************************************/ 2049e62f8227SErik Schmauss 2050e62f8227SErik Schmauss struct acpi_table_pmtt { 2051e62f8227SErik Schmauss struct acpi_table_header header; /* Common ACPI table header */ 2052cca97d42SBob Moore u32 memory_device_count; 2053cca97d42SBob Moore /* 2054cca97d42SBob Moore * Immediately followed by: 2055cca97d42SBob Moore * MEMORY_DEVICE memory_device_struct[memory_device_count]; 2056cca97d42SBob Moore */ 2057e62f8227SErik Schmauss }; 2058e62f8227SErik Schmauss 2059e62f8227SErik Schmauss /* Common header for PMTT subtables that follow main table */ 2060e62f8227SErik Schmauss 2061e62f8227SErik Schmauss struct acpi_pmtt_header { 2062e62f8227SErik Schmauss u8 type; 2063e62f8227SErik Schmauss u8 reserved1; 2064e62f8227SErik Schmauss u16 length; 2065e62f8227SErik Schmauss u16 flags; 2066e62f8227SErik Schmauss u16 reserved2; 2067cca97d42SBob Moore u32 memory_device_count; /* Zero means no memory device structs follow */ 2068cca97d42SBob Moore /* 2069cca97d42SBob Moore * Immediately followed by: 2070cca97d42SBob Moore * u8 type_specific_data[] 2071cca97d42SBob Moore * MEMORY_DEVICE memory_device_struct[memory_device_count]; 2072cca97d42SBob Moore */ 2073e62f8227SErik Schmauss }; 2074e62f8227SErik Schmauss 2075e62f8227SErik Schmauss /* Values for Type field above */ 2076e62f8227SErik Schmauss 2077e62f8227SErik Schmauss #define ACPI_PMTT_TYPE_SOCKET 0 2078e62f8227SErik Schmauss #define ACPI_PMTT_TYPE_CONTROLLER 1 2079e62f8227SErik Schmauss #define ACPI_PMTT_TYPE_DIMM 2 2080cca97d42SBob Moore #define ACPI_PMTT_TYPE_RESERVED 3 /* 0x03-0xFE are reserved */ 2081cca97d42SBob Moore #define ACPI_PMTT_TYPE_VENDOR 0xFF 2082e62f8227SErik Schmauss 2083e62f8227SErik Schmauss /* Values for Flags field above */ 2084e62f8227SErik Schmauss 2085e62f8227SErik Schmauss #define ACPI_PMTT_TOP_LEVEL 0x0001 2086e62f8227SErik Schmauss #define ACPI_PMTT_PHYSICAL 0x0002 2087e62f8227SErik Schmauss #define ACPI_PMTT_MEMORY_TYPE 0x000C 2088e62f8227SErik Schmauss 2089e62f8227SErik Schmauss /* 2090e62f8227SErik Schmauss * PMTT subtables, correspond to Type in struct acpi_pmtt_header 2091e62f8227SErik Schmauss */ 2092e62f8227SErik Schmauss 2093e62f8227SErik Schmauss /* 0: Socket Structure */ 2094e62f8227SErik Schmauss 2095e62f8227SErik Schmauss struct acpi_pmtt_socket { 2096e62f8227SErik Schmauss struct acpi_pmtt_header header; 2097e62f8227SErik Schmauss u16 socket_id; 2098e62f8227SErik Schmauss u16 reserved; 2099e62f8227SErik Schmauss }; 2100cca97d42SBob Moore /* 2101cca97d42SBob Moore * Immediately followed by: 2102cca97d42SBob Moore * MEMORY_DEVICE memory_device_struct[memory_device_count]; 2103cca97d42SBob Moore */ 2104e62f8227SErik Schmauss 2105e62f8227SErik Schmauss /* 1: Memory Controller subtable */ 2106e62f8227SErik Schmauss 2107e62f8227SErik Schmauss struct acpi_pmtt_controller { 2108e62f8227SErik Schmauss struct acpi_pmtt_header header; 2109cca97d42SBob Moore u16 controller_id; 2110e62f8227SErik Schmauss u16 reserved; 2111e62f8227SErik Schmauss }; 2112cca97d42SBob Moore /* 2113cca97d42SBob Moore * Immediately followed by: 2114cca97d42SBob Moore * MEMORY_DEVICE memory_device_struct[memory_device_count]; 2115cca97d42SBob Moore */ 2116e62f8227SErik Schmauss 2117e62f8227SErik Schmauss /* 2: Physical Component Identifier (DIMM) */ 2118e62f8227SErik Schmauss 2119e62f8227SErik Schmauss struct acpi_pmtt_physical_component { 2120e62f8227SErik Schmauss struct acpi_pmtt_header header; 2121e62f8227SErik Schmauss u32 bios_handle; 2122e62f8227SErik Schmauss }; 2123e62f8227SErik Schmauss 2124cca97d42SBob Moore /* 0xFF: Vendor Specific Data */ 2125cca97d42SBob Moore 2126cca97d42SBob Moore struct acpi_pmtt_vendor_specific { 2127cca97d42SBob Moore struct acpi_pmtt_header header; 2128cca97d42SBob Moore u8 type_uuid[16]; 2129cca97d42SBob Moore u8 specific[]; 2130cca97d42SBob Moore /* 2131cca97d42SBob Moore * Immediately followed by: 2132cca97d42SBob Moore * u8 vendor_specific_data[]; 2133cca97d42SBob Moore * MEMORY_DEVICE memory_device_struct[memory_device_count]; 2134cca97d42SBob Moore */ 2135cca97d42SBob Moore }; 2136cca97d42SBob Moore 2137e62f8227SErik Schmauss /******************************************************************************* 2138e62f8227SErik Schmauss * 2139e62f8227SErik Schmauss * PPTT - Processor Properties Topology Table (ACPI 6.2) 2140e62f8227SErik Schmauss * Version 1 2141e62f8227SErik Schmauss * 2142e62f8227SErik Schmauss ******************************************************************************/ 2143e62f8227SErik Schmauss 2144e62f8227SErik Schmauss struct acpi_table_pptt { 2145e62f8227SErik Schmauss struct acpi_table_header header; /* Common ACPI table header */ 2146e62f8227SErik Schmauss }; 2147e62f8227SErik Schmauss 2148e62f8227SErik Schmauss /* Values for Type field above */ 2149e62f8227SErik Schmauss 2150e62f8227SErik Schmauss enum acpi_pptt_type { 2151e62f8227SErik Schmauss ACPI_PPTT_TYPE_PROCESSOR = 0, 2152e62f8227SErik Schmauss ACPI_PPTT_TYPE_CACHE = 1, 2153e62f8227SErik Schmauss ACPI_PPTT_TYPE_ID = 2, 2154e62f8227SErik Schmauss ACPI_PPTT_TYPE_RESERVED = 3 2155e62f8227SErik Schmauss }; 2156e62f8227SErik Schmauss 2157e62f8227SErik Schmauss /* 0: Processor Hierarchy Node Structure */ 2158e62f8227SErik Schmauss 2159e62f8227SErik Schmauss struct acpi_pptt_processor { 2160e62f8227SErik Schmauss struct acpi_subtable_header header; 2161e62f8227SErik Schmauss u16 reserved; 2162e62f8227SErik Schmauss u32 flags; 2163e62f8227SErik Schmauss u32 parent; 2164e62f8227SErik Schmauss u32 acpi_processor_id; 2165e62f8227SErik Schmauss u32 number_of_priv_resources; 2166e62f8227SErik Schmauss }; 2167e62f8227SErik Schmauss 2168e62f8227SErik Schmauss /* Flags */ 2169e62f8227SErik Schmauss 2170b5eab512SErik Schmauss #define ACPI_PPTT_PHYSICAL_PACKAGE (1) 2171b5eab512SErik Schmauss #define ACPI_PPTT_ACPI_PROCESSOR_ID_VALID (1<<1) 2172b5eab512SErik Schmauss #define ACPI_PPTT_ACPI_PROCESSOR_IS_THREAD (1<<2) /* ACPI 6.3 */ 2173b5eab512SErik Schmauss #define ACPI_PPTT_ACPI_LEAF_NODE (1<<3) /* ACPI 6.3 */ 2174b5eab512SErik Schmauss #define ACPI_PPTT_ACPI_IDENTICAL (1<<4) /* ACPI 6.3 */ 2175e62f8227SErik Schmauss 2176e62f8227SErik Schmauss /* 1: Cache Type Structure */ 2177e62f8227SErik Schmauss 2178e62f8227SErik Schmauss struct acpi_pptt_cache { 2179e62f8227SErik Schmauss struct acpi_subtable_header header; 2180e62f8227SErik Schmauss u16 reserved; 2181e62f8227SErik Schmauss u32 flags; 2182e62f8227SErik Schmauss u32 next_level_of_cache; 2183e62f8227SErik Schmauss u32 size; 2184e62f8227SErik Schmauss u32 number_of_sets; 2185e62f8227SErik Schmauss u8 associativity; 2186e62f8227SErik Schmauss u8 attributes; 2187e62f8227SErik Schmauss u16 line_size; 2188e62f8227SErik Schmauss }; 2189e62f8227SErik Schmauss 21905e2e86c0SErik Kaneda /* 1: Cache Type Structure for PPTT version 3 */ 21915e2e86c0SErik Kaneda 21925e2e86c0SErik Kaneda struct acpi_pptt_cache_v1 { 21935e2e86c0SErik Kaneda u32 cache_id; 21945e2e86c0SErik Kaneda }; 21955e2e86c0SErik Kaneda 2196e62f8227SErik Schmauss /* Flags */ 2197e62f8227SErik Schmauss 2198e62f8227SErik Schmauss #define ACPI_PPTT_SIZE_PROPERTY_VALID (1) /* Physical property valid */ 2199e62f8227SErik Schmauss #define ACPI_PPTT_NUMBER_OF_SETS_VALID (1<<1) /* Number of sets valid */ 2200e62f8227SErik Schmauss #define ACPI_PPTT_ASSOCIATIVITY_VALID (1<<2) /* Associativity valid */ 2201e62f8227SErik Schmauss #define ACPI_PPTT_ALLOCATION_TYPE_VALID (1<<3) /* Allocation type valid */ 2202e62f8227SErik Schmauss #define ACPI_PPTT_CACHE_TYPE_VALID (1<<4) /* Cache type valid */ 2203e62f8227SErik Schmauss #define ACPI_PPTT_WRITE_POLICY_VALID (1<<5) /* Write policy valid */ 2204e62f8227SErik Schmauss #define ACPI_PPTT_LINE_SIZE_VALID (1<<6) /* Line size valid */ 22055e2e86c0SErik Kaneda #define ACPI_PPTT_CACHE_ID_VALID (1<<7) /* Cache ID valid */ 2206e62f8227SErik Schmauss 2207e62f8227SErik Schmauss /* Masks for Attributes */ 2208e62f8227SErik Schmauss 2209e62f8227SErik Schmauss #define ACPI_PPTT_MASK_ALLOCATION_TYPE (0x03) /* Allocation type */ 2210e62f8227SErik Schmauss #define ACPI_PPTT_MASK_CACHE_TYPE (0x0C) /* Cache type */ 2211e62f8227SErik Schmauss #define ACPI_PPTT_MASK_WRITE_POLICY (0x10) /* Write policy */ 2212e62f8227SErik Schmauss 2213e62f8227SErik Schmauss /* Attributes describing cache */ 2214e62f8227SErik Schmauss #define ACPI_PPTT_CACHE_READ_ALLOCATE (0x0) /* Cache line is allocated on read */ 2215e62f8227SErik Schmauss #define ACPI_PPTT_CACHE_WRITE_ALLOCATE (0x01) /* Cache line is allocated on write */ 2216e62f8227SErik Schmauss #define ACPI_PPTT_CACHE_RW_ALLOCATE (0x02) /* Cache line is allocated on read and write */ 2217e62f8227SErik Schmauss #define ACPI_PPTT_CACHE_RW_ALLOCATE_ALT (0x03) /* Alternate representation of above */ 2218e62f8227SErik Schmauss 2219e62f8227SErik Schmauss #define ACPI_PPTT_CACHE_TYPE_DATA (0x0) /* Data cache */ 2220e62f8227SErik Schmauss #define ACPI_PPTT_CACHE_TYPE_INSTR (1<<2) /* Instruction cache */ 2221e62f8227SErik Schmauss #define ACPI_PPTT_CACHE_TYPE_UNIFIED (2<<2) /* Unified I & D cache */ 2222e62f8227SErik Schmauss #define ACPI_PPTT_CACHE_TYPE_UNIFIED_ALT (3<<2) /* Alternate representation of above */ 2223e62f8227SErik Schmauss 2224e62f8227SErik Schmauss #define ACPI_PPTT_CACHE_POLICY_WB (0x0) /* Cache is write back */ 2225e62f8227SErik Schmauss #define ACPI_PPTT_CACHE_POLICY_WT (1<<4) /* Cache is write through */ 2226e62f8227SErik Schmauss 2227e62f8227SErik Schmauss /* 2: ID Structure */ 2228e62f8227SErik Schmauss 2229e62f8227SErik Schmauss struct acpi_pptt_id { 2230e62f8227SErik Schmauss struct acpi_subtable_header header; 2231e62f8227SErik Schmauss u16 reserved; 2232e62f8227SErik Schmauss u32 vendor_id; 2233e62f8227SErik Schmauss u64 level1_id; 2234e62f8227SErik Schmauss u64 level2_id; 2235e62f8227SErik Schmauss u16 major_rev; 2236e62f8227SErik Schmauss u16 minor_rev; 2237e62f8227SErik Schmauss u16 spin_rev; 2238e62f8227SErik Schmauss }; 2239e62f8227SErik Schmauss 2240e62f8227SErik Schmauss /******************************************************************************* 2241e62f8227SErik Schmauss * 2242d71df85aSErik Kaneda * PRMT - Platform Runtime Mechanism Table 2243d71df85aSErik Kaneda * Version 1 2244d71df85aSErik Kaneda * 2245d71df85aSErik Kaneda ******************************************************************************/ 2246d71df85aSErik Kaneda 2247d71df85aSErik Kaneda struct acpi_table_prmt { 2248d71df85aSErik Kaneda struct acpi_table_header header; /* Common ACPI table header */ 2249d71df85aSErik Kaneda }; 2250d71df85aSErik Kaneda 2251d71df85aSErik Kaneda struct acpi_table_prmt_header { 2252d71df85aSErik Kaneda u8 platform_guid[16]; 2253d71df85aSErik Kaneda u32 module_info_offset; 2254d71df85aSErik Kaneda u32 module_info_count; 2255d71df85aSErik Kaneda }; 2256d71df85aSErik Kaneda 22579f8c7baeSErik Kaneda struct acpi_prmt_module_header { 22589f8c7baeSErik Kaneda u16 revision; 22599f8c7baeSErik Kaneda u16 length; 22609f8c7baeSErik Kaneda }; 22619f8c7baeSErik Kaneda 2262d71df85aSErik Kaneda struct acpi_prmt_module_info { 2263d71df85aSErik Kaneda u16 revision; 2264d71df85aSErik Kaneda u16 length; 2265d71df85aSErik Kaneda u8 module_guid[16]; 2266d71df85aSErik Kaneda u16 major_rev; 2267d71df85aSErik Kaneda u16 minor_rev; 2268d71df85aSErik Kaneda u16 handler_info_count; 2269d71df85aSErik Kaneda u32 handler_info_offset; 2270d71df85aSErik Kaneda u64 mmio_list_pointer; 2271d71df85aSErik Kaneda }; 2272d71df85aSErik Kaneda 2273d71df85aSErik Kaneda struct acpi_prmt_handler_info { 2274d71df85aSErik Kaneda u16 revision; 2275d71df85aSErik Kaneda u16 length; 2276d71df85aSErik Kaneda u8 handler_guid[16]; 2277d71df85aSErik Kaneda u64 handler_address; 2278d71df85aSErik Kaneda u64 static_data_buffer_address; 2279d71df85aSErik Kaneda u64 acpi_param_buffer_address; 2280d71df85aSErik Kaneda }; 2281d71df85aSErik Kaneda 2282d71df85aSErik Kaneda /******************************************************************************* 2283d71df85aSErik Kaneda * 2284e62f8227SErik Schmauss * RASF - RAS Feature Table (ACPI 5.0) 2285e62f8227SErik Schmauss * Version 1 2286e62f8227SErik Schmauss * 2287e62f8227SErik Schmauss ******************************************************************************/ 2288e62f8227SErik Schmauss 2289e62f8227SErik Schmauss struct acpi_table_rasf { 2290e62f8227SErik Schmauss struct acpi_table_header header; /* Common ACPI table header */ 2291e62f8227SErik Schmauss u8 channel_id[12]; 2292e62f8227SErik Schmauss }; 2293e62f8227SErik Schmauss 2294e62f8227SErik Schmauss /* RASF Platform Communication Channel Shared Memory Region */ 2295e62f8227SErik Schmauss 2296e62f8227SErik Schmauss struct acpi_rasf_shared_memory { 2297e62f8227SErik Schmauss u32 signature; 2298e62f8227SErik Schmauss u16 command; 2299e62f8227SErik Schmauss u16 status; 2300e62f8227SErik Schmauss u16 version; 2301e62f8227SErik Schmauss u8 capabilities[16]; 2302e62f8227SErik Schmauss u8 set_capabilities[16]; 2303e62f8227SErik Schmauss u16 num_parameter_blocks; 2304e62f8227SErik Schmauss u32 set_capabilities_status; 2305e62f8227SErik Schmauss }; 2306e62f8227SErik Schmauss 2307e62f8227SErik Schmauss /* RASF Parameter Block Structure Header */ 2308e62f8227SErik Schmauss 2309e62f8227SErik Schmauss struct acpi_rasf_parameter_block { 2310e62f8227SErik Schmauss u16 type; 2311e62f8227SErik Schmauss u16 version; 2312e62f8227SErik Schmauss u16 length; 2313e62f8227SErik Schmauss }; 2314e62f8227SErik Schmauss 2315e62f8227SErik Schmauss /* RASF Parameter Block Structure for PATROL_SCRUB */ 2316e62f8227SErik Schmauss 2317e62f8227SErik Schmauss struct acpi_rasf_patrol_scrub_parameter { 2318e62f8227SErik Schmauss struct acpi_rasf_parameter_block header; 2319e62f8227SErik Schmauss u16 patrol_scrub_command; 2320e62f8227SErik Schmauss u64 requested_address_range[2]; 2321e62f8227SErik Schmauss u64 actual_address_range[2]; 2322e62f8227SErik Schmauss u16 flags; 2323e62f8227SErik Schmauss u8 requested_speed; 2324e62f8227SErik Schmauss }; 2325e62f8227SErik Schmauss 2326e62f8227SErik Schmauss /* Masks for Flags and Speed fields above */ 2327e62f8227SErik Schmauss 2328e62f8227SErik Schmauss #define ACPI_RASF_SCRUBBER_RUNNING 1 2329e62f8227SErik Schmauss #define ACPI_RASF_SPEED (7<<1) 2330e62f8227SErik Schmauss #define ACPI_RASF_SPEED_SLOW (0<<1) 2331e62f8227SErik Schmauss #define ACPI_RASF_SPEED_MEDIUM (4<<1) 2332e62f8227SErik Schmauss #define ACPI_RASF_SPEED_FAST (7<<1) 2333e62f8227SErik Schmauss 2334e62f8227SErik Schmauss /* Channel Commands */ 2335e62f8227SErik Schmauss 2336e62f8227SErik Schmauss enum acpi_rasf_commands { 2337e62f8227SErik Schmauss ACPI_RASF_EXECUTE_RASF_COMMAND = 1 2338e62f8227SErik Schmauss }; 2339e62f8227SErik Schmauss 2340e62f8227SErik Schmauss /* Platform RAS Capabilities */ 2341e62f8227SErik Schmauss 2342e62f8227SErik Schmauss enum acpi_rasf_capabiliities { 2343e62f8227SErik Schmauss ACPI_HW_PATROL_SCRUB_SUPPORTED = 0, 2344e62f8227SErik Schmauss ACPI_SW_PATROL_SCRUB_EXPOSED = 1 2345e62f8227SErik Schmauss }; 2346e62f8227SErik Schmauss 2347e62f8227SErik Schmauss /* Patrol Scrub Commands */ 2348e62f8227SErik Schmauss 2349e62f8227SErik Schmauss enum acpi_rasf_patrol_scrub_commands { 2350e62f8227SErik Schmauss ACPI_RASF_GET_PATROL_PARAMETERS = 1, 2351e62f8227SErik Schmauss ACPI_RASF_START_PATROL_SCRUBBER = 2, 2352e62f8227SErik Schmauss ACPI_RASF_STOP_PATROL_SCRUBBER = 3 2353e62f8227SErik Schmauss }; 2354e62f8227SErik Schmauss 2355e62f8227SErik Schmauss /* Channel Command flags */ 2356e62f8227SErik Schmauss 2357e62f8227SErik Schmauss #define ACPI_RASF_GENERATE_SCI (1<<15) 2358e62f8227SErik Schmauss 2359e62f8227SErik Schmauss /* Status values */ 2360e62f8227SErik Schmauss 2361e62f8227SErik Schmauss enum acpi_rasf_status { 2362e62f8227SErik Schmauss ACPI_RASF_SUCCESS = 0, 2363e62f8227SErik Schmauss ACPI_RASF_NOT_VALID = 1, 2364e62f8227SErik Schmauss ACPI_RASF_NOT_SUPPORTED = 2, 2365e62f8227SErik Schmauss ACPI_RASF_BUSY = 3, 2366e62f8227SErik Schmauss ACPI_RASF_FAILED = 4, 2367e62f8227SErik Schmauss ACPI_RASF_ABORTED = 5, 2368e62f8227SErik Schmauss ACPI_RASF_INVALID_DATA = 6 2369e62f8227SErik Schmauss }; 2370e62f8227SErik Schmauss 2371e62f8227SErik Schmauss /* Status flags */ 2372e62f8227SErik Schmauss 2373e62f8227SErik Schmauss #define ACPI_RASF_COMMAND_COMPLETE (1) 2374e62f8227SErik Schmauss #define ACPI_RASF_SCI_DOORBELL (1<<1) 2375e62f8227SErik Schmauss #define ACPI_RASF_ERROR (1<<2) 2376e62f8227SErik Schmauss #define ACPI_RASF_STATUS (0x1F<<3) 2377e62f8227SErik Schmauss 2378e62f8227SErik Schmauss /******************************************************************************* 2379e62f8227SErik Schmauss * 2380536e35c9SBob Moore * RGRT - Regulatory Graphics Resource Table 2381536e35c9SBob Moore * Version 1 2382536e35c9SBob Moore * 2383536e35c9SBob Moore * Conforms to "ACPI RGRT" available at: 2384536e35c9SBob Moore * https://microsoft.github.io/mu/dyn/mu_plus/ms_core_pkg/acpi_RGRT/feature_acpi_rgrt/ 2385536e35c9SBob Moore * 2386536e35c9SBob Moore ******************************************************************************/ 2387536e35c9SBob Moore 2388536e35c9SBob Moore struct acpi_table_rgrt { 2389536e35c9SBob Moore struct acpi_table_header header; /* Common ACPI table header */ 2390536e35c9SBob Moore u16 version; 2391536e35c9SBob Moore u8 image_type; 2392536e35c9SBob Moore u8 reserved; 2393aa29b208SGustavo A. R. Silva u8 image[]; 2394536e35c9SBob Moore }; 2395536e35c9SBob Moore 2396536e35c9SBob Moore /* image_type values */ 2397536e35c9SBob Moore 2398536e35c9SBob Moore enum acpi_rgrt_image_type { 2399536e35c9SBob Moore ACPI_RGRT_TYPE_RESERVED0 = 0, 2400536e35c9SBob Moore ACPI_RGRT_IMAGE_TYPE_PNG = 1, 2401536e35c9SBob Moore ACPI_RGRT_TYPE_RESERVED = 2 /* 2 and greater are reserved */ 2402536e35c9SBob Moore }; 2403536e35c9SBob Moore 2404536e35c9SBob Moore /******************************************************************************* 2405536e35c9SBob Moore * 2406e62f8227SErik Schmauss * SBST - Smart Battery Specification Table 2407e62f8227SErik Schmauss * Version 1 2408e62f8227SErik Schmauss * 2409e62f8227SErik Schmauss ******************************************************************************/ 2410e62f8227SErik Schmauss 2411e62f8227SErik Schmauss struct acpi_table_sbst { 2412e62f8227SErik Schmauss struct acpi_table_header header; /* Common ACPI table header */ 2413e62f8227SErik Schmauss u32 warning_level; 2414e62f8227SErik Schmauss u32 low_level; 2415e62f8227SErik Schmauss u32 critical_level; 2416e62f8227SErik Schmauss }; 2417e62f8227SErik Schmauss 2418e62f8227SErik Schmauss /******************************************************************************* 2419e62f8227SErik Schmauss * 24203bd38469SJames Morse * SDEI - Software Delegated Exception Interface Descriptor Table 24213bd38469SJames Morse * 24223bd38469SJames Morse * Conforms to "Software Delegated Exception Interface (SDEI)" ARM DEN0054A, 24233bd38469SJames Morse * May 8th, 2017. Copyright 2017 ARM Ltd. 24243bd38469SJames Morse * 24253bd38469SJames Morse ******************************************************************************/ 24263bd38469SJames Morse 24273bd38469SJames Morse struct acpi_table_sdei { 24283bd38469SJames Morse struct acpi_table_header header; /* Common ACPI table header */ 24293bd38469SJames Morse }; 24303bd38469SJames Morse 24313bd38469SJames Morse /******************************************************************************* 24323bd38469SJames Morse * 2433e62f8227SErik Schmauss * SDEV - Secure Devices Table (ACPI 6.2) 2434e62f8227SErik Schmauss * Version 1 24355cf4d733SBob Moore * 24365cf4d733SBob Moore ******************************************************************************/ 24375cf4d733SBob Moore 2438e62f8227SErik Schmauss struct acpi_table_sdev { 24395cf4d733SBob Moore struct acpi_table_header header; /* Common ACPI table header */ 24405cf4d733SBob Moore }; 24415cf4d733SBob Moore 2442e62f8227SErik Schmauss struct acpi_sdev_header { 2443e62f8227SErik Schmauss u8 type; 2444e62f8227SErik Schmauss u8 flags; 2445e62f8227SErik Schmauss u16 length; 2446b24aad44SBob Moore }; 2447b24aad44SBob Moore 2448e62f8227SErik Schmauss /* Values for subtable type above */ 24496e2d5ebdSBob Moore 2450e62f8227SErik Schmauss enum acpi_sdev_type { 2451e62f8227SErik Schmauss ACPI_SDEV_TYPE_NAMESPACE_DEVICE = 0, 2452e62f8227SErik Schmauss ACPI_SDEV_TYPE_PCIE_ENDPOINT_DEVICE = 1, 2453e62f8227SErik Schmauss ACPI_SDEV_TYPE_RESERVED = 2 /* 2 and greater are reserved */ 24546e2d5ebdSBob Moore }; 24556e2d5ebdSBob Moore 2456e62f8227SErik Schmauss /* Values for flags above */ 24576e2d5ebdSBob Moore 2458e62f8227SErik Schmauss #define ACPI_SDEV_HANDOFF_TO_UNSECURE_OS (1) 245914012d2fSErik Kaneda #define ACPI_SDEV_SECURE_COMPONENTS_PRESENT (1<<1) 246015a61aa1SBob Moore 246115a61aa1SBob Moore /* 2462e62f8227SErik Schmauss * SDEV subtables 246315a61aa1SBob Moore */ 246415a61aa1SBob Moore 2465e62f8227SErik Schmauss /* 0: Namespace Device Based Secure Device Structure */ 2466e62f8227SErik Schmauss 2467e62f8227SErik Schmauss struct acpi_sdev_namespace { 2468e62f8227SErik Schmauss struct acpi_sdev_header header; 2469e62f8227SErik Schmauss u16 device_id_offset; 2470e62f8227SErik Schmauss u16 device_id_length; 2471e62f8227SErik Schmauss u16 vendor_data_offset; 2472e62f8227SErik Schmauss u16 vendor_data_length; 2473b24aad44SBob Moore }; 2474b24aad44SBob Moore 247514012d2fSErik Kaneda struct acpi_sdev_secure_component { 247614012d2fSErik Kaneda u16 secure_component_offset; 247714012d2fSErik Kaneda u16 secure_component_length; 247814012d2fSErik Kaneda }; 247914012d2fSErik Kaneda 248014012d2fSErik Kaneda /* 248114012d2fSErik Kaneda * SDEV sub-subtables ("Components") for above 248214012d2fSErik Kaneda */ 248314012d2fSErik Kaneda struct acpi_sdev_component { 248414012d2fSErik Kaneda struct acpi_sdev_header header; 248514012d2fSErik Kaneda }; 248614012d2fSErik Kaneda 248714012d2fSErik Kaneda /* Values for sub-subtable type above */ 248814012d2fSErik Kaneda 248914012d2fSErik Kaneda enum acpi_sac_type { 249014012d2fSErik Kaneda ACPI_SDEV_TYPE_ID_COMPONENT = 0, 249114012d2fSErik Kaneda ACPI_SDEV_TYPE_MEM_COMPONENT = 1 249214012d2fSErik Kaneda }; 249314012d2fSErik Kaneda 249414012d2fSErik Kaneda struct acpi_sdev_id_component { 249514012d2fSErik Kaneda struct acpi_sdev_header header; 249614012d2fSErik Kaneda u16 hardware_id_offset; 249714012d2fSErik Kaneda u16 hardware_id_length; 249814012d2fSErik Kaneda u16 subsystem_id_offset; 249914012d2fSErik Kaneda u16 subsystem_id_length; 250014012d2fSErik Kaneda u16 hardware_revision; 250114012d2fSErik Kaneda u8 hardware_rev_present; 250214012d2fSErik Kaneda u8 class_code_present; 250314012d2fSErik Kaneda u8 pci_base_class; 250414012d2fSErik Kaneda u8 pci_sub_class; 250514012d2fSErik Kaneda u8 pci_programming_xface; 250614012d2fSErik Kaneda }; 250714012d2fSErik Kaneda 250814012d2fSErik Kaneda struct acpi_sdev_mem_component { 250914012d2fSErik Kaneda struct acpi_sdev_header header; 251014012d2fSErik Kaneda u32 reserved; 251114012d2fSErik Kaneda u64 memory_base_address; 251214012d2fSErik Kaneda u64 memory_length; 251314012d2fSErik Kaneda }; 251414012d2fSErik Kaneda 2515e62f8227SErik Schmauss /* 1: PCIe Endpoint Device Based Device Structure */ 2516e62f8227SErik Schmauss 2517e62f8227SErik Schmauss struct acpi_sdev_pcie { 2518e62f8227SErik Schmauss struct acpi_sdev_header header; 2519e62f8227SErik Schmauss u16 segment; 2520e62f8227SErik Schmauss u16 start_bus; 2521e62f8227SErik Schmauss u16 path_offset; 2522e62f8227SErik Schmauss u16 path_length; 2523e62f8227SErik Schmauss u16 vendor_data_offset; 2524e62f8227SErik Schmauss u16 vendor_data_length; 2525e62f8227SErik Schmauss }; 2526e62f8227SErik Schmauss 2527e62f8227SErik Schmauss /* 1a: PCIe Endpoint path entry */ 2528e62f8227SErik Schmauss 2529e62f8227SErik Schmauss struct acpi_sdev_pcie_path { 25309005694eSBob Moore u8 device; 25319005694eSBob Moore u8 function; 25329005694eSBob Moore }; 25339005694eSBob Moore 25348288f69eSKuppuswamy Sathyanarayanan /******************************************************************************* 25358288f69eSKuppuswamy Sathyanarayanan * 25368288f69eSKuppuswamy Sathyanarayanan * SVKL - Storage Volume Key Location Table (ACPI 6.4) 25376496f03eSBob Moore * From: "Guest-Host-Communication Interface (GHCI) for Intel 25386496f03eSBob Moore * Trust Domain Extensions (Intel TDX)". 25398288f69eSKuppuswamy Sathyanarayanan * Version 1 25408288f69eSKuppuswamy Sathyanarayanan * 25418288f69eSKuppuswamy Sathyanarayanan ******************************************************************************/ 25428288f69eSKuppuswamy Sathyanarayanan 25438288f69eSKuppuswamy Sathyanarayanan struct acpi_table_svkl { 25448288f69eSKuppuswamy Sathyanarayanan struct acpi_table_header header; /* Common ACPI table header */ 25458288f69eSKuppuswamy Sathyanarayanan u32 count; 25468288f69eSKuppuswamy Sathyanarayanan }; 25478288f69eSKuppuswamy Sathyanarayanan 25486496f03eSBob Moore struct acpi_svkl_key { 25498288f69eSKuppuswamy Sathyanarayanan u16 type; 25508288f69eSKuppuswamy Sathyanarayanan u16 format; 25518288f69eSKuppuswamy Sathyanarayanan u32 size; 25528288f69eSKuppuswamy Sathyanarayanan u64 address; 25538288f69eSKuppuswamy Sathyanarayanan }; 25548288f69eSKuppuswamy Sathyanarayanan 25558288f69eSKuppuswamy Sathyanarayanan enum acpi_svkl_type { 25568288f69eSKuppuswamy Sathyanarayanan ACPI_SVKL_TYPE_MAIN_STORAGE = 0, 25578288f69eSKuppuswamy Sathyanarayanan ACPI_SVKL_TYPE_RESERVED = 1 /* 1 and greater are reserved */ 25588288f69eSKuppuswamy Sathyanarayanan }; 25598288f69eSKuppuswamy Sathyanarayanan 25608288f69eSKuppuswamy Sathyanarayanan enum acpi_svkl_format { 25618288f69eSKuppuswamy Sathyanarayanan ACPI_SVKL_FORMAT_RAW_BINARY = 0, 25628288f69eSKuppuswamy Sathyanarayanan ACPI_SVKL_FORMAT_RESERVED = 1 /* 1 and greater are reserved */ 25638288f69eSKuppuswamy Sathyanarayanan }; 25648288f69eSKuppuswamy Sathyanarayanan 25652de6bb92SBob Moore /******************************************************************************* 25662de6bb92SBob Moore * 25672de6bb92SBob Moore * TDEL - TD-Event Log 25682de6bb92SBob Moore * From: "Guest-Host-Communication Interface (GHCI) for Intel 25692de6bb92SBob Moore * Trust Domain Extensions (Intel TDX)". 25702de6bb92SBob Moore * September 2020 25712de6bb92SBob Moore * 25722de6bb92SBob Moore ******************************************************************************/ 25732de6bb92SBob Moore 25742de6bb92SBob Moore struct acpi_table_tdel { 25752de6bb92SBob Moore struct acpi_table_header header; /* Common ACPI table header */ 25762de6bb92SBob Moore u32 reserved; 25772de6bb92SBob Moore u64 log_area_minimum_length; 25782de6bb92SBob Moore u64 log_area_start_address; 25792de6bb92SBob Moore }; 25802de6bb92SBob Moore 25816e596084SRobert Moore /* Reset to default packing */ 25826e596084SRobert Moore 25836e596084SRobert Moore #pragma pack() 2584b24aad44SBob Moore 2585b24aad44SBob Moore #endif /* __ACTBL2_H__ */ 2586