Path: blob/main/sys/contrib/dev/acpica/include/actbl1.h
48286 views
/******************************************************************************1*2* Name: actbl1.h - Additional 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 __ACTBL1_H__152#define __ACTBL1_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_AEST "AEST" /* Arm Error Source Table */171#define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */172#define ACPI_SIG_ASPT "ASPT" /* AMD Secure Processor Table */173#define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */174#define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */175#define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */176#define ACPI_SIG_CEDT "CEDT" /* CXL Early Discovery Table */177#define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */178#define ACPI_SIG_CSRT "CSRT" /* Core System Resource Table */179#define ACPI_SIG_DBG2 "DBG2" /* Debug Port table type 2 */180#define ACPI_SIG_DBGP "DBGP" /* Debug Port table */181#define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */182#define ACPI_SIG_DRTM "DRTM" /* Dynamic Root of Trust for Measurement table */183#define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */184#define ACPI_SIG_EINJ "EINJ" /* Error Injection table */185#define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */186#define ACPI_SIG_FPDT "FPDT" /* Firmware Performance Data Table */187#define ACPI_SIG_GTDT "GTDT" /* Generic Timer Description Table */188#define ACPI_SIG_HEST "HEST" /* Hardware Error Source Table */189#define ACPI_SIG_HMAT "HMAT" /* Heterogeneous Memory Attributes Table */190#define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */191#define ACPI_SIG_IBFT "IBFT" /* iSCSI Boot Firmware Table */192#define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table*/193194#define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */195#define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */196197198/* Reserved table signatures */199200#define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */201#define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */202203/*204* These tables have been seen in the field, but no definition has been found205*/206#ifdef ACPI_UNDEFINED_TABLES207#define ACPI_SIG_ATKG "ATKG"208#define ACPI_SIG_GSCI "GSCI" /* GMCH SCI table */209#define ACPI_SIG_IEIT "IEIT"210#endif211212/*213* All tables must be byte-packed to match the ACPI specification, since214* the tables are provided by the system BIOS.215*/216#pragma pack(1)217218/*219* Note: C bitfields are not used for this reason:220*221* "Bitfields are great and easy to read, but unfortunately the C language222* does not specify the layout of bitfields in memory, which means they are223* essentially useless for dealing with packed data in on-disk formats or224* binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,225* this decision was a design error in C. Ritchie could have picked an order226* and stuck with it." Norman Ramsey.227* See http://stackoverflow.com/a/1053662/41661228*/229230231/*******************************************************************************232*233* Common subtable headers234*235******************************************************************************/236237/* Generic subtable header (used in MADT, SRAT, etc.) */238239typedef struct acpi_subtable_header240{241UINT8 Type;242UINT8 Length;243244} ACPI_SUBTABLE_HEADER;245246247/* Subtable header for WHEA tables (EINJ, ERST, WDAT) */248249typedef struct acpi_whea_header250{251UINT8 Action;252UINT8 Instruction;253UINT8 Flags;254UINT8 Reserved;255ACPI_GENERIC_ADDRESS RegisterRegion;256UINT64 Value; /* Value used with Read/Write register */257UINT64 Mask; /* Bitmask required for this register instruction */258259} ACPI_WHEA_HEADER;260261262/* Larger subtable header (when Length can exceed 255) */263264typedef struct acpi_subtbl_hdr_16265{266UINT16 Type;267UINT16 Length;268269} ACPI_SUBTBL_HDR_16;270271272/*******************************************************************************273*274* ASF - Alert Standard Format table (Signature "ASF!")275* Revision 0x10276*277* Conforms to the Alert Standard Format Specification V2.0, 23 April 2003278*279******************************************************************************/280281typedef struct acpi_table_asf282{283ACPI_TABLE_HEADER Header; /* Common ACPI table header */284285} ACPI_TABLE_ASF;286287288/* ASF subtable header */289290typedef struct acpi_asf_header291{292UINT8 Type;293UINT8 Reserved;294UINT16 Length;295296} ACPI_ASF_HEADER;297298299/* Values for Type field above */300301enum AcpiAsfType302{303ACPI_ASF_TYPE_INFO = 0,304ACPI_ASF_TYPE_ALERT = 1,305ACPI_ASF_TYPE_CONTROL = 2,306ACPI_ASF_TYPE_BOOT = 3,307ACPI_ASF_TYPE_ADDRESS = 4,308ACPI_ASF_TYPE_RESERVED = 5309};310311/*312* ASF subtables313*/314315/* 0: ASF Information */316317typedef struct acpi_asf_info318{319ACPI_ASF_HEADER Header;320UINT8 MinResetValue;321UINT8 MinPollInterval;322UINT16 SystemId;323UINT32 MfgId;324UINT8 Flags;325UINT8 Reserved2[3];326327} ACPI_ASF_INFO;328329/* Masks for Flags field above */330331#define ACPI_ASF_SMBUS_PROTOCOLS (1)332333334/* 1: ASF Alerts */335336typedef struct acpi_asf_alert337{338ACPI_ASF_HEADER Header;339UINT8 AssertMask;340UINT8 DeassertMask;341UINT8 Alerts;342UINT8 DataLength;343344} ACPI_ASF_ALERT;345346typedef struct acpi_asf_alert_data347{348UINT8 Address;349UINT8 Command;350UINT8 Mask;351UINT8 Value;352UINT8 SensorType;353UINT8 Type;354UINT8 Offset;355UINT8 SourceType;356UINT8 Severity;357UINT8 SensorNumber;358UINT8 Entity;359UINT8 Instance;360361} ACPI_ASF_ALERT_DATA;362363364/* 2: ASF Remote Control */365366typedef struct acpi_asf_remote367{368ACPI_ASF_HEADER Header;369UINT8 Controls;370UINT8 DataLength;371UINT16 Reserved2;372373} ACPI_ASF_REMOTE;374375typedef struct acpi_asf_control_data376{377UINT8 Function;378UINT8 Address;379UINT8 Command;380UINT8 Value;381382} ACPI_ASF_CONTROL_DATA;383384385/* 3: ASF RMCP Boot Options */386387typedef struct acpi_asf_rmcp388{389ACPI_ASF_HEADER Header;390UINT8 Capabilities[7];391UINT8 CompletionCode;392UINT32 EnterpriseId;393UINT8 Command;394UINT16 Parameter;395UINT16 BootOptions;396UINT16 OemParameters;397398} ACPI_ASF_RMCP;399400401/* 4: ASF Address */402403typedef struct acpi_asf_address404{405ACPI_ASF_HEADER Header;406UINT8 EpromAddress;407UINT8 Devices;408409} ACPI_ASF_ADDRESS;410411/*******************************************************************************412*413* ASPT - AMD Secure Processor Table (Signature "ASPT")414* Revision 0x1415*416* Conforms to AMD Socket SP5/SP6 Platform ASPT Rev1 Specification,417* 12 September 2022418*419******************************************************************************/420421typedef struct acpi_table_aspt422{423ACPI_TABLE_HEADER Header; /* Common ACPI table header */424UINT32 NumEntries;425426} ACPI_TABLE_ASPT;427428429/* ASPT subtable header */430431typedef struct acpi_aspt_header432{433UINT16 Type;434UINT16 Length;435436} ACPI_ASPT_HEADER;437438439/* Values for Type field above */440441enum AcpiAsptType442{443ACPI_ASPT_TYPE_GLOBAL_REGS = 0,444ACPI_ASPT_TYPE_SEV_MBOX_REGS = 1,445ACPI_ASPT_TYPE_ACPI_MBOX_REGS = 2,446ACPI_ASPT_TYPE_UNKNOWN = 3,447};448449/*450* ASPT subtables451*/452453/* 0: ASPT Global Registers */454455typedef struct acpi_aspt_global_regs456{457ACPI_ASPT_HEADER Header;458UINT32 Reserved;459UINT64 FeatureRegAddr;460UINT64 IrqEnRegAddr;461UINT64 IrqStRegAddr;462463} ACPI_ASPT_GLOBAL_REGS;464465466/* 1: ASPT SEV Mailbox Registers */467468typedef struct acpi_aspt_sev_mbox_regs469{470ACPI_ASPT_HEADER Header;471UINT8 MboxIrqId;472UINT8 Reserved[3];473UINT64 CmdRespRegAddr;474UINT64 CmdBufLoRegAddr;475UINT64 CmdBufHiRegAddr;476477} ACPI_ASPT_SEV_MBOX_REGS;478479480/* 2: ASPT ACPI Mailbox Registers */481482typedef struct acpi_aspt_acpi_mbox_regs483{484ACPI_ASPT_HEADER Header;485UINT32 Reserved1;486UINT64 CmdRespRegAddr;487UINT64 Reserved2[2];488489} ACPI_ASPT_ACPI_MBOX_REGS;490491492/*******************************************************************************493*494* BERT - Boot Error Record Table (ACPI 4.0)495* Version 1496*497******************************************************************************/498499typedef struct acpi_table_bert500{501ACPI_TABLE_HEADER Header; /* Common ACPI table header */502UINT32 RegionLength; /* Length of the boot error region */503UINT64 Address; /* Physical address of the error region */504505} ACPI_TABLE_BERT;506507508/* Boot Error Region (not a subtable, pointed to by Address field above) */509510typedef struct acpi_bert_region511{512UINT32 BlockStatus; /* Type of error information */513UINT32 RawDataOffset; /* Offset to raw error data */514UINT32 RawDataLength; /* Length of raw error data */515UINT32 DataLength; /* Length of generic error data */516UINT32 ErrorSeverity; /* Severity code */517518} ACPI_BERT_REGION;519520/* Values for BlockStatus flags above */521522#define ACPI_BERT_UNCORRECTABLE (1)523#define ACPI_BERT_CORRECTABLE (1<<1)524#define ACPI_BERT_MULTIPLE_UNCORRECTABLE (1<<2)525#define ACPI_BERT_MULTIPLE_CORRECTABLE (1<<3)526#define ACPI_BERT_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */527528/* Values for ErrorSeverity above */529530enum AcpiBertErrorSeverity531{532ACPI_BERT_ERROR_CORRECTABLE = 0,533ACPI_BERT_ERROR_FATAL = 1,534ACPI_BERT_ERROR_CORRECTED = 2,535ACPI_BERT_ERROR_NONE = 3,536ACPI_BERT_ERROR_RESERVED = 4 /* 4 and greater are reserved */537};538539/*540* Note: The generic error data that follows the ErrorSeverity field above541* uses the ACPI_HEST_GENERIC_DATA defined under the HEST table below542*/543544545/*******************************************************************************546*547* BGRT - Boot Graphics Resource Table (ACPI 5.0)548* Version 1549*550******************************************************************************/551552typedef struct acpi_table_bgrt553{554ACPI_TABLE_HEADER Header; /* Common ACPI table header */555UINT16 Version;556UINT8 Status;557UINT8 ImageType;558UINT64 ImageAddress;559UINT32 ImageOffsetX;560UINT32 ImageOffsetY;561562} ACPI_TABLE_BGRT;563564/* Flags for Status field above */565566#define ACPI_BGRT_DISPLAYED (1)567#define ACPI_BGRT_ORIENTATION_OFFSET (3 << 1)568569570/*******************************************************************************571*572* BOOT - Simple Boot Flag Table573* Version 1574*575* Conforms to the "Simple Boot Flag Specification", Version 2.1576*577******************************************************************************/578579typedef struct acpi_table_boot580{581ACPI_TABLE_HEADER Header; /* Common ACPI table header */582UINT8 CmosIndex; /* Index in CMOS RAM for the boot register */583UINT8 Reserved[3];584585} ACPI_TABLE_BOOT;586587588/*******************************************************************************589*590* CDAT - Coherent Device Attribute Table591* Version 1592*593* Conforms to the "Coherent Device Attribute Table (CDAT) Specification594" (Revision 1.01, October 2020.)595*596******************************************************************************/597598typedef struct acpi_table_cdat599{600UINT32 Length; /* Length of table in bytes, including this header */601UINT8 Revision; /* ACPI Specification minor version number */602UINT8 Checksum; /* To make sum of entire table == 0 */603UINT8 Reserved[6];604UINT32 Sequence; /* Used to detect runtime CDAT table changes */605606} ACPI_TABLE_CDAT;607608609/* CDAT common subtable header */610611typedef struct acpi_cdat_header612{613UINT8 Type;614UINT8 Reserved;615UINT16 Length;616617} ACPI_CDAT_HEADER;618619/* Values for Type field above */620621enum AcpiCdatType622{623ACPI_CDAT_TYPE_DSMAS = 0,624ACPI_CDAT_TYPE_DSLBIS = 1,625ACPI_CDAT_TYPE_DSMSCIS = 2,626ACPI_CDAT_TYPE_DSIS = 3,627ACPI_CDAT_TYPE_DSEMTS = 4,628ACPI_CDAT_TYPE_SSLBIS = 5,629ACPI_CDAT_TYPE_RESERVED = 6 /* 6 through 0xFF are reserved */630};631632633/* Subtable 0: Device Scoped Memory Affinity Structure (DSMAS) */634635typedef struct acpi_cdat_dsmas636{637UINT8 DsmadHandle;638UINT8 Flags;639UINT16 Reserved;640UINT64 DpaBaseAddress;641UINT64 DpaLength;642643} ACPI_CDAT_DSMAS;644645/* Flags for subtable above */646647#define ACPI_CDAT_DSMAS_NON_VOLATILE (1 << 2)648#define ACPI_CDAT_DSMAS_SHAREABLE (1 << 3)649#define ACPI_CDAT_DSMAS_READ_ONLY (1 << 6)650651652/* Subtable 1: Device scoped Latency and Bandwidth Information Structure (DSLBIS) */653654typedef struct acpi_cdat_dslbis655{656UINT8 Handle;657UINT8 Flags; /* If Handle matches a DSMAS handle, the definition of this field matches658* Flags field in HMAT System Locality Latency */659UINT8 DataType;660UINT8 Reserved;661UINT64 EntryBaseUnit;662UINT16 Entry[3];663UINT16 Reserved2;664665} ACPI_CDAT_DSLBIS;666667668/* Subtable 2: Device Scoped Memory Side Cache Information Structure (DSMSCIS) */669670typedef struct acpi_cdat_dsmscis671{672UINT8 DsmasHandle;673UINT8 Reserved[3];674UINT64 SideCacheSize;675UINT32 CacheAttributes;676677} ACPI_CDAT_DSMSCIS;678679680/* Subtable 3: Device Scoped Initiator Structure (DSIS) */681682typedef struct acpi_cdat_dsis683{684UINT8 Flags;685UINT8 Handle;686UINT16 Reserved;687688} ACPI_CDAT_DSIS;689690/* Flags for above subtable */691692#define ACPI_CDAT_DSIS_MEM_ATTACHED (1 << 0)693694695/* Subtable 4: Device Scoped EFI Memory Type Structure (DSEMTS) */696697typedef struct acpi_cdat_dsemts698{699UINT8 DsmasHandle;700UINT8 MemoryType;701UINT16 Reserved;702UINT64 DpaOffset;703UINT64 RangeLength;704705} ACPI_CDAT_DSEMTS;706707708/* Subtable 5: Switch Scoped Latency and Bandwidth Information Structure (SSLBIS) */709710typedef struct acpi_cdat_sslbis711{712UINT8 DataType;713UINT8 Reserved[3];714UINT64 EntryBaseUnit;715716} ACPI_CDAT_SSLBIS;717718719/* Sub-subtable for above, SslbeEntries field */720721typedef struct acpi_cdat_sslbe722{723UINT16 PortxId;724UINT16 PortyId;725UINT16 LatencyOrBandwidth;726UINT16 Reserved;727728} ACPI_CDAT_SSLBE;729730#define ACPI_CDAT_SSLBIS_US_PORT 0x0100731#define ACPI_CDAT_SSLBIS_ANY_PORT 0xffff732733/*******************************************************************************734*735* CEDT - CXL Early Discovery Table736* Version 1737*738* Conforms to the "CXL Early Discovery Table" (CXL 2.0, October 2020)739*740******************************************************************************/741742typedef struct acpi_table_cedt743{744ACPI_TABLE_HEADER Header; /* Common ACPI table header */745746} ACPI_TABLE_CEDT;747748/* CEDT subtable header (Performance Record Structure) */749750typedef struct acpi_cedt_header751{752UINT8 Type;753UINT8 Reserved;754UINT16 Length;755756} ACPI_CEDT_HEADER;757758/* Values for Type field above */759760enum AcpiCedtType761{762ACPI_CEDT_TYPE_CHBS = 0,763ACPI_CEDT_TYPE_CFMWS = 1,764ACPI_CEDT_TYPE_CXIMS = 2,765ACPI_CEDT_TYPE_RDPAS = 3,766ACPI_CEDT_TYPE_RESERVED = 4,767};768769/* Values for version field above */770771#define ACPI_CEDT_CHBS_VERSION_CXL11 (0)772#define ACPI_CEDT_CHBS_VERSION_CXL20 (1)773774/* Values for length field above */775776#define ACPI_CEDT_CHBS_LENGTH_CXL11 (0x2000)777#define ACPI_CEDT_CHBS_LENGTH_CXL20 (0x10000)778779/*780* CEDT subtables781*/782783/* 0: CXL Host Bridge Structure */784785typedef struct acpi_cedt_chbs786{787ACPI_CEDT_HEADER Header;788UINT32 Uid;789UINT32 CxlVersion;790UINT32 Reserved;791UINT64 Base;792UINT64 Length;793794} ACPI_CEDT_CHBS;795796797/* 1: CXL Fixed Memory Window Structure */798799typedef struct acpi_cedt_cfmws800{801ACPI_CEDT_HEADER Header;802UINT32 Reserved1;803UINT64 BaseHpa;804UINT64 WindowSize;805UINT8 InterleaveWays;806UINT8 InterleaveArithmetic;807UINT16 Reserved2;808UINT32 Granularity;809UINT16 Restrictions;810UINT16 QtgId;811UINT32 InterleaveTargets[];812813} ACPI_CEDT_CFMWS;814815typedef struct acpi_cedt_cfmws_target_element816{817UINT32 InterleaveTarget;818819} ACPI_CEDT_CFMWS_TARGET_ELEMENT;820821/* Values for Interleave Arithmetic field above */822823#define ACPI_CEDT_CFMWS_ARITHMETIC_MODULO (0)824#define ACPI_CEDT_CFMWS_ARITHMETIC_XOR (1)825826/* Values for Restrictions field above */827828#define ACPI_CEDT_CFMWS_RESTRICT_TYPE2 (1)829#define ACPI_CEDT_CFMWS_RESTRICT_TYPE3 (1<<1)830#define ACPI_CEDT_CFMWS_RESTRICT_VOLATILE (1<<2)831#define ACPI_CEDT_CFMWS_RESTRICT_PMEM (1<<3)832#define ACPI_CEDT_CFMWS_RESTRICT_FIXED (1<<4)833834/* 2: CXL XOR Interleave Math Structure */835836typedef struct acpi_cedt_cxims {837ACPI_CEDT_HEADER Header;838UINT16 Reserved1;839UINT8 Hbig;840UINT8 NrXormaps;841UINT64 XormapList[];842} ACPI_CEDT_CXIMS;843844typedef struct acpi_cedt_cxims_target_element845{846UINT64 Xormap;847848} ACPI_CEDT_CXIMS_TARGET_ELEMENT;849850851/* 3: CXL RCEC Downstream Port Association Structure */852853struct acpi_cedt_rdpas {854ACPI_CEDT_HEADER Header;855UINT16 Segment;856UINT16 Bdf;857UINT8 Protocol;858UINT64 Address;859};860861/* Masks for bdf field above */862#define ACPI_CEDT_RDPAS_BUS_MASK 0xff00863#define ACPI_CEDT_RDPAS_DEVICE_MASK 0x00f8864#define ACPI_CEDT_RDPAS_FUNCTION_MASK 0x0007865866#define ACPI_CEDT_RDPAS_PROTOCOL_IO (0)867#define ACPI_CEDT_RDPAS_PROTOCOL_CACHEMEM (1)868869/*******************************************************************************870*871* CPEP - Corrected Platform Error Polling table (ACPI 4.0)872* Version 1873*874******************************************************************************/875876typedef struct acpi_table_cpep877{878ACPI_TABLE_HEADER Header; /* Common ACPI table header */879UINT64 Reserved;880881} ACPI_TABLE_CPEP;882883884/* Subtable */885886typedef struct acpi_cpep_polling887{888ACPI_SUBTABLE_HEADER Header;889UINT8 Id; /* Processor ID */890UINT8 Eid; /* Processor EID */891UINT32 Interval; /* Polling interval (msec) */892893} ACPI_CPEP_POLLING;894895896/*******************************************************************************897*898* CSRT - Core System Resource Table899* Version 0900*901* Conforms to the "Core System Resource Table (CSRT)", November 14, 2011902*903******************************************************************************/904905typedef struct acpi_table_csrt906{907ACPI_TABLE_HEADER Header; /* Common ACPI table header */908909} ACPI_TABLE_CSRT;910911912/* Resource Group subtable */913914typedef struct acpi_csrt_group915{916UINT32 Length;917UINT32 VendorId;918UINT32 SubvendorId;919UINT16 DeviceId;920UINT16 SubdeviceId;921UINT16 Revision;922UINT16 Reserved;923UINT32 SharedInfoLength;924925/* Shared data immediately follows (Length = SharedInfoLength) */926927} ACPI_CSRT_GROUP;928929/* Shared Info subtable */930931typedef struct acpi_csrt_shared_info932{933UINT16 MajorVersion;934UINT16 MinorVersion;935UINT32 MmioBaseLow;936UINT32 MmioBaseHigh;937UINT32 GsiInterrupt;938UINT8 InterruptPolarity;939UINT8 InterruptMode;940UINT8 NumChannels;941UINT8 DmaAddressWidth;942UINT16 BaseRequestLine;943UINT16 NumHandshakeSignals;944UINT32 MaxBlockSize;945946/* Resource descriptors immediately follow (Length = Group Length - SharedInfoLength) */947948} ACPI_CSRT_SHARED_INFO;949950/* Resource Descriptor subtable */951952typedef struct acpi_csrt_descriptor953{954UINT32 Length;955UINT16 Type;956UINT16 Subtype;957UINT32 Uid;958959/* Resource-specific information immediately follows */960961} ACPI_CSRT_DESCRIPTOR;962963964/* Resource Types */965966#define ACPI_CSRT_TYPE_INTERRUPT 0x0001967#define ACPI_CSRT_TYPE_TIMER 0x0002968#define ACPI_CSRT_TYPE_DMA 0x0003969970/* Resource Subtypes */971972#define ACPI_CSRT_XRUPT_LINE 0x0000973#define ACPI_CSRT_XRUPT_CONTROLLER 0x0001974#define ACPI_CSRT_TIMER 0x0000975#define ACPI_CSRT_DMA_CHANNEL 0x0000976#define ACPI_CSRT_DMA_CONTROLLER 0x0001977978979/*******************************************************************************980*981* DBG2 - Debug Port Table 2982* Version 0 (Both main table and subtables)983*984* Conforms to "Microsoft Debug Port Table 2 (DBG2)", September 21, 2020985*986******************************************************************************/987988typedef struct acpi_table_dbg2989{990ACPI_TABLE_HEADER Header; /* Common ACPI table header */991UINT32 InfoOffset;992UINT32 InfoCount;993994} ACPI_TABLE_DBG2;995996997typedef struct acpi_dbg2_header998{999UINT32 InfoOffset;1000UINT32 InfoCount;10011002} ACPI_DBG2_HEADER;100310041005/* Debug Device Information Subtable */10061007typedef struct acpi_dbg2_device1008{1009UINT8 Revision;1010UINT16 Length;1011UINT8 RegisterCount; /* Number of BaseAddress registers */1012UINT16 NamepathLength;1013UINT16 NamepathOffset;1014UINT16 OemDataLength;1015UINT16 OemDataOffset;1016UINT16 PortType;1017UINT16 PortSubtype;1018UINT16 Reserved;1019UINT16 BaseAddressOffset;1020UINT16 AddressSizeOffset;1021/*1022* Data that follows:1023* BaseAddress (required) - Each in 12-byte Generic Address Structure format.1024* AddressSize (required) - Array of UINT32 sizes corresponding to each BaseAddress register.1025* Namepath (required) - Null terminated string. Single dot if not supported.1026* OemData (optional) - Length is OemDataLength.1027*/1028} ACPI_DBG2_DEVICE;10291030/* Types for PortType field above */10311032#define ACPI_DBG2_SERIAL_PORT 0x80001033#define ACPI_DBG2_1394_PORT 0x80011034#define ACPI_DBG2_USB_PORT 0x80021035#define ACPI_DBG2_NET_PORT 0x800310361037/* Subtypes for PortSubtype field above */10381039#define ACPI_DBG2_16550_COMPATIBLE 0x00001040#define ACPI_DBG2_16550_SUBSET 0x00011041#define ACPI_DBG2_MAX311XE_SPI 0x00021042#define ACPI_DBG2_ARM_PL011 0x00031043#define ACPI_DBG2_MSM8X60 0x00041044#define ACPI_DBG2_16550_NVIDIA 0x00051045#define ACPI_DBG2_TI_OMAP 0x00061046#define ACPI_DBG2_APM88XXXX 0x00081047#define ACPI_DBG2_MSM8974 0x00091048#define ACPI_DBG2_SAM5250 0x000A1049#define ACPI_DBG2_INTEL_USIF 0x000B1050#define ACPI_DBG2_IMX6 0x000C1051#define ACPI_DBG2_ARM_SBSA_32BIT 0x000D1052#define ACPI_DBG2_ARM_SBSA_GENERIC 0x000E1053#define ACPI_DBG2_ARM_DCC 0x000F1054#define ACPI_DBG2_BCM2835 0x00101055#define ACPI_DBG2_SDM845_1_8432MHZ 0x00111056#define ACPI_DBG2_16550_WITH_GAS 0x00121057#define ACPI_DBG2_SDM845_7_372MHZ 0x00131058#define ACPI_DBG2_INTEL_LPSS 0x00141059#define ACPI_DBG2_RISCV_SBI_CON 0x001510601061#define ACPI_DBG2_1394_STANDARD 0x000010621063#define ACPI_DBG2_USB_XHCI 0x00001064#define ACPI_DBG2_USB_EHCI 0x0001106510661067/*******************************************************************************1068*1069* DBGP - Debug Port table1070* Version 11071*1072* Conforms to the "Debug Port Specification", Version 1.00, 2/9/20001073*1074******************************************************************************/10751076typedef struct acpi_table_dbgp1077{1078ACPI_TABLE_HEADER Header; /* Common ACPI table header */1079UINT8 Type; /* 0=full 16550, 1=subset of 16550 */1080UINT8 Reserved[3];1081ACPI_GENERIC_ADDRESS DebugPort;10821083} ACPI_TABLE_DBGP;108410851086/*******************************************************************************1087*1088* DMAR - DMA Remapping table1089* Version 11090*1091* Conforms to "Intel Virtualization Technology for Directed I/O",1092* Version 2.3, October 20141093*1094******************************************************************************/10951096typedef struct acpi_table_dmar1097{1098ACPI_TABLE_HEADER Header; /* Common ACPI table header */1099UINT8 Width; /* Host Address Width */1100UINT8 Flags;1101UINT8 Reserved[10];11021103} ACPI_TABLE_DMAR;11041105/* Masks for Flags field above */11061107#define ACPI_DMAR_INTR_REMAP (1)1108#define ACPI_DMAR_X2APIC_OPT_OUT (1<<1)1109#define ACPI_DMAR_X2APIC_MODE (1<<2)111011111112/* DMAR subtable header */11131114typedef struct acpi_dmar_header1115{1116UINT16 Type;1117UINT16 Length;11181119} ACPI_DMAR_HEADER;11201121/* Values for subtable type in ACPI_DMAR_HEADER */11221123enum AcpiDmarType1124{1125ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,1126ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,1127ACPI_DMAR_TYPE_ROOT_ATS = 2,1128ACPI_DMAR_TYPE_HARDWARE_AFFINITY = 3,1129ACPI_DMAR_TYPE_NAMESPACE = 4,1130ACPI_DMAR_TYPE_SATC = 5,1131ACPI_DMAR_TYPE_SIDP = 6,1132ACPI_DMAR_TYPE_RESERVED = 7 /* 7 and greater are reserved */1133};113411351136/* DMAR Device Scope structure */11371138typedef struct acpi_dmar_device_scope1139{1140UINT8 EntryType;1141UINT8 Length;1142UINT8 Flags;1143UINT8 Reserved;1144UINT8 EnumerationId;1145UINT8 Bus;11461147} ACPI_DMAR_DEVICE_SCOPE;11481149/* Values for EntryType in ACPI_DMAR_DEVICE_SCOPE - device types */11501151enum AcpiDmarScopeType1152{1153ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,1154ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,1155ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,1156ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,1157ACPI_DMAR_SCOPE_TYPE_HPET = 4,1158ACPI_DMAR_SCOPE_TYPE_NAMESPACE = 5,1159ACPI_DMAR_SCOPE_TYPE_RESERVED = 6 /* 6 and greater are reserved */1160};11611162typedef struct acpi_dmar_pci_path1163{1164UINT8 Device;1165UINT8 Function;11661167} ACPI_DMAR_PCI_PATH;116811691170/*1171* DMAR Subtables, correspond to Type in ACPI_DMAR_HEADER1172*/11731174/* 0: Hardware Unit Definition */11751176typedef struct acpi_dmar_hardware_unit1177{1178ACPI_DMAR_HEADER Header;1179UINT8 Flags;1180UINT8 Size;1181UINT16 Segment;1182UINT64 Address; /* Register Base Address */11831184} ACPI_DMAR_HARDWARE_UNIT;11851186/* Masks for Flags field above */11871188#define ACPI_DMAR_INCLUDE_ALL (1)118911901191/* 1: Reserved Memory Definition */11921193typedef struct acpi_dmar_reserved_memory1194{1195ACPI_DMAR_HEADER Header;1196UINT16 Reserved;1197UINT16 Segment;1198UINT64 BaseAddress; /* 4K aligned base address */1199UINT64 EndAddress; /* 4K aligned limit address */12001201} ACPI_DMAR_RESERVED_MEMORY;12021203/* Masks for Flags field above */12041205#define ACPI_DMAR_ALLOW_ALL (1)120612071208/* 2: Root Port ATS Capability Reporting Structure */12091210typedef struct acpi_dmar_atsr1211{1212ACPI_DMAR_HEADER Header;1213UINT8 Flags;1214UINT8 Reserved;1215UINT16 Segment;12161217} ACPI_DMAR_ATSR;12181219/* Masks for Flags field above */12201221#define ACPI_DMAR_ALL_PORTS (1)122212231224/* 3: Remapping Hardware Static Affinity Structure */12251226typedef struct acpi_dmar_rhsa1227{1228ACPI_DMAR_HEADER Header;1229UINT32 Reserved;1230UINT64 BaseAddress;1231UINT32 ProximityDomain;12321233} ACPI_DMAR_RHSA;123412351236/* 4: ACPI Namespace Device Declaration Structure */12371238typedef struct acpi_dmar_andd1239{1240ACPI_DMAR_HEADER Header;1241UINT8 Reserved[3];1242UINT8 DeviceNumber;1243union {1244char __pad;1245ACPI_FLEX_ARRAY(char, DeviceName);1246};12471248} ACPI_DMAR_ANDD;124912501251/* 5: SoC Integrated Address Translation Cache (SATC) */12521253typedef struct acpi_dmar_satc1254{1255ACPI_DMAR_HEADER Header;1256UINT8 Flags;1257UINT8 Reserved;1258UINT16 Segment;12591260} ACPI_DMAR_SATC;126112621263/* 6: SoC Integrated Device Property Reporting Structure */12641265typedef struct acpi_dmar_sidp1266{1267ACPI_DMAR_HEADER Header;1268UINT16 Reserved;1269UINT16 Segment;12701271} ACPI_DMAR_SIDP;127212731274/*******************************************************************************1275*1276* DRTM - Dynamic Root of Trust for Measurement table1277* Conforms to "TCG D-RTM Architecture" June 17 2013, Version 1.0.01278* Table version 11279*1280******************************************************************************/12811282typedef struct acpi_table_drtm1283{1284ACPI_TABLE_HEADER Header; /* Common ACPI table header */1285UINT64 EntryBaseAddress;1286UINT64 EntryLength;1287UINT32 EntryAddress32;1288UINT64 EntryAddress64;1289UINT64 ExitAddress;1290UINT64 LogAreaAddress;1291UINT32 LogAreaLength;1292UINT64 ArchDependentAddress;1293UINT32 Flags;12941295} ACPI_TABLE_DRTM;12961297/* Flag Definitions for above */12981299#define ACPI_DRTM_ACCESS_ALLOWED (1)1300#define ACPI_DRTM_ENABLE_GAP_CODE (1<<1)1301#define ACPI_DRTM_INCOMPLETE_MEASUREMENTS (1<<2)1302#define ACPI_DRTM_AUTHORITY_ORDER (1<<3)130313041305/* 1) Validated Tables List (64-bit addresses) */13061307typedef struct acpi_drtm_vtable_list1308{1309UINT32 ValidatedTableCount;1310UINT64 ValidatedTables[];13111312} ACPI_DRTM_VTABLE_LIST;13131314/* 2) Resources List (of Resource Descriptors) */13151316/* Resource Descriptor */13171318typedef struct acpi_drtm_resource1319{1320UINT8 Size[7];1321UINT8 Type;1322UINT64 Address;13231324} ACPI_DRTM_RESOURCE;13251326typedef struct acpi_drtm_resource_list1327{1328UINT32 ResourceCount;1329ACPI_DRTM_RESOURCE Resources[];13301331} ACPI_DRTM_RESOURCE_LIST;13321333/* 3) Platform-specific Identifiers List */13341335typedef struct acpi_drtm_dps_id1336{1337UINT32 DpsIdLength;1338UINT8 DpsId[16];13391340} ACPI_DRTM_DPS_ID;134113421343/*******************************************************************************1344*1345* ECDT - Embedded Controller Boot Resources Table1346* Version 11347*1348******************************************************************************/13491350typedef struct acpi_table_ecdt1351{1352ACPI_TABLE_HEADER Header; /* Common ACPI table header */1353ACPI_GENERIC_ADDRESS Control; /* Address of EC command/status register */1354ACPI_GENERIC_ADDRESS Data; /* Address of EC data register */1355UINT32 Uid; /* Unique ID - must be same as the EC _UID method */1356UINT8 Gpe; /* The GPE for the EC */1357UINT8 Id[]; /* Full namepath of the EC in the ACPI namespace */13581359} ACPI_TABLE_ECDT;136013611362/*******************************************************************************1363*1364* EINJ - Error Injection Table (ACPI 4.0)1365* Version 11366*1367******************************************************************************/13681369typedef struct acpi_table_einj1370{1371ACPI_TABLE_HEADER Header; /* Common ACPI table header */1372UINT32 HeaderLength;1373UINT8 Flags;1374UINT8 Reserved[3];1375UINT32 Entries;13761377} ACPI_TABLE_EINJ;137813791380/* EINJ Injection Instruction Entries (actions) */13811382typedef struct acpi_einj_entry1383{1384ACPI_WHEA_HEADER WheaHeader; /* Common header for WHEA tables */13851386} ACPI_EINJ_ENTRY;13871388/* Masks for Flags field above */13891390#define ACPI_EINJ_PRESERVE (1)13911392/* Values for Action field above */13931394enum AcpiEinjActions1395{1396ACPI_EINJ_BEGIN_OPERATION = 0x0,1397ACPI_EINJ_GET_TRIGGER_TABLE = 0x1,1398ACPI_EINJ_SET_ERROR_TYPE = 0x2,1399ACPI_EINJ_GET_ERROR_TYPE = 0x3,1400ACPI_EINJ_END_OPERATION = 0x4,1401ACPI_EINJ_EXECUTE_OPERATION = 0x5,1402ACPI_EINJ_CHECK_BUSY_STATUS = 0x6,1403ACPI_EINJ_GET_COMMAND_STATUS = 0x7,1404ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 0x8,1405ACPI_EINJ_GET_EXECUTE_TIMINGS = 0x9,1406ACPI_EINJV2_GET_ERROR_TYPE = 0x11,1407ACPI_EINJ_ACTION_RESERVED = 0x12, /* 0x12 and greater are reserved */1408ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */1409};14101411/* Values for Instruction field above */14121413enum AcpiEinjInstructions1414{1415ACPI_EINJ_READ_REGISTER = 0,1416ACPI_EINJ_READ_REGISTER_VALUE = 1,1417ACPI_EINJ_WRITE_REGISTER = 2,1418ACPI_EINJ_WRITE_REGISTER_VALUE = 3,1419ACPI_EINJ_NOOP = 4,1420ACPI_EINJ_FLUSH_CACHELINE = 5,1421ACPI_EINJ_INSTRUCTION_RESERVED = 6 /* 6 and greater are reserved */1422};14231424typedef struct acpi_einj_error_type_with_addr1425{1426UINT32 ErrorType;1427UINT32 VendorStructOffset;1428UINT32 Flags;1429UINT32 ApicId;1430UINT64 Address;1431UINT64 Range;1432UINT32 PcieId;14331434} ACPI_EINJ_ERROR_TYPE_WITH_ADDR;14351436typedef struct acpi_einj_vendor1437{1438UINT32 Length;1439UINT32 PcieId;1440UINT16 VendorId;1441UINT16 DeviceId;1442UINT8 RevisionId;1443UINT8 Reserved[3];14441445} ACPI_EINJ_VENDOR;144614471448/* EINJ Trigger Error Action Table */14491450typedef struct acpi_einj_trigger1451{1452UINT32 HeaderSize;1453UINT32 Revision;1454UINT32 TableSize;1455UINT32 EntryCount;14561457} ACPI_EINJ_TRIGGER;14581459/* Command status return values */14601461enum AcpiEinjCommandStatus1462{1463ACPI_EINJ_SUCCESS = 0,1464ACPI_EINJ_FAILURE = 1,1465ACPI_EINJ_INVALID_ACCESS = 2,1466ACPI_EINJ_STATUS_RESERVED = 3 /* 3 and greater are reserved */1467};146814691470/* Error types returned from ACPI_EINJ_GET_ERROR_TYPE (bitfield) */14711472#define ACPI_EINJ_PROCESSOR_CORRECTABLE (1)1473#define ACPI_EINJ_PROCESSOR_UNCORRECTABLE (1<<1)1474#define ACPI_EINJ_PROCESSOR_FATAL (1<<2)1475#define ACPI_EINJ_MEMORY_CORRECTABLE (1<<3)1476#define ACPI_EINJ_MEMORY_UNCORRECTABLE (1<<4)1477#define ACPI_EINJ_MEMORY_FATAL (1<<5)1478#define ACPI_EINJ_PCIX_CORRECTABLE (1<<6)1479#define ACPI_EINJ_PCIX_UNCORRECTABLE (1<<7)1480#define ACPI_EINJ_PCIX_FATAL (1<<8)1481#define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9)1482#define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10)1483#define ACPI_EINJ_PLATFORM_FATAL (1<<11)1484#define ACPI_EINJ_CXL_CACHE_CORRECTABLE (1<<12)1485#define ACPI_EINJ_CXL_CACHE_UNCORRECTABLE (1<<13)1486#define ACPI_EINJ_CXL_CACHE_FATAL (1<<14)1487#define ACPI_EINJ_CXL_MEM_CORRECTABLE (1<<15)1488#define ACPI_EINJ_CXL_MEM_UNCORRECTABLE (1<<16)1489#define ACPI_EINJ_CXL_MEM_FATAL (1<<17)1490#define ACPI_EINJ_VENDOR_DEFINED (1<<31)149114921493/*******************************************************************************1494*1495* ERST - Error Record Serialization Table (ACPI 4.0)1496* Version 11497*1498******************************************************************************/14991500typedef struct acpi_table_erst1501{1502ACPI_TABLE_HEADER Header; /* Common ACPI table header */1503UINT32 HeaderLength;1504UINT32 Reserved;1505UINT32 Entries;15061507} ACPI_TABLE_ERST;150815091510/* ERST Serialization Entries (actions) */15111512typedef struct acpi_erst_entry1513{1514ACPI_WHEA_HEADER WheaHeader; /* Common header for WHEA tables */15151516} ACPI_ERST_ENTRY;15171518/* Masks for Flags field above */15191520#define ACPI_ERST_PRESERVE (1)15211522/* Values for Action field above */15231524enum AcpiErstActions1525{1526ACPI_ERST_BEGIN_WRITE = 0,1527ACPI_ERST_BEGIN_READ = 1,1528ACPI_ERST_BEGIN_CLEAR = 2,1529ACPI_ERST_END = 3,1530ACPI_ERST_SET_RECORD_OFFSET = 4,1531ACPI_ERST_EXECUTE_OPERATION = 5,1532ACPI_ERST_CHECK_BUSY_STATUS = 6,1533ACPI_ERST_GET_COMMAND_STATUS = 7,1534ACPI_ERST_GET_RECORD_ID = 8,1535ACPI_ERST_SET_RECORD_ID = 9,1536ACPI_ERST_GET_RECORD_COUNT = 10,1537ACPI_ERST_BEGIN_DUMMY_WRIITE = 11,1538ACPI_ERST_NOT_USED = 12,1539ACPI_ERST_GET_ERROR_RANGE = 13,1540ACPI_ERST_GET_ERROR_LENGTH = 14,1541ACPI_ERST_GET_ERROR_ATTRIBUTES = 15,1542ACPI_ERST_EXECUTE_TIMINGS = 16,1543ACPI_ERST_ACTION_RESERVED = 17 /* 17 and greater are reserved */1544};15451546/* Values for Instruction field above */15471548enum AcpiErstInstructions1549{1550ACPI_ERST_READ_REGISTER = 0,1551ACPI_ERST_READ_REGISTER_VALUE = 1,1552ACPI_ERST_WRITE_REGISTER = 2,1553ACPI_ERST_WRITE_REGISTER_VALUE = 3,1554ACPI_ERST_NOOP = 4,1555ACPI_ERST_LOAD_VAR1 = 5,1556ACPI_ERST_LOAD_VAR2 = 6,1557ACPI_ERST_STORE_VAR1 = 7,1558ACPI_ERST_ADD = 8,1559ACPI_ERST_SUBTRACT = 9,1560ACPI_ERST_ADD_VALUE = 10,1561ACPI_ERST_SUBTRACT_VALUE = 11,1562ACPI_ERST_STALL = 12,1563ACPI_ERST_STALL_WHILE_TRUE = 13,1564ACPI_ERST_SKIP_NEXT_IF_TRUE = 14,1565ACPI_ERST_GOTO = 15,1566ACPI_ERST_SET_SRC_ADDRESS_BASE = 16,1567ACPI_ERST_SET_DST_ADDRESS_BASE = 17,1568ACPI_ERST_MOVE_DATA = 18,1569ACPI_ERST_INSTRUCTION_RESERVED = 19 /* 19 and greater are reserved */1570};15711572/* Command status return values */15731574enum AcpiErstCommandStatus1575{1576ACPI_ERST_SUCCESS = 0,1577ACPI_ERST_NO_SPACE = 1,1578ACPI_ERST_NOT_AVAILABLE = 2,1579ACPI_ERST_FAILURE = 3,1580ACPI_ERST_RECORD_EMPTY = 4,1581ACPI_ERST_NOT_FOUND = 5,1582ACPI_ERST_STATUS_RESERVED = 6 /* 6 and greater are reserved */1583};158415851586/* Error Record Serialization Information */15871588typedef struct acpi_erst_info1589{1590UINT16 Signature; /* Should be "ER" */1591UINT8 Data[48];15921593} ACPI_ERST_INFO;159415951596/*******************************************************************************1597*1598* FPDT - Firmware Performance Data Table (ACPI 5.0)1599* Version 11600*1601******************************************************************************/16021603typedef struct acpi_table_fpdt1604{1605ACPI_TABLE_HEADER Header; /* Common ACPI table header */16061607} ACPI_TABLE_FPDT;160816091610/* FPDT subtable header (Performance Record Structure) */16111612typedef struct acpi_fpdt_header1613{1614UINT16 Type;1615UINT8 Length;1616UINT8 Revision;16171618} ACPI_FPDT_HEADER;16191620/* Values for Type field above */16211622enum AcpiFpdtType1623{1624ACPI_FPDT_TYPE_BOOT = 0,1625ACPI_FPDT_TYPE_S3PERF = 11626};162716281629/*1630* FPDT subtables1631*/16321633/* 0: Firmware Basic Boot Performance Record */16341635typedef struct acpi_fpdt_boot_pointer1636{1637ACPI_FPDT_HEADER Header;1638UINT8 Reserved[4];1639UINT64 Address;16401641} ACPI_FPDT_BOOT_POINTER;164216431644/* 1: S3 Performance Table Pointer Record */16451646typedef struct acpi_fpdt_s3pt_pointer1647{1648ACPI_FPDT_HEADER Header;1649UINT8 Reserved[4];1650UINT64 Address;16511652} ACPI_FPDT_S3PT_POINTER;165316541655/*1656* S3PT - S3 Performance Table. This table is pointed to by the1657* S3 Pointer Record above.1658*/1659typedef struct acpi_table_s3pt1660{1661UINT8 Signature[4]; /* "S3PT" */1662UINT32 Length;16631664} ACPI_TABLE_S3PT;166516661667/*1668* S3PT Subtables (Not part of the actual FPDT)1669*/16701671/* Values for Type field in S3PT header */16721673enum AcpiS3ptType1674{1675ACPI_S3PT_TYPE_RESUME = 0,1676ACPI_S3PT_TYPE_SUSPEND = 1,1677ACPI_FPDT_BOOT_PERFORMANCE = 21678};16791680typedef struct acpi_s3pt_resume1681{1682ACPI_FPDT_HEADER Header;1683UINT32 ResumeCount;1684UINT64 FullResume;1685UINT64 AverageResume;16861687} ACPI_S3PT_RESUME;16881689typedef struct acpi_s3pt_suspend1690{1691ACPI_FPDT_HEADER Header;1692UINT64 SuspendStart;1693UINT64 SuspendEnd;16941695} ACPI_S3PT_SUSPEND;169616971698/*1699* FPDT Boot Performance Record (Not part of the actual FPDT)1700*/1701typedef struct acpi_fpdt_boot1702{1703ACPI_FPDT_HEADER Header;1704UINT8 Reserved[4];1705UINT64 ResetEnd;1706UINT64 LoadStart;1707UINT64 StartupStart;1708UINT64 ExitServicesEntry;1709UINT64 ExitServicesExit;17101711} ACPI_FPDT_BOOT;171217131714/*******************************************************************************1715*1716* GTDT - Generic Timer Description Table (ACPI 5.1)1717* Version 21718*1719******************************************************************************/17201721typedef struct acpi_table_gtdt1722{1723ACPI_TABLE_HEADER Header; /* Common ACPI table header */1724UINT64 CounterBlockAddresss;1725UINT32 Reserved;1726UINT32 SecureEl1Interrupt;1727UINT32 SecureEl1Flags;1728UINT32 NonSecureEl1Interrupt;1729UINT32 NonSecureEl1Flags;1730UINT32 VirtualTimerInterrupt;1731UINT32 VirtualTimerFlags;1732UINT32 NonSecureEl2Interrupt;1733UINT32 NonSecureEl2Flags;1734UINT64 CounterReadBlockAddress;1735UINT32 PlatformTimerCount;1736UINT32 PlatformTimerOffset;17371738} ACPI_TABLE_GTDT;17391740/* Flag Definitions: Timer Block Physical Timers and Virtual timers */17411742#define ACPI_GTDT_INTERRUPT_MODE (1)1743#define ACPI_GTDT_INTERRUPT_POLARITY (1<<1)1744#define ACPI_GTDT_ALWAYS_ON (1<<2)17451746typedef struct acpi_gtdt_el21747{1748UINT32 VirtualEL2TimerGsiv;1749UINT32 VirtualEL2TimerFlags;1750} ACPI_GTDT_EL2;175117521753/* Common GTDT subtable header */17541755typedef struct acpi_gtdt_header1756{1757UINT8 Type;1758UINT16 Length;17591760} ACPI_GTDT_HEADER;17611762/* Values for GTDT subtable type above */17631764enum AcpiGtdtType1765{1766ACPI_GTDT_TYPE_TIMER_BLOCK = 0,1767ACPI_GTDT_TYPE_WATCHDOG = 1,1768ACPI_GTDT_TYPE_RESERVED = 2 /* 2 and greater are reserved */1769};177017711772/* GTDT Subtables, correspond to Type in acpi_gtdt_header */17731774/* 0: Generic Timer Block */17751776typedef struct acpi_gtdt_timer_block1777{1778ACPI_GTDT_HEADER Header;1779UINT8 Reserved;1780UINT64 BlockAddress;1781UINT32 TimerCount;1782UINT32 TimerOffset;17831784} ACPI_GTDT_TIMER_BLOCK;17851786/* Timer Sub-Structure, one per timer */17871788typedef struct acpi_gtdt_timer_entry1789{1790UINT8 FrameNumber;1791UINT8 Reserved[3];1792UINT64 BaseAddress;1793UINT64 El0BaseAddress;1794UINT32 TimerInterrupt;1795UINT32 TimerFlags;1796UINT32 VirtualTimerInterrupt;1797UINT32 VirtualTimerFlags;1798UINT32 CommonFlags;17991800} ACPI_GTDT_TIMER_ENTRY;18011802/* Flag Definitions: TimerFlags and VirtualTimerFlags above */18031804#define ACPI_GTDT_GT_IRQ_MODE (1)1805#define ACPI_GTDT_GT_IRQ_POLARITY (1<<1)18061807/* Flag Definitions: CommonFlags above */18081809#define ACPI_GTDT_GT_IS_SECURE_TIMER (1)1810#define ACPI_GTDT_GT_ALWAYS_ON (1<<1)181118121813/* 1: SBSA Generic Watchdog Structure */18141815typedef struct acpi_gtdt_watchdog1816{1817ACPI_GTDT_HEADER Header;1818UINT8 Reserved;1819UINT64 RefreshFrameAddress;1820UINT64 ControlFrameAddress;1821UINT32 TimerInterrupt;1822UINT32 TimerFlags;18231824} ACPI_GTDT_WATCHDOG;18251826/* Flag Definitions: TimerFlags above */18271828#define ACPI_GTDT_WATCHDOG_IRQ_MODE (1)1829#define ACPI_GTDT_WATCHDOG_IRQ_POLARITY (1<<1)1830#define ACPI_GTDT_WATCHDOG_SECURE (1<<2)183118321833/*******************************************************************************1834*1835* HEST - Hardware Error Source Table (ACPI 4.0)1836* Version 11837*1838******************************************************************************/18391840typedef struct acpi_table_hest1841{1842ACPI_TABLE_HEADER Header; /* Common ACPI table header */1843UINT32 ErrorSourceCount;18441845} ACPI_TABLE_HEST;184618471848/* HEST subtable header */18491850typedef struct acpi_hest_header1851{1852UINT16 Type;1853UINT16 SourceId;18541855} ACPI_HEST_HEADER;185618571858/* Values for Type field above for subtables */18591860enum AcpiHestTypes1861{1862ACPI_HEST_TYPE_IA32_CHECK = 0,1863ACPI_HEST_TYPE_IA32_CORRECTED_CHECK = 1,1864ACPI_HEST_TYPE_IA32_NMI = 2,1865ACPI_HEST_TYPE_NOT_USED3 = 3,1866ACPI_HEST_TYPE_NOT_USED4 = 4,1867ACPI_HEST_TYPE_NOT_USED5 = 5,1868ACPI_HEST_TYPE_AER_ROOT_PORT = 6,1869ACPI_HEST_TYPE_AER_ENDPOINT = 7,1870ACPI_HEST_TYPE_AER_BRIDGE = 8,1871ACPI_HEST_TYPE_GENERIC_ERROR = 9,1872ACPI_HEST_TYPE_GENERIC_ERROR_V2 = 10,1873ACPI_HEST_TYPE_IA32_DEFERRED_CHECK = 11,1874ACPI_HEST_TYPE_RESERVED = 12 /* 12 and greater are reserved */1875};187618771878/*1879* HEST substructures contained in subtables1880*/18811882/*1883* IA32 Error Bank(s) - Follows the ACPI_HEST_IA_MACHINE_CHECK and1884* ACPI_HEST_IA_CORRECTED structures.1885*/1886typedef struct acpi_hest_ia_error_bank1887{1888UINT8 BankNumber;1889UINT8 ClearStatusOnInit;1890UINT8 StatusFormat;1891UINT8 Reserved;1892UINT32 ControlRegister;1893UINT64 ControlData;1894UINT32 StatusRegister;1895UINT32 AddressRegister;1896UINT32 MiscRegister;18971898} ACPI_HEST_IA_ERROR_BANK;189919001901/* Common HEST sub-structure for PCI/AER structures below (6,7,8) */19021903typedef struct acpi_hest_aer_common1904{1905UINT16 Reserved1;1906UINT8 Flags;1907UINT8 Enabled;1908UINT32 RecordsToPreallocate;1909UINT32 MaxSectionsPerRecord;1910UINT32 Bus; /* Bus and Segment numbers */1911UINT16 Device;1912UINT16 Function;1913UINT16 DeviceControl;1914UINT16 Reserved2;1915UINT32 UncorrectableMask;1916UINT32 UncorrectableSeverity;1917UINT32 CorrectableMask;1918UINT32 AdvancedCapabilities;19191920} ACPI_HEST_AER_COMMON;19211922/* Masks for HEST Flags fields */19231924#define ACPI_HEST_FIRMWARE_FIRST (1)1925#define ACPI_HEST_GLOBAL (1<<1)1926#define ACPI_HEST_GHES_ASSIST (1<<2)19271928/*1929* Macros to access the bus/segment numbers in Bus field above:1930* Bus number is encoded in bits 7:01931* Segment number is encoded in bits 23:81932*/1933#define ACPI_HEST_BUS(Bus) ((Bus) & 0xFF)1934#define ACPI_HEST_SEGMENT(Bus) (((Bus) >> 8) & 0xFFFF)193519361937/* Hardware Error Notification */19381939typedef struct acpi_hest_notify1940{1941UINT8 Type;1942UINT8 Length;1943UINT16 ConfigWriteEnable;1944UINT32 PollInterval;1945UINT32 Vector;1946UINT32 PollingThresholdValue;1947UINT32 PollingThresholdWindow;1948UINT32 ErrorThresholdValue;1949UINT32 ErrorThresholdWindow;19501951} ACPI_HEST_NOTIFY;19521953/* Values for Notify Type field above */19541955enum AcpiHestNotifyTypes1956{1957ACPI_HEST_NOTIFY_POLLED = 0,1958ACPI_HEST_NOTIFY_EXTERNAL = 1,1959ACPI_HEST_NOTIFY_LOCAL = 2,1960ACPI_HEST_NOTIFY_SCI = 3,1961ACPI_HEST_NOTIFY_NMI = 4,1962ACPI_HEST_NOTIFY_CMCI = 5, /* ACPI 5.0 */1963ACPI_HEST_NOTIFY_MCE = 6, /* ACPI 5.0 */1964ACPI_HEST_NOTIFY_GPIO = 7, /* ACPI 6.0 */1965ACPI_HEST_NOTIFY_SEA = 8, /* ACPI 6.1 */1966ACPI_HEST_NOTIFY_SEI = 9, /* ACPI 6.1 */1967ACPI_HEST_NOTIFY_GSIV = 10, /* ACPI 6.1 */1968ACPI_HEST_NOTIFY_SOFTWARE_DELEGATED = 11, /* ACPI 6.2 */1969ACPI_HEST_NOTIFY_RESERVED = 12 /* 12 and greater are reserved */1970};19711972/* Values for ConfigWriteEnable bitfield above */19731974#define ACPI_HEST_TYPE (1)1975#define ACPI_HEST_POLL_INTERVAL (1<<1)1976#define ACPI_HEST_POLL_THRESHOLD_VALUE (1<<2)1977#define ACPI_HEST_POLL_THRESHOLD_WINDOW (1<<3)1978#define ACPI_HEST_ERR_THRESHOLD_VALUE (1<<4)1979#define ACPI_HEST_ERR_THRESHOLD_WINDOW (1<<5)198019811982/*1983* HEST subtables1984*/19851986/* 0: IA32 Machine Check Exception */19871988typedef struct acpi_hest_ia_machine_check1989{1990ACPI_HEST_HEADER Header;1991UINT16 Reserved1;1992UINT8 Flags; /* See flags ACPI_HEST_GLOBAL, etc. above */1993UINT8 Enabled;1994UINT32 RecordsToPreallocate;1995UINT32 MaxSectionsPerRecord;1996UINT64 GlobalCapabilityData;1997UINT64 GlobalControlData;1998UINT8 NumHardwareBanks;1999UINT8 Reserved3[7];20002001} ACPI_HEST_IA_MACHINE_CHECK;200220032004/* 1: IA32 Corrected Machine Check */20052006typedef struct acpi_hest_ia_corrected2007{2008ACPI_HEST_HEADER Header;2009UINT16 Reserved1;2010UINT8 Flags; /* See flags ACPI_HEST_GLOBAL, etc. above */2011UINT8 Enabled;2012UINT32 RecordsToPreallocate;2013UINT32 MaxSectionsPerRecord;2014ACPI_HEST_NOTIFY Notify;2015UINT8 NumHardwareBanks;2016UINT8 Reserved2[3];20172018} ACPI_HEST_IA_CORRECTED;201920202021/* 2: IA32 Non-Maskable Interrupt */20222023typedef struct acpi_hest_ia_nmi2024{2025ACPI_HEST_HEADER Header;2026UINT32 Reserved;2027UINT32 RecordsToPreallocate;2028UINT32 MaxSectionsPerRecord;2029UINT32 MaxRawDataLength;20302031} ACPI_HEST_IA_NMI;203220332034/* 3,4,5: Not used */20352036/* 6: PCI Express Root Port AER */20372038typedef struct acpi_hest_aer_root2039{2040ACPI_HEST_HEADER Header;2041ACPI_HEST_AER_COMMON Aer;2042UINT32 RootErrorCommand;20432044} ACPI_HEST_AER_ROOT;204520462047/* 7: PCI Express AER (AER Endpoint) */20482049typedef struct acpi_hest_aer2050{2051ACPI_HEST_HEADER Header;2052ACPI_HEST_AER_COMMON Aer;20532054} ACPI_HEST_AER;205520562057/* 8: PCI Express/PCI-X Bridge AER */20582059typedef struct acpi_hest_aer_bridge2060{2061ACPI_HEST_HEADER Header;2062ACPI_HEST_AER_COMMON Aer;2063UINT32 UncorrectableMask2;2064UINT32 UncorrectableSeverity2;2065UINT32 AdvancedCapabilities2;20662067} ACPI_HEST_AER_BRIDGE;206820692070/* 9: Generic Hardware Error Source */20712072typedef struct acpi_hest_generic2073{2074ACPI_HEST_HEADER Header;2075UINT16 RelatedSourceId;2076UINT8 Reserved;2077UINT8 Enabled;2078UINT32 RecordsToPreallocate;2079UINT32 MaxSectionsPerRecord;2080UINT32 MaxRawDataLength;2081ACPI_GENERIC_ADDRESS ErrorStatusAddress;2082ACPI_HEST_NOTIFY Notify;2083UINT32 ErrorBlockLength;20842085} ACPI_HEST_GENERIC;208620872088/* 10: Generic Hardware Error Source, version 2 */20892090typedef struct acpi_hest_generic_v22091{2092ACPI_HEST_HEADER Header;2093UINT16 RelatedSourceId;2094UINT8 Reserved;2095UINT8 Enabled;2096UINT32 RecordsToPreallocate;2097UINT32 MaxSectionsPerRecord;2098UINT32 MaxRawDataLength;2099ACPI_GENERIC_ADDRESS ErrorStatusAddress;2100ACPI_HEST_NOTIFY Notify;2101UINT32 ErrorBlockLength;2102ACPI_GENERIC_ADDRESS ReadAckRegister;2103UINT64 ReadAckPreserve;2104UINT64 ReadAckWrite;21052106} ACPI_HEST_GENERIC_V2;210721082109/* Generic Error Status block */21102111typedef struct acpi_hest_generic_status2112{2113UINT32 BlockStatus;2114UINT32 RawDataOffset;2115UINT32 RawDataLength;2116UINT32 DataLength;2117UINT32 ErrorSeverity;21182119} ACPI_HEST_GENERIC_STATUS;21202121/* Values for BlockStatus flags above */21222123#define ACPI_HEST_UNCORRECTABLE (1)2124#define ACPI_HEST_CORRECTABLE (1<<1)2125#define ACPI_HEST_MULTIPLE_UNCORRECTABLE (1<<2)2126#define ACPI_HEST_MULTIPLE_CORRECTABLE (1<<3)2127#define ACPI_HEST_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */212821292130/* Generic Error Data entry */21312132typedef struct acpi_hest_generic_data2133{2134UINT8 SectionType[16];2135UINT32 ErrorSeverity;2136UINT16 Revision;2137UINT8 ValidationBits;2138UINT8 Flags;2139UINT32 ErrorDataLength;2140UINT8 FruId[16];2141UINT8 FruText[20];21422143} ACPI_HEST_GENERIC_DATA;21442145/* Extension for revision 0x0300 */21462147typedef struct acpi_hest_generic_data_v3002148{2149UINT8 SectionType[16];2150UINT32 ErrorSeverity;2151UINT16 Revision;2152UINT8 ValidationBits;2153UINT8 Flags;2154UINT32 ErrorDataLength;2155UINT8 FruId[16];2156UINT8 FruText[20];2157UINT64 TimeStamp;21582159} ACPI_HEST_GENERIC_DATA_V300;21602161/* Values for ErrorSeverity above */21622163#define ACPI_HEST_GEN_ERROR_RECOVERABLE 02164#define ACPI_HEST_GEN_ERROR_FATAL 12165#define ACPI_HEST_GEN_ERROR_CORRECTED 22166#define ACPI_HEST_GEN_ERROR_NONE 321672168/* Flags for ValidationBits above */21692170#define ACPI_HEST_GEN_VALID_FRU_ID (1)2171#define ACPI_HEST_GEN_VALID_FRU_STRING (1<<1)2172#define ACPI_HEST_GEN_VALID_TIMESTAMP (1<<2)217321742175/* 11: IA32 Deferred Machine Check Exception (ACPI 6.2) */21762177typedef struct acpi_hest_ia_deferred_check2178{2179ACPI_HEST_HEADER Header;2180UINT16 Reserved1;2181UINT8 Flags; /* See flags ACPI_HEST_GLOBAL, etc. above */2182UINT8 Enabled;2183UINT32 RecordsToPreallocate;2184UINT32 MaxSectionsPerRecord;2185ACPI_HEST_NOTIFY Notify;2186UINT8 NumHardwareBanks;2187UINT8 Reserved2[3];21882189} ACPI_HEST_IA_DEFERRED_CHECK;219021912192/*******************************************************************************2193*2194* HMAT - Heterogeneous Memory Attributes Table (ACPI 6.3)2195*2196******************************************************************************/21972198typedef struct acpi_table_hmat2199{2200ACPI_TABLE_HEADER Header; /* Common ACPI table header */2201UINT32 Reserved;22022203} ACPI_TABLE_HMAT;220422052206/* Values for HMAT structure types */22072208enum AcpiHmatType2209{2210ACPI_HMAT_TYPE_ADDRESS_RANGE = 0, /* Memory subsystem address range */2211ACPI_HMAT_TYPE_LOCALITY = 1, /* System locality latency and bandwidth information */2212ACPI_HMAT_TYPE_CACHE = 2, /* Memory side cache information */2213ACPI_HMAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */2214};22152216typedef struct acpi_hmat_structure2217{2218UINT16 Type;2219UINT16 Reserved;2220UINT32 Length;22212222} ACPI_HMAT_STRUCTURE;222322242225/*2226* HMAT Structures, correspond to Type in ACPI_HMAT_STRUCTURE2227*/22282229/* 0: Memory proximity domain attributes */22302231typedef struct acpi_hmat_proximity_domain2232{2233ACPI_HMAT_STRUCTURE Header;2234UINT16 Flags;2235UINT16 Reserved1;2236UINT32 InitiatorPD; /* Attached Initiator proximity domain */2237UINT32 MemoryPD; /* Memory proximity domain */2238UINT32 Reserved2;2239UINT64 Reserved3;2240UINT64 Reserved4;22412242} ACPI_HMAT_PROXIMITY_DOMAIN;22432244/* Masks for Flags field above */22452246#define ACPI_HMAT_INITIATOR_PD_VALID (1) /* 1: InitiatorPD field is valid */224722482249/* 1: System locality latency and bandwidth information */22502251typedef struct acpi_hmat_locality2252{2253ACPI_HMAT_STRUCTURE Header;2254UINT8 Flags;2255UINT8 DataType;2256UINT8 MinTransferSize;2257UINT8 Reserved1;2258UINT32 NumberOfInitiatorPDs;2259UINT32 NumberOfTargetPDs;2260UINT32 Reserved2;2261UINT64 EntryBaseUnit;22622263} ACPI_HMAT_LOCALITY;22642265/* Masks for Flags field above */22662267#define ACPI_HMAT_MEMORY_HIERARCHY (0x0F) /* Bits 0-3 */22682269/* Values for Memory Hierarchy flags */22702271#define ACPI_HMAT_MEMORY 02272#define ACPI_HMAT_1ST_LEVEL_CACHE 12273#define ACPI_HMAT_2ND_LEVEL_CACHE 22274#define ACPI_HMAT_3RD_LEVEL_CACHE 32275#define ACPI_HMAT_MINIMUM_XFER_SIZE 0x10 /* Bit 4: ACPI 6.4 */2276#define ACPI_HMAT_NON_SEQUENTIAL_XFERS 0x20 /* Bit 5: ACPI 6.4 */227722782279/* Values for DataType field above */22802281#define ACPI_HMAT_ACCESS_LATENCY 02282#define ACPI_HMAT_READ_LATENCY 12283#define ACPI_HMAT_WRITE_LATENCY 22284#define ACPI_HMAT_ACCESS_BANDWIDTH 32285#define ACPI_HMAT_READ_BANDWIDTH 42286#define ACPI_HMAT_WRITE_BANDWIDTH 5228722882289/* 2: Memory side cache information */22902291typedef struct acpi_hmat_cache2292{2293ACPI_HMAT_STRUCTURE Header;2294UINT32 MemoryPD;2295UINT32 Reserved1;2296UINT64 CacheSize;2297UINT32 CacheAttributes;2298UINT16 AddressMode;2299UINT16 NumberOfSMBIOSHandles;23002301} ACPI_HMAT_CACHE;23022303/* Masks for CacheAttributes field above */23042305#define ACPI_HMAT_TOTAL_CACHE_LEVEL (0x0000000F)2306#define ACPI_HMAT_CACHE_LEVEL (0x000000F0)2307#define ACPI_HMAT_CACHE_ASSOCIATIVITY (0x00000F00)2308#define ACPI_HMAT_WRITE_POLICY (0x0000F000)2309#define ACPI_HMAT_CACHE_LINE_SIZE (0xFFFF0000)23102311#define ACPI_HMAT_CACHE_MODE_UNKNOWN (0)2312#define ACPI_HMAT_CACHE_MODE_EXTENDED_LINEAR (1)23132314/* Values for cache associativity flag */23152316#define ACPI_HMAT_CA_NONE (0)2317#define ACPI_HMAT_CA_DIRECT_MAPPED (1)2318#define ACPI_HMAT_CA_COMPLEX_CACHE_INDEXING (2)23192320/* Values for write policy flag */23212322#define ACPI_HMAT_CP_NONE (0)2323#define ACPI_HMAT_CP_WB (1)2324#define ACPI_HMAT_CP_WT (2)232523262327/*******************************************************************************2328*2329* HPET - High Precision Event Timer table2330* Version 12331*2332* Conforms to "IA-PC HPET (High Precision Event Timers) Specification",2333* Version 1.0a, October 20042334*2335******************************************************************************/23362337typedef struct acpi_table_hpet2338{2339ACPI_TABLE_HEADER Header; /* Common ACPI table header */2340UINT32 Id; /* Hardware ID of event timer block */2341ACPI_GENERIC_ADDRESS Address; /* Address of event timer block */2342UINT8 Sequence; /* HPET sequence number */2343UINT16 MinimumTick; /* Main counter min tick, periodic mode */2344UINT8 Flags;23452346} ACPI_TABLE_HPET;23472348/* Masks for Flags field above */23492350#define ACPI_HPET_PAGE_PROTECT_MASK (3)23512352/* Values for Page Protect flags */23532354enum AcpiHpetPageProtect2355{2356ACPI_HPET_NO_PAGE_PROTECT = 0,2357ACPI_HPET_PAGE_PROTECT4 = 1,2358ACPI_HPET_PAGE_PROTECT64 = 22359};236023612362/*******************************************************************************2363*2364* IBFT - Boot Firmware Table2365* Version 12366*2367* Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b2368* Specification", Version 1.01, March 1, 20072369*2370* Note: It appears that this table is not intended to appear in the RSDT/XSDT.2371* Therefore, it is not currently supported by the disassembler.2372*2373******************************************************************************/23742375typedef struct acpi_table_ibft2376{2377ACPI_TABLE_HEADER Header; /* Common ACPI table header */2378UINT8 Reserved[12];23792380} ACPI_TABLE_IBFT;238123822383/* IBFT common subtable header */23842385typedef struct acpi_ibft_header2386{2387UINT8 Type;2388UINT8 Version;2389UINT16 Length;2390UINT8 Index;2391UINT8 Flags;23922393} ACPI_IBFT_HEADER;23942395/* Values for Type field above */23962397enum AcpiIbftType2398{2399ACPI_IBFT_TYPE_NOT_USED = 0,2400ACPI_IBFT_TYPE_CONTROL = 1,2401ACPI_IBFT_TYPE_INITIATOR = 2,2402ACPI_IBFT_TYPE_NIC = 3,2403ACPI_IBFT_TYPE_TARGET = 4,2404ACPI_IBFT_TYPE_EXTENSIONS = 5,2405ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */2406};240724082409/* IBFT subtables */24102411typedef struct acpi_ibft_control2412{2413ACPI_IBFT_HEADER Header;2414UINT16 Extensions;2415UINT16 InitiatorOffset;2416UINT16 Nic0Offset;2417UINT16 Target0Offset;2418UINT16 Nic1Offset;2419UINT16 Target1Offset;24202421} ACPI_IBFT_CONTROL;24222423typedef struct acpi_ibft_initiator2424{2425ACPI_IBFT_HEADER Header;2426UINT8 SnsServer[16];2427UINT8 SlpServer[16];2428UINT8 PrimaryServer[16];2429UINT8 SecondaryServer[16];2430UINT16 NameLength;2431UINT16 NameOffset;24322433} ACPI_IBFT_INITIATOR;24342435typedef struct acpi_ibft_nic2436{2437ACPI_IBFT_HEADER Header;2438UINT8 IpAddress[16];2439UINT8 SubnetMaskPrefix;2440UINT8 Origin;2441UINT8 Gateway[16];2442UINT8 PrimaryDns[16];2443UINT8 SecondaryDns[16];2444UINT8 Dhcp[16];2445UINT16 Vlan;2446UINT8 MacAddress[6];2447UINT16 PciAddress;2448UINT16 NameLength;2449UINT16 NameOffset;24502451} ACPI_IBFT_NIC;24522453typedef struct acpi_ibft_target2454{2455ACPI_IBFT_HEADER Header;2456UINT8 TargetIpAddress[16];2457UINT16 TargetIpSocket;2458UINT8 TargetBootLun[8];2459UINT8 ChapType;2460UINT8 NicAssociation;2461UINT16 TargetNameLength;2462UINT16 TargetNameOffset;2463UINT16 ChapNameLength;2464UINT16 ChapNameOffset;2465UINT16 ChapSecretLength;2466UINT16 ChapSecretOffset;2467UINT16 ReverseChapNameLength;2468UINT16 ReverseChapNameOffset;2469UINT16 ReverseChapSecretLength;2470UINT16 ReverseChapSecretOffset;24712472} ACPI_IBFT_TARGET;247324742475/* Reset to default packing */24762477#pragma pack()24782479#endif /* __ACTBL1_H__ */248024812482