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