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