blob: c098694ad597df5ace8e811da999a67a6b371d57 [file] [log] [blame]
Bob Moorec5bd6532011-11-16 11:04:00 +08001/******************************************************************************
2 *
3 * Name: actbl3.h - ACPI Table Definitions
4 *
5 *****************************************************************************/
6
7/*
Bob Mooreda6f8322018-01-04 10:06:38 -08008 * Copyright (C) 2000 - 2018, Intel Corp.
Bob Moorec5bd6532011-11-16 11:04:00 +08009 * 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 __ACTBL3_H__
45#define __ACTBL3_H__
46
47/*******************************************************************************
48 *
Erik Schmausse62f8222018-02-15 13:09:26 -080049 * Additional ACPI Tables
Bob Moorec5bd6532011-11-16 11:04:00 +080050 *
51 * These tables are not consumed directly by the ACPICA subsystem, but are
52 * included here to support device drivers and the AML disassembler.
53 *
Bob Moorec5bd6532011-11-16 11:04:00 +080054 ******************************************************************************/
55
56/*
57 * Values for description table header signatures for tables defined in this
58 * file. Useful because they make it more difficult to inadvertently type in
59 * the wrong signature.
60 */
Erik Schmausse62f8222018-02-15 13:09:26 -080061#define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */
62#define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */
63#define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
64#define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */
65#define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */
Bob Moore37e12652015-05-21 10:30:11 +080066#define ACPI_SIG_STAO "STAO" /* Status Override table */
Erik Schmausse62f8222018-02-15 13:09:26 -080067#define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */
68#define ACPI_SIG_TPM2 "TPM2" /* Trusted Platform Module 2.0 H/W interface table */
69#define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */
70#define ACPI_SIG_VRTC "VRTC" /* Virtual Real Time Clock Table */
71#define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */
72#define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */
73#define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */
74#define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */
Bob Moore68edb032015-05-21 10:30:44 +080075#define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */
Erik Schmausse62f8222018-02-15 13:09:26 -080076#define ACPI_SIG_WSMT "WSMT" /* Windows SMM Security Migrations Table */
Bob Mooreb6944ef2015-05-21 10:30:24 +080077#define ACPI_SIG_XENV "XENV" /* Xen Environment table */
Erik Schmausse62f8222018-02-15 13:09:26 -080078#define ACPI_SIG_XXXX "XXXX" /* Intermediate AML header for ASL/ASL+ converter */
Bob Moorec5bd6532011-11-16 11:04:00 +080079
80/*
81 * All tables must be byte-packed to match the ACPI specification, since
82 * the tables are provided by the system BIOS.
83 */
84#pragma pack(1)
85
86/*
Bob Moorebe030a52012-08-17 13:07:54 +080087 * Note: C bitfields are not used for this reason:
88 *
89 * "Bitfields are great and easy to read, but unfortunately the C language
90 * does not specify the layout of bitfields in memory, which means they are
91 * essentially useless for dealing with packed data in on-disk formats or
92 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
93 * this decision was a design error in C. Ritchie could have picked an order
94 * and stuck with it." Norman Ramsey.
95 * See http://stackoverflow.com/a/1053662/41661
Bob Moorec5bd6532011-11-16 11:04:00 +080096 */
97
98/*******************************************************************************
99 *
Erik Schmausse62f8222018-02-15 13:09:26 -0800100 * SLIC - Software Licensing Description Table
101 *
102 * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
103 * November 29, 2011. Copyright 2011 Microsoft
104 *
105 ******************************************************************************/
106
107/* Basic SLIC table is only the common ACPI header */
108
109struct acpi_table_slic {
110 struct acpi_table_header header; /* Common ACPI table header */
111};
112
113/*******************************************************************************
114 *
115 * SLIT - System Locality Distance Information Table
Bob Moorec5bd6532011-11-16 11:04:00 +0800116 * Version 1
117 *
118 ******************************************************************************/
119
Erik Schmausse62f8222018-02-15 13:09:26 -0800120struct acpi_table_slit {
Bob Moorec5bd6532011-11-16 11:04:00 +0800121 struct acpi_table_header header; /* Common ACPI table header */
Erik Schmausse62f8222018-02-15 13:09:26 -0800122 u64 locality_count;
123 u8 entry[1]; /* Real size = localities^2 */
Bob Moorec5bd6532011-11-16 11:04:00 +0800124};
125
126/*******************************************************************************
127 *
Erik Schmausse62f8222018-02-15 13:09:26 -0800128 * SPCR - Serial Port Console Redirection table
Tomasz Nowicki54ea4242014-07-30 12:21:58 +0800129 * Version 2
Bob Moorec5bd6532011-11-16 11:04:00 +0800130 *
Erik Schmausse62f8222018-02-15 13:09:26 -0800131 * Conforms to "Serial Port Console Redirection Table",
132 * Version 1.03, August 10, 2015
133 *
Bob Moorec5bd6532011-11-16 11:04:00 +0800134 ******************************************************************************/
135
Erik Schmausse62f8222018-02-15 13:09:26 -0800136struct acpi_table_spcr {
Bob Moorec5bd6532011-11-16 11:04:00 +0800137 struct acpi_table_header header; /* Common ACPI table header */
Erik Schmausse62f8222018-02-15 13:09:26 -0800138 u8 interface_type; /* 0=full 16550, 1=subset of 16550 */
Tomasz Nowicki54ea4242014-07-30 12:21:58 +0800139 u8 reserved[3];
Erik Schmausse62f8222018-02-15 13:09:26 -0800140 struct acpi_generic_address serial_port;
141 u8 interrupt_type;
142 u8 pc_interrupt;
143 u32 interrupt;
144 u8 baud_rate;
145 u8 parity;
146 u8 stop_bits;
147 u8 flow_control;
148 u8 terminal_type;
Bob Moorec5bd6532011-11-16 11:04:00 +0800149 u8 reserved1;
Erik Schmausse62f8222018-02-15 13:09:26 -0800150 u16 pci_device_id;
151 u16 pci_vendor_id;
152 u8 pci_bus;
153 u8 pci_device;
154 u8 pci_function;
155 u32 pci_flags;
156 u8 pci_segment;
157 u32 reserved2;
Bob Moorec5bd6532011-11-16 11:04:00 +0800158};
159
Erik Schmausse62f8222018-02-15 13:09:26 -0800160/* Masks for pci_flags field above */
Bob Moorec5bd6532011-11-16 11:04:00 +0800161
Erik Schmausse62f8222018-02-15 13:09:26 -0800162#define ACPI_SPCR_DO_NOT_DISABLE (1)
Bob Moorec5bd6532011-11-16 11:04:00 +0800163
Erik Schmausse62f8222018-02-15 13:09:26 -0800164/* Values for Interface Type: See the definition of the DBG2 table */
Bob Moorec5bd6532011-11-16 11:04:00 +0800165
Erik Schmausse62f8222018-02-15 13:09:26 -0800166/*******************************************************************************
167 *
168 * SPMI - Server Platform Management Interface table
169 * Version 5
170 *
171 * Conforms to "Intelligent Platform Management Interface Specification
172 * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with
173 * June 12, 2009 markup.
174 *
175 ******************************************************************************/
176
177struct acpi_table_spmi {
178 struct acpi_table_header header; /* Common ACPI table header */
179 u8 interface_type;
180 u8 reserved; /* Must be 1 */
181 u16 spec_revision; /* Version of IPMI */
182 u8 interrupt_type;
183 u8 gpe_number; /* GPE assigned */
184 u8 reserved1;
185 u8 pci_device_flag;
186 u32 interrupt;
187 struct acpi_generic_address ipmi_register;
188 u8 pci_segment;
189 u8 pci_bus;
190 u8 pci_device;
191 u8 pci_function;
192 u8 reserved2;
Bob Moorec5bd6532011-11-16 11:04:00 +0800193};
194
Erik Schmausse62f8222018-02-15 13:09:26 -0800195/* Values for interface_type above */
Bob Moorec5bd6532011-11-16 11:04:00 +0800196
Erik Schmausse62f8222018-02-15 13:09:26 -0800197enum acpi_spmi_interface_types {
198 ACPI_SPMI_NOT_USED = 0,
199 ACPI_SPMI_KEYBOARD = 1,
200 ACPI_SPMI_SMI = 2,
201 ACPI_SPMI_BLOCK_TRANSFER = 3,
202 ACPI_SPMI_SMBUS = 4,
203 ACPI_SPMI_RESERVED = 5 /* 5 and above are reserved */
Bob Moorec5bd6532011-11-16 11:04:00 +0800204};
205
206/*******************************************************************************
207 *
Erik Schmausse62f8222018-02-15 13:09:26 -0800208 * SRAT - System Resource Affinity Table
209 * Version 3
Bob Moorec5bd6532011-11-16 11:04:00 +0800210 *
211 ******************************************************************************/
212
Erik Schmausse62f8222018-02-15 13:09:26 -0800213struct acpi_table_srat {
Bob Moorec5bd6532011-11-16 11:04:00 +0800214 struct acpi_table_header header; /* Common ACPI table header */
Erik Schmausse62f8222018-02-15 13:09:26 -0800215 u32 table_revision; /* Must be value '1' */
216 u64 reserved; /* Reserved, must be zero */
Bob Moorec5bd6532011-11-16 11:04:00 +0800217};
218
Bob Mooref0d73662014-01-08 13:43:57 +0800219/* Values for subtable type in struct acpi_subtable_header */
220
Erik Schmausse62f8222018-02-15 13:09:26 -0800221enum acpi_srat_type {
222 ACPI_SRAT_TYPE_CPU_AFFINITY = 0,
223 ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1,
224 ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2,
225 ACPI_SRAT_TYPE_GICC_AFFINITY = 3,
226 ACPI_SRAT_TYPE_GIC_ITS_AFFINITY = 4, /* ACPI 6.2 */
227 ACPI_SRAT_TYPE_RESERVED = 5 /* 5 and greater are reserved */
Bob Mooref0d73662014-01-08 13:43:57 +0800228};
229
Bob Moorec5bd6532011-11-16 11:04:00 +0800230/*
Erik Schmausse62f8222018-02-15 13:09:26 -0800231 * SRAT Subtables, correspond to Type in struct acpi_subtable_header
Bob Moorec5bd6532011-11-16 11:04:00 +0800232 */
233
Erik Schmausse62f8222018-02-15 13:09:26 -0800234/* 0: Processor Local APIC/SAPIC Affinity */
Bob Moorec5bd6532011-11-16 11:04:00 +0800235
Erik Schmausse62f8222018-02-15 13:09:26 -0800236struct acpi_srat_cpu_affinity {
Bob Moorec5bd6532011-11-16 11:04:00 +0800237 struct acpi_subtable_header header;
Erik Schmausse62f8222018-02-15 13:09:26 -0800238 u8 proximity_domain_lo;
239 u8 apic_id;
David E. Boxc7a1dfb2017-06-05 16:39:08 +0800240 u32 flags;
Erik Schmausse62f8222018-02-15 13:09:26 -0800241 u8 local_sapic_eid;
242 u8 proximity_domain_hi[3];
243 u32 clock_domain;
David E. Boxc7a1dfb2017-06-05 16:39:08 +0800244};
245
Erik Schmausse62f8222018-02-15 13:09:26 -0800246/* Flags */
Bob Moorec5bd6532011-11-16 11:04:00 +0800247
Erik Schmausse62f8222018-02-15 13:09:26 -0800248#define ACPI_SRAT_CPU_USE_AFFINITY (1) /* 00: Use affinity structure */
Bob Moorec5bd6532011-11-16 11:04:00 +0800249
Erik Schmausse62f8222018-02-15 13:09:26 -0800250/* 1: Memory Affinity */
Bob Moorec5bd6532011-11-16 11:04:00 +0800251
Erik Schmausse62f8222018-02-15 13:09:26 -0800252struct acpi_srat_mem_affinity {
253 struct acpi_subtable_header header;
Bob Moorec5bd6532011-11-16 11:04:00 +0800254 u32 proximity_domain;
Erik Schmausse62f8222018-02-15 13:09:26 -0800255 u16 reserved; /* Reserved, must be zero */
256 u64 base_address;
257 u64 length;
258 u32 reserved1;
259 u32 flags;
260 u64 reserved2; /* Reserved, must be zero */
Bob Moorec5bd6532011-11-16 11:04:00 +0800261};
262
Erik Schmausse62f8222018-02-15 13:09:26 -0800263/* Flags */
Bob Moorec5bd6532011-11-16 11:04:00 +0800264
Erik Schmausse62f8222018-02-15 13:09:26 -0800265#define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */
266#define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */
267#define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */
268
269/* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */
270
271struct acpi_srat_x2apic_cpu_affinity {
272 struct acpi_subtable_header header;
273 u16 reserved; /* Reserved, must be zero */
274 u32 proximity_domain;
275 u32 apic_id;
276 u32 flags;
277 u32 clock_domain;
278 u32 reserved2;
279};
280
281/* Flags for struct acpi_srat_cpu_affinity and struct acpi_srat_x2apic_cpu_affinity */
282
283#define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
284
285/* 3: GICC Affinity (ACPI 5.1) */
286
287struct acpi_srat_gicc_affinity {
288 struct acpi_subtable_header header;
289 u32 proximity_domain;
290 u32 acpi_processor_uid;
291 u32 flags;
292 u32 clock_domain;
293};
294
295/* Flags for struct acpi_srat_gicc_affinity */
296
297#define ACPI_SRAT_GICC_ENABLED (1) /* 00: Use affinity structure */
298
299/* 4: GCC ITS Affinity (ACPI 6.2) */
300
301struct acpi_srat_gic_its_affinity {
302 struct acpi_subtable_header header;
303 u32 proximity_domain;
Bob Moorec5bd6532011-11-16 11:04:00 +0800304 u16 reserved;
Erik Schmausse62f8222018-02-15 13:09:26 -0800305 u32 its_id;
Bob Moorec5bd6532011-11-16 11:04:00 +0800306};
307
308/*******************************************************************************
309 *
Bob Moore37e12652015-05-21 10:30:11 +0800310 * STAO - Status Override Table (_STA override) - ACPI 6.0
311 * Version 1
312 *
313 * Conforms to "ACPI Specification for Status Override Table"
314 * 6 January 2015
315 *
316 ******************************************************************************/
317
318struct acpi_table_stao {
319 struct acpi_table_header header; /* Common ACPI table header */
320 u8 ignore_uart;
321};
322
323/*******************************************************************************
324 *
Erik Schmausse62f8222018-02-15 13:09:26 -0800325 * TCPA - Trusted Computing Platform Alliance table
326 * Version 2
327 *
328 * TCG Hardware Interface Table for TPM 1.2 Clients and Servers
329 *
330 * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
331 * Version 1.2, Revision 8
332 * February 27, 2017
333 *
334 * NOTE: There are two versions of the table with the same signature --
335 * the client version and the server version. The common platform_class
336 * field is used to differentiate the two types of tables.
337 *
338 ******************************************************************************/
339
340struct acpi_table_tcpa_hdr {
341 struct acpi_table_header header; /* Common ACPI table header */
342 u16 platform_class;
343};
344
345/*
346 * Values for platform_class above.
347 * This is how the client and server subtables are differentiated
348 */
349#define ACPI_TCPA_CLIENT_TABLE 0
350#define ACPI_TCPA_SERVER_TABLE 1
351
352struct acpi_table_tcpa_client {
353 u32 minimum_log_length; /* Minimum length for the event log area */
354 u64 log_address; /* Address of the event log area */
355};
356
357struct acpi_table_tcpa_server {
358 u16 reserved;
359 u64 minimum_log_length; /* Minimum length for the event log area */
360 u64 log_address; /* Address of the event log area */
361 u16 spec_revision;
362 u8 device_flags;
363 u8 interrupt_flags;
364 u8 gpe_number;
365 u8 reserved2[3];
366 u32 global_interrupt;
367 struct acpi_generic_address address;
368 u32 reserved3;
369 struct acpi_generic_address config_address;
370 u8 group;
371 u8 bus; /* PCI Bus/Segment/Function numbers */
372 u8 device;
373 u8 function;
374};
375
376/* Values for device_flags above */
377
378#define ACPI_TCPA_PCI_DEVICE (1)
379#define ACPI_TCPA_BUS_PNP (1<<1)
380#define ACPI_TCPA_ADDRESS_VALID (1<<2)
381
382/* Values for interrupt_flags above */
383
384#define ACPI_TCPA_INTERRUPT_MODE (1)
385#define ACPI_TCPA_INTERRUPT_POLARITY (1<<1)
386#define ACPI_TCPA_SCI_VIA_GPE (1<<2)
387#define ACPI_TCPA_GLOBAL_INTERRUPT (1<<3)
388
389/*******************************************************************************
390 *
391 * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
392 * Version 4
393 *
394 * TCG Hardware Interface Table for TPM 2.0 Clients and Servers
395 *
396 * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
397 * Version 1.2, Revision 8
398 * February 27, 2017
399 *
400 ******************************************************************************/
401
402struct acpi_table_tpm2 {
403 struct acpi_table_header header; /* Common ACPI table header */
404 u16 platform_class;
405 u16 reserved;
406 u64 control_address;
407 u32 start_method;
408
409 /* Platform-specific data follows */
410};
411
412/* Values for start_method above */
413
414#define ACPI_TPM2_NOT_ALLOWED 0
415#define ACPI_TPM2_RESERVED1 1
416#define ACPI_TPM2_START_METHOD 2
417#define ACPI_TPM2_RESERVED3 3
418#define ACPI_TPM2_RESERVED4 4
419#define ACPI_TPM2_RESERVED5 5
420#define ACPI_TPM2_MEMORY_MAPPED 6
421#define ACPI_TPM2_COMMAND_BUFFER 7
422#define ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD 8
423#define ACPI_TPM2_RESERVED9 9
424#define ACPI_TPM2_RESERVED10 10
425#define ACPI_TPM2_COMMAND_BUFFER_WITH_ARM_SMC 11 /* V1.2 Rev 8 */
426#define ACPI_TPM2_RESERVED 12
427
428/* Optional trailer appears after any start_method subtables */
429
430struct acpi_tpm2_trailer {
431 u8 method_parameters[12];
432 u32 minimum_log_length; /* Minimum length for the event log area */
433 u64 log_address; /* Address of the event log area */
434};
435
436/*
437 * Subtables (start_method-specific)
438 */
439
440/* 11: Start Method for ARM SMC (V1.2 Rev 8) */
441
442struct acpi_tpm2_arm_smc {
443 u32 global_interrupt;
444 u8 interrupt_flags;
445 u8 operation_flags;
446 u16 reserved;
447 u32 function_id;
448};
449
450/* Values for interrupt_flags above */
451
452#define ACPI_TPM2_INTERRUPT_SUPPORT (1)
453
454/* Values for operation_flags above */
455
456#define ACPI_TPM2_IDLE_SUPPORT (1)
457
458/*******************************************************************************
459 *
460 * UEFI - UEFI Boot optimization Table
461 * Version 1
462 *
463 * Conforms to "Unified Extensible Firmware Interface Specification",
464 * Version 2.3, May 8, 2009
465 *
466 ******************************************************************************/
467
468struct acpi_table_uefi {
469 struct acpi_table_header header; /* Common ACPI table header */
470 u8 identifier[16]; /* UUID identifier */
471 u16 data_offset; /* Offset of remaining data in table */
472};
473
474/*******************************************************************************
475 *
476 * VRTC - Virtual Real Time Clock Table
477 * Version 1
478 *
479 * Conforms to "Simple Firmware Interface Specification",
480 * Draft 0.8.2, Oct 19, 2010
481 * NOTE: The ACPI VRTC is equivalent to The SFI MRTC table.
482 *
483 ******************************************************************************/
484
485struct acpi_table_vrtc {
486 struct acpi_table_header header; /* Common ACPI table header */
487};
488
489/* VRTC entry */
490
491struct acpi_vrtc_entry {
492 struct acpi_generic_address physical_address;
493 u32 irq;
494};
495
496/*******************************************************************************
497 *
498 * WAET - Windows ACPI Emulated devices Table
499 * Version 1
500 *
501 * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009
502 *
503 ******************************************************************************/
504
505struct acpi_table_waet {
506 struct acpi_table_header header; /* Common ACPI table header */
507 u32 flags;
508};
509
510/* Masks for Flags field above */
511
512#define ACPI_WAET_RTC_NO_ACK (1) /* RTC requires no int acknowledge */
513#define ACPI_WAET_TIMER_ONE_READ (1<<1) /* PM timer requires only one read */
514
515/*******************************************************************************
516 *
517 * WDAT - Watchdog Action Table
518 * Version 1
519 *
520 * Conforms to "Hardware Watchdog Timers Design Specification",
521 * Copyright 2006 Microsoft Corporation.
522 *
523 ******************************************************************************/
524
525struct acpi_table_wdat {
526 struct acpi_table_header header; /* Common ACPI table header */
527 u32 header_length; /* Watchdog Header Length */
528 u16 pci_segment; /* PCI Segment number */
529 u8 pci_bus; /* PCI Bus number */
530 u8 pci_device; /* PCI Device number */
531 u8 pci_function; /* PCI Function number */
532 u8 reserved[3];
533 u32 timer_period; /* Period of one timer count (msec) */
534 u32 max_count; /* Maximum counter value supported */
535 u32 min_count; /* Minimum counter value */
536 u8 flags;
537 u8 reserved2[3];
538 u32 entries; /* Number of watchdog entries that follow */
539};
540
541/* Masks for Flags field above */
542
543#define ACPI_WDAT_ENABLED (1)
544#define ACPI_WDAT_STOPPED 0x80
545
546/* WDAT Instruction Entries (actions) */
547
548struct acpi_wdat_entry {
549 u8 action;
550 u8 instruction;
551 u16 reserved;
552 struct acpi_generic_address register_region;
553 u32 value; /* Value used with Read/Write register */
554 u32 mask; /* Bitmask required for this register instruction */
555};
556
557/* Values for Action field above */
558
559enum acpi_wdat_actions {
560 ACPI_WDAT_RESET = 1,
561 ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
562 ACPI_WDAT_GET_COUNTDOWN = 5,
563 ACPI_WDAT_SET_COUNTDOWN = 6,
564 ACPI_WDAT_GET_RUNNING_STATE = 8,
565 ACPI_WDAT_SET_RUNNING_STATE = 9,
566 ACPI_WDAT_GET_STOPPED_STATE = 10,
567 ACPI_WDAT_SET_STOPPED_STATE = 11,
568 ACPI_WDAT_GET_REBOOT = 16,
569 ACPI_WDAT_SET_REBOOT = 17,
570 ACPI_WDAT_GET_SHUTDOWN = 18,
571 ACPI_WDAT_SET_SHUTDOWN = 19,
572 ACPI_WDAT_GET_STATUS = 32,
573 ACPI_WDAT_SET_STATUS = 33,
574 ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */
575};
576
577/* Values for Instruction field above */
578
579enum acpi_wdat_instructions {
580 ACPI_WDAT_READ_VALUE = 0,
581 ACPI_WDAT_READ_COUNTDOWN = 1,
582 ACPI_WDAT_WRITE_VALUE = 2,
583 ACPI_WDAT_WRITE_COUNTDOWN = 3,
584 ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */
585 ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */
586};
587
588/*******************************************************************************
589 *
590 * WDDT - Watchdog Descriptor Table
591 * Version 1
592 *
593 * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",
594 * Version 001, September 2002
595 *
596 ******************************************************************************/
597
598struct acpi_table_wddt {
599 struct acpi_table_header header; /* Common ACPI table header */
600 u16 spec_version;
601 u16 table_version;
602 u16 pci_vendor_id;
603 struct acpi_generic_address address;
604 u16 max_count; /* Maximum counter value supported */
605 u16 min_count; /* Minimum counter value supported */
606 u16 period;
607 u16 status;
608 u16 capability;
609};
610
611/* Flags for Status field above */
612
613#define ACPI_WDDT_AVAILABLE (1)
614#define ACPI_WDDT_ACTIVE (1<<1)
615#define ACPI_WDDT_TCO_OS_OWNED (1<<2)
616#define ACPI_WDDT_USER_RESET (1<<11)
617#define ACPI_WDDT_WDT_RESET (1<<12)
618#define ACPI_WDDT_POWER_FAIL (1<<13)
619#define ACPI_WDDT_UNKNOWN_RESET (1<<14)
620
621/* Flags for Capability field above */
622
623#define ACPI_WDDT_AUTO_RESET (1)
624#define ACPI_WDDT_ALERT_SUPPORT (1<<1)
625
626/*******************************************************************************
627 *
628 * WDRT - Watchdog Resource Table
629 * Version 1
630 *
631 * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",
632 * Version 1.01, August 28, 2006
633 *
634 ******************************************************************************/
635
636struct acpi_table_wdrt {
637 struct acpi_table_header header; /* Common ACPI table header */
638 struct acpi_generic_address control_register;
639 struct acpi_generic_address count_register;
640 u16 pci_device_id;
641 u16 pci_vendor_id;
642 u8 pci_bus; /* PCI Bus number */
643 u8 pci_device; /* PCI Device number */
644 u8 pci_function; /* PCI Function number */
645 u8 pci_segment; /* PCI Segment number */
646 u16 max_count; /* Maximum counter value supported */
647 u8 units;
648};
649
650/*******************************************************************************
651 *
Bob Moore68edb032015-05-21 10:30:44 +0800652 * WPBT - Windows Platform Environment Table (ACPI 6.0)
653 * Version 1
654 *
655 * Conforms to "Windows Platform Binary Table (WPBT)" 29 November 2011
656 *
657 ******************************************************************************/
658
659struct acpi_table_wpbt {
660 struct acpi_table_header header; /* Common ACPI table header */
661 u32 handoff_size;
662 u64 handoff_address;
663 u8 layout;
664 u8 type;
665 u16 arguments_length;
666};
667
668/*******************************************************************************
669 *
Erik Schmausse62f8222018-02-15 13:09:26 -0800670 * WSMT - Windows SMM Security Migrations Table
671 * Version 1
672 *
673 * Conforms to "Windows SMM Security Migrations Table",
674 * Version 1.0, April 18, 2016
675 *
676 ******************************************************************************/
677
678struct acpi_table_wsmt {
679 struct acpi_table_header header; /* Common ACPI table header */
680 u32 protection_flags;
681};
682
683/* Flags for protection_flags field above */
684
685#define ACPI_WSMT_FIXED_COMM_BUFFERS (1)
686#define ACPI_WSMT_COMM_BUFFER_NESTED_PTR_PROTECTION (2)
687#define ACPI_WSMT_SYSTEM_RESOURCE_PROTECTION (4)
688
689/*******************************************************************************
690 *
Bob Mooreb6944ef2015-05-21 10:30:24 +0800691 * XENV - Xen Environment Table (ACPI 6.0)
692 * Version 1
693 *
694 * Conforms to "ACPI Specification for Xen Environment Table" 4 January 2015
695 *
696 ******************************************************************************/
697
698struct acpi_table_xenv {
699 struct acpi_table_header header; /* Common ACPI table header */
700 u64 grant_table_address;
701 u64 grant_table_size;
702 u32 event_interrupt;
703 u8 event_flags;
704};
705
Robert Moore6e596082014-03-05 14:12:01 +0800706/* Reset to default packing */
707
708#pragma pack()
Bob Moorec5bd6532011-11-16 11:04:00 +0800709
710#endif /* __ACTBL3_H__ */