Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:42

0001 /******************************************************************************
0002  *
0003  * Name: actbl3.h - ACPI Table Definitions
0004  *
0005  *****************************************************************************/
0006 
0007 /******************************************************************************
0008  *
0009  * 1. Copyright Notice
0010  *
0011  * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp.
0012  * All rights reserved.
0013  *
0014  * 2. License
0015  *
0016  * 2.1. This is your license from Intel Corp. under its intellectual property
0017  * rights. You may have additional license terms from the party that provided
0018  * you this software, covering your right to use that party's intellectual
0019  * property rights.
0020  *
0021  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
0022  * copy of the source code appearing in this file ("Covered Code") an
0023  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
0024  * base code distributed originally by Intel ("Original Intel Code") to copy,
0025  * make derivatives, distribute, use and display any portion of the Covered
0026  * Code in any form, with the right to sublicense such rights; and
0027  *
0028  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
0029  * license (with the right to sublicense), under only those claims of Intel
0030  * patents that are infringed by the Original Intel Code, to make, use, sell,
0031  * offer to sell, and import the Covered Code and derivative works thereof
0032  * solely to the minimum extent necessary to exercise the above copyright
0033  * license, and in no event shall the patent license extend to any additions
0034  * to or modifications of the Original Intel Code. No other license or right
0035  * is granted directly or by implication, estoppel or otherwise;
0036  *
0037  * The above copyright and patent license is granted only if the following
0038  * conditions are met:
0039  *
0040  * 3. Conditions
0041  *
0042  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
0043  * Redistribution of source code of any substantial portion of the Covered
0044  * Code or modification with rights to further distribute source must include
0045  * the above Copyright Notice, the above License, this list of Conditions,
0046  * and the following Disclaimer and Export Compliance provision. In addition,
0047  * Licensee must cause all Covered Code to which Licensee contributes to
0048  * contain a file documenting the changes Licensee made to create that Covered
0049  * Code and the date of any change. Licensee must include in that file the
0050  * documentation of any changes made by any predecessor Licensee. Licensee
0051  * must include a prominent statement that the modification is derived,
0052  * directly or indirectly, from Original Intel Code.
0053  *
0054  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
0055  * Redistribution of source code of any substantial portion of the Covered
0056  * Code or modification without rights to further distribute source must
0057  * include the following Disclaimer and Export Compliance provision in the
0058  * documentation and/or other materials provided with distribution. In
0059  * addition, Licensee may not authorize further sublicense of source of any
0060  * portion of the Covered Code, and must include terms to the effect that the
0061  * license from Licensee to its licensee is limited to the intellectual
0062  * property embodied in the software Licensee provides to its licensee, and
0063  * not to intellectual property embodied in modifications its licensee may
0064  * make.
0065  *
0066  * 3.3. Redistribution of Executable. Redistribution in executable form of any
0067  * substantial portion of the Covered Code or modification must reproduce the
0068  * above Copyright Notice, and the following Disclaimer and Export Compliance
0069  * provision in the documentation and/or other materials provided with the
0070  * distribution.
0071  *
0072  * 3.4. Intel retains all right, title, and interest in and to the Original
0073  * Intel Code.
0074  *
0075  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
0076  * Intel shall be used in advertising or otherwise to promote the sale, use or
0077  * other dealings in products derived from or relating to the Covered Code
0078  * without prior written authorization from Intel.
0079  *
0080  * 4. Disclaimer and Export Compliance
0081  *
0082  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
0083  * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
0084  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
0085  * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
0086  * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
0087  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
0088  * PARTICULAR PURPOSE.
0089  *
0090  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
0091  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
0092  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
0093  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
0094  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
0095  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
0096  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
0097  * LIMITED REMEDY.
0098  *
0099  * 4.3. Licensee shall not export, either directly or indirectly, any of this
0100  * software or system incorporating such software without first obtaining any
0101  * required license or other approval from the U. S. Department of Commerce or
0102  * any other agency or department of the United States Government. In the
0103  * event Licensee exports any such software from the United States or
0104  * re-exports any such software from a foreign destination, Licensee shall
0105  * ensure that the distribution and export/re-export of the software is in
0106  * compliance with all laws, regulations, orders, or other restrictions of the
0107  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
0108  * any of its subsidiaries will export/re-export any technical data, process,
0109  * software, or service, directly or indirectly, to any country for which the
0110  * United States government or any agency thereof requires an export license,
0111  * other governmental approval, or letter of assurance, without first obtaining
0112  * such license, approval or letter.
0113  *
0114  *****************************************************************************
0115  *
0116  * Alternatively, you may choose to be licensed under the terms of the
0117  * following license:
0118  *
0119  * Redistribution and use in source and binary forms, with or without
0120  * modification, are permitted provided that the following conditions
0121  * are met:
0122  * 1. Redistributions of source code must retain the above copyright
0123  *    notice, this list of conditions, and the following disclaimer,
0124  *    without modification.
0125  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
0126  *    substantially similar to the "NO WARRANTY" disclaimer below
0127  *    ("Disclaimer") and any redistribution must be conditioned upon
0128  *    including a substantially similar Disclaimer requirement for further
0129  *    binary redistribution.
0130  * 3. Neither the names of the above-listed copyright holders nor the names
0131  *    of any contributors may be used to endorse or promote products derived
0132  *    from this software without specific prior written permission.
0133  *
0134  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
0135  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
0136  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
0137  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
0138  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
0139  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
0140  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
0141  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
0142  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
0143  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
0144  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0145  *
0146  * Alternatively, you may choose to be licensed under the terms of the
0147  * GNU General Public License ("GPL") version 2 as published by the Free
0148  * Software Foundation.
0149  *
0150  *****************************************************************************/
0151 
0152 #ifndef __ACTBL3_H__
0153 #define __ACTBL3_H__
0154 
0155 
0156 /*******************************************************************************
0157  *
0158  * Additional ACPI Tables
0159  *
0160  * These tables are not consumed directly by the ACPICA subsystem, but are
0161  * included here to support device drivers and the AML disassembler.
0162  *
0163  ******************************************************************************/
0164 
0165 
0166 /*
0167  * Values for description table header signatures for tables defined in this
0168  * file. Useful because they make it more difficult to inadvertently type in
0169  * the wrong signature.
0170  */
0171 #define ACPI_SIG_SLIC           "SLIC"      /* Software Licensing Description Table */
0172 #define ACPI_SIG_SLIT           "SLIT"      /* System Locality Distance Information Table */
0173 #define ACPI_SIG_SPCR           "SPCR"      /* Serial Port Console Redirection table */
0174 #define ACPI_SIG_SPMI           "SPMI"      /* Server Platform Management Interface table */
0175 #define ACPI_SIG_SRAT           "SRAT"      /* System Resource Affinity Table */
0176 #define ACPI_SIG_STAO           "STAO"      /* Status Override table */
0177 #define ACPI_SIG_TCPA           "TCPA"      /* Trusted Computing Platform Alliance table */
0178 #define ACPI_SIG_TPM2           "TPM2"      /* Trusted Platform Module 2.0 H/W interface table */
0179 #define ACPI_SIG_UEFI           "UEFI"      /* Uefi Boot Optimization Table */
0180 #define ACPI_SIG_VIOT           "VIOT"      /* Virtual I/O Translation Table */
0181 #define ACPI_SIG_WAET           "WAET"      /* Windows ACPI Emulated devices Table */
0182 #define ACPI_SIG_WDAT           "WDAT"      /* Watchdog Action Table */
0183 #define ACPI_SIG_WDDT           "WDDT"      /* Watchdog Timer Description Table */
0184 #define ACPI_SIG_WDRT           "WDRT"      /* Watchdog Resource Table */
0185 #define ACPI_SIG_WPBT           "WPBT"      /* Windows Platform Binary Table */
0186 #define ACPI_SIG_WSMT           "WSMT"      /* Windows SMM Security Mitigations Table */
0187 #define ACPI_SIG_XENV           "XENV"      /* Xen Environment table */
0188 #define ACPI_SIG_XXXX           "XXXX"      /* Intermediate AML header for ASL/ASL+ converter */
0189 
0190 /*
0191  * All tables must be byte-packed to match the ACPI specification, since
0192  * the tables are provided by the system BIOS.
0193  */
0194 #pragma pack(1)
0195 
0196 /*
0197  * Note: C bitfields are not used for this reason:
0198  *
0199  * "Bitfields are great and easy to read, but unfortunately the C language
0200  * does not specify the layout of bitfields in memory, which means they are
0201  * essentially useless for dealing with packed data in on-disk formats or
0202  * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
0203  * this decision was a design error in C. Ritchie could have picked an order
0204  * and stuck with it." Norman Ramsey.
0205  * See http://stackoverflow.com/a/1053662/41661
0206  */
0207 
0208 
0209 /*******************************************************************************
0210  *
0211  * SLIC - Software Licensing Description Table
0212  *
0213  * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
0214  * November 29, 2011. Copyright 2011 Microsoft
0215  *
0216  ******************************************************************************/
0217 
0218 /* Basic SLIC table is only the common ACPI header */
0219 
0220 typedef struct acpi_table_slic
0221 {
0222     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0223 
0224 } ACPI_TABLE_SLIC;
0225 
0226 
0227 /*******************************************************************************
0228  *
0229  * SLIT - System Locality Distance Information Table
0230  *        Version 1
0231  *
0232  ******************************************************************************/
0233 
0234 typedef struct acpi_table_slit
0235 {
0236     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0237     UINT64                  LocalityCount;
0238     UINT8                   Entry[1];           /* Real size = localities^2 */
0239 
0240 } ACPI_TABLE_SLIT;
0241 
0242 
0243 /*******************************************************************************
0244  *
0245  * SPCR - Serial Port Console Redirection table
0246  *        Version 4
0247  *
0248  * Conforms to "Serial Port Console Redirection Table",
0249  * Version 1.10, Jan 5, 2023
0250  *
0251  ******************************************************************************/
0252 
0253 typedef struct acpi_table_spcr
0254 {
0255     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0256     UINT8                   InterfaceType;      /* 0=full 16550, 1=subset of 16550 */
0257     UINT8                   Reserved[3];
0258     ACPI_GENERIC_ADDRESS    SerialPort;
0259     UINT8                   InterruptType;
0260     UINT8                   PcInterrupt;
0261     UINT32                  Interrupt;
0262     UINT8                   BaudRate;
0263     UINT8                   Parity;
0264     UINT8                   StopBits;
0265     UINT8                   FlowControl;
0266     UINT8                   TerminalType;
0267     UINT8                   Language;
0268     UINT16                  PciDeviceId;
0269     UINT16                  PciVendorId;
0270     UINT8                   PciBus;
0271     UINT8                   PciDevice;
0272     UINT8                   PciFunction;
0273     UINT32                  PciFlags;
0274     UINT8                   PciSegment;
0275     UINT32                  UartClkFreq;
0276     UINT32                  PreciseBaudrate;
0277     UINT16                  NameSpaceStringLength;
0278     UINT16                  NameSpaceStringOffset;
0279     char                    NameSpaceString[];
0280 
0281 } ACPI_TABLE_SPCR;
0282 
0283 /* Masks for PciFlags field above */
0284 
0285 #define ACPI_SPCR_DO_NOT_DISABLE    (1)
0286 
0287 /* Values for Interface Type: See the definition of the DBG2 table */
0288 
0289 
0290 /*******************************************************************************
0291  *
0292  * SPMI - Server Platform Management Interface table
0293  *        Version 5
0294  *
0295  * Conforms to "Intelligent Platform Management Interface Specification
0296  * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with
0297  * June 12, 2009 markup.
0298  *
0299  ******************************************************************************/
0300 
0301 typedef struct acpi_table_spmi
0302 {
0303     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0304     UINT8                   InterfaceType;
0305     UINT8                   Reserved;           /* Must be 1 */
0306     UINT16                  SpecRevision;       /* Version of IPMI */
0307     UINT8                   InterruptType;
0308     UINT8                   GpeNumber;          /* GPE assigned */
0309     UINT8                   Reserved1;
0310     UINT8                   PciDeviceFlag;
0311     UINT32                  Interrupt;
0312     ACPI_GENERIC_ADDRESS    IpmiRegister;
0313     UINT8                   PciSegment;
0314     UINT8                   PciBus;
0315     UINT8                   PciDevice;
0316     UINT8                   PciFunction;
0317     UINT8                   Reserved2;
0318 
0319 } ACPI_TABLE_SPMI;
0320 
0321 /* Values for InterfaceType above */
0322 
0323 enum AcpiSpmiInterfaceTypes
0324 {
0325     ACPI_SPMI_NOT_USED              = 0,
0326     ACPI_SPMI_KEYBOARD              = 1,
0327     ACPI_SPMI_SMI                   = 2,
0328     ACPI_SPMI_BLOCK_TRANSFER        = 3,
0329     ACPI_SPMI_SMBUS                 = 4,
0330     ACPI_SPMI_RESERVED              = 5         /* 5 and above are reserved */
0331 };
0332 
0333 
0334 /*******************************************************************************
0335  *
0336  * SRAT - System Resource Affinity Table
0337  *        Version 3
0338  *
0339  ******************************************************************************/
0340 
0341 typedef struct acpi_table_srat
0342 {
0343     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0344     UINT32                  TableRevision;      /* Must be value '1' */
0345     UINT64                  Reserved;           /* Reserved, must be zero */
0346 
0347 } ACPI_TABLE_SRAT;
0348 
0349 /* Values for subtable type in ACPI_SUBTABLE_HEADER */
0350 
0351 enum AcpiSratType
0352 {
0353     ACPI_SRAT_TYPE_CPU_AFFINITY         = 0,
0354     ACPI_SRAT_TYPE_MEMORY_AFFINITY      = 1,
0355     ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY  = 2,
0356     ACPI_SRAT_TYPE_GICC_AFFINITY        = 3,
0357     ACPI_SRAT_TYPE_GIC_ITS_AFFINITY     = 4, /* ACPI 6.2 */
0358     ACPI_SRAT_TYPE_GENERIC_AFFINITY     = 5, /* ACPI 6.3 */
0359     ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY = 6, /* ACPI 6.4 */
0360     ACPI_SRAT_TYPE_RINTC_AFFINITY        = 7, /* ACPI 6.6 */
0361     ACPI_SRAT_TYPE_RESERVED              = 8  /* 8 and greater are reserved */
0362 };
0363 
0364 /*
0365  * SRAT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
0366  */
0367 
0368 /* 0: Processor Local APIC/SAPIC Affinity */
0369 
0370 typedef struct acpi_srat_cpu_affinity
0371 {
0372     ACPI_SUBTABLE_HEADER    Header;
0373     UINT8                   ProximityDomainLo;
0374     UINT8                   ApicId;
0375     UINT32                  Flags;
0376     UINT8                   LocalSapicEid;
0377     UINT8                   ProximityDomainHi[3];
0378     UINT32                  ClockDomain;
0379 
0380 } ACPI_SRAT_CPU_AFFINITY;
0381 
0382 /* Flags */
0383 
0384 #define ACPI_SRAT_CPU_USE_AFFINITY  (1)         /* 00: Use affinity structure */
0385 
0386 
0387 /* 1: Memory Affinity */
0388 
0389 typedef struct acpi_srat_mem_affinity
0390 {
0391     ACPI_SUBTABLE_HEADER    Header;
0392     UINT32                  ProximityDomain;
0393     UINT16                  Reserved;           /* Reserved, must be zero */
0394     UINT64                  BaseAddress;
0395     UINT64                  Length;
0396     UINT32                  Reserved1;
0397     UINT32                  Flags;
0398     UINT64                  Reserved2;          /* Reserved, must be zero */
0399 
0400 } ACPI_SRAT_MEM_AFFINITY;
0401 
0402 /* Flags */
0403 
0404 #define ACPI_SRAT_MEM_ENABLED       (1)         /* 00: Use affinity structure */
0405 #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1)      /* 01: Memory region is hot pluggable */
0406 #define ACPI_SRAT_MEM_NON_VOLATILE  (1<<2)      /* 02: Memory region is non-volatile */
0407 
0408 
0409 /* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */
0410 
0411 typedef struct acpi_srat_x2apic_cpu_affinity
0412 {
0413     ACPI_SUBTABLE_HEADER    Header;
0414     UINT16                  Reserved;           /* Reserved, must be zero */
0415     UINT32                  ProximityDomain;
0416     UINT32                  ApicId;
0417     UINT32                  Flags;
0418     UINT32                  ClockDomain;
0419     UINT32                  Reserved2;
0420 
0421 } ACPI_SRAT_X2APIC_CPU_AFFINITY;
0422 
0423 /* Flags for ACPI_SRAT_CPU_AFFINITY and ACPI_SRAT_X2APIC_CPU_AFFINITY */
0424 
0425 #define ACPI_SRAT_CPU_ENABLED       (1)         /* 00: Use affinity structure */
0426 
0427 
0428 /* 3: GICC Affinity (ACPI 5.1) */
0429 
0430 typedef struct acpi_srat_gicc_affinity
0431 {
0432     ACPI_SUBTABLE_HEADER    Header;
0433     UINT32                  ProximityDomain;
0434     UINT32                  AcpiProcessorUid;
0435     UINT32                  Flags;
0436     UINT32                  ClockDomain;
0437 
0438 } ACPI_SRAT_GICC_AFFINITY;
0439 
0440 /* Flags for ACPI_SRAT_GICC_AFFINITY */
0441 
0442 #define ACPI_SRAT_GICC_ENABLED     (1)         /* 00: Use affinity structure */
0443 
0444 
0445 /* 4: GCC ITS Affinity (ACPI 6.2) */
0446 
0447 typedef struct acpi_srat_gic_its_affinity
0448 {
0449     ACPI_SUBTABLE_HEADER    Header;
0450     UINT32                  ProximityDomain;
0451     UINT16                  Reserved;
0452     UINT32                  ItsId;
0453 
0454 } ACPI_SRAT_GIC_ITS_AFFINITY;
0455 
0456 /*
0457  * Common structure for SRAT subtable types:
0458  * 5: ACPI_SRAT_TYPE_GENERIC_AFFINITY
0459  * 6: ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY
0460  */
0461 
0462 #define ACPI_SRAT_DEVICE_HANDLE_SIZE    16
0463 
0464 typedef struct acpi_srat_generic_affinity
0465 {
0466     ACPI_SUBTABLE_HEADER    Header;
0467     UINT8                   Reserved;
0468     UINT8                   DeviceHandleType;
0469     UINT32                  ProximityDomain;
0470     UINT8                   DeviceHandle[ACPI_SRAT_DEVICE_HANDLE_SIZE];
0471     UINT32                  Flags;
0472     UINT32                  Reserved1;
0473 
0474 } ACPI_SRAT_GENERIC_AFFINITY;
0475 
0476 /* Flags for ACPI_SRAT_GENERIC_AFFINITY */
0477 
0478 #define ACPI_SRAT_GENERIC_AFFINITY_ENABLED     (1)      /* 00: Use affinity structure */
0479 #define ACPI_SRAT_ARCHITECTURAL_TRANSACTIONS   (1<<1)   /* ACPI 6.4 */
0480 
0481 /* 7: RINTC Affinity Structure(ACPI 6.6) */
0482 
0483 typedef struct acpi_srat_rintc_affinity
0484 {
0485     ACPI_SUBTABLE_HEADER    Header;
0486     UINT16                  Reserved;
0487     UINT32                  ProximityDomain;
0488     UINT32                  AcpiProcessorUid;
0489     UINT32                  Flags;
0490     UINT32                  ClockDomain;
0491 
0492 } ACPI_SRAT_RINTC_AFFINITY;
0493 
0494 /* Flags for ACPI_SRAT_RINTC_AFFINITY */
0495 
0496 #define ACPI_SRAT_RINTC_ENABLED     (1)         /* 00: Use affinity structure */
0497 
0498 /*******************************************************************************
0499  *
0500  * STAO - Status Override Table (_STA override) - ACPI 6.0
0501  *        Version 1
0502  *
0503  * Conforms to "ACPI Specification for Status Override Table"
0504  * 6 January 2015
0505  *
0506  ******************************************************************************/
0507 
0508 typedef struct acpi_table_stao
0509 {
0510     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0511     UINT8                   IgnoreUart;
0512 
0513 } ACPI_TABLE_STAO;
0514 
0515 
0516 /*******************************************************************************
0517  *
0518  * TCPA - Trusted Computing Platform Alliance table
0519  *        Version 2
0520  *
0521  * TCG Hardware Interface Table for TPM 1.2 Clients and Servers
0522  *
0523  * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
0524  * Version 1.2, Revision 8
0525  * February 27, 2017
0526  *
0527  * NOTE: There are two versions of the table with the same signature --
0528  * the client version and the server version. The common PlatformClass
0529  * field is used to differentiate the two types of tables.
0530  *
0531  ******************************************************************************/
0532 
0533 typedef struct acpi_table_tcpa_hdr
0534 {
0535     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0536     UINT16                  PlatformClass;
0537 
0538 } ACPI_TABLE_TCPA_HDR;
0539 
0540 /*
0541  * Values for PlatformClass above.
0542  * This is how the client and server subtables are differentiated
0543  */
0544 #define ACPI_TCPA_CLIENT_TABLE          0
0545 #define ACPI_TCPA_SERVER_TABLE          1
0546 
0547 
0548 typedef struct acpi_table_tcpa_client
0549 {
0550     UINT32                  MinimumLogLength;   /* Minimum length for the event log area */
0551     UINT64                  LogAddress;         /* Address of the event log area */
0552 
0553 } ACPI_TABLE_TCPA_CLIENT;
0554 
0555 typedef struct acpi_table_tcpa_server
0556 {
0557     UINT16                  Reserved;
0558     UINT64                  MinimumLogLength;   /* Minimum length for the event log area */
0559     UINT64                  LogAddress;         /* Address of the event log area */
0560     UINT16                  SpecRevision;
0561     UINT8                   DeviceFlags;
0562     UINT8                   InterruptFlags;
0563     UINT8                   GpeNumber;
0564     UINT8                   Reserved2[3];
0565     UINT32                  GlobalInterrupt;
0566     ACPI_GENERIC_ADDRESS    Address;
0567     UINT32                  Reserved3;
0568     ACPI_GENERIC_ADDRESS    ConfigAddress;
0569     UINT8                   Group;
0570     UINT8                   Bus;                /* PCI Bus/Segment/Function numbers */
0571     UINT8                   Device;
0572     UINT8                   Function;
0573 
0574 } ACPI_TABLE_TCPA_SERVER;
0575 
0576 /* Values for DeviceFlags above */
0577 
0578 #define ACPI_TCPA_PCI_DEVICE            (1)
0579 #define ACPI_TCPA_BUS_PNP               (1<<1)
0580 #define ACPI_TCPA_ADDRESS_VALID         (1<<2)
0581 
0582 /* Values for InterruptFlags above */
0583 
0584 #define ACPI_TCPA_INTERRUPT_MODE        (1)
0585 #define ACPI_TCPA_INTERRUPT_POLARITY    (1<<1)
0586 #define ACPI_TCPA_SCI_VIA_GPE           (1<<2)
0587 #define ACPI_TCPA_GLOBAL_INTERRUPT      (1<<3)
0588 
0589 
0590 /*******************************************************************************
0591  *
0592  * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
0593  *        Version 4
0594  *
0595  * TCG Hardware Interface Table for TPM 2.0 Clients and Servers
0596  *
0597  * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
0598  * Version 1.2, Revision 8
0599  * February 27, 2017
0600  *
0601  ******************************************************************************/
0602 
0603 /* Revision 3 */
0604 
0605 typedef struct acpi_table_tpm23
0606 {
0607     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0608     UINT32                  Reserved;
0609     UINT64                  ControlAddress;
0610     UINT32                  StartMethod;
0611 
0612 } ACPI_TABLE_TPM23;
0613 
0614 /* Value for StartMethod above */
0615 
0616 #define ACPI_TPM23_ACPI_START_METHOD                 2
0617 
0618 /*
0619  * Optional trailer for revision 3. If start method is 2, there is a 4 byte
0620  * reserved area of all zeros.
0621  */
0622 typedef struct acpi_tmp23_trailer
0623 {
0624     UINT32                  Reserved;
0625 
0626 } ACPI_TPM23_TRAILER;
0627 
0628 
0629 /* Revision 4 */
0630 
0631 typedef struct acpi_table_tpm2
0632 {
0633     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0634     UINT16                  PlatformClass;
0635     UINT16                  Reserved;
0636     UINT64                  ControlAddress;
0637     UINT32                  StartMethod;
0638 
0639     /* Platform-specific data follows */
0640 
0641 } ACPI_TABLE_TPM2;
0642 
0643 /* Values for StartMethod above */
0644 
0645 #define ACPI_TPM2_NOT_ALLOWED                       0
0646 #define ACPI_TPM2_RESERVED1                         1
0647 #define ACPI_TPM2_START_METHOD                      2
0648 #define ACPI_TPM2_RESERVED3                         3
0649 #define ACPI_TPM2_RESERVED4                         4
0650 #define ACPI_TPM2_RESERVED5                         5
0651 #define ACPI_TPM2_MEMORY_MAPPED                     6
0652 #define ACPI_TPM2_COMMAND_BUFFER                    7
0653 #define ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD  8
0654 #define ACPI_TPM2_RESERVED9                         9
0655 #define ACPI_TPM2_RESERVED10                        10
0656 #define ACPI_TPM2_COMMAND_BUFFER_WITH_ARM_SMC       11  /* V1.2 Rev 8 */
0657 #define ACPI_TPM2_RESERVED                          12
0658 
0659 
0660 /* Optional trailer appears after any StartMethod subtables */
0661 
0662 typedef struct acpi_tpm2_trailer
0663 {
0664     UINT8                   MethodParameters[12];
0665     UINT32                  MinimumLogLength;   /* Minimum length for the event log area */
0666     UINT64                  LogAddress;         /* Address of the event log area */
0667 
0668 } ACPI_TPM2_TRAILER;
0669 
0670 
0671 /*
0672  * Subtables (StartMethod-specific)
0673  */
0674 
0675 /* 11: Start Method for ARM SMC (V1.2 Rev 8) */
0676 
0677 typedef struct acpi_tpm2_arm_smc
0678 {
0679     UINT32                  GlobalInterrupt;
0680     UINT8                   InterruptFlags;
0681     UINT8                   OperationFlags;
0682     UINT16                  Reserved;
0683     UINT32                  FunctionId;
0684 
0685 } ACPI_TPM2_ARM_SMC;
0686 
0687 /* Values for InterruptFlags above */
0688 
0689 #define ACPI_TPM2_INTERRUPT_SUPPORT     (1)
0690 
0691 /* Values for OperationFlags above */
0692 
0693 #define ACPI_TPM2_IDLE_SUPPORT          (1)
0694 
0695 
0696 /*******************************************************************************
0697  *
0698  * UEFI - UEFI Boot optimization Table
0699  *        Version 1
0700  *
0701  * Conforms to "Unified Extensible Firmware Interface Specification",
0702  * Version 2.3, May 8, 2009
0703  *
0704  ******************************************************************************/
0705 
0706 typedef struct acpi_table_uefi
0707 {
0708     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0709     UINT8                   Identifier[16];     /* UUID identifier */
0710     UINT16                  DataOffset;         /* Offset of remaining data in table */
0711 
0712 } ACPI_TABLE_UEFI;
0713 
0714 
0715 /*******************************************************************************
0716  *
0717  * VIOT - Virtual I/O Translation Table
0718  *        Version 1
0719  *
0720  ******************************************************************************/
0721 
0722 typedef struct acpi_table_viot
0723 {
0724     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0725     UINT16                  NodeCount;
0726     UINT16                  NodeOffset;
0727     UINT8                   Reserved[8];
0728 
0729 } ACPI_TABLE_VIOT;
0730 
0731 /* VIOT subtable header */
0732 
0733 typedef struct acpi_viot_header
0734 {
0735     UINT8                   Type;
0736     UINT8                   Reserved;
0737     UINT16                  Length;
0738 
0739 } ACPI_VIOT_HEADER;
0740 
0741 /* Values for Type field above */
0742 
0743 enum AcpiViotNodeType
0744 {
0745     ACPI_VIOT_NODE_PCI_RANGE            = 0x01,
0746     ACPI_VIOT_NODE_MMIO                 = 0x02,
0747     ACPI_VIOT_NODE_VIRTIO_IOMMU_PCI     = 0x03,
0748     ACPI_VIOT_NODE_VIRTIO_IOMMU_MMIO    = 0x04,
0749     ACPI_VIOT_RESERVED                  = 0x05
0750 };
0751 
0752 /* VIOT subtables */
0753 
0754 typedef struct acpi_viot_pci_range
0755 {
0756     ACPI_VIOT_HEADER        Header;
0757     UINT32                  EndpointStart;
0758     UINT16                  SegmentStart;
0759     UINT16                  SegmentEnd;
0760     UINT16                  BdfStart;
0761     UINT16                  BdfEnd;
0762     UINT16                  OutputNode;
0763     UINT8                   Reserved[6];
0764 
0765 } ACPI_VIOT_PCI_RANGE;
0766 
0767 typedef struct acpi_viot_mmio
0768 {
0769     ACPI_VIOT_HEADER        Header;
0770     UINT32                  Endpoint;
0771     UINT64                  BaseAddress;
0772     UINT16                  OutputNode;
0773     UINT8                   Reserved[6];
0774 
0775 } ACPI_VIOT_MMIO;
0776 
0777 typedef struct acpi_viot_virtio_iommu_pci
0778 {
0779     ACPI_VIOT_HEADER        Header;
0780     UINT16                  Segment;
0781     UINT16                  Bdf;
0782     UINT8                   Reserved[8];
0783 
0784 } ACPI_VIOT_VIRTIO_IOMMU_PCI;
0785 
0786 typedef struct acpi_viot_virtio_iommu_mmio
0787 {
0788     ACPI_VIOT_HEADER        Header;
0789     UINT8                   Reserved[4];
0790     UINT64                  BaseAddress;
0791 
0792 } ACPI_VIOT_VIRTIO_IOMMU_MMIO;
0793 
0794 
0795 /*******************************************************************************
0796  *
0797  * WAET - Windows ACPI Emulated devices Table
0798  *        Version 1
0799  *
0800  * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009
0801  *
0802  ******************************************************************************/
0803 
0804 typedef struct acpi_table_waet
0805 {
0806     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0807     UINT32                  Flags;
0808 
0809 } ACPI_TABLE_WAET;
0810 
0811 /* Masks for Flags field above */
0812 
0813 #define ACPI_WAET_RTC_NO_ACK        (1)         /* RTC requires no int acknowledge */
0814 #define ACPI_WAET_TIMER_ONE_READ    (1<<1)      /* PM timer requires only one read */
0815 
0816 
0817 /*******************************************************************************
0818  *
0819  * WDAT - Watchdog Action Table
0820  *        Version 1
0821  *
0822  * Conforms to "Hardware Watchdog Timers Design Specification",
0823  * Copyright 2006 Microsoft Corporation.
0824  *
0825  ******************************************************************************/
0826 
0827 typedef struct acpi_table_wdat
0828 {
0829     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0830     UINT32                  HeaderLength;       /* Watchdog Header Length */
0831     UINT16                  PciSegment;         /* PCI Segment number */
0832     UINT8                   PciBus;             /* PCI Bus number */
0833     UINT8                   PciDevice;          /* PCI Device number */
0834     UINT8                   PciFunction;        /* PCI Function number */
0835     UINT8                   Reserved[3];
0836     UINT32                  TimerPeriod;        /* Period of one timer count (msec) */
0837     UINT32                  MaxCount;           /* Maximum counter value supported */
0838     UINT32                  MinCount;           /* Minimum counter value */
0839     UINT8                   Flags;
0840     UINT8                   Reserved2[3];
0841     UINT32                  Entries;            /* Number of watchdog entries that follow */
0842 
0843 } ACPI_TABLE_WDAT;
0844 
0845 /* Masks for Flags field above */
0846 
0847 #define ACPI_WDAT_ENABLED           (1)
0848 #define ACPI_WDAT_STOPPED           0x80
0849 
0850 
0851 /* WDAT Instruction Entries (actions) */
0852 
0853 typedef struct acpi_wdat_entry
0854 {
0855     UINT8                   Action;
0856     UINT8                   Instruction;
0857     UINT16                  Reserved;
0858     ACPI_GENERIC_ADDRESS    RegisterRegion;
0859     UINT32                  Value;              /* Value used with Read/Write register */
0860     UINT32                  Mask;               /* Bitmask required for this register instruction */
0861 
0862 } ACPI_WDAT_ENTRY;
0863 
0864 /* Values for Action field above */
0865 
0866 enum AcpiWdatActions
0867 {
0868     ACPI_WDAT_RESET                 = 1,
0869     ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
0870     ACPI_WDAT_GET_COUNTDOWN         = 5,
0871     ACPI_WDAT_SET_COUNTDOWN         = 6,
0872     ACPI_WDAT_GET_RUNNING_STATE     = 8,
0873     ACPI_WDAT_SET_RUNNING_STATE     = 9,
0874     ACPI_WDAT_GET_STOPPED_STATE     = 10,
0875     ACPI_WDAT_SET_STOPPED_STATE     = 11,
0876     ACPI_WDAT_GET_REBOOT            = 16,
0877     ACPI_WDAT_SET_REBOOT            = 17,
0878     ACPI_WDAT_GET_SHUTDOWN          = 18,
0879     ACPI_WDAT_SET_SHUTDOWN          = 19,
0880     ACPI_WDAT_GET_STATUS            = 32,
0881     ACPI_WDAT_SET_STATUS            = 33,
0882     ACPI_WDAT_ACTION_RESERVED       = 34    /* 34 and greater are reserved */
0883 };
0884 
0885 /* Values for Instruction field above */
0886 
0887 enum AcpiWdatInstructions
0888 {
0889     ACPI_WDAT_READ_VALUE            = 0,
0890     ACPI_WDAT_READ_COUNTDOWN        = 1,
0891     ACPI_WDAT_WRITE_VALUE           = 2,
0892     ACPI_WDAT_WRITE_COUNTDOWN       = 3,
0893     ACPI_WDAT_INSTRUCTION_RESERVED  = 4,    /* 4 and greater are reserved */
0894     ACPI_WDAT_PRESERVE_REGISTER     = 0x80  /* Except for this value */
0895 };
0896 
0897 
0898 /*******************************************************************************
0899  *
0900  * WDDT - Watchdog Descriptor Table
0901  *        Version 1
0902  *
0903  * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",
0904  * Version 001, September 2002
0905  *
0906  ******************************************************************************/
0907 
0908 typedef struct acpi_table_wddt
0909 {
0910     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0911     UINT16                  SpecVersion;
0912     UINT16                  TableVersion;
0913     UINT16                  PciVendorId;
0914     ACPI_GENERIC_ADDRESS    Address;
0915     UINT16                  MaxCount;           /* Maximum counter value supported */
0916     UINT16                  MinCount;           /* Minimum counter value supported */
0917     UINT16                  Period;
0918     UINT16                  Status;
0919     UINT16                  Capability;
0920 
0921 } ACPI_TABLE_WDDT;
0922 
0923 /* Flags for Status field above */
0924 
0925 #define ACPI_WDDT_AVAILABLE     (1)
0926 #define ACPI_WDDT_ACTIVE        (1<<1)
0927 #define ACPI_WDDT_TCO_OS_OWNED  (1<<2)
0928 #define ACPI_WDDT_USER_RESET    (1<<11)
0929 #define ACPI_WDDT_WDT_RESET     (1<<12)
0930 #define ACPI_WDDT_POWER_FAIL    (1<<13)
0931 #define ACPI_WDDT_UNKNOWN_RESET (1<<14)
0932 
0933 /* Flags for Capability field above */
0934 
0935 #define ACPI_WDDT_AUTO_RESET    (1)
0936 #define ACPI_WDDT_ALERT_SUPPORT (1<<1)
0937 
0938 
0939 /*******************************************************************************
0940  *
0941  * WDRT - Watchdog Resource Table
0942  *        Version 1
0943  *
0944  * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",
0945  * Version 1.01, August 28, 2006
0946  *
0947  ******************************************************************************/
0948 
0949 typedef struct acpi_table_wdrt
0950 {
0951     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0952     ACPI_GENERIC_ADDRESS    ControlRegister;
0953     ACPI_GENERIC_ADDRESS    CountRegister;
0954     UINT16                  PciDeviceId;
0955     UINT16                  PciVendorId;
0956     UINT8                   PciBus;             /* PCI Bus number */
0957     UINT8                   PciDevice;          /* PCI Device number */
0958     UINT8                   PciFunction;        /* PCI Function number */
0959     UINT8                   PciSegment;         /* PCI Segment number */
0960     UINT16                  MaxCount;           /* Maximum counter value supported */
0961     UINT8                   Units;
0962 
0963 } ACPI_TABLE_WDRT;
0964 
0965 
0966 /*******************************************************************************
0967  *
0968  * WPBT - Windows Platform Environment Table (ACPI 6.0)
0969  *        Version 1
0970  *
0971  * Conforms to "Windows Platform Binary Table (WPBT)" 29 November 2011
0972  *
0973  ******************************************************************************/
0974 
0975 typedef struct acpi_table_wpbt
0976 {
0977     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0978     UINT32                  HandoffSize;
0979     UINT64                  HandoffAddress;
0980     UINT8                   Layout;
0981     UINT8                   Type;
0982     UINT16                  ArgumentsLength;
0983 
0984 } ACPI_TABLE_WPBT;
0985 
0986 typedef struct acpi_wpbt_unicode
0987 {
0988     UINT16                  *UnicodeString;
0989 
0990 } ACPI_WPBT_UNICODE;
0991 
0992 
0993 /*******************************************************************************
0994  *
0995  * WSMT - Windows SMM Security Mitigations Table
0996  *        Version 1
0997  *
0998  * Conforms to "Windows SMM Security Mitigations Table",
0999  * Version 1.0, April 18, 2016
1000  *
1001  ******************************************************************************/
1002 
1003 typedef struct acpi_table_wsmt
1004 {
1005     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1006     UINT32                  ProtectionFlags;
1007 
1008 } ACPI_TABLE_WSMT;
1009 
1010 /* Flags for ProtectionFlags field above */
1011 
1012 #define ACPI_WSMT_FIXED_COMM_BUFFERS                (1)
1013 #define ACPI_WSMT_COMM_BUFFER_NESTED_PTR_PROTECTION (2)
1014 #define ACPI_WSMT_SYSTEM_RESOURCE_PROTECTION        (4)
1015 
1016 
1017 /*******************************************************************************
1018  *
1019  * XENV - Xen Environment Table (ACPI 6.0)
1020  *        Version 1
1021  *
1022  * Conforms to "ACPI Specification for Xen Environment Table" 4 January 2015
1023  *
1024  ******************************************************************************/
1025 
1026 typedef struct acpi_table_xenv
1027 {
1028     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1029     UINT64                  GrantTableAddress;
1030     UINT64                  GrantTableSize;
1031     UINT32                  EventInterrupt;
1032     UINT8                   EventFlags;
1033 
1034 } ACPI_TABLE_XENV;
1035 
1036 
1037 /* Reset to default packing */
1038 
1039 #pragma pack()
1040 
1041 #endif /* __ACTBL3_H__ */