Home | History | Annotate | Line # | Download | only in include
actbl3.h revision 1.1.1.17
      1       1.1  christos /******************************************************************************
      2       1.1  christos  *
      3       1.1  christos  * Name: actbl3.h - ACPI Table Definitions
      4       1.1  christos  *
      5       1.1  christos  *****************************************************************************/
      6       1.1  christos 
      7       1.1  christos /*
      8  1.1.1.16  christos  * Copyright (C) 2000 - 2023, Intel Corp.
      9       1.1  christos  * All rights reserved.
     10       1.1  christos  *
     11       1.1  christos  * Redistribution and use in source and binary forms, with or without
     12       1.1  christos  * modification, are permitted provided that the following conditions
     13       1.1  christos  * are met:
     14       1.1  christos  * 1. Redistributions of source code must retain the above copyright
     15       1.1  christos  *    notice, this list of conditions, and the following disclaimer,
     16       1.1  christos  *    without modification.
     17       1.1  christos  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
     18       1.1  christos  *    substantially similar to the "NO WARRANTY" disclaimer below
     19       1.1  christos  *    ("Disclaimer") and any redistribution must be conditioned upon
     20       1.1  christos  *    including a substantially similar Disclaimer requirement for further
     21       1.1  christos  *    binary redistribution.
     22       1.1  christos  * 3. Neither the names of the above-listed copyright holders nor the names
     23       1.1  christos  *    of any contributors may be used to endorse or promote products derived
     24       1.1  christos  *    from this software without specific prior written permission.
     25       1.1  christos  *
     26       1.1  christos  * Alternatively, this software may be distributed under the terms of the
     27       1.1  christos  * GNU General Public License ("GPL") version 2 as published by the Free
     28       1.1  christos  * Software Foundation.
     29       1.1  christos  *
     30       1.1  christos  * NO WARRANTY
     31       1.1  christos  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     32       1.1  christos  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     33  1.1.1.13  christos  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     34       1.1  christos  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     35       1.1  christos  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     36       1.1  christos  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     37       1.1  christos  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     38       1.1  christos  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
     39       1.1  christos  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
     40       1.1  christos  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     41       1.1  christos  * POSSIBILITY OF SUCH DAMAGES.
     42       1.1  christos  */
     43       1.1  christos 
     44       1.1  christos #ifndef __ACTBL3_H__
     45       1.1  christos #define __ACTBL3_H__
     46       1.1  christos 
     47       1.1  christos 
     48       1.1  christos /*******************************************************************************
     49       1.1  christos  *
     50   1.1.1.9  christos  * Additional ACPI Tables
     51       1.1  christos  *
     52       1.1  christos  * These tables are not consumed directly by the ACPICA subsystem, but are
     53       1.1  christos  * included here to support device drivers and the AML disassembler.
     54       1.1  christos  *
     55       1.1  christos  ******************************************************************************/
     56       1.1  christos 
     57       1.1  christos 
     58       1.1  christos /*
     59       1.1  christos  * Values for description table header signatures for tables defined in this
     60       1.1  christos  * file. Useful because they make it more difficult to inadvertently type in
     61       1.1  christos  * the wrong signature.
     62       1.1  christos  */
     63   1.1.1.9  christos #define ACPI_SIG_SLIC           "SLIC"      /* Software Licensing Description Table */
     64   1.1.1.9  christos #define ACPI_SIG_SLIT           "SLIT"      /* System Locality Distance Information Table */
     65   1.1.1.9  christos #define ACPI_SIG_SPCR           "SPCR"      /* Serial Port Console Redirection table */
     66   1.1.1.9  christos #define ACPI_SIG_SPMI           "SPMI"      /* Server Platform Management Interface table */
     67   1.1.1.9  christos #define ACPI_SIG_SRAT           "SRAT"      /* System Resource Affinity Table */
     68   1.1.1.4  christos #define ACPI_SIG_STAO           "STAO"      /* Status Override table */
     69   1.1.1.9  christos #define ACPI_SIG_TCPA           "TCPA"      /* Trusted Computing Platform Alliance table */
     70   1.1.1.9  christos #define ACPI_SIG_TPM2           "TPM2"      /* Trusted Platform Module 2.0 H/W interface table */
     71   1.1.1.9  christos #define ACPI_SIG_UEFI           "UEFI"      /* Uefi Boot Optimization Table */
     72  1.1.1.13  christos #define ACPI_SIG_VIOT           "VIOT"      /* Virtual I/O Translation Table */
     73   1.1.1.9  christos #define ACPI_SIG_WAET           "WAET"      /* Windows ACPI Emulated devices Table */
     74   1.1.1.9  christos #define ACPI_SIG_WDAT           "WDAT"      /* Watchdog Action Table */
     75   1.1.1.9  christos #define ACPI_SIG_WDDT           "WDDT"      /* Watchdog Timer Description Table */
     76   1.1.1.9  christos #define ACPI_SIG_WDRT           "WDRT"      /* Watchdog Resource Table */
     77   1.1.1.4  christos #define ACPI_SIG_WPBT           "WPBT"      /* Windows Platform Binary Table */
     78  1.1.1.12  christos #define ACPI_SIG_WSMT           "WSMT"      /* Windows SMM Security Mitigations Table */
     79   1.1.1.4  christos #define ACPI_SIG_XENV           "XENV"      /* Xen Environment table */
     80   1.1.1.9  christos #define ACPI_SIG_XXXX           "XXXX"      /* Intermediate AML header for ASL/ASL+ converter */
     81       1.1  christos 
     82       1.1  christos /*
     83       1.1  christos  * All tables must be byte-packed to match the ACPI specification, since
     84       1.1  christos  * the tables are provided by the system BIOS.
     85       1.1  christos  */
     86       1.1  christos #pragma pack(1)
     87       1.1  christos 
     88       1.1  christos /*
     89       1.1  christos  * Note: C bitfields are not used for this reason:
     90       1.1  christos  *
     91       1.1  christos  * "Bitfields are great and easy to read, but unfortunately the C language
     92       1.1  christos  * does not specify the layout of bitfields in memory, which means they are
     93       1.1  christos  * essentially useless for dealing with packed data in on-disk formats or
     94       1.1  christos  * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
     95       1.1  christos  * this decision was a design error in C. Ritchie could have picked an order
     96       1.1  christos  * and stuck with it." Norman Ramsey.
     97       1.1  christos  * See http://stackoverflow.com/a/1053662/41661
     98       1.1  christos  */
     99       1.1  christos 
    100       1.1  christos 
    101       1.1  christos /*******************************************************************************
    102       1.1  christos  *
    103   1.1.1.9  christos  * SLIC - Software Licensing Description Table
    104   1.1.1.9  christos  *
    105   1.1.1.9  christos  * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
    106   1.1.1.9  christos  * November 29, 2011. Copyright 2011 Microsoft
    107       1.1  christos  *
    108       1.1  christos  ******************************************************************************/
    109       1.1  christos 
    110   1.1.1.9  christos /* Basic SLIC table is only the common ACPI header */
    111   1.1.1.9  christos 
    112   1.1.1.9  christos typedef struct acpi_table_slic
    113       1.1  christos {
    114       1.1  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    115   1.1.1.8  christos 
    116   1.1.1.9  christos } ACPI_TABLE_SLIC;
    117   1.1.1.8  christos 
    118       1.1  christos 
    119       1.1  christos /*******************************************************************************
    120       1.1  christos  *
    121   1.1.1.9  christos  * SLIT - System Locality Distance Information Table
    122   1.1.1.9  christos  *        Version 1
    123       1.1  christos  *
    124       1.1  christos  ******************************************************************************/
    125       1.1  christos 
    126   1.1.1.9  christos typedef struct acpi_table_slit
    127       1.1  christos {
    128       1.1  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    129   1.1.1.9  christos     UINT64                  LocalityCount;
    130   1.1.1.9  christos     UINT8                   Entry[1];           /* Real size = localities^2 */
    131       1.1  christos 
    132   1.1.1.9  christos } ACPI_TABLE_SLIT;
    133       1.1  christos 
    134       1.1  christos 
    135       1.1  christos /*******************************************************************************
    136       1.1  christos  *
    137   1.1.1.9  christos  * SPCR - Serial Port Console Redirection table
    138  1.1.1.17  christos  *        Version 4
    139   1.1.1.9  christos  *
    140   1.1.1.9  christos  * Conforms to "Serial Port Console Redirection Table",
    141  1.1.1.17  christos  * Version 1.10, Jan 5, 2023
    142       1.1  christos  *
    143       1.1  christos  ******************************************************************************/
    144       1.1  christos 
    145   1.1.1.9  christos typedef struct acpi_table_spcr
    146       1.1  christos {
    147       1.1  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    148   1.1.1.9  christos     UINT8                   InterfaceType;      /* 0=full 16550, 1=subset of 16550 */
    149   1.1.1.9  christos     UINT8                   Reserved[3];
    150   1.1.1.9  christos     ACPI_GENERIC_ADDRESS    SerialPort;
    151   1.1.1.9  christos     UINT8                   InterruptType;
    152   1.1.1.9  christos     UINT8                   PcInterrupt;
    153   1.1.1.9  christos     UINT32                  Interrupt;
    154   1.1.1.9  christos     UINT8                   BaudRate;
    155   1.1.1.9  christos     UINT8                   Parity;
    156   1.1.1.9  christos     UINT8                   StopBits;
    157   1.1.1.9  christos     UINT8                   FlowControl;
    158   1.1.1.9  christos     UINT8                   TerminalType;
    159  1.1.1.17  christos     UINT8                   Language;
    160   1.1.1.9  christos     UINT16                  PciDeviceId;
    161   1.1.1.9  christos     UINT16                  PciVendorId;
    162   1.1.1.9  christos     UINT8                   PciBus;
    163   1.1.1.9  christos     UINT8                   PciDevice;
    164   1.1.1.9  christos     UINT8                   PciFunction;
    165   1.1.1.9  christos     UINT32                  PciFlags;
    166   1.1.1.9  christos     UINT8                   PciSegment;
    167  1.1.1.17  christos     UINT32                  UartClkFreq;
    168  1.1.1.17  christos     UINT32                  PreciseBaudrate;
    169  1.1.1.17  christos     UINT16                  NameSpaceStringLength;
    170  1.1.1.17  christos     UINT16                  NameSpaceStringOffset;
    171  1.1.1.17  christos     char                    NameSpaceString[];
    172       1.1  christos 
    173   1.1.1.9  christos } ACPI_TABLE_SPCR;
    174       1.1  christos 
    175   1.1.1.9  christos /* Masks for PciFlags field above */
    176       1.1  christos 
    177   1.1.1.9  christos #define ACPI_SPCR_DO_NOT_DISABLE    (1)
    178       1.1  christos 
    179   1.1.1.9  christos /* Values for Interface Type: See the definition of the DBG2 table */
    180       1.1  christos 
    181       1.1  christos 
    182   1.1.1.9  christos /*******************************************************************************
    183   1.1.1.9  christos  *
    184   1.1.1.9  christos  * SPMI - Server Platform Management Interface table
    185   1.1.1.9  christos  *        Version 5
    186   1.1.1.9  christos  *
    187   1.1.1.9  christos  * Conforms to "Intelligent Platform Management Interface Specification
    188   1.1.1.9  christos  * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with
    189   1.1.1.9  christos  * June 12, 2009 markup.
    190   1.1.1.9  christos  *
    191   1.1.1.9  christos  ******************************************************************************/
    192       1.1  christos 
    193   1.1.1.9  christos typedef struct acpi_table_spmi
    194       1.1  christos {
    195   1.1.1.9  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    196   1.1.1.9  christos     UINT8                   InterfaceType;
    197   1.1.1.9  christos     UINT8                   Reserved;           /* Must be 1 */
    198   1.1.1.9  christos     UINT16                  SpecRevision;       /* Version of IPMI */
    199   1.1.1.9  christos     UINT8                   InterruptType;
    200   1.1.1.9  christos     UINT8                   GpeNumber;          /* GPE assigned */
    201   1.1.1.9  christos     UINT8                   Reserved1;
    202   1.1.1.9  christos     UINT8                   PciDeviceFlag;
    203   1.1.1.9  christos     UINT32                  Interrupt;
    204   1.1.1.9  christos     ACPI_GENERIC_ADDRESS    IpmiRegister;
    205   1.1.1.9  christos     UINT8                   PciSegment;
    206   1.1.1.9  christos     UINT8                   PciBus;
    207   1.1.1.9  christos     UINT8                   PciDevice;
    208   1.1.1.9  christos     UINT8                   PciFunction;
    209   1.1.1.9  christos     UINT8                   Reserved2;
    210   1.1.1.9  christos 
    211   1.1.1.9  christos } ACPI_TABLE_SPMI;
    212   1.1.1.9  christos 
    213   1.1.1.9  christos /* Values for InterfaceType above */
    214   1.1.1.9  christos 
    215   1.1.1.9  christos enum AcpiSpmiInterfaceTypes
    216   1.1.1.9  christos {
    217   1.1.1.9  christos     ACPI_SPMI_NOT_USED              = 0,
    218   1.1.1.9  christos     ACPI_SPMI_KEYBOARD              = 1,
    219   1.1.1.9  christos     ACPI_SPMI_SMI                   = 2,
    220   1.1.1.9  christos     ACPI_SPMI_BLOCK_TRANSFER        = 3,
    221   1.1.1.9  christos     ACPI_SPMI_SMBUS                 = 4,
    222   1.1.1.9  christos     ACPI_SPMI_RESERVED              = 5         /* 5 and above are reserved */
    223       1.1  christos };
    224       1.1  christos 
    225       1.1  christos 
    226   1.1.1.9  christos /*******************************************************************************
    227   1.1.1.9  christos  *
    228   1.1.1.9  christos  * SRAT - System Resource Affinity Table
    229   1.1.1.9  christos  *        Version 3
    230   1.1.1.9  christos  *
    231   1.1.1.9  christos  ******************************************************************************/
    232       1.1  christos 
    233   1.1.1.9  christos typedef struct acpi_table_srat
    234       1.1  christos {
    235   1.1.1.9  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    236   1.1.1.9  christos     UINT32                  TableRevision;      /* Must be value '1' */
    237   1.1.1.9  christos     UINT64                  Reserved;           /* Reserved, must be zero */
    238       1.1  christos 
    239   1.1.1.9  christos } ACPI_TABLE_SRAT;
    240       1.1  christos 
    241   1.1.1.9  christos /* Values for subtable type in ACPI_SUBTABLE_HEADER */
    242       1.1  christos 
    243   1.1.1.9  christos enum AcpiSratType
    244       1.1  christos {
    245   1.1.1.9  christos     ACPI_SRAT_TYPE_CPU_AFFINITY         = 0,
    246   1.1.1.9  christos     ACPI_SRAT_TYPE_MEMORY_AFFINITY      = 1,
    247   1.1.1.9  christos     ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY  = 2,
    248   1.1.1.9  christos     ACPI_SRAT_TYPE_GICC_AFFINITY        = 3,
    249  1.1.1.11  christos     ACPI_SRAT_TYPE_GIC_ITS_AFFINITY     = 4, /* ACPI 6.2 */
    250  1.1.1.11  christos     ACPI_SRAT_TYPE_GENERIC_AFFINITY     = 5, /* ACPI 6.3 */
    251  1.1.1.14  christos     ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY = 6, /* ACPI 6.4 */
    252  1.1.1.17  christos     ACPI_SRAT_TYPE_RINTC_AFFINITY        = 7, /* ACPI 6.6 */
    253  1.1.1.17  christos     ACPI_SRAT_TYPE_RESERVED              = 8  /* 8 and greater are reserved */
    254   1.1.1.9  christos };
    255       1.1  christos 
    256       1.1  christos /*
    257   1.1.1.9  christos  * SRAT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
    258       1.1  christos  */
    259       1.1  christos 
    260   1.1.1.9  christos /* 0: Processor Local APIC/SAPIC Affinity */
    261       1.1  christos 
    262   1.1.1.9  christos typedef struct acpi_srat_cpu_affinity
    263       1.1  christos {
    264   1.1.1.9  christos     ACPI_SUBTABLE_HEADER    Header;
    265   1.1.1.9  christos     UINT8                   ProximityDomainLo;
    266   1.1.1.9  christos     UINT8                   ApicId;
    267   1.1.1.9  christos     UINT32                  Flags;
    268   1.1.1.9  christos     UINT8                   LocalSapicEid;
    269   1.1.1.9  christos     UINT8                   ProximityDomainHi[3];
    270   1.1.1.9  christos     UINT32                  ClockDomain;
    271       1.1  christos 
    272   1.1.1.9  christos } ACPI_SRAT_CPU_AFFINITY;
    273       1.1  christos 
    274   1.1.1.9  christos /* Flags */
    275       1.1  christos 
    276   1.1.1.9  christos #define ACPI_SRAT_CPU_USE_AFFINITY  (1)         /* 00: Use affinity structure */
    277       1.1  christos 
    278       1.1  christos 
    279   1.1.1.9  christos /* 1: Memory Affinity */
    280       1.1  christos 
    281   1.1.1.9  christos typedef struct acpi_srat_mem_affinity
    282   1.1.1.6  christos {
    283   1.1.1.9  christos     ACPI_SUBTABLE_HEADER    Header;
    284   1.1.1.9  christos     UINT32                  ProximityDomain;
    285   1.1.1.9  christos     UINT16                  Reserved;           /* Reserved, must be zero */
    286   1.1.1.9  christos     UINT64                  BaseAddress;
    287   1.1.1.9  christos     UINT64                  Length;
    288   1.1.1.9  christos     UINT32                  Reserved1;
    289   1.1.1.9  christos     UINT32                  Flags;
    290   1.1.1.9  christos     UINT64                  Reserved2;          /* Reserved, must be zero */
    291   1.1.1.2  christos 
    292   1.1.1.9  christos } ACPI_SRAT_MEM_AFFINITY;
    293   1.1.1.2  christos 
    294   1.1.1.9  christos /* Flags */
    295   1.1.1.2  christos 
    296   1.1.1.9  christos #define ACPI_SRAT_MEM_ENABLED       (1)         /* 00: Use affinity structure */
    297   1.1.1.9  christos #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1)      /* 01: Memory region is hot pluggable */
    298   1.1.1.9  christos #define ACPI_SRAT_MEM_NON_VOLATILE  (1<<2)      /* 02: Memory region is non-volatile */
    299   1.1.1.2  christos 
    300   1.1.1.2  christos 
    301   1.1.1.9  christos /* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */
    302       1.1  christos 
    303   1.1.1.9  christos typedef struct acpi_srat_x2apic_cpu_affinity
    304   1.1.1.2  christos {
    305   1.1.1.9  christos     ACPI_SUBTABLE_HEADER    Header;
    306   1.1.1.9  christos     UINT16                  Reserved;           /* Reserved, must be zero */
    307   1.1.1.9  christos     UINT32                  ProximityDomain;
    308   1.1.1.9  christos     UINT32                  ApicId;
    309   1.1.1.9  christos     UINT32                  Flags;
    310   1.1.1.9  christos     UINT32                  ClockDomain;
    311   1.1.1.9  christos     UINT32                  Reserved2;
    312   1.1.1.2  christos 
    313   1.1.1.9  christos } ACPI_SRAT_X2APIC_CPU_AFFINITY;
    314   1.1.1.2  christos 
    315   1.1.1.9  christos /* Flags for ACPI_SRAT_CPU_AFFINITY and ACPI_SRAT_X2APIC_CPU_AFFINITY */
    316   1.1.1.2  christos 
    317   1.1.1.9  christos #define ACPI_SRAT_CPU_ENABLED       (1)         /* 00: Use affinity structure */
    318   1.1.1.2  christos 
    319   1.1.1.2  christos 
    320   1.1.1.9  christos /* 3: GICC Affinity (ACPI 5.1) */
    321   1.1.1.2  christos 
    322   1.1.1.9  christos typedef struct acpi_srat_gicc_affinity
    323   1.1.1.2  christos {
    324   1.1.1.9  christos     ACPI_SUBTABLE_HEADER    Header;
    325   1.1.1.9  christos     UINT32                  ProximityDomain;
    326   1.1.1.9  christos     UINT32                  AcpiProcessorUid;
    327   1.1.1.9  christos     UINT32                  Flags;
    328   1.1.1.9  christos     UINT32                  ClockDomain;
    329   1.1.1.2  christos 
    330   1.1.1.9  christos } ACPI_SRAT_GICC_AFFINITY;
    331   1.1.1.2  christos 
    332   1.1.1.9  christos /* Flags for ACPI_SRAT_GICC_AFFINITY */
    333   1.1.1.2  christos 
    334   1.1.1.9  christos #define ACPI_SRAT_GICC_ENABLED     (1)         /* 00: Use affinity structure */
    335   1.1.1.2  christos 
    336   1.1.1.2  christos 
    337   1.1.1.9  christos /* 4: GCC ITS Affinity (ACPI 6.2) */
    338   1.1.1.2  christos 
    339   1.1.1.9  christos typedef struct acpi_srat_gic_its_affinity
    340   1.1.1.2  christos {
    341   1.1.1.9  christos     ACPI_SUBTABLE_HEADER    Header;
    342   1.1.1.9  christos     UINT32                  ProximityDomain;
    343   1.1.1.9  christos     UINT16                  Reserved;
    344   1.1.1.9  christos     UINT32                  ItsId;
    345   1.1.1.2  christos 
    346   1.1.1.9  christos } ACPI_SRAT_GIC_ITS_AFFINITY;
    347       1.1  christos 
    348  1.1.1.14  christos /*
    349  1.1.1.14  christos  * Common structure for SRAT subtable types:
    350  1.1.1.14  christos  * 5: ACPI_SRAT_TYPE_GENERIC_AFFINITY
    351  1.1.1.14  christos  * 6: ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY
    352  1.1.1.14  christos  */
    353  1.1.1.11  christos 
    354  1.1.1.16  christos #define ACPI_SRAT_DEVICE_HANDLE_SIZE	16
    355  1.1.1.16  christos 
    356  1.1.1.11  christos typedef struct acpi_srat_generic_affinity
    357  1.1.1.11  christos {
    358  1.1.1.11  christos     ACPI_SUBTABLE_HEADER    Header;
    359  1.1.1.11  christos     UINT8                   Reserved;
    360  1.1.1.11  christos     UINT8                   DeviceHandleType;
    361  1.1.1.11  christos     UINT32                  ProximityDomain;
    362  1.1.1.16  christos     UINT8                   DeviceHandle[ACPI_SRAT_DEVICE_HANDLE_SIZE];
    363  1.1.1.11  christos     UINT32                  Flags;
    364  1.1.1.11  christos     UINT32                  Reserved1;
    365  1.1.1.11  christos 
    366  1.1.1.11  christos } ACPI_SRAT_GENERIC_AFFINITY;
    367  1.1.1.11  christos 
    368  1.1.1.11  christos /* Flags for ACPI_SRAT_GENERIC_AFFINITY */
    369  1.1.1.11  christos 
    370  1.1.1.13  christos #define ACPI_SRAT_GENERIC_AFFINITY_ENABLED     (1)      /* 00: Use affinity structure */
    371  1.1.1.13  christos #define ACPI_SRAT_ARCHITECTURAL_TRANSACTIONS   (1<<1)   /* ACPI 6.4 */
    372  1.1.1.11  christos 
    373  1.1.1.17  christos /* 7: RINTC Affinity Structure(ACPI 6.6) */
    374  1.1.1.17  christos 
    375  1.1.1.17  christos typedef struct acpi_srat_rintc_affinity
    376  1.1.1.17  christos {
    377  1.1.1.17  christos     ACPI_SUBTABLE_HEADER    Header;
    378  1.1.1.17  christos     UINT16                  Reserved;
    379  1.1.1.17  christos     UINT32                  ProximityDomain;
    380  1.1.1.17  christos     UINT32                  AcpiProcessorUid;
    381  1.1.1.17  christos     UINT32                  Flags;
    382  1.1.1.17  christos     UINT32                  ClockDomain;
    383  1.1.1.17  christos 
    384  1.1.1.17  christos } ACPI_SRAT_RINTC_AFFINITY;
    385  1.1.1.17  christos 
    386  1.1.1.17  christos /* Flags for ACPI_SRAT_RINTC_AFFINITY */
    387  1.1.1.17  christos 
    388  1.1.1.17  christos #define ACPI_SRAT_RINTC_ENABLED     (1)         /* 00: Use affinity structure */
    389  1.1.1.17  christos 
    390       1.1  christos /*******************************************************************************
    391       1.1  christos  *
    392   1.1.1.9  christos  * STAO - Status Override Table (_STA override) - ACPI 6.0
    393       1.1  christos  *        Version 1
    394       1.1  christos  *
    395   1.1.1.9  christos  * Conforms to "ACPI Specification for Status Override Table"
    396   1.1.1.9  christos  * 6 January 2015
    397   1.1.1.9  christos  *
    398       1.1  christos  ******************************************************************************/
    399       1.1  christos 
    400   1.1.1.9  christos typedef struct acpi_table_stao
    401       1.1  christos {
    402       1.1  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    403   1.1.1.9  christos     UINT8                   IgnoreUart;
    404       1.1  christos 
    405   1.1.1.9  christos } ACPI_TABLE_STAO;
    406       1.1  christos 
    407       1.1  christos 
    408       1.1  christos /*******************************************************************************
    409       1.1  christos  *
    410   1.1.1.9  christos  * TCPA - Trusted Computing Platform Alliance table
    411   1.1.1.9  christos  *        Version 2
    412   1.1.1.9  christos  *
    413   1.1.1.9  christos  * TCG Hardware Interface Table for TPM 1.2 Clients and Servers
    414   1.1.1.9  christos  *
    415   1.1.1.9  christos  * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
    416   1.1.1.9  christos  * Version 1.2, Revision 8
    417   1.1.1.9  christos  * February 27, 2017
    418   1.1.1.9  christos  *
    419   1.1.1.9  christos  * NOTE: There are two versions of the table with the same signature --
    420   1.1.1.9  christos  * the client version and the server version. The common PlatformClass
    421   1.1.1.9  christos  * field is used to differentiate the two types of tables.
    422       1.1  christos  *
    423       1.1  christos  ******************************************************************************/
    424       1.1  christos 
    425   1.1.1.9  christos typedef struct acpi_table_tcpa_hdr
    426       1.1  christos {
    427       1.1  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    428   1.1.1.9  christos     UINT16                  PlatformClass;
    429       1.1  christos 
    430   1.1.1.9  christos } ACPI_TABLE_TCPA_HDR;
    431       1.1  christos 
    432       1.1  christos /*
    433   1.1.1.9  christos  * Values for PlatformClass above.
    434   1.1.1.9  christos  * This is how the client and server subtables are differentiated
    435       1.1  christos  */
    436   1.1.1.9  christos #define ACPI_TCPA_CLIENT_TABLE          0
    437   1.1.1.9  christos #define ACPI_TCPA_SERVER_TABLE          1
    438       1.1  christos 
    439       1.1  christos 
    440   1.1.1.9  christos typedef struct acpi_table_tcpa_client
    441       1.1  christos {
    442   1.1.1.9  christos     UINT32                  MinimumLogLength;   /* Minimum length for the event log area */
    443   1.1.1.9  christos     UINT64                  LogAddress;         /* Address of the event log area */
    444       1.1  christos 
    445   1.1.1.9  christos } ACPI_TABLE_TCPA_CLIENT;
    446   1.1.1.2  christos 
    447   1.1.1.9  christos typedef struct acpi_table_tcpa_server
    448   1.1.1.2  christos {
    449   1.1.1.9  christos     UINT16                  Reserved;
    450   1.1.1.9  christos     UINT64                  MinimumLogLength;   /* Minimum length for the event log area */
    451   1.1.1.9  christos     UINT64                  LogAddress;         /* Address of the event log area */
    452   1.1.1.9  christos     UINT16                  SpecRevision;
    453   1.1.1.9  christos     UINT8                   DeviceFlags;
    454   1.1.1.9  christos     UINT8                   InterruptFlags;
    455   1.1.1.9  christos     UINT8                   GpeNumber;
    456   1.1.1.9  christos     UINT8                   Reserved2[3];
    457   1.1.1.9  christos     UINT32                  GlobalInterrupt;
    458   1.1.1.9  christos     ACPI_GENERIC_ADDRESS    Address;
    459   1.1.1.9  christos     UINT32                  Reserved3;
    460   1.1.1.9  christos     ACPI_GENERIC_ADDRESS    ConfigAddress;
    461   1.1.1.9  christos     UINT8                   Group;
    462   1.1.1.9  christos     UINT8                   Bus;                /* PCI Bus/Segment/Function numbers */
    463   1.1.1.9  christos     UINT8                   Device;
    464   1.1.1.9  christos     UINT8                   Function;
    465   1.1.1.2  christos 
    466   1.1.1.9  christos } ACPI_TABLE_TCPA_SERVER;
    467   1.1.1.2  christos 
    468   1.1.1.9  christos /* Values for DeviceFlags above */
    469   1.1.1.6  christos 
    470   1.1.1.9  christos #define ACPI_TCPA_PCI_DEVICE            (1)
    471   1.1.1.9  christos #define ACPI_TCPA_BUS_PNP               (1<<1)
    472   1.1.1.9  christos #define ACPI_TCPA_ADDRESS_VALID         (1<<2)
    473   1.1.1.6  christos 
    474   1.1.1.9  christos /* Values for InterruptFlags above */
    475   1.1.1.6  christos 
    476   1.1.1.9  christos #define ACPI_TCPA_INTERRUPT_MODE        (1)
    477   1.1.1.9  christos #define ACPI_TCPA_INTERRUPT_POLARITY    (1<<1)
    478   1.1.1.9  christos #define ACPI_TCPA_SCI_VIA_GPE           (1<<2)
    479   1.1.1.9  christos #define ACPI_TCPA_GLOBAL_INTERRUPT      (1<<3)
    480   1.1.1.6  christos 
    481   1.1.1.6  christos 
    482   1.1.1.9  christos /*******************************************************************************
    483   1.1.1.9  christos  *
    484   1.1.1.9  christos  * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
    485   1.1.1.9  christos  *        Version 4
    486   1.1.1.9  christos  *
    487   1.1.1.9  christos  * TCG Hardware Interface Table for TPM 2.0 Clients and Servers
    488   1.1.1.9  christos  *
    489   1.1.1.9  christos  * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
    490   1.1.1.9  christos  * Version 1.2, Revision 8
    491   1.1.1.9  christos  * February 27, 2017
    492   1.1.1.9  christos  *
    493   1.1.1.9  christos  ******************************************************************************/
    494   1.1.1.8  christos 
    495  1.1.1.10  christos /* Revision 3 */
    496  1.1.1.10  christos 
    497  1.1.1.10  christos typedef struct acpi_table_tpm23
    498  1.1.1.10  christos {
    499  1.1.1.10  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    500  1.1.1.10  christos     UINT32                  Reserved;
    501  1.1.1.10  christos     UINT64                  ControlAddress;
    502  1.1.1.10  christos     UINT32                  StartMethod;
    503  1.1.1.10  christos 
    504  1.1.1.10  christos } ACPI_TABLE_TPM23;
    505  1.1.1.10  christos 
    506  1.1.1.10  christos /* Value for StartMethod above */
    507  1.1.1.10  christos 
    508  1.1.1.10  christos #define ACPI_TPM23_ACPI_START_METHOD                 2
    509  1.1.1.10  christos 
    510  1.1.1.10  christos /*
    511  1.1.1.10  christos  * Optional trailer for revision 3. If start method is 2, there is a 4 byte
    512  1.1.1.10  christos  * reserved area of all zeros.
    513  1.1.1.10  christos  */
    514  1.1.1.10  christos typedef struct acpi_tmp23_trailer
    515  1.1.1.10  christos {
    516  1.1.1.10  christos     UINT32                  Reserved;
    517  1.1.1.10  christos 
    518  1.1.1.10  christos } ACPI_TPM23_TRAILER;
    519  1.1.1.10  christos 
    520  1.1.1.10  christos 
    521  1.1.1.10  christos /* Revision 4 */
    522  1.1.1.10  christos 
    523   1.1.1.9  christos typedef struct acpi_table_tpm2
    524   1.1.1.8  christos {
    525   1.1.1.9  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    526   1.1.1.9  christos     UINT16                  PlatformClass;
    527   1.1.1.9  christos     UINT16                  Reserved;
    528   1.1.1.9  christos     UINT64                  ControlAddress;
    529   1.1.1.9  christos     UINT32                  StartMethod;
    530   1.1.1.8  christos 
    531   1.1.1.9  christos     /* Platform-specific data follows */
    532   1.1.1.8  christos 
    533   1.1.1.9  christos } ACPI_TABLE_TPM2;
    534   1.1.1.8  christos 
    535   1.1.1.9  christos /* Values for StartMethod above */
    536   1.1.1.8  christos 
    537   1.1.1.9  christos #define ACPI_TPM2_NOT_ALLOWED                       0
    538   1.1.1.9  christos #define ACPI_TPM2_RESERVED1                         1
    539   1.1.1.9  christos #define ACPI_TPM2_START_METHOD                      2
    540   1.1.1.9  christos #define ACPI_TPM2_RESERVED3                         3
    541   1.1.1.9  christos #define ACPI_TPM2_RESERVED4                         4
    542   1.1.1.9  christos #define ACPI_TPM2_RESERVED5                         5
    543   1.1.1.9  christos #define ACPI_TPM2_MEMORY_MAPPED                     6
    544   1.1.1.9  christos #define ACPI_TPM2_COMMAND_BUFFER                    7
    545   1.1.1.9  christos #define ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD  8
    546   1.1.1.9  christos #define ACPI_TPM2_RESERVED9                         9
    547   1.1.1.9  christos #define ACPI_TPM2_RESERVED10                        10
    548   1.1.1.9  christos #define ACPI_TPM2_COMMAND_BUFFER_WITH_ARM_SMC       11  /* V1.2 Rev 8 */
    549   1.1.1.9  christos #define ACPI_TPM2_RESERVED                          12
    550   1.1.1.8  christos 
    551   1.1.1.8  christos 
    552   1.1.1.9  christos /* Optional trailer appears after any StartMethod subtables */
    553   1.1.1.8  christos 
    554   1.1.1.9  christos typedef struct acpi_tpm2_trailer
    555   1.1.1.9  christos {
    556   1.1.1.9  christos     UINT8                   MethodParameters[12];
    557   1.1.1.9  christos     UINT32                  MinimumLogLength;   /* Minimum length for the event log area */
    558   1.1.1.9  christos     UINT64                  LogAddress;         /* Address of the event log area */
    559   1.1.1.2  christos 
    560   1.1.1.9  christos } ACPI_TPM2_TRAILER;
    561   1.1.1.2  christos 
    562   1.1.1.2  christos 
    563       1.1  christos /*
    564   1.1.1.9  christos  * Subtables (StartMethod-specific)
    565       1.1  christos  */
    566       1.1  christos 
    567   1.1.1.9  christos /* 11: Start Method for ARM SMC (V1.2 Rev 8) */
    568       1.1  christos 
    569   1.1.1.9  christos typedef struct acpi_tpm2_arm_smc
    570       1.1  christos {
    571   1.1.1.9  christos     UINT32                  GlobalInterrupt;
    572   1.1.1.9  christos     UINT8                   InterruptFlags;
    573   1.1.1.9  christos     UINT8                   OperationFlags;
    574   1.1.1.9  christos     UINT16                  Reserved;
    575   1.1.1.9  christos     UINT32                  FunctionId;
    576       1.1  christos 
    577   1.1.1.9  christos } ACPI_TPM2_ARM_SMC;
    578       1.1  christos 
    579   1.1.1.9  christos /* Values for InterruptFlags above */
    580       1.1  christos 
    581   1.1.1.9  christos #define ACPI_TPM2_INTERRUPT_SUPPORT     (1)
    582   1.1.1.8  christos 
    583   1.1.1.9  christos /* Values for OperationFlags above */
    584   1.1.1.8  christos 
    585   1.1.1.9  christos #define ACPI_TPM2_IDLE_SUPPORT          (1)
    586   1.1.1.8  christos 
    587   1.1.1.8  christos 
    588       1.1  christos /*******************************************************************************
    589       1.1  christos  *
    590   1.1.1.9  christos  * UEFI - UEFI Boot optimization Table
    591       1.1  christos  *        Version 1
    592       1.1  christos  *
    593   1.1.1.9  christos  * Conforms to "Unified Extensible Firmware Interface Specification",
    594   1.1.1.9  christos  * Version 2.3, May 8, 2009
    595   1.1.1.9  christos  *
    596       1.1  christos  ******************************************************************************/
    597       1.1  christos 
    598   1.1.1.9  christos typedef struct acpi_table_uefi
    599       1.1  christos {
    600       1.1  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    601   1.1.1.9  christos     UINT8                   Identifier[16];     /* UUID identifier */
    602   1.1.1.9  christos     UINT16                  DataOffset;         /* Offset of remaining data in table */
    603       1.1  christos 
    604   1.1.1.9  christos } ACPI_TABLE_UEFI;
    605       1.1  christos 
    606       1.1  christos 
    607   1.1.1.9  christos /*******************************************************************************
    608   1.1.1.9  christos  *
    609  1.1.1.13  christos  * VIOT - Virtual I/O Translation Table
    610   1.1.1.9  christos  *        Version 1
    611   1.1.1.9  christos  *
    612   1.1.1.9  christos  ******************************************************************************/
    613       1.1  christos 
    614  1.1.1.13  christos typedef struct acpi_table_viot
    615       1.1  christos {
    616   1.1.1.9  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    617  1.1.1.13  christos     UINT16                  NodeCount;
    618  1.1.1.13  christos     UINT16                  NodeOffset;
    619  1.1.1.13  christos     UINT8                   Reserved[8];
    620  1.1.1.13  christos 
    621  1.1.1.13  christos } ACPI_TABLE_VIOT;
    622  1.1.1.13  christos 
    623  1.1.1.13  christos /* VIOT subtable header */
    624  1.1.1.13  christos 
    625  1.1.1.13  christos typedef struct acpi_viot_header
    626  1.1.1.13  christos {
    627  1.1.1.13  christos     UINT8                   Type;
    628  1.1.1.13  christos     UINT8                   Reserved;
    629  1.1.1.13  christos     UINT16                  Length;
    630  1.1.1.13  christos 
    631  1.1.1.13  christos } ACPI_VIOT_HEADER;
    632  1.1.1.13  christos 
    633  1.1.1.13  christos /* Values for Type field above */
    634  1.1.1.13  christos 
    635  1.1.1.13  christos enum AcpiViotNodeType
    636  1.1.1.13  christos {
    637  1.1.1.13  christos     ACPI_VIOT_NODE_PCI_RANGE            = 0x01,
    638  1.1.1.13  christos     ACPI_VIOT_NODE_MMIO                 = 0x02,
    639  1.1.1.13  christos     ACPI_VIOT_NODE_VIRTIO_IOMMU_PCI     = 0x03,
    640  1.1.1.13  christos     ACPI_VIOT_NODE_VIRTIO_IOMMU_MMIO    = 0x04,
    641  1.1.1.13  christos     ACPI_VIOT_RESERVED                  = 0x05
    642  1.1.1.13  christos };
    643  1.1.1.13  christos 
    644  1.1.1.13  christos /* VIOT subtables */
    645       1.1  christos 
    646  1.1.1.13  christos typedef struct acpi_viot_pci_range
    647  1.1.1.13  christos {
    648  1.1.1.13  christos     ACPI_VIOT_HEADER        Header;
    649  1.1.1.13  christos     UINT32                  EndpointStart;
    650  1.1.1.13  christos     UINT16                  SegmentStart;
    651  1.1.1.13  christos     UINT16                  SegmentEnd;
    652  1.1.1.13  christos     UINT16                  BdfStart;
    653  1.1.1.13  christos     UINT16                  BdfEnd;
    654  1.1.1.13  christos     UINT16                  OutputNode;
    655  1.1.1.13  christos     UINT8                   Reserved[6];
    656       1.1  christos 
    657  1.1.1.13  christos } ACPI_VIOT_PCI_RANGE;
    658       1.1  christos 
    659  1.1.1.13  christos typedef struct acpi_viot_mmio
    660       1.1  christos {
    661  1.1.1.13  christos     ACPI_VIOT_HEADER        Header;
    662  1.1.1.13  christos     UINT32                  Endpoint;
    663  1.1.1.13  christos     UINT64                  BaseAddress;
    664  1.1.1.13  christos     UINT16                  OutputNode;
    665  1.1.1.13  christos     UINT8                   Reserved[6];
    666  1.1.1.13  christos 
    667  1.1.1.13  christos } ACPI_VIOT_MMIO;
    668  1.1.1.13  christos 
    669  1.1.1.13  christos typedef struct acpi_viot_virtio_iommu_pci
    670  1.1.1.13  christos {
    671  1.1.1.13  christos     ACPI_VIOT_HEADER        Header;
    672  1.1.1.13  christos     UINT16                  Segment;
    673  1.1.1.13  christos     UINT16                  Bdf;
    674  1.1.1.13  christos     UINT8                   Reserved[8];
    675  1.1.1.13  christos 
    676  1.1.1.13  christos } ACPI_VIOT_VIRTIO_IOMMU_PCI;
    677  1.1.1.13  christos 
    678  1.1.1.13  christos typedef struct acpi_viot_virtio_iommu_mmio
    679  1.1.1.13  christos {
    680  1.1.1.13  christos     ACPI_VIOT_HEADER        Header;
    681  1.1.1.13  christos     UINT8                   Reserved[4];
    682  1.1.1.13  christos     UINT64                  BaseAddress;
    683       1.1  christos 
    684  1.1.1.13  christos } ACPI_VIOT_VIRTIO_IOMMU_MMIO;
    685       1.1  christos 
    686       1.1  christos 
    687       1.1  christos /*******************************************************************************
    688       1.1  christos  *
    689   1.1.1.9  christos  * WAET - Windows ACPI Emulated devices Table
    690       1.1  christos  *        Version 1
    691       1.1  christos  *
    692   1.1.1.9  christos  * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009
    693   1.1.1.9  christos  *
    694       1.1  christos  ******************************************************************************/
    695       1.1  christos 
    696   1.1.1.9  christos typedef struct acpi_table_waet
    697       1.1  christos {
    698       1.1  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    699   1.1.1.9  christos     UINT32                  Flags;
    700       1.1  christos 
    701   1.1.1.9  christos } ACPI_TABLE_WAET;
    702       1.1  christos 
    703   1.1.1.9  christos /* Masks for Flags field above */
    704       1.1  christos 
    705   1.1.1.9  christos #define ACPI_WAET_RTC_NO_ACK        (1)         /* RTC requires no int acknowledge */
    706   1.1.1.9  christos #define ACPI_WAET_TIMER_ONE_READ    (1<<1)      /* PM timer requires only one read */
    707       1.1  christos 
    708       1.1  christos 
    709   1.1.1.9  christos /*******************************************************************************
    710   1.1.1.9  christos  *
    711   1.1.1.9  christos  * WDAT - Watchdog Action Table
    712   1.1.1.9  christos  *        Version 1
    713   1.1.1.9  christos  *
    714   1.1.1.9  christos  * Conforms to "Hardware Watchdog Timers Design Specification",
    715   1.1.1.9  christos  * Copyright 2006 Microsoft Corporation.
    716   1.1.1.9  christos  *
    717   1.1.1.9  christos  ******************************************************************************/
    718       1.1  christos 
    719   1.1.1.9  christos typedef struct acpi_table_wdat
    720       1.1  christos {
    721   1.1.1.9  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    722   1.1.1.9  christos     UINT32                  HeaderLength;       /* Watchdog Header Length */
    723   1.1.1.9  christos     UINT16                  PciSegment;         /* PCI Segment number */
    724   1.1.1.9  christos     UINT8                   PciBus;             /* PCI Bus number */
    725   1.1.1.9  christos     UINT8                   PciDevice;          /* PCI Device number */
    726   1.1.1.9  christos     UINT8                   PciFunction;        /* PCI Function number */
    727   1.1.1.9  christos     UINT8                   Reserved[3];
    728   1.1.1.9  christos     UINT32                  TimerPeriod;        /* Period of one timer count (msec) */
    729   1.1.1.9  christos     UINT32                  MaxCount;           /* Maximum counter value supported */
    730   1.1.1.9  christos     UINT32                  MinCount;           /* Minimum counter value */
    731   1.1.1.9  christos     UINT8                   Flags;
    732   1.1.1.9  christos     UINT8                   Reserved2[3];
    733   1.1.1.9  christos     UINT32                  Entries;            /* Number of watchdog entries that follow */
    734       1.1  christos 
    735   1.1.1.9  christos } ACPI_TABLE_WDAT;
    736       1.1  christos 
    737   1.1.1.9  christos /* Masks for Flags field above */
    738       1.1  christos 
    739   1.1.1.9  christos #define ACPI_WDAT_ENABLED           (1)
    740   1.1.1.9  christos #define ACPI_WDAT_STOPPED           0x80
    741       1.1  christos 
    742       1.1  christos 
    743   1.1.1.9  christos /* WDAT Instruction Entries (actions) */
    744       1.1  christos 
    745   1.1.1.9  christos typedef struct acpi_wdat_entry
    746       1.1  christos {
    747   1.1.1.9  christos     UINT8                   Action;
    748   1.1.1.9  christos     UINT8                   Instruction;
    749   1.1.1.9  christos     UINT16                  Reserved;
    750   1.1.1.9  christos     ACPI_GENERIC_ADDRESS    RegisterRegion;
    751   1.1.1.9  christos     UINT32                  Value;              /* Value used with Read/Write register */
    752   1.1.1.9  christos     UINT32                  Mask;               /* Bitmask required for this register instruction */
    753   1.1.1.9  christos 
    754   1.1.1.9  christos } ACPI_WDAT_ENTRY;
    755   1.1.1.9  christos 
    756   1.1.1.9  christos /* Values for Action field above */
    757   1.1.1.9  christos 
    758   1.1.1.9  christos enum AcpiWdatActions
    759   1.1.1.9  christos {
    760   1.1.1.9  christos     ACPI_WDAT_RESET                 = 1,
    761   1.1.1.9  christos     ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
    762   1.1.1.9  christos     ACPI_WDAT_GET_COUNTDOWN         = 5,
    763   1.1.1.9  christos     ACPI_WDAT_SET_COUNTDOWN         = 6,
    764   1.1.1.9  christos     ACPI_WDAT_GET_RUNNING_STATE     = 8,
    765   1.1.1.9  christos     ACPI_WDAT_SET_RUNNING_STATE     = 9,
    766   1.1.1.9  christos     ACPI_WDAT_GET_STOPPED_STATE     = 10,
    767   1.1.1.9  christos     ACPI_WDAT_SET_STOPPED_STATE     = 11,
    768   1.1.1.9  christos     ACPI_WDAT_GET_REBOOT            = 16,
    769   1.1.1.9  christos     ACPI_WDAT_SET_REBOOT            = 17,
    770   1.1.1.9  christos     ACPI_WDAT_GET_SHUTDOWN          = 18,
    771   1.1.1.9  christos     ACPI_WDAT_SET_SHUTDOWN          = 19,
    772   1.1.1.9  christos     ACPI_WDAT_GET_STATUS            = 32,
    773   1.1.1.9  christos     ACPI_WDAT_SET_STATUS            = 33,
    774   1.1.1.9  christos     ACPI_WDAT_ACTION_RESERVED       = 34    /* 34 and greater are reserved */
    775       1.1  christos };
    776       1.1  christos 
    777   1.1.1.9  christos /* Values for Instruction field above */
    778       1.1  christos 
    779   1.1.1.9  christos enum AcpiWdatInstructions
    780       1.1  christos {
    781   1.1.1.9  christos     ACPI_WDAT_READ_VALUE            = 0,
    782   1.1.1.9  christos     ACPI_WDAT_READ_COUNTDOWN        = 1,
    783   1.1.1.9  christos     ACPI_WDAT_WRITE_VALUE           = 2,
    784   1.1.1.9  christos     ACPI_WDAT_WRITE_COUNTDOWN       = 3,
    785   1.1.1.9  christos     ACPI_WDAT_INSTRUCTION_RESERVED  = 4,    /* 4 and greater are reserved */
    786   1.1.1.9  christos     ACPI_WDAT_PRESERVE_REGISTER     = 0x80  /* Except for this value */
    787       1.1  christos };
    788       1.1  christos 
    789       1.1  christos 
    790   1.1.1.9  christos /*******************************************************************************
    791   1.1.1.9  christos  *
    792   1.1.1.9  christos  * WDDT - Watchdog Descriptor Table
    793   1.1.1.9  christos  *        Version 1
    794   1.1.1.9  christos  *
    795   1.1.1.9  christos  * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",
    796   1.1.1.9  christos  * Version 001, September 2002
    797   1.1.1.9  christos  *
    798   1.1.1.9  christos  ******************************************************************************/
    799       1.1  christos 
    800   1.1.1.9  christos typedef struct acpi_table_wddt
    801   1.1.1.9  christos {
    802   1.1.1.9  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    803   1.1.1.9  christos     UINT16                  SpecVersion;
    804   1.1.1.9  christos     UINT16                  TableVersion;
    805   1.1.1.9  christos     UINT16                  PciVendorId;
    806   1.1.1.9  christos     ACPI_GENERIC_ADDRESS    Address;
    807   1.1.1.9  christos     UINT16                  MaxCount;           /* Maximum counter value supported */
    808   1.1.1.9  christos     UINT16                  MinCount;           /* Minimum counter value supported */
    809   1.1.1.9  christos     UINT16                  Period;
    810   1.1.1.9  christos     UINT16                  Status;
    811   1.1.1.9  christos     UINT16                  Capability;
    812       1.1  christos 
    813   1.1.1.9  christos } ACPI_TABLE_WDDT;
    814       1.1  christos 
    815   1.1.1.9  christos /* Flags for Status field above */
    816       1.1  christos 
    817   1.1.1.9  christos #define ACPI_WDDT_AVAILABLE     (1)
    818   1.1.1.9  christos #define ACPI_WDDT_ACTIVE        (1<<1)
    819   1.1.1.9  christos #define ACPI_WDDT_TCO_OS_OWNED  (1<<2)
    820   1.1.1.9  christos #define ACPI_WDDT_USER_RESET    (1<<11)
    821   1.1.1.9  christos #define ACPI_WDDT_WDT_RESET     (1<<12)
    822   1.1.1.9  christos #define ACPI_WDDT_POWER_FAIL    (1<<13)
    823   1.1.1.9  christos #define ACPI_WDDT_UNKNOWN_RESET (1<<14)
    824       1.1  christos 
    825   1.1.1.9  christos /* Flags for Capability field above */
    826       1.1  christos 
    827   1.1.1.9  christos #define ACPI_WDDT_AUTO_RESET    (1)
    828   1.1.1.9  christos #define ACPI_WDDT_ALERT_SUPPORT (1<<1)
    829       1.1  christos 
    830       1.1  christos 
    831       1.1  christos /*******************************************************************************
    832       1.1  christos  *
    833   1.1.1.9  christos  * WDRT - Watchdog Resource Table
    834   1.1.1.4  christos  *        Version 1
    835       1.1  christos  *
    836   1.1.1.9  christos  * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",
    837   1.1.1.9  christos  * Version 1.01, August 28, 2006
    838       1.1  christos  *
    839       1.1  christos  ******************************************************************************/
    840       1.1  christos 
    841   1.1.1.9  christos typedef struct acpi_table_wdrt
    842       1.1  christos {
    843       1.1  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    844   1.1.1.9  christos     ACPI_GENERIC_ADDRESS    ControlRegister;
    845   1.1.1.9  christos     ACPI_GENERIC_ADDRESS    CountRegister;
    846   1.1.1.9  christos     UINT16                  PciDeviceId;
    847   1.1.1.9  christos     UINT16                  PciVendorId;
    848   1.1.1.9  christos     UINT8                   PciBus;             /* PCI Bus number */
    849   1.1.1.9  christos     UINT8                   PciDevice;          /* PCI Device number */
    850   1.1.1.9  christos     UINT8                   PciFunction;        /* PCI Function number */
    851   1.1.1.9  christos     UINT8                   PciSegment;         /* PCI Segment number */
    852   1.1.1.9  christos     UINT16                  MaxCount;           /* Maximum counter value supported */
    853   1.1.1.9  christos     UINT8                   Units;
    854       1.1  christos 
    855   1.1.1.9  christos } ACPI_TABLE_WDRT;
    856       1.1  christos 
    857       1.1  christos 
    858   1.1.1.4  christos /*******************************************************************************
    859   1.1.1.4  christos  *
    860   1.1.1.4  christos  * WPBT - Windows Platform Environment Table (ACPI 6.0)
    861   1.1.1.4  christos  *        Version 1
    862   1.1.1.4  christos  *
    863   1.1.1.4  christos  * Conforms to "Windows Platform Binary Table (WPBT)" 29 November 2011
    864   1.1.1.4  christos  *
    865   1.1.1.4  christos  ******************************************************************************/
    866   1.1.1.4  christos 
    867   1.1.1.4  christos typedef struct acpi_table_wpbt
    868       1.1  christos {
    869   1.1.1.4  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    870   1.1.1.4  christos     UINT32                  HandoffSize;
    871   1.1.1.4  christos     UINT64                  HandoffAddress;
    872   1.1.1.4  christos     UINT8                   Layout;
    873   1.1.1.4  christos     UINT8                   Type;
    874   1.1.1.4  christos     UINT16                  ArgumentsLength;
    875   1.1.1.4  christos 
    876   1.1.1.4  christos } ACPI_TABLE_WPBT;
    877   1.1.1.4  christos 
    878  1.1.1.14  christos typedef struct acpi_wpbt_unicode
    879  1.1.1.14  christos {
    880  1.1.1.14  christos     UINT16                  *UnicodeString;
    881  1.1.1.14  christos 
    882  1.1.1.14  christos } ACPI_WPBT_UNICODE;
    883  1.1.1.14  christos 
    884   1.1.1.4  christos 
    885   1.1.1.4  christos /*******************************************************************************
    886   1.1.1.4  christos  *
    887  1.1.1.12  christos  * WSMT - Windows SMM Security Mitigations Table
    888   1.1.1.9  christos  *        Version 1
    889   1.1.1.9  christos  *
    890  1.1.1.12  christos  * Conforms to "Windows SMM Security Mitigations Table",
    891   1.1.1.9  christos  * Version 1.0, April 18, 2016
    892   1.1.1.9  christos  *
    893   1.1.1.9  christos  ******************************************************************************/
    894   1.1.1.9  christos 
    895   1.1.1.9  christos typedef struct acpi_table_wsmt
    896   1.1.1.9  christos {
    897   1.1.1.9  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    898   1.1.1.9  christos     UINT32                  ProtectionFlags;
    899   1.1.1.9  christos 
    900   1.1.1.9  christos } ACPI_TABLE_WSMT;
    901   1.1.1.9  christos 
    902   1.1.1.9  christos /* Flags for ProtectionFlags field above */
    903   1.1.1.9  christos 
    904   1.1.1.9  christos #define ACPI_WSMT_FIXED_COMM_BUFFERS                (1)
    905   1.1.1.9  christos #define ACPI_WSMT_COMM_BUFFER_NESTED_PTR_PROTECTION (2)
    906   1.1.1.9  christos #define ACPI_WSMT_SYSTEM_RESOURCE_PROTECTION        (4)
    907   1.1.1.9  christos 
    908   1.1.1.9  christos 
    909   1.1.1.9  christos /*******************************************************************************
    910   1.1.1.9  christos  *
    911   1.1.1.4  christos  * XENV - Xen Environment Table (ACPI 6.0)
    912   1.1.1.4  christos  *        Version 1
    913   1.1.1.4  christos  *
    914   1.1.1.4  christos  * Conforms to "ACPI Specification for Xen Environment Table" 4 January 2015
    915   1.1.1.4  christos  *
    916   1.1.1.4  christos  ******************************************************************************/
    917   1.1.1.4  christos 
    918   1.1.1.4  christos typedef struct acpi_table_xenv
    919   1.1.1.4  christos {
    920   1.1.1.4  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    921   1.1.1.4  christos     UINT64                  GrantTableAddress;
    922   1.1.1.4  christos     UINT64                  GrantTableSize;
    923   1.1.1.4  christos     UINT32                  EventInterrupt;
    924   1.1.1.4  christos     UINT8                   EventFlags;
    925       1.1  christos 
    926   1.1.1.4  christos } ACPI_TABLE_XENV;
    927       1.1  christos 
    928       1.1  christos 
    929       1.1  christos /* Reset to default packing */
    930       1.1  christos 
    931       1.1  christos #pragma pack()
    932       1.1  christos 
    933       1.1  christos #endif /* __ACTBL3_H__ */
    934