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