Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
0002 /******************************************************************************
0003  *
0004  * Name: actbl3.h - ACPI Table Definitions
0005  *
0006  * Copyright (C) 2000 - 2022, Intel Corp.
0007  *
0008  *****************************************************************************/
0009 
0010 #ifndef __ACTBL3_H__
0011 #define __ACTBL3_H__
0012 
0013 /*******************************************************************************
0014  *
0015  * Additional ACPI Tables
0016  *
0017  * These tables are not consumed directly by the ACPICA subsystem, but are
0018  * included here to support device drivers and the AML disassembler.
0019  *
0020  ******************************************************************************/
0021 
0022 /*
0023  * Values for description table header signatures for tables defined in this
0024  * file. Useful because they make it more difficult to inadvertently type in
0025  * the wrong signature.
0026  */
0027 #define ACPI_SIG_SLIC           "SLIC"  /* Software Licensing Description Table */
0028 #define ACPI_SIG_SLIT           "SLIT"  /* System Locality Distance Information Table */
0029 #define ACPI_SIG_SPCR           "SPCR"  /* Serial Port Console Redirection table */
0030 #define ACPI_SIG_SPMI           "SPMI"  /* Server Platform Management Interface table */
0031 #define ACPI_SIG_SRAT           "SRAT"  /* System Resource Affinity Table */
0032 #define ACPI_SIG_STAO           "STAO"  /* Status Override table */
0033 #define ACPI_SIG_TCPA           "TCPA"  /* Trusted Computing Platform Alliance table */
0034 #define ACPI_SIG_TPM2           "TPM2"  /* Trusted Platform Module 2.0 H/W interface table */
0035 #define ACPI_SIG_UEFI           "UEFI"  /* Uefi Boot Optimization Table */
0036 #define ACPI_SIG_VIOT           "VIOT"  /* Virtual I/O Translation Table */
0037 #define ACPI_SIG_WAET           "WAET"  /* Windows ACPI Emulated devices Table */
0038 #define ACPI_SIG_WDAT           "WDAT"  /* Watchdog Action Table */
0039 #define ACPI_SIG_WDDT           "WDDT"  /* Watchdog Timer Description Table */
0040 #define ACPI_SIG_WDRT           "WDRT"  /* Watchdog Resource Table */
0041 #define ACPI_SIG_WPBT           "WPBT"  /* Windows Platform Binary Table */
0042 #define ACPI_SIG_WSMT           "WSMT"  /* Windows SMM Security Mitigations Table */
0043 #define ACPI_SIG_XENV           "XENV"  /* Xen Environment table */
0044 #define ACPI_SIG_XXXX           "XXXX"  /* Intermediate AML header for ASL/ASL+ converter */
0045 
0046 /*
0047  * All tables must be byte-packed to match the ACPI specification, since
0048  * the tables are provided by the system BIOS.
0049  */
0050 #pragma pack(1)
0051 
0052 /*
0053  * Note: C bitfields are not used for this reason:
0054  *
0055  * "Bitfields are great and easy to read, but unfortunately the C language
0056  * does not specify the layout of bitfields in memory, which means they are
0057  * essentially useless for dealing with packed data in on-disk formats or
0058  * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
0059  * this decision was a design error in C. Ritchie could have picked an order
0060  * and stuck with it." Norman Ramsey.
0061  * See http://stackoverflow.com/a/1053662/41661
0062  */
0063 
0064 /*******************************************************************************
0065  *
0066  * SLIC - Software Licensing Description Table
0067  *
0068  * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
0069  * November 29, 2011. Copyright 2011 Microsoft
0070  *
0071  ******************************************************************************/
0072 
0073 /* Basic SLIC table is only the common ACPI header */
0074 
0075 struct acpi_table_slic {
0076     struct acpi_table_header header;    /* Common ACPI table header */
0077 };
0078 
0079 /*******************************************************************************
0080  *
0081  * SLIT - System Locality Distance Information Table
0082  *        Version 1
0083  *
0084  ******************************************************************************/
0085 
0086 struct acpi_table_slit {
0087     struct acpi_table_header header;    /* Common ACPI table header */
0088     u64 locality_count;
0089     u8 entry[1];        /* Real size = localities^2 */
0090 };
0091 
0092 /*******************************************************************************
0093  *
0094  * SPCR - Serial Port Console Redirection table
0095  *        Version 2
0096  *
0097  * Conforms to "Serial Port Console Redirection Table",
0098  * Version 1.03, August 10, 2015
0099  *
0100  ******************************************************************************/
0101 
0102 struct acpi_table_spcr {
0103     struct acpi_table_header header;    /* Common ACPI table header */
0104     u8 interface_type;  /* 0=full 16550, 1=subset of 16550 */
0105     u8 reserved[3];
0106     struct acpi_generic_address serial_port;
0107     u8 interrupt_type;
0108     u8 pc_interrupt;
0109     u32 interrupt;
0110     u8 baud_rate;
0111     u8 parity;
0112     u8 stop_bits;
0113     u8 flow_control;
0114     u8 terminal_type;
0115     u8 reserved1;
0116     u16 pci_device_id;
0117     u16 pci_vendor_id;
0118     u8 pci_bus;
0119     u8 pci_device;
0120     u8 pci_function;
0121     u32 pci_flags;
0122     u8 pci_segment;
0123     u32 reserved2;
0124 };
0125 
0126 /* Masks for pci_flags field above */
0127 
0128 #define ACPI_SPCR_DO_NOT_DISABLE    (1)
0129 
0130 /* Values for Interface Type: See the definition of the DBG2 table */
0131 
0132 /*******************************************************************************
0133  *
0134  * SPMI - Server Platform Management Interface table
0135  *        Version 5
0136  *
0137  * Conforms to "Intelligent Platform Management Interface Specification
0138  * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with
0139  * June 12, 2009 markup.
0140  *
0141  ******************************************************************************/
0142 
0143 struct acpi_table_spmi {
0144     struct acpi_table_header header;    /* Common ACPI table header */
0145     u8 interface_type;
0146     u8 reserved;        /* Must be 1 */
0147     u16 spec_revision;  /* Version of IPMI */
0148     u8 interrupt_type;
0149     u8 gpe_number;      /* GPE assigned */
0150     u8 reserved1;
0151     u8 pci_device_flag;
0152     u32 interrupt;
0153     struct acpi_generic_address ipmi_register;
0154     u8 pci_segment;
0155     u8 pci_bus;
0156     u8 pci_device;
0157     u8 pci_function;
0158     u8 reserved2;
0159 };
0160 
0161 /* Values for interface_type above */
0162 
0163 enum acpi_spmi_interface_types {
0164     ACPI_SPMI_NOT_USED = 0,
0165     ACPI_SPMI_KEYBOARD = 1,
0166     ACPI_SPMI_SMI = 2,
0167     ACPI_SPMI_BLOCK_TRANSFER = 3,
0168     ACPI_SPMI_SMBUS = 4,
0169     ACPI_SPMI_RESERVED = 5  /* 5 and above are reserved */
0170 };
0171 
0172 /*******************************************************************************
0173  *
0174  * SRAT - System Resource Affinity Table
0175  *        Version 3
0176  *
0177  ******************************************************************************/
0178 
0179 struct acpi_table_srat {
0180     struct acpi_table_header header;    /* Common ACPI table header */
0181     u32 table_revision; /* Must be value '1' */
0182     u64 reserved;       /* Reserved, must be zero */
0183 };
0184 
0185 /* Values for subtable type in struct acpi_subtable_header */
0186 
0187 enum acpi_srat_type {
0188     ACPI_SRAT_TYPE_CPU_AFFINITY = 0,
0189     ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1,
0190     ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2,
0191     ACPI_SRAT_TYPE_GICC_AFFINITY = 3,
0192     ACPI_SRAT_TYPE_GIC_ITS_AFFINITY = 4,    /* ACPI 6.2 */
0193     ACPI_SRAT_TYPE_GENERIC_AFFINITY = 5,    /* ACPI 6.3 */
0194     ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY = 6,   /* ACPI 6.4 */
0195     ACPI_SRAT_TYPE_RESERVED = 7 /* 7 and greater are reserved */
0196 };
0197 
0198 /*
0199  * SRAT Subtables, correspond to Type in struct acpi_subtable_header
0200  */
0201 
0202 /* 0: Processor Local APIC/SAPIC Affinity */
0203 
0204 struct acpi_srat_cpu_affinity {
0205     struct acpi_subtable_header header;
0206     u8 proximity_domain_lo;
0207     u8 apic_id;
0208     u32 flags;
0209     u8 local_sapic_eid;
0210     u8 proximity_domain_hi[3];
0211     u32 clock_domain;
0212 };
0213 
0214 /* Flags */
0215 
0216 #define ACPI_SRAT_CPU_USE_AFFINITY  (1) /* 00: Use affinity structure */
0217 
0218 /* 1: Memory Affinity */
0219 
0220 struct acpi_srat_mem_affinity {
0221     struct acpi_subtable_header header;
0222     u32 proximity_domain;
0223     u16 reserved;       /* Reserved, must be zero */
0224     u64 base_address;
0225     u64 length;
0226     u32 reserved1;
0227     u32 flags;
0228     u64 reserved2;      /* Reserved, must be zero */
0229 };
0230 
0231 /* Flags */
0232 
0233 #define ACPI_SRAT_MEM_ENABLED       (1) /* 00: Use affinity structure */
0234 #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1)  /* 01: Memory region is hot pluggable */
0235 #define ACPI_SRAT_MEM_NON_VOLATILE  (1<<2)  /* 02: Memory region is non-volatile */
0236 
0237 /* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */
0238 
0239 struct acpi_srat_x2apic_cpu_affinity {
0240     struct acpi_subtable_header header;
0241     u16 reserved;       /* Reserved, must be zero */
0242     u32 proximity_domain;
0243     u32 apic_id;
0244     u32 flags;
0245     u32 clock_domain;
0246     u32 reserved2;
0247 };
0248 
0249 /* Flags for struct acpi_srat_cpu_affinity and struct acpi_srat_x2apic_cpu_affinity */
0250 
0251 #define ACPI_SRAT_CPU_ENABLED       (1) /* 00: Use affinity structure */
0252 
0253 /* 3: GICC Affinity (ACPI 5.1) */
0254 
0255 struct acpi_srat_gicc_affinity {
0256     struct acpi_subtable_header header;
0257     u32 proximity_domain;
0258     u32 acpi_processor_uid;
0259     u32 flags;
0260     u32 clock_domain;
0261 };
0262 
0263 /* Flags for struct acpi_srat_gicc_affinity */
0264 
0265 #define ACPI_SRAT_GICC_ENABLED     (1)  /* 00: Use affinity structure */
0266 
0267 /* 4: GCC ITS Affinity (ACPI 6.2) */
0268 
0269 struct acpi_srat_gic_its_affinity {
0270     struct acpi_subtable_header header;
0271     u32 proximity_domain;
0272     u16 reserved;
0273     u32 its_id;
0274 };
0275 
0276 /*
0277  * Common structure for SRAT subtable types:
0278  * 5: ACPI_SRAT_TYPE_GENERIC_AFFINITY
0279  * 6: ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY
0280  */
0281 
0282 struct acpi_srat_generic_affinity {
0283     struct acpi_subtable_header header;
0284     u8 reserved;
0285     u8 device_handle_type;
0286     u32 proximity_domain;
0287     u8 device_handle[16];
0288     u32 flags;
0289     u32 reserved1;
0290 };
0291 
0292 /* Flags for struct acpi_srat_generic_affinity */
0293 
0294 #define ACPI_SRAT_GENERIC_AFFINITY_ENABLED     (1)  /* 00: Use affinity structure */
0295 #define ACPI_SRAT_ARCHITECTURAL_TRANSACTIONS   (1<<1)   /* ACPI 6.4 */
0296 
0297 /*******************************************************************************
0298  *
0299  * STAO - Status Override Table (_STA override) - ACPI 6.0
0300  *        Version 1
0301  *
0302  * Conforms to "ACPI Specification for Status Override Table"
0303  * 6 January 2015
0304  *
0305  ******************************************************************************/
0306 
0307 struct acpi_table_stao {
0308     struct acpi_table_header header;    /* Common ACPI table header */
0309     u8 ignore_uart;
0310 };
0311 
0312 /*******************************************************************************
0313  *
0314  * TCPA - Trusted Computing Platform Alliance table
0315  *        Version 2
0316  *
0317  * TCG Hardware Interface Table for TPM 1.2 Clients and Servers
0318  *
0319  * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
0320  * Version 1.2, Revision 8
0321  * February 27, 2017
0322  *
0323  * NOTE: There are two versions of the table with the same signature --
0324  * the client version and the server version. The common platform_class
0325  * field is used to differentiate the two types of tables.
0326  *
0327  ******************************************************************************/
0328 
0329 struct acpi_table_tcpa_hdr {
0330     struct acpi_table_header header;    /* Common ACPI table header */
0331     u16 platform_class;
0332 };
0333 
0334 /*
0335  * Values for platform_class above.
0336  * This is how the client and server subtables are differentiated
0337  */
0338 #define ACPI_TCPA_CLIENT_TABLE          0
0339 #define ACPI_TCPA_SERVER_TABLE          1
0340 
0341 struct acpi_table_tcpa_client {
0342     u32 minimum_log_length; /* Minimum length for the event log area */
0343     u64 log_address;    /* Address of the event log area */
0344 };
0345 
0346 struct acpi_table_tcpa_server {
0347     u16 reserved;
0348     u64 minimum_log_length; /* Minimum length for the event log area */
0349     u64 log_address;    /* Address of the event log area */
0350     u16 spec_revision;
0351     u8 device_flags;
0352     u8 interrupt_flags;
0353     u8 gpe_number;
0354     u8 reserved2[3];
0355     u32 global_interrupt;
0356     struct acpi_generic_address address;
0357     u32 reserved3;
0358     struct acpi_generic_address config_address;
0359     u8 group;
0360     u8 bus;         /* PCI Bus/Segment/Function numbers */
0361     u8 device;
0362     u8 function;
0363 };
0364 
0365 /* Values for device_flags above */
0366 
0367 #define ACPI_TCPA_PCI_DEVICE            (1)
0368 #define ACPI_TCPA_BUS_PNP               (1<<1)
0369 #define ACPI_TCPA_ADDRESS_VALID         (1<<2)
0370 
0371 /* Values for interrupt_flags above */
0372 
0373 #define ACPI_TCPA_INTERRUPT_MODE        (1)
0374 #define ACPI_TCPA_INTERRUPT_POLARITY    (1<<1)
0375 #define ACPI_TCPA_SCI_VIA_GPE           (1<<2)
0376 #define ACPI_TCPA_GLOBAL_INTERRUPT      (1<<3)
0377 
0378 /*******************************************************************************
0379  *
0380  * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
0381  *        Version 4
0382  *
0383  * TCG Hardware Interface Table for TPM 2.0 Clients and Servers
0384  *
0385  * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
0386  * Version 1.2, Revision 8
0387  * February 27, 2017
0388  *
0389  ******************************************************************************/
0390 
0391 /* Revision 3 */
0392 
0393 struct acpi_table_tpm23 {
0394     struct acpi_table_header header;    /* Common ACPI table header */
0395     u32 reserved;
0396     u64 control_address;
0397     u32 start_method;
0398 };
0399 
0400 /* Value for start_method above */
0401 
0402 #define ACPI_TPM23_ACPI_START_METHOD                 2
0403 
0404 /*
0405  * Optional trailer for revision 3. If start method is 2, there is a 4 byte
0406  * reserved area of all zeros.
0407  */
0408 struct acpi_tmp23_trailer {
0409     u32 reserved;
0410 };
0411 
0412 /* Revision 4 */
0413 
0414 struct acpi_table_tpm2 {
0415     struct acpi_table_header header;    /* Common ACPI table header */
0416     u16 platform_class;
0417     u16 reserved;
0418     u64 control_address;
0419     u32 start_method;
0420 
0421     /* Platform-specific data follows */
0422 };
0423 
0424 /* Optional trailer for revision 4 holding platform-specific data */
0425 struct acpi_tpm2_phy {
0426     u8  start_method_specific[12];
0427     u32 log_area_minimum_length;
0428     u64 log_area_start_address;
0429 };
0430 
0431 /* Values for start_method above */
0432 
0433 #define ACPI_TPM2_NOT_ALLOWED                       0
0434 #define ACPI_TPM2_RESERVED1                         1
0435 #define ACPI_TPM2_START_METHOD                      2
0436 #define ACPI_TPM2_RESERVED3                         3
0437 #define ACPI_TPM2_RESERVED4                         4
0438 #define ACPI_TPM2_RESERVED5                         5
0439 #define ACPI_TPM2_MEMORY_MAPPED                     6
0440 #define ACPI_TPM2_COMMAND_BUFFER                    7
0441 #define ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD  8
0442 #define ACPI_TPM2_RESERVED9                         9
0443 #define ACPI_TPM2_RESERVED10                        10
0444 #define ACPI_TPM2_COMMAND_BUFFER_WITH_ARM_SMC       11  /* V1.2 Rev 8 */
0445 #define ACPI_TPM2_RESERVED                          12
0446 
0447 /* Optional trailer appears after any start_method subtables */
0448 
0449 struct acpi_tpm2_trailer {
0450     u8 method_parameters[12];
0451     u32 minimum_log_length; /* Minimum length for the event log area */
0452     u64 log_address;    /* Address of the event log area */
0453 };
0454 
0455 /*
0456  * Subtables (start_method-specific)
0457  */
0458 
0459 /* 11: Start Method for ARM SMC (V1.2 Rev 8) */
0460 
0461 struct acpi_tpm2_arm_smc {
0462     u32 global_interrupt;
0463     u8 interrupt_flags;
0464     u8 operation_flags;
0465     u16 reserved;
0466     u32 function_id;
0467 };
0468 
0469 /* Values for interrupt_flags above */
0470 
0471 #define ACPI_TPM2_INTERRUPT_SUPPORT     (1)
0472 
0473 /* Values for operation_flags above */
0474 
0475 #define ACPI_TPM2_IDLE_SUPPORT          (1)
0476 
0477 /*******************************************************************************
0478  *
0479  * UEFI - UEFI Boot optimization Table
0480  *        Version 1
0481  *
0482  * Conforms to "Unified Extensible Firmware Interface Specification",
0483  * Version 2.3, May 8, 2009
0484  *
0485  ******************************************************************************/
0486 
0487 struct acpi_table_uefi {
0488     struct acpi_table_header header;    /* Common ACPI table header */
0489     u8 identifier[16];  /* UUID identifier */
0490     u16 data_offset;    /* Offset of remaining data in table */
0491 };
0492 
0493 /*******************************************************************************
0494  *
0495  * VIOT - Virtual I/O Translation Table
0496  *        Version 1
0497  *
0498  ******************************************************************************/
0499 
0500 struct acpi_table_viot {
0501     struct acpi_table_header header;    /* Common ACPI table header */
0502     u16 node_count;
0503     u16 node_offset;
0504     u8 reserved[8];
0505 };
0506 
0507 /* VIOT subtable header */
0508 
0509 struct acpi_viot_header {
0510     u8 type;
0511     u8 reserved;
0512     u16 length;
0513 };
0514 
0515 /* Values for Type field above */
0516 
0517 enum acpi_viot_node_type {
0518     ACPI_VIOT_NODE_PCI_RANGE = 0x01,
0519     ACPI_VIOT_NODE_MMIO = 0x02,
0520     ACPI_VIOT_NODE_VIRTIO_IOMMU_PCI = 0x03,
0521     ACPI_VIOT_NODE_VIRTIO_IOMMU_MMIO = 0x04,
0522     ACPI_VIOT_RESERVED = 0x05
0523 };
0524 
0525 /* VIOT subtables */
0526 
0527 struct acpi_viot_pci_range {
0528     struct acpi_viot_header header;
0529     u32 endpoint_start;
0530     u16 segment_start;
0531     u16 segment_end;
0532     u16 bdf_start;
0533     u16 bdf_end;
0534     u16 output_node;
0535     u8 reserved[6];
0536 };
0537 
0538 struct acpi_viot_mmio {
0539     struct acpi_viot_header header;
0540     u32 endpoint;
0541     u64 base_address;
0542     u16 output_node;
0543     u8 reserved[6];
0544 };
0545 
0546 struct acpi_viot_virtio_iommu_pci {
0547     struct acpi_viot_header header;
0548     u16 segment;
0549     u16 bdf;
0550     u8 reserved[8];
0551 };
0552 
0553 struct acpi_viot_virtio_iommu_mmio {
0554     struct acpi_viot_header header;
0555     u8 reserved[4];
0556     u64 base_address;
0557 };
0558 
0559 /*******************************************************************************
0560  *
0561  * WAET - Windows ACPI Emulated devices Table
0562  *        Version 1
0563  *
0564  * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009
0565  *
0566  ******************************************************************************/
0567 
0568 struct acpi_table_waet {
0569     struct acpi_table_header header;    /* Common ACPI table header */
0570     u32 flags;
0571 };
0572 
0573 /* Masks for Flags field above */
0574 
0575 #define ACPI_WAET_RTC_NO_ACK        (1) /* RTC requires no int acknowledge */
0576 #define ACPI_WAET_TIMER_ONE_READ    (1<<1)  /* PM timer requires only one read */
0577 
0578 /*******************************************************************************
0579  *
0580  * WDAT - Watchdog Action Table
0581  *        Version 1
0582  *
0583  * Conforms to "Hardware Watchdog Timers Design Specification",
0584  * Copyright 2006 Microsoft Corporation.
0585  *
0586  ******************************************************************************/
0587 
0588 struct acpi_table_wdat {
0589     struct acpi_table_header header;    /* Common ACPI table header */
0590     u32 header_length;  /* Watchdog Header Length */
0591     u16 pci_segment;    /* PCI Segment number */
0592     u8 pci_bus;     /* PCI Bus number */
0593     u8 pci_device;      /* PCI Device number */
0594     u8 pci_function;    /* PCI Function number */
0595     u8 reserved[3];
0596     u32 timer_period;   /* Period of one timer count (msec) */
0597     u32 max_count;      /* Maximum counter value supported */
0598     u32 min_count;      /* Minimum counter value */
0599     u8 flags;
0600     u8 reserved2[3];
0601     u32 entries;        /* Number of watchdog entries that follow */
0602 };
0603 
0604 /* Masks for Flags field above */
0605 
0606 #define ACPI_WDAT_ENABLED           (1)
0607 #define ACPI_WDAT_STOPPED           0x80
0608 
0609 /* WDAT Instruction Entries (actions) */
0610 
0611 struct acpi_wdat_entry {
0612     u8 action;
0613     u8 instruction;
0614     u16 reserved;
0615     struct acpi_generic_address register_region;
0616     u32 value;      /* Value used with Read/Write register */
0617     u32 mask;       /* Bitmask required for this register instruction */
0618 };
0619 
0620 /* Values for Action field above */
0621 
0622 enum acpi_wdat_actions {
0623     ACPI_WDAT_RESET = 1,
0624     ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
0625     ACPI_WDAT_GET_COUNTDOWN = 5,
0626     ACPI_WDAT_SET_COUNTDOWN = 6,
0627     ACPI_WDAT_GET_RUNNING_STATE = 8,
0628     ACPI_WDAT_SET_RUNNING_STATE = 9,
0629     ACPI_WDAT_GET_STOPPED_STATE = 10,
0630     ACPI_WDAT_SET_STOPPED_STATE = 11,
0631     ACPI_WDAT_GET_REBOOT = 16,
0632     ACPI_WDAT_SET_REBOOT = 17,
0633     ACPI_WDAT_GET_SHUTDOWN = 18,
0634     ACPI_WDAT_SET_SHUTDOWN = 19,
0635     ACPI_WDAT_GET_STATUS = 32,
0636     ACPI_WDAT_SET_STATUS = 33,
0637     ACPI_WDAT_ACTION_RESERVED = 34  /* 34 and greater are reserved */
0638 };
0639 
0640 /* Values for Instruction field above */
0641 
0642 enum acpi_wdat_instructions {
0643     ACPI_WDAT_READ_VALUE = 0,
0644     ACPI_WDAT_READ_COUNTDOWN = 1,
0645     ACPI_WDAT_WRITE_VALUE = 2,
0646     ACPI_WDAT_WRITE_COUNTDOWN = 3,
0647     ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */
0648     ACPI_WDAT_PRESERVE_REGISTER = 0x80  /* Except for this value */
0649 };
0650 
0651 /*******************************************************************************
0652  *
0653  * WDDT - Watchdog Descriptor Table
0654  *        Version 1
0655  *
0656  * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",
0657  * Version 001, September 2002
0658  *
0659  ******************************************************************************/
0660 
0661 struct acpi_table_wddt {
0662     struct acpi_table_header header;    /* Common ACPI table header */
0663     u16 spec_version;
0664     u16 table_version;
0665     u16 pci_vendor_id;
0666     struct acpi_generic_address address;
0667     u16 max_count;      /* Maximum counter value supported */
0668     u16 min_count;      /* Minimum counter value supported */
0669     u16 period;
0670     u16 status;
0671     u16 capability;
0672 };
0673 
0674 /* Flags for Status field above */
0675 
0676 #define ACPI_WDDT_AVAILABLE     (1)
0677 #define ACPI_WDDT_ACTIVE        (1<<1)
0678 #define ACPI_WDDT_TCO_OS_OWNED  (1<<2)
0679 #define ACPI_WDDT_USER_RESET    (1<<11)
0680 #define ACPI_WDDT_WDT_RESET     (1<<12)
0681 #define ACPI_WDDT_POWER_FAIL    (1<<13)
0682 #define ACPI_WDDT_UNKNOWN_RESET (1<<14)
0683 
0684 /* Flags for Capability field above */
0685 
0686 #define ACPI_WDDT_AUTO_RESET    (1)
0687 #define ACPI_WDDT_ALERT_SUPPORT (1<<1)
0688 
0689 /*******************************************************************************
0690  *
0691  * WDRT - Watchdog Resource Table
0692  *        Version 1
0693  *
0694  * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",
0695  * Version 1.01, August 28, 2006
0696  *
0697  ******************************************************************************/
0698 
0699 struct acpi_table_wdrt {
0700     struct acpi_table_header header;    /* Common ACPI table header */
0701     struct acpi_generic_address control_register;
0702     struct acpi_generic_address count_register;
0703     u16 pci_device_id;
0704     u16 pci_vendor_id;
0705     u8 pci_bus;     /* PCI Bus number */
0706     u8 pci_device;      /* PCI Device number */
0707     u8 pci_function;    /* PCI Function number */
0708     u8 pci_segment;     /* PCI Segment number */
0709     u16 max_count;      /* Maximum counter value supported */
0710     u8 units;
0711 };
0712 
0713 /*******************************************************************************
0714  *
0715  * WPBT - Windows Platform Environment Table (ACPI 6.0)
0716  *        Version 1
0717  *
0718  * Conforms to "Windows Platform Binary Table (WPBT)" 29 November 2011
0719  *
0720  ******************************************************************************/
0721 
0722 struct acpi_table_wpbt {
0723     struct acpi_table_header header;    /* Common ACPI table header */
0724     u32 handoff_size;
0725     u64 handoff_address;
0726     u8 layout;
0727     u8 type;
0728     u16 arguments_length;
0729 };
0730 
0731 struct acpi_wpbt_unicode {
0732     u16 *unicode_string;
0733 };
0734 
0735 /*******************************************************************************
0736  *
0737  * WSMT - Windows SMM Security Mitigations Table
0738  *        Version 1
0739  *
0740  * Conforms to "Windows SMM Security Mitigations Table",
0741  * Version 1.0, April 18, 2016
0742  *
0743  ******************************************************************************/
0744 
0745 struct acpi_table_wsmt {
0746     struct acpi_table_header header;    /* Common ACPI table header */
0747     u32 protection_flags;
0748 };
0749 
0750 /* Flags for protection_flags field above */
0751 
0752 #define ACPI_WSMT_FIXED_COMM_BUFFERS                (1)
0753 #define ACPI_WSMT_COMM_BUFFER_NESTED_PTR_PROTECTION (2)
0754 #define ACPI_WSMT_SYSTEM_RESOURCE_PROTECTION        (4)
0755 
0756 /*******************************************************************************
0757  *
0758  * XENV - Xen Environment Table (ACPI 6.0)
0759  *        Version 1
0760  *
0761  * Conforms to "ACPI Specification for Xen Environment Table" 4 January 2015
0762  *
0763  ******************************************************************************/
0764 
0765 struct acpi_table_xenv {
0766     struct acpi_table_header header;    /* Common ACPI table header */
0767     u64 grant_table_address;
0768     u64 grant_table_size;
0769     u32 event_interrupt;
0770     u8 event_flags;
0771 };
0772 
0773 /* Reset to default packing */
0774 
0775 #pragma pack()
0776 
0777 #endif              /* __ACTBL3_H__ */