Home | History | Annotate | Line # | Download | only in include
actbl2.h revision 1.1.1.12
      1       1.1    jruoho /******************************************************************************
      2       1.1    jruoho  *
      3   1.1.1.3    jruoho  * Name: actbl2.h - ACPI Table Definitions (tables not in ACPI spec)
      4       1.1    jruoho  *
      5       1.1    jruoho  *****************************************************************************/
      6       1.1    jruoho 
      7   1.1.1.2    jruoho /*
      8  1.1.1.10  christos  * Copyright (C) 2000 - 2017, Intel Corp.
      9       1.1    jruoho  * All rights reserved.
     10       1.1    jruoho  *
     11   1.1.1.2    jruoho  * Redistribution and use in source and binary forms, with or without
     12   1.1.1.2    jruoho  * modification, are permitted provided that the following conditions
     13   1.1.1.2    jruoho  * are met:
     14   1.1.1.2    jruoho  * 1. Redistributions of source code must retain the above copyright
     15   1.1.1.2    jruoho  *    notice, this list of conditions, and the following disclaimer,
     16   1.1.1.2    jruoho  *    without modification.
     17   1.1.1.2    jruoho  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
     18   1.1.1.2    jruoho  *    substantially similar to the "NO WARRANTY" disclaimer below
     19   1.1.1.2    jruoho  *    ("Disclaimer") and any redistribution must be conditioned upon
     20   1.1.1.2    jruoho  *    including a substantially similar Disclaimer requirement for further
     21   1.1.1.2    jruoho  *    binary redistribution.
     22   1.1.1.2    jruoho  * 3. Neither the names of the above-listed copyright holders nor the names
     23   1.1.1.2    jruoho  *    of any contributors may be used to endorse or promote products derived
     24   1.1.1.2    jruoho  *    from this software without specific prior written permission.
     25   1.1.1.2    jruoho  *
     26   1.1.1.2    jruoho  * Alternatively, this software may be distributed under the terms of the
     27   1.1.1.2    jruoho  * GNU General Public License ("GPL") version 2 as published by the Free
     28   1.1.1.2    jruoho  * Software Foundation.
     29   1.1.1.2    jruoho  *
     30   1.1.1.2    jruoho  * NO WARRANTY
     31   1.1.1.2    jruoho  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     32   1.1.1.2    jruoho  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     33   1.1.1.2    jruoho  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
     34   1.1.1.2    jruoho  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     35   1.1.1.2    jruoho  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     36   1.1.1.2    jruoho  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     37   1.1.1.2    jruoho  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     38   1.1.1.2    jruoho  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
     39   1.1.1.2    jruoho  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
     40   1.1.1.2    jruoho  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     41   1.1.1.2    jruoho  * POSSIBILITY OF SUCH DAMAGES.
     42   1.1.1.2    jruoho  */
     43       1.1    jruoho 
     44       1.1    jruoho #ifndef __ACTBL2_H__
     45       1.1    jruoho #define __ACTBL2_H__
     46       1.1    jruoho 
     47       1.1    jruoho 
     48       1.1    jruoho /*******************************************************************************
     49       1.1    jruoho  *
     50       1.1    jruoho  * Additional ACPI Tables (2)
     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.1.7  christos  * Generally, the tables in this file are defined by third-party specifications,
     56   1.1.1.7  christos  * and are not defined directly by the ACPI specification itself.
     57       1.1    jruoho  *
     58       1.1    jruoho  ******************************************************************************/
     59       1.1    jruoho 
     60       1.1    jruoho 
     61       1.1    jruoho /*
     62       1.1    jruoho  * Values for description table header signatures for tables defined in this
     63       1.1    jruoho  * file. Useful because they make it more difficult to inadvertently type in
     64       1.1    jruoho  * the wrong signature.
     65       1.1    jruoho  */
     66       1.1    jruoho #define ACPI_SIG_ASF            "ASF!"      /* Alert Standard Format table */
     67       1.1    jruoho #define ACPI_SIG_BOOT           "BOOT"      /* Simple Boot Flag Table */
     68   1.1.1.4  christos #define ACPI_SIG_CSRT           "CSRT"      /* Core System Resource Table */
     69   1.1.1.4  christos #define ACPI_SIG_DBG2           "DBG2"      /* Debug Port table type 2 */
     70       1.1    jruoho #define ACPI_SIG_DBGP           "DBGP"      /* Debug Port table */
     71       1.1    jruoho #define ACPI_SIG_DMAR           "DMAR"      /* DMA Remapping table */
     72       1.1    jruoho #define ACPI_SIG_HPET           "HPET"      /* High Precision Event Timer table */
     73       1.1    jruoho #define ACPI_SIG_IBFT           "IBFT"      /* iSCSI Boot Firmware Table */
     74   1.1.1.7  christos #define ACPI_SIG_IORT           "IORT"      /* IO Remapping Table */
     75       1.1    jruoho #define ACPI_SIG_IVRS           "IVRS"      /* I/O Virtualization Reporting Structure */
     76   1.1.1.5  christos #define ACPI_SIG_LPIT           "LPIT"      /* Low Power Idle Table */
     77       1.1    jruoho #define ACPI_SIG_MCFG           "MCFG"      /* PCI Memory Mapped Configuration table */
     78       1.1    jruoho #define ACPI_SIG_MCHI           "MCHI"      /* Management Controller Host Interface table */
     79   1.1.1.6  christos #define ACPI_SIG_MSDM           "MSDM"      /* Microsoft Data Management Table */
     80   1.1.1.4  christos #define ACPI_SIG_MTMR           "MTMR"      /* MID Timer table */
     81  1.1.1.12  christos #define ACPI_SIG_SDEI           "SDEI"      /* Software Delegated Exception Interface Table */
     82       1.1    jruoho #define ACPI_SIG_SLIC           "SLIC"      /* Software Licensing Description Table */
     83       1.1    jruoho #define ACPI_SIG_SPCR           "SPCR"      /* Serial Port Console Redirection table */
     84       1.1    jruoho #define ACPI_SIG_SPMI           "SPMI"      /* Server Platform Management Interface table */
     85       1.1    jruoho #define ACPI_SIG_TCPA           "TCPA"      /* Trusted Computing Platform Alliance table */
     86   1.1.1.7  christos #define ACPI_SIG_TPM2           "TPM2"      /* Trusted Platform Module 2.0 H/W interface table */
     87       1.1    jruoho #define ACPI_SIG_UEFI           "UEFI"      /* Uefi Boot Optimization Table */
     88   1.1.1.4  christos #define ACPI_SIG_VRTC           "VRTC"      /* Virtual Real Time Clock Table */
     89       1.1    jruoho #define ACPI_SIG_WAET           "WAET"      /* Windows ACPI Emulated devices Table */
     90       1.1    jruoho #define ACPI_SIG_WDAT           "WDAT"      /* Watchdog Action Table */
     91   1.1.1.2    jruoho #define ACPI_SIG_WDDT           "WDDT"      /* Watchdog Timer Description Table */
     92       1.1    jruoho #define ACPI_SIG_WDRT           "WDRT"      /* Watchdog Resource Table */
     93  1.1.1.12  christos #define ACPI_SIG_WSMT           "WSMT"      /* Windows SMM Security Migrations Table */
     94  1.1.1.11  christos #define ACPI_SIG_XXXX           "XXXX"      /* Intermediate AML header for ASL/ASL+ converter */
     95       1.1    jruoho 
     96       1.1    jruoho #ifdef ACPI_UNDEFINED_TABLES
     97       1.1    jruoho /*
     98       1.1    jruoho  * These tables have been seen in the field, but no definition has been found
     99       1.1    jruoho  */
    100       1.1    jruoho #define ACPI_SIG_ATKG           "ATKG"
    101       1.1    jruoho #define ACPI_SIG_GSCI           "GSCI"      /* GMCH SCI table */
    102       1.1    jruoho #define ACPI_SIG_IEIT           "IEIT"
    103       1.1    jruoho #endif
    104       1.1    jruoho 
    105       1.1    jruoho /*
    106       1.1    jruoho  * All tables must be byte-packed to match the ACPI specification, since
    107       1.1    jruoho  * the tables are provided by the system BIOS.
    108       1.1    jruoho  */
    109       1.1    jruoho #pragma pack(1)
    110       1.1    jruoho 
    111       1.1    jruoho /*
    112   1.1.1.4  christos  * Note: C bitfields are not used for this reason:
    113   1.1.1.4  christos  *
    114   1.1.1.4  christos  * "Bitfields are great and easy to read, but unfortunately the C language
    115   1.1.1.4  christos  * does not specify the layout of bitfields in memory, which means they are
    116   1.1.1.4  christos  * essentially useless for dealing with packed data in on-disk formats or
    117   1.1.1.4  christos  * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
    118   1.1.1.4  christos  * this decision was a design error in C. Ritchie could have picked an order
    119   1.1.1.4  christos  * and stuck with it." Norman Ramsey.
    120   1.1.1.4  christos  * See http://stackoverflow.com/a/1053662/41661
    121       1.1    jruoho  */
    122       1.1    jruoho 
    123       1.1    jruoho 
    124       1.1    jruoho /*******************************************************************************
    125       1.1    jruoho  *
    126       1.1    jruoho  * ASF - Alert Standard Format table (Signature "ASF!")
    127       1.1    jruoho  *       Revision 0x10
    128       1.1    jruoho  *
    129       1.1    jruoho  * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
    130       1.1    jruoho  *
    131       1.1    jruoho  ******************************************************************************/
    132       1.1    jruoho 
    133       1.1    jruoho typedef struct acpi_table_asf
    134       1.1    jruoho {
    135       1.1    jruoho     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    136       1.1    jruoho 
    137       1.1    jruoho } ACPI_TABLE_ASF;
    138       1.1    jruoho 
    139       1.1    jruoho 
    140       1.1    jruoho /* ASF subtable header */
    141       1.1    jruoho 
    142       1.1    jruoho typedef struct acpi_asf_header
    143       1.1    jruoho {
    144       1.1    jruoho     UINT8                   Type;
    145       1.1    jruoho     UINT8                   Reserved;
    146       1.1    jruoho     UINT16                  Length;
    147       1.1    jruoho 
    148       1.1    jruoho } ACPI_ASF_HEADER;
    149       1.1    jruoho 
    150       1.1    jruoho 
    151       1.1    jruoho /* Values for Type field above */
    152       1.1    jruoho 
    153       1.1    jruoho enum AcpiAsfType
    154       1.1    jruoho {
    155       1.1    jruoho     ACPI_ASF_TYPE_INFO          = 0,
    156       1.1    jruoho     ACPI_ASF_TYPE_ALERT         = 1,
    157       1.1    jruoho     ACPI_ASF_TYPE_CONTROL       = 2,
    158       1.1    jruoho     ACPI_ASF_TYPE_BOOT          = 3,
    159       1.1    jruoho     ACPI_ASF_TYPE_ADDRESS       = 4,
    160       1.1    jruoho     ACPI_ASF_TYPE_RESERVED      = 5
    161       1.1    jruoho };
    162       1.1    jruoho 
    163       1.1    jruoho /*
    164       1.1    jruoho  * ASF subtables
    165       1.1    jruoho  */
    166       1.1    jruoho 
    167       1.1    jruoho /* 0: ASF Information */
    168       1.1    jruoho 
    169       1.1    jruoho typedef struct acpi_asf_info
    170       1.1    jruoho {
    171       1.1    jruoho     ACPI_ASF_HEADER         Header;
    172       1.1    jruoho     UINT8                   MinResetValue;
    173       1.1    jruoho     UINT8                   MinPollInterval;
    174       1.1    jruoho     UINT16                  SystemId;
    175       1.1    jruoho     UINT32                  MfgId;
    176       1.1    jruoho     UINT8                   Flags;
    177       1.1    jruoho     UINT8                   Reserved2[3];
    178       1.1    jruoho 
    179       1.1    jruoho } ACPI_ASF_INFO;
    180       1.1    jruoho 
    181       1.1    jruoho /* Masks for Flags field above */
    182       1.1    jruoho 
    183       1.1    jruoho #define ACPI_ASF_SMBUS_PROTOCOLS    (1)
    184       1.1    jruoho 
    185       1.1    jruoho 
    186       1.1    jruoho /* 1: ASF Alerts */
    187       1.1    jruoho 
    188       1.1    jruoho typedef struct acpi_asf_alert
    189       1.1    jruoho {
    190       1.1    jruoho     ACPI_ASF_HEADER         Header;
    191       1.1    jruoho     UINT8                   AssertMask;
    192       1.1    jruoho     UINT8                   DeassertMask;
    193       1.1    jruoho     UINT8                   Alerts;
    194       1.1    jruoho     UINT8                   DataLength;
    195       1.1    jruoho 
    196       1.1    jruoho } ACPI_ASF_ALERT;
    197       1.1    jruoho 
    198       1.1    jruoho typedef struct acpi_asf_alert_data
    199       1.1    jruoho {
    200       1.1    jruoho     UINT8                   Address;
    201       1.1    jruoho     UINT8                   Command;
    202       1.1    jruoho     UINT8                   Mask;
    203       1.1    jruoho     UINT8                   Value;
    204       1.1    jruoho     UINT8                   SensorType;
    205       1.1    jruoho     UINT8                   Type;
    206       1.1    jruoho     UINT8                   Offset;
    207       1.1    jruoho     UINT8                   SourceType;
    208       1.1    jruoho     UINT8                   Severity;
    209       1.1    jruoho     UINT8                   SensorNumber;
    210       1.1    jruoho     UINT8                   Entity;
    211       1.1    jruoho     UINT8                   Instance;
    212       1.1    jruoho 
    213       1.1    jruoho } ACPI_ASF_ALERT_DATA;
    214       1.1    jruoho 
    215       1.1    jruoho 
    216       1.1    jruoho /* 2: ASF Remote Control */
    217       1.1    jruoho 
    218       1.1    jruoho typedef struct acpi_asf_remote
    219       1.1    jruoho {
    220       1.1    jruoho     ACPI_ASF_HEADER         Header;
    221       1.1    jruoho     UINT8                   Controls;
    222       1.1    jruoho     UINT8                   DataLength;
    223       1.1    jruoho     UINT16                  Reserved2;
    224       1.1    jruoho 
    225       1.1    jruoho } ACPI_ASF_REMOTE;
    226       1.1    jruoho 
    227       1.1    jruoho typedef struct acpi_asf_control_data
    228       1.1    jruoho {
    229       1.1    jruoho     UINT8                   Function;
    230       1.1    jruoho     UINT8                   Address;
    231       1.1    jruoho     UINT8                   Command;
    232       1.1    jruoho     UINT8                   Value;
    233       1.1    jruoho 
    234       1.1    jruoho } ACPI_ASF_CONTROL_DATA;
    235       1.1    jruoho 
    236       1.1    jruoho 
    237       1.1    jruoho /* 3: ASF RMCP Boot Options */
    238       1.1    jruoho 
    239       1.1    jruoho typedef struct acpi_asf_rmcp
    240       1.1    jruoho {
    241       1.1    jruoho     ACPI_ASF_HEADER         Header;
    242       1.1    jruoho     UINT8                   Capabilities[7];
    243       1.1    jruoho     UINT8                   CompletionCode;
    244       1.1    jruoho     UINT32                  EnterpriseId;
    245       1.1    jruoho     UINT8                   Command;
    246       1.1    jruoho     UINT16                  Parameter;
    247       1.1    jruoho     UINT16                  BootOptions;
    248       1.1    jruoho     UINT16                  OemParameters;
    249       1.1    jruoho 
    250       1.1    jruoho } ACPI_ASF_RMCP;
    251       1.1    jruoho 
    252       1.1    jruoho 
    253       1.1    jruoho /* 4: ASF Address */
    254       1.1    jruoho 
    255       1.1    jruoho typedef struct acpi_asf_address
    256       1.1    jruoho {
    257       1.1    jruoho     ACPI_ASF_HEADER         Header;
    258       1.1    jruoho     UINT8                   EpromAddress;
    259       1.1    jruoho     UINT8                   Devices;
    260       1.1    jruoho 
    261       1.1    jruoho } ACPI_ASF_ADDRESS;
    262       1.1    jruoho 
    263       1.1    jruoho 
    264       1.1    jruoho /*******************************************************************************
    265       1.1    jruoho  *
    266       1.1    jruoho  * BOOT - Simple Boot Flag Table
    267       1.1    jruoho  *        Version 1
    268       1.1    jruoho  *
    269       1.1    jruoho  * Conforms to the "Simple Boot Flag Specification", Version 2.1
    270       1.1    jruoho  *
    271       1.1    jruoho  ******************************************************************************/
    272       1.1    jruoho 
    273       1.1    jruoho typedef struct acpi_table_boot
    274       1.1    jruoho {
    275       1.1    jruoho     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    276       1.1    jruoho     UINT8                   CmosIndex;          /* Index in CMOS RAM for the boot register */
    277       1.1    jruoho     UINT8                   Reserved[3];
    278       1.1    jruoho 
    279       1.1    jruoho } ACPI_TABLE_BOOT;
    280       1.1    jruoho 
    281       1.1    jruoho 
    282       1.1    jruoho /*******************************************************************************
    283       1.1    jruoho  *
    284   1.1.1.4  christos  * CSRT - Core System Resource Table
    285   1.1.1.4  christos  *        Version 0
    286   1.1.1.4  christos  *
    287   1.1.1.4  christos  * Conforms to the "Core System Resource Table (CSRT)", November 14, 2011
    288   1.1.1.4  christos  *
    289   1.1.1.4  christos  ******************************************************************************/
    290   1.1.1.4  christos 
    291   1.1.1.4  christos typedef struct acpi_table_csrt
    292   1.1.1.4  christos {
    293   1.1.1.4  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    294   1.1.1.4  christos 
    295   1.1.1.4  christos } ACPI_TABLE_CSRT;
    296   1.1.1.4  christos 
    297   1.1.1.4  christos 
    298   1.1.1.4  christos /* Resource Group subtable */
    299   1.1.1.4  christos 
    300   1.1.1.4  christos typedef struct acpi_csrt_group
    301   1.1.1.4  christos {
    302   1.1.1.4  christos     UINT32                  Length;
    303   1.1.1.4  christos     UINT32                  VendorId;
    304   1.1.1.4  christos     UINT32                  SubvendorId;
    305   1.1.1.4  christos     UINT16                  DeviceId;
    306   1.1.1.4  christos     UINT16                  SubdeviceId;
    307   1.1.1.4  christos     UINT16                  Revision;
    308   1.1.1.4  christos     UINT16                  Reserved;
    309   1.1.1.4  christos     UINT32                  SharedInfoLength;
    310   1.1.1.4  christos 
    311   1.1.1.4  christos     /* Shared data immediately follows (Length = SharedInfoLength) */
    312   1.1.1.4  christos 
    313   1.1.1.4  christos } ACPI_CSRT_GROUP;
    314   1.1.1.4  christos 
    315   1.1.1.4  christos /* Shared Info subtable */
    316   1.1.1.4  christos 
    317   1.1.1.4  christos typedef struct acpi_csrt_shared_info
    318   1.1.1.4  christos {
    319   1.1.1.4  christos     UINT16                  MajorVersion;
    320   1.1.1.4  christos     UINT16                  MinorVersion;
    321   1.1.1.4  christos     UINT32                  MmioBaseLow;
    322   1.1.1.4  christos     UINT32                  MmioBaseHigh;
    323   1.1.1.4  christos     UINT32                  GsiInterrupt;
    324   1.1.1.4  christos     UINT8                   InterruptPolarity;
    325   1.1.1.4  christos     UINT8                   InterruptMode;
    326   1.1.1.4  christos     UINT8                   NumChannels;
    327   1.1.1.4  christos     UINT8                   DmaAddressWidth;
    328   1.1.1.4  christos     UINT16                  BaseRequestLine;
    329   1.1.1.4  christos     UINT16                  NumHandshakeSignals;
    330   1.1.1.4  christos     UINT32                  MaxBlockSize;
    331   1.1.1.4  christos 
    332   1.1.1.4  christos     /* Resource descriptors immediately follow (Length = Group Length - SharedInfoLength) */
    333   1.1.1.4  christos 
    334   1.1.1.4  christos } ACPI_CSRT_SHARED_INFO;
    335   1.1.1.4  christos 
    336   1.1.1.4  christos /* Resource Descriptor subtable */
    337   1.1.1.4  christos 
    338   1.1.1.4  christos typedef struct acpi_csrt_descriptor
    339   1.1.1.4  christos {
    340   1.1.1.4  christos     UINT32                  Length;
    341   1.1.1.4  christos     UINT16                  Type;
    342   1.1.1.4  christos     UINT16                  Subtype;
    343   1.1.1.4  christos     UINT32                  Uid;
    344   1.1.1.4  christos 
    345   1.1.1.4  christos     /* Resource-specific information immediately follows */
    346   1.1.1.4  christos 
    347   1.1.1.4  christos } ACPI_CSRT_DESCRIPTOR;
    348   1.1.1.4  christos 
    349   1.1.1.4  christos 
    350   1.1.1.4  christos /* Resource Types */
    351   1.1.1.4  christos 
    352   1.1.1.4  christos #define ACPI_CSRT_TYPE_INTERRUPT    0x0001
    353   1.1.1.4  christos #define ACPI_CSRT_TYPE_TIMER        0x0002
    354   1.1.1.4  christos #define ACPI_CSRT_TYPE_DMA          0x0003
    355   1.1.1.4  christos 
    356   1.1.1.4  christos /* Resource Subtypes */
    357   1.1.1.4  christos 
    358   1.1.1.4  christos #define ACPI_CSRT_XRUPT_LINE        0x0000
    359   1.1.1.4  christos #define ACPI_CSRT_XRUPT_CONTROLLER  0x0001
    360   1.1.1.4  christos #define ACPI_CSRT_TIMER             0x0000
    361   1.1.1.4  christos #define ACPI_CSRT_DMA_CHANNEL       0x0000
    362   1.1.1.4  christos #define ACPI_CSRT_DMA_CONTROLLER    0x0001
    363   1.1.1.4  christos 
    364   1.1.1.4  christos 
    365   1.1.1.4  christos /*******************************************************************************
    366   1.1.1.4  christos  *
    367   1.1.1.4  christos  * DBG2 - Debug Port Table 2
    368   1.1.1.4  christos  *        Version 0 (Both main table and subtables)
    369   1.1.1.4  christos  *
    370   1.1.1.9  christos  * Conforms to "Microsoft Debug Port Table 2 (DBG2)", December 10, 2015
    371   1.1.1.4  christos  *
    372   1.1.1.4  christos  ******************************************************************************/
    373   1.1.1.4  christos 
    374   1.1.1.4  christos typedef struct acpi_table_dbg2
    375   1.1.1.4  christos {
    376   1.1.1.4  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    377   1.1.1.4  christos     UINT32                  InfoOffset;
    378   1.1.1.4  christos     UINT32                  InfoCount;
    379   1.1.1.4  christos 
    380   1.1.1.4  christos } ACPI_TABLE_DBG2;
    381   1.1.1.4  christos 
    382   1.1.1.4  christos 
    383   1.1.1.4  christos typedef struct acpi_dbg2_header
    384   1.1.1.4  christos {
    385   1.1.1.4  christos     UINT32                  InfoOffset;
    386   1.1.1.4  christos     UINT32                  InfoCount;
    387   1.1.1.4  christos 
    388   1.1.1.4  christos } ACPI_DBG2_HEADER;
    389   1.1.1.4  christos 
    390   1.1.1.4  christos 
    391   1.1.1.4  christos /* Debug Device Information Subtable */
    392   1.1.1.4  christos 
    393   1.1.1.4  christos typedef struct acpi_dbg2_device
    394   1.1.1.4  christos {
    395   1.1.1.4  christos     UINT8                   Revision;
    396   1.1.1.4  christos     UINT16                  Length;
    397   1.1.1.4  christos     UINT8                   RegisterCount;      /* Number of BaseAddress registers */
    398   1.1.1.4  christos     UINT16                  NamepathLength;
    399   1.1.1.4  christos     UINT16                  NamepathOffset;
    400   1.1.1.4  christos     UINT16                  OemDataLength;
    401   1.1.1.4  christos     UINT16                  OemDataOffset;
    402   1.1.1.4  christos     UINT16                  PortType;
    403   1.1.1.4  christos     UINT16                  PortSubtype;
    404   1.1.1.4  christos     UINT16                  Reserved;
    405   1.1.1.4  christos     UINT16                  BaseAddressOffset;
    406   1.1.1.4  christos     UINT16                  AddressSizeOffset;
    407   1.1.1.4  christos     /*
    408   1.1.1.4  christos      * Data that follows:
    409   1.1.1.4  christos      *    BaseAddress (required) - Each in 12-byte Generic Address Structure format.
    410   1.1.1.4  christos      *    AddressSize (required) - Array of UINT32 sizes corresponding to each BaseAddress register.
    411   1.1.1.4  christos      *    Namepath    (required) - Null terminated string. Single dot if not supported.
    412   1.1.1.4  christos      *    OemData     (optional) - Length is OemDataLength.
    413   1.1.1.4  christos      */
    414   1.1.1.4  christos } ACPI_DBG2_DEVICE;
    415   1.1.1.4  christos 
    416   1.1.1.4  christos /* Types for PortType field above */
    417   1.1.1.4  christos 
    418   1.1.1.4  christos #define ACPI_DBG2_SERIAL_PORT       0x8000
    419   1.1.1.4  christos #define ACPI_DBG2_1394_PORT         0x8001
    420   1.1.1.4  christos #define ACPI_DBG2_USB_PORT          0x8002
    421   1.1.1.4  christos #define ACPI_DBG2_NET_PORT          0x8003
    422   1.1.1.4  christos 
    423   1.1.1.4  christos /* Subtypes for PortSubtype field above */
    424   1.1.1.4  christos 
    425   1.1.1.4  christos #define ACPI_DBG2_16550_COMPATIBLE  0x0000
    426   1.1.1.4  christos #define ACPI_DBG2_16550_SUBSET      0x0001
    427   1.1.1.9  christos #define ACPI_DBG2_ARM_PL011         0x0003
    428   1.1.1.9  christos #define ACPI_DBG2_ARM_SBSA_32BIT    0x000D
    429   1.1.1.9  christos #define ACPI_DBG2_ARM_SBSA_GENERIC  0x000E
    430   1.1.1.9  christos #define ACPI_DBG2_ARM_DCC           0x000F
    431   1.1.1.9  christos #define ACPI_DBG2_BCM2835           0x0010
    432   1.1.1.4  christos 
    433   1.1.1.4  christos #define ACPI_DBG2_1394_STANDARD     0x0000
    434   1.1.1.4  christos 
    435   1.1.1.4  christos #define ACPI_DBG2_USB_XHCI          0x0000
    436   1.1.1.4  christos #define ACPI_DBG2_USB_EHCI          0x0001
    437   1.1.1.4  christos 
    438   1.1.1.4  christos 
    439   1.1.1.4  christos /*******************************************************************************
    440   1.1.1.4  christos  *
    441       1.1    jruoho  * DBGP - Debug Port table
    442       1.1    jruoho  *        Version 1
    443       1.1    jruoho  *
    444       1.1    jruoho  * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000
    445       1.1    jruoho  *
    446       1.1    jruoho  ******************************************************************************/
    447       1.1    jruoho 
    448       1.1    jruoho typedef struct acpi_table_dbgp
    449       1.1    jruoho {
    450       1.1    jruoho     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    451       1.1    jruoho     UINT8                   Type;               /* 0=full 16550, 1=subset of 16550 */
    452       1.1    jruoho     UINT8                   Reserved[3];
    453       1.1    jruoho     ACPI_GENERIC_ADDRESS    DebugPort;
    454       1.1    jruoho 
    455       1.1    jruoho } ACPI_TABLE_DBGP;
    456       1.1    jruoho 
    457       1.1    jruoho 
    458       1.1    jruoho /*******************************************************************************
    459       1.1    jruoho  *
    460       1.1    jruoho  * DMAR - DMA Remapping table
    461       1.1    jruoho  *        Version 1
    462       1.1    jruoho  *
    463       1.1    jruoho  * Conforms to "Intel Virtualization Technology for Directed I/O",
    464   1.1.1.9  christos  * Version 2.3, October 2014
    465       1.1    jruoho  *
    466       1.1    jruoho  ******************************************************************************/
    467       1.1    jruoho 
    468       1.1    jruoho typedef struct acpi_table_dmar
    469       1.1    jruoho {
    470       1.1    jruoho     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    471       1.1    jruoho     UINT8                   Width;              /* Host Address Width */
    472       1.1    jruoho     UINT8                   Flags;
    473       1.1    jruoho     UINT8                   Reserved[10];
    474       1.1    jruoho 
    475       1.1    jruoho } ACPI_TABLE_DMAR;
    476       1.1    jruoho 
    477       1.1    jruoho /* Masks for Flags field above */
    478       1.1    jruoho 
    479       1.1    jruoho #define ACPI_DMAR_INTR_REMAP        (1)
    480   1.1.1.9  christos #define ACPI_DMAR_X2APIC_OPT_OUT    (1<<1)
    481   1.1.1.9  christos #define ACPI_DMAR_X2APIC_MODE       (1<<2)
    482       1.1    jruoho 
    483       1.1    jruoho 
    484       1.1    jruoho /* DMAR subtable header */
    485       1.1    jruoho 
    486       1.1    jruoho typedef struct acpi_dmar_header
    487       1.1    jruoho {
    488       1.1    jruoho     UINT16                  Type;
    489       1.1    jruoho     UINT16                  Length;
    490       1.1    jruoho 
    491       1.1    jruoho } ACPI_DMAR_HEADER;
    492       1.1    jruoho 
    493       1.1    jruoho /* Values for subtable type in ACPI_DMAR_HEADER */
    494       1.1    jruoho 
    495       1.1    jruoho enum AcpiDmarType
    496       1.1    jruoho {
    497       1.1    jruoho     ACPI_DMAR_TYPE_HARDWARE_UNIT        = 0,
    498       1.1    jruoho     ACPI_DMAR_TYPE_RESERVED_MEMORY      = 1,
    499   1.1.1.5  christos     ACPI_DMAR_TYPE_ROOT_ATS             = 2,
    500   1.1.1.5  christos     ACPI_DMAR_TYPE_HARDWARE_AFFINITY    = 3,
    501   1.1.1.5  christos     ACPI_DMAR_TYPE_NAMESPACE            = 4,
    502   1.1.1.5  christos     ACPI_DMAR_TYPE_RESERVED             = 5     /* 5 and greater are reserved */
    503       1.1    jruoho };
    504       1.1    jruoho 
    505       1.1    jruoho 
    506       1.1    jruoho /* DMAR Device Scope structure */
    507       1.1    jruoho 
    508       1.1    jruoho typedef struct acpi_dmar_device_scope
    509       1.1    jruoho {
    510       1.1    jruoho     UINT8                   EntryType;
    511       1.1    jruoho     UINT8                   Length;
    512       1.1    jruoho     UINT16                  Reserved;
    513       1.1    jruoho     UINT8                   EnumerationId;
    514       1.1    jruoho     UINT8                   Bus;
    515       1.1    jruoho 
    516       1.1    jruoho } ACPI_DMAR_DEVICE_SCOPE;
    517       1.1    jruoho 
    518   1.1.1.5  christos /* Values for EntryType in ACPI_DMAR_DEVICE_SCOPE - device types */
    519       1.1    jruoho 
    520       1.1    jruoho enum AcpiDmarScopeType
    521       1.1    jruoho {
    522       1.1    jruoho     ACPI_DMAR_SCOPE_TYPE_NOT_USED       = 0,
    523       1.1    jruoho     ACPI_DMAR_SCOPE_TYPE_ENDPOINT       = 1,
    524       1.1    jruoho     ACPI_DMAR_SCOPE_TYPE_BRIDGE         = 2,
    525       1.1    jruoho     ACPI_DMAR_SCOPE_TYPE_IOAPIC         = 3,
    526       1.1    jruoho     ACPI_DMAR_SCOPE_TYPE_HPET           = 4,
    527   1.1.1.5  christos     ACPI_DMAR_SCOPE_TYPE_NAMESPACE      = 5,
    528   1.1.1.5  christos     ACPI_DMAR_SCOPE_TYPE_RESERVED       = 6     /* 6 and greater are reserved */
    529       1.1    jruoho };
    530       1.1    jruoho 
    531       1.1    jruoho typedef struct acpi_dmar_pci_path
    532       1.1    jruoho {
    533       1.1    jruoho     UINT8                   Device;
    534       1.1    jruoho     UINT8                   Function;
    535       1.1    jruoho 
    536       1.1    jruoho } ACPI_DMAR_PCI_PATH;
    537       1.1    jruoho 
    538       1.1    jruoho 
    539       1.1    jruoho /*
    540   1.1.1.5  christos  * DMAR Subtables, correspond to Type in ACPI_DMAR_HEADER
    541       1.1    jruoho  */
    542       1.1    jruoho 
    543       1.1    jruoho /* 0: Hardware Unit Definition */
    544       1.1    jruoho 
    545       1.1    jruoho typedef struct acpi_dmar_hardware_unit
    546       1.1    jruoho {
    547       1.1    jruoho     ACPI_DMAR_HEADER        Header;
    548       1.1    jruoho     UINT8                   Flags;
    549       1.1    jruoho     UINT8                   Reserved;
    550       1.1    jruoho     UINT16                  Segment;
    551       1.1    jruoho     UINT64                  Address;            /* Register Base Address */
    552       1.1    jruoho 
    553       1.1    jruoho } ACPI_DMAR_HARDWARE_UNIT;
    554       1.1    jruoho 
    555       1.1    jruoho /* Masks for Flags field above */
    556       1.1    jruoho 
    557       1.1    jruoho #define ACPI_DMAR_INCLUDE_ALL       (1)
    558       1.1    jruoho 
    559       1.1    jruoho 
    560       1.1    jruoho /* 1: Reserved Memory Defininition */
    561       1.1    jruoho 
    562       1.1    jruoho typedef struct acpi_dmar_reserved_memory
    563       1.1    jruoho {
    564       1.1    jruoho     ACPI_DMAR_HEADER        Header;
    565       1.1    jruoho     UINT16                  Reserved;
    566       1.1    jruoho     UINT16                  Segment;
    567       1.1    jruoho     UINT64                  BaseAddress;        /* 4K aligned base address */
    568       1.1    jruoho     UINT64                  EndAddress;         /* 4K aligned limit address */
    569       1.1    jruoho 
    570       1.1    jruoho } ACPI_DMAR_RESERVED_MEMORY;
    571       1.1    jruoho 
    572       1.1    jruoho /* Masks for Flags field above */
    573       1.1    jruoho 
    574       1.1    jruoho #define ACPI_DMAR_ALLOW_ALL         (1)
    575       1.1    jruoho 
    576       1.1    jruoho 
    577       1.1    jruoho /* 2: Root Port ATS Capability Reporting Structure */
    578       1.1    jruoho 
    579       1.1    jruoho typedef struct acpi_dmar_atsr
    580       1.1    jruoho {
    581       1.1    jruoho     ACPI_DMAR_HEADER        Header;
    582       1.1    jruoho     UINT8                   Flags;
    583       1.1    jruoho     UINT8                   Reserved;
    584       1.1    jruoho     UINT16                  Segment;
    585       1.1    jruoho 
    586       1.1    jruoho } ACPI_DMAR_ATSR;
    587       1.1    jruoho 
    588       1.1    jruoho /* Masks for Flags field above */
    589       1.1    jruoho 
    590       1.1    jruoho #define ACPI_DMAR_ALL_PORTS         (1)
    591       1.1    jruoho 
    592       1.1    jruoho 
    593       1.1    jruoho /* 3: Remapping Hardware Static Affinity Structure */
    594       1.1    jruoho 
    595       1.1    jruoho typedef struct acpi_dmar_rhsa
    596       1.1    jruoho {
    597       1.1    jruoho     ACPI_DMAR_HEADER        Header;
    598       1.1    jruoho     UINT32                  Reserved;
    599       1.1    jruoho     UINT64                  BaseAddress;
    600       1.1    jruoho     UINT32                  ProximityDomain;
    601       1.1    jruoho 
    602       1.1    jruoho } ACPI_DMAR_RHSA;
    603       1.1    jruoho 
    604       1.1    jruoho 
    605   1.1.1.5  christos /* 4: ACPI Namespace Device Declaration Structure */
    606   1.1.1.5  christos 
    607   1.1.1.5  christos typedef struct acpi_dmar_andd
    608   1.1.1.5  christos {
    609   1.1.1.5  christos     ACPI_DMAR_HEADER        Header;
    610   1.1.1.5  christos     UINT8                   Reserved[3];
    611   1.1.1.5  christos     UINT8                   DeviceNumber;
    612   1.1.1.5  christos     char                    DeviceName[1];
    613   1.1.1.5  christos 
    614   1.1.1.5  christos } ACPI_DMAR_ANDD;
    615   1.1.1.5  christos 
    616   1.1.1.5  christos 
    617       1.1    jruoho /*******************************************************************************
    618       1.1    jruoho  *
    619       1.1    jruoho  * HPET - High Precision Event Timer table
    620       1.1    jruoho  *        Version 1
    621       1.1    jruoho  *
    622       1.1    jruoho  * Conforms to "IA-PC HPET (High Precision Event Timers) Specification",
    623       1.1    jruoho  * Version 1.0a, October 2004
    624       1.1    jruoho  *
    625       1.1    jruoho  ******************************************************************************/
    626       1.1    jruoho 
    627       1.1    jruoho typedef struct acpi_table_hpet
    628       1.1    jruoho {
    629       1.1    jruoho     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    630       1.1    jruoho     UINT32                  Id;                 /* Hardware ID of event timer block */
    631       1.1    jruoho     ACPI_GENERIC_ADDRESS    Address;            /* Address of event timer block */
    632       1.1    jruoho     UINT8                   Sequence;           /* HPET sequence number */
    633       1.1    jruoho     UINT16                  MinimumTick;        /* Main counter min tick, periodic mode */
    634       1.1    jruoho     UINT8                   Flags;
    635       1.1    jruoho 
    636       1.1    jruoho } ACPI_TABLE_HPET;
    637       1.1    jruoho 
    638       1.1    jruoho /* Masks for Flags field above */
    639       1.1    jruoho 
    640       1.1    jruoho #define ACPI_HPET_PAGE_PROTECT_MASK (3)
    641       1.1    jruoho 
    642       1.1    jruoho /* Values for Page Protect flags */
    643       1.1    jruoho 
    644       1.1    jruoho enum AcpiHpetPageProtect
    645       1.1    jruoho {
    646       1.1    jruoho     ACPI_HPET_NO_PAGE_PROTECT       = 0,
    647       1.1    jruoho     ACPI_HPET_PAGE_PROTECT4         = 1,
    648       1.1    jruoho     ACPI_HPET_PAGE_PROTECT64        = 2
    649       1.1    jruoho };
    650       1.1    jruoho 
    651       1.1    jruoho 
    652       1.1    jruoho /*******************************************************************************
    653       1.1    jruoho  *
    654       1.1    jruoho  * IBFT - Boot Firmware Table
    655       1.1    jruoho  *        Version 1
    656       1.1    jruoho  *
    657       1.1    jruoho  * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b
    658       1.1    jruoho  * Specification", Version 1.01, March 1, 2007
    659       1.1    jruoho  *
    660       1.1    jruoho  * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
    661       1.1    jruoho  * Therefore, it is not currently supported by the disassembler.
    662       1.1    jruoho  *
    663       1.1    jruoho  ******************************************************************************/
    664       1.1    jruoho 
    665       1.1    jruoho typedef struct acpi_table_ibft
    666       1.1    jruoho {
    667       1.1    jruoho     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    668       1.1    jruoho     UINT8                   Reserved[12];
    669       1.1    jruoho 
    670       1.1    jruoho } ACPI_TABLE_IBFT;
    671       1.1    jruoho 
    672       1.1    jruoho 
    673       1.1    jruoho /* IBFT common subtable header */
    674       1.1    jruoho 
    675       1.1    jruoho typedef struct acpi_ibft_header
    676       1.1    jruoho {
    677       1.1    jruoho     UINT8                   Type;
    678       1.1    jruoho     UINT8                   Version;
    679       1.1    jruoho     UINT16                  Length;
    680       1.1    jruoho     UINT8                   Index;
    681       1.1    jruoho     UINT8                   Flags;
    682       1.1    jruoho 
    683       1.1    jruoho } ACPI_IBFT_HEADER;
    684       1.1    jruoho 
    685       1.1    jruoho /* Values for Type field above */
    686       1.1    jruoho 
    687       1.1    jruoho enum AcpiIbftType
    688       1.1    jruoho {
    689       1.1    jruoho     ACPI_IBFT_TYPE_NOT_USED         = 0,
    690       1.1    jruoho     ACPI_IBFT_TYPE_CONTROL          = 1,
    691       1.1    jruoho     ACPI_IBFT_TYPE_INITIATOR        = 2,
    692       1.1    jruoho     ACPI_IBFT_TYPE_NIC              = 3,
    693       1.1    jruoho     ACPI_IBFT_TYPE_TARGET           = 4,
    694       1.1    jruoho     ACPI_IBFT_TYPE_EXTENSIONS       = 5,
    695       1.1    jruoho     ACPI_IBFT_TYPE_RESERVED         = 6     /* 6 and greater are reserved */
    696       1.1    jruoho };
    697       1.1    jruoho 
    698       1.1    jruoho 
    699       1.1    jruoho /* IBFT subtables */
    700       1.1    jruoho 
    701       1.1    jruoho typedef struct acpi_ibft_control
    702       1.1    jruoho {
    703       1.1    jruoho     ACPI_IBFT_HEADER        Header;
    704       1.1    jruoho     UINT16                  Extensions;
    705       1.1    jruoho     UINT16                  InitiatorOffset;
    706       1.1    jruoho     UINT16                  Nic0Offset;
    707       1.1    jruoho     UINT16                  Target0Offset;
    708       1.1    jruoho     UINT16                  Nic1Offset;
    709       1.1    jruoho     UINT16                  Target1Offset;
    710       1.1    jruoho 
    711       1.1    jruoho } ACPI_IBFT_CONTROL;
    712       1.1    jruoho 
    713       1.1    jruoho typedef struct acpi_ibft_initiator
    714       1.1    jruoho {
    715       1.1    jruoho     ACPI_IBFT_HEADER        Header;
    716       1.1    jruoho     UINT8                   SnsServer[16];
    717       1.1    jruoho     UINT8                   SlpServer[16];
    718       1.1    jruoho     UINT8                   PrimaryServer[16];
    719       1.1    jruoho     UINT8                   SecondaryServer[16];
    720       1.1    jruoho     UINT16                  NameLength;
    721       1.1    jruoho     UINT16                  NameOffset;
    722       1.1    jruoho 
    723       1.1    jruoho } ACPI_IBFT_INITIATOR;
    724       1.1    jruoho 
    725       1.1    jruoho typedef struct acpi_ibft_nic
    726       1.1    jruoho {
    727       1.1    jruoho     ACPI_IBFT_HEADER        Header;
    728       1.1    jruoho     UINT8                   IpAddress[16];
    729       1.1    jruoho     UINT8                   SubnetMaskPrefix;
    730       1.1    jruoho     UINT8                   Origin;
    731       1.1    jruoho     UINT8                   Gateway[16];
    732       1.1    jruoho     UINT8                   PrimaryDns[16];
    733       1.1    jruoho     UINT8                   SecondaryDns[16];
    734       1.1    jruoho     UINT8                   Dhcp[16];
    735       1.1    jruoho     UINT16                  Vlan;
    736       1.1    jruoho     UINT8                   MacAddress[6];
    737       1.1    jruoho     UINT16                  PciAddress;
    738       1.1    jruoho     UINT16                  NameLength;
    739       1.1    jruoho     UINT16                  NameOffset;
    740       1.1    jruoho 
    741       1.1    jruoho } ACPI_IBFT_NIC;
    742       1.1    jruoho 
    743       1.1    jruoho typedef struct acpi_ibft_target
    744       1.1    jruoho {
    745       1.1    jruoho     ACPI_IBFT_HEADER        Header;
    746       1.1    jruoho     UINT8                   TargetIpAddress[16];
    747       1.1    jruoho     UINT16                  TargetIpSocket;
    748       1.1    jruoho     UINT8                   TargetBootLun[8];
    749       1.1    jruoho     UINT8                   ChapType;
    750       1.1    jruoho     UINT8                   NicAssociation;
    751       1.1    jruoho     UINT16                  TargetNameLength;
    752       1.1    jruoho     UINT16                  TargetNameOffset;
    753       1.1    jruoho     UINT16                  ChapNameLength;
    754       1.1    jruoho     UINT16                  ChapNameOffset;
    755       1.1    jruoho     UINT16                  ChapSecretLength;
    756       1.1    jruoho     UINT16                  ChapSecretOffset;
    757       1.1    jruoho     UINT16                  ReverseChapNameLength;
    758       1.1    jruoho     UINT16                  ReverseChapNameOffset;
    759       1.1    jruoho     UINT16                  ReverseChapSecretLength;
    760       1.1    jruoho     UINT16                  ReverseChapSecretOffset;
    761       1.1    jruoho 
    762       1.1    jruoho } ACPI_IBFT_TARGET;
    763       1.1    jruoho 
    764       1.1    jruoho 
    765       1.1    jruoho /*******************************************************************************
    766       1.1    jruoho  *
    767   1.1.1.7  christos  * IORT - IO Remapping Table
    768   1.1.1.7  christos  *
    769   1.1.1.7  christos  * Conforms to "IO Remapping Table System Software on ARM Platforms",
    770  1.1.1.12  christos  * Document number: ARM DEN 0049C, May 2017
    771   1.1.1.7  christos  *
    772   1.1.1.7  christos  ******************************************************************************/
    773   1.1.1.7  christos 
    774   1.1.1.7  christos typedef struct acpi_table_iort
    775   1.1.1.7  christos {
    776   1.1.1.7  christos     ACPI_TABLE_HEADER       Header;
    777   1.1.1.7  christos     UINT32                  NodeCount;
    778   1.1.1.7  christos     UINT32                  NodeOffset;
    779   1.1.1.7  christos     UINT32                  Reserved;
    780   1.1.1.7  christos 
    781   1.1.1.7  christos } ACPI_TABLE_IORT;
    782   1.1.1.7  christos 
    783   1.1.1.7  christos 
    784   1.1.1.7  christos /*
    785   1.1.1.7  christos  * IORT subtables
    786   1.1.1.7  christos  */
    787   1.1.1.7  christos typedef struct acpi_iort_node
    788   1.1.1.7  christos {
    789   1.1.1.7  christos     UINT8                   Type;
    790   1.1.1.7  christos     UINT16                  Length;
    791   1.1.1.7  christos     UINT8                   Revision;
    792   1.1.1.7  christos     UINT32                  Reserved;
    793   1.1.1.7  christos     UINT32                  MappingCount;
    794   1.1.1.7  christos     UINT32                  MappingOffset;
    795   1.1.1.7  christos     char                    NodeData[1];
    796   1.1.1.7  christos 
    797   1.1.1.7  christos } ACPI_IORT_NODE;
    798   1.1.1.7  christos 
    799   1.1.1.7  christos /* Values for subtable Type above */
    800   1.1.1.7  christos 
    801   1.1.1.7  christos enum AcpiIortNodeType
    802   1.1.1.7  christos {
    803   1.1.1.7  christos     ACPI_IORT_NODE_ITS_GROUP            = 0x00,
    804   1.1.1.7  christos     ACPI_IORT_NODE_NAMED_COMPONENT      = 0x01,
    805   1.1.1.7  christos     ACPI_IORT_NODE_PCI_ROOT_COMPLEX     = 0x02,
    806   1.1.1.9  christos     ACPI_IORT_NODE_SMMU                 = 0x03,
    807   1.1.1.9  christos     ACPI_IORT_NODE_SMMU_V3              = 0x04
    808   1.1.1.7  christos };
    809   1.1.1.7  christos 
    810   1.1.1.7  christos 
    811   1.1.1.7  christos typedef struct acpi_iort_id_mapping
    812   1.1.1.7  christos {
    813   1.1.1.7  christos     UINT32                  InputBase;          /* Lowest value in input range */
    814   1.1.1.7  christos     UINT32                  IdCount;            /* Number of IDs */
    815   1.1.1.7  christos     UINT32                  OutputBase;         /* Lowest value in output range */
    816   1.1.1.7  christos     UINT32                  OutputReference;    /* A reference to the output node */
    817   1.1.1.7  christos     UINT32                  Flags;
    818   1.1.1.7  christos 
    819   1.1.1.7  christos } ACPI_IORT_ID_MAPPING;
    820   1.1.1.7  christos 
    821   1.1.1.7  christos /* Masks for Flags field above for IORT subtable */
    822   1.1.1.7  christos 
    823   1.1.1.7  christos #define ACPI_IORT_ID_SINGLE_MAPPING (1)
    824   1.1.1.7  christos 
    825   1.1.1.7  christos 
    826   1.1.1.7  christos typedef struct acpi_iort_memory_access
    827   1.1.1.7  christos {
    828   1.1.1.7  christos     UINT32                  CacheCoherency;
    829   1.1.1.7  christos     UINT8                   Hints;
    830   1.1.1.7  christos     UINT16                  Reserved;
    831   1.1.1.7  christos     UINT8                   MemoryFlags;
    832   1.1.1.7  christos 
    833   1.1.1.7  christos } ACPI_IORT_MEMORY_ACCESS;
    834   1.1.1.7  christos 
    835   1.1.1.7  christos /* Values for CacheCoherency field above */
    836   1.1.1.7  christos 
    837   1.1.1.7  christos #define ACPI_IORT_NODE_COHERENT         0x00000001  /* The device node is fully coherent */
    838   1.1.1.7  christos #define ACPI_IORT_NODE_NOT_COHERENT     0x00000000  /* The device node is not coherent */
    839   1.1.1.7  christos 
    840   1.1.1.7  christos /* Masks for Hints field above */
    841   1.1.1.7  christos 
    842   1.1.1.7  christos #define ACPI_IORT_HT_TRANSIENT          (1)
    843   1.1.1.7  christos #define ACPI_IORT_HT_WRITE              (1<<1)
    844   1.1.1.7  christos #define ACPI_IORT_HT_READ               (1<<2)
    845   1.1.1.7  christos #define ACPI_IORT_HT_OVERRIDE           (1<<3)
    846   1.1.1.7  christos 
    847   1.1.1.7  christos /* Masks for MemoryFlags field above */
    848   1.1.1.7  christos 
    849   1.1.1.7  christos #define ACPI_IORT_MF_COHERENCY          (1)
    850   1.1.1.7  christos #define ACPI_IORT_MF_ATTRIBUTES         (1<<1)
    851   1.1.1.7  christos 
    852   1.1.1.7  christos 
    853   1.1.1.7  christos /*
    854   1.1.1.7  christos  * IORT node specific subtables
    855   1.1.1.7  christos  */
    856   1.1.1.7  christos typedef struct acpi_iort_its_group
    857   1.1.1.7  christos {
    858   1.1.1.7  christos     UINT32                  ItsCount;
    859   1.1.1.7  christos     UINT32                  Identifiers[1];         /* GIC ITS identifier arrary */
    860   1.1.1.7  christos 
    861   1.1.1.7  christos } ACPI_IORT_ITS_GROUP;
    862   1.1.1.7  christos 
    863   1.1.1.7  christos 
    864   1.1.1.7  christos typedef struct acpi_iort_named_component
    865   1.1.1.7  christos {
    866   1.1.1.7  christos     UINT32                  NodeFlags;
    867   1.1.1.7  christos     UINT64                  MemoryProperties;       /* Memory access properties */
    868   1.1.1.7  christos     UINT8                   MemoryAddressLimit;     /* Memory address size limit */
    869   1.1.1.7  christos     char                    DeviceName[1];          /* Path of namespace object */
    870   1.1.1.7  christos 
    871   1.1.1.7  christos } ACPI_IORT_NAMED_COMPONENT;
    872   1.1.1.7  christos 
    873   1.1.1.7  christos 
    874   1.1.1.7  christos typedef struct acpi_iort_root_complex
    875   1.1.1.7  christos {
    876   1.1.1.7  christos     UINT64                  MemoryProperties;       /* Memory access properties */
    877   1.1.1.7  christos     UINT32                  AtsAttribute;
    878   1.1.1.7  christos     UINT32                  PciSegmentNumber;
    879   1.1.1.7  christos 
    880   1.1.1.7  christos } ACPI_IORT_ROOT_COMPLEX;
    881   1.1.1.7  christos 
    882   1.1.1.7  christos /* Values for AtsAttribute field above */
    883   1.1.1.7  christos 
    884   1.1.1.7  christos #define ACPI_IORT_ATS_SUPPORTED         0x00000001  /* The root complex supports ATS */
    885   1.1.1.7  christos #define ACPI_IORT_ATS_UNSUPPORTED       0x00000000  /* The root complex doesn't support ATS */
    886   1.1.1.7  christos 
    887   1.1.1.7  christos 
    888   1.1.1.7  christos typedef struct acpi_iort_smmu
    889   1.1.1.7  christos {
    890   1.1.1.7  christos     UINT64                  BaseAddress;            /* SMMU base address */
    891   1.1.1.7  christos     UINT64                  Span;                   /* Length of memory range */
    892   1.1.1.7  christos     UINT32                  Model;
    893   1.1.1.7  christos     UINT32                  Flags;
    894   1.1.1.7  christos     UINT32                  GlobalInterruptOffset;
    895   1.1.1.7  christos     UINT32                  ContextInterruptCount;
    896   1.1.1.7  christos     UINT32                  ContextInterruptOffset;
    897   1.1.1.7  christos     UINT32                  PmuInterruptCount;
    898   1.1.1.7  christos     UINT32                  PmuInterruptOffset;
    899   1.1.1.7  christos     UINT64                  Interrupts[1];          /* Interrupt array */
    900   1.1.1.7  christos 
    901   1.1.1.7  christos } ACPI_IORT_SMMU;
    902   1.1.1.7  christos 
    903   1.1.1.7  christos /* Values for Model field above */
    904   1.1.1.7  christos 
    905   1.1.1.7  christos #define ACPI_IORT_SMMU_V1               0x00000000  /* Generic SMMUv1 */
    906   1.1.1.7  christos #define ACPI_IORT_SMMU_V2               0x00000001  /* Generic SMMUv2 */
    907   1.1.1.7  christos #define ACPI_IORT_SMMU_CORELINK_MMU400  0x00000002  /* ARM Corelink MMU-400 */
    908   1.1.1.7  christos #define ACPI_IORT_SMMU_CORELINK_MMU500  0x00000003  /* ARM Corelink MMU-500 */
    909  1.1.1.12  christos #define ACPI_IORT_SMMU_CORELINK_MMU401  0x00000004  /* ARM Corelink MMU-401 */
    910  1.1.1.12  christos #define ACPI_IORT_SMMU_CAVIUM_THUNDERX  0x00000005  /* Cavium ThunderX SMMUv2 */
    911   1.1.1.7  christos 
    912   1.1.1.7  christos /* Masks for Flags field above */
    913   1.1.1.7  christos 
    914   1.1.1.7  christos #define ACPI_IORT_SMMU_DVM_SUPPORTED    (1)
    915   1.1.1.7  christos #define ACPI_IORT_SMMU_COHERENT_WALK    (1<<1)
    916   1.1.1.7  christos 
    917  1.1.1.11  christos /* Global interrupt format */
    918  1.1.1.11  christos 
    919  1.1.1.11  christos typedef struct acpi_iort_smmu_gsi
    920  1.1.1.11  christos {
    921  1.1.1.11  christos     UINT32                  NSgIrpt;
    922  1.1.1.11  christos     UINT32                  NSgIrptFlags;
    923  1.1.1.11  christos     UINT32                  NSgCfgIrpt;
    924  1.1.1.11  christos     UINT32                  NSgCfgIrptFlags;
    925  1.1.1.12  christos 
    926  1.1.1.11  christos } ACPI_IORT_SMMU_GSI;
    927  1.1.1.11  christos 
    928   1.1.1.7  christos 
    929   1.1.1.9  christos typedef struct acpi_iort_smmu_v3
    930   1.1.1.9  christos {
    931   1.1.1.9  christos     UINT64                  BaseAddress;            /* SMMUv3 base address */
    932   1.1.1.9  christos     UINT32                  Flags;
    933   1.1.1.9  christos     UINT32                  Reserved;
    934   1.1.1.9  christos     UINT64                  VatosAddress;
    935  1.1.1.12  christos     UINT32                  Model;
    936   1.1.1.9  christos     UINT32                  EventGsiv;
    937   1.1.1.9  christos     UINT32                  PriGsiv;
    938   1.1.1.9  christos     UINT32                  GerrGsiv;
    939   1.1.1.9  christos     UINT32                  SyncGsiv;
    940  1.1.1.12  christos     UINT8                   Pxm;
    941  1.1.1.12  christos     UINT8                   Reserved1;
    942  1.1.1.12  christos     UINT16                  Reserved2;
    943   1.1.1.9  christos 
    944   1.1.1.9  christos } ACPI_IORT_SMMU_V3;
    945   1.1.1.9  christos 
    946  1.1.1.12  christos /* Values for Model field above */
    947  1.1.1.12  christos 
    948  1.1.1.12  christos #define ACPI_IORT_SMMU_V3_GENERIC           0x00000000  /* Generic SMMUv3 */
    949  1.1.1.12  christos #define ACPI_IORT_SMMU_V3_HISILICON_HI161X  0x00000001  /* HiSilicon Hi161x SMMUv3 */
    950  1.1.1.12  christos #define ACPI_IORT_SMMU_V3_CAVIUM_CN99XX     0x00000002  /* Cavium CN99xx SMMUv3 */
    951  1.1.1.12  christos 
    952   1.1.1.9  christos /* Masks for Flags field above */
    953   1.1.1.9  christos 
    954   1.1.1.9  christos #define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE   (1)
    955   1.1.1.9  christos #define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE     (1<<1)
    956  1.1.1.12  christos #define ACPI_IORT_SMMU_V3_PXM_VALID         (1<<3)
    957   1.1.1.9  christos 
    958   1.1.1.9  christos 
    959   1.1.1.7  christos /*******************************************************************************
    960   1.1.1.7  christos  *
    961       1.1    jruoho  * IVRS - I/O Virtualization Reporting Structure
    962       1.1    jruoho  *        Version 1
    963       1.1    jruoho  *
    964       1.1    jruoho  * Conforms to "AMD I/O Virtualization Technology (IOMMU) Specification",
    965       1.1    jruoho  * Revision 1.26, February 2009.
    966       1.1    jruoho  *
    967       1.1    jruoho  ******************************************************************************/
    968       1.1    jruoho 
    969       1.1    jruoho typedef struct acpi_table_ivrs
    970       1.1    jruoho {
    971       1.1    jruoho     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    972       1.1    jruoho     UINT32                  Info;               /* Common virtualization info */
    973       1.1    jruoho     UINT64                  Reserved;
    974       1.1    jruoho 
    975       1.1    jruoho } ACPI_TABLE_IVRS;
    976       1.1    jruoho 
    977       1.1    jruoho /* Values for Info field above */
    978       1.1    jruoho 
    979       1.1    jruoho #define ACPI_IVRS_PHYSICAL_SIZE     0x00007F00  /* 7 bits, physical address size */
    980       1.1    jruoho #define ACPI_IVRS_VIRTUAL_SIZE      0x003F8000  /* 7 bits, virtual address size */
    981       1.1    jruoho #define ACPI_IVRS_ATS_RESERVED      0x00400000  /* ATS address translation range reserved */
    982       1.1    jruoho 
    983       1.1    jruoho 
    984       1.1    jruoho /* IVRS subtable header */
    985       1.1    jruoho 
    986       1.1    jruoho typedef struct acpi_ivrs_header
    987       1.1    jruoho {
    988       1.1    jruoho     UINT8                   Type;               /* Subtable type */
    989       1.1    jruoho     UINT8                   Flags;
    990       1.1    jruoho     UINT16                  Length;             /* Subtable length */
    991       1.1    jruoho     UINT16                  DeviceId;           /* ID of IOMMU */
    992       1.1    jruoho 
    993       1.1    jruoho } ACPI_IVRS_HEADER;
    994       1.1    jruoho 
    995       1.1    jruoho /* Values for subtable Type above */
    996       1.1    jruoho 
    997       1.1    jruoho enum AcpiIvrsType
    998       1.1    jruoho {
    999       1.1    jruoho     ACPI_IVRS_TYPE_HARDWARE         = 0x10,
   1000       1.1    jruoho     ACPI_IVRS_TYPE_MEMORY1          = 0x20,
   1001       1.1    jruoho     ACPI_IVRS_TYPE_MEMORY2          = 0x21,
   1002       1.1    jruoho     ACPI_IVRS_TYPE_MEMORY3          = 0x22
   1003       1.1    jruoho };
   1004       1.1    jruoho 
   1005       1.1    jruoho /* Masks for Flags field above for IVHD subtable */
   1006       1.1    jruoho 
   1007       1.1    jruoho #define ACPI_IVHD_TT_ENABLE         (1)
   1008       1.1    jruoho #define ACPI_IVHD_PASS_PW           (1<<1)
   1009       1.1    jruoho #define ACPI_IVHD_RES_PASS_PW       (1<<2)
   1010       1.1    jruoho #define ACPI_IVHD_ISOC              (1<<3)
   1011       1.1    jruoho #define ACPI_IVHD_IOTLB             (1<<4)
   1012       1.1    jruoho 
   1013       1.1    jruoho /* Masks for Flags field above for IVMD subtable */
   1014       1.1    jruoho 
   1015       1.1    jruoho #define ACPI_IVMD_UNITY             (1)
   1016       1.1    jruoho #define ACPI_IVMD_READ              (1<<1)
   1017       1.1    jruoho #define ACPI_IVMD_WRITE             (1<<2)
   1018       1.1    jruoho #define ACPI_IVMD_EXCLUSION_RANGE   (1<<3)
   1019       1.1    jruoho 
   1020       1.1    jruoho 
   1021       1.1    jruoho /*
   1022       1.1    jruoho  * IVRS subtables, correspond to Type in ACPI_IVRS_HEADER
   1023       1.1    jruoho  */
   1024       1.1    jruoho 
   1025       1.1    jruoho /* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */
   1026       1.1    jruoho 
   1027       1.1    jruoho typedef struct acpi_ivrs_hardware
   1028       1.1    jruoho {
   1029       1.1    jruoho     ACPI_IVRS_HEADER        Header;
   1030       1.1    jruoho     UINT16                  CapabilityOffset;   /* Offset for IOMMU control fields */
   1031       1.1    jruoho     UINT64                  BaseAddress;        /* IOMMU control registers */
   1032       1.1    jruoho     UINT16                  PciSegmentGroup;
   1033       1.1    jruoho     UINT16                  Info;               /* MSI number and unit ID */
   1034       1.1    jruoho     UINT32                  Reserved;
   1035       1.1    jruoho 
   1036       1.1    jruoho } ACPI_IVRS_HARDWARE;
   1037       1.1    jruoho 
   1038       1.1    jruoho /* Masks for Info field above */
   1039       1.1    jruoho 
   1040       1.1    jruoho #define ACPI_IVHD_MSI_NUMBER_MASK   0x001F      /* 5 bits, MSI message number */
   1041       1.1    jruoho #define ACPI_IVHD_UNIT_ID_MASK      0x1F00      /* 5 bits, UnitID */
   1042       1.1    jruoho 
   1043       1.1    jruoho 
   1044       1.1    jruoho /*
   1045       1.1    jruoho  * Device Entries for IVHD subtable, appear after ACPI_IVRS_HARDWARE structure.
   1046       1.1    jruoho  * Upper two bits of the Type field are the (encoded) length of the structure.
   1047       1.1    jruoho  * Currently, only 4 and 8 byte entries are defined. 16 and 32 byte entries
   1048       1.1    jruoho  * are reserved for future use but not defined.
   1049       1.1    jruoho  */
   1050       1.1    jruoho typedef struct acpi_ivrs_de_header
   1051       1.1    jruoho {
   1052       1.1    jruoho     UINT8                   Type;
   1053       1.1    jruoho     UINT16                  Id;
   1054       1.1    jruoho     UINT8                   DataSetting;
   1055       1.1    jruoho 
   1056       1.1    jruoho } ACPI_IVRS_DE_HEADER;
   1057       1.1    jruoho 
   1058       1.1    jruoho /* Length of device entry is in the top two bits of Type field above */
   1059       1.1    jruoho 
   1060       1.1    jruoho #define ACPI_IVHD_ENTRY_LENGTH      0xC0
   1061       1.1    jruoho 
   1062       1.1    jruoho /* Values for device entry Type field above */
   1063       1.1    jruoho 
   1064       1.1    jruoho enum AcpiIvrsDeviceEntryType
   1065       1.1    jruoho {
   1066       1.1    jruoho     /* 4-byte device entries, all use ACPI_IVRS_DEVICE4 */
   1067       1.1    jruoho 
   1068       1.1    jruoho     ACPI_IVRS_TYPE_PAD4             = 0,
   1069       1.1    jruoho     ACPI_IVRS_TYPE_ALL              = 1,
   1070       1.1    jruoho     ACPI_IVRS_TYPE_SELECT           = 2,
   1071       1.1    jruoho     ACPI_IVRS_TYPE_START            = 3,
   1072       1.1    jruoho     ACPI_IVRS_TYPE_END              = 4,
   1073       1.1    jruoho 
   1074       1.1    jruoho     /* 8-byte device entries */
   1075       1.1    jruoho 
   1076       1.1    jruoho     ACPI_IVRS_TYPE_PAD8             = 64,
   1077       1.1    jruoho     ACPI_IVRS_TYPE_NOT_USED         = 65,
   1078       1.1    jruoho     ACPI_IVRS_TYPE_ALIAS_SELECT     = 66, /* Uses ACPI_IVRS_DEVICE8A */
   1079       1.1    jruoho     ACPI_IVRS_TYPE_ALIAS_START      = 67, /* Uses ACPI_IVRS_DEVICE8A */
   1080       1.1    jruoho     ACPI_IVRS_TYPE_EXT_SELECT       = 70, /* Uses ACPI_IVRS_DEVICE8B */
   1081       1.1    jruoho     ACPI_IVRS_TYPE_EXT_START        = 71, /* Uses ACPI_IVRS_DEVICE8B */
   1082       1.1    jruoho     ACPI_IVRS_TYPE_SPECIAL          = 72  /* Uses ACPI_IVRS_DEVICE8C */
   1083       1.1    jruoho };
   1084       1.1    jruoho 
   1085       1.1    jruoho /* Values for Data field above */
   1086       1.1    jruoho 
   1087       1.1    jruoho #define ACPI_IVHD_INIT_PASS         (1)
   1088       1.1    jruoho #define ACPI_IVHD_EINT_PASS         (1<<1)
   1089       1.1    jruoho #define ACPI_IVHD_NMI_PASS          (1<<2)
   1090       1.1    jruoho #define ACPI_IVHD_SYSTEM_MGMT       (3<<4)
   1091       1.1    jruoho #define ACPI_IVHD_LINT0_PASS        (1<<6)
   1092       1.1    jruoho #define ACPI_IVHD_LINT1_PASS        (1<<7)
   1093       1.1    jruoho 
   1094       1.1    jruoho 
   1095       1.1    jruoho /* Types 0-4: 4-byte device entry */
   1096       1.1    jruoho 
   1097       1.1    jruoho typedef struct acpi_ivrs_device4
   1098       1.1    jruoho {
   1099       1.1    jruoho     ACPI_IVRS_DE_HEADER     Header;
   1100       1.1    jruoho 
   1101       1.1    jruoho } ACPI_IVRS_DEVICE4;
   1102       1.1    jruoho 
   1103       1.1    jruoho /* Types 66-67: 8-byte device entry */
   1104       1.1    jruoho 
   1105       1.1    jruoho typedef struct acpi_ivrs_device8a
   1106       1.1    jruoho {
   1107       1.1    jruoho     ACPI_IVRS_DE_HEADER     Header;
   1108       1.1    jruoho     UINT8                   Reserved1;
   1109       1.1    jruoho     UINT16                  UsedId;
   1110       1.1    jruoho     UINT8                   Reserved2;
   1111       1.1    jruoho 
   1112       1.1    jruoho } ACPI_IVRS_DEVICE8A;
   1113       1.1    jruoho 
   1114       1.1    jruoho /* Types 70-71: 8-byte device entry */
   1115       1.1    jruoho 
   1116       1.1    jruoho typedef struct acpi_ivrs_device8b
   1117       1.1    jruoho {
   1118       1.1    jruoho     ACPI_IVRS_DE_HEADER     Header;
   1119       1.1    jruoho     UINT32                  ExtendedData;
   1120       1.1    jruoho 
   1121       1.1    jruoho } ACPI_IVRS_DEVICE8B;
   1122       1.1    jruoho 
   1123       1.1    jruoho /* Values for ExtendedData above */
   1124       1.1    jruoho 
   1125       1.1    jruoho #define ACPI_IVHD_ATS_DISABLED      (1<<31)
   1126       1.1    jruoho 
   1127       1.1    jruoho /* Type 72: 8-byte device entry */
   1128       1.1    jruoho 
   1129       1.1    jruoho typedef struct acpi_ivrs_device8c
   1130       1.1    jruoho {
   1131       1.1    jruoho     ACPI_IVRS_DE_HEADER     Header;
   1132       1.1    jruoho     UINT8                   Handle;
   1133       1.1    jruoho     UINT16                  UsedId;
   1134       1.1    jruoho     UINT8                   Variety;
   1135       1.1    jruoho 
   1136       1.1    jruoho } ACPI_IVRS_DEVICE8C;
   1137       1.1    jruoho 
   1138       1.1    jruoho /* Values for Variety field above */
   1139       1.1    jruoho 
   1140       1.1    jruoho #define ACPI_IVHD_IOAPIC            1
   1141       1.1    jruoho #define ACPI_IVHD_HPET              2
   1142       1.1    jruoho 
   1143       1.1    jruoho 
   1144       1.1    jruoho /* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */
   1145       1.1    jruoho 
   1146       1.1    jruoho typedef struct acpi_ivrs_memory
   1147       1.1    jruoho {
   1148       1.1    jruoho     ACPI_IVRS_HEADER        Header;
   1149       1.1    jruoho     UINT16                  AuxData;
   1150       1.1    jruoho     UINT64                  Reserved;
   1151       1.1    jruoho     UINT64                  StartAddress;
   1152       1.1    jruoho     UINT64                  MemoryLength;
   1153       1.1    jruoho 
   1154       1.1    jruoho } ACPI_IVRS_MEMORY;
   1155       1.1    jruoho 
   1156       1.1    jruoho 
   1157       1.1    jruoho /*******************************************************************************
   1158       1.1    jruoho  *
   1159   1.1.1.5  christos  * LPIT - Low Power Idle Table
   1160   1.1.1.5  christos  *
   1161   1.1.1.7  christos  * Conforms to "ACPI Low Power Idle Table (LPIT)" July 2014.
   1162   1.1.1.5  christos  *
   1163   1.1.1.5  christos  ******************************************************************************/
   1164   1.1.1.5  christos 
   1165   1.1.1.5  christos typedef struct acpi_table_lpit
   1166   1.1.1.5  christos {
   1167   1.1.1.5  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1168   1.1.1.5  christos 
   1169   1.1.1.5  christos } ACPI_TABLE_LPIT;
   1170   1.1.1.5  christos 
   1171   1.1.1.5  christos 
   1172   1.1.1.5  christos /* LPIT subtable header */
   1173   1.1.1.5  christos 
   1174   1.1.1.5  christos typedef struct acpi_lpit_header
   1175   1.1.1.5  christos {
   1176   1.1.1.5  christos     UINT32                  Type;               /* Subtable type */
   1177   1.1.1.5  christos     UINT32                  Length;             /* Subtable length */
   1178   1.1.1.5  christos     UINT16                  UniqueId;
   1179   1.1.1.5  christos     UINT16                  Reserved;
   1180   1.1.1.5  christos     UINT32                  Flags;
   1181   1.1.1.5  christos 
   1182   1.1.1.5  christos } ACPI_LPIT_HEADER;
   1183   1.1.1.5  christos 
   1184   1.1.1.5  christos /* Values for subtable Type above */
   1185   1.1.1.5  christos 
   1186   1.1.1.5  christos enum AcpiLpitType
   1187   1.1.1.5  christos {
   1188   1.1.1.5  christos     ACPI_LPIT_TYPE_NATIVE_CSTATE    = 0x00,
   1189   1.1.1.7  christos     ACPI_LPIT_TYPE_RESERVED         = 0x01      /* 1 and above are reserved */
   1190   1.1.1.5  christos };
   1191   1.1.1.5  christos 
   1192   1.1.1.5  christos /* Masks for Flags field above  */
   1193   1.1.1.5  christos 
   1194   1.1.1.5  christos #define ACPI_LPIT_STATE_DISABLED    (1)
   1195   1.1.1.5  christos #define ACPI_LPIT_NO_COUNTER        (1<<1)
   1196   1.1.1.5  christos 
   1197   1.1.1.5  christos /*
   1198   1.1.1.5  christos  * LPIT subtables, correspond to Type in ACPI_LPIT_HEADER
   1199   1.1.1.5  christos  */
   1200   1.1.1.5  christos 
   1201   1.1.1.5  christos /* 0x00: Native C-state instruction based LPI structure */
   1202   1.1.1.5  christos 
   1203   1.1.1.5  christos typedef struct acpi_lpit_native
   1204   1.1.1.5  christos {
   1205   1.1.1.5  christos     ACPI_LPIT_HEADER        Header;
   1206   1.1.1.5  christos     ACPI_GENERIC_ADDRESS    EntryTrigger;
   1207   1.1.1.5  christos     UINT32                  Residency;
   1208   1.1.1.5  christos     UINT32                  Latency;
   1209   1.1.1.5  christos     ACPI_GENERIC_ADDRESS    ResidencyCounter;
   1210   1.1.1.5  christos     UINT64                  CounterFrequency;
   1211   1.1.1.5  christos 
   1212   1.1.1.5  christos } ACPI_LPIT_NATIVE;
   1213   1.1.1.5  christos 
   1214   1.1.1.5  christos 
   1215   1.1.1.5  christos /*******************************************************************************
   1216   1.1.1.5  christos  *
   1217   1.1.1.5  christos  * MCFG - PCI Memory Mapped Configuration table and subtable
   1218       1.1    jruoho  *        Version 1
   1219       1.1    jruoho  *
   1220       1.1    jruoho  * Conforms to "PCI Firmware Specification", Revision 3.0, June 20, 2005
   1221       1.1    jruoho  *
   1222       1.1    jruoho  ******************************************************************************/
   1223       1.1    jruoho 
   1224       1.1    jruoho typedef struct acpi_table_mcfg
   1225       1.1    jruoho {
   1226       1.1    jruoho     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1227       1.1    jruoho     UINT8                   Reserved[8];
   1228       1.1    jruoho 
   1229       1.1    jruoho } ACPI_TABLE_MCFG;
   1230       1.1    jruoho 
   1231       1.1    jruoho 
   1232       1.1    jruoho /* Subtable */
   1233       1.1    jruoho 
   1234       1.1    jruoho typedef struct acpi_mcfg_allocation
   1235       1.1    jruoho {
   1236       1.1    jruoho     UINT64                  Address;            /* Base address, processor-relative */
   1237       1.1    jruoho     UINT16                  PciSegment;         /* PCI segment group number */
   1238       1.1    jruoho     UINT8                   StartBusNumber;     /* Starting PCI Bus number */
   1239       1.1    jruoho     UINT8                   EndBusNumber;       /* Final PCI Bus number */
   1240       1.1    jruoho     UINT32                  Reserved;
   1241       1.1    jruoho 
   1242       1.1    jruoho } ACPI_MCFG_ALLOCATION;
   1243       1.1    jruoho 
   1244       1.1    jruoho 
   1245       1.1    jruoho /*******************************************************************************
   1246       1.1    jruoho  *
   1247       1.1    jruoho  * MCHI - Management Controller Host Interface Table
   1248       1.1    jruoho  *        Version 1
   1249       1.1    jruoho  *
   1250       1.1    jruoho  * Conforms to "Management Component Transport Protocol (MCTP) Host
   1251       1.1    jruoho  * Interface Specification", Revision 1.0.0a, October 13, 2009
   1252       1.1    jruoho  *
   1253       1.1    jruoho  ******************************************************************************/
   1254       1.1    jruoho 
   1255       1.1    jruoho typedef struct acpi_table_mchi
   1256       1.1    jruoho {
   1257       1.1    jruoho     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1258       1.1    jruoho     UINT8                   InterfaceType;
   1259       1.1    jruoho     UINT8                   Protocol;
   1260       1.1    jruoho     UINT64                  ProtocolData;
   1261       1.1    jruoho     UINT8                   InterruptType;
   1262       1.1    jruoho     UINT8                   Gpe;
   1263       1.1    jruoho     UINT8                   PciDeviceFlag;
   1264       1.1    jruoho     UINT32                  GlobalInterrupt;
   1265       1.1    jruoho     ACPI_GENERIC_ADDRESS    ControlRegister;
   1266       1.1    jruoho     UINT8                   PciSegment;
   1267       1.1    jruoho     UINT8                   PciBus;
   1268       1.1    jruoho     UINT8                   PciDevice;
   1269       1.1    jruoho     UINT8                   PciFunction;
   1270       1.1    jruoho 
   1271       1.1    jruoho } ACPI_TABLE_MCHI;
   1272       1.1    jruoho 
   1273       1.1    jruoho 
   1274       1.1    jruoho /*******************************************************************************
   1275       1.1    jruoho  *
   1276   1.1.1.6  christos  * MSDM - Microsoft Data Management table
   1277   1.1.1.6  christos  *
   1278   1.1.1.6  christos  * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
   1279   1.1.1.6  christos  * November 29, 2011. Copyright 2011 Microsoft
   1280   1.1.1.6  christos  *
   1281   1.1.1.6  christos  ******************************************************************************/
   1282   1.1.1.6  christos 
   1283   1.1.1.6  christos /* Basic MSDM table is only the common ACPI header */
   1284   1.1.1.6  christos 
   1285   1.1.1.6  christos typedef struct acpi_table_msdm
   1286   1.1.1.6  christos {
   1287   1.1.1.6  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1288   1.1.1.6  christos 
   1289   1.1.1.6  christos } ACPI_TABLE_MSDM;
   1290   1.1.1.6  christos 
   1291   1.1.1.6  christos 
   1292   1.1.1.6  christos /*******************************************************************************
   1293   1.1.1.6  christos  *
   1294   1.1.1.4  christos  * MTMR - MID Timer Table
   1295   1.1.1.4  christos  *        Version 1
   1296   1.1.1.4  christos  *
   1297   1.1.1.4  christos  * Conforms to "Simple Firmware Interface Specification",
   1298   1.1.1.4  christos  * Draft 0.8.2, Oct 19, 2010
   1299   1.1.1.4  christos  * NOTE: The ACPI MTMR is equivalent to the SFI MTMR table.
   1300   1.1.1.4  christos  *
   1301   1.1.1.4  christos  ******************************************************************************/
   1302   1.1.1.4  christos 
   1303   1.1.1.4  christos typedef struct acpi_table_mtmr
   1304   1.1.1.4  christos {
   1305   1.1.1.4  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1306   1.1.1.4  christos 
   1307   1.1.1.4  christos } ACPI_TABLE_MTMR;
   1308   1.1.1.4  christos 
   1309   1.1.1.4  christos /* MTMR entry */
   1310   1.1.1.4  christos 
   1311   1.1.1.4  christos typedef struct acpi_mtmr_entry
   1312   1.1.1.4  christos {
   1313   1.1.1.4  christos     ACPI_GENERIC_ADDRESS    PhysicalAddress;
   1314   1.1.1.4  christos     UINT32                  Frequency;
   1315   1.1.1.4  christos     UINT32                  Irq;
   1316   1.1.1.4  christos 
   1317   1.1.1.4  christos } ACPI_MTMR_ENTRY;
   1318   1.1.1.4  christos 
   1319  1.1.1.12  christos /*******************************************************************************
   1320  1.1.1.12  christos  *
   1321  1.1.1.12  christos  * SDEI - Software Delegated Exception Interface Descriptor Table
   1322  1.1.1.12  christos  *
   1323  1.1.1.12  christos  * Conforms to "Software Delegated Exception Interface (SDEI)" ARM DEN0054A,
   1324  1.1.1.12  christos  * May 8th, 2017. Copyright 2017 ARM Ltd.
   1325  1.1.1.12  christos  *
   1326  1.1.1.12  christos  ******************************************************************************/
   1327  1.1.1.12  christos 
   1328  1.1.1.12  christos typedef struct acpi_table_sdei
   1329  1.1.1.12  christos {
   1330  1.1.1.12  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1331  1.1.1.12  christos 
   1332  1.1.1.12  christos } ACPI_TABLE_SDEI;
   1333  1.1.1.12  christos 
   1334   1.1.1.4  christos 
   1335   1.1.1.4  christos /*******************************************************************************
   1336   1.1.1.4  christos  *
   1337   1.1.1.3    jruoho  * SLIC - Software Licensing Description Table
   1338   1.1.1.3    jruoho  *
   1339   1.1.1.6  christos  * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
   1340   1.1.1.6  christos  * November 29, 2011. Copyright 2011 Microsoft
   1341   1.1.1.3    jruoho  *
   1342   1.1.1.3    jruoho  ******************************************************************************/
   1343   1.1.1.3    jruoho 
   1344   1.1.1.3    jruoho /* Basic SLIC table is only the common ACPI header */
   1345   1.1.1.3    jruoho 
   1346   1.1.1.3    jruoho typedef struct acpi_table_slic
   1347   1.1.1.3    jruoho {
   1348   1.1.1.3    jruoho     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1349   1.1.1.3    jruoho 
   1350   1.1.1.3    jruoho } ACPI_TABLE_SLIC;
   1351   1.1.1.3    jruoho 
   1352   1.1.1.3    jruoho 
   1353   1.1.1.3    jruoho /*******************************************************************************
   1354   1.1.1.3    jruoho  *
   1355       1.1    jruoho  * SPCR - Serial Port Console Redirection table
   1356   1.1.1.9  christos  *        Version 2
   1357       1.1    jruoho  *
   1358       1.1    jruoho  * Conforms to "Serial Port Console Redirection Table",
   1359   1.1.1.9  christos  * Version 1.03, August 10, 2015
   1360       1.1    jruoho  *
   1361       1.1    jruoho  ******************************************************************************/
   1362       1.1    jruoho 
   1363       1.1    jruoho typedef struct acpi_table_spcr
   1364       1.1    jruoho {
   1365       1.1    jruoho     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1366       1.1    jruoho     UINT8                   InterfaceType;      /* 0=full 16550, 1=subset of 16550 */
   1367       1.1    jruoho     UINT8                   Reserved[3];
   1368       1.1    jruoho     ACPI_GENERIC_ADDRESS    SerialPort;
   1369       1.1    jruoho     UINT8                   InterruptType;
   1370       1.1    jruoho     UINT8                   PcInterrupt;
   1371       1.1    jruoho     UINT32                  Interrupt;
   1372       1.1    jruoho     UINT8                   BaudRate;
   1373       1.1    jruoho     UINT8                   Parity;
   1374       1.1    jruoho     UINT8                   StopBits;
   1375       1.1    jruoho     UINT8                   FlowControl;
   1376       1.1    jruoho     UINT8                   TerminalType;
   1377       1.1    jruoho     UINT8                   Reserved1;
   1378       1.1    jruoho     UINT16                  PciDeviceId;
   1379       1.1    jruoho     UINT16                  PciVendorId;
   1380       1.1    jruoho     UINT8                   PciBus;
   1381       1.1    jruoho     UINT8                   PciDevice;
   1382       1.1    jruoho     UINT8                   PciFunction;
   1383       1.1    jruoho     UINT32                  PciFlags;
   1384       1.1    jruoho     UINT8                   PciSegment;
   1385       1.1    jruoho     UINT32                  Reserved2;
   1386       1.1    jruoho 
   1387       1.1    jruoho } ACPI_TABLE_SPCR;
   1388       1.1    jruoho 
   1389       1.1    jruoho /* Masks for PciFlags field above */
   1390       1.1    jruoho 
   1391       1.1    jruoho #define ACPI_SPCR_DO_NOT_DISABLE    (1)
   1392       1.1    jruoho 
   1393   1.1.1.9  christos /* Values for Interface Type: See the definition of the DBG2 table */
   1394   1.1.1.9  christos 
   1395       1.1    jruoho 
   1396       1.1    jruoho /*******************************************************************************
   1397       1.1    jruoho  *
   1398       1.1    jruoho  * SPMI - Server Platform Management Interface table
   1399       1.1    jruoho  *        Version 5
   1400       1.1    jruoho  *
   1401       1.1    jruoho  * Conforms to "Intelligent Platform Management Interface Specification
   1402       1.1    jruoho  * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with
   1403       1.1    jruoho  * June 12, 2009 markup.
   1404       1.1    jruoho  *
   1405       1.1    jruoho  ******************************************************************************/
   1406       1.1    jruoho 
   1407       1.1    jruoho typedef struct acpi_table_spmi
   1408       1.1    jruoho {
   1409       1.1    jruoho     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1410       1.1    jruoho     UINT8                   InterfaceType;
   1411       1.1    jruoho     UINT8                   Reserved;           /* Must be 1 */
   1412       1.1    jruoho     UINT16                  SpecRevision;       /* Version of IPMI */
   1413       1.1    jruoho     UINT8                   InterruptType;
   1414       1.1    jruoho     UINT8                   GpeNumber;          /* GPE assigned */
   1415       1.1    jruoho     UINT8                   Reserved1;
   1416       1.1    jruoho     UINT8                   PciDeviceFlag;
   1417       1.1    jruoho     UINT32                  Interrupt;
   1418       1.1    jruoho     ACPI_GENERIC_ADDRESS    IpmiRegister;
   1419       1.1    jruoho     UINT8                   PciSegment;
   1420       1.1    jruoho     UINT8                   PciBus;
   1421       1.1    jruoho     UINT8                   PciDevice;
   1422       1.1    jruoho     UINT8                   PciFunction;
   1423       1.1    jruoho     UINT8                   Reserved2;
   1424       1.1    jruoho 
   1425       1.1    jruoho } ACPI_TABLE_SPMI;
   1426       1.1    jruoho 
   1427       1.1    jruoho /* Values for InterfaceType above */
   1428       1.1    jruoho 
   1429       1.1    jruoho enum AcpiSpmiInterfaceTypes
   1430       1.1    jruoho {
   1431       1.1    jruoho     ACPI_SPMI_NOT_USED              = 0,
   1432       1.1    jruoho     ACPI_SPMI_KEYBOARD              = 1,
   1433       1.1    jruoho     ACPI_SPMI_SMI                   = 2,
   1434       1.1    jruoho     ACPI_SPMI_BLOCK_TRANSFER        = 3,
   1435       1.1    jruoho     ACPI_SPMI_SMBUS                 = 4,
   1436       1.1    jruoho     ACPI_SPMI_RESERVED              = 5         /* 5 and above are reserved */
   1437       1.1    jruoho };
   1438       1.1    jruoho 
   1439       1.1    jruoho 
   1440       1.1    jruoho /*******************************************************************************
   1441       1.1    jruoho  *
   1442       1.1    jruoho  * TCPA - Trusted Computing Platform Alliance table
   1443   1.1.1.7  christos  *        Version 2
   1444   1.1.1.7  christos  *
   1445   1.1.1.7  christos  * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
   1446  1.1.1.12  christos  * Version 1.2, Revision 8
   1447  1.1.1.12  christos  * February 27, 2017
   1448       1.1    jruoho  *
   1449   1.1.1.7  christos  * NOTE: There are two versions of the table with the same signature --
   1450   1.1.1.7  christos  * the client version and the server version. The common PlatformClass
   1451   1.1.1.7  christos  * field is used to differentiate the two types of tables.
   1452       1.1    jruoho  *
   1453       1.1    jruoho  ******************************************************************************/
   1454       1.1    jruoho 
   1455   1.1.1.7  christos typedef struct acpi_table_tcpa_hdr
   1456       1.1    jruoho {
   1457       1.1    jruoho     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1458   1.1.1.7  christos     UINT16                  PlatformClass;
   1459   1.1.1.7  christos 
   1460   1.1.1.7  christos } ACPI_TABLE_TCPA_HDR;
   1461   1.1.1.7  christos 
   1462   1.1.1.7  christos /*
   1463   1.1.1.7  christos  * Values for PlatformClass above.
   1464   1.1.1.7  christos  * This is how the client and server subtables are differentiated
   1465   1.1.1.7  christos  */
   1466   1.1.1.7  christos #define ACPI_TCPA_CLIENT_TABLE          0
   1467   1.1.1.7  christos #define ACPI_TCPA_SERVER_TABLE          1
   1468   1.1.1.7  christos 
   1469   1.1.1.7  christos 
   1470   1.1.1.7  christos typedef struct acpi_table_tcpa_client
   1471   1.1.1.7  christos {
   1472   1.1.1.7  christos     UINT32                  MinimumLogLength;   /* Minimum length for the event log area */
   1473   1.1.1.7  christos     UINT64                  LogAddress;         /* Address of the event log area */
   1474   1.1.1.7  christos 
   1475   1.1.1.7  christos } ACPI_TABLE_TCPA_CLIENT;
   1476   1.1.1.7  christos 
   1477   1.1.1.7  christos typedef struct acpi_table_tcpa_server
   1478   1.1.1.7  christos {
   1479       1.1    jruoho     UINT16                  Reserved;
   1480   1.1.1.7  christos     UINT64                  MinimumLogLength;   /* Minimum length for the event log area */
   1481       1.1    jruoho     UINT64                  LogAddress;         /* Address of the event log area */
   1482   1.1.1.7  christos     UINT16                  SpecRevision;
   1483   1.1.1.7  christos     UINT8                   DeviceFlags;
   1484   1.1.1.7  christos     UINT8                   InterruptFlags;
   1485   1.1.1.7  christos     UINT8                   GpeNumber;
   1486   1.1.1.7  christos     UINT8                   Reserved2[3];
   1487   1.1.1.7  christos     UINT32                  GlobalInterrupt;
   1488   1.1.1.7  christos     ACPI_GENERIC_ADDRESS    Address;
   1489   1.1.1.7  christos     UINT32                  Reserved3;
   1490   1.1.1.7  christos     ACPI_GENERIC_ADDRESS    ConfigAddress;
   1491   1.1.1.7  christos     UINT8                   Group;
   1492   1.1.1.7  christos     UINT8                   Bus;                /* PCI Bus/Segment/Function numbers */
   1493   1.1.1.7  christos     UINT8                   Device;
   1494   1.1.1.7  christos     UINT8                   Function;
   1495   1.1.1.7  christos 
   1496   1.1.1.7  christos } ACPI_TABLE_TCPA_SERVER;
   1497   1.1.1.7  christos 
   1498   1.1.1.7  christos /* Values for DeviceFlags above */
   1499   1.1.1.7  christos 
   1500   1.1.1.7  christos #define ACPI_TCPA_PCI_DEVICE            (1)
   1501   1.1.1.7  christos #define ACPI_TCPA_BUS_PNP               (1<<1)
   1502   1.1.1.7  christos #define ACPI_TCPA_ADDRESS_VALID         (1<<2)
   1503   1.1.1.7  christos 
   1504   1.1.1.7  christos /* Values for InterruptFlags above */
   1505   1.1.1.7  christos 
   1506   1.1.1.7  christos #define ACPI_TCPA_INTERRUPT_MODE        (1)
   1507   1.1.1.7  christos #define ACPI_TCPA_INTERRUPT_POLARITY    (1<<1)
   1508   1.1.1.7  christos #define ACPI_TCPA_SCI_VIA_GPE           (1<<2)
   1509   1.1.1.7  christos #define ACPI_TCPA_GLOBAL_INTERRUPT      (1<<3)
   1510   1.1.1.7  christos 
   1511   1.1.1.7  christos 
   1512   1.1.1.7  christos /*******************************************************************************
   1513   1.1.1.7  christos  *
   1514   1.1.1.7  christos  * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
   1515   1.1.1.7  christos  *        Version 4
   1516   1.1.1.7  christos  *
   1517   1.1.1.7  christos  * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
   1518  1.1.1.12  christos  * Version 1.2, Revision 8
   1519  1.1.1.12  christos  * February 27, 2017
   1520   1.1.1.7  christos  *
   1521   1.1.1.7  christos  ******************************************************************************/
   1522   1.1.1.7  christos 
   1523   1.1.1.7  christos typedef struct acpi_table_tpm2
   1524   1.1.1.7  christos {
   1525   1.1.1.7  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1526   1.1.1.7  christos     UINT16                  PlatformClass;
   1527   1.1.1.7  christos     UINT16                  Reserved;
   1528   1.1.1.7  christos     UINT64                  ControlAddress;
   1529   1.1.1.7  christos     UINT32                  StartMethod;
   1530   1.1.1.7  christos 
   1531   1.1.1.7  christos     /* Platform-specific data follows */
   1532   1.1.1.7  christos 
   1533   1.1.1.7  christos } ACPI_TABLE_TPM2;
   1534   1.1.1.7  christos 
   1535   1.1.1.7  christos /* Values for StartMethod above */
   1536       1.1    jruoho 
   1537   1.1.1.7  christos #define ACPI_TPM2_NOT_ALLOWED                       0
   1538   1.1.1.7  christos #define ACPI_TPM2_START_METHOD                      2
   1539   1.1.1.7  christos #define ACPI_TPM2_MEMORY_MAPPED                     6
   1540   1.1.1.7  christos #define ACPI_TPM2_COMMAND_BUFFER                    7
   1541   1.1.1.7  christos #define ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD  8
   1542  1.1.1.12  christos #define ACPI_TPM2_COMMAND_BUFFER_WITH_ARM_SMC       11  /* V1.2 Rev 8 */
   1543  1.1.1.12  christos 
   1544  1.1.1.12  christos 
   1545  1.1.1.12  christos /* Trailer appears after any StartMethod subtables */
   1546  1.1.1.12  christos 
   1547  1.1.1.12  christos typedef struct acpi_tpm2_trailer
   1548  1.1.1.12  christos {
   1549  1.1.1.12  christos     UINT32                  MinimumLogLength;   /* Minimum length for the event log area */
   1550  1.1.1.12  christos     UINT64                  LogAddress;         /* Address of the event log area */
   1551  1.1.1.12  christos 
   1552  1.1.1.12  christos } ACPI_TPM2_TRAILER;
   1553  1.1.1.12  christos 
   1554  1.1.1.12  christos 
   1555  1.1.1.12  christos /*
   1556  1.1.1.12  christos  * Subtables (StartMethod-specific)
   1557  1.1.1.12  christos  */
   1558  1.1.1.12  christos 
   1559  1.1.1.12  christos /* 11: Start Method for ARM SMC (V1.2 Rev 8) */
   1560  1.1.1.12  christos 
   1561  1.1.1.12  christos typedef struct acpi_tpm2_arm_smc
   1562  1.1.1.12  christos {
   1563  1.1.1.12  christos     UINT32                  GlobalInterrupt;
   1564  1.1.1.12  christos     UINT8                   InterruptFlags;
   1565  1.1.1.12  christos     UINT8                   OperationFlags;
   1566  1.1.1.12  christos     UINT16                  Reserved;
   1567  1.1.1.12  christos     UINT32                  FunctionId;
   1568  1.1.1.12  christos 
   1569  1.1.1.12  christos } ACPI_TPM2_ARM_SMC;
   1570  1.1.1.12  christos 
   1571  1.1.1.12  christos /* Values for InterruptFlags above */
   1572  1.1.1.12  christos 
   1573  1.1.1.12  christos #define ACPI_TPM2_INTERRUPT_SUPPORT     (1)
   1574  1.1.1.12  christos 
   1575  1.1.1.12  christos /* Values for OperationFlags above */
   1576  1.1.1.12  christos 
   1577  1.1.1.12  christos #define ACPI_TPM2_IDLE_SUPPORT          (1)
   1578       1.1    jruoho 
   1579       1.1    jruoho 
   1580       1.1    jruoho /*******************************************************************************
   1581       1.1    jruoho  *
   1582       1.1    jruoho  * UEFI - UEFI Boot optimization Table
   1583       1.1    jruoho  *        Version 1
   1584       1.1    jruoho  *
   1585       1.1    jruoho  * Conforms to "Unified Extensible Firmware Interface Specification",
   1586       1.1    jruoho  * Version 2.3, May 8, 2009
   1587       1.1    jruoho  *
   1588       1.1    jruoho  ******************************************************************************/
   1589       1.1    jruoho 
   1590       1.1    jruoho typedef struct acpi_table_uefi
   1591       1.1    jruoho {
   1592       1.1    jruoho     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1593       1.1    jruoho     UINT8                   Identifier[16];     /* UUID identifier */
   1594       1.1    jruoho     UINT16                  DataOffset;         /* Offset of remaining data in table */
   1595       1.1    jruoho 
   1596       1.1    jruoho } ACPI_TABLE_UEFI;
   1597       1.1    jruoho 
   1598       1.1    jruoho 
   1599       1.1    jruoho /*******************************************************************************
   1600       1.1    jruoho  *
   1601   1.1.1.4  christos  * VRTC - Virtual Real Time Clock Table
   1602   1.1.1.4  christos  *        Version 1
   1603   1.1.1.4  christos  *
   1604   1.1.1.4  christos  * Conforms to "Simple Firmware Interface Specification",
   1605   1.1.1.4  christos  * Draft 0.8.2, Oct 19, 2010
   1606   1.1.1.4  christos  * NOTE: The ACPI VRTC is equivalent to The SFI MRTC table.
   1607   1.1.1.4  christos  *
   1608   1.1.1.4  christos  ******************************************************************************/
   1609   1.1.1.4  christos 
   1610   1.1.1.4  christos typedef struct acpi_table_vrtc
   1611   1.1.1.4  christos {
   1612   1.1.1.4  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1613   1.1.1.4  christos 
   1614   1.1.1.4  christos } ACPI_TABLE_VRTC;
   1615   1.1.1.4  christos 
   1616   1.1.1.4  christos /* VRTC entry */
   1617   1.1.1.4  christos 
   1618   1.1.1.4  christos typedef struct acpi_vrtc_entry
   1619   1.1.1.4  christos {
   1620   1.1.1.4  christos     ACPI_GENERIC_ADDRESS    PhysicalAddress;
   1621   1.1.1.4  christos     UINT32                  Irq;
   1622   1.1.1.4  christos 
   1623   1.1.1.4  christos } ACPI_VRTC_ENTRY;
   1624   1.1.1.4  christos 
   1625   1.1.1.4  christos 
   1626   1.1.1.4  christos /*******************************************************************************
   1627   1.1.1.4  christos  *
   1628       1.1    jruoho  * WAET - Windows ACPI Emulated devices Table
   1629       1.1    jruoho  *        Version 1
   1630       1.1    jruoho  *
   1631       1.1    jruoho  * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009
   1632       1.1    jruoho  *
   1633       1.1    jruoho  ******************************************************************************/
   1634       1.1    jruoho 
   1635       1.1    jruoho typedef struct acpi_table_waet
   1636       1.1    jruoho {
   1637       1.1    jruoho     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1638       1.1    jruoho     UINT32                  Flags;
   1639       1.1    jruoho 
   1640       1.1    jruoho } ACPI_TABLE_WAET;
   1641       1.1    jruoho 
   1642       1.1    jruoho /* Masks for Flags field above */
   1643       1.1    jruoho 
   1644       1.1    jruoho #define ACPI_WAET_RTC_NO_ACK        (1)         /* RTC requires no int acknowledge */
   1645       1.1    jruoho #define ACPI_WAET_TIMER_ONE_READ    (1<<1)      /* PM timer requires only one read */
   1646       1.1    jruoho 
   1647       1.1    jruoho 
   1648       1.1    jruoho /*******************************************************************************
   1649       1.1    jruoho  *
   1650       1.1    jruoho  * WDAT - Watchdog Action Table
   1651       1.1    jruoho  *        Version 1
   1652       1.1    jruoho  *
   1653       1.1    jruoho  * Conforms to "Hardware Watchdog Timers Design Specification",
   1654       1.1    jruoho  * Copyright 2006 Microsoft Corporation.
   1655       1.1    jruoho  *
   1656       1.1    jruoho  ******************************************************************************/
   1657       1.1    jruoho 
   1658       1.1    jruoho typedef struct acpi_table_wdat
   1659       1.1    jruoho {
   1660       1.1    jruoho     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1661       1.1    jruoho     UINT32                  HeaderLength;       /* Watchdog Header Length */
   1662       1.1    jruoho     UINT16                  PciSegment;         /* PCI Segment number */
   1663       1.1    jruoho     UINT8                   PciBus;             /* PCI Bus number */
   1664       1.1    jruoho     UINT8                   PciDevice;          /* PCI Device number */
   1665       1.1    jruoho     UINT8                   PciFunction;        /* PCI Function number */
   1666       1.1    jruoho     UINT8                   Reserved[3];
   1667       1.1    jruoho     UINT32                  TimerPeriod;        /* Period of one timer count (msec) */
   1668       1.1    jruoho     UINT32                  MaxCount;           /* Maximum counter value supported */
   1669       1.1    jruoho     UINT32                  MinCount;           /* Minimum counter value */
   1670       1.1    jruoho     UINT8                   Flags;
   1671       1.1    jruoho     UINT8                   Reserved2[3];
   1672       1.1    jruoho     UINT32                  Entries;            /* Number of watchdog entries that follow */
   1673       1.1    jruoho 
   1674       1.1    jruoho } ACPI_TABLE_WDAT;
   1675       1.1    jruoho 
   1676       1.1    jruoho /* Masks for Flags field above */
   1677       1.1    jruoho 
   1678       1.1    jruoho #define ACPI_WDAT_ENABLED           (1)
   1679       1.1    jruoho #define ACPI_WDAT_STOPPED           0x80
   1680       1.1    jruoho 
   1681       1.1    jruoho 
   1682       1.1    jruoho /* WDAT Instruction Entries (actions) */
   1683       1.1    jruoho 
   1684       1.1    jruoho typedef struct acpi_wdat_entry
   1685       1.1    jruoho {
   1686       1.1    jruoho     UINT8                   Action;
   1687       1.1    jruoho     UINT8                   Instruction;
   1688       1.1    jruoho     UINT16                  Reserved;
   1689       1.1    jruoho     ACPI_GENERIC_ADDRESS    RegisterRegion;
   1690       1.1    jruoho     UINT32                  Value;              /* Value used with Read/Write register */
   1691       1.1    jruoho     UINT32                  Mask;               /* Bitmask required for this register instruction */
   1692       1.1    jruoho 
   1693       1.1    jruoho } ACPI_WDAT_ENTRY;
   1694       1.1    jruoho 
   1695       1.1    jruoho /* Values for Action field above */
   1696       1.1    jruoho 
   1697       1.1    jruoho enum AcpiWdatActions
   1698       1.1    jruoho {
   1699       1.1    jruoho     ACPI_WDAT_RESET                 = 1,
   1700       1.1    jruoho     ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
   1701       1.1    jruoho     ACPI_WDAT_GET_COUNTDOWN         = 5,
   1702       1.1    jruoho     ACPI_WDAT_SET_COUNTDOWN         = 6,
   1703       1.1    jruoho     ACPI_WDAT_GET_RUNNING_STATE     = 8,
   1704       1.1    jruoho     ACPI_WDAT_SET_RUNNING_STATE     = 9,
   1705       1.1    jruoho     ACPI_WDAT_GET_STOPPED_STATE     = 10,
   1706       1.1    jruoho     ACPI_WDAT_SET_STOPPED_STATE     = 11,
   1707       1.1    jruoho     ACPI_WDAT_GET_REBOOT            = 16,
   1708       1.1    jruoho     ACPI_WDAT_SET_REBOOT            = 17,
   1709       1.1    jruoho     ACPI_WDAT_GET_SHUTDOWN          = 18,
   1710       1.1    jruoho     ACPI_WDAT_SET_SHUTDOWN          = 19,
   1711       1.1    jruoho     ACPI_WDAT_GET_STATUS            = 32,
   1712       1.1    jruoho     ACPI_WDAT_SET_STATUS            = 33,
   1713       1.1    jruoho     ACPI_WDAT_ACTION_RESERVED       = 34    /* 34 and greater are reserved */
   1714       1.1    jruoho };
   1715       1.1    jruoho 
   1716       1.1    jruoho /* Values for Instruction field above */
   1717       1.1    jruoho 
   1718       1.1    jruoho enum AcpiWdatInstructions
   1719       1.1    jruoho {
   1720       1.1    jruoho     ACPI_WDAT_READ_VALUE            = 0,
   1721       1.1    jruoho     ACPI_WDAT_READ_COUNTDOWN        = 1,
   1722       1.1    jruoho     ACPI_WDAT_WRITE_VALUE           = 2,
   1723       1.1    jruoho     ACPI_WDAT_WRITE_COUNTDOWN       = 3,
   1724       1.1    jruoho     ACPI_WDAT_INSTRUCTION_RESERVED  = 4,    /* 4 and greater are reserved */
   1725       1.1    jruoho     ACPI_WDAT_PRESERVE_REGISTER     = 0x80  /* Except for this value */
   1726       1.1    jruoho };
   1727       1.1    jruoho 
   1728       1.1    jruoho 
   1729       1.1    jruoho /*******************************************************************************
   1730       1.1    jruoho  *
   1731   1.1.1.2    jruoho  * WDDT - Watchdog Descriptor Table
   1732   1.1.1.2    jruoho  *        Version 1
   1733   1.1.1.2    jruoho  *
   1734   1.1.1.2    jruoho  * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",
   1735   1.1.1.2    jruoho  * Version 001, September 2002
   1736   1.1.1.2    jruoho  *
   1737   1.1.1.2    jruoho  ******************************************************************************/
   1738   1.1.1.2    jruoho 
   1739   1.1.1.2    jruoho typedef struct acpi_table_wddt
   1740   1.1.1.2    jruoho {
   1741   1.1.1.2    jruoho     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1742   1.1.1.2    jruoho     UINT16                  SpecVersion;
   1743   1.1.1.2    jruoho     UINT16                  TableVersion;
   1744   1.1.1.2    jruoho     UINT16                  PciVendorId;
   1745   1.1.1.2    jruoho     ACPI_GENERIC_ADDRESS    Address;
   1746   1.1.1.2    jruoho     UINT16                  MaxCount;           /* Maximum counter value supported */
   1747   1.1.1.2    jruoho     UINT16                  MinCount;           /* Minimum counter value supported */
   1748   1.1.1.2    jruoho     UINT16                  Period;
   1749   1.1.1.2    jruoho     UINT16                  Status;
   1750   1.1.1.2    jruoho     UINT16                  Capability;
   1751   1.1.1.2    jruoho 
   1752   1.1.1.2    jruoho } ACPI_TABLE_WDDT;
   1753   1.1.1.2    jruoho 
   1754   1.1.1.2    jruoho /* Flags for Status field above */
   1755   1.1.1.2    jruoho 
   1756   1.1.1.2    jruoho #define ACPI_WDDT_AVAILABLE     (1)
   1757   1.1.1.2    jruoho #define ACPI_WDDT_ACTIVE        (1<<1)
   1758   1.1.1.2    jruoho #define ACPI_WDDT_TCO_OS_OWNED  (1<<2)
   1759   1.1.1.2    jruoho #define ACPI_WDDT_USER_RESET    (1<<11)
   1760   1.1.1.2    jruoho #define ACPI_WDDT_WDT_RESET     (1<<12)
   1761   1.1.1.2    jruoho #define ACPI_WDDT_POWER_FAIL    (1<<13)
   1762   1.1.1.2    jruoho #define ACPI_WDDT_UNKNOWN_RESET (1<<14)
   1763   1.1.1.2    jruoho 
   1764   1.1.1.2    jruoho /* Flags for Capability field above */
   1765   1.1.1.2    jruoho 
   1766   1.1.1.2    jruoho #define ACPI_WDDT_AUTO_RESET    (1)
   1767   1.1.1.2    jruoho #define ACPI_WDDT_ALERT_SUPPORT (1<<1)
   1768   1.1.1.2    jruoho 
   1769   1.1.1.2    jruoho 
   1770   1.1.1.2    jruoho /*******************************************************************************
   1771   1.1.1.2    jruoho  *
   1772       1.1    jruoho  * WDRT - Watchdog Resource Table
   1773       1.1    jruoho  *        Version 1
   1774       1.1    jruoho  *
   1775       1.1    jruoho  * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",
   1776       1.1    jruoho  * Version 1.01, August 28, 2006
   1777       1.1    jruoho  *
   1778       1.1    jruoho  ******************************************************************************/
   1779       1.1    jruoho 
   1780       1.1    jruoho typedef struct acpi_table_wdrt
   1781       1.1    jruoho {
   1782       1.1    jruoho     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1783       1.1    jruoho     ACPI_GENERIC_ADDRESS    ControlRegister;
   1784       1.1    jruoho     ACPI_GENERIC_ADDRESS    CountRegister;
   1785       1.1    jruoho     UINT16                  PciDeviceId;
   1786       1.1    jruoho     UINT16                  PciVendorId;
   1787       1.1    jruoho     UINT8                   PciBus;             /* PCI Bus number */
   1788       1.1    jruoho     UINT8                   PciDevice;          /* PCI Device number */
   1789       1.1    jruoho     UINT8                   PciFunction;        /* PCI Function number */
   1790       1.1    jruoho     UINT8                   PciSegment;         /* PCI Segment number */
   1791       1.1    jruoho     UINT16                  MaxCount;           /* Maximum counter value supported */
   1792       1.1    jruoho     UINT8                   Units;
   1793       1.1    jruoho 
   1794       1.1    jruoho } ACPI_TABLE_WDRT;
   1795       1.1    jruoho 
   1796       1.1    jruoho 
   1797  1.1.1.12  christos /*******************************************************************************
   1798  1.1.1.12  christos  *
   1799  1.1.1.12  christos  * WSMT - Windows SMM Security Migrations Table
   1800  1.1.1.12  christos  *        Version 1
   1801  1.1.1.12  christos  *
   1802  1.1.1.12  christos  * Conforms to "Windows SMM Security Migrations Table",
   1803  1.1.1.12  christos  * Version 1.0, April 18, 2016
   1804  1.1.1.12  christos  *
   1805  1.1.1.12  christos  ******************************************************************************/
   1806  1.1.1.12  christos 
   1807  1.1.1.12  christos typedef struct acpi_table_wsmt
   1808  1.1.1.12  christos {
   1809  1.1.1.12  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1810  1.1.1.12  christos     UINT32                  ProtectionFlags;
   1811  1.1.1.12  christos 
   1812  1.1.1.12  christos } ACPI_TABLE_WSMT;
   1813  1.1.1.12  christos 
   1814  1.1.1.12  christos /* Flags for ProtectionFlags field above */
   1815  1.1.1.12  christos 
   1816  1.1.1.12  christos #define ACPI_WSMT_FIXED_COMM_BUFFERS                (1)
   1817  1.1.1.12  christos #define ACPI_WSMT_COMM_BUFFER_NESTED_PTR_PROTECTION (2)
   1818  1.1.1.12  christos #define ACPI_WSMT_SYSTEM_RESOURCE_PROTECTION        (4)
   1819  1.1.1.12  christos 
   1820  1.1.1.12  christos 
   1821       1.1    jruoho /* Reset to default packing */
   1822       1.1    jruoho 
   1823       1.1    jruoho #pragma pack()
   1824       1.1    jruoho 
   1825       1.1    jruoho #endif /* __ACTBL2_H__ */
   1826