Path: blob/main/sys/contrib/dev/acpica/include/actbl3.h
48286 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 */406407408/* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */409410typedef struct acpi_srat_x2apic_cpu_affinity411{412ACPI_SUBTABLE_HEADER Header;413UINT16 Reserved; /* Reserved, must be zero */414UINT32 ProximityDomain;415UINT32 ApicId;416UINT32 Flags;417UINT32 ClockDomain;418UINT32 Reserved2;419420} ACPI_SRAT_X2APIC_CPU_AFFINITY;421422/* Flags for ACPI_SRAT_CPU_AFFINITY and ACPI_SRAT_X2APIC_CPU_AFFINITY */423424#define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */425426427/* 3: GICC Affinity (ACPI 5.1) */428429typedef struct acpi_srat_gicc_affinity430{431ACPI_SUBTABLE_HEADER Header;432UINT32 ProximityDomain;433UINT32 AcpiProcessorUid;434UINT32 Flags;435UINT32 ClockDomain;436437} ACPI_SRAT_GICC_AFFINITY;438439/* Flags for ACPI_SRAT_GICC_AFFINITY */440441#define ACPI_SRAT_GICC_ENABLED (1) /* 00: Use affinity structure */442443444/* 4: GIC ITS Affinity (ACPI 6.2) */445446typedef struct acpi_srat_gic_its_affinity447{448ACPI_SUBTABLE_HEADER Header;449UINT32 ProximityDomain;450UINT16 Reserved;451UINT32 ItsId;452453} ACPI_SRAT_GIC_ITS_AFFINITY;454455/*456* Common structure for SRAT subtable types:457* 5: ACPI_SRAT_TYPE_GENERIC_AFFINITY458* 6: ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY459*/460461#define ACPI_SRAT_DEVICE_HANDLE_SIZE 16462463typedef struct acpi_srat_generic_affinity464{465ACPI_SUBTABLE_HEADER Header;466UINT8 Reserved;467UINT8 DeviceHandleType;468UINT32 ProximityDomain;469UINT8 DeviceHandle[ACPI_SRAT_DEVICE_HANDLE_SIZE];470UINT32 Flags;471UINT32 Reserved1;472473} ACPI_SRAT_GENERIC_AFFINITY;474475/* Flags for ACPI_SRAT_GENERIC_AFFINITY */476477#define ACPI_SRAT_GENERIC_AFFINITY_ENABLED (1) /* 00: Use affinity structure */478#define ACPI_SRAT_ARCHITECTURAL_TRANSACTIONS (1<<1) /* ACPI 6.4 */479480/* 7: RINTC Affinity Structure(ACPI 6.6) */481482typedef struct acpi_srat_rintc_affinity483{484ACPI_SUBTABLE_HEADER Header;485UINT16 Reserved;486UINT32 ProximityDomain;487UINT32 AcpiProcessorUid;488UINT32 Flags;489UINT32 ClockDomain;490491} ACPI_SRAT_RINTC_AFFINITY;492493/* Flags for ACPI_SRAT_RINTC_AFFINITY */494495#define ACPI_SRAT_RINTC_ENABLED (1) /* 00: Use affinity structure */496497/*******************************************************************************498*499* STAO - Status Override Table (_STA override) - ACPI 6.0500* Version 1501*502* Conforms to "ACPI Specification for Status Override Table"503* 6 January 2015504*505******************************************************************************/506507typedef struct acpi_table_stao508{509ACPI_TABLE_HEADER Header; /* Common ACPI table header */510UINT8 IgnoreUart;511512} ACPI_TABLE_STAO;513514515/*******************************************************************************516*517* TCPA - Trusted Computing Platform Alliance table518* Version 2519*520* TCG Hardware Interface Table for TPM 1.2 Clients and Servers521*522* Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",523* Version 1.2, Revision 8524* February 27, 2017525*526* NOTE: There are two versions of the table with the same signature --527* the client version and the server version. The common PlatformClass528* field is used to differentiate the two types of tables.529*530******************************************************************************/531532typedef struct acpi_table_tcpa_hdr533{534ACPI_TABLE_HEADER Header; /* Common ACPI table header */535UINT16 PlatformClass;536537} ACPI_TABLE_TCPA_HDR;538539/*540* Values for PlatformClass above.541* This is how the client and server subtables are differentiated542*/543#define ACPI_TCPA_CLIENT_TABLE 0544#define ACPI_TCPA_SERVER_TABLE 1545546547typedef struct acpi_table_tcpa_client548{549UINT32 MinimumLogLength; /* Minimum length for the event log area */550UINT64 LogAddress; /* Address of the event log area */551552} ACPI_TABLE_TCPA_CLIENT;553554typedef struct acpi_table_tcpa_server555{556UINT16 Reserved;557UINT64 MinimumLogLength; /* Minimum length for the event log area */558UINT64 LogAddress; /* Address of the event log area */559UINT16 SpecRevision;560UINT8 DeviceFlags;561UINT8 InterruptFlags;562UINT8 GpeNumber;563UINT8 Reserved2[3];564UINT32 GlobalInterrupt;565ACPI_GENERIC_ADDRESS Address;566UINT32 Reserved3;567ACPI_GENERIC_ADDRESS ConfigAddress;568UINT8 Group;569UINT8 Bus; /* PCI Bus/Segment/Function numbers */570UINT8 Device;571UINT8 Function;572573} ACPI_TABLE_TCPA_SERVER;574575/* Values for DeviceFlags above */576577#define ACPI_TCPA_PCI_DEVICE (1)578#define ACPI_TCPA_BUS_PNP (1<<1)579#define ACPI_TCPA_ADDRESS_VALID (1<<2)580581/* Values for InterruptFlags above */582583#define ACPI_TCPA_INTERRUPT_MODE (1)584#define ACPI_TCPA_INTERRUPT_POLARITY (1<<1)585#define ACPI_TCPA_SCI_VIA_GPE (1<<2)586#define ACPI_TCPA_GLOBAL_INTERRUPT (1<<3)587588589/*******************************************************************************590*591* TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table592* Version 4593*594* TCG Hardware Interface Table for TPM 2.0 Clients and Servers595*596* Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",597* Version 1.2, Revision 8598* February 27, 2017599*600******************************************************************************/601602/* Revision 3 */603604typedef struct acpi_table_tpm23605{606ACPI_TABLE_HEADER Header; /* Common ACPI table header */607UINT32 Reserved;608UINT64 ControlAddress;609UINT32 StartMethod;610611} ACPI_TABLE_TPM23;612613/* Value for StartMethod above */614615#define ACPI_TPM23_ACPI_START_METHOD 2616617/*618* Optional trailer for revision 3. If start method is 2, there is a 4 byte619* reserved area of all zeros.620*/621typedef struct acpi_tmp23_trailer622{623UINT32 Reserved;624625} ACPI_TPM23_TRAILER;626627628/* Revision 4 */629630typedef struct acpi_table_tpm2631{632ACPI_TABLE_HEADER Header; /* Common ACPI table header */633UINT16 PlatformClass;634UINT16 Reserved;635UINT64 ControlAddress;636UINT32 StartMethod;637638/* Platform-specific data follows */639640} ACPI_TABLE_TPM2;641642/* Values for StartMethod above */643644#define ACPI_TPM2_NOT_ALLOWED 0645#define ACPI_TPM2_RESERVED1 1646#define ACPI_TPM2_START_METHOD 2647#define ACPI_TPM2_RESERVED3 3648#define ACPI_TPM2_RESERVED4 4649#define ACPI_TPM2_RESERVED5 5650#define ACPI_TPM2_MEMORY_MAPPED 6651#define ACPI_TPM2_COMMAND_BUFFER 7652#define ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD 8653#define ACPI_TPM2_RESERVED9 9654#define ACPI_TPM2_RESERVED10 10655#define ACPI_TPM2_COMMAND_BUFFER_WITH_ARM_SMC 11 /* V1.2 Rev 8 */656#define ACPI_TPM2_RESERVED 12657#define ACPI_TPM2_COMMAND_BUFFER_WITH_PLUTON 13658#define ACPI_TPM2_CRB_WITH_ARM_FFA 15659660661/* Optional trailer appears after any StartMethod subtables */662663typedef struct acpi_tpm2_trailer664{665UINT8 MethodParameters[12];666UINT32 MinimumLogLength; /* Minimum length for the event log area */667UINT64 LogAddress; /* Address of the event log area */668669} ACPI_TPM2_TRAILER;670671672/*673* Subtables (StartMethod-specific)674*/675676/* 11: Start Method for ARM SMC (V1.2 Rev 8) */677678typedef struct acpi_tpm2_arm_smc679{680UINT32 GlobalInterrupt;681UINT8 InterruptFlags;682UINT8 OperationFlags;683UINT16 Reserved;684UINT32 FunctionId;685686} ACPI_TPM2_ARM_SMC;687688/* Values for InterruptFlags above */689690#define ACPI_TPM2_INTERRUPT_SUPPORT (1)691692/* Values for OperationFlags above */693694#define ACPI_TPM2_IDLE_SUPPORT (1)695696697/*******************************************************************************698*699* UEFI - UEFI Boot optimization Table700* Version 1701*702* Conforms to "Unified Extensible Firmware Interface Specification",703* Version 2.3, May 8, 2009704*705******************************************************************************/706707typedef struct acpi_table_uefi708{709ACPI_TABLE_HEADER Header; /* Common ACPI table header */710UINT8 Identifier[16]; /* UUID identifier */711UINT16 DataOffset; /* Offset of remaining data in table */712713} ACPI_TABLE_UEFI;714715716/*******************************************************************************717*718* VIOT - Virtual I/O Translation Table719* Version 1720*721******************************************************************************/722723typedef struct acpi_table_viot724{725ACPI_TABLE_HEADER Header; /* Common ACPI table header */726UINT16 NodeCount;727UINT16 NodeOffset;728UINT8 Reserved[8];729730} ACPI_TABLE_VIOT;731732/* VIOT subtable header */733734typedef struct acpi_viot_header735{736UINT8 Type;737UINT8 Reserved;738UINT16 Length;739740} ACPI_VIOT_HEADER;741742/* Values for Type field above */743744enum AcpiViotNodeType745{746ACPI_VIOT_NODE_PCI_RANGE = 0x01,747ACPI_VIOT_NODE_MMIO = 0x02,748ACPI_VIOT_NODE_VIRTIO_IOMMU_PCI = 0x03,749ACPI_VIOT_NODE_VIRTIO_IOMMU_MMIO = 0x04,750ACPI_VIOT_RESERVED = 0x05751};752753/* VIOT subtables */754755typedef struct acpi_viot_pci_range756{757ACPI_VIOT_HEADER Header;758UINT32 EndpointStart;759UINT16 SegmentStart;760UINT16 SegmentEnd;761UINT16 BdfStart;762UINT16 BdfEnd;763UINT16 OutputNode;764UINT8 Reserved[6];765766} ACPI_VIOT_PCI_RANGE;767768typedef struct acpi_viot_mmio769{770ACPI_VIOT_HEADER Header;771UINT32 Endpoint;772UINT64 BaseAddress;773UINT16 OutputNode;774UINT8 Reserved[6];775776} ACPI_VIOT_MMIO;777778typedef struct acpi_viot_virtio_iommu_pci779{780ACPI_VIOT_HEADER Header;781UINT16 Segment;782UINT16 Bdf;783UINT8 Reserved[8];784785} ACPI_VIOT_VIRTIO_IOMMU_PCI;786787typedef struct acpi_viot_virtio_iommu_mmio788{789ACPI_VIOT_HEADER Header;790UINT8 Reserved[4];791UINT64 BaseAddress;792793} ACPI_VIOT_VIRTIO_IOMMU_MMIO;794795796/*******************************************************************************797*798* WAET - Windows ACPI Emulated devices Table799* Version 1800*801* Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009802*803******************************************************************************/804805typedef struct acpi_table_waet806{807ACPI_TABLE_HEADER Header; /* Common ACPI table header */808UINT32 Flags;809810} ACPI_TABLE_WAET;811812/* Masks for Flags field above */813814#define ACPI_WAET_RTC_NO_ACK (1) /* RTC requires no int acknowledge */815#define ACPI_WAET_TIMER_ONE_READ (1<<1) /* PM timer requires only one read */816817818/*******************************************************************************819*820* WDAT - Watchdog Action Table821* Version 1822*823* Conforms to "Hardware Watchdog Timers Design Specification",824* Copyright 2006 Microsoft Corporation.825*826******************************************************************************/827828typedef struct acpi_table_wdat829{830ACPI_TABLE_HEADER Header; /* Common ACPI table header */831UINT32 HeaderLength; /* Watchdog Header Length */832UINT16 PciSegment; /* PCI Segment number */833UINT8 PciBus; /* PCI Bus number */834UINT8 PciDevice; /* PCI Device number */835UINT8 PciFunction; /* PCI Function number */836UINT8 Reserved[3];837UINT32 TimerPeriod; /* Period of one timer count (msec) */838UINT32 MaxCount; /* Maximum counter value supported */839UINT32 MinCount; /* Minimum counter value */840UINT8 Flags;841UINT8 Reserved2[3];842UINT32 Entries; /* Number of watchdog entries that follow */843844} ACPI_TABLE_WDAT;845846/* Masks for Flags field above */847848#define ACPI_WDAT_ENABLED (1)849#define ACPI_WDAT_STOPPED 0x80850851852/* WDAT Instruction Entries (actions) */853854typedef struct acpi_wdat_entry855{856UINT8 Action;857UINT8 Instruction;858UINT16 Reserved;859ACPI_GENERIC_ADDRESS RegisterRegion;860UINT32 Value; /* Value used with Read/Write register */861UINT32 Mask; /* Bitmask required for this register instruction */862863} ACPI_WDAT_ENTRY;864865/* Values for Action field above */866867enum AcpiWdatActions868{869ACPI_WDAT_RESET = 1,870ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,871ACPI_WDAT_GET_COUNTDOWN = 5,872ACPI_WDAT_SET_COUNTDOWN = 6,873ACPI_WDAT_GET_RUNNING_STATE = 8,874ACPI_WDAT_SET_RUNNING_STATE = 9,875ACPI_WDAT_GET_STOPPED_STATE = 10,876ACPI_WDAT_SET_STOPPED_STATE = 11,877ACPI_WDAT_GET_REBOOT = 16,878ACPI_WDAT_SET_REBOOT = 17,879ACPI_WDAT_GET_SHUTDOWN = 18,880ACPI_WDAT_SET_SHUTDOWN = 19,881ACPI_WDAT_GET_STATUS = 32,882ACPI_WDAT_SET_STATUS = 33,883ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */884};885886/* Values for Instruction field above */887888enum AcpiWdatInstructions889{890ACPI_WDAT_READ_VALUE = 0,891ACPI_WDAT_READ_COUNTDOWN = 1,892ACPI_WDAT_WRITE_VALUE = 2,893ACPI_WDAT_WRITE_COUNTDOWN = 3,894ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */895ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */896};897898899/*******************************************************************************900*901* WDDT - Watchdog Descriptor Table902* Version 1903*904* Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",905* Version 001, September 2002906*907******************************************************************************/908909typedef struct acpi_table_wddt910{911ACPI_TABLE_HEADER Header; /* Common ACPI table header */912UINT16 SpecVersion;913UINT16 TableVersion;914UINT16 PciVendorId;915ACPI_GENERIC_ADDRESS Address;916UINT16 MaxCount; /* Maximum counter value supported */917UINT16 MinCount; /* Minimum counter value supported */918UINT16 Period;919UINT16 Status;920UINT16 Capability;921922} ACPI_TABLE_WDDT;923924/* Flags for Status field above */925926#define ACPI_WDDT_AVAILABLE (1)927#define ACPI_WDDT_ACTIVE (1<<1)928#define ACPI_WDDT_TCO_OS_OWNED (1<<2)929#define ACPI_WDDT_USER_RESET (1<<11)930#define ACPI_WDDT_WDT_RESET (1<<12)931#define ACPI_WDDT_POWER_FAIL (1<<13)932#define ACPI_WDDT_UNKNOWN_RESET (1<<14)933934/* Flags for Capability field above */935936#define ACPI_WDDT_AUTO_RESET (1)937#define ACPI_WDDT_ALERT_SUPPORT (1<<1)938939940/*******************************************************************************941*942* WDRT - Watchdog Resource Table943* Version 1944*945* Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",946* Version 1.01, August 28, 2006947*948******************************************************************************/949950typedef struct acpi_table_wdrt951{952ACPI_TABLE_HEADER Header; /* Common ACPI table header */953ACPI_GENERIC_ADDRESS ControlRegister;954ACPI_GENERIC_ADDRESS CountRegister;955UINT16 PciDeviceId;956UINT16 PciVendorId;957UINT8 PciBus; /* PCI Bus number */958UINT8 PciDevice; /* PCI Device number */959UINT8 PciFunction; /* PCI Function number */960UINT8 PciSegment; /* PCI Segment number */961UINT16 MaxCount; /* Maximum counter value supported */962UINT8 Units;963964} ACPI_TABLE_WDRT;965966967/*******************************************************************************968*969* WPBT - Windows Platform Environment Table (ACPI 6.0)970* Version 1971*972* Conforms to "Windows Platform Binary Table (WPBT)" 29 November 2011973*974******************************************************************************/975976typedef struct acpi_table_wpbt977{978ACPI_TABLE_HEADER Header; /* Common ACPI table header */979UINT32 HandoffSize;980UINT64 HandoffAddress;981UINT8 Layout;982UINT8 Type;983UINT16 ArgumentsLength;984985} ACPI_TABLE_WPBT;986987typedef struct acpi_wpbt_unicode988{989UINT16 *UnicodeString;990991} ACPI_WPBT_UNICODE;992993994/*******************************************************************************995*996* WSMT - Windows SMM Security Mitigations Table997* Version 1998*999* Conforms to "Windows SMM Security Mitigations Table",1000* Version 1.0, April 18, 20161001*1002******************************************************************************/10031004typedef struct acpi_table_wsmt1005{1006ACPI_TABLE_HEADER Header; /* Common ACPI table header */1007UINT32 ProtectionFlags;10081009} ACPI_TABLE_WSMT;10101011/* Flags for ProtectionFlags field above */10121013#define ACPI_WSMT_FIXED_COMM_BUFFERS (1)1014#define ACPI_WSMT_COMM_BUFFER_NESTED_PTR_PROTECTION (2)1015#define ACPI_WSMT_SYSTEM_RESOURCE_PROTECTION (4)101610171018/*******************************************************************************1019*1020* XENV - Xen Environment Table (ACPI 6.0)1021* Version 11022*1023* Conforms to "ACPI Specification for Xen Environment Table" 4 January 20151024*1025******************************************************************************/10261027typedef struct acpi_table_xenv1028{1029ACPI_TABLE_HEADER Header; /* Common ACPI table header */1030UINT64 GrantTableAddress;1031UINT64 GrantTableSize;1032UINT32 EventInterrupt;1033UINT8 EventFlags;10341035} ACPI_TABLE_XENV;103610371038/* Reset to default packing */10391040#pragma pack()10411042#endif /* __ACTBL3_H__ */104310441045