Back to home page

Quest Cross Reference

 
 

    


Warning, cross-references for /kernel/include/drivers/acpi/actbl1.h need to be fixed.

0001 /******************************************************************************
0002  *
0003  * Name: actbl1.h - Additional ACPI table definitions
0004  *
0005  *****************************************************************************/
0006 
0007 /******************************************************************************
0008  *
0009  * 1. Copyright Notice
0010  *
0011  * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp.
0012  * All rights reserved.
0013  *
0014  * 2. License
0015  *
0016  * 2.1. This is your license from Intel Corp. under its intellectual property
0017  * rights.  You may have additional license terms from the party that provided
0018  * you this software, covering your right to use that party's intellectual
0019  * property rights.
0020  *
0021  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
0022  * copy of the source code appearing in this file ("Covered Code") an
0023  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
0024  * base code distributed originally by Intel ("Original Intel Code") to copy,
0025  * make derivatives, distribute, use and display any portion of the Covered
0026  * Code in any form, with the right to sublicense such rights; and
0027  *
0028  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
0029  * license (with the right to sublicense), under only those claims of Intel
0030  * patents that are infringed by the Original Intel Code, to make, use, sell,
0031  * offer to sell, and import the Covered Code and derivative works thereof
0032  * solely to the minimum extent necessary to exercise the above copyright
0033  * license, and in no event shall the patent license extend to any additions
0034  * to or modifications of the Original Intel Code.  No other license or right
0035  * is granted directly or by implication, estoppel or otherwise;
0036  *
0037  * The above copyright and patent license is granted only if the following
0038  * conditions are met:
0039  *
0040  * 3. Conditions
0041  *
0042  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
0043  * Redistribution of source code of any substantial portion of the Covered
0044  * Code or modification with rights to further distribute source must include
0045  * the above Copyright Notice, the above License, this list of Conditions,
0046  * and the following Disclaimer and Export Compliance provision.  In addition,
0047  * Licensee must cause all Covered Code to which Licensee contributes to
0048  * contain a file documenting the changes Licensee made to create that Covered
0049  * Code and the date of any change.  Licensee must include in that file the
0050  * documentation of any changes made by any predecessor Licensee.  Licensee
0051  * must include a prominent statement that the modification is derived,
0052  * directly or indirectly, from Original Intel Code.
0053  *
0054  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
0055  * Redistribution of source code of any substantial portion of the Covered
0056  * Code or modification without rights to further distribute source must
0057  * include the following Disclaimer and Export Compliance provision in the
0058  * documentation and/or other materials provided with distribution.  In
0059  * addition, Licensee may not authorize further sublicense of source of any
0060  * portion of the Covered Code, and must include terms to the effect that the
0061  * license from Licensee to its licensee is limited to the intellectual
0062  * property embodied in the software Licensee provides to its licensee, and
0063  * not to intellectual property embodied in modifications its licensee may
0064  * make.
0065  *
0066  * 3.3. Redistribution of Executable. Redistribution in executable form of any
0067  * substantial portion of the Covered Code or modification must reproduce the
0068  * above Copyright Notice, and the following Disclaimer and Export Compliance
0069  * provision in the documentation and/or other materials provided with the
0070  * distribution.
0071  *
0072  * 3.4. Intel retains all right, title, and interest in and to the Original
0073  * Intel Code.
0074  *
0075  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
0076  * Intel shall be used in advertising or otherwise to promote the sale, use or
0077  * other dealings in products derived from or relating to the Covered Code
0078  * without prior written authorization from Intel.
0079  *
0080  * 4. Disclaimer and Export Compliance
0081  *
0082  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
0083  * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
0084  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
0085  * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
0086  * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
0087  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
0088  * PARTICULAR PURPOSE.
0089  *
0090  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
0091  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
0092  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
0093  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
0094  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
0095  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
0096  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
0097  * LIMITED REMEDY.
0098  *
0099  * 4.3. Licensee shall not export, either directly or indirectly, any of this
0100  * software or system incorporating such software without first obtaining any
0101  * required license or other approval from the U. S. Department of Commerce or
0102  * any other agency or department of the United States Government.  In the
0103  * event Licensee exports any such software from the United States or
0104  * re-exports any such software from a foreign destination, Licensee shall
0105  * ensure that the distribution and export/re-export of the software is in
0106  * compliance with all laws, regulations, orders, or other restrictions of the
0107  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
0108  * any of its subsidiaries will export/re-export any technical data, process,
0109  * software, or service, directly or indirectly, to any country for which the
0110  * United States government or any agency thereof requires an export license,
0111  * other governmental approval, or letter of assurance, without first obtaining
0112  * such license, approval or letter.
0113  *
0114  *****************************************************************************/
0115 
0116 #ifndef __ACTBL1_H__
0117 #define __ACTBL1_H__
0118 
0119 
0120 /*******************************************************************************
0121  *
0122  * Additional ACPI Tables
0123  *
0124  * These tables are not consumed directly by the ACPICA subsystem, but are
0125  * included here to support device drivers and the AML disassembler.
0126  *
0127  ******************************************************************************/
0128 
0129 
0130 /*
0131  * Values for description table header signatures. Useful because they make
0132  * it more difficult to inadvertently type in the wrong signature.
0133  */
0134 #define ACPI_SIG_ASF            "ASF!"      /* Alert Standard Format table */
0135 #define ACPI_SIG_BERT           "BERT"      /* Boot Error Record Table */
0136 #define ACPI_SIG_BOOT           "BOOT"      /* Simple Boot Flag Table */
0137 #define ACPI_SIG_CPEP           "CPEP"      /* Corrected Platform Error Polling table */
0138 #define ACPI_SIG_DBGP           "DBGP"      /* Debug Port table */
0139 #define ACPI_SIG_DMAR           "DMAR"      /* DMA Remapping table */
0140 #define ACPI_SIG_ECDT           "ECDT"      /* Embedded Controller Boot Resources Table */
0141 #define ACPI_SIG_EINJ           "EINJ"      /* Error Injection table */
0142 #define ACPI_SIG_ERST           "ERST"      /* Error Record Serialization Table */
0143 #define ACPI_SIG_HEST           "HEST"      /* Hardware Error Source Table */
0144 #define ACPI_SIG_HPET           "HPET"      /* High Precision Event Timer table */
0145 #define ACPI_SIG_IBFT           "IBFT"      /* iSCSI Boot Firmware Table */
0146 #define ACPI_SIG_MADT           "APIC"      /* Multiple APIC Description Table */
0147 #define ACPI_SIG_MCFG           "MCFG"      /* PCI Memory Mapped Configuration table */
0148 #define ACPI_SIG_SBST           "SBST"      /* Smart Battery Specification Table */
0149 #define ACPI_SIG_SLIC           "SLIC"      /* Software Licensing Description Table */
0150 #define ACPI_SIG_SLIT           "SLIT"      /* System Locality Distance Information Table */
0151 #define ACPI_SIG_SPCR           "SPCR"      /* Serial Port Console Redirection table */
0152 #define ACPI_SIG_SPMI           "SPMI"      /* Server Platform Management Interface table */
0153 #define ACPI_SIG_SRAT           "SRAT"      /* System Resource Affinity Table */
0154 #define ACPI_SIG_TCPA           "TCPA"      /* Trusted Computing Platform Alliance table */
0155 #define ACPI_SIG_UEFI           "UEFI"      /* Uefi Boot Optimization Table */
0156 #define ACPI_SIG_WDAT           "WDAT"      /* Watchdog Action Table */
0157 #define ACPI_SIG_WDRT           "WDRT"      /* Watchdog Resource Table */
0158 
0159 
0160 /*
0161  * All tables must be byte-packed to match the ACPI specification, since
0162  * the tables are provided by the system BIOS.
0163  */
0164 #pragma pack(1)
0165 
0166 /*
0167  * Note about bitfields: The UINT8 type is used for bitfields in ACPI tables.
0168  * This is the only type that is even remotely portable. Anything else is not
0169  * portable, so do not use any other bitfield types.
0170  */
0171 
0172 
0173 /* Common Subtable header (used in MADT, SRAT, etc.) */
0174 
0175 typedef struct acpi_subtable_header
0176 {
0177     UINT8                   Type;
0178     UINT8                   Length;
0179 
0180 } ACPI_SUBTABLE_HEADER;
0181 
0182 
0183 /* Common Subtable header for WHEA tables (EINJ, ERST, WDAT) */
0184 
0185 typedef struct acpi_whea_header
0186 {
0187     UINT8                   Action;
0188     UINT8                   Instruction;
0189     UINT8                   Flags;
0190     UINT8                   Reserved;
0191     ACPI_GENERIC_ADDRESS    RegisterRegion;
0192     UINT64                  Value;              /* Value used with Read/Write register */
0193     UINT64                  Mask;               /* Bitmask required for this register instruction */
0194 
0195 } ACPI_WHEA_HEADER;
0196 
0197 
0198 /*******************************************************************************
0199  *
0200  * ASF - Alert Standard Format table (Signature "ASF!")
0201  *
0202  * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
0203  *
0204  ******************************************************************************/
0205 
0206 typedef struct acpi_table_asf
0207 {
0208     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0209 
0210 } ACPI_TABLE_ASF;
0211 
0212 
0213 /* ASF subtable header */
0214 
0215 typedef struct acpi_asf_header
0216 {
0217     UINT8                   Type;
0218     UINT8                   Reserved;
0219     UINT16                  Length;
0220 
0221 } ACPI_ASF_HEADER;
0222 
0223 
0224 /* Values for Type field above */
0225 
0226 enum AcpiAsfType
0227 {
0228     ACPI_ASF_TYPE_INFO          = 0,
0229     ACPI_ASF_TYPE_ALERT         = 1,
0230     ACPI_ASF_TYPE_CONTROL       = 2,
0231     ACPI_ASF_TYPE_BOOT          = 3,
0232     ACPI_ASF_TYPE_ADDRESS       = 4,
0233     ACPI_ASF_TYPE_RESERVED      = 5
0234 };
0235 
0236 /*
0237  * ASF subtables
0238  */
0239 
0240 /* 0: ASF Information */
0241 
0242 typedef struct acpi_asf_info
0243 {
0244     ACPI_ASF_HEADER         Header;
0245     UINT8                   MinResetValue;
0246     UINT8                   MinPollInterval;
0247     UINT16                  SystemId;
0248     UINT32                  MfgId;
0249     UINT8                   Flags;
0250     UINT8                   Reserved2[3];
0251 
0252 } ACPI_ASF_INFO;
0253 
0254 /* 1: ASF Alerts */
0255 
0256 typedef struct acpi_asf_alert
0257 {
0258     ACPI_ASF_HEADER         Header;
0259     UINT8                   AssertMask;
0260     UINT8                   DeassertMask;
0261     UINT8                   Alerts;
0262     UINT8                   DataLength;
0263 
0264 } ACPI_ASF_ALERT;
0265 
0266 typedef struct acpi_asf_alert_data
0267 {
0268     UINT8                   Address;
0269     UINT8                   Command;
0270     UINT8                   Mask;
0271     UINT8                   Value;
0272     UINT8                   SensorType;
0273     UINT8                   Type;
0274     UINT8                   Offset;
0275     UINT8                   SourceType;
0276     UINT8                   Severity;
0277     UINT8                   SensorNumber;
0278     UINT8                   Entity;
0279     UINT8                   Instance;
0280 
0281 } ACPI_ASF_ALERT_DATA;
0282 
0283 /* 2: ASF Remote Control */
0284 
0285 typedef struct acpi_asf_remote
0286 {
0287     ACPI_ASF_HEADER         Header;
0288     UINT8                   Controls;
0289     UINT8                   DataLength;
0290     UINT16                  Reserved2;
0291 
0292 } ACPI_ASF_REMOTE;
0293 
0294 typedef struct acpi_asf_control_data
0295 {
0296     UINT8                   Function;
0297     UINT8                   Address;
0298     UINT8                   Command;
0299     UINT8                   Value;
0300 
0301 } ACPI_ASF_CONTROL_DATA;
0302 
0303 /* 3: ASF RMCP Boot Options */
0304 
0305 typedef struct acpi_asf_rmcp
0306 {
0307     ACPI_ASF_HEADER         Header;
0308     UINT8                   Capabilities[7];
0309     UINT8                   CompletionCode;
0310     UINT32                  EnterpriseId;
0311     UINT8                   Command;
0312     UINT16                  Parameter;
0313     UINT16                  BootOptions;
0314     UINT16                  OemParameters;
0315 
0316 } ACPI_ASF_RMCP;
0317 
0318 /* 4: ASF Address */
0319 
0320 typedef struct acpi_asf_address
0321 {
0322     ACPI_ASF_HEADER         Header;
0323     UINT8                   EpromAddress;
0324     UINT8                   Devices;
0325 
0326 } ACPI_ASF_ADDRESS;
0327 
0328 
0329 /*******************************************************************************
0330  *
0331  * BERT - Boot Error Record Table
0332  *
0333  ******************************************************************************/
0334 
0335 typedef struct acpi_table_bert
0336 {
0337     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0338     UINT32                  RegionLength;       /* Length of the boot error region */
0339     UINT64                  Address;            /* Physical addresss of the error region */
0340 
0341 } ACPI_TABLE_BERT;
0342 
0343 
0344 /* Boot Error Region */
0345 
0346 typedef struct acpi_bert_region
0347 {
0348     UINT32                  BlockStatus;
0349     UINT32                  RawDataOffset;
0350     UINT32                  RawDataLength;
0351     UINT32                  DataLength;
0352     UINT32                  ErrorSeverity;
0353 
0354 } ACPI_BERT_REGION;
0355 
0356 /* BlockStatus Flags */
0357 
0358 #define ACPI_BERT_UNCORRECTABLE             (1)
0359 #define ACPI_BERT_CORRECTABLE               (2)
0360 #define ACPI_BERT_MULTIPLE_UNCORRECTABLE    (4)
0361 #define ACPI_BERT_MULTIPLE_CORRECTABLE      (8)
0362 
0363 
0364 /*******************************************************************************
0365  *
0366  * BOOT - Simple Boot Flag Table
0367  *
0368  ******************************************************************************/
0369 
0370 typedef struct acpi_table_boot
0371 {
0372     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0373     UINT8                   CmosIndex;          /* Index in CMOS RAM for the boot register */
0374     UINT8                   Reserved[3];
0375 
0376 } ACPI_TABLE_BOOT;
0377 
0378 
0379 /*******************************************************************************
0380  *
0381  * CPEP - Corrected Platform Error Polling table
0382  *
0383  ******************************************************************************/
0384 
0385 typedef struct acpi_table_cpep
0386 {
0387     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0388     UINT64                  Reserved;
0389 
0390 } ACPI_TABLE_CPEP;
0391 
0392 
0393 /* Subtable */
0394 
0395 typedef struct acpi_cpep_polling
0396 {
0397     UINT8                   Type;
0398     UINT8                   Length;
0399     UINT8                   Id;                 /* Processor ID */
0400     UINT8                   Eid;                /* Processor EID */
0401     UINT32                  Interval;           /* Polling interval (msec) */
0402 
0403 } ACPI_CPEP_POLLING;
0404 
0405 
0406 /*******************************************************************************
0407  *
0408  * DBGP - Debug Port table
0409  *
0410  ******************************************************************************/
0411 
0412 typedef struct acpi_table_dbgp
0413 {
0414     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0415     UINT8                   Type;               /* 0=full 16550, 1=subset of 16550 */
0416     UINT8                   Reserved[3];
0417     ACPI_GENERIC_ADDRESS    DebugPort;
0418 
0419 } ACPI_TABLE_DBGP;
0420 
0421 
0422 /*******************************************************************************
0423  *
0424  * DMAR - DMA Remapping table
0425  *        From "Intel Virtualization Technology for Directed I/O", Sept. 2007
0426  *
0427  ******************************************************************************/
0428 
0429 typedef struct acpi_table_dmar
0430 {
0431     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0432     UINT8                   Width;              /* Host Address Width */
0433     UINT8                   Flags;
0434     UINT8                   Reserved[10];
0435 
0436 } ACPI_TABLE_DMAR;
0437 
0438 /* Flags */
0439 
0440 #define ACPI_DMAR_INTR_REMAP        (1)
0441 
0442 /* DMAR subtable header */
0443 
0444 typedef struct acpi_dmar_header
0445 {
0446     UINT16                  Type;
0447     UINT16                  Length;
0448 
0449 } ACPI_DMAR_HEADER;
0450 
0451 /* Values for subtable type in ACPI_DMAR_HEADER */
0452 
0453 enum AcpiDmarType
0454 {
0455     ACPI_DMAR_TYPE_HARDWARE_UNIT        = 0,
0456     ACPI_DMAR_TYPE_RESERVED_MEMORY      = 1,
0457     ACPI_DMAR_TYPE_ATSR                 = 2,
0458     ACPI_DMAR_TYPE_RESERVED             = 3     /* 3 and greater are reserved */
0459 };
0460 
0461 typedef struct acpi_dmar_device_scope
0462 {
0463     UINT8                   EntryType;
0464     UINT8                   Length;
0465     UINT16                  Reserved;
0466     UINT8                   EnumerationId;
0467     UINT8                   Bus;
0468 
0469 } ACPI_DMAR_DEVICE_SCOPE;
0470 
0471 /* Values for EntryType in ACPI_DMAR_DEVICE_SCOPE */
0472 
0473 enum AcpiDmarScopeType
0474 {
0475     ACPI_DMAR_SCOPE_TYPE_NOT_USED       = 0,
0476     ACPI_DMAR_SCOPE_TYPE_ENDPOINT       = 1,
0477     ACPI_DMAR_SCOPE_TYPE_BRIDGE         = 2,
0478     ACPI_DMAR_SCOPE_TYPE_IOAPIC         = 3,
0479     ACPI_DMAR_SCOPE_TYPE_HPET           = 4,
0480     ACPI_DMAR_SCOPE_TYPE_RESERVED       = 5     /* 5 and greater are reserved */
0481 };
0482 
0483 typedef struct acpi_dmar_pci_path
0484 {
0485     UINT8                   Device;
0486     UINT8                   Function;
0487 
0488 } ACPI_DMAR_PCI_PATH;
0489 
0490 /*
0491  * DMAR Sub-tables, correspond to Type in ACPI_DMAR_HEADER
0492  */
0493 
0494 /* 0: Hardware Unit Definition */
0495 
0496 typedef struct acpi_dmar_hardware_unit
0497 {
0498     ACPI_DMAR_HEADER        Header;
0499     UINT8                   Flags;
0500     UINT8                   Reserved;
0501     UINT16                  Segment;
0502     UINT64                  Address;            /* Register Base Address */
0503 
0504 } ACPI_DMAR_HARDWARE_UNIT;
0505 
0506 /* Flags */
0507 
0508 #define ACPI_DMAR_INCLUDE_ALL       (1)
0509 
0510 /* 1: Reserved Memory Defininition */
0511 
0512 typedef struct acpi_dmar_reserved_memory
0513 {
0514     ACPI_DMAR_HEADER        Header;
0515     UINT16                  Reserved;
0516     UINT16                  Segment;
0517     UINT64                  BaseAddress;        /* 4K aligned base address */
0518     UINT64                  EndAddress;         /* 4K aligned limit address */
0519 
0520 } ACPI_DMAR_RESERVED_MEMORY;
0521 
0522 /* Flags */
0523 
0524 #define ACPI_DMAR_ALLOW_ALL         (1)
0525 
0526 /* 2: Root Port ATS Capability Reporting Structure */
0527 
0528 typedef struct acpi_dmar_atsr
0529 {
0530     ACPI_DMAR_HEADER        Header;
0531     UINT8                   Flags;
0532     UINT8                   Reserved;
0533     UINT16                  Segment;
0534 
0535 } ACPI_DMAR_ATSR;
0536 
0537 /* Flags */
0538 
0539 #define ACPI_DMAR_ALL_PORTS         (1)
0540 
0541 
0542 /*******************************************************************************
0543  *
0544  * ECDT - Embedded Controller Boot Resources Table
0545  *
0546  ******************************************************************************/
0547 
0548 typedef struct acpi_table_ecdt
0549 {
0550     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0551     ACPI_GENERIC_ADDRESS    Control;            /* Address of EC command/status register */
0552     ACPI_GENERIC_ADDRESS    Data;               /* Address of EC data register */
0553     UINT32                  Uid;                /* Unique ID - must be same as the EC _UID method */
0554     UINT8                   Gpe;                /* The GPE for the EC */
0555     UINT8                   Id[1];              /* Full namepath of the EC in the ACPI namespace */
0556 
0557 } ACPI_TABLE_ECDT;
0558 
0559 
0560 /*******************************************************************************
0561  *
0562  * EINJ - Error Injection Table
0563  *
0564  ******************************************************************************/
0565 
0566 typedef struct acpi_table_einj
0567 {
0568     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0569     UINT32                  HeaderLength;
0570     UINT32                  Reserved;
0571     UINT32                  Entries;
0572 
0573 } ACPI_TABLE_EINJ;
0574 
0575 /* EINJ Injection Instruction Entries (actions) */
0576 
0577 typedef struct acpi_einj_entry
0578 {
0579     ACPI_WHEA_HEADER        WheaHeader;         /* Common header for WHEA tables */
0580 
0581 } ACPI_EINJ_ENTRY;
0582 
0583 /* Values for Action field above */
0584 
0585 enum AcpiEinjActions
0586 {
0587     ACPI_EINJ_BEGIN_OPERATION       = 0,
0588     ACPI_EINJ_GET_TRIGGER_TABLE     = 1,
0589     ACPI_EINJ_SET_ERROR_TYPE        = 2,
0590     ACPI_EINJ_GET_ERROR_TYPE        = 3,
0591     ACPI_EINJ_END_OPERATION         = 4,
0592     ACPI_EINJ_EXECUTE_OPERATION     = 5,
0593     ACPI_EINJ_CHECK_BUSY_STATUS     = 6,
0594     ACPI_EINJ_GET_COMMAND_STATUS    = 7,
0595     ACPI_EINJ_ACTION_RESERVED       = 8,     /* 8 and greater are reserved */
0596     ACPI_EINJ_TRIGGER_ERROR         = 0xFF   /* Except for this value */
0597 };
0598 
0599 /* Values for Instruction field above */
0600 
0601 enum AcpiEinjInstructions
0602 {
0603     ACPI_EINJ_READ_REGISTER         = 0,
0604     ACPI_EINJ_READ_REGISTER_VALUE   = 1,
0605     ACPI_EINJ_WRITE_REGISTER        = 2,
0606     ACPI_EINJ_WRITE_REGISTER_VALUE  = 3,
0607     ACPI_EINJ_NOOP                  = 4,
0608     ACPI_EINJ_INSTRUCTION_RESERVED  = 5     /* 5 and greater are reserved */
0609 };
0610 
0611 /* EINJ Trigger Error Action Table */
0612 
0613 typedef struct acpi_einj_trigger
0614 {
0615     UINT32                  HeaderSize;
0616     UINT32                  Revision;
0617     UINT32                  TableSize;
0618     UINT32                  EntryCount;
0619 
0620 } ACPI_EINJ_TRIGGER;
0621 
0622 
0623 /*******************************************************************************
0624  *
0625  * ERST - Error Record Serialization Table
0626  *
0627  ******************************************************************************/
0628 
0629 typedef struct acpi_table_erst
0630 {
0631     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0632     UINT32                  HeaderLength;
0633     UINT32                  Reserved;
0634     UINT32                  Entries;
0635 
0636 } ACPI_TABLE_ERST;
0637 
0638 /* ERST Serialization Entries (actions) */
0639 
0640 typedef struct acpi_erst_entry
0641 {
0642     ACPI_WHEA_HEADER        WheaHeader;         /* Common header for WHEA tables */
0643 
0644 } ACPI_ERST_ENTRY;
0645 
0646 /* Values for Action field above */
0647 
0648 enum AcpiErstActions
0649 {
0650     ACPI_ERST_BEGIN_WRITE_OPERATION = 0,
0651     ACPI_ERST_BEGIN_READ_OPERATION  = 1,
0652     ACPI_ERST_BETGIN_CLEAR_OPERATION= 2,
0653     ACPI_ERST_END_OPERATION         = 3,
0654     ACPI_ERST_SET_RECORD_OFFSET     = 4,
0655     ACPI_ERST_EXECUTE_OPERATION     = 5,
0656     ACPI_ERST_CHECK_BUSY_STATUS     = 6,
0657     ACPI_ERST_GET_COMMAND_STATUS    = 7,
0658     ACPI_ERST_GET_RECORD_IDENTIFIER = 8,
0659     ACPI_ERST_SET_RECORD_IDENTIFIER = 9,
0660     ACPI_ERST_GET_RECORD_COUNT      = 10,
0661     ACPI_ERST_BEGIN_DUMMY_WRIITE    = 11,
0662     ACPI_ERST_NOT_USED              = 12,
0663     ACPI_ERST_GET_ERROR_RANGE       = 13,
0664     ACPI_ERST_GET_ERROR_LENGTH      = 14,
0665     ACPI_ERST_GET_ERROR_ATTRIBUTES  = 15,
0666     ACPI_ERST_ACTION_RESERVED       = 16    /* 16 and greater are reserved */
0667 };
0668 
0669 /* Values for Instruction field above */
0670 
0671 enum AcpiErstInstructions
0672 {
0673     ACPI_ERST_READ_REGISTER         = 0,
0674     ACPI_ERST_READ_REGISTER_VALUE   = 1,
0675     ACPI_ERST_WRITE_REGISTER        = 2,
0676     ACPI_ERST_WRITE_REGISTER_VALUE  = 3,
0677     ACPI_ERST_NOOP                  = 4,
0678     ACPI_ERST_LOAD_VAR1             = 5,
0679     ACPI_ERST_LOAD_VAR2             = 6,
0680     ACPI_ERST_STORE_VAR1            = 7,
0681     ACPI_ERST_ADD                   = 8,
0682     ACPI_ERST_SUBTRACT              = 9,
0683     ACPI_ERST_ADD_VALUE             = 10,
0684     ACPI_ERST_SUBTRACT_VALUE        = 11,
0685     ACPI_ERST_STALL                 = 12,
0686     ACPI_ERST_STALL_WHILE_TRUE      = 13,
0687     ACPI_ERST_SKIP_NEXT_IF_TRUE     = 14,
0688     ACPI_ERST_GOTO                  = 15,
0689     ACPI_ERST_SET_SRC_ADDRESS_BASE  = 16,
0690     ACPI_ERST_SET_DST_ADDRESS_BASE  = 17,
0691     ACPI_ERST_MOVE_DATA             = 18,
0692     ACPI_ERST_INSTRUCTION_RESERVED  = 19    /* 19 and greater are reserved */
0693 };
0694 
0695 
0696 /*******************************************************************************
0697  *
0698  * HEST - Hardware Error Source Table
0699  *
0700  ******************************************************************************/
0701 
0702 typedef struct acpi_table_hest
0703 {
0704     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0705     UINT32                  ErrorSourceCount;
0706 
0707 } ACPI_TABLE_HEST;
0708 
0709 
0710 /* HEST subtable header */
0711 
0712 typedef struct acpi_hest_header
0713 {
0714     UINT16                  Type;
0715 
0716 } ACPI_HEST_HEADER;
0717 
0718 
0719 /* Values for Type field above for subtables */
0720 
0721 enum AcpiHestTypes
0722 {
0723     ACPI_HEST_TYPE_XPF_MACHINE_CHECK             = 0,
0724     ACPI_HEST_TYPE_XPF_CORRECTED_MACHINE_CHECK   = 1,
0725     ACPI_HEST_TYPE_XPF_UNUSED                    = 2,
0726     ACPI_HEST_TYPE_XPF_NON_MASKABLE_INTERRUPT    = 3,
0727     ACPI_HEST_TYPE_IPF_CORRECTED_MACHINE_CHECK   = 4,
0728     ACPI_HEST_TYPE_IPF_CORRECTED_PLATFORM_ERROR  = 5,
0729     ACPI_HEST_TYPE_AER_ROOT_PORT                 = 6,
0730     ACPI_HEST_TYPE_AER_ENDPOINT                  = 7,
0731     ACPI_HEST_TYPE_AER_BRIDGE                    = 8,
0732     ACPI_HEST_TYPE_GENERIC_HARDWARE_ERROR_SOURCE = 9,
0733     ACPI_HEST_TYPE_RESERVED                      = 10    /* 10 and greater are reserved */
0734 };
0735 
0736 
0737 /*
0738  * HEST Sub-subtables
0739  */
0740 
0741 /* XPF Machine Check Error Bank */
0742 
0743 typedef struct acpi_hest_xpf_error_bank
0744 {
0745     UINT8                   BankNumber;
0746     UINT8                   ClearStatusOnInit;
0747     UINT8                   StatusFormat;
0748     UINT8                   ConfigWriteEnable;
0749     UINT32                  ControlRegister;
0750     UINT64                  ControlInitData;
0751     UINT32                  StatusRegister;
0752     UINT32                  AddressRegister;
0753     UINT32                  MiscRegister;
0754 
0755 } ACPI_HEST_XPF_ERROR_BANK;
0756 
0757 
0758 /* Generic Error Status */
0759 
0760 typedef struct acpi_hest_generic_status
0761 {
0762     UINT32                  BlockStatus;
0763     UINT32                  RawDataOffset;
0764     UINT32                  RawDataLength;
0765     UINT32                  DataLength;
0766     UINT32                  ErrorSeverity;
0767 
0768 } ACPI_HEST_GENERIC_STATUS;
0769 
0770 
0771 /* Generic Error Data */
0772 
0773 typedef struct acpi_hest_generic_data
0774 {
0775     UINT8                   SectionType[16];
0776     UINT32                  ErrorSeverity;
0777     UINT16                  Revision;
0778     UINT8                   ValidationBits;
0779     UINT8                   Flags;
0780     UINT32                  ErrorDataLength;
0781     UINT8                   FruId[16];
0782     UINT8                   FruText[20];
0783 
0784 } ACPI_HEST_GENERIC_DATA;
0785 
0786 
0787 /* Common HEST structure for PCI/AER types below (6,7,8) */
0788 
0789 typedef struct acpi_hest_aer_common
0790 {
0791     UINT16                  SourceId;
0792     UINT16                  ConfigWriteEnable;
0793     UINT8                   Flags;
0794     UINT8                   Enabled;
0795     UINT32                  RecordsToPreAllocate;
0796     UINT32                  MaxSectionsPerRecord;
0797     UINT32                  Bus;
0798     UINT16                  Device;
0799     UINT16                  Function;
0800     UINT16                  DeviceControl;
0801     UINT16                  Reserved;
0802     UINT32                  UncorrectableErrorMask;
0803     UINT32                  UncorrectableErrorSeverity;
0804     UINT32                  CorrectableErrorMask;
0805     UINT32                  AdvancedErrorCapabilities;
0806 
0807 } ACPI_HEST_AER_COMMON;
0808 
0809 
0810 /* Hardware Error Notification */
0811 
0812 typedef struct acpi_hest_notify
0813 {
0814     UINT8                   Type;
0815     UINT8                   Length;
0816     UINT16                  ConfigWriteEnable;
0817     UINT32                  PollInterval;
0818     UINT32                  Vector;
0819     UINT32                  PollingThresholdValue;
0820     UINT32                  PollingThresholdWindow;
0821     UINT32                  ErrorThresholdValue;
0822     UINT32                  ErrorThresholdWindow;
0823 
0824 } ACPI_HEST_NOTIFY;
0825 
0826 /* Values for Notify Type field above */
0827 
0828 enum AcpiHestNotifyTypes
0829 {
0830     ACPI_HEST_NOTIFY_POLLED     = 0,
0831     ACPI_HEST_NOTIFY_EXTERNAL   = 1,
0832     ACPI_HEST_NOTIFY_LOCAL      = 2,
0833     ACPI_HEST_NOTIFY_SCI        = 3,
0834     ACPI_HEST_NOTIFY_NMI        = 4,
0835     ACPI_HEST_NOTIFY_RESERVED   = 5     /* 5 and greater are reserved */
0836 };
0837 
0838 
0839 /*
0840  * HEST subtables
0841  *
0842  * From WHEA Design Document, 16 May 2007.
0843  * Note: There is no subtable type 2 in this version of the document,
0844  * and there are two different subtable type 3s.
0845  */
0846 
0847  /* 0: XPF Machine Check Exception */
0848 
0849 typedef struct acpi_hest_xpf_machine_check
0850 {
0851     ACPI_HEST_HEADER        Header;
0852     UINT16                  SourceId;
0853     UINT16                  ConfigWriteEnable;
0854     UINT8                   Flags;
0855     UINT8                   Reserved1;
0856     UINT32                  RecordsToPreAllocate;
0857     UINT32                  MaxSectionsPerRecord;
0858     UINT64                  GlobalCapabilityData;
0859     UINT64                  GlobalControlData;
0860     UINT8                   NumHardwareBanks;
0861     UINT8                   Reserved2[7];
0862 
0863 } ACPI_HEST_XPF_MACHINE_CHECK;
0864 
0865 
0866 /* 1: XPF Corrected Machine Check */
0867 
0868 typedef struct acpi_table_hest_xpf_corrected
0869 {
0870     ACPI_HEST_HEADER        Header;
0871     UINT16                  SourceId;
0872     UINT16                  ConfigWriteEnable;
0873     UINT8                   Flags;
0874     UINT8                   Enabled;
0875     UINT32                  RecordsToPreAllocate;
0876     UINT32                  MaxSectionsPerRecord;
0877     ACPI_HEST_NOTIFY        Notify;
0878     UINT8                   NumHardwareBanks;
0879     UINT8                   Reserved[3];
0880 
0881 } ACPI_HEST_XPF_CORRECTED;
0882 
0883 
0884 /* 3: XPF Non-Maskable Interrupt */
0885 
0886 typedef struct acpi_hest_xpf_nmi
0887 {
0888     ACPI_HEST_HEADER        Header;
0889     UINT16                  SourceId;
0890     UINT32                  Reserved;
0891     UINT32                  RecordsToPreAllocate;
0892     UINT32                  MaxSectionsPerRecord;
0893     UINT32                  MaxRawDataLength;
0894 
0895 } ACPI_HEST_XPF_NMI;
0896 
0897 
0898 /* 4: IPF Corrected Machine Check */
0899 
0900 typedef struct acpi_hest_ipf_corrected
0901 {
0902     ACPI_HEST_HEADER        Header;
0903     UINT8                   Enabled;
0904     UINT8                   Reserved;
0905 
0906 } ACPI_HEST_IPF_CORRECTED;
0907 
0908 
0909 /* 5: IPF Corrected Platform Error */
0910 
0911 typedef struct acpi_hest_ipf_corrected_platform
0912 {
0913     ACPI_HEST_HEADER        Header;
0914     UINT8                   Enabled;
0915     UINT8                   Reserved;
0916 
0917 } ACPI_HEST_IPF_CORRECTED_PLATFORM;
0918 
0919 
0920 /* 6: PCI Express Root Port AER */
0921 
0922 typedef struct acpi_hest_aer_root
0923 {
0924     ACPI_HEST_HEADER        Header;
0925     ACPI_HEST_AER_COMMON    Aer;
0926     UINT32                  RootErrorCommand;
0927 
0928 } ACPI_HEST_AER_ROOT;
0929 
0930 
0931 /* 7: PCI Express AER (AER Endpoint) */
0932 
0933 typedef struct acpi_hest_aer
0934 {
0935     ACPI_HEST_HEADER        Header;
0936     ACPI_HEST_AER_COMMON    Aer;
0937 
0938 } ACPI_HEST_AER;
0939 
0940 
0941 /* 8: PCI Express/PCI-X Bridge AER */
0942 
0943 typedef struct acpi_hest_aer_bridge
0944 {
0945     ACPI_HEST_HEADER        Header;
0946     ACPI_HEST_AER_COMMON    Aer;
0947     UINT32                  SecondaryUncorrectableErrorMask;
0948     UINT32                  SecondaryUncorrectableErrorSeverity;
0949     UINT32                  SecondaryAdvancedCapabilities;
0950 
0951 } ACPI_HEST_AER_BRIDGE;
0952 
0953 
0954 /* 9: Generic Hardware Error Source */
0955 
0956 typedef struct acpi_hest_generic
0957 {
0958     ACPI_HEST_HEADER        Header;
0959     UINT16                  SourceId;
0960     UINT16                  RelatedSourceId;
0961     UINT8                   ConfigWriteEnable;
0962     UINT8                   Enabled;
0963     UINT32                  RecordsToPreAllocate;
0964     UINT32                  MaxSectionsPerRecord;
0965     UINT32                  MaxRawDataLength;
0966     ACPI_GENERIC_ADDRESS    ErrorStatusAddress;
0967     ACPI_HEST_NOTIFY        Notify;
0968     UINT32                  ErrorStatusBlockLength;
0969 
0970 } ACPI_HEST_GENERIC;
0971 
0972 
0973 /*******************************************************************************
0974  *
0975  * HPET - High Precision Event Timer table
0976  *
0977  ******************************************************************************/
0978 
0979 typedef struct acpi_table_hpet
0980 {
0981     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
0982     UINT32                  Id;                 /* Hardware ID of event timer block */
0983     ACPI_GENERIC_ADDRESS    Address;            /* Address of event timer block */
0984     UINT8                   Sequence;           /* HPET sequence number */
0985     UINT16                  MinimumTick;        /* Main counter min tick, periodic mode */
0986     UINT8                   Flags;
0987 
0988 } ACPI_TABLE_HPET;
0989 
0990 /*! Flags */
0991 
0992 #define ACPI_HPET_PAGE_PROTECT      (1)         /* 00: No page protection */
0993 #define ACPI_HPET_PAGE_PROTECT_4    (1<<1)      /* 01: 4KB page protected */
0994 #define ACPI_HPET_PAGE_PROTECT_64   (1<<2)      /* 02: 64KB page protected */
0995 
0996 /*! [End] no source code translation !*/
0997 
0998 
0999 /*******************************************************************************
1000  *
1001  * IBFT - Boot Firmware Table
1002  *
1003  ******************************************************************************/
1004 
1005 typedef struct acpi_table_ibft
1006 {
1007     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1008     UINT8                   Reserved[12];
1009 
1010 } ACPI_TABLE_IBFT;
1011 
1012 
1013 /* IBFT common subtable header */
1014 
1015 typedef struct acpi_ibft_header
1016 {
1017     UINT8                   Type;
1018     UINT8                   Version;
1019     UINT16                  Length;
1020     UINT8                   Index;
1021     UINT8                   Flags;
1022 
1023 } ACPI_IBFT_HEADER;
1024 
1025 
1026 /* Values for Type field above */
1027 
1028 enum AcpiIbftType
1029 {
1030     ACPI_IBFT_TYPE_NOT_USED         = 0,
1031     ACPI_IBFT_TYPE_CONTROL          = 1,
1032     ACPI_IBFT_TYPE_INITIATOR        = 2,
1033     ACPI_IBFT_TYPE_NIC              = 3,
1034     ACPI_IBFT_TYPE_TARGET           = 4,
1035     ACPI_IBFT_TYPE_EXTENSIONS       = 5,
1036     ACPI_IBFT_TYPE_RESERVED         = 6     /* 6 and greater are reserved */
1037 };
1038 
1039 
1040 /* IBFT subtables */
1041 
1042 typedef struct acpi_ibft_control
1043 {
1044     ACPI_IBFT_HEADER        Header;
1045     UINT16                  Extensions;
1046     UINT16                  InitiatorOffset;
1047     UINT16                  Nic0Offset;
1048     UINT16                  Target0Offset;
1049     UINT16                  Nic1Offset;
1050     UINT16                  Target1Offset;
1051 
1052 } ACPI_IBFT_CONTROL;
1053 
1054 typedef struct acpi_ibft_initiator
1055 {
1056     ACPI_IBFT_HEADER        Header;
1057     UINT8                   SnsServer[16];
1058     UINT8                   SlpServer[16];
1059     UINT8                   PrimaryServer[16];
1060     UINT8                   SecondaryServer[16];
1061     UINT16                  NameLength;
1062     UINT16                  NameOffset;
1063 
1064 } ACPI_IBFT_INITIATOR;
1065 
1066 typedef struct acpi_ibft_nic
1067 {
1068     ACPI_IBFT_HEADER        Header;
1069     UINT8                   IpAddress[16];
1070     UINT8                   SubnetMaskPrefix;
1071     UINT8                   Origin;
1072     UINT8                   Gateway[16];
1073     UINT8                   PrimaryDns[16];
1074     UINT8                   SecondaryDns[16];
1075     UINT8                   Dhcp[16];
1076     UINT16                  Vlan;
1077     UINT8                   MacAddress[6];
1078     UINT16                  PciAddress;
1079     UINT16                  NameLength;
1080     UINT16                  NameOffset;
1081 
1082 } ACPI_IBFT_NIC;
1083 
1084 typedef struct acpi_ibft_target
1085 {
1086     ACPI_IBFT_HEADER        Header;
1087     UINT8                   TargetIpAddress[16];
1088     UINT16                  TargetIpSocket;
1089     UINT8                   TargetBootLun[8];
1090     UINT8                   ChapType;
1091     UINT8                   NicAssociation;
1092     UINT16                  TargetNameLength;
1093     UINT16                  TargetNameOffset;
1094     UINT16                  ChapNameLength;
1095     UINT16                  ChapNameOffset;
1096     UINT16                  ChapSecretLength;
1097     UINT16                  ChapSecretOffset;
1098     UINT16                  ReverseChapNameLength;
1099     UINT16                  ReverseChapNameOffset;
1100     UINT16                  ReverseChapSecretLength;
1101     UINT16                  ReverseChapSecretOffset;
1102 
1103 } ACPI_IBFT_TARGET;
1104 
1105 
1106 /*******************************************************************************
1107  *
1108  * MADT - Multiple APIC Description Table
1109  *
1110  ******************************************************************************/
1111 
1112 typedef struct acpi_table_madt
1113 {
1114     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1115     UINT32                  Address;            /* Physical address of local APIC */
1116     UINT32                  Flags;
1117 
1118 } ACPI_TABLE_MADT;
1119 
1120 /* Flags */
1121 
1122 #define ACPI_MADT_PCAT_COMPAT       (1)         /* 00:    System also has dual 8259s */
1123 
1124 /* Values for PCATCompat flag */
1125 
1126 #define ACPI_MADT_DUAL_PIC          0
1127 #define ACPI_MADT_MULTIPLE_APIC     1
1128 
1129 
1130 /* Values for subtable type in ACPI_SUBTABLE_HEADER */
1131 
1132 enum AcpiMadtType
1133 {
1134     ACPI_MADT_TYPE_LOCAL_APIC           = 0,
1135     ACPI_MADT_TYPE_IO_APIC              = 1,
1136     ACPI_MADT_TYPE_INTERRUPT_OVERRIDE   = 2,
1137     ACPI_MADT_TYPE_NMI_SOURCE           = 3,
1138     ACPI_MADT_TYPE_LOCAL_APIC_NMI       = 4,
1139     ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE  = 5,
1140     ACPI_MADT_TYPE_IO_SAPIC             = 6,
1141     ACPI_MADT_TYPE_LOCAL_SAPIC          = 7,
1142     ACPI_MADT_TYPE_INTERRUPT_SOURCE     = 8,
1143     ACPI_MADT_TYPE_LOCAL_X2APIC         = 9,
1144     ACPI_MADT_TYPE_LOCAL_X2APIC_NMI     = 10,
1145     ACPI_MADT_TYPE_RESERVED             = 11    /* 11 and greater are reserved */
1146 };
1147 
1148 
1149 /*
1150  * MADT Sub-tables, correspond to Type in ACPI_SUBTABLE_HEADER
1151  */
1152 
1153 /* 0: Processor Local APIC */
1154 
1155 typedef struct acpi_madt_local_apic
1156 {
1157     ACPI_SUBTABLE_HEADER    Header;
1158     UINT8                   ProcessorId;        /* ACPI processor id */
1159     UINT8                   Id;                 /* Processor's local APIC id */
1160     UINT32                  LapicFlags;
1161 
1162 } ACPI_MADT_LOCAL_APIC;
1163 
1164 /* 1: IO APIC */
1165 
1166 typedef struct acpi_madt_io_apic
1167 {
1168     ACPI_SUBTABLE_HEADER    Header;
1169     UINT8                   Id;                 /* I/O APIC ID */
1170     UINT8                   Reserved;           /* Reserved - must be zero */
1171     UINT32                  Address;            /* APIC physical address */
1172     UINT32                  GlobalIrqBase;      /* Global system interrupt where INTI lines start */
1173 
1174 } ACPI_MADT_IO_APIC;
1175 
1176 /* 2: Interrupt Override */
1177 
1178 typedef struct acpi_madt_interrupt_override
1179 {
1180     ACPI_SUBTABLE_HEADER    Header;
1181     UINT8                   Bus;                /* 0 - ISA */
1182     UINT8                   SourceIrq;          /* Interrupt source (IRQ) */
1183     UINT32                  GlobalIrq;          /* Global system interrupt */
1184     UINT16                  IntiFlags;
1185 
1186 } ACPI_MADT_INTERRUPT_OVERRIDE;
1187 
1188 /* 3: NMI Source */
1189 
1190 typedef struct acpi_madt_nmi_source
1191 {
1192     ACPI_SUBTABLE_HEADER    Header;
1193     UINT16                  IntiFlags;
1194     UINT32                  GlobalIrq;          /* Global system interrupt */
1195 
1196 } ACPI_MADT_NMI_SOURCE;
1197 
1198 /* 4: Local APIC NMI */
1199 
1200 typedef struct acpi_madt_local_apic_nmi
1201 {
1202     ACPI_SUBTABLE_HEADER    Header;
1203     UINT8                   ProcessorId;        /* ACPI processor id */
1204     UINT16                  IntiFlags;
1205     UINT8                   Lint;               /* LINTn to which NMI is connected */
1206 
1207 } ACPI_MADT_LOCAL_APIC_NMI;
1208 
1209 /* 5: Address Override */
1210 
1211 typedef struct acpi_madt_local_apic_override
1212 {
1213     ACPI_SUBTABLE_HEADER    Header;
1214     UINT16                  Reserved;           /* Reserved, must be zero */
1215     UINT64                  Address;            /* APIC physical address */
1216 
1217 } ACPI_MADT_LOCAL_APIC_OVERRIDE;
1218 
1219 /* 6: I/O Sapic */
1220 
1221 typedef struct acpi_madt_io_sapic
1222 {
1223     ACPI_SUBTABLE_HEADER    Header;
1224     UINT8                   Id;                 /* I/O SAPIC ID */
1225     UINT8                   Reserved;           /* Reserved, must be zero */
1226     UINT32                  GlobalIrqBase;      /* Global interrupt for SAPIC start */
1227     UINT64                  Address;            /* SAPIC physical address */
1228 
1229 } ACPI_MADT_IO_SAPIC;
1230 
1231 /* 7: Local Sapic */
1232 
1233 typedef struct acpi_madt_local_sapic
1234 {
1235     ACPI_SUBTABLE_HEADER    Header;
1236     UINT8                   ProcessorId;        /* ACPI processor id */
1237     UINT8                   Id;                 /* SAPIC ID */
1238     UINT8                   Eid;                /* SAPIC EID */
1239     UINT8                   Reserved[3];        /* Reserved, must be zero */
1240     UINT32                  LapicFlags;
1241     UINT32                  Uid;                /* Numeric UID - ACPI 3.0 */
1242     char                    UidString[1];       /* String UID  - ACPI 3.0 */
1243 
1244 } ACPI_MADT_LOCAL_SAPIC;
1245 
1246 /* 8: Platform Interrupt Source */
1247 
1248 typedef struct acpi_madt_interrupt_source
1249 {
1250     ACPI_SUBTABLE_HEADER    Header;
1251     UINT16                  IntiFlags;
1252     UINT8                   Type;               /* 1=PMI, 2=INIT, 3=corrected */
1253     UINT8                   Id;                 /* Processor ID */
1254     UINT8                   Eid;                /* Processor EID */
1255     UINT8                   IoSapicVector;      /* Vector value for PMI interrupts */
1256     UINT32                  GlobalIrq;          /* Global system interrupt */
1257     UINT32                  Flags;              /* Interrupt Source Flags */
1258 
1259 } ACPI_MADT_INTERRUPT_SOURCE;
1260 
1261 /* Flags field above */
1262 
1263 #define ACPI_MADT_CPEI_OVERRIDE     (1)
1264 
1265 /* 9: Processor Local X2APIC (ACPI 4.0) */
1266 
1267 typedef struct acpi_madt_local_x2apic
1268 {
1269     ACPI_SUBTABLE_HEADER    Header;
1270     UINT16                  Reserved;           /* Reserved - must be zero */
1271     UINT32                  LocalApicId;        /* Processor x2APIC ID  */
1272     UINT32                  LapicFlags;
1273     UINT32                  Uid;                /* ACPI processor UID */
1274 
1275 } ACPI_MADT_LOCAL_X2APIC;
1276 
1277 /* 10: Local X2APIC NMI (ACPI 4.0) */
1278 
1279 typedef struct acpi_madt_local_x2apic_nmi
1280 {
1281     ACPI_SUBTABLE_HEADER    Header;
1282     UINT16                  IntiFlags;
1283     UINT32                  Uid;                /* ACPI processor UID */
1284     UINT8                   Lint;               /* LINTn to which NMI is connected */
1285     UINT8                   Reserved[3];        /* Reserved - must be zero */
1286 
1287 } ACPI_MADT_LOCAL_X2APIC_NMI;
1288 
1289 
1290 /*
1291  * Common flags fields for MADT subtables
1292  */
1293 
1294 /* MADT Local APIC flags (LapicFlags) */
1295 
1296 #define ACPI_MADT_ENABLED           (1)         /* 00: Processor is usable if set */
1297 
1298 /* MADT MPS INTI flags (IntiFlags) */
1299 
1300 #define ACPI_MADT_POLARITY_MASK     (3)         /* 00-01: Polarity of APIC I/O input signals */
1301 #define ACPI_MADT_TRIGGER_MASK      (3<<2)      /* 02-03: Trigger mode of APIC input signals */
1302 
1303 /* Values for MPS INTI flags */
1304 
1305 #define ACPI_MADT_POLARITY_CONFORMS       0
1306 #define ACPI_MADT_POLARITY_ACTIVE_HIGH    1
1307 #define ACPI_MADT_POLARITY_RESERVED       2
1308 #define ACPI_MADT_POLARITY_ACTIVE_LOW     3
1309 
1310 #define ACPI_MADT_TRIGGER_CONFORMS        (0)
1311 #define ACPI_MADT_TRIGGER_EDGE            (1<<2)
1312 #define ACPI_MADT_TRIGGER_RESERVED        (2<<2)
1313 #define ACPI_MADT_TRIGGER_LEVEL           (3<<2)
1314 
1315 
1316 /*******************************************************************************
1317  *
1318  * MCFG - PCI Memory Mapped Configuration table and sub-table
1319  *
1320  ******************************************************************************/
1321 
1322 typedef struct acpi_table_mcfg
1323 {
1324     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1325     UINT8                   Reserved[8];
1326 
1327 } ACPI_TABLE_MCFG;
1328 
1329 
1330 /* Subtable */
1331 
1332 typedef struct acpi_mcfg_allocation
1333 {
1334     UINT64                  Address;            /* Base address, processor-relative */
1335     UINT16                  PciSegment;         /* PCI segment group number */
1336     UINT8                   StartBusNumber;     /* Starting PCI Bus number */
1337     UINT8                   EndBusNumber;       /* Final PCI Bus number */
1338     UINT32                  Reserved;
1339 
1340 } ACPI_MCFG_ALLOCATION;
1341 
1342 
1343 /*******************************************************************************
1344  *
1345  * SBST - Smart Battery Specification Table
1346  *
1347  ******************************************************************************/
1348 
1349 typedef struct acpi_table_sbst
1350 {
1351     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1352     UINT32                  WarningLevel;
1353     UINT32                  LowLevel;
1354     UINT32                  CriticalLevel;
1355 
1356 } ACPI_TABLE_SBST;
1357 
1358 
1359 /*******************************************************************************
1360  *
1361  * SLIT - System Locality Distance Information Table
1362  *
1363  ******************************************************************************/
1364 
1365 typedef struct acpi_table_slit
1366 {
1367     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1368     UINT64                  LocalityCount;
1369     UINT8                   Entry[1];           /* Real size = localities^2 */
1370 
1371 } ACPI_TABLE_SLIT;
1372 
1373 
1374 /*******************************************************************************
1375  *
1376  * SPCR - Serial Port Console Redirection table
1377  *
1378  ******************************************************************************/
1379 
1380 typedef struct acpi_table_spcr
1381 {
1382     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1383     UINT8                   InterfaceType;      /* 0=full 16550, 1=subset of 16550 */
1384     UINT8                   Reserved[3];
1385     ACPI_GENERIC_ADDRESS    SerialPort;
1386     UINT8                   InterruptType;
1387     UINT8                   PcInterrupt;
1388     UINT32                  Interrupt;
1389     UINT8                   BaudRate;
1390     UINT8                   Parity;
1391     UINT8                   StopBits;
1392     UINT8                   FlowControl;
1393     UINT8                   TerminalType;
1394     UINT8                   Reserved1;
1395     UINT16                  PciDeviceId;
1396     UINT16                  PciVendorId;
1397     UINT8                   PciBus;
1398     UINT8                   PciDevice;
1399     UINT8                   PciFunction;
1400     UINT32                  PciFlags;
1401     UINT8                   PciSegment;
1402     UINT32                  Reserved2;
1403 
1404 } ACPI_TABLE_SPCR;
1405 
1406 
1407 /*******************************************************************************
1408  *
1409  * SPMI - Server Platform Management Interface table
1410  *
1411  ******************************************************************************/
1412 
1413 typedef struct acpi_table_spmi
1414 {
1415     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1416     UINT8                   Reserved;
1417     UINT8                   InterfaceType;
1418     UINT16                  SpecRevision;       /* Version of IPMI */
1419     UINT8                   InterruptType;
1420     UINT8                   GpeNumber;          /* GPE assigned */
1421     UINT8                   Reserved1;
1422     UINT8                   PciDeviceFlag;
1423     UINT32                  Interrupt;
1424     ACPI_GENERIC_ADDRESS    IpmiRegister;
1425     UINT8                   PciSegment;
1426     UINT8                   PciBus;
1427     UINT8                   PciDevice;
1428     UINT8                   PciFunction;
1429 
1430 } ACPI_TABLE_SPMI;
1431 
1432 
1433 /*******************************************************************************
1434  *
1435  * SRAT - System Resource Affinity Table
1436  *
1437  ******************************************************************************/
1438 
1439 typedef struct acpi_table_srat
1440 {
1441     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1442     UINT32                  TableRevision;      /* Must be value '1' */
1443     UINT64                  Reserved;           /* Reserved, must be zero */
1444 
1445 } ACPI_TABLE_SRAT;
1446 
1447 /* Values for subtable type in ACPI_SUBTABLE_HEADER */
1448 
1449 enum AcpiSratType
1450 {
1451     ACPI_SRAT_TYPE_CPU_AFFINITY         = 0,
1452     ACPI_SRAT_TYPE_MEMORY_AFFINITY      = 1,
1453     ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY  = 2,
1454     ACPI_SRAT_TYPE_RESERVED             = 3     /* 3 and greater are reserved */
1455 };
1456 
1457 /*
1458  * SRAT Sub-tables, correspond to Type in ACPI_SUBTABLE_HEADER
1459  */
1460 
1461 /* 0: Processor Local APIC/SAPIC Affinity */
1462 
1463 typedef struct acpi_srat_cpu_affinity
1464 {
1465     ACPI_SUBTABLE_HEADER    Header;
1466     UINT8                   ProximityDomainLo;
1467     UINT8                   ApicId;
1468     UINT32                  Flags;
1469     UINT8                   LocalSapicEid;
1470     UINT8                   ProximityDomainHi[3];
1471     UINT32                  Reserved;           /* Reserved, must be zero */
1472 
1473 } ACPI_SRAT_CPU_AFFINITY;
1474 
1475 /* 1: Memory Affinity */
1476 
1477 typedef struct acpi_srat_mem_affinity
1478 {
1479     ACPI_SUBTABLE_HEADER    Header;
1480     UINT32                  ProximityDomain;
1481     UINT16                  Reserved;           /* Reserved, must be zero */
1482     UINT64                  BaseAddress;
1483     UINT64                  Length;
1484     UINT32                  Reserved1;
1485     UINT32                  Flags;
1486     UINT64                  Reserved2;          /* Reserved, must be zero */
1487 
1488 } ACPI_SRAT_MEM_AFFINITY;
1489 
1490 /* Flags */
1491 
1492 #define ACPI_SRAT_MEM_ENABLED       (1)         /* 00: Use affinity structure */
1493 #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1)      /* 01: Memory region is hot pluggable */
1494 #define ACPI_SRAT_MEM_NON_VOLATILE  (1<<2)      /* 02: Memory region is non-volatile */
1495 
1496 /* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */
1497 
1498 typedef struct acpi_srat_x2apic_cpu_affinity
1499 {
1500     ACPI_SUBTABLE_HEADER    Header;
1501     UINT16                  Reserved;           /* Reserved, must be zero */
1502     UINT32                  ProximityDomain;
1503     UINT32                  ApicId;
1504     UINT32                  Flags;
1505     UINT32                  ClockDomain;
1506     UINT32                  Reserved2;
1507 
1508 } ACPI_SRAT_X2APIC_CPU_AFFINITY;
1509 
1510 /* Flags for ACPI_SRAT_CPU_AFFINITY and ACPI_SRAT_X2APIC_CPU_AFFINITY */
1511 
1512 #define ACPI_SRAT_CPU_ENABLED       (1)         /* 00: Use affinity structure */
1513 
1514 
1515 /*******************************************************************************
1516  *
1517  * TCPA - Trusted Computing Platform Alliance table
1518  *
1519  ******************************************************************************/
1520 
1521 typedef struct acpi_table_tcpa
1522 {
1523     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1524     UINT16                  Reserved;
1525     UINT32                  MaxLogLength;       /* Maximum length for the event log area */
1526     UINT64                  LogAddress;         /* Address of the event log area */
1527 
1528 } ACPI_TABLE_TCPA;
1529 
1530 
1531 /*******************************************************************************
1532  *
1533  * UEFI - UEFI Boot optimization Table
1534  *
1535  ******************************************************************************/
1536 
1537 typedef struct acpi_table_uefi
1538 {
1539     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1540     UINT8                   Identifier[16];     /* UUID identifier */
1541     UINT16                  DataOffset;         /* Offset of remaining data in table */
1542     UINT8                   Data;
1543 
1544 } ACPI_TABLE_UEFI;
1545 
1546 
1547 /*******************************************************************************
1548  *
1549  * WDAT - Watchdog Action Table
1550  *
1551  ******************************************************************************/
1552 
1553 typedef struct acpi_table_wdat
1554 {
1555     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1556     UINT32                  HeaderLength;       /* Watchdog Header Length */
1557     UINT16                  PciSegment;         /* PCI Segment number */
1558     UINT8                   PciBus;             /* PCI Bus number */
1559     UINT8                   PciDevice;          /* PCI Device number */
1560     UINT8                   PciFunction;        /* PCI Function number */
1561     UINT8                   Reserved[3];
1562     UINT32                  TimerPeriod;        /* Period of one timer count (msec) */
1563     UINT32                  MaxCount;           /* Maximum counter value supported */
1564     UINT32                  MinCount;           /* Minimum counter value */
1565     UINT8                   Flags;
1566     UINT8                   Reserved2[3];
1567     UINT32                  Entries;            /* Number of watchdog entries that follow */
1568 
1569 } ACPI_TABLE_WDAT;
1570 
1571 /* WDAT Instruction Entries (actions) */
1572 
1573 typedef struct acpi_wdat_entry
1574 {
1575     ACPI_WHEA_HEADER        WheaHeader;         /* Common header for WHEA tables */
1576 
1577 } ACPI_WDAT_ENTRY;
1578 
1579 /* Values for Action field above */
1580 
1581 enum AcpiWdatActions
1582 {
1583     ACPI_WDAT_RESET                 = 1,
1584     ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
1585     ACPI_WDAT_GET_COUNTDOWN         = 5,
1586     ACPI_WDAT_SET_COUNTDOWN         = 6,
1587     ACPI_WDAT_GET_RUNNING_STATE     = 8,
1588     ACPI_WDAT_SET_RUNNING_STATE     = 9,
1589     ACPI_WDAT_GET_STOPPED_STATE     = 10,
1590     ACPI_WDAT_SET_STOPPED_STATE     = 11,
1591     ACPI_WDAT_GET_REBOOT            = 16,
1592     ACPI_WDAT_SET_REBOOT            = 17,
1593     ACPI_WDAT_GET_SHUTDOWN          = 18,
1594     ACPI_WDAT_SET_SHUTDOWN          = 19,
1595     ACPI_WDAT_GET_STATUS            = 32,
1596     ACPI_WDAT_SET_STATUS            = 33,
1597     ACPI_WDAT_ACTION_RESERVED       = 34    /* 34 and greater are reserved */
1598 };
1599 
1600 /* Values for Instruction field above */
1601 
1602 enum AcpiWdatInstructions
1603 {
1604     ACPI_WDAT_READ_VALUE            = 0,
1605     ACPI_WDAT_READ_COUNTDOWN        = 1,
1606     ACPI_WDAT_WRITE_VALUE           = 2,
1607     ACPI_WDAT_WRITE_COUNTDOWN       = 3,
1608     ACPI_WDAT_INSTRUCTION_RESERVED  = 4,    /* 4 and greater are reserved */
1609     ACPI_WDAT_PRESERVE_REGISTER     = 0x80  /* Except for this value */
1610 };
1611 
1612 
1613 /*******************************************************************************
1614  *
1615  * WDRT - Watchdog Resource Table
1616  *
1617  ******************************************************************************/
1618 
1619 typedef struct acpi_table_wdrt
1620 {
1621     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
1622     UINT32                  HeaderLength;       /* Watchdog Header Length */
1623     UINT8                   PciSegment;         /* PCI Segment number */
1624     UINT8                   PciBus;             /* PCI Bus number */
1625     UINT8                   PciDevice;          /* PCI Device number */
1626     UINT8                   PciFunction;        /* PCI Function number */
1627     UINT32                  TimerPeriod;        /* Period of one timer count (msec) */
1628     UINT32                  MaxCount;           /* Maximum counter value supported */
1629     UINT32                  MinCount;           /* Minimum counter value */
1630     UINT8                   Flags;
1631     UINT8                   Reserved[3];
1632     UINT32                  Entries;            /* Number of watchdog entries that follow */
1633 
1634 } ACPI_TABLE_WDRT;
1635 
1636 /* Flags */
1637 
1638 #define ACPI_WDRT_TIMER_ENABLED     (1)         /* 00: Timer enabled */
1639 
1640 
1641 /* Reset to default packing */
1642 
1643 #pragma pack()
1644 
1645 #endif /* __ACTBL1_H__ */