Home | History | Annotate | Line # | Download | only in include
actbl3.h revision 1.1.1.8
      1      1.1  christos /******************************************************************************
      2      1.1  christos  *
      3      1.1  christos  * Name: actbl3.h - ACPI Table Definitions
      4      1.1  christos  *
      5      1.1  christos  *****************************************************************************/
      6      1.1  christos 
      7      1.1  christos /*
      8  1.1.1.7  christos  * Copyright (C) 2000 - 2017, Intel Corp.
      9      1.1  christos  * All rights reserved.
     10      1.1  christos  *
     11      1.1  christos  * Redistribution and use in source and binary forms, with or without
     12      1.1  christos  * modification, are permitted provided that the following conditions
     13      1.1  christos  * are met:
     14      1.1  christos  * 1. Redistributions of source code must retain the above copyright
     15      1.1  christos  *    notice, this list of conditions, and the following disclaimer,
     16      1.1  christos  *    without modification.
     17      1.1  christos  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
     18      1.1  christos  *    substantially similar to the "NO WARRANTY" disclaimer below
     19      1.1  christos  *    ("Disclaimer") and any redistribution must be conditioned upon
     20      1.1  christos  *    including a substantially similar Disclaimer requirement for further
     21      1.1  christos  *    binary redistribution.
     22      1.1  christos  * 3. Neither the names of the above-listed copyright holders nor the names
     23      1.1  christos  *    of any contributors may be used to endorse or promote products derived
     24      1.1  christos  *    from this software without specific prior written permission.
     25      1.1  christos  *
     26      1.1  christos  * Alternatively, this software may be distributed under the terms of the
     27      1.1  christos  * GNU General Public License ("GPL") version 2 as published by the Free
     28      1.1  christos  * Software Foundation.
     29      1.1  christos  *
     30      1.1  christos  * NO WARRANTY
     31      1.1  christos  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     32      1.1  christos  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     33      1.1  christos  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
     34      1.1  christos  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     35      1.1  christos  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     36      1.1  christos  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     37      1.1  christos  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     38      1.1  christos  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
     39      1.1  christos  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
     40      1.1  christos  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     41      1.1  christos  * POSSIBILITY OF SUCH DAMAGES.
     42      1.1  christos  */
     43      1.1  christos 
     44      1.1  christos #ifndef __ACTBL3_H__
     45      1.1  christos #define __ACTBL3_H__
     46      1.1  christos 
     47      1.1  christos 
     48      1.1  christos /*******************************************************************************
     49      1.1  christos  *
     50      1.1  christos  * Additional ACPI Tables (3)
     51      1.1  christos  *
     52      1.1  christos  * These tables are not consumed directly by the ACPICA subsystem, but are
     53      1.1  christos  * included here to support device drivers and the AML disassembler.
     54      1.1  christos  *
     55  1.1.1.4  christos  * In general, the tables in this file are fully defined within the ACPI
     56  1.1.1.4  christos  * specification.
     57      1.1  christos  *
     58      1.1  christos  ******************************************************************************/
     59      1.1  christos 
     60      1.1  christos 
     61      1.1  christos /*
     62      1.1  christos  * Values for description table header signatures for tables defined in this
     63      1.1  christos  * file. Useful because they make it more difficult to inadvertently type in
     64      1.1  christos  * the wrong signature.
     65      1.1  christos  */
     66      1.1  christos #define ACPI_SIG_BGRT           "BGRT"      /* Boot Graphics Resource Table */
     67      1.1  christos #define ACPI_SIG_DRTM           "DRTM"      /* Dynamic Root of Trust for Measurement table */
     68      1.1  christos #define ACPI_SIG_FPDT           "FPDT"      /* Firmware Performance Data Table */
     69      1.1  christos #define ACPI_SIG_GTDT           "GTDT"      /* Generic Timer Description Table */
     70      1.1  christos #define ACPI_SIG_MPST           "MPST"      /* Memory Power State Table */
     71      1.1  christos #define ACPI_SIG_PCCT           "PCCT"      /* Platform Communications Channel Table */
     72      1.1  christos #define ACPI_SIG_PMTT           "PMTT"      /* Platform Memory Topology Table */
     73      1.1  christos #define ACPI_SIG_RASF           "RASF"      /* RAS Feature table */
     74  1.1.1.4  christos #define ACPI_SIG_STAO           "STAO"      /* Status Override table */
     75  1.1.1.4  christos #define ACPI_SIG_WPBT           "WPBT"      /* Windows Platform Binary Table */
     76  1.1.1.4  christos #define ACPI_SIG_XENV           "XENV"      /* Xen Environment table */
     77      1.1  christos 
     78      1.1  christos #define ACPI_SIG_S3PT           "S3PT"      /* S3 Performance (sub)Table */
     79      1.1  christos #define ACPI_SIG_PCCS           "PCC"       /* PCC Shared Memory Region */
     80      1.1  christos 
     81      1.1  christos /* Reserved table signatures */
     82      1.1  christos 
     83      1.1  christos #define ACPI_SIG_MATR           "MATR"      /* Memory Address Translation Table */
     84      1.1  christos #define ACPI_SIG_MSDM           "MSDM"      /* Microsoft Data Management Table */
     85      1.1  christos 
     86      1.1  christos /*
     87      1.1  christos  * All tables must be byte-packed to match the ACPI specification, since
     88      1.1  christos  * the tables are provided by the system BIOS.
     89      1.1  christos  */
     90      1.1  christos #pragma pack(1)
     91      1.1  christos 
     92      1.1  christos /*
     93      1.1  christos  * Note: C bitfields are not used for this reason:
     94      1.1  christos  *
     95      1.1  christos  * "Bitfields are great and easy to read, but unfortunately the C language
     96      1.1  christos  * does not specify the layout of bitfields in memory, which means they are
     97      1.1  christos  * essentially useless for dealing with packed data in on-disk formats or
     98      1.1  christos  * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
     99      1.1  christos  * this decision was a design error in C. Ritchie could have picked an order
    100      1.1  christos  * and stuck with it." Norman Ramsey.
    101      1.1  christos  * See http://stackoverflow.com/a/1053662/41661
    102      1.1  christos  */
    103      1.1  christos 
    104      1.1  christos 
    105      1.1  christos /*******************************************************************************
    106      1.1  christos  *
    107      1.1  christos  * BGRT - Boot Graphics Resource Table (ACPI 5.0)
    108      1.1  christos  *        Version 1
    109      1.1  christos  *
    110      1.1  christos  ******************************************************************************/
    111      1.1  christos 
    112      1.1  christos typedef struct acpi_table_bgrt
    113      1.1  christos {
    114      1.1  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    115      1.1  christos     UINT16                  Version;
    116      1.1  christos     UINT8                   Status;
    117      1.1  christos     UINT8                   ImageType;
    118      1.1  christos     UINT64                  ImageAddress;
    119      1.1  christos     UINT32                  ImageOffsetX;
    120      1.1  christos     UINT32                  ImageOffsetY;
    121      1.1  christos 
    122      1.1  christos } ACPI_TABLE_BGRT;
    123      1.1  christos 
    124  1.1.1.8  christos /* Flags for Status field above */
    125  1.1.1.8  christos 
    126  1.1.1.8  christos #define ACPI_BGRT_DISPLAYED                 (1)
    127  1.1.1.8  christos #define ACPI_BGRT_ORIENTATION_OFFSET        (3 << 1)
    128  1.1.1.8  christos 
    129      1.1  christos 
    130      1.1  christos /*******************************************************************************
    131      1.1  christos  *
    132      1.1  christos  * DRTM - Dynamic Root of Trust for Measurement table
    133  1.1.1.4  christos  * Conforms to "TCG D-RTM Architecture" June 17 2013, Version 1.0.0
    134  1.1.1.4  christos  * Table version 1
    135      1.1  christos  *
    136      1.1  christos  ******************************************************************************/
    137      1.1  christos 
    138      1.1  christos typedef struct acpi_table_drtm
    139      1.1  christos {
    140      1.1  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    141      1.1  christos     UINT64                  EntryBaseAddress;
    142      1.1  christos     UINT64                  EntryLength;
    143      1.1  christos     UINT32                  EntryAddress32;
    144      1.1  christos     UINT64                  EntryAddress64;
    145      1.1  christos     UINT64                  ExitAddress;
    146      1.1  christos     UINT64                  LogAreaAddress;
    147      1.1  christos     UINT32                  LogAreaLength;
    148      1.1  christos     UINT64                  ArchDependentAddress;
    149      1.1  christos     UINT32                  Flags;
    150      1.1  christos 
    151      1.1  christos } ACPI_TABLE_DRTM;
    152      1.1  christos 
    153  1.1.1.4  christos /* Flag Definitions for above */
    154  1.1.1.4  christos 
    155  1.1.1.4  christos #define ACPI_DRTM_ACCESS_ALLOWED            (1)
    156  1.1.1.4  christos #define ACPI_DRTM_ENABLE_GAP_CODE           (1<<1)
    157  1.1.1.4  christos #define ACPI_DRTM_INCOMPLETE_MEASUREMENTS   (1<<2)
    158  1.1.1.4  christos #define ACPI_DRTM_AUTHORITY_ORDER           (1<<3)
    159  1.1.1.4  christos 
    160  1.1.1.4  christos 
    161  1.1.1.4  christos /* 1) Validated Tables List (64-bit addresses) */
    162      1.1  christos 
    163  1.1.1.4  christos typedef struct acpi_drtm_vtable_list
    164      1.1  christos {
    165  1.1.1.4  christos     UINT32                  ValidatedTableCount;
    166  1.1.1.4  christos     UINT64                  ValidatedTables[1];
    167      1.1  christos 
    168  1.1.1.4  christos } ACPI_DRTM_VTABLE_LIST;
    169  1.1.1.4  christos 
    170  1.1.1.4  christos /* 2) Resources List (of Resource Descriptors) */
    171  1.1.1.4  christos 
    172  1.1.1.4  christos /* Resource Descriptor */
    173  1.1.1.4  christos 
    174  1.1.1.4  christos typedef struct acpi_drtm_resource
    175  1.1.1.4  christos {
    176  1.1.1.4  christos     UINT8                   Size[7];
    177  1.1.1.4  christos     UINT8                   Type;
    178  1.1.1.4  christos     UINT64                  Address;
    179      1.1  christos 
    180  1.1.1.4  christos } ACPI_DRTM_RESOURCE;
    181      1.1  christos 
    182      1.1  christos typedef struct acpi_drtm_resource_list
    183      1.1  christos {
    184  1.1.1.4  christos     UINT32                  ResourceCount;
    185  1.1.1.4  christos     ACPI_DRTM_RESOURCE      Resources[1];
    186      1.1  christos 
    187      1.1  christos } ACPI_DRTM_RESOURCE_LIST;
    188      1.1  christos 
    189      1.1  christos /* 3) Platform-specific Identifiers List */
    190      1.1  christos 
    191  1.1.1.4  christos typedef struct acpi_drtm_dps_id
    192      1.1  christos {
    193  1.1.1.4  christos     UINT32                  DpsIdLength;
    194  1.1.1.4  christos     UINT8                   DpsId[16];
    195      1.1  christos 
    196  1.1.1.4  christos } ACPI_DRTM_DPS_ID;
    197      1.1  christos 
    198      1.1  christos 
    199      1.1  christos /*******************************************************************************
    200      1.1  christos  *
    201      1.1  christos  * FPDT - Firmware Performance Data Table (ACPI 5.0)
    202      1.1  christos  *        Version 1
    203      1.1  christos  *
    204      1.1  christos  ******************************************************************************/
    205      1.1  christos 
    206      1.1  christos typedef struct acpi_table_fpdt
    207      1.1  christos {
    208      1.1  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    209      1.1  christos 
    210      1.1  christos } ACPI_TABLE_FPDT;
    211      1.1  christos 
    212      1.1  christos 
    213  1.1.1.6  christos /* FPDT subtable header (Performance Record Structure) */
    214      1.1  christos 
    215      1.1  christos typedef struct acpi_fpdt_header
    216      1.1  christos {
    217      1.1  christos     UINT16                  Type;
    218      1.1  christos     UINT8                   Length;
    219      1.1  christos     UINT8                   Revision;
    220      1.1  christos 
    221      1.1  christos } ACPI_FPDT_HEADER;
    222      1.1  christos 
    223      1.1  christos /* Values for Type field above */
    224      1.1  christos 
    225      1.1  christos enum AcpiFpdtType
    226      1.1  christos {
    227      1.1  christos     ACPI_FPDT_TYPE_BOOT                 = 0,
    228      1.1  christos     ACPI_FPDT_TYPE_S3PERF               = 1
    229      1.1  christos };
    230      1.1  christos 
    231      1.1  christos 
    232      1.1  christos /*
    233      1.1  christos  * FPDT subtables
    234      1.1  christos  */
    235      1.1  christos 
    236      1.1  christos /* 0: Firmware Basic Boot Performance Record */
    237      1.1  christos 
    238  1.1.1.6  christos typedef struct acpi_fpdt_boot_pointer
    239      1.1  christos {
    240      1.1  christos     ACPI_FPDT_HEADER        Header;
    241      1.1  christos     UINT8                   Reserved[4];
    242  1.1.1.6  christos     UINT64                  Address;
    243      1.1  christos 
    244  1.1.1.6  christos } ACPI_FPDT_BOOT_POINTER;
    245      1.1  christos 
    246      1.1  christos 
    247      1.1  christos /* 1: S3 Performance Table Pointer Record */
    248      1.1  christos 
    249  1.1.1.6  christos typedef struct acpi_fpdt_s3pt_pointer
    250      1.1  christos {
    251      1.1  christos     ACPI_FPDT_HEADER        Header;
    252      1.1  christos     UINT8                   Reserved[4];
    253      1.1  christos     UINT64                  Address;
    254      1.1  christos 
    255  1.1.1.6  christos } ACPI_FPDT_S3PT_POINTER;
    256      1.1  christos 
    257      1.1  christos 
    258      1.1  christos /*
    259      1.1  christos  * S3PT - S3 Performance Table. This table is pointed to by the
    260  1.1.1.6  christos  * S3 Pointer Record above.
    261      1.1  christos  */
    262      1.1  christos typedef struct acpi_table_s3pt
    263      1.1  christos {
    264      1.1  christos     UINT8                   Signature[4]; /* "S3PT" */
    265      1.1  christos     UINT32                  Length;
    266      1.1  christos 
    267      1.1  christos } ACPI_TABLE_S3PT;
    268      1.1  christos 
    269      1.1  christos 
    270      1.1  christos /*
    271  1.1.1.6  christos  * S3PT Subtables (Not part of the actual FPDT)
    272      1.1  christos  */
    273      1.1  christos 
    274  1.1.1.6  christos /* Values for Type field in S3PT header */
    275      1.1  christos 
    276      1.1  christos enum AcpiS3ptType
    277      1.1  christos {
    278      1.1  christos     ACPI_S3PT_TYPE_RESUME               = 0,
    279  1.1.1.6  christos     ACPI_S3PT_TYPE_SUSPEND              = 1,
    280  1.1.1.6  christos     ACPI_FPDT_BOOT_PERFORMANCE          = 2
    281      1.1  christos };
    282      1.1  christos 
    283      1.1  christos typedef struct acpi_s3pt_resume
    284      1.1  christos {
    285  1.1.1.6  christos     ACPI_FPDT_HEADER        Header;
    286      1.1  christos     UINT32                  ResumeCount;
    287      1.1  christos     UINT64                  FullResume;
    288      1.1  christos     UINT64                  AverageResume;
    289      1.1  christos 
    290      1.1  christos } ACPI_S3PT_RESUME;
    291      1.1  christos 
    292      1.1  christos typedef struct acpi_s3pt_suspend
    293      1.1  christos {
    294  1.1.1.6  christos     ACPI_FPDT_HEADER        Header;
    295      1.1  christos     UINT64                  SuspendStart;
    296      1.1  christos     UINT64                  SuspendEnd;
    297      1.1  christos 
    298      1.1  christos } ACPI_S3PT_SUSPEND;
    299      1.1  christos 
    300      1.1  christos 
    301  1.1.1.6  christos /*
    302  1.1.1.6  christos  * FPDT Boot Performance Record (Not part of the actual FPDT)
    303  1.1.1.6  christos  */
    304  1.1.1.6  christos typedef struct acpi_fpdt_boot
    305  1.1.1.6  christos {
    306  1.1.1.6  christos     ACPI_FPDT_HEADER        Header;
    307  1.1.1.6  christos     UINT8                   Reserved[4];
    308  1.1.1.6  christos     UINT64                  ResetEnd;
    309  1.1.1.6  christos     UINT64                  LoadStart;
    310  1.1.1.6  christos     UINT64                  StartupStart;
    311  1.1.1.6  christos     UINT64                  ExitServicesEntry;
    312  1.1.1.6  christos     UINT64                  ExitServicesExit;
    313  1.1.1.6  christos 
    314  1.1.1.6  christos } ACPI_FPDT_BOOT;
    315  1.1.1.6  christos 
    316  1.1.1.6  christos 
    317      1.1  christos /*******************************************************************************
    318      1.1  christos  *
    319  1.1.1.2  christos  * GTDT - Generic Timer Description Table (ACPI 5.1)
    320  1.1.1.2  christos  *        Version 2
    321      1.1  christos  *
    322      1.1  christos  ******************************************************************************/
    323      1.1  christos 
    324      1.1  christos typedef struct acpi_table_gtdt
    325      1.1  christos {
    326      1.1  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    327  1.1.1.2  christos     UINT64                  CounterBlockAddresss;
    328  1.1.1.2  christos     UINT32                  Reserved;
    329  1.1.1.2  christos     UINT32                  SecureEl1Interrupt;
    330  1.1.1.2  christos     UINT32                  SecureEl1Flags;
    331  1.1.1.2  christos     UINT32                  NonSecureEl1Interrupt;
    332  1.1.1.2  christos     UINT32                  NonSecureEl1Flags;
    333      1.1  christos     UINT32                  VirtualTimerInterrupt;
    334      1.1  christos     UINT32                  VirtualTimerFlags;
    335  1.1.1.2  christos     UINT32                  NonSecureEl2Interrupt;
    336  1.1.1.2  christos     UINT32                  NonSecureEl2Flags;
    337  1.1.1.2  christos     UINT64                  CounterReadBlockAddress;
    338  1.1.1.2  christos     UINT32                  PlatformTimerCount;
    339  1.1.1.2  christos     UINT32                  PlatformTimerOffset;
    340      1.1  christos 
    341      1.1  christos } ACPI_TABLE_GTDT;
    342      1.1  christos 
    343  1.1.1.2  christos /* Flag Definitions: Timer Block Physical Timers and Virtual timers */
    344  1.1.1.2  christos 
    345  1.1.1.2  christos #define ACPI_GTDT_INTERRUPT_MODE        (1)
    346  1.1.1.2  christos #define ACPI_GTDT_INTERRUPT_POLARITY    (1<<1)
    347  1.1.1.2  christos #define ACPI_GTDT_ALWAYS_ON             (1<<2)
    348  1.1.1.2  christos 
    349  1.1.1.2  christos 
    350  1.1.1.2  christos /* Common GTDT subtable header */
    351  1.1.1.2  christos 
    352  1.1.1.2  christos typedef struct acpi_gtdt_header
    353  1.1.1.2  christos {
    354  1.1.1.2  christos     UINT8                   Type;
    355  1.1.1.2  christos     UINT16                  Length;
    356  1.1.1.2  christos 
    357  1.1.1.2  christos } ACPI_GTDT_HEADER;
    358  1.1.1.2  christos 
    359  1.1.1.2  christos /* Values for GTDT subtable type above */
    360      1.1  christos 
    361  1.1.1.2  christos enum AcpiGtdtType
    362  1.1.1.2  christos {
    363  1.1.1.2  christos     ACPI_GTDT_TYPE_TIMER_BLOCK      = 0,
    364  1.1.1.2  christos     ACPI_GTDT_TYPE_WATCHDOG         = 1,
    365  1.1.1.2  christos     ACPI_GTDT_TYPE_RESERVED         = 2    /* 2 and greater are reserved */
    366  1.1.1.2  christos };
    367  1.1.1.2  christos 
    368  1.1.1.2  christos 
    369  1.1.1.2  christos /* GTDT Subtables, correspond to Type in acpi_gtdt_header */
    370  1.1.1.2  christos 
    371  1.1.1.2  christos /* 0: Generic Timer Block */
    372  1.1.1.2  christos 
    373  1.1.1.2  christos typedef struct acpi_gtdt_timer_block
    374  1.1.1.2  christos {
    375  1.1.1.2  christos     ACPI_GTDT_HEADER        Header;
    376  1.1.1.2  christos     UINT8                   Reserved;
    377  1.1.1.2  christos     UINT64                  BlockAddress;
    378  1.1.1.2  christos     UINT32                  TimerCount;
    379  1.1.1.2  christos     UINT32                  TimerOffset;
    380  1.1.1.2  christos 
    381  1.1.1.2  christos } ACPI_GTDT_TIMER_BLOCK;
    382  1.1.1.2  christos 
    383  1.1.1.2  christos /* Timer Sub-Structure, one per timer */
    384  1.1.1.2  christos 
    385  1.1.1.2  christos typedef struct acpi_gtdt_timer_entry
    386  1.1.1.2  christos {
    387  1.1.1.2  christos     UINT8                   FrameNumber;
    388  1.1.1.2  christos     UINT8                   Reserved[3];
    389  1.1.1.2  christos     UINT64                  BaseAddress;
    390  1.1.1.2  christos     UINT64                  El0BaseAddress;
    391  1.1.1.2  christos     UINT32                  TimerInterrupt;
    392  1.1.1.2  christos     UINT32                  TimerFlags;
    393  1.1.1.2  christos     UINT32                  VirtualTimerInterrupt;
    394  1.1.1.2  christos     UINT32                  VirtualTimerFlags;
    395  1.1.1.2  christos     UINT32                  CommonFlags;
    396      1.1  christos 
    397  1.1.1.2  christos } ACPI_GTDT_TIMER_ENTRY;
    398      1.1  christos 
    399  1.1.1.2  christos /* Flag Definitions: TimerFlags and VirtualTimerFlags above */
    400  1.1.1.2  christos 
    401  1.1.1.2  christos #define ACPI_GTDT_GT_IRQ_MODE               (1)
    402  1.1.1.2  christos #define ACPI_GTDT_GT_IRQ_POLARITY           (1<<1)
    403  1.1.1.2  christos 
    404  1.1.1.2  christos /* Flag Definitions: CommonFlags above */
    405  1.1.1.2  christos 
    406  1.1.1.2  christos #define ACPI_GTDT_GT_IS_SECURE_TIMER        (1)
    407  1.1.1.2  christos #define ACPI_GTDT_GT_ALWAYS_ON              (1<<1)
    408  1.1.1.2  christos 
    409  1.1.1.2  christos 
    410  1.1.1.2  christos /* 1: SBSA Generic Watchdog Structure */
    411  1.1.1.2  christos 
    412  1.1.1.2  christos typedef struct acpi_gtdt_watchdog
    413  1.1.1.2  christos {
    414  1.1.1.2  christos     ACPI_GTDT_HEADER        Header;
    415  1.1.1.2  christos     UINT8                   Reserved;
    416  1.1.1.2  christos     UINT64                  RefreshFrameAddress;
    417  1.1.1.2  christos     UINT64                  ControlFrameAddress;
    418  1.1.1.2  christos     UINT32                  TimerInterrupt;
    419  1.1.1.2  christos     UINT32                  TimerFlags;
    420  1.1.1.2  christos 
    421  1.1.1.2  christos } ACPI_GTDT_WATCHDOG;
    422  1.1.1.2  christos 
    423  1.1.1.2  christos /* Flag Definitions: TimerFlags above */
    424  1.1.1.2  christos 
    425  1.1.1.2  christos #define ACPI_GTDT_WATCHDOG_IRQ_MODE         (1)
    426  1.1.1.2  christos #define ACPI_GTDT_WATCHDOG_IRQ_POLARITY     (1<<1)
    427  1.1.1.2  christos #define ACPI_GTDT_WATCHDOG_SECURE           (1<<2)
    428      1.1  christos 
    429      1.1  christos 
    430      1.1  christos /*******************************************************************************
    431      1.1  christos  *
    432      1.1  christos  * MPST - Memory Power State Table (ACPI 5.0)
    433      1.1  christos  *        Version 1
    434      1.1  christos  *
    435      1.1  christos  ******************************************************************************/
    436      1.1  christos 
    437      1.1  christos #define ACPI_MPST_CHANNEL_INFO \
    438      1.1  christos     UINT8                   ChannelId; \
    439      1.1  christos     UINT8                   Reserved1[3]; \
    440      1.1  christos     UINT16                  PowerNodeCount; \
    441      1.1  christos     UINT16                  Reserved2;
    442      1.1  christos 
    443      1.1  christos /* Main table */
    444      1.1  christos 
    445      1.1  christos typedef struct acpi_table_mpst
    446      1.1  christos {
    447      1.1  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    448      1.1  christos     ACPI_MPST_CHANNEL_INFO                      /* Platform Communication Channel */
    449      1.1  christos 
    450      1.1  christos } ACPI_TABLE_MPST;
    451      1.1  christos 
    452      1.1  christos 
    453      1.1  christos /* Memory Platform Communication Channel Info */
    454      1.1  christos 
    455      1.1  christos typedef struct acpi_mpst_channel
    456      1.1  christos {
    457      1.1  christos     ACPI_MPST_CHANNEL_INFO                      /* Platform Communication Channel */
    458      1.1  christos 
    459      1.1  christos } ACPI_MPST_CHANNEL;
    460      1.1  christos 
    461      1.1  christos 
    462      1.1  christos /* Memory Power Node Structure */
    463      1.1  christos 
    464      1.1  christos typedef struct acpi_mpst_power_node
    465      1.1  christos {
    466      1.1  christos     UINT8                   Flags;
    467      1.1  christos     UINT8                   Reserved1;
    468      1.1  christos     UINT16                  NodeId;
    469      1.1  christos     UINT32                  Length;
    470      1.1  christos     UINT64                  RangeAddress;
    471      1.1  christos     UINT64                  RangeLength;
    472      1.1  christos     UINT32                  NumPowerStates;
    473      1.1  christos     UINT32                  NumPhysicalComponents;
    474      1.1  christos 
    475      1.1  christos } ACPI_MPST_POWER_NODE;
    476      1.1  christos 
    477      1.1  christos /* Values for Flags field above */
    478      1.1  christos 
    479      1.1  christos #define ACPI_MPST_ENABLED               1
    480      1.1  christos #define ACPI_MPST_POWER_MANAGED         2
    481      1.1  christos #define ACPI_MPST_HOT_PLUG_CAPABLE      4
    482      1.1  christos 
    483      1.1  christos 
    484      1.1  christos /* Memory Power State Structure (follows POWER_NODE above) */
    485      1.1  christos 
    486      1.1  christos typedef struct acpi_mpst_power_state
    487      1.1  christos {
    488      1.1  christos     UINT8                   PowerState;
    489      1.1  christos     UINT8                   InfoIndex;
    490      1.1  christos 
    491      1.1  christos } ACPI_MPST_POWER_STATE;
    492      1.1  christos 
    493      1.1  christos 
    494      1.1  christos /* Physical Component ID Structure (follows POWER_STATE above) */
    495      1.1  christos 
    496      1.1  christos typedef struct acpi_mpst_component
    497      1.1  christos {
    498      1.1  christos     UINT16                  ComponentId;
    499      1.1  christos 
    500      1.1  christos } ACPI_MPST_COMPONENT;
    501      1.1  christos 
    502      1.1  christos 
    503      1.1  christos /* Memory Power State Characteristics Structure (follows all POWER_NODEs) */
    504      1.1  christos 
    505      1.1  christos typedef struct acpi_mpst_data_hdr
    506      1.1  christos {
    507      1.1  christos     UINT16                  CharacteristicsCount;
    508      1.1  christos     UINT16                  Reserved;
    509      1.1  christos 
    510      1.1  christos } ACPI_MPST_DATA_HDR;
    511      1.1  christos 
    512      1.1  christos typedef struct acpi_mpst_power_data
    513      1.1  christos {
    514      1.1  christos     UINT8                   StructureId;
    515      1.1  christos     UINT8                   Flags;
    516      1.1  christos     UINT16                  Reserved1;
    517      1.1  christos     UINT32                  AveragePower;
    518      1.1  christos     UINT32                  PowerSaving;
    519      1.1  christos     UINT64                  ExitLatency;
    520      1.1  christos     UINT64                  Reserved2;
    521      1.1  christos 
    522      1.1  christos } ACPI_MPST_POWER_DATA;
    523      1.1  christos 
    524      1.1  christos /* Values for Flags field above */
    525      1.1  christos 
    526      1.1  christos #define ACPI_MPST_PRESERVE              1
    527      1.1  christos #define ACPI_MPST_AUTOENTRY             2
    528      1.1  christos #define ACPI_MPST_AUTOEXIT              4
    529      1.1  christos 
    530      1.1  christos 
    531      1.1  christos /* Shared Memory Region (not part of an ACPI table) */
    532      1.1  christos 
    533      1.1  christos typedef struct acpi_mpst_shared
    534      1.1  christos {
    535      1.1  christos     UINT32                  Signature;
    536      1.1  christos     UINT16                  PccCommand;
    537      1.1  christos     UINT16                  PccStatus;
    538      1.1  christos     UINT32                  CommandRegister;
    539      1.1  christos     UINT32                  StatusRegister;
    540      1.1  christos     UINT32                  PowerStateId;
    541      1.1  christos     UINT32                  PowerNodeId;
    542      1.1  christos     UINT64                  EnergyConsumed;
    543      1.1  christos     UINT64                  AveragePower;
    544      1.1  christos 
    545      1.1  christos } ACPI_MPST_SHARED;
    546      1.1  christos 
    547      1.1  christos 
    548      1.1  christos /*******************************************************************************
    549      1.1  christos  *
    550      1.1  christos  * PCCT - Platform Communications Channel Table (ACPI 5.0)
    551  1.1.1.8  christos  *        Version 2 (ACPI 6.2)
    552      1.1  christos  *
    553      1.1  christos  ******************************************************************************/
    554      1.1  christos 
    555      1.1  christos typedef struct acpi_table_pcct
    556      1.1  christos {
    557      1.1  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    558      1.1  christos     UINT32                  Flags;
    559      1.1  christos     UINT64                  Reserved;
    560      1.1  christos 
    561      1.1  christos } ACPI_TABLE_PCCT;
    562      1.1  christos 
    563      1.1  christos /* Values for Flags field above */
    564      1.1  christos 
    565      1.1  christos #define ACPI_PCCT_DOORBELL              1
    566      1.1  christos 
    567      1.1  christos /* Values for subtable type in ACPI_SUBTABLE_HEADER */
    568      1.1  christos 
    569      1.1  christos enum AcpiPcctType
    570      1.1  christos {
    571  1.1.1.6  christos     ACPI_PCCT_TYPE_GENERIC_SUBSPACE             = 0,
    572  1.1.1.6  christos     ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE          = 1,
    573  1.1.1.6  christos     ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2    = 2,    /* ACPI 6.1 */
    574  1.1.1.8  christos     ACPI_PCCT_TYPE_EXT_PCC_MASTER_SUBSPACE      = 3,    /* ACPI 6.2 */
    575  1.1.1.8  christos     ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE       = 4,    /* ACPI 6.2 */
    576  1.1.1.8  christos     ACPI_PCCT_TYPE_RESERVED                     = 5     /* 5 and greater are reserved */
    577      1.1  christos };
    578      1.1  christos 
    579      1.1  christos /*
    580      1.1  christos  * PCCT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
    581      1.1  christos  */
    582      1.1  christos 
    583      1.1  christos /* 0: Generic Communications Subspace */
    584      1.1  christos 
    585      1.1  christos typedef struct acpi_pcct_subspace
    586      1.1  christos {
    587      1.1  christos     ACPI_SUBTABLE_HEADER    Header;
    588      1.1  christos     UINT8                   Reserved[6];
    589      1.1  christos     UINT64                  BaseAddress;
    590      1.1  christos     UINT64                  Length;
    591      1.1  christos     ACPI_GENERIC_ADDRESS    DoorbellRegister;
    592      1.1  christos     UINT64                  PreserveMask;
    593      1.1  christos     UINT64                  WriteMask;
    594      1.1  christos     UINT32                  Latency;
    595      1.1  christos     UINT32                  MaxAccessRate;
    596      1.1  christos     UINT16                  MinTurnaroundTime;
    597      1.1  christos 
    598      1.1  christos } ACPI_PCCT_SUBSPACE;
    599      1.1  christos 
    600      1.1  christos 
    601  1.1.1.2  christos /* 1: HW-reduced Communications Subspace (ACPI 5.1) */
    602  1.1.1.2  christos 
    603  1.1.1.2  christos typedef struct acpi_pcct_hw_reduced
    604  1.1.1.2  christos {
    605  1.1.1.2  christos     ACPI_SUBTABLE_HEADER    Header;
    606  1.1.1.8  christos     UINT32                  PlatformInterrupt;
    607  1.1.1.2  christos     UINT8                   Flags;
    608  1.1.1.2  christos     UINT8                   Reserved;
    609  1.1.1.2  christos     UINT64                  BaseAddress;
    610  1.1.1.2  christos     UINT64                  Length;
    611  1.1.1.2  christos     ACPI_GENERIC_ADDRESS    DoorbellRegister;
    612  1.1.1.2  christos     UINT64                  PreserveMask;
    613  1.1.1.2  christos     UINT64                  WriteMask;
    614  1.1.1.2  christos     UINT32                  Latency;
    615  1.1.1.2  christos     UINT32                  MaxAccessRate;
    616  1.1.1.2  christos     UINT16                  MinTurnaroundTime;
    617  1.1.1.2  christos 
    618  1.1.1.2  christos } ACPI_PCCT_HW_REDUCED;
    619  1.1.1.2  christos 
    620  1.1.1.6  christos 
    621  1.1.1.6  christos /* 2: HW-reduced Communications Subspace Type 2 (ACPI 6.1) */
    622  1.1.1.6  christos 
    623  1.1.1.6  christos typedef struct acpi_pcct_hw_reduced_type2
    624  1.1.1.6  christos {
    625  1.1.1.6  christos     ACPI_SUBTABLE_HEADER    Header;
    626  1.1.1.8  christos     UINT32                  PlatformInterrupt;
    627  1.1.1.6  christos     UINT8                   Flags;
    628  1.1.1.6  christos     UINT8                   Reserved;
    629  1.1.1.6  christos     UINT64                  BaseAddress;
    630  1.1.1.6  christos     UINT64                  Length;
    631  1.1.1.6  christos     ACPI_GENERIC_ADDRESS    DoorbellRegister;
    632  1.1.1.6  christos     UINT64                  PreserveMask;
    633  1.1.1.6  christos     UINT64                  WriteMask;
    634  1.1.1.6  christos     UINT32                  Latency;
    635  1.1.1.6  christos     UINT32                  MaxAccessRate;
    636  1.1.1.6  christos     UINT16                  MinTurnaroundTime;
    637  1.1.1.8  christos     ACPI_GENERIC_ADDRESS    PlatformAckRegister;
    638  1.1.1.6  christos     UINT64                  AckPreserveMask;
    639  1.1.1.6  christos     UINT64                  AckWriteMask;
    640  1.1.1.6  christos 
    641  1.1.1.6  christos } ACPI_PCCT_HW_REDUCED_TYPE2;
    642  1.1.1.6  christos 
    643  1.1.1.6  christos 
    644  1.1.1.8  christos /* 3: Extended PCC Master Subspace Type 3 (ACPI 6.2) */
    645  1.1.1.8  christos 
    646  1.1.1.8  christos typedef struct acpi_pcct_ext_pcc_master
    647  1.1.1.8  christos {
    648  1.1.1.8  christos     ACPI_SUBTABLE_HEADER    Header;
    649  1.1.1.8  christos     UINT32                  PlatformInterrupt;
    650  1.1.1.8  christos     UINT8                   Flags;
    651  1.1.1.8  christos     UINT8                   Reserved1;
    652  1.1.1.8  christos     UINT64                  BaseAddress;
    653  1.1.1.8  christos     UINT32                  Length;
    654  1.1.1.8  christos     ACPI_GENERIC_ADDRESS    DoorbellRegister;
    655  1.1.1.8  christos     UINT64                  PreserveMask;
    656  1.1.1.8  christos     UINT64                  WriteMask;
    657  1.1.1.8  christos     UINT32                  Latency;
    658  1.1.1.8  christos     UINT32                  MaxAccessRate;
    659  1.1.1.8  christos     UINT32                  MinTurnaroundTime;
    660  1.1.1.8  christos     ACPI_GENERIC_ADDRESS    PlatformAckRegister;
    661  1.1.1.8  christos     UINT64                  AckPreserveMask;
    662  1.1.1.8  christos     UINT64                  AckSetMask;
    663  1.1.1.8  christos     UINT64                  Reserved2;
    664  1.1.1.8  christos     ACPI_GENERIC_ADDRESS    CmdCompleteRegister;
    665  1.1.1.8  christos     UINT64                  CmdCompleteMask;
    666  1.1.1.8  christos     ACPI_GENERIC_ADDRESS    CmdUpdateRegister;
    667  1.1.1.8  christos     UINT64                  CmdUpdatePreserveMask;
    668  1.1.1.8  christos     UINT64                  CmdUpdateSetMask;
    669  1.1.1.8  christos     ACPI_GENERIC_ADDRESS    ErrorStatusRegister;
    670  1.1.1.8  christos     UINT64                  ErrorStatusMask;
    671  1.1.1.8  christos 
    672  1.1.1.8  christos } ACPI_PCCT_EXT_PCC_MASTER;
    673  1.1.1.8  christos 
    674  1.1.1.8  christos 
    675  1.1.1.8  christos /* 4: Extended PCC Slave Subspace Type 4 (ACPI 6.2) */
    676  1.1.1.8  christos 
    677  1.1.1.8  christos typedef struct acpi_pcct_ext_pcc_slave
    678  1.1.1.8  christos {
    679  1.1.1.8  christos     ACPI_SUBTABLE_HEADER    Header;
    680  1.1.1.8  christos     UINT32                  PlatformInterrupt;
    681  1.1.1.8  christos     UINT8                   Flags;
    682  1.1.1.8  christos     UINT8                   Reserved1;
    683  1.1.1.8  christos     UINT64                  BaseAddress;
    684  1.1.1.8  christos     UINT32                  Length;
    685  1.1.1.8  christos     ACPI_GENERIC_ADDRESS    DoorbellRegister;
    686  1.1.1.8  christos     UINT64                  PreserveMask;
    687  1.1.1.8  christos     UINT64                  WriteMask;
    688  1.1.1.8  christos     UINT32                  Latency;
    689  1.1.1.8  christos     UINT32                  MaxAccessRate;
    690  1.1.1.8  christos     UINT32                  MinTurnaroundTime;
    691  1.1.1.8  christos     ACPI_GENERIC_ADDRESS    PlatformAckRegister;
    692  1.1.1.8  christos     UINT64                  AckPreserveMask;
    693  1.1.1.8  christos     UINT64                  AckSetMask;
    694  1.1.1.8  christos     UINT64                  Reserved2;
    695  1.1.1.8  christos     ACPI_GENERIC_ADDRESS    CmdCompleteRegister;
    696  1.1.1.8  christos     UINT64                  CmdCompleteMask;
    697  1.1.1.8  christos     ACPI_GENERIC_ADDRESS    CmdUpdateRegister;
    698  1.1.1.8  christos     UINT64                  CmdUpdatePreserveMask;
    699  1.1.1.8  christos     UINT64                  CmdUpdateSetMask;
    700  1.1.1.8  christos     ACPI_GENERIC_ADDRESS    ErrorStatusRegister;
    701  1.1.1.8  christos     UINT64                  ErrorStatusMask;
    702  1.1.1.8  christos 
    703  1.1.1.8  christos } ACPI_PCCT_EXT_PCC_SLAVE;
    704  1.1.1.8  christos 
    705  1.1.1.8  christos 
    706  1.1.1.2  christos /* Values for doorbell flags above */
    707  1.1.1.2  christos 
    708  1.1.1.2  christos #define ACPI_PCCT_INTERRUPT_POLARITY    (1)
    709  1.1.1.2  christos #define ACPI_PCCT_INTERRUPT_MODE        (1<<1)
    710  1.1.1.2  christos 
    711  1.1.1.2  christos 
    712      1.1  christos /*
    713      1.1  christos  * PCC memory structures (not part of the ACPI table)
    714      1.1  christos  */
    715      1.1  christos 
    716      1.1  christos /* Shared Memory Region */
    717      1.1  christos 
    718      1.1  christos typedef struct acpi_pcct_shared_memory
    719      1.1  christos {
    720      1.1  christos     UINT32                  Signature;
    721      1.1  christos     UINT16                  Command;
    722      1.1  christos     UINT16                  Status;
    723      1.1  christos 
    724      1.1  christos } ACPI_PCCT_SHARED_MEMORY;
    725      1.1  christos 
    726      1.1  christos 
    727  1.1.1.8  christos /* Extended PCC Subspace Shared Memory Region (ACPI 6.2) */
    728  1.1.1.8  christos 
    729  1.1.1.8  christos typedef struct acpi_pcct_ext_pcc_shared_memory
    730  1.1.1.8  christos {
    731  1.1.1.8  christos     UINT32                  Signature;
    732  1.1.1.8  christos     UINT32                  Flags;
    733  1.1.1.8  christos     UINT32                  Length;
    734  1.1.1.8  christos     UINT32                  Command;
    735  1.1.1.8  christos 
    736  1.1.1.8  christos } ACPI_PCCT_EXT_PCC_SHARED_MEMORY;
    737  1.1.1.8  christos 
    738  1.1.1.8  christos 
    739      1.1  christos /*******************************************************************************
    740      1.1  christos  *
    741      1.1  christos  * PMTT - Platform Memory Topology Table (ACPI 5.0)
    742      1.1  christos  *        Version 1
    743      1.1  christos  *
    744      1.1  christos  ******************************************************************************/
    745      1.1  christos 
    746      1.1  christos typedef struct acpi_table_pmtt
    747      1.1  christos {
    748      1.1  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    749      1.1  christos     UINT32                  Reserved;
    750      1.1  christos 
    751      1.1  christos } ACPI_TABLE_PMTT;
    752      1.1  christos 
    753      1.1  christos 
    754      1.1  christos /* Common header for PMTT subtables that follow main table */
    755      1.1  christos 
    756      1.1  christos typedef struct acpi_pmtt_header
    757      1.1  christos {
    758      1.1  christos     UINT8                   Type;
    759      1.1  christos     UINT8                   Reserved1;
    760      1.1  christos     UINT16                  Length;
    761      1.1  christos     UINT16                  Flags;
    762      1.1  christos     UINT16                  Reserved2;
    763      1.1  christos 
    764      1.1  christos } ACPI_PMTT_HEADER;
    765      1.1  christos 
    766      1.1  christos /* Values for Type field above */
    767      1.1  christos 
    768      1.1  christos #define ACPI_PMTT_TYPE_SOCKET           0
    769      1.1  christos #define ACPI_PMTT_TYPE_CONTROLLER       1
    770      1.1  christos #define ACPI_PMTT_TYPE_DIMM             2
    771      1.1  christos #define ACPI_PMTT_TYPE_RESERVED         3 /* 0x03-0xFF are reserved */
    772      1.1  christos 
    773      1.1  christos /* Values for Flags field above */
    774      1.1  christos 
    775      1.1  christos #define ACPI_PMTT_TOP_LEVEL             0x0001
    776      1.1  christos #define ACPI_PMTT_PHYSICAL              0x0002
    777      1.1  christos #define ACPI_PMTT_MEMORY_TYPE           0x000C
    778      1.1  christos 
    779      1.1  christos 
    780      1.1  christos /*
    781      1.1  christos  * PMTT subtables, correspond to Type in acpi_pmtt_header
    782      1.1  christos  */
    783      1.1  christos 
    784      1.1  christos 
    785      1.1  christos /* 0: Socket Structure */
    786      1.1  christos 
    787      1.1  christos typedef struct acpi_pmtt_socket
    788      1.1  christos {
    789      1.1  christos     ACPI_PMTT_HEADER        Header;
    790      1.1  christos     UINT16                  SocketId;
    791      1.1  christos     UINT16                  Reserved;
    792      1.1  christos 
    793      1.1  christos } ACPI_PMTT_SOCKET;
    794      1.1  christos 
    795      1.1  christos 
    796      1.1  christos /* 1: Memory Controller subtable */
    797      1.1  christos 
    798      1.1  christos typedef struct acpi_pmtt_controller
    799      1.1  christos {
    800      1.1  christos     ACPI_PMTT_HEADER        Header;
    801      1.1  christos     UINT32                  ReadLatency;
    802      1.1  christos     UINT32                  WriteLatency;
    803      1.1  christos     UINT32                  ReadBandwidth;
    804      1.1  christos     UINT32                  WriteBandwidth;
    805      1.1  christos     UINT16                  AccessWidth;
    806      1.1  christos     UINT16                  Alignment;
    807      1.1  christos     UINT16                  Reserved;
    808      1.1  christos     UINT16                  DomainCount;
    809      1.1  christos 
    810      1.1  christos } ACPI_PMTT_CONTROLLER;
    811      1.1  christos 
    812      1.1  christos /* 1a: Proximity Domain substructure */
    813      1.1  christos 
    814      1.1  christos typedef struct acpi_pmtt_domain
    815      1.1  christos {
    816      1.1  christos     UINT32                  ProximityDomain;
    817      1.1  christos 
    818      1.1  christos } ACPI_PMTT_DOMAIN;
    819      1.1  christos 
    820      1.1  christos 
    821      1.1  christos /* 2: Physical Component Identifier (DIMM) */
    822      1.1  christos 
    823      1.1  christos typedef struct acpi_pmtt_physical_component
    824      1.1  christos {
    825      1.1  christos     ACPI_PMTT_HEADER        Header;
    826      1.1  christos     UINT16                  ComponentId;
    827      1.1  christos     UINT16                  Reserved;
    828      1.1  christos     UINT32                  MemorySize;
    829      1.1  christos     UINT32                  BiosHandle;
    830      1.1  christos 
    831      1.1  christos } ACPI_PMTT_PHYSICAL_COMPONENT;
    832      1.1  christos 
    833      1.1  christos 
    834      1.1  christos /*******************************************************************************
    835      1.1  christos  *
    836      1.1  christos  * RASF - RAS Feature Table (ACPI 5.0)
    837      1.1  christos  *        Version 1
    838      1.1  christos  *
    839      1.1  christos  ******************************************************************************/
    840      1.1  christos 
    841      1.1  christos typedef struct acpi_table_rasf
    842      1.1  christos {
    843      1.1  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    844      1.1  christos     UINT8                   ChannelId[12];
    845      1.1  christos 
    846      1.1  christos } ACPI_TABLE_RASF;
    847      1.1  christos 
    848      1.1  christos /* RASF Platform Communication Channel Shared Memory Region */
    849      1.1  christos 
    850      1.1  christos typedef struct acpi_rasf_shared_memory
    851      1.1  christos {
    852      1.1  christos     UINT32                  Signature;
    853      1.1  christos     UINT16                  Command;
    854      1.1  christos     UINT16                  Status;
    855      1.1  christos     UINT16                  Version;
    856      1.1  christos     UINT8                   Capabilities[16];
    857      1.1  christos     UINT8                   SetCapabilities[16];
    858      1.1  christos     UINT16                  NumParameterBlocks;
    859      1.1  christos     UINT32                  SetCapabilitiesStatus;
    860      1.1  christos 
    861      1.1  christos } ACPI_RASF_SHARED_MEMORY;
    862      1.1  christos 
    863      1.1  christos /* RASF Parameter Block Structure Header */
    864      1.1  christos 
    865      1.1  christos typedef struct acpi_rasf_parameter_block
    866      1.1  christos {
    867      1.1  christos     UINT16                  Type;
    868      1.1  christos     UINT16                  Version;
    869      1.1  christos     UINT16                  Length;
    870      1.1  christos 
    871      1.1  christos } ACPI_RASF_PARAMETER_BLOCK;
    872      1.1  christos 
    873      1.1  christos /* RASF Parameter Block Structure for PATROL_SCRUB */
    874      1.1  christos 
    875      1.1  christos typedef struct acpi_rasf_patrol_scrub_parameter
    876      1.1  christos {
    877      1.1  christos     ACPI_RASF_PARAMETER_BLOCK   Header;
    878      1.1  christos     UINT16                      PatrolScrubCommand;
    879      1.1  christos     UINT64                      RequestedAddressRange[2];
    880      1.1  christos     UINT64                      ActualAddressRange[2];
    881      1.1  christos     UINT16                      Flags;
    882      1.1  christos     UINT8                       RequestedSpeed;
    883      1.1  christos 
    884      1.1  christos } ACPI_RASF_PATROL_SCRUB_PARAMETER;
    885      1.1  christos 
    886      1.1  christos /* Masks for Flags and Speed fields above */
    887      1.1  christos 
    888      1.1  christos #define ACPI_RASF_SCRUBBER_RUNNING      1
    889      1.1  christos #define ACPI_RASF_SPEED                 (7<<1)
    890      1.1  christos #define ACPI_RASF_SPEED_SLOW            (0<<1)
    891      1.1  christos #define ACPI_RASF_SPEED_MEDIUM          (4<<1)
    892      1.1  christos #define ACPI_RASF_SPEED_FAST            (7<<1)
    893      1.1  christos 
    894      1.1  christos /* Channel Commands */
    895      1.1  christos 
    896      1.1  christos enum AcpiRasfCommands
    897      1.1  christos {
    898      1.1  christos     ACPI_RASF_EXECUTE_RASF_COMMAND      = 1
    899      1.1  christos };
    900      1.1  christos 
    901      1.1  christos /* Platform RAS Capabilities */
    902      1.1  christos 
    903      1.1  christos enum AcpiRasfCapabiliities
    904      1.1  christos {
    905      1.1  christos     ACPI_HW_PATROL_SCRUB_SUPPORTED      = 0,
    906      1.1  christos     ACPI_SW_PATROL_SCRUB_EXPOSED        = 1
    907      1.1  christos };
    908      1.1  christos 
    909      1.1  christos /* Patrol Scrub Commands */
    910      1.1  christos 
    911      1.1  christos enum AcpiRasfPatrolScrubCommands
    912      1.1  christos {
    913      1.1  christos     ACPI_RASF_GET_PATROL_PARAMETERS     = 1,
    914      1.1  christos     ACPI_RASF_START_PATROL_SCRUBBER     = 2,
    915      1.1  christos     ACPI_RASF_STOP_PATROL_SCRUBBER      = 3
    916      1.1  christos };
    917      1.1  christos 
    918      1.1  christos /* Channel Command flags */
    919      1.1  christos 
    920      1.1  christos #define ACPI_RASF_GENERATE_SCI          (1<<15)
    921      1.1  christos 
    922      1.1  christos /* Status values */
    923      1.1  christos 
    924      1.1  christos enum AcpiRasfStatus
    925      1.1  christos {
    926      1.1  christos     ACPI_RASF_SUCCESS                   = 0,
    927      1.1  christos     ACPI_RASF_NOT_VALID                 = 1,
    928      1.1  christos     ACPI_RASF_NOT_SUPPORTED             = 2,
    929      1.1  christos     ACPI_RASF_BUSY                      = 3,
    930      1.1  christos     ACPI_RASF_FAILED                    = 4,
    931      1.1  christos     ACPI_RASF_ABORTED                   = 5,
    932      1.1  christos     ACPI_RASF_INVALID_DATA              = 6
    933      1.1  christos };
    934      1.1  christos 
    935      1.1  christos /* Status flags */
    936      1.1  christos 
    937      1.1  christos #define ACPI_RASF_COMMAND_COMPLETE      (1)
    938      1.1  christos #define ACPI_RASF_SCI_DOORBELL          (1<<1)
    939      1.1  christos #define ACPI_RASF_ERROR                 (1<<2)
    940      1.1  christos #define ACPI_RASF_STATUS                (0x1F<<3)
    941      1.1  christos 
    942      1.1  christos 
    943      1.1  christos /*******************************************************************************
    944      1.1  christos  *
    945  1.1.1.4  christos  * STAO - Status Override Table (_STA override) - ACPI 6.0
    946  1.1.1.4  christos  *        Version 1
    947      1.1  christos  *
    948  1.1.1.4  christos  * Conforms to "ACPI Specification for Status Override Table"
    949  1.1.1.4  christos  * 6 January 2015
    950      1.1  christos  *
    951      1.1  christos  ******************************************************************************/
    952      1.1  christos 
    953  1.1.1.4  christos typedef struct acpi_table_stao
    954      1.1  christos {
    955      1.1  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    956  1.1.1.4  christos     UINT8                   IgnoreUart;
    957      1.1  christos 
    958  1.1.1.4  christos } ACPI_TABLE_STAO;
    959      1.1  christos 
    960      1.1  christos 
    961  1.1.1.4  christos /*******************************************************************************
    962  1.1.1.4  christos  *
    963  1.1.1.4  christos  * WPBT - Windows Platform Environment Table (ACPI 6.0)
    964  1.1.1.4  christos  *        Version 1
    965  1.1.1.4  christos  *
    966  1.1.1.4  christos  * Conforms to "Windows Platform Binary Table (WPBT)" 29 November 2011
    967  1.1.1.4  christos  *
    968  1.1.1.4  christos  ******************************************************************************/
    969  1.1.1.4  christos 
    970  1.1.1.4  christos typedef struct acpi_table_wpbt
    971      1.1  christos {
    972  1.1.1.4  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    973  1.1.1.4  christos     UINT32                  HandoffSize;
    974  1.1.1.4  christos     UINT64                  HandoffAddress;
    975  1.1.1.4  christos     UINT8                   Layout;
    976  1.1.1.4  christos     UINT8                   Type;
    977  1.1.1.4  christos     UINT16                  ArgumentsLength;
    978  1.1.1.4  christos 
    979  1.1.1.4  christos } ACPI_TABLE_WPBT;
    980  1.1.1.4  christos 
    981  1.1.1.4  christos 
    982  1.1.1.4  christos /*******************************************************************************
    983  1.1.1.4  christos  *
    984  1.1.1.4  christos  * XENV - Xen Environment Table (ACPI 6.0)
    985  1.1.1.4  christos  *        Version 1
    986  1.1.1.4  christos  *
    987  1.1.1.4  christos  * Conforms to "ACPI Specification for Xen Environment Table" 4 January 2015
    988  1.1.1.4  christos  *
    989  1.1.1.4  christos  ******************************************************************************/
    990  1.1.1.4  christos 
    991  1.1.1.4  christos typedef struct acpi_table_xenv
    992  1.1.1.4  christos {
    993  1.1.1.4  christos     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
    994  1.1.1.4  christos     UINT64                  GrantTableAddress;
    995  1.1.1.4  christos     UINT64                  GrantTableSize;
    996  1.1.1.4  christos     UINT32                  EventInterrupt;
    997  1.1.1.4  christos     UINT8                   EventFlags;
    998      1.1  christos 
    999  1.1.1.4  christos } ACPI_TABLE_XENV;
   1000      1.1  christos 
   1001      1.1  christos 
   1002      1.1  christos /* Reset to default packing */
   1003      1.1  christos 
   1004      1.1  christos #pragma pack()
   1005      1.1  christos 
   1006      1.1  christos #endif /* __ACTBL3_H__ */
   1007