Path: blob/main/sys/contrib/dev/acpica/include/actbl3.h
105377 views
/******************************************************************************1*2* Name: actbl3.h - ACPI Table Definitions3*4*****************************************************************************/56/******************************************************************************7*8* 1. Copyright Notice9*10* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.11* All rights reserved.12*13* 2. License14*15* 2.1. This is your license from Intel Corp. under its intellectual property16* rights. You may have additional license terms from the party that provided17* you this software, covering your right to use that party's intellectual18* property rights.19*20* 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a21* copy of the source code appearing in this file ("Covered Code") an22* irrevocable, perpetual, worldwide license under Intel's copyrights in the23* base code distributed originally by Intel ("Original Intel Code") to copy,24* make derivatives, distribute, use and display any portion of the Covered25* Code in any form, with the right to sublicense such rights; and26*27* 2.3. Intel grants Licensee a non-exclusive and non-transferable patent28* license (with the right to sublicense), under only those claims of Intel29* patents that are infringed by the Original Intel Code, to make, use, sell,30* offer to sell, and import the Covered Code and derivative works thereof31* solely to the minimum extent necessary to exercise the above copyright32* license, and in no event shall the patent license extend to any additions33* to or modifications of the Original Intel Code. No other license or right34* is granted directly or by implication, estoppel or otherwise;35*36* The above copyright and patent license is granted only if the following37* conditions are met:38*39* 3. Conditions40*41* 3.1. Redistribution of Source with Rights to Further Distribute Source.42* Redistribution of source code of any substantial portion of the Covered43* Code or modification with rights to further distribute source must include44* the above Copyright Notice, the above License, this list of Conditions,45* and the following Disclaimer and Export Compliance provision. In addition,46* Licensee must cause all Covered Code to which Licensee contributes to47* contain a file documenting the changes Licensee made to create that Covered48* Code and the date of any change. Licensee must include in that file the49* documentation of any changes made by any predecessor Licensee. Licensee50* must include a prominent statement that the modification is derived,51* directly or indirectly, from Original Intel Code.52*53* 3.2. Redistribution of Source with no Rights to Further Distribute Source.54* Redistribution of source code of any substantial portion of the Covered55* Code or modification without rights to further distribute source must56* include the following Disclaimer and Export Compliance provision in the57* documentation and/or other materials provided with distribution. In58* addition, Licensee may not authorize further sublicense of source of any59* portion of the Covered Code, and must include terms to the effect that the60* license from Licensee to its licensee is limited to the intellectual61* property embodied in the software Licensee provides to its licensee, and62* not to intellectual property embodied in modifications its licensee may63* make.64*65* 3.3. Redistribution of Executable. Redistribution in executable form of any66* substantial portion of the Covered Code or modification must reproduce the67* above Copyright Notice, and the following Disclaimer and Export Compliance68* provision in the documentation and/or other materials provided with the69* distribution.70*71* 3.4. Intel retains all right, title, and interest in and to the Original72* Intel Code.73*74* 3.5. Neither the name Intel nor any other trademark owned or controlled by75* Intel shall be used in advertising or otherwise to promote the sale, use or76* other dealings in products derived from or relating to the Covered Code77* without prior written authorization from Intel.78*79* 4. Disclaimer and Export Compliance80*81* 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED82* HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE83* IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,84* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY85* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY86* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A87* PARTICULAR PURPOSE.88*89* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES90* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR91* COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,92* SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY93* CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL94* HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS95* SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY96* LIMITED REMEDY.97*98* 4.3. Licensee shall not export, either directly or indirectly, any of this99* software or system incorporating such software without first obtaining any100* required license or other approval from the U. S. Department of Commerce or101* any other agency or department of the United States Government. In the102* event Licensee exports any such software from the United States or103* re-exports any such software from a foreign destination, Licensee shall104* ensure that the distribution and export/re-export of the software is in105* compliance with all laws, regulations, orders, or other restrictions of the106* U.S. Export Administration Regulations. Licensee agrees that neither it nor107* any of its subsidiaries will export/re-export any technical data, process,108* software, or service, directly or indirectly, to any country for which the109* United States government or any agency thereof requires an export license,110* other governmental approval, or letter of assurance, without first obtaining111* such license, approval or letter.112*113*****************************************************************************114*115* Alternatively, you may choose to be licensed under the terms of the116* following license:117*118* Redistribution and use in source and binary forms, with or without119* modification, are permitted provided that the following conditions120* are met:121* 1. Redistributions of source code must retain the above copyright122* notice, this list of conditions, and the following disclaimer,123* without modification.124* 2. Redistributions in binary form must reproduce at minimum a disclaimer125* substantially similar to the "NO WARRANTY" disclaimer below126* ("Disclaimer") and any redistribution must be conditioned upon127* including a substantially similar Disclaimer requirement for further128* binary redistribution.129* 3. Neither the names of the above-listed copyright holders nor the names130* of any contributors may be used to endorse or promote products derived131* from this software without specific prior written permission.132*133* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS134* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT135* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR136* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT137* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,138* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT139* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,140* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY141* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT142* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE143* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.144*145* Alternatively, you may choose to be licensed under the terms of the146* GNU General Public License ("GPL") version 2 as published by the Free147* Software Foundation.148*149*****************************************************************************/150151#ifndef __ACTBL3_H__152#define __ACTBL3_H__153154155/*******************************************************************************156*157* Additional ACPI Tables158*159* These tables are not consumed directly by the ACPICA subsystem, but are160* included here to support device drivers and the AML disassembler.161*162******************************************************************************/163164165/*166* Values for description table header signatures for tables defined in this167* file. Useful because they make it more difficult to inadvertently type in168* the wrong signature.169*/170#define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */171#define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */172#define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */173#define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */174#define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */175#define ACPI_SIG_STAO "STAO" /* Status Override table */176#define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */177#define ACPI_SIG_TPM2 "TPM2" /* Trusted Platform Module 2.0 H/W interface table */178#define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */179#define ACPI_SIG_VIOT "VIOT" /* Virtual I/O Translation Table */180#define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */181#define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */182#define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */183#define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */184#define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */185#define ACPI_SIG_WSMT "WSMT" /* Windows SMM Security Mitigations Table */186#define ACPI_SIG_XENV "XENV" /* Xen Environment table */187#define ACPI_SIG_XXXX "XXXX" /* Intermediate AML header for ASL/ASL+ converter */188189/*190* All tables must be byte-packed to match the ACPI specification, since191* the tables are provided by the system BIOS.192*/193#pragma pack(1)194195/*196* Note: C bitfields are not used for this reason:197*198* "Bitfields are great and easy to read, but unfortunately the C language199* does not specify the layout of bitfields in memory, which means they are200* essentially useless for dealing with packed data in on-disk formats or201* binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,202* this decision was a design error in C. Ritchie could have picked an order203* and stuck with it." Norman Ramsey.204* See http://stackoverflow.com/a/1053662/41661205*/206207208/*******************************************************************************209*210* SLIC - Software Licensing Description Table211*212* Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",213* November 29, 2011. Copyright 2011 Microsoft214*215******************************************************************************/216217/* Basic SLIC table is only the common ACPI header */218219typedef struct acpi_table_slic220{221ACPI_TABLE_HEADER Header; /* Common ACPI table header */222223} ACPI_TABLE_SLIC;224225226/*******************************************************************************227*228* SLIT - System Locality Distance Information Table229* Version 1230*231******************************************************************************/232233typedef struct acpi_table_slit234{235ACPI_TABLE_HEADER Header; /* Common ACPI table header */236UINT64 LocalityCount;237UINT8 Entry[1]; /* Real size = localities^2 */238239} ACPI_TABLE_SLIT;240241242/*******************************************************************************243*244* SPCR - Serial Port Console Redirection table245* Version 4246*247* Conforms to "Serial Port Console Redirection Table",248* Version 1.10, Jan 5, 2023249*250******************************************************************************/251252typedef struct acpi_table_spcr253{254ACPI_TABLE_HEADER Header; /* Common ACPI table header */255UINT8 InterfaceType; /* 0=full 16550, 1=subset of 16550 */256UINT8 Reserved[3];257ACPI_GENERIC_ADDRESS SerialPort;258UINT8 InterruptType;259UINT8 PcInterrupt;260UINT32 Interrupt;261UINT8 BaudRate;262UINT8 Parity;263UINT8 StopBits;264UINT8 FlowControl;265UINT8 TerminalType;266UINT8 Language;267UINT16 PciDeviceId;268UINT16 PciVendorId;269UINT8 PciBus;270UINT8 PciDevice;271UINT8 PciFunction;272UINT32 PciFlags;273UINT8 PciSegment;274UINT32 UartClkFreq;275UINT32 PreciseBaudrate;276UINT16 NameSpaceStringLength;277UINT16 NameSpaceStringOffset;278char NameSpaceString[];279280} ACPI_TABLE_SPCR;281282/* Masks for PciFlags field above */283284#define ACPI_SPCR_DO_NOT_DISABLE (1)285286/* Values for Interface Type: See the definition of the DBG2 table */287288289/*******************************************************************************290*291* SPMI - Server Platform Management Interface table292* Version 5293*294* Conforms to "Intelligent Platform Management Interface Specification295* Second Generation v2.0", Document Revision 1.0, February 12, 2004 with296* June 12, 2009 markup.297*298******************************************************************************/299300typedef struct acpi_table_spmi301{302ACPI_TABLE_HEADER Header; /* Common ACPI table header */303UINT8 InterfaceType;304UINT8 Reserved; /* Must be 1 */305UINT16 SpecRevision; /* Version of IPMI */306UINT8 InterruptType;307UINT8 GpeNumber; /* GPE assigned */308UINT8 Reserved1;309UINT8 PciDeviceFlag;310UINT32 Interrupt;311ACPI_GENERIC_ADDRESS IpmiRegister;312UINT8 PciSegment;313UINT8 PciBus;314UINT8 PciDevice;315UINT8 PciFunction;316UINT8 Reserved2;317318} ACPI_TABLE_SPMI;319320/* Values for InterfaceType above */321322enum AcpiSpmiInterfaceTypes323{324ACPI_SPMI_NOT_USED = 0,325ACPI_SPMI_KEYBOARD = 1,326ACPI_SPMI_SMI = 2,327ACPI_SPMI_BLOCK_TRANSFER = 3,328ACPI_SPMI_SMBUS = 4,329ACPI_SPMI_RESERVED = 5 /* 5 and above are reserved */330};331332333/*******************************************************************************334*335* SRAT - System Resource Affinity Table336* Version 3337*338******************************************************************************/339340typedef struct acpi_table_srat341{342ACPI_TABLE_HEADER Header; /* Common ACPI table header */343UINT32 TableRevision; /* Must be value '1' */344UINT64 Reserved; /* Reserved, must be zero */345346} ACPI_TABLE_SRAT;347348/* Values for subtable type in ACPI_SUBTABLE_HEADER */349350enum AcpiSratType351{352ACPI_SRAT_TYPE_CPU_AFFINITY = 0,353ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1,354ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2,355ACPI_SRAT_TYPE_GICC_AFFINITY = 3,356ACPI_SRAT_TYPE_GIC_ITS_AFFINITY = 4, /* ACPI 6.2 */357ACPI_SRAT_TYPE_GENERIC_AFFINITY = 5, /* ACPI 6.3 */358ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY = 6, /* ACPI 6.4 */359ACPI_SRAT_TYPE_RINTC_AFFINITY = 7, /* ACPI 6.6 */360ACPI_SRAT_TYPE_RESERVED = 8 /* 8 and greater are reserved */361};362363/*364* SRAT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER365*/366367/* 0: Processor Local APIC/SAPIC Affinity */368369typedef struct acpi_srat_cpu_affinity370{371ACPI_SUBTABLE_HEADER Header;372UINT8 ProximityDomainLo;373UINT8 ApicId;374UINT32 Flags;375UINT8 LocalSapicEid;376UINT8 ProximityDomainHi[3];377UINT32 ClockDomain;378379} ACPI_SRAT_CPU_AFFINITY;380381/* Flags */382383#define ACPI_SRAT_CPU_USE_AFFINITY (1) /* 00: Use affinity structure */384385386/* 1: Memory Affinity */387388typedef struct acpi_srat_mem_affinity389{390ACPI_SUBTABLE_HEADER Header;391UINT32 ProximityDomain;392UINT16 Reserved; /* Reserved, must be zero */393UINT64 BaseAddress;394UINT64 Length;395UINT32 Reserved1;396UINT32 Flags;397UINT64 Reserved2; /* Reserved, must be zero */398399} ACPI_SRAT_MEM_AFFINITY;400401/* Flags */402403#define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */404#define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */405#define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */406#define ACPI_SRAT_MEM_SPEC_PURPOSE (1<<3) /* 03: Memory is intended for specific-purpose usage */407408409/* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */410411typedef struct acpi_srat_x2apic_cpu_affinity412{413ACPI_SUBTABLE_HEADER Header;414UINT16 Reserved; /* Reserved, must be zero */415UINT32 ProximityDomain;416UINT32 ApicId;417UINT32 Flags;418UINT32 ClockDomain;419UINT32 Reserved2;420421} ACPI_SRAT_X2APIC_CPU_AFFINITY;422423/* Flags for ACPI_SRAT_CPU_AFFINITY and ACPI_SRAT_X2APIC_CPU_AFFINITY */424425#define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */426427428/* 3: GICC Affinity (ACPI 5.1) */429430typedef struct acpi_srat_gicc_affinity431{432ACPI_SUBTABLE_HEADER Header;433UINT32 ProximityDomain;434UINT32 AcpiProcessorUid;435UINT32 Flags;436UINT32 ClockDomain;437438} ACPI_SRAT_GICC_AFFINITY;439440/* Flags for ACPI_SRAT_GICC_AFFINITY */441442#define ACPI_SRAT_GICC_ENABLED (1) /* 00: Use affinity structure */443444445/* 4: GIC ITS Affinity (ACPI 6.2) */446447typedef struct acpi_srat_gic_its_affinity448{449ACPI_SUBTABLE_HEADER Header;450UINT32 ProximityDomain;451UINT16 Reserved;452UINT32 ItsId;453454} ACPI_SRAT_GIC_ITS_AFFINITY;455456/*457* Common structure for SRAT subtable types:458* 5: ACPI_SRAT_TYPE_GENERIC_AFFINITY459* 6: ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY460*/461462#define ACPI_SRAT_DEVICE_HANDLE_SIZE 16463464typedef struct acpi_srat_generic_affinity465{466ACPI_SUBTABLE_HEADER Header;467UINT8 Reserved;468UINT8 DeviceHandleType;469UINT32 ProximityDomain;470UINT8 DeviceHandle[ACPI_SRAT_DEVICE_HANDLE_SIZE];471UINT32 Flags;472UINT32 Reserved1;473474} ACPI_SRAT_GENERIC_AFFINITY;475476/* Flags for ACPI_SRAT_GENERIC_AFFINITY */477478#define ACPI_SRAT_GENERIC_AFFINITY_ENABLED (1) /* 00: Use affinity structure */479#define ACPI_SRAT_ARCHITECTURAL_TRANSACTIONS (1<<1) /* ACPI 6.4 */480481/* 7: RINTC Affinity Structure(ACPI 6.6) */482483typedef struct acpi_srat_rintc_affinity484{485ACPI_SUBTABLE_HEADER Header;486UINT16 Reserved;487UINT32 ProximityDomain;488UINT32 AcpiProcessorUid;489UINT32 Flags;490UINT32 ClockDomain;491492} ACPI_SRAT_RINTC_AFFINITY;493494/* Flags for ACPI_SRAT_RINTC_AFFINITY */495496#define ACPI_SRAT_RINTC_ENABLED (1) /* 00: Use affinity structure */497498/*******************************************************************************499*500* STAO - Status Override Table (_STA override) - ACPI 6.0501* Version 1502*503* Conforms to "ACPI Specification for Status Override Table"504* 6 January 2015505*506******************************************************************************/507508typedef struct acpi_table_stao509{510ACPI_TABLE_HEADER Header; /* Common ACPI table header */511UINT8 IgnoreUart;512513} ACPI_TABLE_STAO;514515516/*******************************************************************************517*518* TCPA - Trusted Computing Platform Alliance table519* Version 2520*521* TCG Hardware Interface Table for TPM 1.2 Clients and Servers522*523* Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",524* Version 1.2, Revision 8525* February 27, 2017526*527* NOTE: There are two versions of the table with the same signature --528* the client version and the server version. The common PlatformClass529* field is used to differentiate the two types of tables.530*531******************************************************************************/532533typedef struct acpi_table_tcpa_hdr534{535ACPI_TABLE_HEADER Header; /* Common ACPI table header */536UINT16 PlatformClass;537538} ACPI_TABLE_TCPA_HDR;539540/*541* Values for PlatformClass above.542* This is how the client and server subtables are differentiated543*/544#define ACPI_TCPA_CLIENT_TABLE 0545#define ACPI_TCPA_SERVER_TABLE 1546547548typedef struct acpi_table_tcpa_client549{550UINT32 MinimumLogLength; /* Minimum length for the event log area */551UINT64 LogAddress; /* Address of the event log area */552553} ACPI_TABLE_TCPA_CLIENT;554555typedef struct acpi_table_tcpa_server556{557UINT16 Reserved;558UINT64 MinimumLogLength; /* Minimum length for the event log area */559UINT64 LogAddress; /* Address of the event log area */560UINT16 SpecRevision;561UINT8 DeviceFlags;562UINT8 InterruptFlags;563UINT8 GpeNumber;564UINT8 Reserved2[3];565UINT32 GlobalInterrupt;566ACPI_GENERIC_ADDRESS Address;567UINT32 Reserved3;568ACPI_GENERIC_ADDRESS ConfigAddress;569UINT8 Group;570UINT8 Bus; /* PCI Bus/Segment/Function numbers */571UINT8 Device;572UINT8 Function;573574} ACPI_TABLE_TCPA_SERVER;575576/* Values for DeviceFlags above */577578#define ACPI_TCPA_PCI_DEVICE (1)579#define ACPI_TCPA_BUS_PNP (1<<1)580#define ACPI_TCPA_ADDRESS_VALID (1<<2)581582/* Values for InterruptFlags above */583584#define ACPI_TCPA_INTERRUPT_MODE (1)585#define ACPI_TCPA_INTERRUPT_POLARITY (1<<1)586#define ACPI_TCPA_SCI_VIA_GPE (1<<2)587#define ACPI_TCPA_GLOBAL_INTERRUPT (1<<3)588589590/*******************************************************************************591*592* TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table593* Version 4594*595* TCG Hardware Interface Table for TPM 2.0 Clients and Servers596*597* Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",598* Version 1.2, Revision 8599* February 27, 2017600*601******************************************************************************/602603/* Revision 3 */604605typedef struct acpi_table_tpm23606{607ACPI_TABLE_HEADER Header; /* Common ACPI table header */608UINT32 Reserved;609UINT64 ControlAddress;610UINT32 StartMethod;611612} ACPI_TABLE_TPM23;613614/* Value for StartMethod above */615616#define ACPI_TPM23_ACPI_START_METHOD 2617618/*619* Optional trailer for revision 3. If start method is 2, there is a 4 byte620* reserved area of all zeros.621*/622typedef struct acpi_tmp23_trailer623{624UINT32 Reserved;625626} ACPI_TPM23_TRAILER;627628629/* Revision 4 */630631typedef struct acpi_table_tpm2632{633ACPI_TABLE_HEADER Header; /* Common ACPI table header */634UINT16 PlatformClass;635UINT16 Reserved;636UINT64 ControlAddress;637UINT32 StartMethod;638639/* Platform-specific data follows */640641} ACPI_TABLE_TPM2;642643/* Values for StartMethod above */644645#define ACPI_TPM2_NOT_ALLOWED 0646#define ACPI_TPM2_RESERVED1 1647#define ACPI_TPM2_START_METHOD 2648#define ACPI_TPM2_RESERVED3 3649#define ACPI_TPM2_RESERVED4 4650#define ACPI_TPM2_RESERVED5 5651#define ACPI_TPM2_MEMORY_MAPPED 6652#define ACPI_TPM2_COMMAND_BUFFER 7653#define ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD 8654#define ACPI_TPM2_RESERVED9 9655#define ACPI_TPM2_RESERVED10 10656#define ACPI_TPM2_COMMAND_BUFFER_WITH_ARM_SMC 11 /* V1.2 Rev 8 */657#define ACPI_TPM2_RESERVED 12658#define ACPI_TPM2_COMMAND_BUFFER_WITH_PLUTON 13659#define ACPI_TPM2_CRB_WITH_ARM_FFA 15660661662/* Optional trailer appears after any StartMethod subtables */663664typedef struct acpi_tpm2_trailer665{666UINT8 MethodParameters[12];667UINT32 MinimumLogLength; /* Minimum length for the event log area */668UINT64 LogAddress; /* Address of the event log area */669670} ACPI_TPM2_TRAILER;671672673/*674* Subtables (StartMethod-specific)675*/676677/* 11: Start Method for ARM SMC (V1.2 Rev 8) */678679typedef struct acpi_tpm2_arm_smc680{681UINT32 GlobalInterrupt;682UINT8 InterruptFlags;683UINT8 OperationFlags;684UINT16 Reserved;685UINT32 FunctionId;686687} ACPI_TPM2_ARM_SMC;688689/* Values for InterruptFlags above */690691#define ACPI_TPM2_INTERRUPT_SUPPORT (1)692693/* Values for OperationFlags above */694695#define ACPI_TPM2_IDLE_SUPPORT (1)696697698/*******************************************************************************699*700* UEFI - UEFI Boot optimization Table701* Version 1702*703* Conforms to "Unified Extensible Firmware Interface Specification",704* Version 2.3, May 8, 2009705*706******************************************************************************/707708typedef struct acpi_table_uefi709{710ACPI_TABLE_HEADER Header; /* Common ACPI table header */711UINT8 Identifier[16]; /* UUID identifier */712UINT16 DataOffset; /* Offset of remaining data in table */713714} ACPI_TABLE_UEFI;715716717/*******************************************************************************718*719* VIOT - Virtual I/O Translation Table720* Version 1721*722******************************************************************************/723724typedef struct acpi_table_viot725{726ACPI_TABLE_HEADER Header; /* Common ACPI table header */727UINT16 NodeCount;728UINT16 NodeOffset;729UINT8 Reserved[8];730731} ACPI_TABLE_VIOT;732733/* VIOT subtable header */734735typedef struct acpi_viot_header736{737UINT8 Type;738UINT8 Reserved;739UINT16 Length;740741} ACPI_VIOT_HEADER;742743/* Values for Type field above */744745enum AcpiViotNodeType746{747ACPI_VIOT_NODE_PCI_RANGE = 0x01,748ACPI_VIOT_NODE_MMIO = 0x02,749ACPI_VIOT_NODE_VIRTIO_IOMMU_PCI = 0x03,750ACPI_VIOT_NODE_VIRTIO_IOMMU_MMIO = 0x04,751ACPI_VIOT_RESERVED = 0x05752};753754/* VIOT subtables */755756typedef struct acpi_viot_pci_range757{758ACPI_VIOT_HEADER Header;759UINT32 EndpointStart;760UINT16 SegmentStart;761UINT16 SegmentEnd;762UINT16 BdfStart;763UINT16 BdfEnd;764UINT16 OutputNode;765UINT8 Reserved[6];766767} ACPI_VIOT_PCI_RANGE;768769typedef struct acpi_viot_mmio770{771ACPI_VIOT_HEADER Header;772UINT32 Endpoint;773UINT64 BaseAddress;774UINT16 OutputNode;775UINT8 Reserved[6];776777} ACPI_VIOT_MMIO;778779typedef struct acpi_viot_virtio_iommu_pci780{781ACPI_VIOT_HEADER Header;782UINT16 Segment;783UINT16 Bdf;784UINT8 Reserved[8];785786} ACPI_VIOT_VIRTIO_IOMMU_PCI;787788typedef struct acpi_viot_virtio_iommu_mmio789{790ACPI_VIOT_HEADER Header;791UINT8 Reserved[4];792UINT64 BaseAddress;793794} ACPI_VIOT_VIRTIO_IOMMU_MMIO;795796797/*******************************************************************************798*799* WAET - Windows ACPI Emulated devices Table800* Version 1801*802* Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009803*804******************************************************************************/805806typedef struct acpi_table_waet807{808ACPI_TABLE_HEADER Header; /* Common ACPI table header */809UINT32 Flags;810811} ACPI_TABLE_WAET;812813/* Masks for Flags field above */814815#define ACPI_WAET_RTC_NO_ACK (1) /* RTC requires no int acknowledge */816#define ACPI_WAET_TIMER_ONE_READ (1<<1) /* PM timer requires only one read */817818819/*******************************************************************************820*821* WDAT - Watchdog Action Table822* Version 1823*824* Conforms to "Hardware Watchdog Timers Design Specification",825* Copyright 2006 Microsoft Corporation.826*827******************************************************************************/828829typedef struct acpi_table_wdat830{831ACPI_TABLE_HEADER Header; /* Common ACPI table header */832UINT32 HeaderLength; /* Watchdog Header Length */833UINT16 PciSegment; /* PCI Segment number */834UINT8 PciBus; /* PCI Bus number */835UINT8 PciDevice; /* PCI Device number */836UINT8 PciFunction; /* PCI Function number */837UINT8 Reserved[3];838UINT32 TimerPeriod; /* Period of one timer count (msec) */839UINT32 MaxCount; /* Maximum counter value supported */840UINT32 MinCount; /* Minimum counter value */841UINT8 Flags;842UINT8 Reserved2[3];843UINT32 Entries; /* Number of watchdog entries that follow */844845} ACPI_TABLE_WDAT;846847/* Masks for Flags field above */848849#define ACPI_WDAT_ENABLED (1)850#define ACPI_WDAT_STOPPED 0x80851852853/* WDAT Instruction Entries (actions) */854855typedef struct acpi_wdat_entry856{857UINT8 Action;858UINT8 Instruction;859UINT16 Reserved;860ACPI_GENERIC_ADDRESS RegisterRegion;861UINT32 Value; /* Value used with Read/Write register */862UINT32 Mask; /* Bitmask required for this register instruction */863864} ACPI_WDAT_ENTRY;865866/* Values for Action field above */867868enum AcpiWdatActions869{870ACPI_WDAT_RESET = 1,871ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,872ACPI_WDAT_GET_COUNTDOWN = 5,873ACPI_WDAT_SET_COUNTDOWN = 6,874ACPI_WDAT_GET_RUNNING_STATE = 8,875ACPI_WDAT_SET_RUNNING_STATE = 9,876ACPI_WDAT_GET_STOPPED_STATE = 10,877ACPI_WDAT_SET_STOPPED_STATE = 11,878ACPI_WDAT_GET_REBOOT = 16,879ACPI_WDAT_SET_REBOOT = 17,880ACPI_WDAT_GET_SHUTDOWN = 18,881ACPI_WDAT_SET_SHUTDOWN = 19,882ACPI_WDAT_GET_STATUS = 32,883ACPI_WDAT_SET_STATUS = 33,884ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */885};886887/* Values for Instruction field above */888889enum AcpiWdatInstructions890{891ACPI_WDAT_READ_VALUE = 0,892ACPI_WDAT_READ_COUNTDOWN = 1,893ACPI_WDAT_WRITE_VALUE = 2,894ACPI_WDAT_WRITE_COUNTDOWN = 3,895ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */896ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */897};898899900/*******************************************************************************901*902* WDDT - Watchdog Descriptor Table903* Version 1904*905* Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",906* Version 001, September 2002907*908******************************************************************************/909910typedef struct acpi_table_wddt911{912ACPI_TABLE_HEADER Header; /* Common ACPI table header */913UINT16 SpecVersion;914UINT16 TableVersion;915UINT16 PciVendorId;916ACPI_GENERIC_ADDRESS Address;917UINT16 MaxCount; /* Maximum counter value supported */918UINT16 MinCount; /* Minimum counter value supported */919UINT16 Period;920UINT16 Status;921UINT16 Capability;922923} ACPI_TABLE_WDDT;924925/* Flags for Status field above */926927#define ACPI_WDDT_AVAILABLE (1)928#define ACPI_WDDT_ACTIVE (1<<1)929#define ACPI_WDDT_TCO_OS_OWNED (1<<2)930#define ACPI_WDDT_USER_RESET (1<<11)931#define ACPI_WDDT_WDT_RESET (1<<12)932#define ACPI_WDDT_POWER_FAIL (1<<13)933#define ACPI_WDDT_UNKNOWN_RESET (1<<14)934935/* Flags for Capability field above */936937#define ACPI_WDDT_AUTO_RESET (1)938#define ACPI_WDDT_ALERT_SUPPORT (1<<1)939940941/*******************************************************************************942*943* WDRT - Watchdog Resource Table944* Version 1945*946* Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",947* Version 1.01, August 28, 2006948*949******************************************************************************/950951typedef struct acpi_table_wdrt952{953ACPI_TABLE_HEADER Header; /* Common ACPI table header */954ACPI_GENERIC_ADDRESS ControlRegister;955ACPI_GENERIC_ADDRESS CountRegister;956UINT16 PciDeviceId;957UINT16 PciVendorId;958UINT8 PciBus; /* PCI Bus number */959UINT8 PciDevice; /* PCI Device number */960UINT8 PciFunction; /* PCI Function number */961UINT8 PciSegment; /* PCI Segment number */962UINT16 MaxCount; /* Maximum counter value supported */963UINT8 Units;964965} ACPI_TABLE_WDRT;966967968/*******************************************************************************969*970* WPBT - Windows Platform Environment Table (ACPI 6.0)971* Version 1972*973* Conforms to "Windows Platform Binary Table (WPBT)" 29 November 2011974*975******************************************************************************/976977typedef struct acpi_table_wpbt978{979ACPI_TABLE_HEADER Header; /* Common ACPI table header */980UINT32 HandoffSize;981UINT64 HandoffAddress;982UINT8 Layout;983UINT8 Type;984UINT16 ArgumentsLength;985986} ACPI_TABLE_WPBT;987988typedef struct acpi_wpbt_unicode989{990UINT16 *UnicodeString;991992} ACPI_WPBT_UNICODE;993994995/*******************************************************************************996*997* WSMT - Windows SMM Security Mitigations Table998* Version 1999*1000* Conforms to "Windows SMM Security Mitigations Table",1001* Version 1.0, April 18, 20161002*1003******************************************************************************/10041005typedef struct acpi_table_wsmt1006{1007ACPI_TABLE_HEADER Header; /* Common ACPI table header */1008UINT32 ProtectionFlags;10091010} ACPI_TABLE_WSMT;10111012/* Flags for ProtectionFlags field above */10131014#define ACPI_WSMT_FIXED_COMM_BUFFERS (1)1015#define ACPI_WSMT_COMM_BUFFER_NESTED_PTR_PROTECTION (2)1016#define ACPI_WSMT_SYSTEM_RESOURCE_PROTECTION (4)101710181019/*******************************************************************************1020*1021* XENV - Xen Environment Table (ACPI 6.0)1022* Version 11023*1024* Conforms to "ACPI Specification for Xen Environment Table" 4 January 20151025*1026******************************************************************************/10271028typedef struct acpi_table_xenv1029{1030ACPI_TABLE_HEADER Header; /* Common ACPI table header */1031UINT64 GrantTableAddress;1032UINT64 GrantTableSize;1033UINT32 EventInterrupt;1034UINT8 EventFlags;10351036} ACPI_TABLE_XENV;103710381039/* Reset to default packing */10401041#pragma pack()10421043#endif /* __ACTBL3_H__ */104410451046