Debian Codegraph @

source/include/actbl3.h

raw symbols SCIP
1 /******************************************************************************
2 *
3 * Name: actbl3.h - ACPI Table Definitions
4 *
5 *****************************************************************************/
6
7 /*
8 * Copyright (C) 2000 - 2026, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 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 /*******************************************************************************
49 *
50 * Additional ACPI Tables
51 *
52 * These tables are not consumed directly by the ACPICA subsystem, but are
53 * included here to support device drivers and the AML disassembler.
54 *
55 ******************************************************************************/
56
57
58 /*
59 * Values for description table header signatures for tables defined in this
60 * file. Useful because they make it more difficult to inadvertently type in
61 * the wrong signature.
62 */
63 #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */
64 #define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */
65 #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
66 #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */
67 #define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */
68 #define ACPI_SIG_STAO "STAO" /* Status Override table */
69 #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */
70 #define ACPI_SIG_TPM2 "TPM2" /* Trusted Platform Module 2.0 H/W interface table */
71 #define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */
72 #define ACPI_SIG_VIOT "VIOT" /* Virtual I/O Translation Table */
73 #define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */
74 #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */
75 #define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */
76 #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */
77 #define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */
78 #define ACPI_SIG_WSMT "WSMT" /* Windows SMM Security Mitigations Table */
79 #define ACPI_SIG_XENV "XENV" /* Xen Environment table */
80 #define ACPI_SIG_XXXX "XXXX" /* Intermediate AML header for ASL/ASL+ converter */
81
82 /*
83 * All tables must be byte-packed to match the ACPI specification, since
84 * the tables are provided by the system BIOS.
85 */
86 #pragma pack(1)
87
88 /*
89 * Note: C bitfields are not used for this reason:
90 *
91 * "Bitfields are great and easy to read, but unfortunately the C language
92 * does not specify the layout of bitfields in memory, which means they are
93 * essentially useless for dealing with packed data in on-disk formats or
94 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
95 * this decision was a design error in C. Ritchie could have picked an order
96 * and stuck with it." Norman Ramsey.
97 * See http://stackoverflow.com/a/1053662/41661
98 */
99
100
101 /*******************************************************************************
102 *
103 * SLIC - Software Licensing Description Table
104 *
105 * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
106 * November 29, 2011. Copyright 2011 Microsoft
107 *
108 ******************************************************************************/
109
110 /* Basic SLIC table is only the common ACPI header */
111
112 typedef struct acpi_table_slic
113 {
114 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
115
116 } ACPI_TABLE_SLIC;
117
118
119 /*******************************************************************************
120 *
121 * SLIT - System Locality Distance Information Table
122 * Version 1
123 *
124 ******************************************************************************/
125
126 typedef struct acpi_table_slit
127 {
128 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
129 UINT64 LocalityCount;
130 UINT8 Entry[1]; /* Real size = localities^2 */
131
132 } ACPI_TABLE_SLIT;
133
134
135 /*******************************************************************************
136 *
137 * SPCR - Serial Port Console Redirection table
138 * Version 4
139 *
140 * Conforms to "Serial Port Console Redirection Table",
141 * Version 1.10, Jan 5, 2023
142 *
143 ******************************************************************************/
144
145 typedef struct acpi_table_spcr
146 {
147 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
148 UINT8 InterfaceType; /* 0=full 16550, 1=subset of 16550 */
149 UINT8 Reserved[3];
150 ACPI_GENERIC_ADDRESS SerialPort;
151 UINT8 InterruptType;
152 UINT8 PcInterrupt;
153 UINT32 Interrupt;
154 UINT8 BaudRate;
155 UINT8 Parity;
156 UINT8 StopBits;
157 UINT8 FlowControl;
158 UINT8 TerminalType;
159 UINT8 Language;
160 UINT16 PciDeviceId;
161 UINT16 PciVendorId;
162 UINT8 PciBus;
163 UINT8 PciDevice;
164 UINT8 PciFunction;
165 UINT32 PciFlags;
166 UINT8 PciSegment;
167 UINT32 UartClkFreq;
168 UINT32 PreciseBaudrate;
169 UINT16 NameSpaceStringLength;
170 UINT16 NameSpaceStringOffset;
171 char NameSpaceString[];
172
173 } ACPI_TABLE_SPCR;
174
175 /* Masks for PciFlags field above */
176
177 #define ACPI_SPCR_DO_NOT_DISABLE (1)
178
179 /* Values for Interface Type: See the definition of the DBG2 table */
180
181
182 /*******************************************************************************
183 *
184 * SPMI - Server Platform Management Interface table
185 * Version 5
186 *
187 * Conforms to "Intelligent Platform Management Interface Specification
188 * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with
189 * June 12, 2009 markup.
190 *
191 ******************************************************************************/
192
193 typedef struct acpi_table_spmi
194 {
195 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
196 UINT8 InterfaceType;
197 UINT8 Reserved; /* Must be 1 */
198 UINT16 SpecRevision; /* Version of IPMI */
199 UINT8 InterruptType;
200 UINT8 GpeNumber; /* GPE assigned */
201 UINT8 Reserved1;
202 UINT8 PciDeviceFlag;
203 UINT32 Interrupt;
204 ACPI_GENERIC_ADDRESS IpmiRegister;
205 UINT8 PciSegment;
206 UINT8 PciBus;
207 UINT8 PciDevice;
208 UINT8 PciFunction;
209 UINT8 Reserved2;
210
211 } ACPI_TABLE_SPMI;
212
213 /* Values for InterfaceType above */
214
215 enum AcpiSpmiInterfaceTypes
216 {
217 ACPI_SPMI_NOT_USED = 0,
218 ACPI_SPMI_KEYBOARD = 1,
219 ACPI_SPMI_SMI = 2,
220 ACPI_SPMI_BLOCK_TRANSFER = 3,
221 ACPI_SPMI_SMBUS = 4,
222 ACPI_SPMI_RESERVED = 5 /* 5 and above are reserved */
223 };
224
225
226 /*******************************************************************************
227 *
228 * SRAT - System Resource Affinity Table
229 * Version 3
230 *
231 ******************************************************************************/
232
233 typedef struct acpi_table_srat
234 {
235 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
236 UINT32 TableRevision; /* Must be value '1' */
237 UINT64 Reserved; /* Reserved, must be zero */
238
239 } ACPI_TABLE_SRAT;
240
241 /* Values for subtable type in ACPI_SUBTABLE_HEADER */
242
243 enum AcpiSratType
244 {
245 ACPI_SRAT_TYPE_CPU_AFFINITY = 0,
246 ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1,
247 ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2,
248 ACPI_SRAT_TYPE_GICC_AFFINITY = 3,
249 ACPI_SRAT_TYPE_GIC_ITS_AFFINITY = 4, /* ACPI 6.2 */
250 ACPI_SRAT_TYPE_GENERIC_AFFINITY = 5, /* ACPI 6.3 */
251 ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY = 6, /* ACPI 6.4 */
252 ACPI_SRAT_TYPE_RINTC_AFFINITY = 7, /* ACPI 6.6 */
253 ACPI_SRAT_TYPE_RESERVED = 8 /* 8 and greater are reserved */
254 };
255
256 /*
257 * SRAT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
258 */
259
260 /* 0: Processor Local APIC/SAPIC Affinity */
261
262 typedef struct acpi_srat_cpu_affinity
263 {
264 ACPI_SUBTABLE_HEADER Header;
265 UINT8 ProximityDomainLo;
266 UINT8 ApicId;
267 UINT32 Flags;
268 UINT8 LocalSapicEid;
269 UINT8 ProximityDomainHi[3];
270 UINT32 ClockDomain;
271
272 } ACPI_SRAT_CPU_AFFINITY;
273
274 /* Flags */
275
276 #define ACPI_SRAT_CPU_USE_AFFINITY (1) /* 00: Use affinity structure */
277
278
279 /* 1: Memory Affinity */
280
281 typedef struct acpi_srat_mem_affinity
282 {
283 ACPI_SUBTABLE_HEADER Header;
284 UINT32 ProximityDomain;
285 UINT16 Reserved; /* Reserved, must be zero */
286 UINT64 BaseAddress;
287 UINT64 Length;
288 UINT32 Reserved1;
289 UINT32 Flags;
290 UINT64 Reserved2; /* Reserved, must be zero */
291
292 } ACPI_SRAT_MEM_AFFINITY;
293
294 /* Flags */
295
296 #define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */
297 #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */
298 #define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */
299 #define ACPI_SRAT_MEM_SPEC_PURPOSE (1<<3) /* 03: Memory is intended for specific-purpose usage */
300
301
302 /* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */
303
304 typedef struct acpi_srat_x2apic_cpu_affinity
305 {
306 ACPI_SUBTABLE_HEADER Header;
307 UINT16 Reserved; /* Reserved, must be zero */
308 UINT32 ProximityDomain;
309 UINT32 ApicId;
310 UINT32 Flags;
311 UINT32 ClockDomain;
312 UINT32 Reserved2;
313
314 } ACPI_SRAT_X2APIC_CPU_AFFINITY;
315
316 /* Flags for ACPI_SRAT_CPU_AFFINITY and ACPI_SRAT_X2APIC_CPU_AFFINITY */
317
318 #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
319
320
321 /* 3: GICC Affinity (ACPI 5.1) */
322
323 typedef struct acpi_srat_gicc_affinity
324 {
325 ACPI_SUBTABLE_HEADER Header;
326 UINT32 ProximityDomain;
327 UINT32 AcpiProcessorUid;
328 UINT32 Flags;
329 UINT32 ClockDomain;
330
331 } ACPI_SRAT_GICC_AFFINITY;
332
333 /* Flags for ACPI_SRAT_GICC_AFFINITY */
334
335 #define ACPI_SRAT_GICC_ENABLED (1) /* 00: Use affinity structure */
336
337
338 /* 4: GIC ITS Affinity (ACPI 6.2) */
339
340 typedef struct acpi_srat_gic_its_affinity
341 {
342 ACPI_SUBTABLE_HEADER Header;
343 UINT32 ProximityDomain;
344 UINT16 Reserved;
345 UINT32 ItsId;
346
347 } ACPI_SRAT_GIC_ITS_AFFINITY;
348
349 /*
350 * Common structure for SRAT subtable types:
351 * 5: ACPI_SRAT_TYPE_GENERIC_AFFINITY
352 * 6: ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY
353 */
354
355 #define ACPI_SRAT_DEVICE_HANDLE_SIZE 16
356
357 typedef struct acpi_srat_generic_affinity
358 {
359 ACPI_SUBTABLE_HEADER Header;
360 UINT8 Reserved;
361 UINT8 DeviceHandleType;
362 UINT32 ProximityDomain;
363 UINT8 DeviceHandle[ACPI_SRAT_DEVICE_HANDLE_SIZE];
364 UINT32 Flags;
365 UINT32 Reserved1;
366
367 } ACPI_SRAT_GENERIC_AFFINITY;
368
369 /* Flags for ACPI_SRAT_GENERIC_AFFINITY */
370
371 #define ACPI_SRAT_GENERIC_AFFINITY_ENABLED (1) /* 00: Use affinity structure */
372 #define ACPI_SRAT_ARCHITECTURAL_TRANSACTIONS (1<<1) /* ACPI 6.4 */
373
374 /* 7: RINTC Affinity Structure(ACPI 6.6) */
375
376 typedef struct acpi_srat_rintc_affinity
377 {
378 ACPI_SUBTABLE_HEADER Header;
379 UINT16 Reserved;
380 UINT32 ProximityDomain;
381 UINT32 AcpiProcessorUid;
382 UINT32 Flags;
383 UINT32 ClockDomain;
384
385 } ACPI_SRAT_RINTC_AFFINITY;
386
387 /* Flags for ACPI_SRAT_RINTC_AFFINITY */
388
389 #define ACPI_SRAT_RINTC_ENABLED (1) /* 00: Use affinity structure */
390
391 /*******************************************************************************
392 *
393 * STAO - Status Override Table (_STA override) - ACPI 6.0
394 * Version 1
395 *
396 * Conforms to "ACPI Specification for Status Override Table"
397 * 6 January 2015
398 *
399 ******************************************************************************/
400
401 typedef struct acpi_table_stao
402 {
403 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
404 UINT8 IgnoreUart;
405
406 } ACPI_TABLE_STAO;
407
408
409 /*******************************************************************************
410 *
411 * TCPA - Trusted Computing Platform Alliance table
412 * Version 2
413 *
414 * TCG Hardware Interface Table for TPM 1.2 Clients and Servers
415 *
416 * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
417 * Version 1.2, Revision 8
418 * February 27, 2017
419 *
420 * NOTE: There are two versions of the table with the same signature --
421 * the client version and the server version. The common PlatformClass
422 * field is used to differentiate the two types of tables.
423 *
424 ******************************************************************************/
425
426 typedef struct acpi_table_tcpa_hdr
427 {
428 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
429 UINT16 PlatformClass;
430
431 } ACPI_TABLE_TCPA_HDR;
432
433 /*
434 * Values for PlatformClass above.
435 * This is how the client and server subtables are differentiated
436 */
437 #define ACPI_TCPA_CLIENT_TABLE 0
438 #define ACPI_TCPA_SERVER_TABLE 1
439
440
441 typedef struct acpi_table_tcpa_client
442 {
443 UINT32 MinimumLogLength; /* Minimum length for the event log area */
444 UINT64 LogAddress; /* Address of the event log area */
445
446 } ACPI_TABLE_TCPA_CLIENT;
447
448 typedef struct acpi_table_tcpa_server
449 {
450 UINT16 Reserved;
451 UINT64 MinimumLogLength; /* Minimum length for the event log area */
452 UINT64 LogAddress; /* Address of the event log area */
453 UINT16 SpecRevision;
454 UINT8 DeviceFlags;
455 UINT8 InterruptFlags;
456 UINT8 GpeNumber;
457 UINT8 Reserved2[3];
458 UINT32 GlobalInterrupt;
459 ACPI_GENERIC_ADDRESS Address;
460 UINT32 Reserved3;
461 ACPI_GENERIC_ADDRESS ConfigAddress;
462 UINT8 Group;
463 UINT8 Bus; /* PCI Bus/Segment/Function numbers */
464 UINT8 Device;
465 UINT8 Function;
466
467 } ACPI_TABLE_TCPA_SERVER;
468
469 /* Values for DeviceFlags above */
470
471 #define ACPI_TCPA_PCI_DEVICE (1)
472 #define ACPI_TCPA_BUS_PNP (1<<1)
473 #define ACPI_TCPA_ADDRESS_VALID (1<<2)
474
475 /* Values for InterruptFlags above */
476
477 #define ACPI_TCPA_INTERRUPT_MODE (1)
478 #define ACPI_TCPA_INTERRUPT_POLARITY (1<<1)
479 #define ACPI_TCPA_SCI_VIA_GPE (1<<2)
480 #define ACPI_TCPA_GLOBAL_INTERRUPT (1<<3)
481
482
483 /*******************************************************************************
484 *
485 * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
486 * Version 4
487 *
488 * TCG Hardware Interface Table for TPM 2.0 Clients and Servers
489 *
490 * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
491 * Version 1.2, Revision 8
492 * February 27, 2017
493 *
494 ******************************************************************************/
495
496 /* Revision 3 */
497
498 typedef struct acpi_table_tpm23
499 {
500 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
501 UINT32 Reserved;
502 UINT64 ControlAddress;
503 UINT32 StartMethod;
504
505 } ACPI_TABLE_TPM23;
506
507 /* Value for StartMethod above */
508
509 #define ACPI_TPM23_ACPI_START_METHOD 2
510
511 /*
512 * Optional trailer for revision 3. If start method is 2, there is a 4 byte
513 * reserved area of all zeros.
514 */
515 typedef struct acpi_tmp23_trailer
516 {
517 UINT32 Reserved;
518
519 } ACPI_TPM23_TRAILER;
520
521
522 /* Revision 4 */
523
524 typedef struct acpi_table_tpm2
525 {
526 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
527 UINT16 PlatformClass;
528 UINT16 Reserved;
529 UINT64 ControlAddress;
530 UINT32 StartMethod;
531
532 /* Platform-specific data follows */
533
534 } ACPI_TABLE_TPM2;
535
536 /* Values for StartMethod above */
537
538 #define ACPI_TPM2_NOT_ALLOWED 0
539 #define ACPI_TPM2_RESERVED1 1
540 #define ACPI_TPM2_START_METHOD 2
541 #define ACPI_TPM2_RESERVED3 3
542 #define ACPI_TPM2_RESERVED4 4
543 #define ACPI_TPM2_RESERVED5 5
544 #define ACPI_TPM2_MEMORY_MAPPED 6
545 #define ACPI_TPM2_COMMAND_BUFFER 7
546 #define ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD 8
547 #define ACPI_TPM2_RESERVED9 9
548 #define ACPI_TPM2_RESERVED10 10
549 #define ACPI_TPM2_COMMAND_BUFFER_WITH_ARM_SMC 11 /* V1.2 Rev 8 */
550 #define ACPI_TPM2_RESERVED 12
551 #define ACPI_TPM2_COMMAND_BUFFER_WITH_PLUTON 13
552 #define ACPI_TPM2_CRB_WITH_ARM_FFA 15
553
554
555 /* Optional trailer appears after any StartMethod subtables */
556
557 typedef struct acpi_tpm2_trailer
558 {
559 UINT8 MethodParameters[12];
560 UINT32 MinimumLogLength; /* Minimum length for the event log area */
561 UINT64 LogAddress; /* Address of the event log area */
562
563 } ACPI_TPM2_TRAILER;
564
565
566 /*
567 * Subtables (StartMethod-specific)
568 */
569
570 /* 11: Start Method for ARM SMC (V1.2 Rev 8) */
571
572 typedef struct acpi_tpm2_arm_smc
573 {
574 UINT32 GlobalInterrupt;
575 UINT8 InterruptFlags;
576 UINT8 OperationFlags;
577 UINT16 Reserved;
578 UINT32 FunctionId;
579
580 } ACPI_TPM2_ARM_SMC;
581
582 /* Values for InterruptFlags above */
583
584 #define ACPI_TPM2_INTERRUPT_SUPPORT (1)
585
586 /* Values for OperationFlags above */
587
588 #define ACPI_TPM2_IDLE_SUPPORT (1)
589
590
591 /*******************************************************************************
592 *
593 * UEFI - UEFI Boot optimization Table
594 * Version 1
595 *
596 * Conforms to "Unified Extensible Firmware Interface Specification",
597 * Version 2.3, May 8, 2009
598 *
599 ******************************************************************************/
600
601 typedef struct acpi_table_uefi
602 {
603 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
604 UINT8 Identifier[16]; /* UUID identifier */
605 UINT16 DataOffset; /* Offset of remaining data in table */
606
607 } ACPI_TABLE_UEFI;
608
609
610 /*******************************************************************************
611 *
612 * VIOT - Virtual I/O Translation Table
613 * Version 1
614 *
615 ******************************************************************************/
616
617 typedef struct acpi_table_viot
618 {
619 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
620 UINT16 NodeCount;
621 UINT16 NodeOffset;
622 UINT8 Reserved[8];
623
624 } ACPI_TABLE_VIOT;
625
626 /* VIOT subtable header */
627
628 typedef struct acpi_viot_header
629 {
630 UINT8 Type;
631 UINT8 Reserved;
632 UINT16 Length;
633
634 } ACPI_VIOT_HEADER;
635
636 /* Values for Type field above */
637
638 enum AcpiViotNodeType
639 {
640 ACPI_VIOT_NODE_PCI_RANGE = 0x01,
641 ACPI_VIOT_NODE_MMIO = 0x02,
642 ACPI_VIOT_NODE_VIRTIO_IOMMU_PCI = 0x03,
643 ACPI_VIOT_NODE_VIRTIO_IOMMU_MMIO = 0x04,
644 ACPI_VIOT_RESERVED = 0x05
645 };
646
647 /* VIOT subtables */
648
649 typedef struct acpi_viot_pci_range
650 {
651 ACPI_VIOT_HEADER Header;
652 UINT32 EndpointStart;
653 UINT16 SegmentStart;
654 UINT16 SegmentEnd;
655 UINT16 BdfStart;
656 UINT16 BdfEnd;
657 UINT16 OutputNode;
658 UINT8 Reserved[6];
659
660 } ACPI_VIOT_PCI_RANGE;
661
662 typedef struct acpi_viot_mmio
663 {
664 ACPI_VIOT_HEADER Header;
665 UINT32 Endpoint;
666 UINT64 BaseAddress;
667 UINT16 OutputNode;
668 UINT8 Reserved[6];
669
670 } ACPI_VIOT_MMIO;
671
672 typedef struct acpi_viot_virtio_iommu_pci
673 {
674 ACPI_VIOT_HEADER Header;
675 UINT16 Segment;
676 UINT16 Bdf;
677 UINT8 Reserved[8];
678
679 } ACPI_VIOT_VIRTIO_IOMMU_PCI;
680
681 typedef struct acpi_viot_virtio_iommu_mmio
682 {
683 ACPI_VIOT_HEADER Header;
684 UINT8 Reserved[4];
685 UINT64 BaseAddress;
686
687 } ACPI_VIOT_VIRTIO_IOMMU_MMIO;
688
689
690 /*******************************************************************************
691 *
692 * WAET - Windows ACPI Emulated devices Table
693 * Version 1
694 *
695 * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009
696 *
697 ******************************************************************************/
698
699 typedef struct acpi_table_waet
700 {
701 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
702 UINT32 Flags;
703
704 } ACPI_TABLE_WAET;
705
706 /* Masks for Flags field above */
707
708 #define ACPI_WAET_RTC_NO_ACK (1) /* RTC requires no int acknowledge */
709 #define ACPI_WAET_TIMER_ONE_READ (1<<1) /* PM timer requires only one read */
710
711
712 /*******************************************************************************
713 *
714 * WDAT - Watchdog Action Table
715 * Version 1
716 *
717 * Conforms to "Hardware Watchdog Timers Design Specification",
718 * Copyright 2006 Microsoft Corporation.
719 *
720 ******************************************************************************/
721
722 typedef struct acpi_table_wdat
723 {
724 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
725 UINT32 HeaderLength; /* Watchdog Header Length */
726 UINT16 PciSegment; /* PCI Segment number */
727 UINT8 PciBus; /* PCI Bus number */
728 UINT8 PciDevice; /* PCI Device number */
729 UINT8 PciFunction; /* PCI Function number */
730 UINT8 Reserved[3];
731 UINT32 TimerPeriod; /* Period of one timer count (msec) */
732 UINT32 MaxCount; /* Maximum counter value supported */
733 UINT32 MinCount; /* Minimum counter value */
734 UINT8 Flags;
735 UINT8 Reserved2[3];
736 UINT32 Entries; /* Number of watchdog entries that follow */
737
738 } ACPI_TABLE_WDAT;
739
740 /* Masks for Flags field above */
741
742 #define ACPI_WDAT_ENABLED (1)
743 #define ACPI_WDAT_STOPPED 0x80
744
745
746 /* WDAT Instruction Entries (actions) */
747
748 typedef struct acpi_wdat_entry
749 {
750 UINT8 Action;
751 UINT8 Instruction;
752 UINT16 Reserved;
753 ACPI_GENERIC_ADDRESS RegisterRegion;
754 UINT32 Value; /* Value used with Read/Write register */
755 UINT32 Mask; /* Bitmask required for this register instruction */
756
757 } ACPI_WDAT_ENTRY;
758
759 /* Values for Action field above */
760
761 enum AcpiWdatActions
762 {
763 ACPI_WDAT_RESET = 1,
764 ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
765 ACPI_WDAT_GET_COUNTDOWN = 5,
766 ACPI_WDAT_SET_COUNTDOWN = 6,
767 ACPI_WDAT_GET_RUNNING_STATE = 8,
768 ACPI_WDAT_SET_RUNNING_STATE = 9,
769 ACPI_WDAT_GET_STOPPED_STATE = 10,
770 ACPI_WDAT_SET_STOPPED_STATE = 11,
771 ACPI_WDAT_GET_REBOOT = 16,
772 ACPI_WDAT_SET_REBOOT = 17,
773 ACPI_WDAT_GET_SHUTDOWN = 18,
774 ACPI_WDAT_SET_SHUTDOWN = 19,
775 ACPI_WDAT_GET_STATUS = 32,
776 ACPI_WDAT_SET_STATUS = 33,
777 ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */
778 };
779
780 /* Values for Instruction field above */
781
782 enum AcpiWdatInstructions
783 {
784 ACPI_WDAT_READ_VALUE = 0,
785 ACPI_WDAT_READ_COUNTDOWN = 1,
786 ACPI_WDAT_WRITE_VALUE = 2,
787 ACPI_WDAT_WRITE_COUNTDOWN = 3,
788 ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */
789 ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */
790 };
791
792
793 /*******************************************************************************
794 *
795 * WDDT - Watchdog Descriptor Table
796 * Version 1
797 *
798 * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)",
799 * Version 001, September 2002
800 *
801 ******************************************************************************/
802
803 typedef struct acpi_table_wddt
804 {
805 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
806 UINT16 SpecVersion;
807 UINT16 TableVersion;
808 UINT16 PciVendorId;
809 ACPI_GENERIC_ADDRESS Address;
810 UINT16 MaxCount; /* Maximum counter value supported */
811 UINT16 MinCount; /* Minimum counter value supported */
812 UINT16 Period;
813 UINT16 Status;
814 UINT16 Capability;
815
816 } ACPI_TABLE_WDDT;
817
818 /* Flags for Status field above */
819
820 #define ACPI_WDDT_AVAILABLE (1)
821 #define ACPI_WDDT_ACTIVE (1<<1)
822 #define ACPI_WDDT_TCO_OS_OWNED (1<<2)
823 #define ACPI_WDDT_USER_RESET (1<<11)
824 #define ACPI_WDDT_WDT_RESET (1<<12)
825 #define ACPI_WDDT_POWER_FAIL (1<<13)
826 #define ACPI_WDDT_UNKNOWN_RESET (1<<14)
827
828 /* Flags for Capability field above */
829
830 #define ACPI_WDDT_AUTO_RESET (1)
831 #define ACPI_WDDT_ALERT_SUPPORT (1<<1)
832
833
834 /*******************************************************************************
835 *
836 * WDRT - Watchdog Resource Table
837 * Version 1
838 *
839 * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003",
840 * Version 1.01, August 28, 2006
841 *
842 ******************************************************************************/
843
844 typedef struct acpi_table_wdrt
845 {
846 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
847 ACPI_GENERIC_ADDRESS ControlRegister;
848 ACPI_GENERIC_ADDRESS CountRegister;
849 UINT16 PciDeviceId;
850 UINT16 PciVendorId;
851 UINT8 PciBus; /* PCI Bus number */
852 UINT8 PciDevice; /* PCI Device number */
853 UINT8 PciFunction; /* PCI Function number */
854 UINT8 PciSegment; /* PCI Segment number */
855 UINT16 MaxCount; /* Maximum counter value supported */
856 UINT8 Units;
857
858 } ACPI_TABLE_WDRT;
859
860
861 /*******************************************************************************
862 *
863 * WPBT - Windows Platform Environment Table (ACPI 6.0)
864 * Version 1
865 *
866 * Conforms to "Windows Platform Binary Table (WPBT)" 29 November 2011
867 *
868 ******************************************************************************/
869
870 typedef struct acpi_table_wpbt
871 {
872 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
873 UINT32 HandoffSize;
874 UINT64 HandoffAddress;
875 UINT8 Layout;
876 UINT8 Type;
877 UINT16 ArgumentsLength;
878
879 } ACPI_TABLE_WPBT;
880
881 typedef struct acpi_wpbt_unicode
882 {
883 UINT16 *UnicodeString;
884
885 } ACPI_WPBT_UNICODE;
886
887
888 /*******************************************************************************
889 *
890 * WSMT - Windows SMM Security Mitigations Table
891 * Version 1
892 *
893 * Conforms to "Windows SMM Security Mitigations Table",
894 * Version 1.0, April 18, 2016
895 *
896 ******************************************************************************/
897
898 typedef struct acpi_table_wsmt
899 {
900 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
901 UINT32 ProtectionFlags;
902
903 } ACPI_TABLE_WSMT;
904
905 /* Flags for ProtectionFlags field above */
906
907 #define ACPI_WSMT_FIXED_COMM_BUFFERS (1)
908 #define ACPI_WSMT_COMM_BUFFER_NESTED_PTR_PROTECTION (2)
909 #define ACPI_WSMT_SYSTEM_RESOURCE_PROTECTION (4)
910
911
912 /*******************************************************************************
913 *
914 * XENV - Xen Environment Table (ACPI 6.0)
915 * Version 1
916 *
917 * Conforms to "ACPI Specification for Xen Environment Table" 4 January 2015
918 *
919 ******************************************************************************/
920
921 typedef struct acpi_table_xenv
922 {
923 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
924 UINT64 GrantTableAddress;
925 UINT64 GrantTableSize;
926 UINT32 EventInterrupt;
927 UINT8 EventFlags;
928
929 } ACPI_TABLE_XENV;
930
931
932 /* Reset to default packing */
933
934 #pragma pack()
935
936 #endif /* __ACTBL3_H__ */