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