Home | History | Annotate | Line # | Download | only in include
actbl2.h revision 1.1.1.6
      1 /******************************************************************************
      2  *
      3  * Name: actbl2.h - ACPI Table Definitions (tables not in ACPI spec)
      4  *
      5  *****************************************************************************/
      6 
      7 /*
      8  * Copyright (C) 2000 - 2015, Intel Corp.
      9  * All rights reserved.
     10  *
     11  * Redistribution and use in source and binary forms, with or without
     12  * modification, are permitted provided that the following conditions
     13  * are met:
     14  * 1. Redistributions of source code must retain the above copyright
     15  *    notice, this list of conditions, and the following disclaimer,
     16  *    without modification.
     17  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
     18  *    substantially similar to the "NO WARRANTY" disclaimer below
     19  *    ("Disclaimer") and any redistribution must be conditioned upon
     20  *    including a substantially similar Disclaimer requirement for further
     21  *    binary redistribution.
     22  * 3. Neither the names of the above-listed copyright holders nor the names
     23  *    of any contributors may be used to endorse or promote products derived
     24  *    from this software without specific prior written permission.
     25  *
     26  * Alternatively, this software may be distributed under the terms of the
     27  * GNU General Public License ("GPL") version 2 as published by the Free
     28  * Software Foundation.
     29  *
     30  * NO WARRANTY
     31  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     32  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     33  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
     34  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     35  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     36  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     37  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     38  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
     39  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
     40  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     41  * POSSIBILITY OF SUCH DAMAGES.
     42  */
     43 
     44 #ifndef __ACTBL2_H__
     45 #define __ACTBL2_H__
     46 
     47 
     48 /*******************************************************************************
     49  *
     50  * Additional ACPI Tables (2)
     51  *
     52  * These tables are not consumed directly by the ACPICA subsystem, but are
     53  * included here to support device drivers and the AML disassembler.
     54  *
     55  * The tables in this file are defined by third-party specifications, and are
     56  * not defined directly by the ACPI specification itself.
     57  *
     58  ******************************************************************************/
     59 
     60 
     61 /*
     62  * Values for description table header signatures for tables defined in this
     63  * file. Useful because they make it more difficult to inadvertently type in
     64  * the wrong signature.
     65  */
     66 #define ACPI_SIG_ASF            "ASF!"      /* Alert Standard Format table */
     67 #define ACPI_SIG_BOOT           "BOOT"      /* Simple Boot Flag Table */
     68 #define ACPI_SIG_CSRT           "CSRT"      /* Core System Resource Table */
     69 #define ACPI_SIG_DBG2           "DBG2"      /* Debug Port table type 2 */
     70 #define ACPI_SIG_DBGP           "DBGP"      /* Debug Port table */
     71 #define ACPI_SIG_DMAR           "DMAR"      /* DMA Remapping table */
     72 #define ACPI_SIG_HPET           "HPET"      /* High Precision Event Timer table */
     73 #define ACPI_SIG_IBFT           "IBFT"      /* iSCSI Boot Firmware Table */
     74 #define ACPI_SIG_IVRS           "IVRS"      /* I/O Virtualization Reporting Structure */
     75 #define ACPI_SIG_LPIT           "LPIT"      /* Low Power Idle Table */
     76 #define ACPI_SIG_MCFG           "MCFG"      /* PCI Memory Mapped Configuration table */
     77 #define ACPI_SIG_MCHI           "MCHI"      /* Management Controller Host Interface table */
     78 #define ACPI_SIG_MSDM           "MSDM"      /* Microsoft Data Management Table */
     79 #define ACPI_SIG_MTMR           "MTMR"      /* MID Timer table */
     80 #define ACPI_SIG_SLIC           "SLIC"      /* Software Licensing Description Table */
     81 #define ACPI_SIG_SPCR           "SPCR"      /* Serial Port Console Redirection table */
     82 #define ACPI_SIG_SPMI           "SPMI"      /* Server Platform Management Interface table */
     83 #define ACPI_SIG_TCPA           "TCPA"      /* Trusted Computing Platform Alliance table */
     84 #define ACPI_SIG_UEFI           "UEFI"      /* Uefi Boot Optimization Table */
     85 #define ACPI_SIG_VRTC           "VRTC"      /* Virtual Real Time Clock Table */
     86 #define ACPI_SIG_WAET           "WAET"      /* Windows ACPI Emulated devices Table */
     87 #define ACPI_SIG_WDAT           "WDAT"      /* Watchdog Action Table */
     88 #define ACPI_SIG_WDDT           "WDDT"      /* Watchdog Timer Description Table */
     89 #define ACPI_SIG_WDRT           "WDRT"      /* Watchdog Resource Table */
     90 
     91 #ifdef ACPI_UNDEFINED_TABLES
     92 /*
     93  * These tables have been seen in the field, but no definition has been found
     94  */
     95 #define ACPI_SIG_ATKG           "ATKG"
     96 #define ACPI_SIG_GSCI           "GSCI"      /* GMCH SCI table */
     97 #define ACPI_SIG_IEIT           "IEIT"
     98 #endif
     99 
    100 /*
    101  * All tables must be byte-packed to match the ACPI specification, since
    102  * the tables are provided by the system BIOS.
    103  */
    104 #pragma pack(1)
    105 
    106 /*
    107  * Note: C bitfields are not used for this reason:
    108  *
    109  * "Bitfields are great and easy to read, but unfortunately the C language
    110  * does not specify the layout of bitfields in memory, which means they are
    111  * essentially useless for dealing with packed data in on-disk formats or
    112  * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
    113  * this decision was a design error in C. Ritchie could have picked an order
    114  * and stuck with it." Norman Ramsey.
    115  * See http://stackoverflow.com/a/1053662/41661
    116  */
    117 
    118 
    119 /*******************************************************************************
    120  *
    121  * ASF - Alert Standard Format table (Signature "ASF!")
    122  *       Revision 0x10
    123  *
    124  * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
    125  *
    126  ******************************************************************************/
    127 
    128 typedef struct acpi_table_asf
    129 {
    130     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    131 
    132 } ACPI_TABLE_ASF;
    133 
    134 
    135 /* ASF subtable header */
    136 
    137 typedef struct acpi_asf_header
    138 {
    139     UINT8                   Type;
    140     UINT8                   Reserved;
    141     UINT16                  Length;
    142 
    143 } ACPI_ASF_HEADER;
    144 
    145 
    146 /* Values for Type field above */
    147 
    148 enum AcpiAsfType
    149 {
    150     ACPI_ASF_TYPE_INFO          = 0,
    151     ACPI_ASF_TYPE_ALERT         = 1,
    152     ACPI_ASF_TYPE_CONTROL       = 2,
    153     ACPI_ASF_TYPE_BOOT          = 3,
    154     ACPI_ASF_TYPE_ADDRESS       = 4,
    155     ACPI_ASF_TYPE_RESERVED      = 5
    156 };
    157 
    158 /*
    159  * ASF subtables
    160  */
    161 
    162 /* 0: ASF Information */
    163 
    164 typedef struct acpi_asf_info
    165 {
    166     ACPI_ASF_HEADER         Header;
    167     UINT8                   MinResetValue;
    168     UINT8                   MinPollInterval;
    169     UINT16                  SystemId;
    170     UINT32                  MfgId;
    171     UINT8                   Flags;
    172     UINT8                   Reserved2[3];
    173 
    174 } ACPI_ASF_INFO;
    175 
    176 /* Masks for Flags field above */
    177 
    178 #define ACPI_ASF_SMBUS_PROTOCOLS    (1)
    179 
    180 
    181 /* 1: ASF Alerts */
    182 
    183 typedef struct acpi_asf_alert
    184 {
    185     ACPI_ASF_HEADER         Header;
    186     UINT8                   AssertMask;
    187     UINT8                   DeassertMask;
    188     UINT8                   Alerts;
    189     UINT8                   DataLength;
    190 
    191 } ACPI_ASF_ALERT;
    192 
    193 typedef struct acpi_asf_alert_data
    194 {
    195     UINT8                   Address;
    196     UINT8                   Command;
    197     UINT8                   Mask;
    198     UINT8                   Value;
    199     UINT8                   SensorType;
    200     UINT8                   Type;
    201     UINT8                   Offset;
    202     UINT8                   SourceType;
    203     UINT8                   Severity;
    204     UINT8                   SensorNumber;
    205     UINT8                   Entity;
    206     UINT8                   Instance;
    207 
    208 } ACPI_ASF_ALERT_DATA;
    209 
    210 
    211 /* 2: ASF Remote Control */
    212 
    213 typedef struct acpi_asf_remote
    214 {
    215     ACPI_ASF_HEADER         Header;
    216     UINT8                   Controls;
    217     UINT8                   DataLength;
    218     UINT16                  Reserved2;
    219 
    220 } ACPI_ASF_REMOTE;
    221 
    222 typedef struct acpi_asf_control_data
    223 {
    224     UINT8                   Function;
    225     UINT8                   Address;
    226     UINT8                   Command;
    227     UINT8                   Value;
    228 
    229 } ACPI_ASF_CONTROL_DATA;
    230 
    231 
    232 /* 3: ASF RMCP Boot Options */
    233 
    234 typedef struct acpi_asf_rmcp
    235 {
    236     ACPI_ASF_HEADER         Header;
    237     UINT8                   Capabilities[7];
    238     UINT8                   CompletionCode;
    239     UINT32                  EnterpriseId;
    240     UINT8                   Command;
    241     UINT16                  Parameter;
    242     UINT16                  BootOptions;
    243     UINT16                  OemParameters;
    244 
    245 } ACPI_ASF_RMCP;
    246 
    247 
    248 /* 4: ASF Address */
    249 
    250 typedef struct acpi_asf_address
    251 {
    252     ACPI_ASF_HEADER         Header;
    253     UINT8                   EpromAddress;
    254     UINT8                   Devices;
    255 
    256 } ACPI_ASF_ADDRESS;
    257 
    258 
    259 /*******************************************************************************
    260  *
    261  * BOOT - Simple Boot Flag Table
    262  *        Version 1
    263  *
    264  * Conforms to the "Simple Boot Flag Specification", Version 2.1
    265  *
    266  ******************************************************************************/
    267 
    268 typedef struct acpi_table_boot
    269 {
    270     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    271     UINT8                   CmosIndex;          /* Index in CMOS RAM for the boot register */
    272     UINT8                   Reserved[3];
    273 
    274 } ACPI_TABLE_BOOT;
    275 
    276 
    277 /*******************************************************************************
    278  *
    279  * CSRT - Core System Resource Table
    280  *        Version 0
    281  *
    282  * Conforms to the "Core System Resource Table (CSRT)", November 14, 2011
    283  *
    284  ******************************************************************************/
    285 
    286 typedef struct acpi_table_csrt
    287 {
    288     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    289 
    290 } ACPI_TABLE_CSRT;
    291 
    292 
    293 /* Resource Group subtable */
    294 
    295 typedef struct acpi_csrt_group
    296 {
    297     UINT32                  Length;
    298     UINT32                  VendorId;
    299     UINT32                  SubvendorId;
    300     UINT16                  DeviceId;
    301     UINT16                  SubdeviceId;
    302     UINT16                  Revision;
    303     UINT16                  Reserved;
    304     UINT32                  SharedInfoLength;
    305 
    306     /* Shared data immediately follows (Length = SharedInfoLength) */
    307 
    308 } ACPI_CSRT_GROUP;
    309 
    310 /* Shared Info subtable */
    311 
    312 typedef struct acpi_csrt_shared_info
    313 {
    314     UINT16                  MajorVersion;
    315     UINT16                  MinorVersion;
    316     UINT32                  MmioBaseLow;
    317     UINT32                  MmioBaseHigh;
    318     UINT32                  GsiInterrupt;
    319     UINT8                   InterruptPolarity;
    320     UINT8                   InterruptMode;
    321     UINT8                   NumChannels;
    322     UINT8                   DmaAddressWidth;
    323     UINT16                  BaseRequestLine;
    324     UINT16                  NumHandshakeSignals;
    325     UINT32                  MaxBlockSize;
    326 
    327     /* Resource descriptors immediately follow (Length = Group Length - SharedInfoLength) */
    328 
    329 } ACPI_CSRT_SHARED_INFO;
    330 
    331 /* Resource Descriptor subtable */
    332 
    333 typedef struct acpi_csrt_descriptor
    334 {
    335     UINT32                  Length;
    336     UINT16                  Type;
    337     UINT16                  Subtype;
    338     UINT32                  Uid;
    339 
    340     /* Resource-specific information immediately follows */
    341 
    342 } ACPI_CSRT_DESCRIPTOR;
    343 
    344 
    345 /* Resource Types */
    346 
    347 #define ACPI_CSRT_TYPE_INTERRUPT    0x0001
    348 #define ACPI_CSRT_TYPE_TIMER        0x0002
    349 #define ACPI_CSRT_TYPE_DMA          0x0003
    350 
    351 /* Resource Subtypes */
    352 
    353 #define ACPI_CSRT_XRUPT_LINE        0x0000
    354 #define ACPI_CSRT_XRUPT_CONTROLLER  0x0001
    355 #define ACPI_CSRT_TIMER             0x0000
    356 #define ACPI_CSRT_DMA_CHANNEL       0x0000
    357 #define ACPI_CSRT_DMA_CONTROLLER    0x0001
    358 
    359 
    360 /*******************************************************************************
    361  *
    362  * DBG2 - Debug Port Table 2
    363  *        Version 0 (Both main table and subtables)
    364  *
    365  * Conforms to "Microsoft Debug Port Table 2 (DBG2)", May 22 2012.
    366  *
    367  ******************************************************************************/
    368 
    369 typedef struct acpi_table_dbg2
    370 {
    371     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    372     UINT32                  InfoOffset;
    373     UINT32                  InfoCount;
    374 
    375 } ACPI_TABLE_DBG2;
    376 
    377 
    378 typedef struct acpi_dbg2_header
    379 {
    380     UINT32                  InfoOffset;
    381     UINT32                  InfoCount;
    382 
    383 } ACPI_DBG2_HEADER;
    384 
    385 
    386 /* Debug Device Information Subtable */
    387 
    388 typedef struct acpi_dbg2_device
    389 {
    390     UINT8                   Revision;
    391     UINT16                  Length;
    392     UINT8                   RegisterCount;      /* Number of BaseAddress registers */
    393     UINT16                  NamepathLength;
    394     UINT16                  NamepathOffset;
    395     UINT16                  OemDataLength;
    396     UINT16                  OemDataOffset;
    397     UINT16                  PortType;
    398     UINT16                  PortSubtype;
    399     UINT16                  Reserved;
    400     UINT16                  BaseAddressOffset;
    401     UINT16                  AddressSizeOffset;
    402     /*
    403      * Data that follows:
    404      *    BaseAddress (required) - Each in 12-byte Generic Address Structure format.
    405      *    AddressSize (required) - Array of UINT32 sizes corresponding to each BaseAddress register.
    406      *    Namepath    (required) - Null terminated string. Single dot if not supported.
    407      *    OemData     (optional) - Length is OemDataLength.
    408      */
    409 } ACPI_DBG2_DEVICE;
    410 
    411 /* Types for PortType field above */
    412 
    413 #define ACPI_DBG2_SERIAL_PORT       0x8000
    414 #define ACPI_DBG2_1394_PORT         0x8001
    415 #define ACPI_DBG2_USB_PORT          0x8002
    416 #define ACPI_DBG2_NET_PORT          0x8003
    417 
    418 /* Subtypes for PortSubtype field above */
    419 
    420 #define ACPI_DBG2_16550_COMPATIBLE  0x0000
    421 #define ACPI_DBG2_16550_SUBSET      0x0001
    422 
    423 #define ACPI_DBG2_1394_STANDARD     0x0000
    424 
    425 #define ACPI_DBG2_USB_XHCI          0x0000
    426 #define ACPI_DBG2_USB_EHCI          0x0001
    427 
    428 
    429 /*******************************************************************************
    430  *
    431  * DBGP - Debug Port table
    432  *        Version 1
    433  *
    434  * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000
    435  *
    436  ******************************************************************************/
    437 
    438 typedef struct acpi_table_dbgp
    439 {
    440     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    441     UINT8                   Type;               /* 0=full 16550, 1=subset of 16550 */
    442     UINT8                   Reserved[3];
    443     ACPI_GENERIC_ADDRESS    DebugPort;
    444 
    445 } ACPI_TABLE_DBGP;
    446 
    447 
    448 /*******************************************************************************
    449  *
    450  * DMAR - DMA Remapping table
    451  *        Version 1
    452  *
    453  * Conforms to "Intel Virtualization Technology for Directed I/O",
    454  * Version 2.2, Sept. 2013
    455  *
    456  ******************************************************************************/
    457 
    458 typedef struct acpi_table_dmar
    459 {
    460     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    461     UINT8                   Width;              /* Host Address Width */
    462     UINT8                   Flags;
    463     UINT8                   Reserved[10];
    464 
    465 } ACPI_TABLE_DMAR;
    466 
    467 /* Masks for Flags field above */
    468 
    469 #define ACPI_DMAR_INTR_REMAP        (1)
    470 
    471 
    472 /* DMAR subtable header */
    473 
    474 typedef struct acpi_dmar_header
    475 {
    476     UINT16                  Type;
    477     UINT16                  Length;
    478 
    479 } ACPI_DMAR_HEADER;
    480 
    481 /* Values for subtable type in ACPI_DMAR_HEADER */
    482 
    483 enum AcpiDmarType
    484 {
    485     ACPI_DMAR_TYPE_HARDWARE_UNIT        = 0,
    486     ACPI_DMAR_TYPE_RESERVED_MEMORY      = 1,
    487     ACPI_DMAR_TYPE_ROOT_ATS             = 2,
    488     ACPI_DMAR_TYPE_HARDWARE_AFFINITY    = 3,
    489     ACPI_DMAR_TYPE_NAMESPACE            = 4,
    490     ACPI_DMAR_TYPE_RESERVED             = 5     /* 5 and greater are reserved */
    491 };
    492 
    493 
    494 /* DMAR Device Scope structure */
    495 
    496 typedef struct acpi_dmar_device_scope
    497 {
    498     UINT8                   EntryType;
    499     UINT8                   Length;
    500     UINT16                  Reserved;
    501     UINT8                   EnumerationId;
    502     UINT8                   Bus;
    503 
    504 } ACPI_DMAR_DEVICE_SCOPE;
    505 
    506 /* Values for EntryType in ACPI_DMAR_DEVICE_SCOPE - device types */
    507 
    508 enum AcpiDmarScopeType
    509 {
    510     ACPI_DMAR_SCOPE_TYPE_NOT_USED       = 0,
    511     ACPI_DMAR_SCOPE_TYPE_ENDPOINT       = 1,
    512     ACPI_DMAR_SCOPE_TYPE_BRIDGE         = 2,
    513     ACPI_DMAR_SCOPE_TYPE_IOAPIC         = 3,
    514     ACPI_DMAR_SCOPE_TYPE_HPET           = 4,
    515     ACPI_DMAR_SCOPE_TYPE_NAMESPACE      = 5,
    516     ACPI_DMAR_SCOPE_TYPE_RESERVED       = 6     /* 6 and greater are reserved */
    517 };
    518 
    519 typedef struct acpi_dmar_pci_path
    520 {
    521     UINT8                   Device;
    522     UINT8                   Function;
    523 
    524 } ACPI_DMAR_PCI_PATH;
    525 
    526 
    527 /*
    528  * DMAR Subtables, correspond to Type in ACPI_DMAR_HEADER
    529  */
    530 
    531 /* 0: Hardware Unit Definition */
    532 
    533 typedef struct acpi_dmar_hardware_unit
    534 {
    535     ACPI_DMAR_HEADER        Header;
    536     UINT8                   Flags;
    537     UINT8                   Reserved;
    538     UINT16                  Segment;
    539     UINT64                  Address;            /* Register Base Address */
    540 
    541 } ACPI_DMAR_HARDWARE_UNIT;
    542 
    543 /* Masks for Flags field above */
    544 
    545 #define ACPI_DMAR_INCLUDE_ALL       (1)
    546 
    547 
    548 /* 1: Reserved Memory Defininition */
    549 
    550 typedef struct acpi_dmar_reserved_memory
    551 {
    552     ACPI_DMAR_HEADER        Header;
    553     UINT16                  Reserved;
    554     UINT16                  Segment;
    555     UINT64                  BaseAddress;        /* 4K aligned base address */
    556     UINT64                  EndAddress;         /* 4K aligned limit address */
    557 
    558 } ACPI_DMAR_RESERVED_MEMORY;
    559 
    560 /* Masks for Flags field above */
    561 
    562 #define ACPI_DMAR_ALLOW_ALL         (1)
    563 
    564 
    565 /* 2: Root Port ATS Capability Reporting Structure */
    566 
    567 typedef struct acpi_dmar_atsr
    568 {
    569     ACPI_DMAR_HEADER        Header;
    570     UINT8                   Flags;
    571     UINT8                   Reserved;
    572     UINT16                  Segment;
    573 
    574 } ACPI_DMAR_ATSR;
    575 
    576 /* Masks for Flags field above */
    577 
    578 #define ACPI_DMAR_ALL_PORTS         (1)
    579 
    580 
    581 /* 3: Remapping Hardware Static Affinity Structure */
    582 
    583 typedef struct acpi_dmar_rhsa
    584 {
    585     ACPI_DMAR_HEADER        Header;
    586     UINT32                  Reserved;
    587     UINT64                  BaseAddress;
    588     UINT32                  ProximityDomain;
    589 
    590 } ACPI_DMAR_RHSA;
    591 
    592 
    593 /* 4: ACPI Namespace Device Declaration Structure */
    594 
    595 typedef struct acpi_dmar_andd
    596 {
    597     ACPI_DMAR_HEADER        Header;
    598     UINT8                   Reserved[3];
    599     UINT8                   DeviceNumber;
    600     char                    DeviceName[1];
    601 
    602 } ACPI_DMAR_ANDD;
    603 
    604 
    605 /*******************************************************************************
    606  *
    607  * HPET - High Precision Event Timer table
    608  *        Version 1
    609  *
    610  * Conforms to "IA-PC HPET (High Precision Event Timers) Specification",
    611  * Version 1.0a, October 2004
    612  *
    613  ******************************************************************************/
    614 
    615 typedef struct acpi_table_hpet
    616 {
    617     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    618     UINT32                  Id;                 /* Hardware ID of event timer block */
    619     ACPI_GENERIC_ADDRESS    Address;            /* Address of event timer block */
    620     UINT8                   Sequence;           /* HPET sequence number */
    621     UINT16                  MinimumTick;        /* Main counter min tick, periodic mode */
    622     UINT8                   Flags;
    623 
    624 } ACPI_TABLE_HPET;
    625 
    626 /* Masks for Flags field above */
    627 
    628 #define ACPI_HPET_PAGE_PROTECT_MASK (3)
    629 
    630 /* Values for Page Protect flags */
    631 
    632 enum AcpiHpetPageProtect
    633 {
    634     ACPI_HPET_NO_PAGE_PROTECT       = 0,
    635     ACPI_HPET_PAGE_PROTECT4         = 1,
    636     ACPI_HPET_PAGE_PROTECT64        = 2
    637 };
    638 
    639 
    640 /*******************************************************************************
    641  *
    642  * IBFT - Boot Firmware Table
    643  *        Version 1
    644  *
    645  * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b
    646  * Specification", Version 1.01, March 1, 2007
    647  *
    648  * Note: It appears that this table is not intended to appear in the RSDT/XSDT.
    649  * Therefore, it is not currently supported by the disassembler.
    650  *
    651  ******************************************************************************/
    652 
    653 typedef struct acpi_table_ibft
    654 {
    655     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    656     UINT8                   Reserved[12];
    657 
    658 } ACPI_TABLE_IBFT;
    659 
    660 
    661 /* IBFT common subtable header */
    662 
    663 typedef struct acpi_ibft_header
    664 {
    665     UINT8                   Type;
    666     UINT8                   Version;
    667     UINT16                  Length;
    668     UINT8                   Index;
    669     UINT8                   Flags;
    670 
    671 } ACPI_IBFT_HEADER;
    672 
    673 /* Values for Type field above */
    674 
    675 enum AcpiIbftType
    676 {
    677     ACPI_IBFT_TYPE_NOT_USED         = 0,
    678     ACPI_IBFT_TYPE_CONTROL          = 1,
    679     ACPI_IBFT_TYPE_INITIATOR        = 2,
    680     ACPI_IBFT_TYPE_NIC              = 3,
    681     ACPI_IBFT_TYPE_TARGET           = 4,
    682     ACPI_IBFT_TYPE_EXTENSIONS       = 5,
    683     ACPI_IBFT_TYPE_RESERVED         = 6     /* 6 and greater are reserved */
    684 };
    685 
    686 
    687 /* IBFT subtables */
    688 
    689 typedef struct acpi_ibft_control
    690 {
    691     ACPI_IBFT_HEADER        Header;
    692     UINT16                  Extensions;
    693     UINT16                  InitiatorOffset;
    694     UINT16                  Nic0Offset;
    695     UINT16                  Target0Offset;
    696     UINT16                  Nic1Offset;
    697     UINT16                  Target1Offset;
    698 
    699 } ACPI_IBFT_CONTROL;
    700 
    701 typedef struct acpi_ibft_initiator
    702 {
    703     ACPI_IBFT_HEADER        Header;
    704     UINT8                   SnsServer[16];
    705     UINT8                   SlpServer[16];
    706     UINT8                   PrimaryServer[16];
    707     UINT8                   SecondaryServer[16];
    708     UINT16                  NameLength;
    709     UINT16                  NameOffset;
    710 
    711 } ACPI_IBFT_INITIATOR;
    712 
    713 typedef struct acpi_ibft_nic
    714 {
    715     ACPI_IBFT_HEADER        Header;
    716     UINT8                   IpAddress[16];
    717     UINT8                   SubnetMaskPrefix;
    718     UINT8                   Origin;
    719     UINT8                   Gateway[16];
    720     UINT8                   PrimaryDns[16];
    721     UINT8                   SecondaryDns[16];
    722     UINT8                   Dhcp[16];
    723     UINT16                  Vlan;
    724     UINT8                   MacAddress[6];
    725     UINT16                  PciAddress;
    726     UINT16                  NameLength;
    727     UINT16                  NameOffset;
    728 
    729 } ACPI_IBFT_NIC;
    730 
    731 typedef struct acpi_ibft_target
    732 {
    733     ACPI_IBFT_HEADER        Header;
    734     UINT8                   TargetIpAddress[16];
    735     UINT16                  TargetIpSocket;
    736     UINT8                   TargetBootLun[8];
    737     UINT8                   ChapType;
    738     UINT8                   NicAssociation;
    739     UINT16                  TargetNameLength;
    740     UINT16                  TargetNameOffset;
    741     UINT16                  ChapNameLength;
    742     UINT16                  ChapNameOffset;
    743     UINT16                  ChapSecretLength;
    744     UINT16                  ChapSecretOffset;
    745     UINT16                  ReverseChapNameLength;
    746     UINT16                  ReverseChapNameOffset;
    747     UINT16                  ReverseChapSecretLength;
    748     UINT16                  ReverseChapSecretOffset;
    749 
    750 } ACPI_IBFT_TARGET;
    751 
    752 
    753 /*******************************************************************************
    754  *
    755  * IVRS - I/O Virtualization Reporting Structure
    756  *        Version 1
    757  *
    758  * Conforms to "AMD I/O Virtualization Technology (IOMMU) Specification",
    759  * Revision 1.26, February 2009.
    760  *
    761  ******************************************************************************/
    762 
    763 typedef struct acpi_table_ivrs
    764 {
    765     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    766     UINT32                  Info;               /* Common virtualization info */
    767     UINT64                  Reserved;
    768 
    769 } ACPI_TABLE_IVRS;
    770 
    771 /* Values for Info field above */
    772 
    773 #define ACPI_IVRS_PHYSICAL_SIZE     0x00007F00  /* 7 bits, physical address size */
    774 #define ACPI_IVRS_VIRTUAL_SIZE      0x003F8000  /* 7 bits, virtual address size */
    775 #define ACPI_IVRS_ATS_RESERVED      0x00400000  /* ATS address translation range reserved */
    776 
    777 
    778 /* IVRS subtable header */
    779 
    780 typedef struct acpi_ivrs_header
    781 {
    782     UINT8                   Type;               /* Subtable type */
    783     UINT8                   Flags;
    784     UINT16                  Length;             /* Subtable length */
    785     UINT16                  DeviceId;           /* ID of IOMMU */
    786 
    787 } ACPI_IVRS_HEADER;
    788 
    789 /* Values for subtable Type above */
    790 
    791 enum AcpiIvrsType
    792 {
    793     ACPI_IVRS_TYPE_HARDWARE         = 0x10,
    794     ACPI_IVRS_TYPE_MEMORY1          = 0x20,
    795     ACPI_IVRS_TYPE_MEMORY2          = 0x21,
    796     ACPI_IVRS_TYPE_MEMORY3          = 0x22
    797 };
    798 
    799 /* Masks for Flags field above for IVHD subtable */
    800 
    801 #define ACPI_IVHD_TT_ENABLE         (1)
    802 #define ACPI_IVHD_PASS_PW           (1<<1)
    803 #define ACPI_IVHD_RES_PASS_PW       (1<<2)
    804 #define ACPI_IVHD_ISOC              (1<<3)
    805 #define ACPI_IVHD_IOTLB             (1<<4)
    806 
    807 /* Masks for Flags field above for IVMD subtable */
    808 
    809 #define ACPI_IVMD_UNITY             (1)
    810 #define ACPI_IVMD_READ              (1<<1)
    811 #define ACPI_IVMD_WRITE             (1<<2)
    812 #define ACPI_IVMD_EXCLUSION_RANGE   (1<<3)
    813 
    814 
    815 /*
    816  * IVRS subtables, correspond to Type in ACPI_IVRS_HEADER
    817  */
    818 
    819 /* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */
    820 
    821 typedef struct acpi_ivrs_hardware
    822 {
    823     ACPI_IVRS_HEADER        Header;
    824     UINT16                  CapabilityOffset;   /* Offset for IOMMU control fields */
    825     UINT64                  BaseAddress;        /* IOMMU control registers */
    826     UINT16                  PciSegmentGroup;
    827     UINT16                  Info;               /* MSI number and unit ID */
    828     UINT32                  Reserved;
    829 
    830 } ACPI_IVRS_HARDWARE;
    831 
    832 /* Masks for Info field above */
    833 
    834 #define ACPI_IVHD_MSI_NUMBER_MASK   0x001F      /* 5 bits, MSI message number */
    835 #define ACPI_IVHD_UNIT_ID_MASK      0x1F00      /* 5 bits, UnitID */
    836 
    837 
    838 /*
    839  * Device Entries for IVHD subtable, appear after ACPI_IVRS_HARDWARE structure.
    840  * Upper two bits of the Type field are the (encoded) length of the structure.
    841  * Currently, only 4 and 8 byte entries are defined. 16 and 32 byte entries
    842  * are reserved for future use but not defined.
    843  */
    844 typedef struct acpi_ivrs_de_header
    845 {
    846     UINT8                   Type;
    847     UINT16                  Id;
    848     UINT8                   DataSetting;
    849 
    850 } ACPI_IVRS_DE_HEADER;
    851 
    852 /* Length of device entry is in the top two bits of Type field above */
    853 
    854 #define ACPI_IVHD_ENTRY_LENGTH      0xC0
    855 
    856 /* Values for device entry Type field above */
    857 
    858 enum AcpiIvrsDeviceEntryType
    859 {
    860     /* 4-byte device entries, all use ACPI_IVRS_DEVICE4 */
    861 
    862     ACPI_IVRS_TYPE_PAD4             = 0,
    863     ACPI_IVRS_TYPE_ALL              = 1,
    864     ACPI_IVRS_TYPE_SELECT           = 2,
    865     ACPI_IVRS_TYPE_START            = 3,
    866     ACPI_IVRS_TYPE_END              = 4,
    867 
    868     /* 8-byte device entries */
    869 
    870     ACPI_IVRS_TYPE_PAD8             = 64,
    871     ACPI_IVRS_TYPE_NOT_USED         = 65,
    872     ACPI_IVRS_TYPE_ALIAS_SELECT     = 66, /* Uses ACPI_IVRS_DEVICE8A */
    873     ACPI_IVRS_TYPE_ALIAS_START      = 67, /* Uses ACPI_IVRS_DEVICE8A */
    874     ACPI_IVRS_TYPE_EXT_SELECT       = 70, /* Uses ACPI_IVRS_DEVICE8B */
    875     ACPI_IVRS_TYPE_EXT_START        = 71, /* Uses ACPI_IVRS_DEVICE8B */
    876     ACPI_IVRS_TYPE_SPECIAL          = 72  /* Uses ACPI_IVRS_DEVICE8C */
    877 };
    878 
    879 /* Values for Data field above */
    880 
    881 #define ACPI_IVHD_INIT_PASS         (1)
    882 #define ACPI_IVHD_EINT_PASS         (1<<1)
    883 #define ACPI_IVHD_NMI_PASS          (1<<2)
    884 #define ACPI_IVHD_SYSTEM_MGMT       (3<<4)
    885 #define ACPI_IVHD_LINT0_PASS        (1<<6)
    886 #define ACPI_IVHD_LINT1_PASS        (1<<7)
    887 
    888 
    889 /* Types 0-4: 4-byte device entry */
    890 
    891 typedef struct acpi_ivrs_device4
    892 {
    893     ACPI_IVRS_DE_HEADER     Header;
    894 
    895 } ACPI_IVRS_DEVICE4;
    896 
    897 /* Types 66-67: 8-byte device entry */
    898 
    899 typedef struct acpi_ivrs_device8a
    900 {
    901     ACPI_IVRS_DE_HEADER     Header;
    902     UINT8                   Reserved1;
    903     UINT16                  UsedId;
    904     UINT8                   Reserved2;
    905 
    906 } ACPI_IVRS_DEVICE8A;
    907 
    908 /* Types 70-71: 8-byte device entry */
    909 
    910 typedef struct acpi_ivrs_device8b
    911 {
    912     ACPI_IVRS_DE_HEADER     Header;
    913     UINT32                  ExtendedData;
    914 
    915 } ACPI_IVRS_DEVICE8B;
    916 
    917 /* Values for ExtendedData above */
    918 
    919 #define ACPI_IVHD_ATS_DISABLED      (1<<31)
    920 
    921 /* Type 72: 8-byte device entry */
    922 
    923 typedef struct acpi_ivrs_device8c
    924 {
    925     ACPI_IVRS_DE_HEADER     Header;
    926     UINT8                   Handle;
    927     UINT16                  UsedId;
    928     UINT8                   Variety;
    929 
    930 } ACPI_IVRS_DEVICE8C;
    931 
    932 /* Values for Variety field above */
    933 
    934 #define ACPI_IVHD_IOAPIC            1
    935 #define ACPI_IVHD_HPET              2
    936 
    937 
    938 /* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */
    939 
    940 typedef struct acpi_ivrs_memory
    941 {
    942     ACPI_IVRS_HEADER        Header;
    943     UINT16                  AuxData;
    944     UINT64                  Reserved;
    945     UINT64                  StartAddress;
    946     UINT64                  MemoryLength;
    947 
    948 } ACPI_IVRS_MEMORY;
    949 
    950 
    951 /*******************************************************************************
    952  *
    953  * LPIT - Low Power Idle Table
    954  *
    955  * Conforms to "ACPI Low Power Idle Table (LPIT) and _LPD Proposal (DRAFT)"
    956  *
    957  ******************************************************************************/
    958 
    959 typedef struct acpi_table_lpit
    960 {
    961     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    962 
    963 } ACPI_TABLE_LPIT;
    964 
    965 
    966 /* LPIT subtable header */
    967 
    968 typedef struct acpi_lpit_header
    969 {
    970     UINT32                  Type;               /* Subtable type */
    971     UINT32                  Length;             /* Subtable length */
    972     UINT16                  UniqueId;
    973     UINT16                  Reserved;
    974     UINT32                  Flags;
    975 
    976 } ACPI_LPIT_HEADER;
    977 
    978 /* Values for subtable Type above */
    979 
    980 enum AcpiLpitType
    981 {
    982     ACPI_LPIT_TYPE_NATIVE_CSTATE    = 0x00,
    983     ACPI_LPIT_TYPE_SIMPLE_IO        = 0x01,
    984     ACPI_LPIT_TYPE_RESERVED         = 0x02      /* 2 and above are reserved */
    985 };
    986 
    987 /* Masks for Flags field above  */
    988 
    989 #define ACPI_LPIT_STATE_DISABLED    (1)
    990 #define ACPI_LPIT_NO_COUNTER        (1<<1)
    991 
    992 /*
    993  * LPIT subtables, correspond to Type in ACPI_LPIT_HEADER
    994  */
    995 
    996 /* 0x00: Native C-state instruction based LPI structure */
    997 
    998 typedef struct acpi_lpit_native
    999 {
   1000     ACPI_LPIT_HEADER        Header;
   1001     ACPI_GENERIC_ADDRESS    EntryTrigger;
   1002     UINT32                  Residency;
   1003     UINT32                  Latency;
   1004     ACPI_GENERIC_ADDRESS    ResidencyCounter;
   1005     UINT64                  CounterFrequency;
   1006 
   1007 } ACPI_LPIT_NATIVE;
   1008 
   1009 
   1010 /* 0x01: Simple I/O based LPI structure */
   1011 
   1012 typedef struct acpi_lpit_io
   1013 {
   1014     ACPI_LPIT_HEADER        Header;
   1015     ACPI_GENERIC_ADDRESS    EntryTrigger;
   1016     UINT32                  TriggerAction;
   1017     UINT64                  TriggerValue;
   1018     UINT64                  TriggerMask;
   1019     ACPI_GENERIC_ADDRESS    MinimumIdleState;
   1020     UINT32                  Residency;
   1021     UINT32                  Latency;
   1022     ACPI_GENERIC_ADDRESS    ResidencyCounter;
   1023     UINT64                  CounterFrequency;
   1024 
   1025 } ACPI_LPIT_IO;
   1026 
   1027 
   1028 /*******************************************************************************
   1029  *
   1030  * MCFG - PCI Memory Mapped Configuration table and subtable
   1031  *        Version 1
   1032  *
   1033  * Conforms to "PCI Firmware Specification", Revision 3.0, June 20, 2005
   1034  *
   1035  ******************************************************************************/
   1036 
   1037 typedef struct acpi_table_mcfg
   1038 {
   1039     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1040     UINT8                   Reserved[8];
   1041 
   1042 } ACPI_TABLE_MCFG;
   1043 
   1044 
   1045 /* Subtable */
   1046 
   1047 typedef struct acpi_mcfg_allocation
   1048 {
   1049     UINT64                  Address;            /* Base address, processor-relative */
   1050     UINT16                  PciSegment;         /* PCI segment group number */
   1051     UINT8                   StartBusNumber;     /* Starting PCI Bus number */
   1052     UINT8                   EndBusNumber;       /* Final PCI Bus number */
   1053     UINT32                  Reserved;
   1054 
   1055 } ACPI_MCFG_ALLOCATION;
   1056 
   1057 
   1058 /*******************************************************************************
   1059  *
   1060  * MCHI - Management Controller Host Interface Table
   1061  *        Version 1
   1062  *
   1063  * Conforms to "Management Component Transport Protocol (MCTP) Host
   1064  * Interface Specification", Revision 1.0.0a, October 13, 2009
   1065  *
   1066  ******************************************************************************/
   1067 
   1068 typedef struct acpi_table_mchi
   1069 {
   1070     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1071     UINT8                   InterfaceType;
   1072     UINT8                   Protocol;
   1073     UINT64                  ProtocolData;
   1074     UINT8                   InterruptType;
   1075     UINT8                   Gpe;
   1076     UINT8                   PciDeviceFlag;
   1077     UINT32                  GlobalInterrupt;
   1078     ACPI_GENERIC_ADDRESS    ControlRegister;
   1079     UINT8                   PciSegment;
   1080     UINT8                   PciBus;
   1081     UINT8                   PciDevice;
   1082     UINT8                   PciFunction;
   1083 
   1084 } ACPI_TABLE_MCHI;
   1085 
   1086 
   1087 /*******************************************************************************
   1088  *
   1089  * MSDM - Microsoft Data Management table
   1090  *
   1091  * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
   1092  * November 29, 2011. Copyright 2011 Microsoft
   1093  *
   1094  ******************************************************************************/
   1095 
   1096 /* Basic MSDM table is only the common ACPI header */
   1097 
   1098 typedef struct acpi_table_msdm
   1099 {
   1100     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1101 
   1102 } ACPI_TABLE_MSDM;
   1103 
   1104 
   1105 /*******************************************************************************
   1106  *
   1107  * MTMR - MID Timer Table
   1108  *        Version 1
   1109  *
   1110  * Conforms to "Simple Firmware Interface Specification",
   1111  * Draft 0.8.2, Oct 19, 2010
   1112  * NOTE: The ACPI MTMR is equivalent to the SFI MTMR table.
   1113  *
   1114  ******************************************************************************/
   1115 
   1116 typedef struct acpi_table_mtmr
   1117 {
   1118     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1119 
   1120 } ACPI_TABLE_MTMR;
   1121 
   1122 /* MTMR entry */
   1123 
   1124 typedef struct acpi_mtmr_entry
   1125 {
   1126     ACPI_GENERIC_ADDRESS    PhysicalAddress;
   1127     UINT32                  Frequency;
   1128     UINT32                  Irq;
   1129 
   1130 } ACPI_MTMR_ENTRY;
   1131 
   1132 
   1133 /*******************************************************************************
   1134  *
   1135  * SLIC - Software Licensing Description Table
   1136  *
   1137  * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
   1138  * November 29, 2011. Copyright 2011 Microsoft
   1139  *
   1140  ******************************************************************************/
   1141 
   1142 /* Basic SLIC table is only the common ACPI header */
   1143 
   1144 typedef struct acpi_table_slic
   1145 {
   1146     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1147 
   1148 } ACPI_TABLE_SLIC;
   1149 
   1150 
   1151 /*******************************************************************************
   1152  *
   1153  * SPCR - Serial Port Console Redirection table
   1154  *        Version 1
   1155  *
   1156  * Conforms to "Serial Port Console Redirection Table",
   1157  * Version 1.00, January 11, 2002
   1158  *
   1159  ******************************************************************************/
   1160 
   1161 typedef struct acpi_table_spcr
   1162 {
   1163     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1164     UINT8                   InterfaceType;      /* 0=full 16550, 1=subset of 16550 */
   1165     UINT8                   Reserved[3];
   1166     ACPI_GENERIC_ADDRESS    SerialPort;
   1167     UINT8                   InterruptType;
   1168     UINT8                   PcInterrupt;
   1169     UINT32                  Interrupt;
   1170     UINT8                   BaudRate;
   1171     UINT8                   Parity;
   1172     UINT8                   StopBits;
   1173     UINT8                   FlowControl;
   1174     UINT8                   TerminalType;
   1175     UINT8                   Reserved1;
   1176     UINT16                  PciDeviceId;
   1177     UINT16                  PciVendorId;
   1178     UINT8                   PciBus;
   1179     UINT8                   PciDevice;
   1180     UINT8                   PciFunction;
   1181     UINT32                  PciFlags;
   1182     UINT8                   PciSegment;
   1183     UINT32                  Reserved2;
   1184 
   1185 } ACPI_TABLE_SPCR;
   1186 
   1187 /* Masks for PciFlags field above */
   1188 
   1189 #define ACPI_SPCR_DO_NOT_DISABLE    (1)
   1190 
   1191 
   1192 /*******************************************************************************
   1193  *
   1194  * SPMI - Server Platform Management Interface table
   1195  *        Version 5
   1196  *
   1197  * Conforms to "Intelligent Platform Management Interface Specification
   1198  * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with
   1199  * June 12, 2009 markup.
   1200  *
   1201  ******************************************************************************/
   1202 
   1203 typedef struct acpi_table_spmi
   1204 {
   1205     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1206     UINT8                   InterfaceType;
   1207     UINT8                   Reserved;           /* Must be 1 */
   1208     UINT16                  SpecRevision;       /* Version of IPMI */
   1209     UINT8                   InterruptType;
   1210     UINT8                   GpeNumber;          /* GPE assigned */
   1211     UINT8                   Reserved1;
   1212     UINT8                   PciDeviceFlag;
   1213     UINT32                  Interrupt;
   1214     ACPI_GENERIC_ADDRESS    IpmiRegister;
   1215     UINT8                   PciSegment;
   1216     UINT8                   PciBus;
   1217     UINT8                   PciDevice;
   1218     UINT8                   PciFunction;
   1219     UINT8                   Reserved2;
   1220 
   1221 } ACPI_TABLE_SPMI;
   1222 
   1223 /* Values for InterfaceType above */
   1224 
   1225 enum AcpiSpmiInterfaceTypes
   1226 {
   1227     ACPI_SPMI_NOT_USED              = 0,
   1228     ACPI_SPMI_KEYBOARD              = 1,
   1229     ACPI_SPMI_SMI                   = 2,
   1230     ACPI_SPMI_BLOCK_TRANSFER        = 3,
   1231     ACPI_SPMI_SMBUS                 = 4,
   1232     ACPI_SPMI_RESERVED              = 5         /* 5 and above are reserved */
   1233 };
   1234 
   1235 
   1236 /*******************************************************************************
   1237  *
   1238  * TCPA - Trusted Computing Platform Alliance table
   1239  *        Version 1
   1240  *
   1241  * Conforms to "TCG PC Specific Implementation Specification",
   1242  * Version 1.1, August 18, 2003
   1243  *
   1244  ******************************************************************************/
   1245 
   1246 typedef struct acpi_table_tcpa
   1247 {
   1248     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1249     UINT16                  Reserved;
   1250     UINT32                  MaxLogLength;       /* Maximum length for the event log area */
   1251     UINT64                  LogAddress;         /* Address of the event log area */
   1252 
   1253 } ACPI_TABLE_TCPA;
   1254 
   1255 
   1256 /*******************************************************************************
   1257  *
   1258  * UEFI - UEFI Boot optimization Table
   1259  *        Version 1
   1260  *
   1261  * Conforms to "Unified Extensible Firmware Interface Specification",
   1262  * Version 2.3, May 8, 2009
   1263  *
   1264  ******************************************************************************/
   1265 
   1266 typedef struct acpi_table_uefi
   1267 {
   1268     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1269     UINT8                   Identifier[16];     /* UUID identifier */
   1270     UINT16                  DataOffset;         /* Offset of remaining data in table */
   1271 
   1272 } ACPI_TABLE_UEFI;
   1273 
   1274 
   1275 /*******************************************************************************
   1276  *
   1277  * VRTC - Virtual Real Time Clock Table
   1278  *        Version 1
   1279  *
   1280  * Conforms to "Simple Firmware Interface Specification",
   1281  * Draft 0.8.2, Oct 19, 2010
   1282  * NOTE: The ACPI VRTC is equivalent to The SFI MRTC table.
   1283  *
   1284  ******************************************************************************/
   1285 
   1286 typedef struct acpi_table_vrtc
   1287 {
   1288     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1289 
   1290 } ACPI_TABLE_VRTC;
   1291 
   1292 /* VRTC entry */
   1293 
   1294 typedef struct acpi_vrtc_entry
   1295 {
   1296     ACPI_GENERIC_ADDRESS    PhysicalAddress;
   1297     UINT32                  Irq;
   1298 
   1299 } ACPI_VRTC_ENTRY;
   1300 
   1301 
   1302 /*******************************************************************************
   1303  *
   1304  * WAET - Windows ACPI Emulated devices Table
   1305  *        Version 1
   1306  *
   1307  * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009
   1308  *
   1309  ******************************************************************************/
   1310 
   1311 typedef struct acpi_table_waet
   1312 {
   1313     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1314     UINT32                  Flags;
   1315 
   1316 } ACPI_TABLE_WAET;
   1317 
   1318 /* Masks for Flags field above */
   1319 
   1320 #define ACPI_WAET_RTC_NO_ACK        (1)         /* RTC requires no int acknowledge */
   1321 #define ACPI_WAET_TIMER_ONE_READ    (1<<1)      /* PM timer requires only one read */
   1322 
   1323 
   1324 /*******************************************************************************
   1325  *
   1326  * WDAT - Watchdog Action Table
   1327  *        Version 1
   1328  *
   1329  * Conforms to "Hardware Watchdog Timers Design Specification",
   1330  * Copyright 2006 Microsoft Corporation.
   1331  *
   1332  ******************************************************************************/
   1333 
   1334 typedef struct acpi_table_wdat
   1335 {
   1336     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1337     UINT32                  HeaderLength;       /* Watchdog Header Length */
   1338     UINT16                  PciSegment;         /* PCI Segment number */
   1339     UINT8                   PciBus;             /* PCI Bus number */
   1340     UINT8                   PciDevice;          /* PCI Device number */
   1341     UINT8                   PciFunction;        /* PCI Function number */
   1342     UINT8                   Reserved[3];
   1343     UINT32                  TimerPeriod;        /* Period of one timer count (msec) */
   1344     UINT32                  MaxCount;           /* Maximum counter value supported */
   1345     UINT32                  MinCount;           /* Minimum counter value */
   1346     UINT8                   Flags;
   1347     UINT8                   Reserved2[3];
   1348     UINT32                  Entries;            /* Number of watchdog entries that follow */
   1349 
   1350 } ACPI_TABLE_WDAT;
   1351 
   1352 /* Masks for Flags field above */
   1353 
   1354 #define ACPI_WDAT_ENABLED           (1)
   1355 #define ACPI_WDAT_STOPPED           0x80
   1356 
   1357 
   1358 /* WDAT Instruction Entries (actions) */
   1359 
   1360 typedef struct acpi_wdat_entry
   1361 {
   1362     UINT8                   Action;
   1363     UINT8                   Instruction;
   1364     UINT16                  Reserved;
   1365     ACPI_GENERIC_ADDRESS    RegisterRegion;
   1366     UINT32                  Value;              /* Value used with Read/Write register */
   1367     UINT32                  Mask;               /* Bitmask required for this register instruction */
   1368 
   1369 } ACPI_WDAT_ENTRY;
   1370 
   1371 /* Values for Action field above */
   1372 
   1373 enum AcpiWdatActions
   1374 {
   1375     ACPI_WDAT_RESET                 = 1,
   1376     ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
   1377     ACPI_WDAT_GET_COUNTDOWN         = 5,
   1378     ACPI_WDAT_SET_COUNTDOWN         = 6,
   1379     ACPI_WDAT_GET_RUNNING_STATE     = 8,
   1380     ACPI_WDAT_SET_RUNNING_STATE     = 9,
   1381     ACPI_WDAT_GET_STOPPED_STATE     = 10,
   1382     ACPI_WDAT_SET_STOPPED_STATE     = 11,
   1383     ACPI_WDAT_GET_REBOOT            = 16,
   1384     ACPI_WDAT_SET_REBOOT            = 17,
   1385     ACPI_WDAT_GET_SHUTDOWN          = 18,
   1386     ACPI_WDAT_SET_SHUTDOWN          = 19,
   1387     ACPI_WDAT_GET_STATUS            = 32,
   1388     ACPI_WDAT_SET_STATUS            = 33,
   1389     ACPI_WDAT_ACTION_RESERVED       = 34    /* 34 and greater are reserved */
   1390 };
   1391 
   1392 /* Values for Instruction field above */
   1393 
   1394 enum AcpiWdatInstructions
   1395 {
   1396     ACPI_WDAT_READ_VALUE            = 0,
   1397     ACPI_WDAT_READ_COUNTDOWN        = 1,
   1398     ACPI_WDAT_WRITE_VALUE           = 2,
   1399     ACPI_WDAT_WRITE_COUNTDOWN       = 3,
   1400     ACPI_WDAT_INSTRUCTION_RESERVED  = 4,    /* 4 and greater are reserved */
   1401     ACPI_WDAT_PRESERVE_REGISTER     = 0x80  /* Except for this value */
   1402 };
   1403 
   1404 
   1405 /*******************************************************************************
   1406  *
   1407  * WDDT - Watchdog Descriptor Table
   1408  *        Version 1
   1409  *
   1410  * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",
   1411  * Version 001, September 2002
   1412  *
   1413  ******************************************************************************/
   1414 
   1415 typedef struct acpi_table_wddt
   1416 {
   1417     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1418     UINT16                  SpecVersion;
   1419     UINT16                  TableVersion;
   1420     UINT16                  PciVendorId;
   1421     ACPI_GENERIC_ADDRESS    Address;
   1422     UINT16                  MaxCount;           /* Maximum counter value supported */
   1423     UINT16                  MinCount;           /* Minimum counter value supported */
   1424     UINT16                  Period;
   1425     UINT16                  Status;
   1426     UINT16                  Capability;
   1427 
   1428 } ACPI_TABLE_WDDT;
   1429 
   1430 /* Flags for Status field above */
   1431 
   1432 #define ACPI_WDDT_AVAILABLE     (1)
   1433 #define ACPI_WDDT_ACTIVE        (1<<1)
   1434 #define ACPI_WDDT_TCO_OS_OWNED  (1<<2)
   1435 #define ACPI_WDDT_USER_RESET    (1<<11)
   1436 #define ACPI_WDDT_WDT_RESET     (1<<12)
   1437 #define ACPI_WDDT_POWER_FAIL    (1<<13)
   1438 #define ACPI_WDDT_UNKNOWN_RESET (1<<14)
   1439 
   1440 /* Flags for Capability field above */
   1441 
   1442 #define ACPI_WDDT_AUTO_RESET    (1)
   1443 #define ACPI_WDDT_ALERT_SUPPORT (1<<1)
   1444 
   1445 
   1446 /*******************************************************************************
   1447  *
   1448  * WDRT - Watchdog Resource Table
   1449  *        Version 1
   1450  *
   1451  * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",
   1452  * Version 1.01, August 28, 2006
   1453  *
   1454  ******************************************************************************/
   1455 
   1456 typedef struct acpi_table_wdrt
   1457 {
   1458     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
   1459     ACPI_GENERIC_ADDRESS    ControlRegister;
   1460     ACPI_GENERIC_ADDRESS    CountRegister;
   1461     UINT16                  PciDeviceId;
   1462     UINT16                  PciVendorId;
   1463     UINT8                   PciBus;             /* PCI Bus number */
   1464     UINT8                   PciDevice;          /* PCI Device number */
   1465     UINT8                   PciFunction;        /* PCI Function number */
   1466     UINT8                   PciSegment;         /* PCI Segment number */
   1467     UINT16                  MaxCount;           /* Maximum counter value supported */
   1468     UINT8                   Units;
   1469 
   1470 } ACPI_TABLE_WDRT;
   1471 
   1472 
   1473 /* Reset to default packing */
   1474 
   1475 #pragma pack()
   1476 
   1477 #endif /* __ACTBL2_H__ */
   1478