Commit | Line | Data |
---|---|---|
c5bd6537 BM |
1 | /****************************************************************************** |
2 | * | |
3 | * Name: actbl3.h - ACPI Table Definitions | |
4 | * | |
5 | *****************************************************************************/ | |
6 | ||
7 | /* | |
da6f8320 | 8 | * Copyright (C) 2000 - 2018, Intel Corp. |
c5bd6537 BM |
9 | * All rights reserved. |
10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | |
15 | * notice, this list of conditions, and the following disclaimer, | |
16 | * without modification. | |
17 | * 2. Redistributions in binary form must reproduce at minimum a disclaimer | |
18 | * substantially similar to the "NO WARRANTY" disclaimer below | |
19 | * ("Disclaimer") and any redistribution must be conditioned upon | |
20 | * including a substantially similar Disclaimer requirement for further | |
21 | * binary redistribution. | |
22 | * 3. Neither the names of the above-listed copyright holders nor the names | |
23 | * of any contributors may be used to endorse or promote products derived | |
24 | * from this software without specific prior written permission. | |
25 | * | |
26 | * Alternatively, this software may be distributed under the terms of the | |
27 | * GNU General Public License ("GPL") version 2 as published by the Free | |
28 | * Software Foundation. | |
29 | * | |
30 | * NO WARRANTY | |
31 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
32 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
33 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR | |
34 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
35 | * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
36 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
37 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
38 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
39 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
40 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
41 | * POSSIBILITY OF SUCH DAMAGES. | |
42 | */ | |
43 | ||
44 | #ifndef __ACTBL3_H__ | |
45 | #define __ACTBL3_H__ | |
46 | ||
47 | /******************************************************************************* | |
48 | * | |
e62f8227 | 49 | * Additional ACPI Tables |
c5bd6537 BM |
50 | * |
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 | * | |
c5bd6537 BM |
54 | ******************************************************************************/ |
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 | */ | |
e62f8227 ES |
61 | #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 */ | |
37e12657 | 66 | #define ACPI_SIG_STAO "STAO" /* Status Override table */ |
e62f8227 ES |
67 | #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 */ | |
68edb038 | 75 | #define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */ |
e62f8227 | 76 | #define ACPI_SIG_WSMT "WSMT" /* Windows SMM Security Migrations Table */ |
b6944efd | 77 | #define ACPI_SIG_XENV "XENV" /* Xen Environment table */ |
e62f8227 | 78 | #define ACPI_SIG_XXXX "XXXX" /* Intermediate AML header for ASL/ASL+ converter */ |
c5bd6537 BM |
79 | |
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 | /* | |
be030a57 BM |
87 | * 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 | |
c5bd6537 BM |
96 | */ |
97 | ||
98 | /******************************************************************************* | |
99 | * | |
e62f8227 ES |
100 | * SLIC - Software Licensing Description Table |
101 | * | |
102 | * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)", | |
103 | * November 29, 2011. Copyright 2011 Microsoft | |
c5bd6537 BM |
104 | * |
105 | ******************************************************************************/ | |
106 | ||
e62f8227 ES |
107 | /* Basic SLIC table is only the common ACPI header */ |
108 | ||
109 | struct acpi_table_slic { | |
c5bd6537 | 110 | struct acpi_table_header header; /* Common ACPI table header */ |
c5bd6537 BM |
111 | }; |
112 | ||
113 | /******************************************************************************* | |
114 | * | |
e62f8227 ES |
115 | * SLIT - System Locality Distance Information Table |
116 | * Version 1 | |
c5bd6537 BM |
117 | * |
118 | ******************************************************************************/ | |
119 | ||
e62f8227 | 120 | struct acpi_table_slit { |
c5bd6537 | 121 | struct acpi_table_header header; /* Common ACPI table header */ |
e62f8227 ES |
122 | u64 locality_count; |
123 | u8 entry[1]; /* Real size = localities^2 */ | |
c5bd6537 BM |
124 | }; |
125 | ||
e62f8227 ES |
126 | /******************************************************************************* |
127 | * | |
128 | * SPCR - Serial Port Console Redirection table | |
129 | * Version 2 | |
130 | * | |
131 | * Conforms to "Serial Port Console Redirection Table", | |
132 | * Version 1.03, August 10, 2015 | |
133 | * | |
134 | ******************************************************************************/ | |
80fa6cf9 | 135 | |
e62f8227 ES |
136 | struct acpi_table_spcr { |
137 | struct acpi_table_header header; /* Common ACPI table header */ | |
138 | u8 interface_type; /* 0=full 16550, 1=subset of 16550 */ | |
139 | u8 reserved[3]; | |
140 | 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; | |
149 | u8 reserved1; | |
150 | 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; | |
80fa6cf9 | 158 | }; |
c5bd6537 | 159 | |
e62f8227 | 160 | /* Masks for pci_flags field above */ |
c5bd6537 | 161 | |
e62f8227 | 162 | #define ACPI_SPCR_DO_NOT_DISABLE (1) |
c5bd6537 | 163 | |
e62f8227 | 164 | /* Values for Interface Type: See the definition of the DBG2 table */ |
c5bd6537 BM |
165 | |
166 | /******************************************************************************* | |
167 | * | |
e62f8227 ES |
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. | |
c5bd6537 BM |
174 | * |
175 | ******************************************************************************/ | |
176 | ||
e62f8227 | 177 | struct acpi_table_spmi { |
c5bd6537 | 178 | struct acpi_table_header header; /* Common ACPI table header */ |
e62f8227 ES |
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; | |
c5bd6537 BM |
193 | }; |
194 | ||
e62f8227 | 195 | /* Values for interface_type above */ |
c5bd6537 | 196 | |
e62f8227 ES |
197 | enum 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 */ | |
c5bd6537 BM |
204 | }; |
205 | ||
e62f8227 ES |
206 | /******************************************************************************* |
207 | * | |
208 | * SRAT - System Resource Affinity Table | |
209 | * Version 3 | |
210 | * | |
211 | ******************************************************************************/ | |
c5bd6537 | 212 | |
e62f8227 ES |
213 | struct acpi_table_srat { |
214 | struct acpi_table_header header; /* Common ACPI table header */ | |
215 | u32 table_revision; /* Must be value '1' */ | |
216 | u64 reserved; /* Reserved, must be zero */ | |
c5bd6537 BM |
217 | }; |
218 | ||
e62f8227 | 219 | /* Values for subtable type in struct acpi_subtable_header */ |
c5bd6537 | 220 | |
e62f8227 ES |
221 | enum 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 */ | |
c5bd6537 BM |
228 | }; |
229 | ||
230 | /* | |
e62f8227 | 231 | * SRAT Subtables, correspond to Type in struct acpi_subtable_header |
c5bd6537 | 232 | */ |
c5bd6537 | 233 | |
e62f8227 | 234 | /* 0: Processor Local APIC/SAPIC Affinity */ |
c5bd6537 | 235 | |
e62f8227 ES |
236 | struct acpi_srat_cpu_affinity { |
237 | struct acpi_subtable_header header; | |
238 | u8 proximity_domain_lo; | |
239 | u8 apic_id; | |
240 | u32 flags; | |
241 | u8 local_sapic_eid; | |
242 | u8 proximity_domain_hi[3]; | |
243 | u32 clock_domain; | |
c5bd6537 BM |
244 | }; |
245 | ||
e62f8227 | 246 | /* Flags */ |
c5bd6537 | 247 | |
e62f8227 | 248 | #define ACPI_SRAT_CPU_USE_AFFINITY (1) /* 00: Use affinity structure */ |
c5bd6537 | 249 | |
e62f8227 | 250 | /* 1: Memory Affinity */ |
c5bd6537 | 251 | |
e62f8227 ES |
252 | struct acpi_srat_mem_affinity { |
253 | struct acpi_subtable_header header; | |
254 | u32 proximity_domain; | |
255 | 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 */ | |
54ea4247 TN |
261 | }; |
262 | ||
e62f8227 | 263 | /* Flags */ |
54ea4247 | 264 | |
e62f8227 ES |
265 | #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 */ | |
54ea4247 | 268 | |
e62f8227 | 269 | /* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */ |
c5bd6537 | 270 | |
e62f8227 ES |
271 | struct 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; | |
54ea4247 TN |
279 | }; |
280 | ||
e62f8227 | 281 | /* Flags for struct acpi_srat_cpu_affinity and struct acpi_srat_x2apic_cpu_affinity */ |
54ea4247 | 282 | |
e62f8227 | 283 | #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */ |
54ea4247 | 284 | |
e62f8227 | 285 | /* 3: GICC Affinity (ACPI 5.1) */ |
34ea065e | 286 | |
e62f8227 ES |
287 | struct 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 | }; | |
34ea065e | 294 | |
e62f8227 | 295 | /* Flags for struct acpi_srat_gicc_affinity */ |
54ea4247 | 296 | |
e62f8227 | 297 | #define ACPI_SRAT_GICC_ENABLED (1) /* 00: Use affinity structure */ |
54ea4247 | 298 | |
e62f8227 | 299 | /* 4: GCC ITS Affinity (ACPI 6.2) */ |
54ea4247 | 300 | |
e62f8227 ES |
301 | struct acpi_srat_gic_its_affinity { |
302 | struct acpi_subtable_header header; | |
303 | u32 proximity_domain; | |
304 | u16 reserved; | |
305 | u32 its_id; | |
54ea4247 | 306 | }; |
c5bd6537 | 307 | |
c5bd6537 BM |
308 | /******************************************************************************* |
309 | * | |
e62f8227 | 310 | * STAO - Status Override Table (_STA override) - ACPI 6.0 |
c5bd6537 BM |
311 | * Version 1 |
312 | * | |
e62f8227 ES |
313 | * Conforms to "ACPI Specification for Status Override Table" |
314 | * 6 January 2015 | |
315 | * | |
c5bd6537 BM |
316 | ******************************************************************************/ |
317 | ||
e62f8227 | 318 | struct acpi_table_stao { |
c5bd6537 | 319 | struct acpi_table_header header; /* Common ACPI table header */ |
e62f8227 | 320 | u8 ignore_uart; |
c5bd6537 BM |
321 | }; |
322 | ||
e62f8227 ES |
323 | /******************************************************************************* |
324 | * | |
325 | * 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 | ******************************************************************************/ | |
c5bd6537 | 339 | |
e62f8227 ES |
340 | struct acpi_table_tcpa_hdr { |
341 | struct acpi_table_header header; /* Common ACPI table header */ | |
342 | u16 platform_class; | |
c5bd6537 BM |
343 | }; |
344 | ||
e62f8227 ES |
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 | |
c5bd6537 | 351 | |
e62f8227 ES |
352 | struct 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 */ | |
c5bd6537 BM |
355 | }; |
356 | ||
e62f8227 | 357 | struct acpi_table_tcpa_server { |
2d2dd508 | 358 | u16 reserved; |
e62f8227 ES |
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) | |
c5bd6537 BM |
388 | |
389 | /******************************************************************************* | |
390 | * | |
e62f8227 ES |
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 | |
c5bd6537 BM |
399 | * |
400 | ******************************************************************************/ | |
401 | ||
e62f8227 | 402 | struct acpi_table_tpm2 { |
c5bd6537 | 403 | struct acpi_table_header header; /* Common ACPI table header */ |
e62f8227 ES |
404 | u16 platform_class; |
405 | u16 reserved; | |
406 | u64 control_address; | |
407 | u32 start_method; | |
408 | ||
409 | /* Platform-specific data follows */ | |
c5bd6537 BM |
410 | }; |
411 | ||
e62f8227 | 412 | /* Values for start_method above */ |
c5bd6537 | 413 | |
e62f8227 ES |
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 | |
c5bd6537 | 427 | |
e62f8227 | 428 | /* Optional trailer appears after any start_method subtables */ |
f0d73664 | 429 | |
e62f8227 ES |
430 | struct 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 */ | |
f0d73664 BM |
434 | }; |
435 | ||
c5bd6537 | 436 | /* |
e62f8227 | 437 | * Subtables (start_method-specific) |
c5bd6537 BM |
438 | */ |
439 | ||
e62f8227 | 440 | /* 11: Start Method for ARM SMC (V1.2 Rev 8) */ |
c5bd6537 | 441 | |
e62f8227 ES |
442 | struct acpi_tpm2_arm_smc { |
443 | u32 global_interrupt; | |
444 | u8 interrupt_flags; | |
445 | u8 operation_flags; | |
446 | u16 reserved; | |
447 | u32 function_id; | |
c5bd6537 BM |
448 | }; |
449 | ||
e62f8227 | 450 | /* Values for interrupt_flags above */ |
67a3d620 | 451 | |
e62f8227 | 452 | #define ACPI_TPM2_INTERRUPT_SUPPORT (1) |
67a3d620 | 453 | |
e62f8227 | 454 | /* Values for operation_flags above */ |
2a397a39 | 455 | |
e62f8227 | 456 | #define ACPI_TPM2_IDLE_SUPPORT (1) |
c7a1dfb9 | 457 | |
e62f8227 ES |
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 | ******************************************************************************/ | |
c7a1dfb9 | 467 | |
e62f8227 ES |
468 | struct 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 */ | |
c7a1dfb9 DB |
472 | }; |
473 | ||
c5bd6537 BM |
474 | /******************************************************************************* |
475 | * | |
e62f8227 | 476 | * VRTC - Virtual Real Time Clock Table |
c5bd6537 BM |
477 | * Version 1 |
478 | * | |
e62f8227 ES |
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 | * | |
c5bd6537 BM |
483 | ******************************************************************************/ |
484 | ||
e62f8227 | 485 | struct acpi_table_vrtc { |
c5bd6537 | 486 | struct acpi_table_header header; /* Common ACPI table header */ |
c5bd6537 BM |
487 | }; |
488 | ||
e62f8227 | 489 | /* VRTC entry */ |
c5bd6537 | 490 | |
e62f8227 ES |
491 | struct acpi_vrtc_entry { |
492 | struct acpi_generic_address physical_address; | |
493 | u32 irq; | |
c5bd6537 BM |
494 | }; |
495 | ||
e62f8227 ES |
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 | ******************************************************************************/ | |
c5bd6537 | 504 | |
e62f8227 ES |
505 | struct acpi_table_waet { |
506 | struct acpi_table_header header; /* Common ACPI table header */ | |
507 | u32 flags; | |
508 | }; | |
c5bd6537 | 509 | |
e62f8227 | 510 | /* Masks for Flags field above */ |
c5bd6537 | 511 | |
e62f8227 ES |
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 */ | |
c5bd6537 | 514 | |
e62f8227 ES |
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 | ******************************************************************************/ | |
c5bd6537 | 524 | |
e62f8227 ES |
525 | struct 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 */ | |
c5bd6537 BM |
539 | }; |
540 | ||
e62f8227 | 541 | /* Masks for Flags field above */ |
c5bd6537 | 542 | |
e62f8227 ES |
543 | #define ACPI_WDAT_ENABLED (1) |
544 | #define ACPI_WDAT_STOPPED 0x80 | |
c5bd6537 | 545 | |
e62f8227 | 546 | /* WDAT Instruction Entries (actions) */ |
c5bd6537 | 547 | |
e62f8227 ES |
548 | struct acpi_wdat_entry { |
549 | u8 action; | |
550 | u8 instruction; | |
c5bd6537 | 551 | u16 reserved; |
e62f8227 ES |
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 | ||
559 | enum 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 | ||
579 | enum 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 */ | |
c5bd6537 BM |
586 | }; |
587 | ||
588 | /******************************************************************************* | |
589 | * | |
e62f8227 | 590 | * WDDT - Watchdog Descriptor Table |
c5bd6537 BM |
591 | * Version 1 |
592 | * | |
e62f8227 ES |
593 | * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)", |
594 | * Version 001, September 2002 | |
595 | * | |
c5bd6537 BM |
596 | ******************************************************************************/ |
597 | ||
e62f8227 | 598 | struct acpi_table_wddt { |
c5bd6537 | 599 | struct acpi_table_header header; /* Common ACPI table header */ |
e62f8227 ES |
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; | |
c5bd6537 | 607 | u16 status; |
e62f8227 | 608 | u16 capability; |
8c280914 LZ |
609 | }; |
610 | ||
e62f8227 | 611 | /* Flags for Status field above */ |
c5bd6537 | 612 | |
e62f8227 ES |
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) | |
c5bd6537 | 620 | |
e62f8227 | 621 | /* Flags for Capability field above */ |
c5bd6537 | 622 | |
e62f8227 ES |
623 | #define ACPI_WDDT_AUTO_RESET (1) |
624 | #define ACPI_WDDT_ALERT_SUPPORT (1<<1) | |
c5bd6537 | 625 | |
37e12657 BM |
626 | /******************************************************************************* |
627 | * | |
e62f8227 | 628 | * WDRT - Watchdog Resource Table |
37e12657 BM |
629 | * Version 1 |
630 | * | |
e62f8227 ES |
631 | * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003", |
632 | * Version 1.01, August 28, 2006 | |
37e12657 BM |
633 | * |
634 | ******************************************************************************/ | |
635 | ||
e62f8227 | 636 | struct acpi_table_wdrt { |
37e12657 | 637 | struct acpi_table_header header; /* Common ACPI table header */ |
e62f8227 ES |
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; | |
37e12657 BM |
648 | }; |
649 | ||
68edb038 BM |
650 | /******************************************************************************* |
651 | * | |
652 | * 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 | ||
659 | struct 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 | ||
e62f8227 ES |
668 | /******************************************************************************* |
669 | * | |
670 | * 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 | ||
678 | struct 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 | ||
b6944efd BM |
689 | /******************************************************************************* |
690 | * | |
691 | * 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 | ||
698 | struct 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 | ||
6e596084 RM |
706 | /* Reset to default packing */ |
707 | ||
708 | #pragma pack() | |
c5bd6537 BM |
709 | |
710 | #endif /* __ACTBL3_H__ */ |