1 /****************************************************************************** 2 * 3 * Name: actbl2.h - ACPI Table Definitions (tables not in ACPI spec) 4 * 5 *****************************************************************************/ 6 7 /****************************************************************************** 8 * 9 * 1. Copyright Notice 10 * 11 * Some or all of this work - Copyright (c) 1999 - 2017, 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 __ACTBL2_H__ 153 #define __ACTBL2_H__ 154 155 156 /******************************************************************************* 157 * 158 * Additional ACPI Tables (2) 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 * Generally, the tables in this file are defined by third-party specifications, 164 * and are not defined directly by the ACPI specification itself. 165 * 166 ******************************************************************************/ 167 168 169 /* 170 * Values for description table header signatures for tables defined in this 171 * file. Useful because they make it more difficult to inadvertently type in 172 * the wrong signature. 173 */ 174 #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */ 175 #define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */ 176 #define ACPI_SIG_CSRT "CSRT" /* Core System Resource Table */ 177 #define ACPI_SIG_DBG2 "DBG2" /* Debug Port table type 2 */ 178 #define ACPI_SIG_DBGP "DBGP" /* Debug Port table */ 179 #define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */ 180 #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */ 181 #define ACPI_SIG_IBFT "IBFT" /* iSCSI Boot Firmware Table */ 182 #define ACPI_SIG_IORT "IORT" /* IO Remapping Table */ 183 #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */ 184 #define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */ 185 #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ 186 #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */ 187 #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */ 188 #define ACPI_SIG_MTMR "MTMR" /* MID Timer table */ 189 #define ACPI_SIG_SDEI "SDEI" /* Software Delegated Exception Interface Table */ 190 #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */ 191 #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */ 192 #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */ 193 #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */ 194 #define ACPI_SIG_TPM2 "TPM2" /* Trusted Platform Module 2.0 H/W interface table */ 195 #define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */ 196 #define ACPI_SIG_VRTC "VRTC" /* Virtual Real Time Clock Table */ 197 #define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */ 198 #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */ 199 #define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */ 200 #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */ 201 #define ACPI_SIG_WSMT "WSMT" /* Windows SMM Security Migrations Table */ 202 #define ACPI_SIG_XXXX "XXXX" /* Intermediate AML header for ASL/ASL+ converter */ 203 204 #ifdef ACPI_UNDEFINED_TABLES 205 /* 206 * These tables have been seen in the field, but no definition has been found 207 */ 208 #define ACPI_SIG_ATKG "ATKG" 209 #define ACPI_SIG_GSCI "GSCI" /* GMCH SCI table */ 210 #define ACPI_SIG_IEIT "IEIT" 211 #endif 212 213 /* 214 * All tables must be byte-packed to match the ACPI specification, since 215 * the tables are provided by the system BIOS. 216 */ 217 #pragma pack(1) 218 219 /* 220 * Note: C bitfields are not used for this reason: 221 * 222 * "Bitfields are great and easy to read, but unfortunately the C language 223 * does not specify the layout of bitfields in memory, which means they are 224 * essentially useless for dealing with packed data in on-disk formats or 225 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me, 226 * this decision was a design error in C. Ritchie could have picked an order 227 * and stuck with it." Norman Ramsey. 228 * See http://stackoverflow.com/a/1053662/41661 229 */ 230 231 232 /******************************************************************************* 233 * 234 * ASF - Alert Standard Format table (Signature "ASF!") 235 * Revision 0x10 236 * 237 * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003 238 * 239 ******************************************************************************/ 240 241 typedef struct acpi_table_asf 242 { 243 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 244 245 } ACPI_TABLE_ASF; 246 247 248 /* ASF subtable header */ 249 250 typedef struct acpi_asf_header 251 { 252 UINT8 Type; 253 UINT8 Reserved; 254 UINT16 Length; 255 256 } ACPI_ASF_HEADER; 257 258 259 /* Values for Type field above */ 260 261 enum AcpiAsfType 262 { 263 ACPI_ASF_TYPE_INFO = 0, 264 ACPI_ASF_TYPE_ALERT = 1, 265 ACPI_ASF_TYPE_CONTROL = 2, 266 ACPI_ASF_TYPE_BOOT = 3, 267 ACPI_ASF_TYPE_ADDRESS = 4, 268 ACPI_ASF_TYPE_RESERVED = 5 269 }; 270 271 /* 272 * ASF subtables 273 */ 274 275 /* 0: ASF Information */ 276 277 typedef struct acpi_asf_info 278 { 279 ACPI_ASF_HEADER Header; 280 UINT8 MinResetValue; 281 UINT8 MinPollInterval; 282 UINT16 SystemId; 283 UINT32 MfgId; 284 UINT8 Flags; 285 UINT8 Reserved2[3]; 286 287 } ACPI_ASF_INFO; 288 289 /* Masks for Flags field above */ 290 291 #define ACPI_ASF_SMBUS_PROTOCOLS (1) 292 293 294 /* 1: ASF Alerts */ 295 296 typedef struct acpi_asf_alert 297 { 298 ACPI_ASF_HEADER Header; 299 UINT8 AssertMask; 300 UINT8 DeassertMask; 301 UINT8 Alerts; 302 UINT8 DataLength; 303 304 } ACPI_ASF_ALERT; 305 306 typedef struct acpi_asf_alert_data 307 { 308 UINT8 Address; 309 UINT8 Command; 310 UINT8 Mask; 311 UINT8 Value; 312 UINT8 SensorType; 313 UINT8 Type; 314 UINT8 Offset; 315 UINT8 SourceType; 316 UINT8 Severity; 317 UINT8 SensorNumber; 318 UINT8 Entity; 319 UINT8 Instance; 320 321 } ACPI_ASF_ALERT_DATA; 322 323 324 /* 2: ASF Remote Control */ 325 326 typedef struct acpi_asf_remote 327 { 328 ACPI_ASF_HEADER Header; 329 UINT8 Controls; 330 UINT8 DataLength; 331 UINT16 Reserved2; 332 333 } ACPI_ASF_REMOTE; 334 335 typedef struct acpi_asf_control_data 336 { 337 UINT8 Function; 338 UINT8 Address; 339 UINT8 Command; 340 UINT8 Value; 341 342 } ACPI_ASF_CONTROL_DATA; 343 344 345 /* 3: ASF RMCP Boot Options */ 346 347 typedef struct acpi_asf_rmcp 348 { 349 ACPI_ASF_HEADER Header; 350 UINT8 Capabilities[7]; 351 UINT8 CompletionCode; 352 UINT32 EnterpriseId; 353 UINT8 Command; 354 UINT16 Parameter; 355 UINT16 BootOptions; 356 UINT16 OemParameters; 357 358 } ACPI_ASF_RMCP; 359 360 361 /* 4: ASF Address */ 362 363 typedef struct acpi_asf_address 364 { 365 ACPI_ASF_HEADER Header; 366 UINT8 EpromAddress; 367 UINT8 Devices; 368 369 } ACPI_ASF_ADDRESS; 370 371 372 /******************************************************************************* 373 * 374 * BOOT - Simple Boot Flag Table 375 * Version 1 376 * 377 * Conforms to the "Simple Boot Flag Specification", Version 2.1 378 * 379 ******************************************************************************/ 380 381 typedef struct acpi_table_boot 382 { 383 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 384 UINT8 CmosIndex; /* Index in CMOS RAM for the boot register */ 385 UINT8 Reserved[3]; 386 387 } ACPI_TABLE_BOOT; 388 389 390 /******************************************************************************* 391 * 392 * CSRT - Core System Resource Table 393 * Version 0 394 * 395 * Conforms to the "Core System Resource Table (CSRT)", November 14, 2011 396 * 397 ******************************************************************************/ 398 399 typedef struct acpi_table_csrt 400 { 401 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 402 403 } ACPI_TABLE_CSRT; 404 405 406 /* Resource Group subtable */ 407 408 typedef struct acpi_csrt_group 409 { 410 UINT32 Length; 411 UINT32 VendorId; 412 UINT32 SubvendorId; 413 UINT16 DeviceId; 414 UINT16 SubdeviceId; 415 UINT16 Revision; 416 UINT16 Reserved; 417 UINT32 SharedInfoLength; 418 419 /* Shared data immediately follows (Length = SharedInfoLength) */ 420 421 } ACPI_CSRT_GROUP; 422 423 /* Shared Info subtable */ 424 425 typedef struct acpi_csrt_shared_info 426 { 427 UINT16 MajorVersion; 428 UINT16 MinorVersion; 429 UINT32 MmioBaseLow; 430 UINT32 MmioBaseHigh; 431 UINT32 GsiInterrupt; 432 UINT8 InterruptPolarity; 433 UINT8 InterruptMode; 434 UINT8 NumChannels; 435 UINT8 DmaAddressWidth; 436 UINT16 BaseRequestLine; 437 UINT16 NumHandshakeSignals; 438 UINT32 MaxBlockSize; 439 440 /* Resource descriptors immediately follow (Length = Group Length - SharedInfoLength) */ 441 442 } ACPI_CSRT_SHARED_INFO; 443 444 /* Resource Descriptor subtable */ 445 446 typedef struct acpi_csrt_descriptor 447 { 448 UINT32 Length; 449 UINT16 Type; 450 UINT16 Subtype; 451 UINT32 Uid; 452 453 /* Resource-specific information immediately follows */ 454 455 } ACPI_CSRT_DESCRIPTOR; 456 457 458 /* Resource Types */ 459 460 #define ACPI_CSRT_TYPE_INTERRUPT 0x0001 461 #define ACPI_CSRT_TYPE_TIMER 0x0002 462 #define ACPI_CSRT_TYPE_DMA 0x0003 463 464 /* Resource Subtypes */ 465 466 #define ACPI_CSRT_XRUPT_LINE 0x0000 467 #define ACPI_CSRT_XRUPT_CONTROLLER 0x0001 468 #define ACPI_CSRT_TIMER 0x0000 469 #define ACPI_CSRT_DMA_CHANNEL 0x0000 470 #define ACPI_CSRT_DMA_CONTROLLER 0x0001 471 472 473 /******************************************************************************* 474 * 475 * DBG2 - Debug Port Table 2 476 * Version 0 (Both main table and subtables) 477 * 478 * Conforms to "Microsoft Debug Port Table 2 (DBG2)", December 10, 2015 479 * 480 ******************************************************************************/ 481 482 typedef struct acpi_table_dbg2 483 { 484 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 485 UINT32 InfoOffset; 486 UINT32 InfoCount; 487 488 } ACPI_TABLE_DBG2; 489 490 491 typedef struct acpi_dbg2_header 492 { 493 UINT32 InfoOffset; 494 UINT32 InfoCount; 495 496 } ACPI_DBG2_HEADER; 497 498 499 /* Debug Device Information Subtable */ 500 501 typedef struct acpi_dbg2_device 502 { 503 UINT8 Revision; 504 UINT16 Length; 505 UINT8 RegisterCount; /* Number of BaseAddress registers */ 506 UINT16 NamepathLength; 507 UINT16 NamepathOffset; 508 UINT16 OemDataLength; 509 UINT16 OemDataOffset; 510 UINT16 PortType; 511 UINT16 PortSubtype; 512 UINT16 Reserved; 513 UINT16 BaseAddressOffset; 514 UINT16 AddressSizeOffset; 515 /* 516 * Data that follows: 517 * BaseAddress (required) - Each in 12-byte Generic Address Structure format. 518 * AddressSize (required) - Array of UINT32 sizes corresponding to each BaseAddress register. 519 * Namepath (required) - Null terminated string. Single dot if not supported. 520 * OemData (optional) - Length is OemDataLength. 521 */ 522 } ACPI_DBG2_DEVICE; 523 524 /* Types for PortType field above */ 525 526 #define ACPI_DBG2_SERIAL_PORT 0x8000 527 #define ACPI_DBG2_1394_PORT 0x8001 528 #define ACPI_DBG2_USB_PORT 0x8002 529 #define ACPI_DBG2_NET_PORT 0x8003 530 531 /* Subtypes for PortSubtype field above */ 532 533 #define ACPI_DBG2_16550_COMPATIBLE 0x0000 534 #define ACPI_DBG2_16550_SUBSET 0x0001 535 #define ACPI_DBG2_ARM_PL011 0x0003 536 #define ACPI_DBG2_ARM_SBSA_32BIT 0x000D 537 #define ACPI_DBG2_ARM_SBSA_GENERIC 0x000E 538 #define ACPI_DBG2_ARM_DCC 0x000F 539 #define ACPI_DBG2_BCM2835 0x0010 540 541 #define ACPI_DBG2_1394_STANDARD 0x0000 542 543 #define ACPI_DBG2_USB_XHCI 0x0000 544 #define ACPI_DBG2_USB_EHCI 0x0001 545 546 547 /******************************************************************************* 548 * 549 * DBGP - Debug Port table 550 * Version 1 551 * 552 * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000 553 * 554 ******************************************************************************/ 555 556 typedef struct acpi_table_dbgp 557 { 558 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 559 UINT8 Type; /* 0=full 16550, 1=subset of 16550 */ 560 UINT8 Reserved[3]; 561 ACPI_GENERIC_ADDRESS DebugPort; 562 563 } ACPI_TABLE_DBGP; 564 565 566 /******************************************************************************* 567 * 568 * DMAR - DMA Remapping table 569 * Version 1 570 * 571 * Conforms to "Intel Virtualization Technology for Directed I/O", 572 * Version 2.3, October 2014 573 * 574 ******************************************************************************/ 575 576 typedef struct acpi_table_dmar 577 { 578 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 579 UINT8 Width; /* Host Address Width */ 580 UINT8 Flags; 581 UINT8 Reserved[10]; 582 583 } ACPI_TABLE_DMAR; 584 585 /* Masks for Flags field above */ 586 587 #define ACPI_DMAR_INTR_REMAP (1) 588 #define ACPI_DMAR_X2APIC_OPT_OUT (1<<1) 589 #define ACPI_DMAR_X2APIC_MODE (1<<2) 590 591 592 /* DMAR subtable header */ 593 594 typedef struct acpi_dmar_header 595 { 596 UINT16 Type; 597 UINT16 Length; 598 599 } ACPI_DMAR_HEADER; 600 601 /* Values for subtable type in ACPI_DMAR_HEADER */ 602 603 enum AcpiDmarType 604 { 605 ACPI_DMAR_TYPE_HARDWARE_UNIT = 0, 606 ACPI_DMAR_TYPE_RESERVED_MEMORY = 1, 607 ACPI_DMAR_TYPE_ROOT_ATS = 2, 608 ACPI_DMAR_TYPE_HARDWARE_AFFINITY = 3, 609 ACPI_DMAR_TYPE_NAMESPACE = 4, 610 ACPI_DMAR_TYPE_RESERVED = 5 /* 5 and greater are reserved */ 611 }; 612 613 614 /* DMAR Device Scope structure */ 615 616 typedef struct acpi_dmar_device_scope 617 { 618 UINT8 EntryType; 619 UINT8 Length; 620 UINT16 Reserved; 621 UINT8 EnumerationId; 622 UINT8 Bus; 623 624 } ACPI_DMAR_DEVICE_SCOPE; 625 626 /* Values for EntryType in ACPI_DMAR_DEVICE_SCOPE - device types */ 627 628 enum AcpiDmarScopeType 629 { 630 ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0, 631 ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1, 632 ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2, 633 ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3, 634 ACPI_DMAR_SCOPE_TYPE_HPET = 4, 635 ACPI_DMAR_SCOPE_TYPE_NAMESPACE = 5, 636 ACPI_DMAR_SCOPE_TYPE_RESERVED = 6 /* 6 and greater are reserved */ 637 }; 638 639 typedef struct acpi_dmar_pci_path 640 { 641 UINT8 Device; 642 UINT8 Function; 643 644 } ACPI_DMAR_PCI_PATH; 645 646 647 /* 648 * DMAR Subtables, correspond to Type in ACPI_DMAR_HEADER 649 */ 650 651 /* 0: Hardware Unit Definition */ 652 653 typedef struct acpi_dmar_hardware_unit 654 { 655 ACPI_DMAR_HEADER Header; 656 UINT8 Flags; 657 UINT8 Reserved; 658 UINT16 Segment; 659 UINT64 Address; /* Register Base Address */ 660 661 } ACPI_DMAR_HARDWARE_UNIT; 662 663 /* Masks for Flags field above */ 664 665 #define ACPI_DMAR_INCLUDE_ALL (1) 666 667 668 /* 1: Reserved Memory Defininition */ 669 670 typedef struct acpi_dmar_reserved_memory 671 { 672 ACPI_DMAR_HEADER Header; 673 UINT16 Reserved; 674 UINT16 Segment; 675 UINT64 BaseAddress; /* 4K aligned base address */ 676 UINT64 EndAddress; /* 4K aligned limit address */ 677 678 } ACPI_DMAR_RESERVED_MEMORY; 679 680 /* Masks for Flags field above */ 681 682 #define ACPI_DMAR_ALLOW_ALL (1) 683 684 685 /* 2: Root Port ATS Capability Reporting Structure */ 686 687 typedef struct acpi_dmar_atsr 688 { 689 ACPI_DMAR_HEADER Header; 690 UINT8 Flags; 691 UINT8 Reserved; 692 UINT16 Segment; 693 694 } ACPI_DMAR_ATSR; 695 696 /* Masks for Flags field above */ 697 698 #define ACPI_DMAR_ALL_PORTS (1) 699 700 701 /* 3: Remapping Hardware Static Affinity Structure */ 702 703 typedef struct acpi_dmar_rhsa 704 { 705 ACPI_DMAR_HEADER Header; 706 UINT32 Reserved; 707 UINT64 BaseAddress; 708 UINT32 ProximityDomain; 709 710 } ACPI_DMAR_RHSA; 711 712 713 /* 4: ACPI Namespace Device Declaration Structure */ 714 715 typedef struct acpi_dmar_andd 716 { 717 ACPI_DMAR_HEADER Header; 718 UINT8 Reserved[3]; 719 UINT8 DeviceNumber; 720 char DeviceName[1]; 721 722 } ACPI_DMAR_ANDD; 723 724 725 /******************************************************************************* 726 * 727 * HPET - High Precision Event Timer table 728 * Version 1 729 * 730 * Conforms to "IA-PC HPET (High Precision Event Timers) Specification", 731 * Version 1.0a, October 2004 732 * 733 ******************************************************************************/ 734 735 typedef struct acpi_table_hpet 736 { 737 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 738 UINT32 Id; /* Hardware ID of event timer block */ 739 ACPI_GENERIC_ADDRESS Address; /* Address of event timer block */ 740 UINT8 Sequence; /* HPET sequence number */ 741 UINT16 MinimumTick; /* Main counter min tick, periodic mode */ 742 UINT8 Flags; 743 744 } ACPI_TABLE_HPET; 745 746 /* Masks for Flags field above */ 747 748 #define ACPI_HPET_PAGE_PROTECT_MASK (3) 749 750 /* Values for Page Protect flags */ 751 752 enum AcpiHpetPageProtect 753 { 754 ACPI_HPET_NO_PAGE_PROTECT = 0, 755 ACPI_HPET_PAGE_PROTECT4 = 1, 756 ACPI_HPET_PAGE_PROTECT64 = 2 757 }; 758 759 760 /******************************************************************************* 761 * 762 * IBFT - Boot Firmware Table 763 * Version 1 764 * 765 * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b 766 * Specification", Version 1.01, March 1, 2007 767 * 768 * Note: It appears that this table is not intended to appear in the RSDT/XSDT. 769 * Therefore, it is not currently supported by the disassembler. 770 * 771 ******************************************************************************/ 772 773 typedef struct acpi_table_ibft 774 { 775 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 776 UINT8 Reserved[12]; 777 778 } ACPI_TABLE_IBFT; 779 780 781 /* IBFT common subtable header */ 782 783 typedef struct acpi_ibft_header 784 { 785 UINT8 Type; 786 UINT8 Version; 787 UINT16 Length; 788 UINT8 Index; 789 UINT8 Flags; 790 791 } ACPI_IBFT_HEADER; 792 793 /* Values for Type field above */ 794 795 enum AcpiIbftType 796 { 797 ACPI_IBFT_TYPE_NOT_USED = 0, 798 ACPI_IBFT_TYPE_CONTROL = 1, 799 ACPI_IBFT_TYPE_INITIATOR = 2, 800 ACPI_IBFT_TYPE_NIC = 3, 801 ACPI_IBFT_TYPE_TARGET = 4, 802 ACPI_IBFT_TYPE_EXTENSIONS = 5, 803 ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */ 804 }; 805 806 807 /* IBFT subtables */ 808 809 typedef struct acpi_ibft_control 810 { 811 ACPI_IBFT_HEADER Header; 812 UINT16 Extensions; 813 UINT16 InitiatorOffset; 814 UINT16 Nic0Offset; 815 UINT16 Target0Offset; 816 UINT16 Nic1Offset; 817 UINT16 Target1Offset; 818 819 } ACPI_IBFT_CONTROL; 820 821 typedef struct acpi_ibft_initiator 822 { 823 ACPI_IBFT_HEADER Header; 824 UINT8 SnsServer[16]; 825 UINT8 SlpServer[16]; 826 UINT8 PrimaryServer[16]; 827 UINT8 SecondaryServer[16]; 828 UINT16 NameLength; 829 UINT16 NameOffset; 830 831 } ACPI_IBFT_INITIATOR; 832 833 typedef struct acpi_ibft_nic 834 { 835 ACPI_IBFT_HEADER Header; 836 UINT8 IpAddress[16]; 837 UINT8 SubnetMaskPrefix; 838 UINT8 Origin; 839 UINT8 Gateway[16]; 840 UINT8 PrimaryDns[16]; 841 UINT8 SecondaryDns[16]; 842 UINT8 Dhcp[16]; 843 UINT16 Vlan; 844 UINT8 MacAddress[6]; 845 UINT16 PciAddress; 846 UINT16 NameLength; 847 UINT16 NameOffset; 848 849 } ACPI_IBFT_NIC; 850 851 typedef struct acpi_ibft_target 852 { 853 ACPI_IBFT_HEADER Header; 854 UINT8 TargetIpAddress[16]; 855 UINT16 TargetIpSocket; 856 UINT8 TargetBootLun[8]; 857 UINT8 ChapType; 858 UINT8 NicAssociation; 859 UINT16 TargetNameLength; 860 UINT16 TargetNameOffset; 861 UINT16 ChapNameLength; 862 UINT16 ChapNameOffset; 863 UINT16 ChapSecretLength; 864 UINT16 ChapSecretOffset; 865 UINT16 ReverseChapNameLength; 866 UINT16 ReverseChapNameOffset; 867 UINT16 ReverseChapSecretLength; 868 UINT16 ReverseChapSecretOffset; 869 870 } ACPI_IBFT_TARGET; 871 872 873 /******************************************************************************* 874 * 875 * IORT - IO Remapping Table 876 * 877 * Conforms to "IO Remapping Table System Software on ARM Platforms", 878 * Document number: ARM DEN 0049C, May 2017 879 * 880 ******************************************************************************/ 881 882 typedef struct acpi_table_iort 883 { 884 ACPI_TABLE_HEADER Header; 885 UINT32 NodeCount; 886 UINT32 NodeOffset; 887 UINT32 Reserved; 888 889 } ACPI_TABLE_IORT; 890 891 892 /* 893 * IORT subtables 894 */ 895 typedef struct acpi_iort_node 896 { 897 UINT8 Type; 898 UINT16 Length; 899 UINT8 Revision; 900 UINT32 Reserved; 901 UINT32 MappingCount; 902 UINT32 MappingOffset; 903 char NodeData[1]; 904 905 } ACPI_IORT_NODE; 906 907 /* Values for subtable Type above */ 908 909 enum AcpiIortNodeType 910 { 911 ACPI_IORT_NODE_ITS_GROUP = 0x00, 912 ACPI_IORT_NODE_NAMED_COMPONENT = 0x01, 913 ACPI_IORT_NODE_PCI_ROOT_COMPLEX = 0x02, 914 ACPI_IORT_NODE_SMMU = 0x03, 915 ACPI_IORT_NODE_SMMU_V3 = 0x04 916 }; 917 918 919 typedef struct acpi_iort_id_mapping 920 { 921 UINT32 InputBase; /* Lowest value in input range */ 922 UINT32 IdCount; /* Number of IDs */ 923 UINT32 OutputBase; /* Lowest value in output range */ 924 UINT32 OutputReference; /* A reference to the output node */ 925 UINT32 Flags; 926 927 } ACPI_IORT_ID_MAPPING; 928 929 /* Masks for Flags field above for IORT subtable */ 930 931 #define ACPI_IORT_ID_SINGLE_MAPPING (1) 932 933 934 typedef struct acpi_iort_memory_access 935 { 936 UINT32 CacheCoherency; 937 UINT8 Hints; 938 UINT16 Reserved; 939 UINT8 MemoryFlags; 940 941 } ACPI_IORT_MEMORY_ACCESS; 942 943 /* Values for CacheCoherency field above */ 944 945 #define ACPI_IORT_NODE_COHERENT 0x00000001 /* The device node is fully coherent */ 946 #define ACPI_IORT_NODE_NOT_COHERENT 0x00000000 /* The device node is not coherent */ 947 948 /* Masks for Hints field above */ 949 950 #define ACPI_IORT_HT_TRANSIENT (1) 951 #define ACPI_IORT_HT_WRITE (1<<1) 952 #define ACPI_IORT_HT_READ (1<<2) 953 #define ACPI_IORT_HT_OVERRIDE (1<<3) 954 955 /* Masks for MemoryFlags field above */ 956 957 #define ACPI_IORT_MF_COHERENCY (1) 958 #define ACPI_IORT_MF_ATTRIBUTES (1<<1) 959 960 961 /* 962 * IORT node specific subtables 963 */ 964 typedef struct acpi_iort_its_group 965 { 966 UINT32 ItsCount; 967 UINT32 Identifiers[1]; /* GIC ITS identifier arrary */ 968 969 } ACPI_IORT_ITS_GROUP; 970 971 972 typedef struct acpi_iort_named_component 973 { 974 UINT32 NodeFlags; 975 UINT64 MemoryProperties; /* Memory access properties */ 976 UINT8 MemoryAddressLimit; /* Memory address size limit */ 977 char DeviceName[1]; /* Path of namespace object */ 978 979 } ACPI_IORT_NAMED_COMPONENT; 980 981 982 typedef struct acpi_iort_root_complex 983 { 984 UINT64 MemoryProperties; /* Memory access properties */ 985 UINT32 AtsAttribute; 986 UINT32 PciSegmentNumber; 987 988 } ACPI_IORT_ROOT_COMPLEX; 989 990 /* Values for AtsAttribute field above */ 991 992 #define ACPI_IORT_ATS_SUPPORTED 0x00000001 /* The root complex supports ATS */ 993 #define ACPI_IORT_ATS_UNSUPPORTED 0x00000000 /* The root complex doesn't support ATS */ 994 995 996 typedef struct acpi_iort_smmu 997 { 998 UINT64 BaseAddress; /* SMMU base address */ 999 UINT64 Span; /* Length of memory range */ 1000 UINT32 Model; 1001 UINT32 Flags; 1002 UINT32 GlobalInterruptOffset; 1003 UINT32 ContextInterruptCount; 1004 UINT32 ContextInterruptOffset; 1005 UINT32 PmuInterruptCount; 1006 UINT32 PmuInterruptOffset; 1007 UINT64 Interrupts[1]; /* Interrupt array */ 1008 1009 } ACPI_IORT_SMMU; 1010 1011 /* Values for Model field above */ 1012 1013 #define ACPI_IORT_SMMU_V1 0x00000000 /* Generic SMMUv1 */ 1014 #define ACPI_IORT_SMMU_V2 0x00000001 /* Generic SMMUv2 */ 1015 #define ACPI_IORT_SMMU_CORELINK_MMU400 0x00000002 /* ARM Corelink MMU-400 */ 1016 #define ACPI_IORT_SMMU_CORELINK_MMU500 0x00000003 /* ARM Corelink MMU-500 */ 1017 #define ACPI_IORT_SMMU_CORELINK_MMU401 0x00000004 /* ARM Corelink MMU-401 */ 1018 #define ACPI_IORT_SMMU_CAVIUM_THUNDERX 0x00000005 /* Cavium ThunderX SMMUv2 */ 1019 1020 /* Masks for Flags field above */ 1021 1022 #define ACPI_IORT_SMMU_DVM_SUPPORTED (1) 1023 #define ACPI_IORT_SMMU_COHERENT_WALK (1<<1) 1024 1025 /* Global interrupt format */ 1026 1027 typedef struct acpi_iort_smmu_gsi 1028 { 1029 UINT32 NSgIrpt; 1030 UINT32 NSgIrptFlags; 1031 UINT32 NSgCfgIrpt; 1032 UINT32 NSgCfgIrptFlags; 1033 1034 } ACPI_IORT_SMMU_GSI; 1035 1036 1037 typedef struct acpi_iort_smmu_v3 1038 { 1039 UINT64 BaseAddress; /* SMMUv3 base address */ 1040 UINT32 Flags; 1041 UINT32 Reserved; 1042 UINT64 VatosAddress; 1043 UINT32 Model; 1044 UINT32 EventGsiv; 1045 UINT32 PriGsiv; 1046 UINT32 GerrGsiv; 1047 UINT32 SyncGsiv; 1048 UINT8 Pxm; 1049 UINT8 Reserved1; 1050 UINT16 Reserved2; 1051 1052 } ACPI_IORT_SMMU_V3; 1053 1054 /* Values for Model field above */ 1055 1056 #define ACPI_IORT_SMMU_V3_GENERIC 0x00000000 /* Generic SMMUv3 */ 1057 #define ACPI_IORT_SMMU_V3_HISILICON_HI161X 0x00000001 /* HiSilicon Hi161x SMMUv3 */ 1058 #define ACPI_IORT_SMMU_V3_CAVIUM_CN99XX 0x00000002 /* Cavium CN99xx SMMUv3 */ 1059 1060 /* Masks for Flags field above */ 1061 1062 #define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1) 1063 #define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (1<<1) 1064 #define ACPI_IORT_SMMU_V3_PXM_VALID (1<<3) 1065 1066 1067 /******************************************************************************* 1068 * 1069 * IVRS - I/O Virtualization Reporting Structure 1070 * Version 1 1071 * 1072 * Conforms to "AMD I/O Virtualization Technology (IOMMU) Specification", 1073 * Revision 1.26, February 2009. 1074 * 1075 ******************************************************************************/ 1076 1077 typedef struct acpi_table_ivrs 1078 { 1079 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1080 UINT32 Info; /* Common virtualization info */ 1081 UINT64 Reserved; 1082 1083 } ACPI_TABLE_IVRS; 1084 1085 /* Values for Info field above */ 1086 1087 #define ACPI_IVRS_PHYSICAL_SIZE 0x00007F00 /* 7 bits, physical address size */ 1088 #define ACPI_IVRS_VIRTUAL_SIZE 0x003F8000 /* 7 bits, virtual address size */ 1089 #define ACPI_IVRS_ATS_RESERVED 0x00400000 /* ATS address translation range reserved */ 1090 1091 1092 /* IVRS subtable header */ 1093 1094 typedef struct acpi_ivrs_header 1095 { 1096 UINT8 Type; /* Subtable type */ 1097 UINT8 Flags; 1098 UINT16 Length; /* Subtable length */ 1099 UINT16 DeviceId; /* ID of IOMMU */ 1100 1101 } ACPI_IVRS_HEADER; 1102 1103 /* Values for subtable Type above */ 1104 1105 enum AcpiIvrsType 1106 { 1107 ACPI_IVRS_TYPE_HARDWARE = 0x10, 1108 ACPI_IVRS_TYPE_MEMORY1 = 0x20, 1109 ACPI_IVRS_TYPE_MEMORY2 = 0x21, 1110 ACPI_IVRS_TYPE_MEMORY3 = 0x22 1111 }; 1112 1113 /* Masks for Flags field above for IVHD subtable */ 1114 1115 #define ACPI_IVHD_TT_ENABLE (1) 1116 #define ACPI_IVHD_PASS_PW (1<<1) 1117 #define ACPI_IVHD_RES_PASS_PW (1<<2) 1118 #define ACPI_IVHD_ISOC (1<<3) 1119 #define ACPI_IVHD_IOTLB (1<<4) 1120 1121 /* Masks for Flags field above for IVMD subtable */ 1122 1123 #define ACPI_IVMD_UNITY (1) 1124 #define ACPI_IVMD_READ (1<<1) 1125 #define ACPI_IVMD_WRITE (1<<2) 1126 #define ACPI_IVMD_EXCLUSION_RANGE (1<<3) 1127 1128 1129 /* 1130 * IVRS subtables, correspond to Type in ACPI_IVRS_HEADER 1131 */ 1132 1133 /* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */ 1134 1135 typedef struct acpi_ivrs_hardware 1136 { 1137 ACPI_IVRS_HEADER Header; 1138 UINT16 CapabilityOffset; /* Offset for IOMMU control fields */ 1139 UINT64 BaseAddress; /* IOMMU control registers */ 1140 UINT16 PciSegmentGroup; 1141 UINT16 Info; /* MSI number and unit ID */ 1142 UINT32 Reserved; 1143 1144 } ACPI_IVRS_HARDWARE; 1145 1146 /* Masks for Info field above */ 1147 1148 #define ACPI_IVHD_MSI_NUMBER_MASK 0x001F /* 5 bits, MSI message number */ 1149 #define ACPI_IVHD_UNIT_ID_MASK 0x1F00 /* 5 bits, UnitID */ 1150 1151 1152 /* 1153 * Device Entries for IVHD subtable, appear after ACPI_IVRS_HARDWARE structure. 1154 * Upper two bits of the Type field are the (encoded) length of the structure. 1155 * Currently, only 4 and 8 byte entries are defined. 16 and 32 byte entries 1156 * are reserved for future use but not defined. 1157 */ 1158 typedef struct acpi_ivrs_de_header 1159 { 1160 UINT8 Type; 1161 UINT16 Id; 1162 UINT8 DataSetting; 1163 1164 } ACPI_IVRS_DE_HEADER; 1165 1166 /* Length of device entry is in the top two bits of Type field above */ 1167 1168 #define ACPI_IVHD_ENTRY_LENGTH 0xC0 1169 1170 /* Values for device entry Type field above */ 1171 1172 enum AcpiIvrsDeviceEntryType 1173 { 1174 /* 4-byte device entries, all use ACPI_IVRS_DEVICE4 */ 1175 1176 ACPI_IVRS_TYPE_PAD4 = 0, 1177 ACPI_IVRS_TYPE_ALL = 1, 1178 ACPI_IVRS_TYPE_SELECT = 2, 1179 ACPI_IVRS_TYPE_START = 3, 1180 ACPI_IVRS_TYPE_END = 4, 1181 1182 /* 8-byte device entries */ 1183 1184 ACPI_IVRS_TYPE_PAD8 = 64, 1185 ACPI_IVRS_TYPE_NOT_USED = 65, 1186 ACPI_IVRS_TYPE_ALIAS_SELECT = 66, /* Uses ACPI_IVRS_DEVICE8A */ 1187 ACPI_IVRS_TYPE_ALIAS_START = 67, /* Uses ACPI_IVRS_DEVICE8A */ 1188 ACPI_IVRS_TYPE_EXT_SELECT = 70, /* Uses ACPI_IVRS_DEVICE8B */ 1189 ACPI_IVRS_TYPE_EXT_START = 71, /* Uses ACPI_IVRS_DEVICE8B */ 1190 ACPI_IVRS_TYPE_SPECIAL = 72 /* Uses ACPI_IVRS_DEVICE8C */ 1191 }; 1192 1193 /* Values for Data field above */ 1194 1195 #define ACPI_IVHD_INIT_PASS (1) 1196 #define ACPI_IVHD_EINT_PASS (1<<1) 1197 #define ACPI_IVHD_NMI_PASS (1<<2) 1198 #define ACPI_IVHD_SYSTEM_MGMT (3<<4) 1199 #define ACPI_IVHD_LINT0_PASS (1<<6) 1200 #define ACPI_IVHD_LINT1_PASS (1<<7) 1201 1202 1203 /* Types 0-4: 4-byte device entry */ 1204 1205 typedef struct acpi_ivrs_device4 1206 { 1207 ACPI_IVRS_DE_HEADER Header; 1208 1209 } ACPI_IVRS_DEVICE4; 1210 1211 /* Types 66-67: 8-byte device entry */ 1212 1213 typedef struct acpi_ivrs_device8a 1214 { 1215 ACPI_IVRS_DE_HEADER Header; 1216 UINT8 Reserved1; 1217 UINT16 UsedId; 1218 UINT8 Reserved2; 1219 1220 } ACPI_IVRS_DEVICE8A; 1221 1222 /* Types 70-71: 8-byte device entry */ 1223 1224 typedef struct acpi_ivrs_device8b 1225 { 1226 ACPI_IVRS_DE_HEADER Header; 1227 UINT32 ExtendedData; 1228 1229 } ACPI_IVRS_DEVICE8B; 1230 1231 /* Values for ExtendedData above */ 1232 1233 #define ACPI_IVHD_ATS_DISABLED (1<<31) 1234 1235 /* Type 72: 8-byte device entry */ 1236 1237 typedef struct acpi_ivrs_device8c 1238 { 1239 ACPI_IVRS_DE_HEADER Header; 1240 UINT8 Handle; 1241 UINT16 UsedId; 1242 UINT8 Variety; 1243 1244 } ACPI_IVRS_DEVICE8C; 1245 1246 /* Values for Variety field above */ 1247 1248 #define ACPI_IVHD_IOAPIC 1 1249 #define ACPI_IVHD_HPET 2 1250 1251 1252 /* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */ 1253 1254 typedef struct acpi_ivrs_memory 1255 { 1256 ACPI_IVRS_HEADER Header; 1257 UINT16 AuxData; 1258 UINT64 Reserved; 1259 UINT64 StartAddress; 1260 UINT64 MemoryLength; 1261 1262 } ACPI_IVRS_MEMORY; 1263 1264 1265 /******************************************************************************* 1266 * 1267 * LPIT - Low Power Idle Table 1268 * 1269 * Conforms to "ACPI Low Power Idle Table (LPIT)" July 2014. 1270 * 1271 ******************************************************************************/ 1272 1273 typedef struct acpi_table_lpit 1274 { 1275 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1276 1277 } ACPI_TABLE_LPIT; 1278 1279 1280 /* LPIT subtable header */ 1281 1282 typedef struct acpi_lpit_header 1283 { 1284 UINT32 Type; /* Subtable type */ 1285 UINT32 Length; /* Subtable length */ 1286 UINT16 UniqueId; 1287 UINT16 Reserved; 1288 UINT32 Flags; 1289 1290 } ACPI_LPIT_HEADER; 1291 1292 /* Values for subtable Type above */ 1293 1294 enum AcpiLpitType 1295 { 1296 ACPI_LPIT_TYPE_NATIVE_CSTATE = 0x00, 1297 ACPI_LPIT_TYPE_RESERVED = 0x01 /* 1 and above are reserved */ 1298 }; 1299 1300 /* Masks for Flags field above */ 1301 1302 #define ACPI_LPIT_STATE_DISABLED (1) 1303 #define ACPI_LPIT_NO_COUNTER (1<<1) 1304 1305 /* 1306 * LPIT subtables, correspond to Type in ACPI_LPIT_HEADER 1307 */ 1308 1309 /* 0x00: Native C-state instruction based LPI structure */ 1310 1311 typedef struct acpi_lpit_native 1312 { 1313 ACPI_LPIT_HEADER Header; 1314 ACPI_GENERIC_ADDRESS EntryTrigger; 1315 UINT32 Residency; 1316 UINT32 Latency; 1317 ACPI_GENERIC_ADDRESS ResidencyCounter; 1318 UINT64 CounterFrequency; 1319 1320 } ACPI_LPIT_NATIVE; 1321 1322 1323 /******************************************************************************* 1324 * 1325 * MCFG - PCI Memory Mapped Configuration table and subtable 1326 * Version 1 1327 * 1328 * Conforms to "PCI Firmware Specification", Revision 3.0, June 20, 2005 1329 * 1330 ******************************************************************************/ 1331 1332 typedef struct acpi_table_mcfg 1333 { 1334 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1335 UINT8 Reserved[8]; 1336 1337 } ACPI_TABLE_MCFG; 1338 1339 1340 /* Subtable */ 1341 1342 typedef struct acpi_mcfg_allocation 1343 { 1344 UINT64 Address; /* Base address, processor-relative */ 1345 UINT16 PciSegment; /* PCI segment group number */ 1346 UINT8 StartBusNumber; /* Starting PCI Bus number */ 1347 UINT8 EndBusNumber; /* Final PCI Bus number */ 1348 UINT32 Reserved; 1349 1350 } ACPI_MCFG_ALLOCATION; 1351 1352 1353 /******************************************************************************* 1354 * 1355 * MCHI - Management Controller Host Interface Table 1356 * Version 1 1357 * 1358 * Conforms to "Management Component Transport Protocol (MCTP) Host 1359 * Interface Specification", Revision 1.0.0a, October 13, 2009 1360 * 1361 ******************************************************************************/ 1362 1363 typedef struct acpi_table_mchi 1364 { 1365 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1366 UINT8 InterfaceType; 1367 UINT8 Protocol; 1368 UINT64 ProtocolData; 1369 UINT8 InterruptType; 1370 UINT8 Gpe; 1371 UINT8 PciDeviceFlag; 1372 UINT32 GlobalInterrupt; 1373 ACPI_GENERIC_ADDRESS ControlRegister; 1374 UINT8 PciSegment; 1375 UINT8 PciBus; 1376 UINT8 PciDevice; 1377 UINT8 PciFunction; 1378 1379 } ACPI_TABLE_MCHI; 1380 1381 1382 /******************************************************************************* 1383 * 1384 * MSDM - Microsoft Data Management table 1385 * 1386 * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)", 1387 * November 29, 2011. Copyright 2011 Microsoft 1388 * 1389 ******************************************************************************/ 1390 1391 /* Basic MSDM table is only the common ACPI header */ 1392 1393 typedef struct acpi_table_msdm 1394 { 1395 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1396 1397 } ACPI_TABLE_MSDM; 1398 1399 1400 /******************************************************************************* 1401 * 1402 * MTMR - MID Timer Table 1403 * Version 1 1404 * 1405 * Conforms to "Simple Firmware Interface Specification", 1406 * Draft 0.8.2, Oct 19, 2010 1407 * NOTE: The ACPI MTMR is equivalent to the SFI MTMR table. 1408 * 1409 ******************************************************************************/ 1410 1411 typedef struct acpi_table_mtmr 1412 { 1413 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1414 1415 } ACPI_TABLE_MTMR; 1416 1417 /* MTMR entry */ 1418 1419 typedef struct acpi_mtmr_entry 1420 { 1421 ACPI_GENERIC_ADDRESS PhysicalAddress; 1422 UINT32 Frequency; 1423 UINT32 Irq; 1424 1425 } ACPI_MTMR_ENTRY; 1426 1427 /******************************************************************************* 1428 * 1429 * SDEI - Software Delegated Exception Interface Descriptor Table 1430 * 1431 * Conforms to "Software Delegated Exception Interface (SDEI)" ARM DEN0054A, 1432 * May 8th, 2017. Copyright 2017 ARM Ltd. 1433 * 1434 ******************************************************************************/ 1435 1436 typedef struct acpi_table_sdei 1437 { 1438 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1439 1440 } ACPI_TABLE_SDEI; 1441 1442 1443 /******************************************************************************* 1444 * 1445 * SLIC - Software Licensing Description Table 1446 * 1447 * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)", 1448 * November 29, 2011. Copyright 2011 Microsoft 1449 * 1450 ******************************************************************************/ 1451 1452 /* Basic SLIC table is only the common ACPI header */ 1453 1454 typedef struct acpi_table_slic 1455 { 1456 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1457 1458 } ACPI_TABLE_SLIC; 1459 1460 1461 /******************************************************************************* 1462 * 1463 * SPCR - Serial Port Console Redirection table 1464 * Version 2 1465 * 1466 * Conforms to "Serial Port Console Redirection Table", 1467 * Version 1.03, August 10, 2015 1468 * 1469 ******************************************************************************/ 1470 1471 typedef struct acpi_table_spcr 1472 { 1473 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1474 UINT8 InterfaceType; /* 0=full 16550, 1=subset of 16550 */ 1475 UINT8 Reserved[3]; 1476 ACPI_GENERIC_ADDRESS SerialPort; 1477 UINT8 InterruptType; 1478 UINT8 PcInterrupt; 1479 UINT32 Interrupt; 1480 UINT8 BaudRate; 1481 UINT8 Parity; 1482 UINT8 StopBits; 1483 UINT8 FlowControl; 1484 UINT8 TerminalType; 1485 UINT8 Reserved1; 1486 UINT16 PciDeviceId; 1487 UINT16 PciVendorId; 1488 UINT8 PciBus; 1489 UINT8 PciDevice; 1490 UINT8 PciFunction; 1491 UINT32 PciFlags; 1492 UINT8 PciSegment; 1493 UINT32 Reserved2; 1494 1495 } ACPI_TABLE_SPCR; 1496 1497 /* Masks for PciFlags field above */ 1498 1499 #define ACPI_SPCR_DO_NOT_DISABLE (1) 1500 1501 /* Values for Interface Type: See the definition of the DBG2 table */ 1502 1503 1504 /******************************************************************************* 1505 * 1506 * SPMI - Server Platform Management Interface table 1507 * Version 5 1508 * 1509 * Conforms to "Intelligent Platform Management Interface Specification 1510 * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with 1511 * June 12, 2009 markup. 1512 * 1513 ******************************************************************************/ 1514 1515 typedef struct acpi_table_spmi 1516 { 1517 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1518 UINT8 InterfaceType; 1519 UINT8 Reserved; /* Must be 1 */ 1520 UINT16 SpecRevision; /* Version of IPMI */ 1521 UINT8 InterruptType; 1522 UINT8 GpeNumber; /* GPE assigned */ 1523 UINT8 Reserved1; 1524 UINT8 PciDeviceFlag; 1525 UINT32 Interrupt; 1526 ACPI_GENERIC_ADDRESS IpmiRegister; 1527 UINT8 PciSegment; 1528 UINT8 PciBus; 1529 UINT8 PciDevice; 1530 UINT8 PciFunction; 1531 UINT8 Reserved2; 1532 1533 } ACPI_TABLE_SPMI; 1534 1535 /* Values for InterfaceType above */ 1536 1537 enum AcpiSpmiInterfaceTypes 1538 { 1539 ACPI_SPMI_NOT_USED = 0, 1540 ACPI_SPMI_KEYBOARD = 1, 1541 ACPI_SPMI_SMI = 2, 1542 ACPI_SPMI_BLOCK_TRANSFER = 3, 1543 ACPI_SPMI_SMBUS = 4, 1544 ACPI_SPMI_RESERVED = 5 /* 5 and above are reserved */ 1545 }; 1546 1547 1548 /******************************************************************************* 1549 * 1550 * TCPA - Trusted Computing Platform Alliance table 1551 * Version 2 1552 * 1553 * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0", 1554 * Version 1.2, Revision 8 1555 * February 27, 2017 1556 * 1557 * NOTE: There are two versions of the table with the same signature -- 1558 * the client version and the server version. The common PlatformClass 1559 * field is used to differentiate the two types of tables. 1560 * 1561 ******************************************************************************/ 1562 1563 typedef struct acpi_table_tcpa_hdr 1564 { 1565 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1566 UINT16 PlatformClass; 1567 1568 } ACPI_TABLE_TCPA_HDR; 1569 1570 /* 1571 * Values for PlatformClass above. 1572 * This is how the client and server subtables are differentiated 1573 */ 1574 #define ACPI_TCPA_CLIENT_TABLE 0 1575 #define ACPI_TCPA_SERVER_TABLE 1 1576 1577 1578 typedef struct acpi_table_tcpa_client 1579 { 1580 UINT32 MinimumLogLength; /* Minimum length for the event log area */ 1581 UINT64 LogAddress; /* Address of the event log area */ 1582 1583 } ACPI_TABLE_TCPA_CLIENT; 1584 1585 typedef struct acpi_table_tcpa_server 1586 { 1587 UINT16 Reserved; 1588 UINT64 MinimumLogLength; /* Minimum length for the event log area */ 1589 UINT64 LogAddress; /* Address of the event log area */ 1590 UINT16 SpecRevision; 1591 UINT8 DeviceFlags; 1592 UINT8 InterruptFlags; 1593 UINT8 GpeNumber; 1594 UINT8 Reserved2[3]; 1595 UINT32 GlobalInterrupt; 1596 ACPI_GENERIC_ADDRESS Address; 1597 UINT32 Reserved3; 1598 ACPI_GENERIC_ADDRESS ConfigAddress; 1599 UINT8 Group; 1600 UINT8 Bus; /* PCI Bus/Segment/Function numbers */ 1601 UINT8 Device; 1602 UINT8 Function; 1603 1604 } ACPI_TABLE_TCPA_SERVER; 1605 1606 /* Values for DeviceFlags above */ 1607 1608 #define ACPI_TCPA_PCI_DEVICE (1) 1609 #define ACPI_TCPA_BUS_PNP (1<<1) 1610 #define ACPI_TCPA_ADDRESS_VALID (1<<2) 1611 1612 /* Values for InterruptFlags above */ 1613 1614 #define ACPI_TCPA_INTERRUPT_MODE (1) 1615 #define ACPI_TCPA_INTERRUPT_POLARITY (1<<1) 1616 #define ACPI_TCPA_SCI_VIA_GPE (1<<2) 1617 #define ACPI_TCPA_GLOBAL_INTERRUPT (1<<3) 1618 1619 1620 /******************************************************************************* 1621 * 1622 * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table 1623 * Version 4 1624 * 1625 * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0", 1626 * Version 1.2, Revision 8 1627 * February 27, 2017 1628 * 1629 ******************************************************************************/ 1630 1631 typedef struct acpi_table_tpm2 1632 { 1633 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1634 UINT16 PlatformClass; 1635 UINT16 Reserved; 1636 UINT64 ControlAddress; 1637 UINT32 StartMethod; 1638 1639 /* Platform-specific data follows */ 1640 1641 } ACPI_TABLE_TPM2; 1642 1643 /* Values for StartMethod above */ 1644 1645 #define ACPI_TPM2_NOT_ALLOWED 0 1646 #define ACPI_TPM2_START_METHOD 2 1647 #define ACPI_TPM2_MEMORY_MAPPED 6 1648 #define ACPI_TPM2_COMMAND_BUFFER 7 1649 #define ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD 8 1650 #define ACPI_TPM2_COMMAND_BUFFER_WITH_ARM_SMC 11 /* V1.2 Rev 8 */ 1651 1652 1653 /* Trailer appears after any StartMethod subtables */ 1654 1655 typedef struct acpi_tpm2_trailer 1656 { 1657 UINT32 MinimumLogLength; /* Minimum length for the event log area */ 1658 UINT64 LogAddress; /* Address of the event log area */ 1659 1660 } ACPI_TPM2_TRAILER; 1661 1662 1663 /* 1664 * Subtables (StartMethod-specific) 1665 */ 1666 1667 /* 11: Start Method for ARM SMC (V1.2 Rev 8) */ 1668 1669 typedef struct acpi_tpm2_arm_smc 1670 { 1671 UINT32 GlobalInterrupt; 1672 UINT8 InterruptFlags; 1673 UINT8 OperationFlags; 1674 UINT16 Reserved; 1675 UINT32 FunctionId; 1676 1677 } ACPI_TPM2_ARM_SMC; 1678 1679 /* Values for InterruptFlags above */ 1680 1681 #define ACPI_TPM2_INTERRUPT_SUPPORT (1) 1682 1683 /* Values for OperationFlags above */ 1684 1685 #define ACPI_TPM2_IDLE_SUPPORT (1) 1686 1687 1688 /******************************************************************************* 1689 * 1690 * UEFI - UEFI Boot optimization Table 1691 * Version 1 1692 * 1693 * Conforms to "Unified Extensible Firmware Interface Specification", 1694 * Version 2.3, May 8, 2009 1695 * 1696 ******************************************************************************/ 1697 1698 typedef struct acpi_table_uefi 1699 { 1700 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1701 UINT8 Identifier[16]; /* UUID identifier */ 1702 UINT16 DataOffset; /* Offset of remaining data in table */ 1703 1704 } ACPI_TABLE_UEFI; 1705 1706 1707 /******************************************************************************* 1708 * 1709 * VRTC - Virtual Real Time Clock Table 1710 * Version 1 1711 * 1712 * Conforms to "Simple Firmware Interface Specification", 1713 * Draft 0.8.2, Oct 19, 2010 1714 * NOTE: The ACPI VRTC is equivalent to The SFI MRTC table. 1715 * 1716 ******************************************************************************/ 1717 1718 typedef struct acpi_table_vrtc 1719 { 1720 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1721 1722 } ACPI_TABLE_VRTC; 1723 1724 /* VRTC entry */ 1725 1726 typedef struct acpi_vrtc_entry 1727 { 1728 ACPI_GENERIC_ADDRESS PhysicalAddress; 1729 UINT32 Irq; 1730 1731 } ACPI_VRTC_ENTRY; 1732 1733 1734 /******************************************************************************* 1735 * 1736 * WAET - Windows ACPI Emulated devices Table 1737 * Version 1 1738 * 1739 * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009 1740 * 1741 ******************************************************************************/ 1742 1743 typedef struct acpi_table_waet 1744 { 1745 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1746 UINT32 Flags; 1747 1748 } ACPI_TABLE_WAET; 1749 1750 /* Masks for Flags field above */ 1751 1752 #define ACPI_WAET_RTC_NO_ACK (1) /* RTC requires no int acknowledge */ 1753 #define ACPI_WAET_TIMER_ONE_READ (1<<1) /* PM timer requires only one read */ 1754 1755 1756 /******************************************************************************* 1757 * 1758 * WDAT - Watchdog Action Table 1759 * Version 1 1760 * 1761 * Conforms to "Hardware Watchdog Timers Design Specification", 1762 * Copyright 2006 Microsoft Corporation. 1763 * 1764 ******************************************************************************/ 1765 1766 typedef struct acpi_table_wdat 1767 { 1768 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1769 UINT32 HeaderLength; /* Watchdog Header Length */ 1770 UINT16 PciSegment; /* PCI Segment number */ 1771 UINT8 PciBus; /* PCI Bus number */ 1772 UINT8 PciDevice; /* PCI Device number */ 1773 UINT8 PciFunction; /* PCI Function number */ 1774 UINT8 Reserved[3]; 1775 UINT32 TimerPeriod; /* Period of one timer count (msec) */ 1776 UINT32 MaxCount; /* Maximum counter value supported */ 1777 UINT32 MinCount; /* Minimum counter value */ 1778 UINT8 Flags; 1779 UINT8 Reserved2[3]; 1780 UINT32 Entries; /* Number of watchdog entries that follow */ 1781 1782 } ACPI_TABLE_WDAT; 1783 1784 /* Masks for Flags field above */ 1785 1786 #define ACPI_WDAT_ENABLED (1) 1787 #define ACPI_WDAT_STOPPED 0x80 1788 1789 1790 /* WDAT Instruction Entries (actions) */ 1791 1792 typedef struct acpi_wdat_entry 1793 { 1794 UINT8 Action; 1795 UINT8 Instruction; 1796 UINT16 Reserved; 1797 ACPI_GENERIC_ADDRESS RegisterRegion; 1798 UINT32 Value; /* Value used with Read/Write register */ 1799 UINT32 Mask; /* Bitmask required for this register instruction */ 1800 1801 } ACPI_WDAT_ENTRY; 1802 1803 /* Values for Action field above */ 1804 1805 enum AcpiWdatActions 1806 { 1807 ACPI_WDAT_RESET = 1, 1808 ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4, 1809 ACPI_WDAT_GET_COUNTDOWN = 5, 1810 ACPI_WDAT_SET_COUNTDOWN = 6, 1811 ACPI_WDAT_GET_RUNNING_STATE = 8, 1812 ACPI_WDAT_SET_RUNNING_STATE = 9, 1813 ACPI_WDAT_GET_STOPPED_STATE = 10, 1814 ACPI_WDAT_SET_STOPPED_STATE = 11, 1815 ACPI_WDAT_GET_REBOOT = 16, 1816 ACPI_WDAT_SET_REBOOT = 17, 1817 ACPI_WDAT_GET_SHUTDOWN = 18, 1818 ACPI_WDAT_SET_SHUTDOWN = 19, 1819 ACPI_WDAT_GET_STATUS = 32, 1820 ACPI_WDAT_SET_STATUS = 33, 1821 ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */ 1822 }; 1823 1824 /* Values for Instruction field above */ 1825 1826 enum AcpiWdatInstructions 1827 { 1828 ACPI_WDAT_READ_VALUE = 0, 1829 ACPI_WDAT_READ_COUNTDOWN = 1, 1830 ACPI_WDAT_WRITE_VALUE = 2, 1831 ACPI_WDAT_WRITE_COUNTDOWN = 3, 1832 ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */ 1833 ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */ 1834 }; 1835 1836 1837 /******************************************************************************* 1838 * 1839 * WDDT - Watchdog Descriptor Table 1840 * Version 1 1841 * 1842 * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)", 1843 * Version 001, September 2002 1844 * 1845 ******************************************************************************/ 1846 1847 typedef struct acpi_table_wddt 1848 { 1849 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1850 UINT16 SpecVersion; 1851 UINT16 TableVersion; 1852 UINT16 PciVendorId; 1853 ACPI_GENERIC_ADDRESS Address; 1854 UINT16 MaxCount; /* Maximum counter value supported */ 1855 UINT16 MinCount; /* Minimum counter value supported */ 1856 UINT16 Period; 1857 UINT16 Status; 1858 UINT16 Capability; 1859 1860 } ACPI_TABLE_WDDT; 1861 1862 /* Flags for Status field above */ 1863 1864 #define ACPI_WDDT_AVAILABLE (1) 1865 #define ACPI_WDDT_ACTIVE (1<<1) 1866 #define ACPI_WDDT_TCO_OS_OWNED (1<<2) 1867 #define ACPI_WDDT_USER_RESET (1<<11) 1868 #define ACPI_WDDT_WDT_RESET (1<<12) 1869 #define ACPI_WDDT_POWER_FAIL (1<<13) 1870 #define ACPI_WDDT_UNKNOWN_RESET (1<<14) 1871 1872 /* Flags for Capability field above */ 1873 1874 #define ACPI_WDDT_AUTO_RESET (1) 1875 #define ACPI_WDDT_ALERT_SUPPORT (1<<1) 1876 1877 1878 /******************************************************************************* 1879 * 1880 * WDRT - Watchdog Resource Table 1881 * Version 1 1882 * 1883 * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003", 1884 * Version 1.01, August 28, 2006 1885 * 1886 ******************************************************************************/ 1887 1888 typedef struct acpi_table_wdrt 1889 { 1890 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1891 ACPI_GENERIC_ADDRESS ControlRegister; 1892 ACPI_GENERIC_ADDRESS CountRegister; 1893 UINT16 PciDeviceId; 1894 UINT16 PciVendorId; 1895 UINT8 PciBus; /* PCI Bus number */ 1896 UINT8 PciDevice; /* PCI Device number */ 1897 UINT8 PciFunction; /* PCI Function number */ 1898 UINT8 PciSegment; /* PCI Segment number */ 1899 UINT16 MaxCount; /* Maximum counter value supported */ 1900 UINT8 Units; 1901 1902 } ACPI_TABLE_WDRT; 1903 1904 1905 /******************************************************************************* 1906 * 1907 * WSMT - Windows SMM Security Migrations Table 1908 * Version 1 1909 * 1910 * Conforms to "Windows SMM Security Migrations Table", 1911 * Version 1.0, April 18, 2016 1912 * 1913 ******************************************************************************/ 1914 1915 typedef struct acpi_table_wsmt 1916 { 1917 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1918 UINT32 ProtectionFlags; 1919 1920 } ACPI_TABLE_WSMT; 1921 1922 /* Flags for ProtectionFlags field above */ 1923 1924 #define ACPI_WSMT_FIXED_COMM_BUFFERS (1) 1925 #define ACPI_WSMT_COMM_BUFFER_NESTED_PTR_PROTECTION (2) 1926 #define ACPI_WSMT_SYSTEM_RESOURCE_PROTECTION (4) 1927 1928 1929 /* Reset to default packing */ 1930 1931 #pragma pack() 1932 1933 #endif /* __ACTBL2_H__ */ 1934