Home | History | Annotate | Line # | Download | only in include
actbl1.h revision 1.22.6.1
      1       1.1    jruoho /******************************************************************************
      2       1.1    jruoho  *
      3       1.1    jruoho  * Name: actbl1.h - Additional ACPI table definitions
      4       1.1    jruoho  *
      5       1.1    jruoho  *****************************************************************************/
      6       1.1    jruoho 
      7  1.22.6.1  perseant /******************************************************************************
      8  1.22.6.1  perseant  *
      9  1.22.6.1  perseant  * 1. Copyright Notice
     10  1.22.6.1  perseant  *
     11  1.22.6.1  perseant  * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp.
     12       1.1    jruoho  * All rights reserved.
     13       1.1    jruoho  *
     14  1.22.6.1  perseant  * 2. License
     15  1.22.6.1  perseant  *
     16  1.22.6.1  perseant  * 2.1. This is your license from Intel Corp. under its intellectual property
     17  1.22.6.1  perseant  * rights. You may have additional license terms from the party that provided
     18  1.22.6.1  perseant  * you this software, covering your right to use that party's intellectual
     19  1.22.6.1  perseant  * property rights.
     20  1.22.6.1  perseant  *
     21  1.22.6.1  perseant  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
     22  1.22.6.1  perseant  * copy of the source code appearing in this file ("Covered Code") an
     23  1.22.6.1  perseant  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
     24  1.22.6.1  perseant  * base code distributed originally by Intel ("Original Intel Code") to copy,
     25  1.22.6.1  perseant  * make derivatives, distribute, use and display any portion of the Covered
     26  1.22.6.1  perseant  * Code in any form, with the right to sublicense such rights; and
     27  1.22.6.1  perseant  *
     28  1.22.6.1  perseant  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
     29  1.22.6.1  perseant  * license (with the right to sublicense), under only those claims of Intel
     30  1.22.6.1  perseant  * patents that are infringed by the Original Intel Code, to make, use, sell,
     31  1.22.6.1  perseant  * offer to sell, and import the Covered Code and derivative works thereof
     32  1.22.6.1  perseant  * solely to the minimum extent necessary to exercise the above copyright
     33  1.22.6.1  perseant  * license, and in no event shall the patent license extend to any additions
     34  1.22.6.1  perseant  * to or modifications of the Original Intel Code. No other license or right
     35  1.22.6.1  perseant  * is granted directly or by implication, estoppel or otherwise;
     36  1.22.6.1  perseant  *
     37  1.22.6.1  perseant  * The above copyright and patent license is granted only if the following
     38  1.22.6.1  perseant  * conditions are met:
     39  1.22.6.1  perseant  *
     40  1.22.6.1  perseant  * 3. Conditions
     41  1.22.6.1  perseant  *
     42  1.22.6.1  perseant  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
     43  1.22.6.1  perseant  * Redistribution of source code of any substantial portion of the Covered
     44  1.22.6.1  perseant  * Code or modification with rights to further distribute source must include
     45  1.22.6.1  perseant  * the above Copyright Notice, the above License, this list of Conditions,
     46  1.22.6.1  perseant  * and the following Disclaimer and Export Compliance provision. In addition,
     47  1.22.6.1  perseant  * Licensee must cause all Covered Code to which Licensee contributes to
     48  1.22.6.1  perseant  * contain a file documenting the changes Licensee made to create that Covered
     49  1.22.6.1  perseant  * Code and the date of any change. Licensee must include in that file the
     50  1.22.6.1  perseant  * documentation of any changes made by any predecessor Licensee. Licensee
     51  1.22.6.1  perseant  * must include a prominent statement that the modification is derived,
     52  1.22.6.1  perseant  * directly or indirectly, from Original Intel Code.
     53  1.22.6.1  perseant  *
     54  1.22.6.1  perseant  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
     55  1.22.6.1  perseant  * Redistribution of source code of any substantial portion of the Covered
     56  1.22.6.1  perseant  * Code or modification without rights to further distribute source must
     57  1.22.6.1  perseant  * include the following Disclaimer and Export Compliance provision in the
     58  1.22.6.1  perseant  * documentation and/or other materials provided with distribution. In
     59  1.22.6.1  perseant  * addition, Licensee may not authorize further sublicense of source of any
     60  1.22.6.1  perseant  * portion of the Covered Code, and must include terms to the effect that the
     61  1.22.6.1  perseant  * license from Licensee to its licensee is limited to the intellectual
     62  1.22.6.1  perseant  * property embodied in the software Licensee provides to its licensee, and
     63  1.22.6.1  perseant  * not to intellectual property embodied in modifications its licensee may
     64  1.22.6.1  perseant  * make.
     65  1.22.6.1  perseant  *
     66  1.22.6.1  perseant  * 3.3. Redistribution of Executable. Redistribution in executable form of any
     67  1.22.6.1  perseant  * substantial portion of the Covered Code or modification must reproduce the
     68  1.22.6.1  perseant  * above Copyright Notice, and the following Disclaimer and Export Compliance
     69  1.22.6.1  perseant  * provision in the documentation and/or other materials provided with the
     70  1.22.6.1  perseant  * distribution.
     71  1.22.6.1  perseant  *
     72  1.22.6.1  perseant  * 3.4. Intel retains all right, title, and interest in and to the Original
     73  1.22.6.1  perseant  * Intel Code.
     74  1.22.6.1  perseant  *
     75  1.22.6.1  perseant  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
     76  1.22.6.1  perseant  * Intel shall be used in advertising or otherwise to promote the sale, use or
     77  1.22.6.1  perseant  * other dealings in products derived from or relating to the Covered Code
     78  1.22.6.1  perseant  * without prior written authorization from Intel.
     79  1.22.6.1  perseant  *
     80  1.22.6.1  perseant  * 4. Disclaimer and Export Compliance
     81  1.22.6.1  perseant  *
     82  1.22.6.1  perseant  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
     83  1.22.6.1  perseant  * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
     84  1.22.6.1  perseant  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
     85  1.22.6.1  perseant  * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
     86  1.22.6.1  perseant  * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
     87  1.22.6.1  perseant  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
     88  1.22.6.1  perseant  * PARTICULAR PURPOSE.
     89  1.22.6.1  perseant  *
     90  1.22.6.1  perseant  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
     91  1.22.6.1  perseant  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
     92  1.22.6.1  perseant  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
     93  1.22.6.1  perseant  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
     94  1.22.6.1  perseant  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
     95  1.22.6.1  perseant  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
     96  1.22.6.1  perseant  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
     97  1.22.6.1  perseant  * LIMITED REMEDY.
     98  1.22.6.1  perseant  *
     99  1.22.6.1  perseant  * 4.3. Licensee shall not export, either directly or indirectly, any of this
    100  1.22.6.1  perseant  * software or system incorporating such software without first obtaining any
    101  1.22.6.1  perseant  * required license or other approval from the U. S. Department of Commerce or
    102  1.22.6.1  perseant  * any other agency or department of the United States Government. In the
    103  1.22.6.1  perseant  * event Licensee exports any such software from the United States or
    104  1.22.6.1  perseant  * re-exports any such software from a foreign destination, Licensee shall
    105  1.22.6.1  perseant  * ensure that the distribution and export/re-export of the software is in
    106  1.22.6.1  perseant  * compliance with all laws, regulations, orders, or other restrictions of the
    107  1.22.6.1  perseant  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
    108  1.22.6.1  perseant  * any of its subsidiaries will export/re-export any technical data, process,
    109  1.22.6.1  perseant  * software, or service, directly or indirectly, to any country for which the
    110  1.22.6.1  perseant  * United States government or any agency thereof requires an export license,
    111  1.22.6.1  perseant  * other governmental approval, or letter of assurance, without first obtaining
    112  1.22.6.1  perseant  * such license, approval or letter.
    113  1.22.6.1  perseant  *
    114  1.22.6.1  perseant  *****************************************************************************
    115  1.22.6.1  perseant  *
    116  1.22.6.1  perseant  * Alternatively, you may choose to be licensed under the terms of the
    117  1.22.6.1  perseant  * following license:
    118  1.22.6.1  perseant  *
    119       1.3    jruoho  * Redistribution and use in source and binary forms, with or without
    120       1.3    jruoho  * modification, are permitted provided that the following conditions
    121       1.3    jruoho  * are met:
    122       1.3    jruoho  * 1. Redistributions of source code must retain the above copyright
    123       1.3    jruoho  *    notice, this list of conditions, and the following disclaimer,
    124       1.3    jruoho  *    without modification.
    125       1.3    jruoho  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
    126       1.3    jruoho  *    substantially similar to the "NO WARRANTY" disclaimer below
    127       1.3    jruoho  *    ("Disclaimer") and any redistribution must be conditioned upon
    128       1.3    jruoho  *    including a substantially similar Disclaimer requirement for further
    129       1.3    jruoho  *    binary redistribution.
    130       1.3    jruoho  * 3. Neither the names of the above-listed copyright holders nor the names
    131       1.3    jruoho  *    of any contributors may be used to endorse or promote products derived
    132       1.3    jruoho  *    from this software without specific prior written permission.
    133       1.3    jruoho  *
    134       1.3    jruoho  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    135       1.3    jruoho  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    136      1.17  christos  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    137       1.3    jruoho  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    138  1.22.6.1  perseant  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    139  1.22.6.1  perseant  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    140  1.22.6.1  perseant  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    141  1.22.6.1  perseant  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    142  1.22.6.1  perseant  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    143  1.22.6.1  perseant  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    144  1.22.6.1  perseant  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    145  1.22.6.1  perseant  *
    146  1.22.6.1  perseant  * Alternatively, you may choose to be licensed under the terms of the
    147  1.22.6.1  perseant  * GNU General Public License ("GPL") version 2 as published by the Free
    148  1.22.6.1  perseant  * Software Foundation.
    149  1.22.6.1  perseant  *
    150  1.22.6.1  perseant  *****************************************************************************/
    151       1.1    jruoho 
    152       1.1    jruoho #ifndef __ACTBL1_H__
    153       1.1    jruoho #define __ACTBL1_H__
    154       1.1    jruoho 
    155       1.1    jruoho 
    156       1.1    jruoho /*******************************************************************************
    157       1.1    jruoho  *
    158      1.13  christos  * Additional ACPI Tables
    159       1.1    jruoho  *
    160       1.1    jruoho  * These tables are not consumed directly by the ACPICA subsystem, but are
    161       1.1    jruoho  * included here to support device drivers and the AML disassembler.
    162       1.1    jruoho  *
    163       1.1    jruoho  ******************************************************************************/
    164       1.1    jruoho 
    165       1.1    jruoho 
    166       1.1    jruoho /*
    167       1.1    jruoho  * Values for description table header signatures for tables defined in this
    168       1.1    jruoho  * file. Useful because they make it more difficult to inadvertently type in
    169       1.1    jruoho  * the wrong signature.
    170       1.1    jruoho  */
    171      1.19  christos #define ACPI_SIG_AEST           "AEST"      /* Arm Error Source Table */
    172      1.13  christos #define ACPI_SIG_ASF            "ASF!"      /* Alert Standard Format table */
    173      1.22  christos #define ACPI_SIG_ASPT           "ASPT"      /* AMD Secure Processor Table */
    174       1.1    jruoho #define ACPI_SIG_BERT           "BERT"      /* Boot Error Record Table */
    175      1.13  christos #define ACPI_SIG_BGRT           "BGRT"      /* Boot Graphics Resource Table */
    176      1.13  christos #define ACPI_SIG_BOOT           "BOOT"      /* Simple Boot Flag Table */
    177      1.17  christos #define ACPI_SIG_CEDT           "CEDT"      /* CXL Early Discovery Table */
    178       1.1    jruoho #define ACPI_SIG_CPEP           "CPEP"      /* Corrected Platform Error Polling table */
    179      1.13  christos #define ACPI_SIG_CSRT           "CSRT"      /* Core System Resource Table */
    180      1.13  christos #define ACPI_SIG_DBG2           "DBG2"      /* Debug Port table type 2 */
    181      1.13  christos #define ACPI_SIG_DBGP           "DBGP"      /* Debug Port table */
    182      1.13  christos #define ACPI_SIG_DMAR           "DMAR"      /* DMA Remapping table */
    183      1.13  christos #define ACPI_SIG_DRTM           "DRTM"      /* Dynamic Root of Trust for Measurement table */
    184       1.1    jruoho #define ACPI_SIG_ECDT           "ECDT"      /* Embedded Controller Boot Resources Table */
    185       1.1    jruoho #define ACPI_SIG_EINJ           "EINJ"      /* Error Injection table */
    186       1.1    jruoho #define ACPI_SIG_ERST           "ERST"      /* Error Record Serialization Table */
    187      1.13  christos #define ACPI_SIG_FPDT           "FPDT"      /* Firmware Performance Data Table */
    188      1.13  christos #define ACPI_SIG_GTDT           "GTDT"      /* Generic Timer Description Table */
    189      1.13  christos #define ACPI_SIG_HEST           "HEST"      /* Hardware Error Source Table */
    190      1.11  christos #define ACPI_SIG_HMAT           "HMAT"      /* Heterogeneous Memory Attributes Table */
    191      1.13  christos #define ACPI_SIG_HPET           "HPET"      /* High Precision Event Timer table */
    192      1.13  christos #define ACPI_SIG_IBFT           "IBFT"      /* iSCSI Boot Firmware Table */
    193      1.21  christos #define ACPI_SIG_MSCT           "MSCT"      /* Maximum System Characteristics Table*/
    194      1.13  christos 
    195      1.13  christos #define ACPI_SIG_S3PT           "S3PT"      /* S3 Performance (sub)Table */
    196      1.13  christos #define ACPI_SIG_PCCS           "PCC"       /* PCC Shared Memory Region */
    197      1.13  christos 
    198      1.13  christos 
    199      1.13  christos /* Reserved table signatures */
    200      1.13  christos 
    201      1.13  christos #define ACPI_SIG_MATR           "MATR"      /* Memory Address Translation Table */
    202      1.13  christos #define ACPI_SIG_MSDM           "MSDM"      /* Microsoft Data Management Table */
    203       1.1    jruoho 
    204      1.13  christos /*
    205      1.13  christos  * These tables have been seen in the field, but no definition has been found
    206      1.13  christos  */
    207      1.13  christos #ifdef ACPI_UNDEFINED_TABLES
    208      1.13  christos #define ACPI_SIG_ATKG           "ATKG"
    209      1.13  christos #define ACPI_SIG_GSCI           "GSCI"      /* GMCH SCI table */
    210      1.13  christos #define ACPI_SIG_IEIT           "IEIT"
    211      1.13  christos #endif
    212       1.1    jruoho 
    213       1.1    jruoho /*
    214       1.1    jruoho  * All tables must be byte-packed to match the ACPI specification, since
    215       1.1    jruoho  * the tables are provided by the system BIOS.
    216       1.1    jruoho  */
    217       1.1    jruoho #pragma pack(1)
    218       1.1    jruoho 
    219       1.1    jruoho /*
    220       1.4  christos  * Note: C bitfields are not used for this reason:
    221       1.4  christos  *
    222       1.4  christos  * "Bitfields are great and easy to read, but unfortunately the C language
    223       1.4  christos  * does not specify the layout of bitfields in memory, which means they are
    224       1.4  christos  * essentially useless for dealing with packed data in on-disk formats or
    225       1.4  christos  * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
    226       1.4  christos  * this decision was a design error in C. Ritchie could have picked an order
    227       1.4  christos  * and stuck with it." Norman Ramsey.
    228       1.4  christos  * See http://stackoverflow.com/a/1053662/41661
    229       1.1    jruoho  */
    230       1.1    jruoho 
    231       1.1    jruoho 
    232       1.1    jruoho /*******************************************************************************
    233       1.1    jruoho  *
    234       1.1    jruoho  * Common subtable headers
    235       1.1    jruoho  *
    236       1.1    jruoho  ******************************************************************************/
    237       1.1    jruoho 
    238       1.1    jruoho /* Generic subtable header (used in MADT, SRAT, etc.) */
    239       1.1    jruoho 
    240       1.1    jruoho typedef struct acpi_subtable_header
    241       1.1    jruoho {
    242       1.1    jruoho     UINT8                   Type;
    243       1.1    jruoho     UINT8                   Length;
    244       1.1    jruoho 
    245       1.1    jruoho } ACPI_SUBTABLE_HEADER;
    246       1.1    jruoho 
    247       1.1    jruoho 
    248       1.1    jruoho /* Subtable header for WHEA tables (EINJ, ERST, WDAT) */
    249       1.1    jruoho 
    250       1.1    jruoho typedef struct acpi_whea_header
    251       1.1    jruoho {
    252       1.1    jruoho     UINT8                   Action;
    253       1.1    jruoho     UINT8                   Instruction;
    254       1.1    jruoho     UINT8                   Flags;
    255       1.1    jruoho     UINT8                   Reserved;
    256       1.1    jruoho     ACPI_GENERIC_ADDRESS    RegisterRegion;
    257       1.1    jruoho     UINT64                  Value;              /* Value used with Read/Write register */
    258       1.1    jruoho     UINT64                  Mask;               /* Bitmask required for this register instruction */
    259       1.1    jruoho 
    260       1.1    jruoho } ACPI_WHEA_HEADER;
    261       1.1    jruoho 
    262       1.1    jruoho 
    263       1.1    jruoho /*******************************************************************************
    264       1.1    jruoho  *
    265      1.13  christos  * ASF - Alert Standard Format table (Signature "ASF!")
    266      1.13  christos  *       Revision 0x10
    267      1.13  christos  *
    268      1.13  christos  * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
    269      1.13  christos  *
    270      1.13  christos  ******************************************************************************/
    271      1.13  christos 
    272      1.13  christos typedef struct acpi_table_asf
    273      1.13  christos {
    274      1.13  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    275      1.13  christos 
    276      1.13  christos } ACPI_TABLE_ASF;
    277      1.13  christos 
    278      1.13  christos 
    279      1.13  christos /* ASF subtable header */
    280      1.13  christos 
    281      1.13  christos typedef struct acpi_asf_header
    282      1.13  christos {
    283      1.13  christos     UINT8                   Type;
    284      1.13  christos     UINT8                   Reserved;
    285      1.13  christos     UINT16                  Length;
    286      1.13  christos 
    287      1.13  christos } ACPI_ASF_HEADER;
    288      1.13  christos 
    289      1.13  christos 
    290      1.13  christos /* Values for Type field above */
    291      1.13  christos 
    292      1.13  christos enum AcpiAsfType
    293      1.13  christos {
    294      1.13  christos     ACPI_ASF_TYPE_INFO          = 0,
    295      1.13  christos     ACPI_ASF_TYPE_ALERT         = 1,
    296      1.13  christos     ACPI_ASF_TYPE_CONTROL       = 2,
    297      1.13  christos     ACPI_ASF_TYPE_BOOT          = 3,
    298      1.13  christos     ACPI_ASF_TYPE_ADDRESS       = 4,
    299      1.13  christos     ACPI_ASF_TYPE_RESERVED      = 5
    300      1.13  christos };
    301      1.13  christos 
    302      1.13  christos /*
    303      1.13  christos  * ASF subtables
    304      1.13  christos  */
    305      1.13  christos 
    306      1.13  christos /* 0: ASF Information */
    307      1.13  christos 
    308      1.13  christos typedef struct acpi_asf_info
    309      1.13  christos {
    310      1.13  christos     ACPI_ASF_HEADER         Header;
    311      1.13  christos     UINT8                   MinResetValue;
    312      1.13  christos     UINT8                   MinPollInterval;
    313      1.13  christos     UINT16                  SystemId;
    314      1.13  christos     UINT32                  MfgId;
    315      1.13  christos     UINT8                   Flags;
    316      1.13  christos     UINT8                   Reserved2[3];
    317      1.13  christos 
    318      1.13  christos } ACPI_ASF_INFO;
    319      1.13  christos 
    320      1.13  christos /* Masks for Flags field above */
    321      1.13  christos 
    322      1.13  christos #define ACPI_ASF_SMBUS_PROTOCOLS    (1)
    323      1.13  christos 
    324      1.13  christos 
    325      1.13  christos /* 1: ASF Alerts */
    326      1.13  christos 
    327      1.13  christos typedef struct acpi_asf_alert
    328      1.13  christos {
    329      1.13  christos     ACPI_ASF_HEADER         Header;
    330      1.13  christos     UINT8                   AssertMask;
    331      1.13  christos     UINT8                   DeassertMask;
    332      1.13  christos     UINT8                   Alerts;
    333      1.13  christos     UINT8                   DataLength;
    334      1.13  christos 
    335      1.13  christos } ACPI_ASF_ALERT;
    336      1.13  christos 
    337      1.13  christos typedef struct acpi_asf_alert_data
    338      1.13  christos {
    339      1.13  christos     UINT8                   Address;
    340      1.13  christos     UINT8                   Command;
    341      1.13  christos     UINT8                   Mask;
    342      1.13  christos     UINT8                   Value;
    343      1.13  christos     UINT8                   SensorType;
    344      1.13  christos     UINT8                   Type;
    345      1.13  christos     UINT8                   Offset;
    346      1.13  christos     UINT8                   SourceType;
    347      1.13  christos     UINT8                   Severity;
    348      1.13  christos     UINT8                   SensorNumber;
    349      1.13  christos     UINT8                   Entity;
    350      1.13  christos     UINT8                   Instance;
    351      1.13  christos 
    352      1.13  christos } ACPI_ASF_ALERT_DATA;
    353      1.13  christos 
    354      1.13  christos 
    355      1.13  christos /* 2: ASF Remote Control */
    356      1.13  christos 
    357      1.13  christos typedef struct acpi_asf_remote
    358      1.13  christos {
    359      1.13  christos     ACPI_ASF_HEADER         Header;
    360      1.13  christos     UINT8                   Controls;
    361      1.13  christos     UINT8                   DataLength;
    362      1.13  christos     UINT16                  Reserved2;
    363      1.13  christos 
    364      1.13  christos } ACPI_ASF_REMOTE;
    365      1.13  christos 
    366      1.13  christos typedef struct acpi_asf_control_data
    367      1.13  christos {
    368      1.13  christos     UINT8                   Function;
    369      1.13  christos     UINT8                   Address;
    370      1.13  christos     UINT8                   Command;
    371      1.13  christos     UINT8                   Value;
    372      1.13  christos 
    373      1.13  christos } ACPI_ASF_CONTROL_DATA;
    374      1.13  christos 
    375      1.13  christos 
    376      1.13  christos /* 3: ASF RMCP Boot Options */
    377      1.13  christos 
    378      1.13  christos typedef struct acpi_asf_rmcp
    379      1.13  christos {
    380      1.13  christos     ACPI_ASF_HEADER         Header;
    381      1.13  christos     UINT8                   Capabilities[7];
    382      1.13  christos     UINT8                   CompletionCode;
    383      1.13  christos     UINT32                  EnterpriseId;
    384      1.13  christos     UINT8                   Command;
    385      1.13  christos     UINT16                  Parameter;
    386      1.13  christos     UINT16                  BootOptions;
    387      1.13  christos     UINT16                  OemParameters;
    388      1.13  christos 
    389      1.13  christos } ACPI_ASF_RMCP;
    390      1.13  christos 
    391      1.13  christos 
    392      1.13  christos /* 4: ASF Address */
    393      1.13  christos 
    394      1.13  christos typedef struct acpi_asf_address
    395      1.13  christos {
    396      1.13  christos     ACPI_ASF_HEADER         Header;
    397      1.13  christos     UINT8                   EpromAddress;
    398      1.13  christos     UINT8                   Devices;
    399      1.13  christos 
    400      1.13  christos } ACPI_ASF_ADDRESS;
    401      1.13  christos 
    402      1.22  christos /*******************************************************************************
    403      1.22  christos  *
    404      1.22  christos  * ASPT - AMD Secure Processor Table (Signature "ASPT")
    405      1.22  christos  *        Revision 0x1
    406      1.22  christos  *
    407      1.22  christos  * Conforms to AMD Socket SP5/SP6 Platform ASPT Rev1 Specification,
    408      1.22  christos  * 12 September 2022
    409      1.22  christos  *
    410      1.22  christos  ******************************************************************************/
    411      1.22  christos 
    412      1.22  christos typedef struct acpi_table_aspt
    413      1.22  christos {
    414      1.22  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    415      1.22  christos     UINT32                  NumEntries;
    416      1.22  christos 
    417      1.22  christos } ACPI_TABLE_ASPT;
    418      1.22  christos 
    419      1.22  christos 
    420      1.22  christos /* ASPT subtable header */
    421      1.22  christos 
    422      1.22  christos typedef struct acpi_aspt_header
    423      1.22  christos {
    424      1.22  christos     UINT16                  Type;
    425      1.22  christos     UINT16                  Length;
    426      1.22  christos 
    427      1.22  christos } ACPI_ASPT_HEADER;
    428      1.22  christos 
    429      1.22  christos 
    430      1.22  christos /* Values for Type field above */
    431      1.22  christos 
    432      1.22  christos enum AcpiAsptType
    433      1.22  christos {
    434      1.22  christos     ACPI_ASPT_TYPE_GLOBAL_REGS      = 0,
    435      1.22  christos     ACPI_ASPT_TYPE_SEV_MBOX_REGS    = 1,
    436      1.22  christos     ACPI_ASPT_TYPE_ACPI_MBOX_REGS   = 2,
    437      1.22  christos     ACPI_ASPT_TYPE_UNKNOWN          = 3,
    438      1.22  christos };
    439      1.22  christos 
    440      1.22  christos /*
    441      1.22  christos  * ASPT subtables
    442      1.22  christos  */
    443      1.22  christos 
    444      1.22  christos /* 0: ASPT Global Registers */
    445      1.22  christos 
    446      1.22  christos typedef struct acpi_aspt_global_regs
    447      1.22  christos {
    448      1.22  christos     ACPI_ASPT_HEADER        Header;
    449      1.22  christos     UINT32                  Reserved;
    450      1.22  christos     UINT64                  FeatureRegAddr;
    451      1.22  christos     UINT64                  IrqEnRegAddr;
    452      1.22  christos     UINT64                  IrqStRegAddr;
    453      1.22  christos 
    454      1.22  christos } ACPI_ASPT_GLOBAL_REGS;
    455      1.22  christos 
    456      1.22  christos 
    457      1.22  christos /* 1: ASPT SEV Mailbox Registers */
    458      1.22  christos 
    459      1.22  christos typedef struct acpi_aspt_sev_mbox_regs
    460      1.22  christos {
    461      1.22  christos     ACPI_ASPT_HEADER        Header;
    462      1.22  christos     UINT8                   MboxIrqId;
    463      1.22  christos     UINT8                   Reserved[3];
    464      1.22  christos     UINT64                  CmdRespRegAddr;
    465      1.22  christos     UINT64                  CmdBufLoRegAddr;
    466      1.22  christos     UINT64                  CmdBufHiRegAddr;
    467      1.22  christos 
    468      1.22  christos } ACPI_ASPT_SEV_MBOX_REGS;
    469      1.22  christos 
    470      1.22  christos 
    471      1.22  christos /* 2: ASPT ACPI Mailbox Registers */
    472      1.22  christos 
    473      1.22  christos typedef struct acpi_aspt_acpi_mbox_regs
    474      1.22  christos {
    475      1.22  christos     ACPI_ASPT_HEADER        Header;
    476      1.22  christos     UINT32                  Reserved1;
    477      1.22  christos     UINT64                  CmdRespRegAddr;
    478      1.22  christos     UINT64                  Reserved2[2];
    479      1.22  christos 
    480      1.22  christos } ACPI_ASPT_ACPI_MBOX_REGS;
    481      1.22  christos 
    482      1.13  christos 
    483      1.13  christos /*******************************************************************************
    484      1.13  christos  *
    485       1.1    jruoho  * BERT - Boot Error Record Table (ACPI 4.0)
    486       1.1    jruoho  *        Version 1
    487       1.1    jruoho  *
    488       1.1    jruoho  ******************************************************************************/
    489       1.1    jruoho 
    490       1.1    jruoho typedef struct acpi_table_bert
    491       1.1    jruoho {
    492       1.1    jruoho     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    493       1.1    jruoho     UINT32                  RegionLength;       /* Length of the boot error region */
    494       1.4  christos     UINT64                  Address;            /* Physical address of the error region */
    495       1.1    jruoho 
    496       1.1    jruoho } ACPI_TABLE_BERT;
    497       1.1    jruoho 
    498       1.1    jruoho 
    499       1.1    jruoho /* Boot Error Region (not a subtable, pointed to by Address field above) */
    500       1.1    jruoho 
    501       1.1    jruoho typedef struct acpi_bert_region
    502       1.1    jruoho {
    503       1.1    jruoho     UINT32                  BlockStatus;        /* Type of error information */
    504       1.1    jruoho     UINT32                  RawDataOffset;      /* Offset to raw error data */
    505       1.1    jruoho     UINT32                  RawDataLength;      /* Length of raw error data */
    506       1.1    jruoho     UINT32                  DataLength;         /* Length of generic error data */
    507       1.1    jruoho     UINT32                  ErrorSeverity;      /* Severity code */
    508       1.1    jruoho 
    509       1.1    jruoho } ACPI_BERT_REGION;
    510       1.1    jruoho 
    511       1.1    jruoho /* Values for BlockStatus flags above */
    512       1.1    jruoho 
    513       1.1    jruoho #define ACPI_BERT_UNCORRECTABLE             (1)
    514       1.1    jruoho #define ACPI_BERT_CORRECTABLE               (1<<1)
    515       1.1    jruoho #define ACPI_BERT_MULTIPLE_UNCORRECTABLE    (1<<2)
    516       1.1    jruoho #define ACPI_BERT_MULTIPLE_CORRECTABLE      (1<<3)
    517       1.1    jruoho #define ACPI_BERT_ERROR_ENTRY_COUNT         (0xFF<<4) /* 8 bits, error count */
    518       1.1    jruoho 
    519       1.1    jruoho /* Values for ErrorSeverity above */
    520       1.1    jruoho 
    521       1.1    jruoho enum AcpiBertErrorSeverity
    522       1.1    jruoho {
    523       1.1    jruoho     ACPI_BERT_ERROR_CORRECTABLE     = 0,
    524       1.1    jruoho     ACPI_BERT_ERROR_FATAL           = 1,
    525       1.1    jruoho     ACPI_BERT_ERROR_CORRECTED       = 2,
    526       1.1    jruoho     ACPI_BERT_ERROR_NONE            = 3,
    527       1.1    jruoho     ACPI_BERT_ERROR_RESERVED        = 4     /* 4 and greater are reserved */
    528       1.1    jruoho };
    529       1.1    jruoho 
    530       1.1    jruoho /*
    531       1.1    jruoho  * Note: The generic error data that follows the ErrorSeverity field above
    532       1.1    jruoho  * uses the ACPI_HEST_GENERIC_DATA defined under the HEST table below
    533       1.1    jruoho  */
    534       1.1    jruoho 
    535       1.1    jruoho 
    536       1.1    jruoho /*******************************************************************************
    537       1.1    jruoho  *
    538      1.13  christos  * BGRT - Boot Graphics Resource Table (ACPI 5.0)
    539      1.13  christos  *        Version 1
    540      1.13  christos  *
    541      1.13  christos  ******************************************************************************/
    542      1.13  christos 
    543      1.13  christos typedef struct acpi_table_bgrt
    544      1.13  christos {
    545      1.13  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    546      1.13  christos     UINT16                  Version;
    547      1.13  christos     UINT8                   Status;
    548      1.13  christos     UINT8                   ImageType;
    549      1.13  christos     UINT64                  ImageAddress;
    550      1.13  christos     UINT32                  ImageOffsetX;
    551      1.13  christos     UINT32                  ImageOffsetY;
    552      1.13  christos 
    553      1.13  christos } ACPI_TABLE_BGRT;
    554      1.13  christos 
    555      1.13  christos /* Flags for Status field above */
    556      1.13  christos 
    557      1.13  christos #define ACPI_BGRT_DISPLAYED                 (1)
    558      1.13  christos #define ACPI_BGRT_ORIENTATION_OFFSET        (3 << 1)
    559      1.13  christos 
    560      1.13  christos 
    561      1.13  christos /*******************************************************************************
    562      1.13  christos  *
    563      1.13  christos  * BOOT - Simple Boot Flag Table
    564      1.13  christos  *        Version 1
    565      1.13  christos  *
    566      1.13  christos  * Conforms to the "Simple Boot Flag Specification", Version 2.1
    567      1.13  christos  *
    568      1.13  christos  ******************************************************************************/
    569      1.13  christos 
    570      1.13  christos typedef struct acpi_table_boot
    571      1.13  christos {
    572      1.13  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    573      1.13  christos     UINT8                   CmosIndex;          /* Index in CMOS RAM for the boot register */
    574      1.13  christos     UINT8                   Reserved[3];
    575      1.13  christos 
    576      1.13  christos } ACPI_TABLE_BOOT;
    577      1.13  christos 
    578      1.13  christos 
    579      1.21  christos /*******************************************************************************
    580      1.21  christos  *
    581      1.21  christos  * CDAT - Coherent Device Attribute Table
    582      1.21  christos  *        Version 1
    583      1.21  christos  *
    584      1.21  christos  * Conforms to the "Coherent Device Attribute Table (CDAT) Specification
    585      1.21  christos  " (Revision 1.01, October 2020.)
    586      1.21  christos  *
    587      1.21  christos  ******************************************************************************/
    588      1.21  christos 
    589      1.21  christos typedef struct acpi_table_cdat
    590      1.21  christos {
    591      1.21  christos     UINT32                  Length;                             /* Length of table in bytes, including this header */
    592      1.21  christos     UINT8                   Revision;                           /* ACPI Specification minor version number */
    593      1.21  christos     UINT8                   Checksum;                           /* To make sum of entire table == 0 */
    594      1.21  christos     UINT8                   Reserved[6];
    595      1.21  christos     UINT32                  Sequence;                           /* Used to detect runtime CDAT table changes */
    596      1.21  christos 
    597      1.21  christos } ACPI_TABLE_CDAT;
    598      1.21  christos 
    599      1.21  christos 
    600      1.21  christos /* CDAT common subtable header */
    601      1.21  christos 
    602      1.21  christos typedef struct acpi_cdat_header
    603      1.21  christos {
    604      1.21  christos     UINT8                   Type;
    605      1.21  christos     UINT8                   Reserved;
    606      1.21  christos     UINT16                  Length;
    607      1.21  christos 
    608      1.21  christos } ACPI_CDAT_HEADER;
    609      1.21  christos 
    610      1.21  christos /* Values for Type field above */
    611      1.21  christos 
    612      1.21  christos enum AcpiCdatType
    613      1.21  christos {
    614      1.21  christos     ACPI_CDAT_TYPE_DSMAS                = 0,
    615      1.21  christos     ACPI_CDAT_TYPE_DSLBIS               = 1,
    616      1.21  christos     ACPI_CDAT_TYPE_DSMSCIS              = 2,
    617      1.21  christos     ACPI_CDAT_TYPE_DSIS                 = 3,
    618      1.21  christos     ACPI_CDAT_TYPE_DSEMTS               = 4,
    619      1.21  christos     ACPI_CDAT_TYPE_SSLBIS               = 5,
    620      1.21  christos     ACPI_CDAT_TYPE_RESERVED             = 6   /* 6 through 0xFF are reserved */
    621      1.21  christos };
    622      1.21  christos 
    623      1.21  christos 
    624      1.21  christos /* Subtable 0: Device Scoped Memory Affinity Structure (DSMAS) */
    625      1.21  christos 
    626      1.22  christos typedef struct acpi_cdat_dsmas
    627      1.21  christos {
    628      1.21  christos     UINT8                   DsmadHandle;
    629      1.21  christos     UINT8                   Flags;
    630      1.21  christos     UINT16                  Reserved;
    631      1.21  christos     UINT64                  DpaBaseAddress;
    632      1.21  christos     UINT64                  DpaLength;
    633      1.21  christos 
    634      1.21  christos } ACPI_CDAT_DSMAS;
    635      1.21  christos 
    636      1.21  christos /* Flags for subtable above */
    637      1.21  christos 
    638      1.22  christos #define ACPI_CDAT_DSMAS_NON_VOLATILE        (1 << 2)
    639  1.22.6.1  perseant #define ACPI_CDAT_DSMAS_SHAREABLE           (1 << 3)
    640  1.22.6.1  perseant #define ACPI_CDAT_DSMAS_READ_ONLY           (1 << 6)
    641      1.21  christos 
    642      1.21  christos 
    643      1.21  christos /* Subtable 1: Device scoped Latency and Bandwidth Information Structure (DSLBIS) */
    644      1.21  christos 
    645      1.21  christos typedef struct acpi_cdat_dslbis
    646      1.21  christos {
    647      1.21  christos     UINT8                   Handle;
    648      1.21  christos     UINT8                   Flags; /* If Handle matches a DSMAS handle, the definition of this field matches
    649      1.21  christos                                     * Flags field in HMAT System Locality Latency */
    650      1.21  christos     UINT8                   DataType;
    651      1.21  christos     UINT8                   Reserved;
    652      1.21  christos     UINT64                  EntryBaseUnit;
    653      1.21  christos     UINT16                  Entry[3];
    654      1.21  christos     UINT16                  Reserved2;
    655      1.21  christos 
    656      1.21  christos } ACPI_CDAT_DSLBIS;
    657      1.21  christos 
    658      1.21  christos 
    659      1.21  christos /* Subtable 2: Device Scoped Memory Side Cache Information Structure (DSMSCIS) */
    660      1.21  christos 
    661      1.21  christos typedef struct acpi_cdat_dsmscis
    662      1.21  christos {
    663      1.21  christos     UINT8                   DsmasHandle;
    664      1.21  christos     UINT8                   Reserved[3];
    665      1.21  christos     UINT64                  SideCacheSize;
    666      1.21  christos     UINT32                  CacheAttributes;
    667      1.21  christos 
    668      1.21  christos } ACPI_CDAT_DSMSCIS;
    669      1.21  christos 
    670      1.21  christos 
    671      1.21  christos /* Subtable 3: Device Scoped Initiator Structure (DSIS) */
    672      1.21  christos 
    673      1.21  christos typedef struct acpi_cdat_dsis
    674      1.21  christos {
    675      1.21  christos     UINT8                   Flags;
    676      1.21  christos     UINT8                   Handle;
    677      1.21  christos     UINT16                  Reserved;
    678      1.21  christos 
    679      1.21  christos } ACPI_CDAT_DSIS;
    680      1.21  christos 
    681      1.21  christos /* Flags for above subtable */
    682      1.21  christos 
    683      1.21  christos #define ACPI_CDAT_DSIS_MEM_ATTACHED         (1 << 0)
    684      1.21  christos 
    685      1.21  christos 
    686      1.21  christos /* Subtable 4: Device Scoped EFI Memory Type Structure (DSEMTS) */
    687      1.21  christos 
    688      1.21  christos typedef struct acpi_cdat_dsemts
    689      1.21  christos {
    690      1.21  christos     UINT8                   DsmasHandle;
    691      1.21  christos     UINT8                   MemoryType;
    692      1.21  christos     UINT16                  Reserved;
    693      1.21  christos     UINT64                  DpaOffset;
    694      1.21  christos     UINT64                  RangeLength;
    695      1.21  christos 
    696      1.21  christos } ACPI_CDAT_DSEMTS;
    697      1.21  christos 
    698      1.21  christos 
    699      1.21  christos /* Subtable 5: Switch Scoped Latency and Bandwidth Information Structure (SSLBIS) */
    700      1.21  christos 
    701      1.21  christos typedef struct acpi_cdat_sslbis
    702      1.21  christos {
    703      1.21  christos     UINT8                   DataType;
    704      1.21  christos     UINT8                   Reserved[3];
    705      1.21  christos     UINT64                  EntryBaseUnit;
    706      1.21  christos 
    707      1.21  christos } ACPI_CDAT_SSLBIS;
    708      1.21  christos 
    709      1.21  christos 
    710      1.21  christos /* Sub-subtable for above, SslbeEntries field */
    711      1.21  christos 
    712      1.21  christos typedef struct acpi_cdat_sslbe
    713      1.21  christos {
    714      1.21  christos     UINT16                  PortxId;
    715      1.21  christos     UINT16                  PortyId;
    716      1.21  christos     UINT16                  LatencyOrBandwidth;
    717      1.21  christos     UINT16                  Reserved;
    718      1.21  christos 
    719      1.21  christos } ACPI_CDAT_SSLBE;
    720      1.21  christos 
    721  1.22.6.1  perseant #define ACPI_CDAT_SSLBIS_US_PORT	0x0100
    722  1.22.6.1  perseant #define ACPI_CDAT_SSLBIS_ANY_PORT	0xffff
    723      1.21  christos 
    724      1.13  christos /*******************************************************************************
    725      1.13  christos  *
    726      1.17  christos  * CEDT - CXL Early Discovery Table
    727      1.17  christos  *        Version 1
    728      1.17  christos  *
    729      1.21  christos  * Conforms to the "CXL Early Discovery Table" (CXL 2.0, October 2020)
    730      1.17  christos  *
    731      1.17  christos  ******************************************************************************/
    732      1.17  christos 
    733      1.17  christos typedef struct acpi_table_cedt
    734      1.17  christos {
    735      1.17  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    736      1.17  christos 
    737      1.17  christos } ACPI_TABLE_CEDT;
    738      1.17  christos 
    739      1.17  christos /* CEDT subtable header (Performance Record Structure) */
    740      1.17  christos 
    741      1.17  christos typedef struct acpi_cedt_header
    742      1.17  christos {
    743      1.17  christos     UINT8                   Type;
    744      1.17  christos     UINT8                   Reserved;
    745      1.17  christos     UINT16                  Length;
    746      1.17  christos 
    747      1.17  christos } ACPI_CEDT_HEADER;
    748      1.17  christos 
    749      1.17  christos /* Values for Type field above */
    750      1.17  christos 
    751      1.17  christos enum AcpiCedtType
    752      1.17  christos {
    753      1.17  christos     ACPI_CEDT_TYPE_CHBS                 = 0,
    754      1.18  christos     ACPI_CEDT_TYPE_CFMWS                = 1,
    755      1.21  christos     ACPI_CEDT_TYPE_CXIMS                = 2,
    756      1.21  christos     ACPI_CEDT_TYPE_RDPAS                = 3,
    757      1.21  christos     ACPI_CEDT_TYPE_RESERVED             = 4,
    758      1.17  christos };
    759      1.17  christos 
    760      1.18  christos /* Values for version field above */
    761      1.18  christos 
    762      1.18  christos #define ACPI_CEDT_CHBS_VERSION_CXL11    (0)
    763      1.18  christos #define ACPI_CEDT_CHBS_VERSION_CXL20    (1)
    764      1.18  christos 
    765      1.18  christos /* Values for length field above */
    766      1.18  christos 
    767      1.18  christos #define ACPI_CEDT_CHBS_LENGTH_CXL11     (0x2000)
    768      1.18  christos #define ACPI_CEDT_CHBS_LENGTH_CXL20     (0x10000)
    769      1.17  christos 
    770      1.17  christos /*
    771      1.17  christos  * CEDT subtables
    772      1.17  christos  */
    773      1.17  christos 
    774      1.17  christos /* 0: CXL Host Bridge Structure */
    775      1.17  christos 
    776      1.17  christos typedef struct acpi_cedt_chbs
    777      1.17  christos {
    778      1.17  christos     ACPI_CEDT_HEADER        Header;
    779      1.17  christos     UINT32                  Uid;
    780      1.17  christos     UINT32                  CxlVersion;
    781      1.17  christos     UINT32                  Reserved;
    782      1.17  christos     UINT64                  Base;
    783      1.17  christos     UINT64                  Length;
    784      1.17  christos 
    785      1.17  christos } ACPI_CEDT_CHBS;
    786      1.17  christos 
    787      1.17  christos 
    788      1.18  christos /* 1: CXL Fixed Memory Window Structure */
    789      1.18  christos 
    790      1.18  christos typedef struct acpi_cedt_cfmws
    791      1.18  christos {
    792      1.18  christos     ACPI_CEDT_HEADER        Header;
    793      1.18  christos     UINT32                  Reserved1;
    794      1.18  christos     UINT64                  BaseHpa;
    795      1.18  christos     UINT64                  WindowSize;
    796      1.18  christos     UINT8                   InterleaveWays;
    797      1.18  christos     UINT8                   InterleaveArithmetic;
    798      1.18  christos     UINT16                  Reserved2;
    799      1.18  christos     UINT32                  Granularity;
    800      1.18  christos     UINT16                  Restrictions;
    801      1.18  christos     UINT16                  QtgId;
    802      1.18  christos     UINT32                  InterleaveTargets[];
    803      1.18  christos 
    804      1.18  christos } ACPI_CEDT_CFMWS;
    805      1.18  christos 
    806      1.20  christos typedef struct acpi_cedt_cfmws_target_element
    807      1.20  christos {
    808      1.20  christos     UINT32                  InterleaveTarget;
    809      1.20  christos 
    810      1.20  christos } ACPI_CEDT_CFMWS_TARGET_ELEMENT;
    811      1.20  christos 
    812      1.18  christos /* Values for Interleave Arithmetic field above */
    813      1.18  christos 
    814      1.20  christos #define ACPI_CEDT_CFMWS_ARITHMETIC_MODULO   (0)
    815      1.21  christos #define ACPI_CEDT_CFMWS_ARITHMETIC_XOR      (1)
    816      1.18  christos 
    817      1.18  christos /* Values for Restrictions field above */
    818      1.18  christos 
    819      1.20  christos #define ACPI_CEDT_CFMWS_RESTRICT_TYPE2      (1)
    820      1.20  christos #define ACPI_CEDT_CFMWS_RESTRICT_TYPE3      (1<<1)
    821      1.20  christos #define ACPI_CEDT_CFMWS_RESTRICT_VOLATILE   (1<<2)
    822      1.20  christos #define ACPI_CEDT_CFMWS_RESTRICT_PMEM       (1<<3)
    823      1.20  christos #define ACPI_CEDT_CFMWS_RESTRICT_FIXED      (1<<4)
    824      1.18  christos 
    825      1.21  christos /* 2: CXL XOR Interleave Math Structure */
    826      1.21  christos 
    827  1.22.6.1  perseant typedef struct acpi_cedt_cxims {
    828      1.21  christos     ACPI_CEDT_HEADER        Header;
    829      1.21  christos     UINT16                  Reserved1;
    830      1.21  christos     UINT8                   Hbig;
    831      1.21  christos     UINT8                   NrXormaps;
    832      1.21  christos     UINT64                  XormapList[];
    833  1.22.6.1  perseant } ACPI_CEDT_CXIMS;
    834  1.22.6.1  perseant 
    835  1.22.6.1  perseant typedef struct acpi_cedt_cxims_target_element
    836  1.22.6.1  perseant {
    837  1.22.6.1  perseant     UINT64                   Xormap;
    838  1.22.6.1  perseant 
    839  1.22.6.1  perseant } ACPI_CEDT_CXIMS_TARGET_ELEMENT;
    840  1.22.6.1  perseant 
    841      1.21  christos 
    842      1.21  christos /* 3: CXL RCEC Downstream Port Association Structure */
    843      1.21  christos 
    844      1.21  christos struct acpi_cedt_rdpas {
    845      1.21  christos     ACPI_CEDT_HEADER        Header;
    846      1.21  christos     UINT8                   Reserved1;
    847      1.21  christos     UINT16                  Length;
    848      1.21  christos     UINT16                  Segment;
    849      1.21  christos     UINT16                  Bdf;
    850      1.21  christos     UINT8                   Protocol;
    851      1.21  christos     UINT64                  Address;
    852      1.21  christos };
    853      1.21  christos 
    854      1.21  christos /* Masks for bdf field above */
    855      1.21  christos #define ACPI_CEDT_RDPAS_BUS_MASK            0xff00
    856      1.21  christos #define ACPI_CEDT_RDPAS_DEVICE_MASK         0x00f8
    857      1.21  christos #define ACPI_CEDT_RDPAS_FUNCTION_MASK       0x0007
    858      1.21  christos 
    859      1.21  christos #define ACPI_CEDT_RDPAS_PROTOCOL_IO        (0)
    860      1.21  christos #define ACPI_CEDT_RDPAS_PROTOCOL_CACHEMEM  (1)
    861      1.18  christos 
    862      1.17  christos /*******************************************************************************
    863      1.17  christos  *
    864       1.1    jruoho  * CPEP - Corrected Platform Error Polling table (ACPI 4.0)
    865       1.1    jruoho  *        Version 1
    866       1.1    jruoho  *
    867       1.1    jruoho  ******************************************************************************/
    868       1.1    jruoho 
    869       1.1    jruoho typedef struct acpi_table_cpep
    870       1.1    jruoho {
    871       1.1    jruoho     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    872       1.1    jruoho     UINT64                  Reserved;
    873       1.1    jruoho 
    874       1.1    jruoho } ACPI_TABLE_CPEP;
    875       1.1    jruoho 
    876       1.1    jruoho 
    877       1.1    jruoho /* Subtable */
    878       1.1    jruoho 
    879       1.1    jruoho typedef struct acpi_cpep_polling
    880       1.1    jruoho {
    881       1.1    jruoho     ACPI_SUBTABLE_HEADER    Header;
    882       1.1    jruoho     UINT8                   Id;                 /* Processor ID */
    883       1.1    jruoho     UINT8                   Eid;                /* Processor EID */
    884       1.1    jruoho     UINT32                  Interval;           /* Polling interval (msec) */
    885       1.1    jruoho 
    886       1.1    jruoho } ACPI_CPEP_POLLING;
    887       1.1    jruoho 
    888       1.1    jruoho 
    889       1.1    jruoho /*******************************************************************************
    890       1.1    jruoho  *
    891      1.13  christos  * CSRT - Core System Resource Table
    892      1.13  christos  *        Version 0
    893      1.13  christos  *
    894      1.13  christos  * Conforms to the "Core System Resource Table (CSRT)", November 14, 2011
    895       1.1    jruoho  *
    896       1.1    jruoho  ******************************************************************************/
    897       1.1    jruoho 
    898      1.13  christos typedef struct acpi_table_csrt
    899       1.1    jruoho {
    900       1.1    jruoho     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    901       1.1    jruoho 
    902      1.13  christos } ACPI_TABLE_CSRT;
    903       1.1    jruoho 
    904       1.1    jruoho 
    905      1.13  christos /* Resource Group subtable */
    906       1.1    jruoho 
    907      1.13  christos typedef struct acpi_csrt_group
    908       1.1    jruoho {
    909      1.13  christos     UINT32                  Length;
    910      1.13  christos     UINT32                  VendorId;
    911      1.13  christos     UINT32                  SubvendorId;
    912      1.13  christos     UINT16                  DeviceId;
    913      1.13  christos     UINT16                  SubdeviceId;
    914      1.13  christos     UINT16                  Revision;
    915      1.13  christos     UINT16                  Reserved;
    916      1.13  christos     UINT32                  SharedInfoLength;
    917       1.1    jruoho 
    918      1.13  christos     /* Shared data immediately follows (Length = SharedInfoLength) */
    919       1.1    jruoho 
    920      1.13  christos } ACPI_CSRT_GROUP;
    921       1.1    jruoho 
    922      1.13  christos /* Shared Info subtable */
    923       1.1    jruoho 
    924      1.13  christos typedef struct acpi_csrt_shared_info
    925       1.1    jruoho {
    926      1.13  christos     UINT16                  MajorVersion;
    927      1.13  christos     UINT16                  MinorVersion;
    928      1.13  christos     UINT32                  MmioBaseLow;
    929      1.13  christos     UINT32                  MmioBaseHigh;
    930      1.13  christos     UINT32                  GsiInterrupt;
    931      1.13  christos     UINT8                   InterruptPolarity;
    932      1.13  christos     UINT8                   InterruptMode;
    933      1.13  christos     UINT8                   NumChannels;
    934      1.13  christos     UINT8                   DmaAddressWidth;
    935      1.13  christos     UINT16                  BaseRequestLine;
    936      1.13  christos     UINT16                  NumHandshakeSignals;
    937      1.13  christos     UINT32                  MaxBlockSize;
    938       1.1    jruoho 
    939      1.13  christos     /* Resource descriptors immediately follow (Length = Group Length - SharedInfoLength) */
    940       1.1    jruoho 
    941      1.13  christos } ACPI_CSRT_SHARED_INFO;
    942       1.1    jruoho 
    943      1.13  christos /* Resource Descriptor subtable */
    944       1.1    jruoho 
    945      1.13  christos typedef struct acpi_csrt_descriptor
    946       1.1    jruoho {
    947      1.13  christos     UINT32                  Length;
    948      1.13  christos     UINT16                  Type;
    949      1.13  christos     UINT16                  Subtype;
    950      1.13  christos     UINT32                  Uid;
    951      1.13  christos 
    952      1.13  christos     /* Resource-specific information immediately follows */
    953       1.1    jruoho 
    954      1.13  christos } ACPI_CSRT_DESCRIPTOR;
    955       1.1    jruoho 
    956       1.1    jruoho 
    957      1.13  christos /* Resource Types */
    958       1.4  christos 
    959      1.13  christos #define ACPI_CSRT_TYPE_INTERRUPT    0x0001
    960      1.13  christos #define ACPI_CSRT_TYPE_TIMER        0x0002
    961      1.13  christos #define ACPI_CSRT_TYPE_DMA          0x0003
    962       1.4  christos 
    963      1.13  christos /* Resource Subtypes */
    964       1.4  christos 
    965      1.13  christos #define ACPI_CSRT_XRUPT_LINE        0x0000
    966      1.13  christos #define ACPI_CSRT_XRUPT_CONTROLLER  0x0001
    967      1.13  christos #define ACPI_CSRT_TIMER             0x0000
    968      1.13  christos #define ACPI_CSRT_DMA_CHANNEL       0x0000
    969      1.13  christos #define ACPI_CSRT_DMA_CONTROLLER    0x0001
    970       1.4  christos 
    971       1.1    jruoho 
    972      1.13  christos /*******************************************************************************
    973      1.13  christos  *
    974      1.13  christos  * DBG2 - Debug Port Table 2
    975      1.13  christos  *        Version 0 (Both main table and subtables)
    976      1.13  christos  *
    977      1.19  christos  * Conforms to "Microsoft Debug Port Table 2 (DBG2)", September 21, 2020
    978      1.13  christos  *
    979      1.13  christos  ******************************************************************************/
    980       1.1    jruoho 
    981      1.13  christos typedef struct acpi_table_dbg2
    982       1.1    jruoho {
    983      1.13  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    984      1.13  christos     UINT32                  InfoOffset;
    985      1.13  christos     UINT32                  InfoCount;
    986       1.1    jruoho 
    987      1.13  christos } ACPI_TABLE_DBG2;
    988       1.1    jruoho 
    989       1.1    jruoho 
    990      1.13  christos typedef struct acpi_dbg2_header
    991       1.1    jruoho {
    992      1.13  christos     UINT32                  InfoOffset;
    993      1.13  christos     UINT32                  InfoCount;
    994      1.13  christos 
    995      1.13  christos } ACPI_DBG2_HEADER;
    996      1.13  christos 
    997      1.13  christos 
    998      1.13  christos /* Debug Device Information Subtable */
    999       1.1    jruoho 
   1000      1.13  christos typedef struct acpi_dbg2_device
   1001      1.13  christos {
   1002      1.13  christos     UINT8                   Revision;
   1003      1.13  christos     UINT16                  Length;
   1004      1.13  christos     UINT8                   RegisterCount;      /* Number of BaseAddress registers */
   1005      1.13  christos     UINT16                  NamepathLength;
   1006      1.13  christos     UINT16                  NamepathOffset;
   1007      1.13  christos     UINT16                  OemDataLength;
   1008      1.13  christos     UINT16                  OemDataOffset;
   1009      1.13  christos     UINT16                  PortType;
   1010      1.13  christos     UINT16                  PortSubtype;
   1011      1.13  christos     UINT16                  Reserved;
   1012      1.13  christos     UINT16                  BaseAddressOffset;
   1013      1.13  christos     UINT16                  AddressSizeOffset;
   1014      1.13  christos     /*
   1015      1.13  christos      * Data that follows:
   1016      1.13  christos      *    BaseAddress (required) - Each in 12-byte Generic Address Structure format.
   1017      1.13  christos      *    AddressSize (required) - Array of UINT32 sizes corresponding to each BaseAddress register.
   1018      1.13  christos      *    Namepath    (required) - Null terminated string. Single dot if not supported.
   1019      1.13  christos      *    OemData     (optional) - Length is OemDataLength.
   1020      1.13  christos      */
   1021      1.13  christos } ACPI_DBG2_DEVICE;
   1022      1.13  christos 
   1023      1.13  christos /* Types for PortType field above */
   1024      1.13  christos 
   1025      1.13  christos #define ACPI_DBG2_SERIAL_PORT       0x8000
   1026      1.13  christos #define ACPI_DBG2_1394_PORT         0x8001
   1027      1.13  christos #define ACPI_DBG2_USB_PORT          0x8002
   1028      1.13  christos #define ACPI_DBG2_NET_PORT          0x8003
   1029      1.13  christos 
   1030      1.13  christos /* Subtypes for PortSubtype field above */
   1031      1.13  christos 
   1032      1.13  christos #define ACPI_DBG2_16550_COMPATIBLE  0x0000
   1033      1.13  christos #define ACPI_DBG2_16550_SUBSET      0x0001
   1034      1.19  christos #define ACPI_DBG2_MAX311XE_SPI      0x0002
   1035      1.13  christos #define ACPI_DBG2_ARM_PL011         0x0003
   1036      1.19  christos #define ACPI_DBG2_MSM8X60           0x0004
   1037      1.19  christos #define ACPI_DBG2_16550_NVIDIA      0x0005
   1038      1.19  christos #define ACPI_DBG2_TI_OMAP           0x0006
   1039      1.19  christos #define ACPI_DBG2_APM88XXXX         0x0008
   1040      1.19  christos #define ACPI_DBG2_MSM8974           0x0009
   1041      1.19  christos #define ACPI_DBG2_SAM5250           0x000A
   1042      1.19  christos #define ACPI_DBG2_INTEL_USIF        0x000B
   1043      1.19  christos #define ACPI_DBG2_IMX6              0x000C
   1044      1.13  christos #define ACPI_DBG2_ARM_SBSA_32BIT    0x000D
   1045      1.13  christos #define ACPI_DBG2_ARM_SBSA_GENERIC  0x000E
   1046      1.13  christos #define ACPI_DBG2_ARM_DCC           0x000F
   1047      1.13  christos #define ACPI_DBG2_BCM2835           0x0010
   1048      1.19  christos #define ACPI_DBG2_SDM845_1_8432MHZ  0x0011
   1049      1.19  christos #define ACPI_DBG2_16550_WITH_GAS    0x0012
   1050      1.19  christos #define ACPI_DBG2_SDM845_7_372MHZ   0x0013
   1051      1.19  christos #define ACPI_DBG2_INTEL_LPSS        0x0014
   1052       1.1    jruoho 
   1053      1.13  christos #define ACPI_DBG2_1394_STANDARD     0x0000
   1054       1.1    jruoho 
   1055      1.13  christos #define ACPI_DBG2_USB_XHCI          0x0000
   1056      1.13  christos #define ACPI_DBG2_USB_EHCI          0x0001
   1057       1.1    jruoho 
   1058       1.1    jruoho 
   1059       1.1    jruoho /*******************************************************************************
   1060       1.1    jruoho  *
   1061      1.13  christos  * DBGP - Debug Port table
   1062       1.1    jruoho  *        Version 1
   1063       1.1    jruoho  *
   1064      1.13  christos  * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000
   1065      1.13  christos  *
   1066       1.1    jruoho  ******************************************************************************/
   1067       1.1    jruoho 
   1068      1.13  christos typedef struct acpi_table_dbgp
   1069       1.1    jruoho {
   1070       1.1    jruoho     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1071      1.13  christos     UINT8                   Type;               /* 0=full 16550, 1=subset of 16550 */
   1072      1.13  christos     UINT8                   Reserved[3];
   1073      1.13  christos     ACPI_GENERIC_ADDRESS    DebugPort;
   1074       1.1    jruoho 
   1075      1.13  christos } ACPI_TABLE_DBGP;
   1076       1.1    jruoho 
   1077       1.1    jruoho 
   1078      1.13  christos /*******************************************************************************
   1079      1.13  christos  *
   1080      1.13  christos  * DMAR - DMA Remapping table
   1081      1.13  christos  *        Version 1
   1082      1.13  christos  *
   1083      1.13  christos  * Conforms to "Intel Virtualization Technology for Directed I/O",
   1084      1.13  christos  * Version 2.3, October 2014
   1085      1.13  christos  *
   1086      1.13  christos  ******************************************************************************/
   1087       1.1    jruoho 
   1088      1.13  christos typedef struct acpi_table_dmar
   1089       1.1    jruoho {
   1090      1.13  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1091      1.13  christos     UINT8                   Width;              /* Host Address Width */
   1092      1.13  christos     UINT8                   Flags;
   1093      1.13  christos     UINT8                   Reserved[10];
   1094       1.1    jruoho 
   1095      1.13  christos } ACPI_TABLE_DMAR;
   1096       1.1    jruoho 
   1097       1.1    jruoho /* Masks for Flags field above */
   1098       1.1    jruoho 
   1099      1.13  christos #define ACPI_DMAR_INTR_REMAP        (1)
   1100      1.13  christos #define ACPI_DMAR_X2APIC_OPT_OUT    (1<<1)
   1101      1.13  christos #define ACPI_DMAR_X2APIC_MODE       (1<<2)
   1102      1.13  christos 
   1103       1.1    jruoho 
   1104      1.13  christos /* DMAR subtable header */
   1105       1.1    jruoho 
   1106      1.13  christos typedef struct acpi_dmar_header
   1107       1.1    jruoho {
   1108      1.13  christos     UINT16                  Type;
   1109      1.13  christos     UINT16                  Length;
   1110      1.13  christos 
   1111      1.13  christos } ACPI_DMAR_HEADER;
   1112      1.13  christos 
   1113      1.13  christos /* Values for subtable type in ACPI_DMAR_HEADER */
   1114      1.13  christos 
   1115      1.13  christos enum AcpiDmarType
   1116       1.1    jruoho {
   1117      1.13  christos     ACPI_DMAR_TYPE_HARDWARE_UNIT        = 0,
   1118      1.13  christos     ACPI_DMAR_TYPE_RESERVED_MEMORY      = 1,
   1119      1.13  christos     ACPI_DMAR_TYPE_ROOT_ATS             = 2,
   1120      1.13  christos     ACPI_DMAR_TYPE_HARDWARE_AFFINITY    = 3,
   1121      1.13  christos     ACPI_DMAR_TYPE_NAMESPACE            = 4,
   1122      1.20  christos     ACPI_DMAR_TYPE_SATC                 = 5,
   1123      1.20  christos     ACPI_DMAR_TYPE_RESERVED             = 6     /* 6 and greater are reserved */
   1124       1.1    jruoho };
   1125       1.1    jruoho 
   1126       1.1    jruoho 
   1127      1.13  christos /* DMAR Device Scope structure */
   1128       1.1    jruoho 
   1129      1.13  christos typedef struct acpi_dmar_device_scope
   1130       1.1    jruoho {
   1131      1.13  christos     UINT8                   EntryType;
   1132      1.13  christos     UINT8                   Length;
   1133      1.13  christos     UINT16                  Reserved;
   1134      1.13  christos     UINT8                   EnumerationId;
   1135      1.13  christos     UINT8                   Bus;
   1136       1.1    jruoho 
   1137      1.13  christos } ACPI_DMAR_DEVICE_SCOPE;
   1138       1.1    jruoho 
   1139      1.13  christos /* Values for EntryType in ACPI_DMAR_DEVICE_SCOPE - device types */
   1140       1.1    jruoho 
   1141      1.13  christos enum AcpiDmarScopeType
   1142       1.1    jruoho {
   1143      1.13  christos     ACPI_DMAR_SCOPE_TYPE_NOT_USED       = 0,
   1144      1.13  christos     ACPI_DMAR_SCOPE_TYPE_ENDPOINT       = 1,
   1145      1.13  christos     ACPI_DMAR_SCOPE_TYPE_BRIDGE         = 2,
   1146      1.13  christos     ACPI_DMAR_SCOPE_TYPE_IOAPIC         = 3,
   1147      1.13  christos     ACPI_DMAR_SCOPE_TYPE_HPET           = 4,
   1148      1.13  christos     ACPI_DMAR_SCOPE_TYPE_NAMESPACE      = 5,
   1149      1.13  christos     ACPI_DMAR_SCOPE_TYPE_RESERVED       = 6     /* 6 and greater are reserved */
   1150      1.13  christos };
   1151       1.1    jruoho 
   1152      1.13  christos typedef struct acpi_dmar_pci_path
   1153       1.1    jruoho {
   1154      1.13  christos     UINT8                   Device;
   1155      1.13  christos     UINT8                   Function;
   1156       1.1    jruoho 
   1157      1.13  christos } ACPI_DMAR_PCI_PATH;
   1158       1.1    jruoho 
   1159       1.1    jruoho 
   1160       1.1    jruoho /*
   1161      1.13  christos  * DMAR Subtables, correspond to Type in ACPI_DMAR_HEADER
   1162       1.1    jruoho  */
   1163       1.1    jruoho 
   1164      1.13  christos /* 0: Hardware Unit Definition */
   1165       1.1    jruoho 
   1166      1.13  christos typedef struct acpi_dmar_hardware_unit
   1167       1.1    jruoho {
   1168      1.13  christos     ACPI_DMAR_HEADER        Header;
   1169       1.1    jruoho     UINT8                   Flags;
   1170      1.13  christos     UINT8                   Reserved;
   1171      1.13  christos     UINT16                  Segment;
   1172      1.13  christos     UINT64                  Address;            /* Register Base Address */
   1173       1.1    jruoho 
   1174      1.13  christos } ACPI_DMAR_HARDWARE_UNIT;
   1175       1.1    jruoho 
   1176      1.13  christos /* Masks for Flags field above */
   1177       1.1    jruoho 
   1178      1.13  christos #define ACPI_DMAR_INCLUDE_ALL       (1)
   1179       1.4  christos 
   1180       1.1    jruoho 
   1181      1.14  christos /* 1: Reserved Memory Definition */
   1182       1.1    jruoho 
   1183      1.13  christos typedef struct acpi_dmar_reserved_memory
   1184       1.1    jruoho {
   1185      1.13  christos     ACPI_DMAR_HEADER        Header;
   1186      1.13  christos     UINT16                  Reserved;
   1187      1.13  christos     UINT16                  Segment;
   1188      1.13  christos     UINT64                  BaseAddress;        /* 4K aligned base address */
   1189      1.13  christos     UINT64                  EndAddress;         /* 4K aligned limit address */
   1190       1.1    jruoho 
   1191      1.13  christos } ACPI_DMAR_RESERVED_MEMORY;
   1192       1.1    jruoho 
   1193      1.13  christos /* Masks for Flags field above */
   1194       1.1    jruoho 
   1195      1.13  christos #define ACPI_DMAR_ALLOW_ALL         (1)
   1196       1.1    jruoho 
   1197       1.1    jruoho 
   1198      1.13  christos /* 2: Root Port ATS Capability Reporting Structure */
   1199       1.1    jruoho 
   1200      1.13  christos typedef struct acpi_dmar_atsr
   1201       1.1    jruoho {
   1202      1.13  christos     ACPI_DMAR_HEADER        Header;
   1203      1.13  christos     UINT8                   Flags;
   1204      1.13  christos     UINT8                   Reserved;
   1205      1.13  christos     UINT16                  Segment;
   1206       1.1    jruoho 
   1207      1.13  christos } ACPI_DMAR_ATSR;
   1208       1.1    jruoho 
   1209      1.13  christos /* Masks for Flags field above */
   1210       1.1    jruoho 
   1211      1.13  christos #define ACPI_DMAR_ALL_PORTS         (1)
   1212       1.1    jruoho 
   1213       1.1    jruoho 
   1214      1.13  christos /* 3: Remapping Hardware Static Affinity Structure */
   1215       1.1    jruoho 
   1216      1.13  christos typedef struct acpi_dmar_rhsa
   1217       1.1    jruoho {
   1218      1.13  christos     ACPI_DMAR_HEADER        Header;
   1219       1.1    jruoho     UINT32                  Reserved;
   1220      1.13  christos     UINT64                  BaseAddress;
   1221      1.13  christos     UINT32                  ProximityDomain;
   1222       1.1    jruoho 
   1223      1.13  christos } ACPI_DMAR_RHSA;
   1224       1.1    jruoho 
   1225       1.1    jruoho 
   1226      1.13  christos /* 4: ACPI Namespace Device Declaration Structure */
   1227       1.1    jruoho 
   1228      1.13  christos typedef struct acpi_dmar_andd
   1229       1.1    jruoho {
   1230      1.13  christos     ACPI_DMAR_HEADER        Header;
   1231      1.13  christos     UINT8                   Reserved[3];
   1232      1.13  christos     UINT8                   DeviceNumber;
   1233      1.22  christos     union {
   1234      1.22  christos         char                  __pad;
   1235      1.22  christos         ACPI_FLEX_ARRAY(char, DeviceName);
   1236      1.22  christos     };
   1237       1.1    jruoho 
   1238      1.13  christos } ACPI_DMAR_ANDD;
   1239       1.1    jruoho 
   1240       1.1    jruoho 
   1241      1.20  christos /* 5: SoC Integrated Address Translation Cache (SATC)  */
   1242      1.20  christos 
   1243      1.20  christos typedef struct acpi_dmar_satc
   1244      1.20  christos {
   1245      1.20  christos     ACPI_DMAR_HEADER        Header;
   1246      1.20  christos     UINT8                   Flags;
   1247      1.20  christos     UINT8                   Reserved;
   1248      1.20  christos     UINT16                  Segment;
   1249      1.20  christos 
   1250      1.20  christos } ACPI_DMAR_SATC
   1251      1.20  christos 
   1252      1.20  christos ;
   1253      1.13  christos /*******************************************************************************
   1254      1.13  christos  *
   1255      1.13  christos  * DRTM - Dynamic Root of Trust for Measurement table
   1256      1.13  christos  * Conforms to "TCG D-RTM Architecture" June 17 2013, Version 1.0.0
   1257      1.13  christos  * Table version 1
   1258      1.13  christos  *
   1259      1.13  christos  ******************************************************************************/
   1260       1.1    jruoho 
   1261      1.13  christos typedef struct acpi_table_drtm
   1262       1.1    jruoho {
   1263      1.13  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1264      1.13  christos     UINT64                  EntryBaseAddress;
   1265      1.13  christos     UINT64                  EntryLength;
   1266      1.13  christos     UINT32                  EntryAddress32;
   1267      1.13  christos     UINT64                  EntryAddress64;
   1268      1.13  christos     UINT64                  ExitAddress;
   1269      1.13  christos     UINT64                  LogAreaAddress;
   1270      1.13  christos     UINT32                  LogAreaLength;
   1271      1.13  christos     UINT64                  ArchDependentAddress;
   1272      1.13  christos     UINT32                  Flags;
   1273       1.1    jruoho 
   1274      1.13  christos } ACPI_TABLE_DRTM;
   1275       1.1    jruoho 
   1276      1.13  christos /* Flag Definitions for above */
   1277       1.1    jruoho 
   1278      1.13  christos #define ACPI_DRTM_ACCESS_ALLOWED            (1)
   1279      1.13  christos #define ACPI_DRTM_ENABLE_GAP_CODE           (1<<1)
   1280      1.13  christos #define ACPI_DRTM_INCOMPLETE_MEASUREMENTS   (1<<2)
   1281      1.13  christos #define ACPI_DRTM_AUTHORITY_ORDER           (1<<3)
   1282       1.1    jruoho 
   1283       1.1    jruoho 
   1284      1.13  christos /* 1) Validated Tables List (64-bit addresses) */
   1285       1.1    jruoho 
   1286      1.13  christos typedef struct acpi_drtm_vtable_list
   1287       1.1    jruoho {
   1288      1.13  christos     UINT32                  ValidatedTableCount;
   1289      1.22  christos     UINT64                  ValidatedTables[];
   1290       1.1    jruoho 
   1291      1.13  christos } ACPI_DRTM_VTABLE_LIST;
   1292       1.1    jruoho 
   1293      1.13  christos /* 2) Resources List (of Resource Descriptors) */
   1294       1.1    jruoho 
   1295      1.13  christos /* Resource Descriptor */
   1296       1.9  christos 
   1297      1.13  christos typedef struct acpi_drtm_resource
   1298       1.9  christos {
   1299      1.13  christos     UINT8                   Size[7];
   1300      1.13  christos     UINT8                   Type;
   1301      1.13  christos     UINT64                  Address;
   1302       1.9  christos 
   1303      1.13  christos } ACPI_DRTM_RESOURCE;
   1304       1.9  christos 
   1305      1.13  christos typedef struct acpi_drtm_resource_list
   1306       1.1    jruoho {
   1307      1.13  christos     UINT32                  ResourceCount;
   1308      1.22  christos     ACPI_DRTM_RESOURCE      Resources[];
   1309       1.1    jruoho 
   1310      1.13  christos } ACPI_DRTM_RESOURCE_LIST;
   1311       1.1    jruoho 
   1312      1.13  christos /* 3) Platform-specific Identifiers List */
   1313       1.1    jruoho 
   1314      1.13  christos typedef struct acpi_drtm_dps_id
   1315       1.1    jruoho {
   1316      1.13  christos     UINT32                  DpsIdLength;
   1317      1.13  christos     UINT8                   DpsId[16];
   1318       1.1    jruoho 
   1319      1.13  christos } ACPI_DRTM_DPS_ID;
   1320       1.1    jruoho 
   1321       1.9  christos 
   1322      1.13  christos /*******************************************************************************
   1323      1.13  christos  *
   1324      1.13  christos  * ECDT - Embedded Controller Boot Resources Table
   1325      1.13  christos  *        Version 1
   1326      1.13  christos  *
   1327      1.13  christos  ******************************************************************************/
   1328       1.9  christos 
   1329      1.13  christos typedef struct acpi_table_ecdt
   1330      1.11  christos {
   1331      1.13  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1332      1.13  christos     ACPI_GENERIC_ADDRESS    Control;            /* Address of EC command/status register */
   1333      1.13  christos     ACPI_GENERIC_ADDRESS    Data;               /* Address of EC data register */
   1334      1.13  christos     UINT32                  Uid;                /* Unique ID - must be same as the EC _UID method */
   1335      1.13  christos     UINT8                   Gpe;                /* The GPE for the EC */
   1336      1.22  christos     UINT8                   Id[];               /* Full namepath of the EC in the ACPI namespace */
   1337      1.11  christos 
   1338      1.13  christos } ACPI_TABLE_ECDT;
   1339      1.11  christos 
   1340      1.11  christos 
   1341      1.11  christos /*******************************************************************************
   1342      1.11  christos  *
   1343      1.13  christos  * EINJ - Error Injection Table (ACPI 4.0)
   1344      1.11  christos  *        Version 1
   1345      1.11  christos  *
   1346      1.11  christos  ******************************************************************************/
   1347      1.11  christos 
   1348      1.13  christos typedef struct acpi_table_einj
   1349      1.11  christos {
   1350      1.11  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1351      1.13  christos     UINT32                  HeaderLength;
   1352      1.13  christos     UINT8                   Flags;
   1353      1.13  christos     UINT8                   Reserved[3];
   1354      1.13  christos     UINT32                  Entries;
   1355      1.11  christos 
   1356      1.13  christos } ACPI_TABLE_EINJ;
   1357      1.11  christos 
   1358      1.11  christos 
   1359      1.13  christos /* EINJ Injection Instruction Entries (actions) */
   1360      1.11  christos 
   1361      1.13  christos typedef struct acpi_einj_entry
   1362      1.11  christos {
   1363      1.13  christos     ACPI_WHEA_HEADER        WheaHeader;         /* Common header for WHEA tables */
   1364      1.11  christos 
   1365      1.13  christos } ACPI_EINJ_ENTRY;
   1366      1.11  christos 
   1367      1.11  christos /* Masks for Flags field above */
   1368      1.11  christos 
   1369      1.13  christos #define ACPI_EINJ_PRESERVE          (1)
   1370      1.11  christos 
   1371      1.13  christos /* Values for Action field above */
   1372      1.11  christos 
   1373      1.13  christos enum AcpiEinjActions
   1374      1.13  christos {
   1375  1.22.6.1  perseant     ACPI_EINJ_BEGIN_OPERATION               = 0x0,
   1376  1.22.6.1  perseant     ACPI_EINJ_GET_TRIGGER_TABLE             = 0x1,
   1377  1.22.6.1  perseant     ACPI_EINJ_SET_ERROR_TYPE                = 0x2,
   1378  1.22.6.1  perseant     ACPI_EINJ_GET_ERROR_TYPE                = 0x3,
   1379  1.22.6.1  perseant     ACPI_EINJ_END_OPERATION                 = 0x4,
   1380  1.22.6.1  perseant     ACPI_EINJ_EXECUTE_OPERATION             = 0x5,
   1381  1.22.6.1  perseant     ACPI_EINJ_CHECK_BUSY_STATUS             = 0x6,
   1382  1.22.6.1  perseant     ACPI_EINJ_GET_COMMAND_STATUS            = 0x7,
   1383  1.22.6.1  perseant     ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS   = 0x8,
   1384  1.22.6.1  perseant     ACPI_EINJ_GET_EXECUTE_TIMINGS           = 0x9,
   1385  1.22.6.1  perseant     ACPI_EINJV2_GET_ERROR_TYPE              = 0x11,
   1386  1.22.6.1  perseant     ACPI_EINJ_ACTION_RESERVED               = 0x12,   /* 0x12 and greater are reserved */
   1387      1.13  christos     ACPI_EINJ_TRIGGER_ERROR                 = 0xFF   /* Except for this value */
   1388      1.13  christos };
   1389      1.11  christos 
   1390      1.13  christos /* Values for Instruction field above */
   1391      1.11  christos 
   1392      1.13  christos enum AcpiEinjInstructions
   1393      1.13  christos {
   1394      1.13  christos     ACPI_EINJ_READ_REGISTER         = 0,
   1395      1.13  christos     ACPI_EINJ_READ_REGISTER_VALUE   = 1,
   1396      1.13  christos     ACPI_EINJ_WRITE_REGISTER        = 2,
   1397      1.13  christos     ACPI_EINJ_WRITE_REGISTER_VALUE  = 3,
   1398      1.13  christos     ACPI_EINJ_NOOP                  = 4,
   1399      1.13  christos     ACPI_EINJ_FLUSH_CACHELINE       = 5,
   1400      1.13  christos     ACPI_EINJ_INSTRUCTION_RESERVED  = 6     /* 6 and greater are reserved */
   1401      1.13  christos };
   1402      1.11  christos 
   1403      1.13  christos typedef struct acpi_einj_error_type_with_addr
   1404      1.13  christos {
   1405      1.13  christos     UINT32                  ErrorType;
   1406      1.13  christos     UINT32                  VendorStructOffset;
   1407      1.13  christos     UINT32                  Flags;
   1408      1.13  christos     UINT32                  ApicId;
   1409      1.13  christos     UINT64                  Address;
   1410      1.13  christos     UINT64                  Range;
   1411      1.13  christos     UINT32                  PcieId;
   1412      1.11  christos 
   1413      1.13  christos } ACPI_EINJ_ERROR_TYPE_WITH_ADDR;
   1414      1.11  christos 
   1415      1.13  christos typedef struct acpi_einj_vendor
   1416      1.11  christos {
   1417      1.13  christos     UINT32                  Length;
   1418      1.13  christos     UINT32                  PcieId;
   1419      1.13  christos     UINT16                  VendorId;
   1420      1.13  christos     UINT16                  DeviceId;
   1421      1.13  christos     UINT8                   RevisionId;
   1422      1.13  christos     UINT8                   Reserved[3];
   1423      1.13  christos 
   1424      1.13  christos } ACPI_EINJ_VENDOR;
   1425      1.13  christos 
   1426      1.13  christos 
   1427      1.13  christos /* EINJ Trigger Error Action Table */
   1428      1.11  christos 
   1429      1.13  christos typedef struct acpi_einj_trigger
   1430      1.13  christos {
   1431      1.13  christos     UINT32                  HeaderSize;
   1432      1.13  christos     UINT32                  Revision;
   1433      1.13  christos     UINT32                  TableSize;
   1434      1.13  christos     UINT32                  EntryCount;
   1435      1.11  christos 
   1436      1.13  christos } ACPI_EINJ_TRIGGER;
   1437      1.11  christos 
   1438      1.13  christos /* Command status return values */
   1439      1.11  christos 
   1440      1.13  christos enum AcpiEinjCommandStatus
   1441      1.13  christos {
   1442      1.13  christos     ACPI_EINJ_SUCCESS               = 0,
   1443      1.13  christos     ACPI_EINJ_FAILURE               = 1,
   1444      1.13  christos     ACPI_EINJ_INVALID_ACCESS        = 2,
   1445      1.13  christos     ACPI_EINJ_STATUS_RESERVED       = 3     /* 3 and greater are reserved */
   1446      1.13  christos };
   1447      1.11  christos 
   1448      1.11  christos 
   1449      1.13  christos /* Error types returned from ACPI_EINJ_GET_ERROR_TYPE (bitfield) */
   1450      1.11  christos 
   1451      1.13  christos #define ACPI_EINJ_PROCESSOR_CORRECTABLE     (1)
   1452      1.13  christos #define ACPI_EINJ_PROCESSOR_UNCORRECTABLE   (1<<1)
   1453      1.13  christos #define ACPI_EINJ_PROCESSOR_FATAL           (1<<2)
   1454      1.13  christos #define ACPI_EINJ_MEMORY_CORRECTABLE        (1<<3)
   1455      1.13  christos #define ACPI_EINJ_MEMORY_UNCORRECTABLE      (1<<4)
   1456      1.13  christos #define ACPI_EINJ_MEMORY_FATAL              (1<<5)
   1457      1.13  christos #define ACPI_EINJ_PCIX_CORRECTABLE          (1<<6)
   1458      1.13  christos #define ACPI_EINJ_PCIX_UNCORRECTABLE        (1<<7)
   1459      1.13  christos #define ACPI_EINJ_PCIX_FATAL                (1<<8)
   1460      1.13  christos #define ACPI_EINJ_PLATFORM_CORRECTABLE      (1<<9)
   1461      1.13  christos #define ACPI_EINJ_PLATFORM_UNCORRECTABLE    (1<<10)
   1462      1.13  christos #define ACPI_EINJ_PLATFORM_FATAL            (1<<11)
   1463  1.22.6.1  perseant #define ACPI_EINJ_CXL_CACHE_CORRECTABLE     (1<<12)
   1464  1.22.6.1  perseant #define ACPI_EINJ_CXL_CACHE_UNCORRECTABLE   (1<<13)
   1465  1.22.6.1  perseant #define ACPI_EINJ_CXL_CACHE_FATAL           (1<<14)
   1466  1.22.6.1  perseant #define ACPI_EINJ_CXL_MEM_CORRECTABLE       (1<<15)
   1467  1.22.6.1  perseant #define ACPI_EINJ_CXL_MEM_UNCORRECTABLE     (1<<16)
   1468  1.22.6.1  perseant #define ACPI_EINJ_CXL_MEM_FATAL             (1<<17)
   1469      1.13  christos #define ACPI_EINJ_VENDOR_DEFINED            (1<<31)
   1470      1.11  christos 
   1471      1.11  christos 
   1472       1.1    jruoho /*******************************************************************************
   1473       1.1    jruoho  *
   1474      1.13  christos  * ERST - Error Record Serialization Table (ACPI 4.0)
   1475      1.13  christos  *        Version 1
   1476       1.1    jruoho  *
   1477       1.1    jruoho  ******************************************************************************/
   1478       1.1    jruoho 
   1479      1.13  christos typedef struct acpi_table_erst
   1480       1.1    jruoho {
   1481       1.1    jruoho     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1482      1.13  christos     UINT32                  HeaderLength;
   1483      1.13  christos     UINT32                  Reserved;
   1484      1.13  christos     UINT32                  Entries;
   1485       1.1    jruoho 
   1486      1.13  christos } ACPI_TABLE_ERST;
   1487       1.1    jruoho 
   1488       1.1    jruoho 
   1489      1.13  christos /* ERST Serialization Entries (actions) */
   1490       1.1    jruoho 
   1491      1.13  christos typedef struct acpi_erst_entry
   1492      1.13  christos {
   1493      1.13  christos     ACPI_WHEA_HEADER        WheaHeader;         /* Common header for WHEA tables */
   1494       1.1    jruoho 
   1495      1.13  christos } ACPI_ERST_ENTRY;
   1496       1.1    jruoho 
   1497      1.13  christos /* Masks for Flags field above */
   1498       1.1    jruoho 
   1499      1.13  christos #define ACPI_ERST_PRESERVE          (1)
   1500       1.1    jruoho 
   1501      1.13  christos /* Values for Action field above */
   1502       1.1    jruoho 
   1503      1.13  christos enum AcpiErstActions
   1504      1.13  christos {
   1505      1.13  christos     ACPI_ERST_BEGIN_WRITE           = 0,
   1506      1.13  christos     ACPI_ERST_BEGIN_READ            = 1,
   1507      1.13  christos     ACPI_ERST_BEGIN_CLEAR           = 2,
   1508      1.13  christos     ACPI_ERST_END                   = 3,
   1509      1.13  christos     ACPI_ERST_SET_RECORD_OFFSET     = 4,
   1510      1.13  christos     ACPI_ERST_EXECUTE_OPERATION     = 5,
   1511      1.13  christos     ACPI_ERST_CHECK_BUSY_STATUS     = 6,
   1512      1.13  christos     ACPI_ERST_GET_COMMAND_STATUS    = 7,
   1513      1.13  christos     ACPI_ERST_GET_RECORD_ID         = 8,
   1514      1.13  christos     ACPI_ERST_SET_RECORD_ID         = 9,
   1515      1.13  christos     ACPI_ERST_GET_RECORD_COUNT      = 10,
   1516      1.13  christos     ACPI_ERST_BEGIN_DUMMY_WRIITE    = 11,
   1517      1.13  christos     ACPI_ERST_NOT_USED              = 12,
   1518      1.13  christos     ACPI_ERST_GET_ERROR_RANGE       = 13,
   1519      1.13  christos     ACPI_ERST_GET_ERROR_LENGTH      = 14,
   1520      1.13  christos     ACPI_ERST_GET_ERROR_ATTRIBUTES  = 15,
   1521      1.13  christos     ACPI_ERST_EXECUTE_TIMINGS       = 16,
   1522      1.13  christos     ACPI_ERST_ACTION_RESERVED       = 17    /* 17 and greater are reserved */
   1523      1.13  christos };
   1524       1.1    jruoho 
   1525      1.13  christos /* Values for Instruction field above */
   1526       1.1    jruoho 
   1527      1.13  christos enum AcpiErstInstructions
   1528       1.1    jruoho {
   1529      1.13  christos     ACPI_ERST_READ_REGISTER         = 0,
   1530      1.13  christos     ACPI_ERST_READ_REGISTER_VALUE   = 1,
   1531      1.13  christos     ACPI_ERST_WRITE_REGISTER        = 2,
   1532      1.13  christos     ACPI_ERST_WRITE_REGISTER_VALUE  = 3,
   1533      1.13  christos     ACPI_ERST_NOOP                  = 4,
   1534      1.13  christos     ACPI_ERST_LOAD_VAR1             = 5,
   1535      1.13  christos     ACPI_ERST_LOAD_VAR2             = 6,
   1536      1.13  christos     ACPI_ERST_STORE_VAR1            = 7,
   1537      1.13  christos     ACPI_ERST_ADD                   = 8,
   1538      1.13  christos     ACPI_ERST_SUBTRACT              = 9,
   1539      1.13  christos     ACPI_ERST_ADD_VALUE             = 10,
   1540      1.13  christos     ACPI_ERST_SUBTRACT_VALUE        = 11,
   1541      1.13  christos     ACPI_ERST_STALL                 = 12,
   1542      1.13  christos     ACPI_ERST_STALL_WHILE_TRUE      = 13,
   1543      1.13  christos     ACPI_ERST_SKIP_NEXT_IF_TRUE     = 14,
   1544      1.13  christos     ACPI_ERST_GOTO                  = 15,
   1545      1.13  christos     ACPI_ERST_SET_SRC_ADDRESS_BASE  = 16,
   1546      1.13  christos     ACPI_ERST_SET_DST_ADDRESS_BASE  = 17,
   1547      1.13  christos     ACPI_ERST_MOVE_DATA             = 18,
   1548      1.13  christos     ACPI_ERST_INSTRUCTION_RESERVED  = 19    /* 19 and greater are reserved */
   1549      1.13  christos };
   1550       1.1    jruoho 
   1551      1.13  christos /* Command status return values */
   1552       1.1    jruoho 
   1553      1.13  christos enum AcpiErstCommandStatus
   1554       1.1    jruoho {
   1555      1.15  christos     ACPI_ERST_SUCCESS                = 0,
   1556      1.13  christos     ACPI_ERST_NO_SPACE              = 1,
   1557      1.13  christos     ACPI_ERST_NOT_AVAILABLE         = 2,
   1558      1.13  christos     ACPI_ERST_FAILURE               = 3,
   1559      1.13  christos     ACPI_ERST_RECORD_EMPTY          = 4,
   1560      1.13  christos     ACPI_ERST_NOT_FOUND             = 5,
   1561      1.13  christos     ACPI_ERST_STATUS_RESERVED       = 6     /* 6 and greater are reserved */
   1562      1.13  christos };
   1563       1.1    jruoho 
   1564       1.1    jruoho 
   1565      1.13  christos /* Error Record Serialization Information */
   1566       1.1    jruoho 
   1567      1.13  christos typedef struct acpi_erst_info
   1568       1.1    jruoho {
   1569      1.13  christos     UINT16                  Signature;          /* Should be "ER" */
   1570      1.13  christos     UINT8                   Data[48];
   1571       1.1    jruoho 
   1572      1.13  christos } ACPI_ERST_INFO;
   1573       1.1    jruoho 
   1574       1.1    jruoho 
   1575      1.13  christos /*******************************************************************************
   1576      1.13  christos  *
   1577      1.13  christos  * FPDT - Firmware Performance Data Table (ACPI 5.0)
   1578      1.13  christos  *        Version 1
   1579      1.13  christos  *
   1580      1.13  christos  ******************************************************************************/
   1581       1.1    jruoho 
   1582      1.13  christos typedef struct acpi_table_fpdt
   1583       1.1    jruoho {
   1584      1.13  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1585       1.1    jruoho 
   1586      1.13  christos } ACPI_TABLE_FPDT;
   1587       1.1    jruoho 
   1588       1.1    jruoho 
   1589      1.13  christos /* FPDT subtable header (Performance Record Structure) */
   1590       1.1    jruoho 
   1591      1.13  christos typedef struct acpi_fpdt_header
   1592       1.1    jruoho {
   1593      1.13  christos     UINT16                  Type;
   1594      1.13  christos     UINT8                   Length;
   1595      1.13  christos     UINT8                   Revision;
   1596       1.1    jruoho 
   1597      1.13  christos } ACPI_FPDT_HEADER;
   1598       1.1    jruoho 
   1599      1.13  christos /* Values for Type field above */
   1600       1.1    jruoho 
   1601      1.13  christos enum AcpiFpdtType
   1602       1.1    jruoho {
   1603      1.13  christos     ACPI_FPDT_TYPE_BOOT                 = 0,
   1604      1.13  christos     ACPI_FPDT_TYPE_S3PERF               = 1
   1605      1.13  christos };
   1606       1.1    jruoho 
   1607       1.1    jruoho 
   1608      1.13  christos /*
   1609      1.13  christos  * FPDT subtables
   1610      1.13  christos  */
   1611       1.1    jruoho 
   1612      1.13  christos /* 0: Firmware Basic Boot Performance Record */
   1613       1.1    jruoho 
   1614      1.13  christos typedef struct acpi_fpdt_boot_pointer
   1615       1.1    jruoho {
   1616      1.13  christos     ACPI_FPDT_HEADER        Header;
   1617      1.13  christos     UINT8                   Reserved[4];
   1618      1.13  christos     UINT64                  Address;
   1619       1.1    jruoho 
   1620      1.13  christos } ACPI_FPDT_BOOT_POINTER;
   1621       1.1    jruoho 
   1622       1.1    jruoho 
   1623      1.13  christos /* 1: S3 Performance Table Pointer Record */
   1624       1.1    jruoho 
   1625      1.13  christos typedef struct acpi_fpdt_s3pt_pointer
   1626       1.1    jruoho {
   1627      1.13  christos     ACPI_FPDT_HEADER        Header;
   1628      1.13  christos     UINT8                   Reserved[4];
   1629      1.13  christos     UINT64                  Address;
   1630       1.1    jruoho 
   1631      1.13  christos } ACPI_FPDT_S3PT_POINTER;
   1632       1.1    jruoho 
   1633       1.1    jruoho 
   1634      1.13  christos /*
   1635      1.13  christos  * S3PT - S3 Performance Table. This table is pointed to by the
   1636      1.13  christos  * S3 Pointer Record above.
   1637      1.13  christos  */
   1638      1.13  christos typedef struct acpi_table_s3pt
   1639       1.1    jruoho {
   1640      1.13  christos     UINT8                   Signature[4]; /* "S3PT" */
   1641      1.13  christos     UINT32                  Length;
   1642       1.1    jruoho 
   1643      1.13  christos } ACPI_TABLE_S3PT;
   1644       1.1    jruoho 
   1645       1.1    jruoho 
   1646      1.13  christos /*
   1647      1.13  christos  * S3PT Subtables (Not part of the actual FPDT)
   1648      1.13  christos  */
   1649       1.1    jruoho 
   1650      1.13  christos /* Values for Type field in S3PT header */
   1651       1.1    jruoho 
   1652      1.13  christos enum AcpiS3ptType
   1653      1.13  christos {
   1654      1.13  christos     ACPI_S3PT_TYPE_RESUME               = 0,
   1655      1.13  christos     ACPI_S3PT_TYPE_SUSPEND              = 1,
   1656      1.13  christos     ACPI_FPDT_BOOT_PERFORMANCE          = 2
   1657      1.13  christos };
   1658       1.1    jruoho 
   1659      1.13  christos typedef struct acpi_s3pt_resume
   1660       1.1    jruoho {
   1661      1.13  christos     ACPI_FPDT_HEADER        Header;
   1662      1.13  christos     UINT32                  ResumeCount;
   1663      1.13  christos     UINT64                  FullResume;
   1664      1.13  christos     UINT64                  AverageResume;
   1665       1.1    jruoho 
   1666      1.13  christos } ACPI_S3PT_RESUME;
   1667       1.1    jruoho 
   1668      1.13  christos typedef struct acpi_s3pt_suspend
   1669       1.1    jruoho {
   1670      1.13  christos     ACPI_FPDT_HEADER        Header;
   1671      1.13  christos     UINT64                  SuspendStart;
   1672      1.13  christos     UINT64                  SuspendEnd;
   1673       1.1    jruoho 
   1674      1.13  christos } ACPI_S3PT_SUSPEND;
   1675       1.1    jruoho 
   1676       1.1    jruoho 
   1677      1.13  christos /*
   1678      1.13  christos  * FPDT Boot Performance Record (Not part of the actual FPDT)
   1679      1.13  christos  */
   1680      1.13  christos typedef struct acpi_fpdt_boot
   1681       1.4  christos {
   1682      1.13  christos     ACPI_FPDT_HEADER        Header;
   1683      1.13  christos     UINT8                   Reserved[4];
   1684      1.13  christos     UINT64                  ResetEnd;
   1685      1.13  christos     UINT64                  LoadStart;
   1686      1.13  christos     UINT64                  StartupStart;
   1687      1.13  christos     UINT64                  ExitServicesEntry;
   1688      1.13  christos     UINT64                  ExitServicesExit;
   1689       1.4  christos 
   1690      1.13  christos } ACPI_FPDT_BOOT;
   1691       1.4  christos 
   1692       1.5  christos 
   1693      1.13  christos /*******************************************************************************
   1694      1.13  christos  *
   1695      1.13  christos  * GTDT - Generic Timer Description Table (ACPI 5.1)
   1696      1.13  christos  *        Version 2
   1697      1.13  christos  *
   1698      1.13  christos  ******************************************************************************/
   1699       1.4  christos 
   1700      1.13  christos typedef struct acpi_table_gtdt
   1701       1.4  christos {
   1702      1.13  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1703      1.13  christos     UINT64                  CounterBlockAddresss;
   1704      1.13  christos     UINT32                  Reserved;
   1705      1.13  christos     UINT32                  SecureEl1Interrupt;
   1706      1.13  christos     UINT32                  SecureEl1Flags;
   1707      1.13  christos     UINT32                  NonSecureEl1Interrupt;
   1708      1.13  christos     UINT32                  NonSecureEl1Flags;
   1709      1.13  christos     UINT32                  VirtualTimerInterrupt;
   1710      1.13  christos     UINT32                  VirtualTimerFlags;
   1711      1.13  christos     UINT32                  NonSecureEl2Interrupt;
   1712      1.13  christos     UINT32                  NonSecureEl2Flags;
   1713      1.13  christos     UINT64                  CounterReadBlockAddress;
   1714      1.13  christos     UINT32                  PlatformTimerCount;
   1715      1.13  christos     UINT32                  PlatformTimerOffset;
   1716      1.13  christos 
   1717      1.13  christos } ACPI_TABLE_GTDT;
   1718      1.13  christos 
   1719      1.13  christos /* Flag Definitions: Timer Block Physical Timers and Virtual timers */
   1720      1.13  christos 
   1721      1.13  christos #define ACPI_GTDT_INTERRUPT_MODE        (1)
   1722      1.13  christos #define ACPI_GTDT_INTERRUPT_POLARITY    (1<<1)
   1723      1.13  christos #define ACPI_GTDT_ALWAYS_ON             (1<<2)
   1724       1.4  christos 
   1725      1.14  christos typedef struct acpi_gtdt_el2
   1726      1.14  christos {
   1727      1.14  christos     UINT32                  VirtualEL2TimerGsiv;
   1728      1.14  christos     UINT32                  VirtualEL2TimerFlags;
   1729      1.14  christos } ACPI_GTDT_EL2;
   1730      1.14  christos 
   1731       1.4  christos 
   1732      1.13  christos /* Common GTDT subtable header */
   1733       1.7  christos 
   1734      1.13  christos typedef struct acpi_gtdt_header
   1735       1.7  christos {
   1736      1.13  christos     UINT8                   Type;
   1737      1.13  christos     UINT16                  Length;
   1738       1.7  christos 
   1739      1.13  christos } ACPI_GTDT_HEADER;
   1740       1.4  christos 
   1741      1.13  christos /* Values for GTDT subtable type above */
   1742       1.5  christos 
   1743      1.13  christos enum AcpiGtdtType
   1744       1.5  christos {
   1745      1.13  christos     ACPI_GTDT_TYPE_TIMER_BLOCK      = 0,
   1746      1.13  christos     ACPI_GTDT_TYPE_WATCHDOG         = 1,
   1747      1.13  christos     ACPI_GTDT_TYPE_RESERVED         = 2    /* 2 and greater are reserved */
   1748      1.13  christos };
   1749       1.5  christos 
   1750       1.5  christos 
   1751      1.13  christos /* GTDT Subtables, correspond to Type in acpi_gtdt_header */
   1752       1.5  christos 
   1753      1.13  christos /* 0: Generic Timer Block */
   1754       1.5  christos 
   1755      1.13  christos typedef struct acpi_gtdt_timer_block
   1756       1.5  christos {
   1757      1.13  christos     ACPI_GTDT_HEADER        Header;
   1758      1.13  christos     UINT8                   Reserved;
   1759      1.13  christos     UINT64                  BlockAddress;
   1760      1.13  christos     UINT32                  TimerCount;
   1761      1.13  christos     UINT32                  TimerOffset;
   1762       1.5  christos 
   1763      1.13  christos } ACPI_GTDT_TIMER_BLOCK;
   1764       1.5  christos 
   1765      1.13  christos /* Timer Sub-Structure, one per timer */
   1766       1.5  christos 
   1767      1.13  christos typedef struct acpi_gtdt_timer_entry
   1768       1.7  christos {
   1769      1.13  christos     UINT8                   FrameNumber;
   1770      1.13  christos     UINT8                   Reserved[3];
   1771       1.7  christos     UINT64                  BaseAddress;
   1772      1.13  christos     UINT64                  El0BaseAddress;
   1773      1.13  christos     UINT32                  TimerInterrupt;
   1774      1.13  christos     UINT32                  TimerFlags;
   1775      1.13  christos     UINT32                  VirtualTimerInterrupt;
   1776      1.13  christos     UINT32                  VirtualTimerFlags;
   1777      1.13  christos     UINT32                  CommonFlags;
   1778       1.7  christos 
   1779      1.13  christos } ACPI_GTDT_TIMER_ENTRY;
   1780       1.7  christos 
   1781      1.13  christos /* Flag Definitions: TimerFlags and VirtualTimerFlags above */
   1782       1.7  christos 
   1783      1.13  christos #define ACPI_GTDT_GT_IRQ_MODE               (1)
   1784      1.13  christos #define ACPI_GTDT_GT_IRQ_POLARITY           (1<<1)
   1785       1.1    jruoho 
   1786      1.13  christos /* Flag Definitions: CommonFlags above */
   1787       1.1    jruoho 
   1788      1.13  christos #define ACPI_GTDT_GT_IS_SECURE_TIMER        (1)
   1789      1.13  christos #define ACPI_GTDT_GT_ALWAYS_ON              (1<<1)
   1790       1.1    jruoho 
   1791       1.1    jruoho 
   1792      1.13  christos /* 1: SBSA Generic Watchdog Structure */
   1793       1.1    jruoho 
   1794      1.13  christos typedef struct acpi_gtdt_watchdog
   1795      1.13  christos {
   1796      1.13  christos     ACPI_GTDT_HEADER        Header;
   1797      1.13  christos     UINT8                   Reserved;
   1798      1.13  christos     UINT64                  RefreshFrameAddress;
   1799      1.13  christos     UINT64                  ControlFrameAddress;
   1800      1.13  christos     UINT32                  TimerInterrupt;
   1801      1.13  christos     UINT32                  TimerFlags;
   1802      1.13  christos 
   1803      1.13  christos } ACPI_GTDT_WATCHDOG;
   1804      1.13  christos 
   1805      1.13  christos /* Flag Definitions: TimerFlags above */
   1806      1.13  christos 
   1807      1.13  christos #define ACPI_GTDT_WATCHDOG_IRQ_MODE         (1)
   1808      1.13  christos #define ACPI_GTDT_WATCHDOG_IRQ_POLARITY     (1<<1)
   1809      1.13  christos #define ACPI_GTDT_WATCHDOG_SECURE           (1<<2)
   1810       1.1    jruoho 
   1811       1.1    jruoho 
   1812       1.1    jruoho /*******************************************************************************
   1813       1.1    jruoho  *
   1814      1.13  christos  * HEST - Hardware Error Source Table (ACPI 4.0)
   1815       1.1    jruoho  *        Version 1
   1816       1.1    jruoho  *
   1817       1.1    jruoho  ******************************************************************************/
   1818       1.1    jruoho 
   1819      1.13  christos typedef struct acpi_table_hest
   1820       1.1    jruoho {
   1821       1.1    jruoho     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1822      1.13  christos     UINT32                  ErrorSourceCount;
   1823       1.1    jruoho 
   1824      1.13  christos } ACPI_TABLE_HEST;
   1825       1.1    jruoho 
   1826       1.1    jruoho 
   1827      1.13  christos /* HEST subtable header */
   1828       1.1    jruoho 
   1829      1.13  christos typedef struct acpi_hest_header
   1830       1.1    jruoho {
   1831      1.13  christos     UINT16                  Type;
   1832      1.13  christos     UINT16                  SourceId;
   1833       1.1    jruoho 
   1834      1.13  christos } ACPI_HEST_HEADER;
   1835       1.1    jruoho 
   1836       1.1    jruoho 
   1837      1.13  christos /* Values for Type field above for subtables */
   1838       1.7  christos 
   1839      1.13  christos enum AcpiHestTypes
   1840       1.7  christos {
   1841      1.13  christos     ACPI_HEST_TYPE_IA32_CHECK           = 0,
   1842      1.13  christos     ACPI_HEST_TYPE_IA32_CORRECTED_CHECK = 1,
   1843      1.13  christos     ACPI_HEST_TYPE_IA32_NMI             = 2,
   1844      1.13  christos     ACPI_HEST_TYPE_NOT_USED3            = 3,
   1845      1.13  christos     ACPI_HEST_TYPE_NOT_USED4            = 4,
   1846      1.13  christos     ACPI_HEST_TYPE_NOT_USED5            = 5,
   1847      1.13  christos     ACPI_HEST_TYPE_AER_ROOT_PORT        = 6,
   1848      1.13  christos     ACPI_HEST_TYPE_AER_ENDPOINT         = 7,
   1849      1.13  christos     ACPI_HEST_TYPE_AER_BRIDGE           = 8,
   1850      1.13  christos     ACPI_HEST_TYPE_GENERIC_ERROR        = 9,
   1851      1.13  christos     ACPI_HEST_TYPE_GENERIC_ERROR_V2     = 10,
   1852      1.13  christos     ACPI_HEST_TYPE_IA32_DEFERRED_CHECK  = 11,
   1853      1.13  christos     ACPI_HEST_TYPE_RESERVED             = 12    /* 12 and greater are reserved */
   1854      1.13  christos };
   1855       1.7  christos 
   1856       1.7  christos 
   1857      1.13  christos /*
   1858      1.13  christos  * HEST substructures contained in subtables
   1859      1.13  christos  */
   1860       1.7  christos 
   1861      1.13  christos /*
   1862      1.13  christos  * IA32 Error Bank(s) - Follows the ACPI_HEST_IA_MACHINE_CHECK and
   1863      1.13  christos  * ACPI_HEST_IA_CORRECTED structures.
   1864      1.13  christos  */
   1865      1.13  christos typedef struct acpi_hest_ia_error_bank
   1866       1.7  christos {
   1867      1.13  christos     UINT8                   BankNumber;
   1868      1.13  christos     UINT8                   ClearStatusOnInit;
   1869      1.13  christos     UINT8                   StatusFormat;
   1870      1.13  christos     UINT8                   Reserved;
   1871      1.13  christos     UINT32                  ControlRegister;
   1872      1.13  christos     UINT64                  ControlData;
   1873      1.13  christos     UINT32                  StatusRegister;
   1874      1.13  christos     UINT32                  AddressRegister;
   1875      1.13  christos     UINT32                  MiscRegister;
   1876       1.7  christos 
   1877      1.13  christos } ACPI_HEST_IA_ERROR_BANK;
   1878       1.7  christos 
   1879       1.7  christos 
   1880      1.13  christos /* Common HEST sub-structure for PCI/AER structures below (6,7,8) */
   1881       1.7  christos 
   1882      1.13  christos typedef struct acpi_hest_aer_common
   1883       1.7  christos {
   1884      1.13  christos     UINT16                  Reserved1;
   1885      1.13  christos     UINT8                   Flags;
   1886      1.13  christos     UINT8                   Enabled;
   1887      1.13  christos     UINT32                  RecordsToPreallocate;
   1888      1.13  christos     UINT32                  MaxSectionsPerRecord;
   1889      1.13  christos     UINT32                  Bus;                    /* Bus and Segment numbers */
   1890      1.13  christos     UINT16                  Device;
   1891      1.13  christos     UINT16                  Function;
   1892      1.13  christos     UINT16                  DeviceControl;
   1893      1.13  christos     UINT16                  Reserved2;
   1894      1.13  christos     UINT32                  UncorrectableMask;
   1895      1.13  christos     UINT32                  UncorrectableSeverity;
   1896      1.13  christos     UINT32                  CorrectableMask;
   1897      1.13  christos     UINT32                  AdvancedCapabilities;
   1898      1.13  christos 
   1899      1.13  christos } ACPI_HEST_AER_COMMON;
   1900      1.13  christos 
   1901      1.13  christos /* Masks for HEST Flags fields */
   1902      1.13  christos 
   1903      1.13  christos #define ACPI_HEST_FIRMWARE_FIRST        (1)
   1904      1.13  christos #define ACPI_HEST_GLOBAL                (1<<1)
   1905      1.13  christos #define ACPI_HEST_GHES_ASSIST           (1<<2)
   1906       1.7  christos 
   1907       1.7  christos /*
   1908      1.13  christos  * Macros to access the bus/segment numbers in Bus field above:
   1909      1.13  christos  *  Bus number is encoded in bits 7:0
   1910      1.13  christos  *  Segment number is encoded in bits 23:8
   1911       1.7  christos  */
   1912      1.13  christos #define ACPI_HEST_BUS(Bus)              ((Bus) & 0xFF)
   1913      1.13  christos #define ACPI_HEST_SEGMENT(Bus)          (((Bus) >> 8) & 0xFFFF)
   1914      1.13  christos 
   1915       1.7  christos 
   1916      1.13  christos /* Hardware Error Notification */
   1917       1.7  christos 
   1918      1.13  christos typedef struct acpi_hest_notify
   1919       1.7  christos {
   1920      1.13  christos     UINT8                   Type;
   1921      1.13  christos     UINT8                   Length;
   1922      1.13  christos     UINT16                  ConfigWriteEnable;
   1923      1.13  christos     UINT32                  PollInterval;
   1924      1.13  christos     UINT32                  Vector;
   1925      1.13  christos     UINT32                  PollingThresholdValue;
   1926      1.13  christos     UINT32                  PollingThresholdWindow;
   1927      1.13  christos     UINT32                  ErrorThresholdValue;
   1928      1.13  christos     UINT32                  ErrorThresholdWindow;
   1929       1.7  christos 
   1930      1.13  christos } ACPI_HEST_NOTIFY;
   1931       1.7  christos 
   1932      1.13  christos /* Values for Notify Type field above */
   1933       1.7  christos 
   1934      1.13  christos enum AcpiHestNotifyTypes
   1935      1.13  christos {
   1936      1.13  christos     ACPI_HEST_NOTIFY_POLLED             = 0,
   1937      1.13  christos     ACPI_HEST_NOTIFY_EXTERNAL           = 1,
   1938      1.13  christos     ACPI_HEST_NOTIFY_LOCAL              = 2,
   1939      1.13  christos     ACPI_HEST_NOTIFY_SCI                = 3,
   1940      1.13  christos     ACPI_HEST_NOTIFY_NMI                = 4,
   1941      1.13  christos     ACPI_HEST_NOTIFY_CMCI               = 5,    /* ACPI 5.0 */
   1942      1.13  christos     ACPI_HEST_NOTIFY_MCE                = 6,    /* ACPI 5.0 */
   1943      1.13  christos     ACPI_HEST_NOTIFY_GPIO               = 7,    /* ACPI 6.0 */
   1944      1.13  christos     ACPI_HEST_NOTIFY_SEA                = 8,    /* ACPI 6.1 */
   1945      1.13  christos     ACPI_HEST_NOTIFY_SEI                = 9,    /* ACPI 6.1 */
   1946      1.13  christos     ACPI_HEST_NOTIFY_GSIV               = 10,   /* ACPI 6.1 */
   1947      1.13  christos     ACPI_HEST_NOTIFY_SOFTWARE_DELEGATED = 11,   /* ACPI 6.2 */
   1948      1.13  christos     ACPI_HEST_NOTIFY_RESERVED           = 12    /* 12 and greater are reserved */
   1949      1.13  christos };
   1950       1.7  christos 
   1951      1.13  christos /* Values for ConfigWriteEnable bitfield above */
   1952       1.7  christos 
   1953      1.13  christos #define ACPI_HEST_TYPE                  (1)
   1954      1.13  christos #define ACPI_HEST_POLL_INTERVAL         (1<<1)
   1955      1.13  christos #define ACPI_HEST_POLL_THRESHOLD_VALUE  (1<<2)
   1956      1.13  christos #define ACPI_HEST_POLL_THRESHOLD_WINDOW (1<<3)
   1957      1.13  christos #define ACPI_HEST_ERR_THRESHOLD_VALUE   (1<<4)
   1958      1.13  christos #define ACPI_HEST_ERR_THRESHOLD_WINDOW  (1<<5)
   1959       1.7  christos 
   1960       1.7  christos 
   1961      1.13  christos /*
   1962      1.13  christos  * HEST subtables
   1963      1.13  christos  */
   1964       1.7  christos 
   1965      1.13  christos /* 0: IA32 Machine Check Exception */
   1966       1.7  christos 
   1967      1.13  christos typedef struct acpi_hest_ia_machine_check
   1968      1.13  christos {
   1969      1.13  christos     ACPI_HEST_HEADER        Header;
   1970      1.13  christos     UINT16                  Reserved1;
   1971      1.13  christos     UINT8                   Flags;              /* See flags ACPI_HEST_GLOBAL, etc. above */
   1972      1.13  christos     UINT8                   Enabled;
   1973      1.13  christos     UINT32                  RecordsToPreallocate;
   1974      1.13  christos     UINT32                  MaxSectionsPerRecord;
   1975      1.13  christos     UINT64                  GlobalCapabilityData;
   1976      1.13  christos     UINT64                  GlobalControlData;
   1977      1.13  christos     UINT8                   NumHardwareBanks;
   1978      1.13  christos     UINT8                   Reserved3[7];
   1979       1.7  christos 
   1980      1.13  christos } ACPI_HEST_IA_MACHINE_CHECK;
   1981       1.7  christos 
   1982       1.7  christos 
   1983      1.13  christos /* 1: IA32 Corrected Machine Check */
   1984       1.7  christos 
   1985      1.13  christos typedef struct acpi_hest_ia_corrected
   1986       1.7  christos {
   1987      1.13  christos     ACPI_HEST_HEADER        Header;
   1988      1.13  christos     UINT16                  Reserved1;
   1989      1.13  christos     UINT8                   Flags;              /* See flags ACPI_HEST_GLOBAL, etc. above */
   1990      1.13  christos     UINT8                   Enabled;
   1991      1.13  christos     UINT32                  RecordsToPreallocate;
   1992      1.13  christos     UINT32                  MaxSectionsPerRecord;
   1993      1.13  christos     ACPI_HEST_NOTIFY        Notify;
   1994      1.13  christos     UINT8                   NumHardwareBanks;
   1995      1.13  christos     UINT8                   Reserved2[3];
   1996       1.7  christos 
   1997      1.13  christos } ACPI_HEST_IA_CORRECTED;
   1998       1.7  christos 
   1999       1.7  christos 
   2000      1.13  christos /* 2: IA32 Non-Maskable Interrupt */
   2001       1.7  christos 
   2002      1.13  christos typedef struct acpi_hest_ia_nmi
   2003       1.7  christos {
   2004      1.13  christos     ACPI_HEST_HEADER        Header;
   2005      1.13  christos     UINT32                  Reserved;
   2006      1.13  christos     UINT32                  RecordsToPreallocate;
   2007      1.13  christos     UINT32                  MaxSectionsPerRecord;
   2008      1.13  christos     UINT32                  MaxRawDataLength;
   2009      1.13  christos 
   2010      1.13  christos } ACPI_HEST_IA_NMI;
   2011       1.7  christos 
   2012       1.7  christos 
   2013      1.13  christos /* 3,4,5: Not used */
   2014       1.7  christos 
   2015      1.13  christos /* 6: PCI Express Root Port AER */
   2016       1.7  christos 
   2017      1.13  christos typedef struct acpi_hest_aer_root
   2018       1.7  christos {
   2019      1.13  christos     ACPI_HEST_HEADER        Header;
   2020      1.13  christos     ACPI_HEST_AER_COMMON    Aer;
   2021      1.13  christos     UINT32                  RootErrorCommand;
   2022       1.7  christos 
   2023      1.13  christos } ACPI_HEST_AER_ROOT;
   2024       1.7  christos 
   2025       1.7  christos 
   2026      1.13  christos /* 7: PCI Express AER (AER Endpoint) */
   2027       1.9  christos 
   2028      1.13  christos typedef struct acpi_hest_aer
   2029      1.13  christos {
   2030      1.13  christos     ACPI_HEST_HEADER        Header;
   2031      1.13  christos     ACPI_HEST_AER_COMMON    Aer;
   2032       1.9  christos 
   2033      1.13  christos } ACPI_HEST_AER;
   2034       1.7  christos 
   2035       1.7  christos 
   2036      1.13  christos /* 8: PCI Express/PCI-X Bridge AER */
   2037       1.7  christos 
   2038      1.13  christos typedef struct acpi_hest_aer_bridge
   2039       1.7  christos {
   2040      1.13  christos     ACPI_HEST_HEADER        Header;
   2041      1.13  christos     ACPI_HEST_AER_COMMON    Aer;
   2042      1.13  christos     UINT32                  UncorrectableMask2;
   2043      1.13  christos     UINT32                  UncorrectableSeverity2;
   2044      1.13  christos     UINT32                  AdvancedCapabilities2;
   2045       1.7  christos 
   2046      1.13  christos } ACPI_HEST_AER_BRIDGE;
   2047       1.7  christos 
   2048       1.7  christos 
   2049      1.13  christos /* 9: Generic Hardware Error Source */
   2050       1.7  christos 
   2051      1.13  christos typedef struct acpi_hest_generic
   2052       1.7  christos {
   2053      1.13  christos     ACPI_HEST_HEADER        Header;
   2054      1.13  christos     UINT16                  RelatedSourceId;
   2055      1.13  christos     UINT8                   Reserved;
   2056      1.13  christos     UINT8                   Enabled;
   2057      1.13  christos     UINT32                  RecordsToPreallocate;
   2058      1.13  christos     UINT32                  MaxSectionsPerRecord;
   2059      1.13  christos     UINT32                  MaxRawDataLength;
   2060      1.13  christos     ACPI_GENERIC_ADDRESS    ErrorStatusAddress;
   2061      1.13  christos     ACPI_HEST_NOTIFY        Notify;
   2062      1.13  christos     UINT32                  ErrorBlockLength;
   2063       1.7  christos 
   2064      1.13  christos } ACPI_HEST_GENERIC;
   2065       1.7  christos 
   2066       1.7  christos 
   2067      1.13  christos /* 10: Generic Hardware Error Source, version 2 */
   2068      1.12  christos 
   2069      1.13  christos typedef struct acpi_hest_generic_v2
   2070      1.12  christos {
   2071      1.13  christos     ACPI_HEST_HEADER        Header;
   2072      1.13  christos     UINT16                  RelatedSourceId;
   2073      1.13  christos     UINT8                   Reserved;
   2074      1.13  christos     UINT8                   Enabled;
   2075      1.13  christos     UINT32                  RecordsToPreallocate;
   2076      1.13  christos     UINT32                  MaxSectionsPerRecord;
   2077      1.13  christos     UINT32                  MaxRawDataLength;
   2078      1.13  christos     ACPI_GENERIC_ADDRESS    ErrorStatusAddress;
   2079      1.13  christos     ACPI_HEST_NOTIFY        Notify;
   2080      1.13  christos     UINT32                  ErrorBlockLength;
   2081      1.13  christos     ACPI_GENERIC_ADDRESS    ReadAckRegister;
   2082      1.13  christos     UINT64                  ReadAckPreserve;
   2083      1.13  christos     UINT64                  ReadAckWrite;
   2084      1.12  christos 
   2085      1.13  christos } ACPI_HEST_GENERIC_V2;
   2086      1.12  christos 
   2087      1.12  christos 
   2088      1.13  christos /* Generic Error Status block */
   2089      1.12  christos 
   2090      1.13  christos typedef struct acpi_hest_generic_status
   2091      1.12  christos {
   2092      1.13  christos     UINT32                  BlockStatus;
   2093      1.13  christos     UINT32                  RawDataOffset;
   2094      1.13  christos     UINT32                  RawDataLength;
   2095      1.13  christos     UINT32                  DataLength;
   2096      1.13  christos     UINT32                  ErrorSeverity;
   2097      1.12  christos 
   2098      1.13  christos } ACPI_HEST_GENERIC_STATUS;
   2099      1.12  christos 
   2100      1.13  christos /* Values for BlockStatus flags above */
   2101      1.12  christos 
   2102      1.13  christos #define ACPI_HEST_UNCORRECTABLE             (1)
   2103      1.13  christos #define ACPI_HEST_CORRECTABLE               (1<<1)
   2104      1.13  christos #define ACPI_HEST_MULTIPLE_UNCORRECTABLE    (1<<2)
   2105      1.13  christos #define ACPI_HEST_MULTIPLE_CORRECTABLE      (1<<3)
   2106      1.13  christos #define ACPI_HEST_ERROR_ENTRY_COUNT         (0xFF<<4) /* 8 bits, error count */
   2107      1.12  christos 
   2108      1.12  christos 
   2109      1.13  christos /* Generic Error Data entry */
   2110      1.12  christos 
   2111      1.13  christos typedef struct acpi_hest_generic_data
   2112      1.13  christos {
   2113      1.13  christos     UINT8                   SectionType[16];
   2114      1.13  christos     UINT32                  ErrorSeverity;
   2115      1.13  christos     UINT16                  Revision;
   2116      1.13  christos     UINT8                   ValidationBits;
   2117      1.13  christos     UINT8                   Flags;
   2118      1.13  christos     UINT32                  ErrorDataLength;
   2119      1.13  christos     UINT8                   FruId[16];
   2120      1.13  christos     UINT8                   FruText[20];
   2121      1.12  christos 
   2122      1.13  christos } ACPI_HEST_GENERIC_DATA;
   2123      1.12  christos 
   2124      1.13  christos /* Extension for revision 0x0300 */
   2125      1.12  christos 
   2126      1.13  christos typedef struct acpi_hest_generic_data_v300
   2127      1.13  christos {
   2128      1.13  christos     UINT8                   SectionType[16];
   2129      1.13  christos     UINT32                  ErrorSeverity;
   2130      1.13  christos     UINT16                  Revision;
   2131      1.13  christos     UINT8                   ValidationBits;
   2132      1.13  christos     UINT8                   Flags;
   2133      1.13  christos     UINT32                  ErrorDataLength;
   2134      1.13  christos     UINT8                   FruId[16];
   2135      1.13  christos     UINT8                   FruText[20];
   2136      1.13  christos     UINT64                  TimeStamp;
   2137      1.12  christos 
   2138      1.13  christos } ACPI_HEST_GENERIC_DATA_V300;
   2139      1.12  christos 
   2140      1.13  christos /* Values for ErrorSeverity above */
   2141      1.12  christos 
   2142      1.13  christos #define ACPI_HEST_GEN_ERROR_RECOVERABLE     0
   2143      1.13  christos #define ACPI_HEST_GEN_ERROR_FATAL           1
   2144      1.13  christos #define ACPI_HEST_GEN_ERROR_CORRECTED       2
   2145      1.13  christos #define ACPI_HEST_GEN_ERROR_NONE            3
   2146      1.12  christos 
   2147      1.13  christos /* Flags for ValidationBits above */
   2148      1.12  christos 
   2149      1.13  christos #define ACPI_HEST_GEN_VALID_FRU_ID          (1)
   2150      1.13  christos #define ACPI_HEST_GEN_VALID_FRU_STRING      (1<<1)
   2151      1.13  christos #define ACPI_HEST_GEN_VALID_TIMESTAMP       (1<<2)
   2152      1.11  christos 
   2153      1.11  christos 
   2154      1.13  christos /* 11: IA32 Deferred Machine Check Exception (ACPI 6.2) */
   2155      1.11  christos 
   2156      1.13  christos typedef struct acpi_hest_ia_deferred_check
   2157      1.11  christos {
   2158      1.13  christos     ACPI_HEST_HEADER        Header;
   2159      1.13  christos     UINT16                  Reserved1;
   2160      1.13  christos     UINT8                   Flags;              /* See flags ACPI_HEST_GLOBAL, etc. above */
   2161      1.13  christos     UINT8                   Enabled;
   2162      1.13  christos     UINT32                  RecordsToPreallocate;
   2163      1.13  christos     UINT32                  MaxSectionsPerRecord;
   2164      1.13  christos     ACPI_HEST_NOTIFY        Notify;
   2165      1.13  christos     UINT8                   NumHardwareBanks;
   2166      1.13  christos     UINT8                   Reserved2[3];
   2167      1.11  christos 
   2168      1.13  christos } ACPI_HEST_IA_DEFERRED_CHECK;
   2169      1.11  christos 
   2170      1.11  christos 
   2171      1.11  christos /*******************************************************************************
   2172      1.11  christos  *
   2173      1.16  christos  * HMAT - Heterogeneous Memory Attributes Table (ACPI 6.3)
   2174      1.11  christos  *
   2175      1.11  christos  ******************************************************************************/
   2176      1.11  christos 
   2177      1.13  christos typedef struct acpi_table_hmat
   2178      1.11  christos {
   2179      1.11  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   2180      1.13  christos     UINT32                  Reserved;
   2181      1.13  christos 
   2182      1.13  christos } ACPI_TABLE_HMAT;
   2183      1.11  christos 
   2184      1.11  christos 
   2185      1.13  christos /* Values for HMAT structure types */
   2186      1.11  christos 
   2187      1.13  christos enum AcpiHmatType
   2188      1.11  christos {
   2189      1.14  christos     ACPI_HMAT_TYPE_ADDRESS_RANGE        = 0,   /* Memory subsystem address range */
   2190      1.13  christos     ACPI_HMAT_TYPE_LOCALITY             = 1,   /* System locality latency and bandwidth information */
   2191      1.13  christos     ACPI_HMAT_TYPE_CACHE                = 2,   /* Memory side cache information */
   2192      1.13  christos     ACPI_HMAT_TYPE_RESERVED             = 3    /* 3 and greater are reserved */
   2193      1.11  christos };
   2194      1.11  christos 
   2195      1.13  christos typedef struct acpi_hmat_structure
   2196      1.11  christos {
   2197      1.13  christos     UINT16                  Type;
   2198      1.11  christos     UINT16                  Reserved;
   2199      1.13  christos     UINT32                  Length;
   2200      1.11  christos 
   2201      1.13  christos } ACPI_HMAT_STRUCTURE;
   2202      1.11  christos 
   2203      1.11  christos 
   2204      1.13  christos /*
   2205      1.13  christos  * HMAT Structures, correspond to Type in ACPI_HMAT_STRUCTURE
   2206      1.13  christos  */
   2207      1.11  christos 
   2208      1.14  christos /* 0: Memory proximity domain attributes */
   2209      1.11  christos 
   2210      1.14  christos typedef struct acpi_hmat_proximity_domain
   2211      1.11  christos {
   2212      1.13  christos     ACPI_HMAT_STRUCTURE     Header;
   2213      1.13  christos     UINT16                  Flags;
   2214      1.13  christos     UINT16                  Reserved1;
   2215      1.16  christos     UINT32                  InitiatorPD;            /* Attached Initiator proximity domain */
   2216      1.13  christos     UINT32                  MemoryPD;               /* Memory proximity domain */
   2217      1.13  christos     UINT32                  Reserved2;
   2218      1.14  christos     UINT64                  Reserved3;
   2219      1.14  christos     UINT64                  Reserved4;
   2220      1.12  christos 
   2221      1.14  christos } ACPI_HMAT_PROXIMITY_DOMAIN;
   2222      1.11  christos 
   2223      1.13  christos /* Masks for Flags field above */
   2224      1.11  christos 
   2225      1.16  christos #define ACPI_HMAT_INITIATOR_PD_VALID    (1)     /* 1: InitiatorPD field is valid */
   2226      1.11  christos 
   2227      1.11  christos 
   2228      1.13  christos /* 1: System locality latency and bandwidth information */
   2229      1.11  christos 
   2230      1.13  christos typedef struct acpi_hmat_locality
   2231       1.1    jruoho {
   2232      1.13  christos     ACPI_HMAT_STRUCTURE     Header;
   2233      1.13  christos     UINT8                   Flags;
   2234      1.13  christos     UINT8                   DataType;
   2235      1.17  christos     UINT8                   MinTransferSize;
   2236      1.17  christos     UINT8                   Reserved1;
   2237      1.13  christos     UINT32                  NumberOfInitiatorPDs;
   2238      1.13  christos     UINT32                  NumberOfTargetPDs;
   2239      1.13  christos     UINT32                  Reserved2;
   2240      1.13  christos     UINT64                  EntryBaseUnit;
   2241       1.1    jruoho 
   2242      1.13  christos } ACPI_HMAT_LOCALITY;
   2243       1.1    jruoho 
   2244      1.13  christos /* Masks for Flags field above */
   2245       1.1    jruoho 
   2246      1.17  christos #define ACPI_HMAT_MEMORY_HIERARCHY  (0x0F)      /* Bits 0-3 */
   2247      1.12  christos 
   2248      1.17  christos /* Values for Memory Hierarchy flags */
   2249      1.12  christos 
   2250      1.13  christos #define ACPI_HMAT_MEMORY            0
   2251      1.16  christos #define ACPI_HMAT_1ST_LEVEL_CACHE   1
   2252      1.16  christos #define ACPI_HMAT_2ND_LEVEL_CACHE   2
   2253      1.16  christos #define ACPI_HMAT_3RD_LEVEL_CACHE   3
   2254      1.17  christos #define ACPI_HMAT_MINIMUM_XFER_SIZE 0x10        /* Bit 4: ACPI 6.4 */
   2255      1.17  christos #define ACPI_HMAT_NON_SEQUENTIAL_XFERS 0x20     /* Bit 5: ACPI 6.4 */
   2256      1.17  christos 
   2257      1.12  christos 
   2258      1.13  christos /* Values for DataType field above */
   2259      1.12  christos 
   2260      1.13  christos #define ACPI_HMAT_ACCESS_LATENCY    0
   2261      1.13  christos #define ACPI_HMAT_READ_LATENCY      1
   2262      1.13  christos #define ACPI_HMAT_WRITE_LATENCY     2
   2263      1.13  christos #define ACPI_HMAT_ACCESS_BANDWIDTH  3
   2264      1.13  christos #define ACPI_HMAT_READ_BANDWIDTH    4
   2265      1.13  christos #define ACPI_HMAT_WRITE_BANDWIDTH   5
   2266      1.12  christos 
   2267      1.12  christos 
   2268      1.13  christos /* 2: Memory side cache information */
   2269      1.12  christos 
   2270      1.13  christos typedef struct acpi_hmat_cache
   2271      1.12  christos {
   2272      1.13  christos     ACPI_HMAT_STRUCTURE     Header;
   2273      1.13  christos     UINT32                  MemoryPD;
   2274      1.13  christos     UINT32                  Reserved1;
   2275      1.13  christos     UINT64                  CacheSize;
   2276      1.13  christos     UINT32                  CacheAttributes;
   2277  1.22.6.1  perseant     UINT16                  AddressMode;
   2278      1.13  christos     UINT16                  NumberOfSMBIOSHandles;
   2279      1.12  christos 
   2280      1.13  christos } ACPI_HMAT_CACHE;
   2281      1.12  christos 
   2282      1.13  christos /* Masks for CacheAttributes field above */
   2283      1.12  christos 
   2284      1.13  christos #define ACPI_HMAT_TOTAL_CACHE_LEVEL     (0x0000000F)
   2285      1.13  christos #define ACPI_HMAT_CACHE_LEVEL           (0x000000F0)
   2286      1.13  christos #define ACPI_HMAT_CACHE_ASSOCIATIVITY   (0x00000F00)
   2287      1.13  christos #define ACPI_HMAT_WRITE_POLICY          (0x0000F000)
   2288      1.13  christos #define ACPI_HMAT_CACHE_LINE_SIZE       (0xFFFF0000)
   2289      1.12  christos 
   2290  1.22.6.1  perseant #define ACPI_HMAT_CACHE_MODE_UNKNOWN            (0)
   2291  1.22.6.1  perseant #define ACPI_HMAT_CACHE_MODE_EXTENDED_LINEAR    (1)
   2292  1.22.6.1  perseant 
   2293      1.13  christos /* Values for cache associativity flag */
   2294      1.12  christos 
   2295      1.13  christos #define ACPI_HMAT_CA_NONE                     (0)
   2296      1.13  christos #define ACPI_HMAT_CA_DIRECT_MAPPED            (1)
   2297      1.13  christos #define ACPI_HMAT_CA_COMPLEX_CACHE_INDEXING   (2)
   2298      1.12  christos 
   2299      1.13  christos /* Values for write policy flag */
   2300      1.12  christos 
   2301      1.13  christos #define ACPI_HMAT_CP_NONE   (0)
   2302      1.13  christos #define ACPI_HMAT_CP_WB     (1)
   2303      1.13  christos #define ACPI_HMAT_CP_WT     (2)
   2304      1.12  christos 
   2305      1.12  christos 
   2306      1.12  christos /*******************************************************************************
   2307      1.12  christos  *
   2308      1.13  christos  * HPET - High Precision Event Timer table
   2309       1.1    jruoho  *        Version 1
   2310       1.1    jruoho  *
   2311      1.13  christos  * Conforms to "IA-PC HPET (High Precision Event Timers) Specification",
   2312      1.13  christos  * Version 1.0a, October 2004
   2313      1.13  christos  *
   2314       1.1    jruoho  ******************************************************************************/
   2315       1.1    jruoho 
   2316      1.13  christos typedef struct acpi_table_hpet
   2317       1.1    jruoho {
   2318       1.1    jruoho     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   2319      1.13  christos     UINT32                  Id;                 /* Hardware ID of event timer block */
   2320      1.13  christos     ACPI_GENERIC_ADDRESS    Address;            /* Address of event timer block */
   2321      1.13  christos     UINT8                   Sequence;           /* HPET sequence number */
   2322      1.13  christos     UINT16                  MinimumTick;        /* Main counter min tick, periodic mode */
   2323      1.13  christos     UINT8                   Flags;
   2324       1.1    jruoho 
   2325      1.13  christos } ACPI_TABLE_HPET;
   2326       1.1    jruoho 
   2327      1.13  christos /* Masks for Flags field above */
   2328       1.1    jruoho 
   2329      1.13  christos #define ACPI_HPET_PAGE_PROTECT_MASK (3)
   2330       1.1    jruoho 
   2331      1.13  christos /* Values for Page Protect flags */
   2332       1.1    jruoho 
   2333      1.13  christos enum AcpiHpetPageProtect
   2334       1.1    jruoho {
   2335      1.13  christos     ACPI_HPET_NO_PAGE_PROTECT       = 0,
   2336      1.13  christos     ACPI_HPET_PAGE_PROTECT4         = 1,
   2337      1.13  christos     ACPI_HPET_PAGE_PROTECT64        = 2
   2338       1.1    jruoho };
   2339       1.1    jruoho 
   2340       1.1    jruoho 
   2341      1.13  christos /*******************************************************************************
   2342      1.13  christos  *
   2343      1.13  christos  * IBFT - Boot Firmware Table
   2344      1.13  christos  *        Version 1
   2345      1.13  christos  *
   2346      1.13  christos  * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b
   2347      1.13  christos  * Specification", Version 1.01, March 1, 2007
   2348      1.13  christos  *
   2349      1.13  christos  * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
   2350      1.13  christos  * Therefore, it is not currently supported by the disassembler.
   2351      1.13  christos  *
   2352      1.13  christos  ******************************************************************************/
   2353       1.1    jruoho 
   2354      1.13  christos typedef struct acpi_table_ibft
   2355       1.1    jruoho {
   2356      1.13  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   2357      1.13  christos     UINT8                   Reserved[12];
   2358       1.1    jruoho 
   2359      1.13  christos } ACPI_TABLE_IBFT;
   2360       1.1    jruoho 
   2361       1.1    jruoho 
   2362      1.13  christos /* IBFT common subtable header */
   2363       1.1    jruoho 
   2364      1.13  christos typedef struct acpi_ibft_header
   2365       1.1    jruoho {
   2366      1.13  christos     UINT8                   Type;
   2367      1.13  christos     UINT8                   Version;
   2368      1.13  christos     UINT16                  Length;
   2369      1.13  christos     UINT8                   Index;
   2370      1.13  christos     UINT8                   Flags;
   2371       1.1    jruoho 
   2372      1.13  christos } ACPI_IBFT_HEADER;
   2373       1.1    jruoho 
   2374      1.13  christos /* Values for Type field above */
   2375       1.1    jruoho 
   2376      1.13  christos enum AcpiIbftType
   2377       1.1    jruoho {
   2378      1.13  christos     ACPI_IBFT_TYPE_NOT_USED         = 0,
   2379      1.13  christos     ACPI_IBFT_TYPE_CONTROL          = 1,
   2380      1.13  christos     ACPI_IBFT_TYPE_INITIATOR        = 2,
   2381      1.13  christos     ACPI_IBFT_TYPE_NIC              = 3,
   2382      1.13  christos     ACPI_IBFT_TYPE_TARGET           = 4,
   2383      1.13  christos     ACPI_IBFT_TYPE_EXTENSIONS       = 5,
   2384      1.13  christos     ACPI_IBFT_TYPE_RESERVED         = 6     /* 6 and greater are reserved */
   2385      1.13  christos };
   2386       1.1    jruoho 
   2387       1.1    jruoho 
   2388      1.13  christos /* IBFT subtables */
   2389       1.1    jruoho 
   2390      1.13  christos typedef struct acpi_ibft_control
   2391      1.11  christos {
   2392      1.13  christos     ACPI_IBFT_HEADER        Header;
   2393      1.13  christos     UINT16                  Extensions;
   2394      1.13  christos     UINT16                  InitiatorOffset;
   2395      1.13  christos     UINT16                  Nic0Offset;
   2396      1.13  christos     UINT16                  Target0Offset;
   2397      1.13  christos     UINT16                  Nic1Offset;
   2398      1.13  christos     UINT16                  Target1Offset;
   2399      1.13  christos 
   2400      1.13  christos } ACPI_IBFT_CONTROL;
   2401      1.13  christos 
   2402      1.13  christos typedef struct acpi_ibft_initiator
   2403      1.13  christos {
   2404      1.13  christos     ACPI_IBFT_HEADER        Header;
   2405      1.13  christos     UINT8                   SnsServer[16];
   2406      1.13  christos     UINT8                   SlpServer[16];
   2407      1.13  christos     UINT8                   PrimaryServer[16];
   2408      1.13  christos     UINT8                   SecondaryServer[16];
   2409      1.13  christos     UINT16                  NameLength;
   2410      1.13  christos     UINT16                  NameOffset;
   2411      1.13  christos 
   2412      1.13  christos } ACPI_IBFT_INITIATOR;
   2413      1.13  christos 
   2414      1.13  christos typedef struct acpi_ibft_nic
   2415      1.13  christos {
   2416      1.13  christos     ACPI_IBFT_HEADER        Header;
   2417      1.13  christos     UINT8                   IpAddress[16];
   2418      1.13  christos     UINT8                   SubnetMaskPrefix;
   2419      1.13  christos     UINT8                   Origin;
   2420      1.13  christos     UINT8                   Gateway[16];
   2421      1.13  christos     UINT8                   PrimaryDns[16];
   2422      1.13  christos     UINT8                   SecondaryDns[16];
   2423      1.13  christos     UINT8                   Dhcp[16];
   2424      1.13  christos     UINT16                  Vlan;
   2425      1.13  christos     UINT8                   MacAddress[6];
   2426      1.13  christos     UINT16                  PciAddress;
   2427      1.13  christos     UINT16                  NameLength;
   2428      1.13  christos     UINT16                  NameOffset;
   2429      1.13  christos 
   2430      1.13  christos } ACPI_IBFT_NIC;
   2431      1.13  christos 
   2432      1.13  christos typedef struct acpi_ibft_target
   2433      1.13  christos {
   2434      1.13  christos     ACPI_IBFT_HEADER        Header;
   2435      1.13  christos     UINT8                   TargetIpAddress[16];
   2436      1.13  christos     UINT16                  TargetIpSocket;
   2437      1.13  christos     UINT8                   TargetBootLun[8];
   2438      1.13  christos     UINT8                   ChapType;
   2439      1.13  christos     UINT8                   NicAssociation;
   2440      1.13  christos     UINT16                  TargetNameLength;
   2441      1.13  christos     UINT16                  TargetNameOffset;
   2442      1.13  christos     UINT16                  ChapNameLength;
   2443      1.13  christos     UINT16                  ChapNameOffset;
   2444      1.13  christos     UINT16                  ChapSecretLength;
   2445      1.13  christos     UINT16                  ChapSecretOffset;
   2446      1.13  christos     UINT16                  ReverseChapNameLength;
   2447      1.13  christos     UINT16                  ReverseChapNameOffset;
   2448      1.13  christos     UINT16                  ReverseChapSecretLength;
   2449      1.13  christos     UINT16                  ReverseChapSecretOffset;
   2450      1.11  christos 
   2451      1.13  christos } ACPI_IBFT_TARGET;
   2452      1.11  christos 
   2453      1.11  christos 
   2454       1.1    jruoho /* Reset to default packing */
   2455       1.1    jruoho 
   2456       1.1    jruoho #pragma pack()
   2457       1.1    jruoho 
   2458       1.1    jruoho #endif /* __ACTBL1_H__ */
   2459