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 - 2012, 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 * The tables in this file are defined by third-party specifications, and are 128 * 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_DBGP "DBGP" /* Debug Port table */ 141 #define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */ 142 #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */ 143 #define ACPI_SIG_IBFT "IBFT" /* iSCSI Boot Firmware Table */ 144 #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */ 145 #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ 146 #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */ 147 #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */ 148 #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */ 149 #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */ 150 #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */ 151 #define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */ 152 #define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */ 153 #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */ 154 #define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */ 155 #define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */ 156 157 #ifdef ACPI_UNDEFINED_TABLES 158 /* 159 * These tables have been seen in the field, but no definition has been found 160 */ 161 #define ACPI_SIG_ATKG "ATKG" 162 #define ACPI_SIG_GSCI "GSCI" /* GMCH SCI table */ 163 #define ACPI_SIG_IEIT "IEIT" 164 #endif 165 166 /* 167 * All tables must be byte-packed to match the ACPI specification, since 168 * the tables are provided by the system BIOS. 169 */ 170 #pragma pack(1) 171 172 /* 173 * Note about bitfields: The UINT8 type is used for bitfields in ACPI tables. 174 * This is the only type that is even remotely portable. Anything else is not 175 * portable, so do not use any other bitfield types. 176 */ 177 178 179 /******************************************************************************* 180 * 181 * ASF - Alert Standard Format table (Signature "ASF!") 182 * Revision 0x10 183 * 184 * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003 185 * 186 ******************************************************************************/ 187 188 typedef struct acpi_table_asf 189 { 190 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 191 192 } ACPI_TABLE_ASF; 193 194 195 /* ASF subtable header */ 196 197 typedef struct acpi_asf_header 198 { 199 UINT8 Type; 200 UINT8 Reserved; 201 UINT16 Length; 202 203 } ACPI_ASF_HEADER; 204 205 206 /* Values for Type field above */ 207 208 enum AcpiAsfType 209 { 210 ACPI_ASF_TYPE_INFO = 0, 211 ACPI_ASF_TYPE_ALERT = 1, 212 ACPI_ASF_TYPE_CONTROL = 2, 213 ACPI_ASF_TYPE_BOOT = 3, 214 ACPI_ASF_TYPE_ADDRESS = 4, 215 ACPI_ASF_TYPE_RESERVED = 5 216 }; 217 218 /* 219 * ASF subtables 220 */ 221 222 /* 0: ASF Information */ 223 224 typedef struct acpi_asf_info 225 { 226 ACPI_ASF_HEADER Header; 227 UINT8 MinResetValue; 228 UINT8 MinPollInterval; 229 UINT16 SystemId; 230 UINT32 MfgId; 231 UINT8 Flags; 232 UINT8 Reserved2[3]; 233 234 } ACPI_ASF_INFO; 235 236 /* Masks for Flags field above */ 237 238 #define ACPI_ASF_SMBUS_PROTOCOLS (1) 239 240 241 /* 1: ASF Alerts */ 242 243 typedef struct acpi_asf_alert 244 { 245 ACPI_ASF_HEADER Header; 246 UINT8 AssertMask; 247 UINT8 DeassertMask; 248 UINT8 Alerts; 249 UINT8 DataLength; 250 251 } ACPI_ASF_ALERT; 252 253 typedef struct acpi_asf_alert_data 254 { 255 UINT8 Address; 256 UINT8 Command; 257 UINT8 Mask; 258 UINT8 Value; 259 UINT8 SensorType; 260 UINT8 Type; 261 UINT8 Offset; 262 UINT8 SourceType; 263 UINT8 Severity; 264 UINT8 SensorNumber; 265 UINT8 Entity; 266 UINT8 Instance; 267 268 } ACPI_ASF_ALERT_DATA; 269 270 271 /* 2: ASF Remote Control */ 272 273 typedef struct acpi_asf_remote 274 { 275 ACPI_ASF_HEADER Header; 276 UINT8 Controls; 277 UINT8 DataLength; 278 UINT16 Reserved2; 279 280 } ACPI_ASF_REMOTE; 281 282 typedef struct acpi_asf_control_data 283 { 284 UINT8 Function; 285 UINT8 Address; 286 UINT8 Command; 287 UINT8 Value; 288 289 } ACPI_ASF_CONTROL_DATA; 290 291 292 /* 3: ASF RMCP Boot Options */ 293 294 typedef struct acpi_asf_rmcp 295 { 296 ACPI_ASF_HEADER Header; 297 UINT8 Capabilities[7]; 298 UINT8 CompletionCode; 299 UINT32 EnterpriseId; 300 UINT8 Command; 301 UINT16 Parameter; 302 UINT16 BootOptions; 303 UINT16 OemParameters; 304 305 } ACPI_ASF_RMCP; 306 307 308 /* 4: ASF Address */ 309 310 typedef struct acpi_asf_address 311 { 312 ACPI_ASF_HEADER Header; 313 UINT8 EpromAddress; 314 UINT8 Devices; 315 316 } ACPI_ASF_ADDRESS; 317 318 319 /******************************************************************************* 320 * 321 * BOOT - Simple Boot Flag Table 322 * Version 1 323 * 324 * Conforms to the "Simple Boot Flag Specification", Version 2.1 325 * 326 ******************************************************************************/ 327 328 typedef struct acpi_table_boot 329 { 330 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 331 UINT8 CmosIndex; /* Index in CMOS RAM for the boot register */ 332 UINT8 Reserved[3]; 333 334 } ACPI_TABLE_BOOT; 335 336 337 /******************************************************************************* 338 * 339 * DBGP - Debug Port table 340 * Version 1 341 * 342 * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000 343 * 344 ******************************************************************************/ 345 346 typedef struct acpi_table_dbgp 347 { 348 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 349 UINT8 Type; /* 0=full 16550, 1=subset of 16550 */ 350 UINT8 Reserved[3]; 351 ACPI_GENERIC_ADDRESS DebugPort; 352 353 } ACPI_TABLE_DBGP; 354 355 356 /******************************************************************************* 357 * 358 * DMAR - DMA Remapping table 359 * Version 1 360 * 361 * Conforms to "Intel Virtualization Technology for Directed I/O", 362 * Version 1.2, Sept. 2008 363 * 364 ******************************************************************************/ 365 366 typedef struct acpi_table_dmar 367 { 368 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 369 UINT8 Width; /* Host Address Width */ 370 UINT8 Flags; 371 UINT8 Reserved[10]; 372 373 } ACPI_TABLE_DMAR; 374 375 /* Masks for Flags field above */ 376 377 #define ACPI_DMAR_INTR_REMAP (1) 378 379 380 /* DMAR subtable header */ 381 382 typedef struct acpi_dmar_header 383 { 384 UINT16 Type; 385 UINT16 Length; 386 387 } ACPI_DMAR_HEADER; 388 389 /* Values for subtable type in ACPI_DMAR_HEADER */ 390 391 enum AcpiDmarType 392 { 393 ACPI_DMAR_TYPE_HARDWARE_UNIT = 0, 394 ACPI_DMAR_TYPE_RESERVED_MEMORY = 1, 395 ACPI_DMAR_TYPE_ATSR = 2, 396 ACPI_DMAR_HARDWARE_AFFINITY = 3, 397 ACPI_DMAR_TYPE_RESERVED = 4 /* 4 and greater are reserved */ 398 }; 399 400 401 /* DMAR Device Scope structure */ 402 403 typedef struct acpi_dmar_device_scope 404 { 405 UINT8 EntryType; 406 UINT8 Length; 407 UINT16 Reserved; 408 UINT8 EnumerationId; 409 UINT8 Bus; 410 411 } ACPI_DMAR_DEVICE_SCOPE; 412 413 /* Values for EntryType in ACPI_DMAR_DEVICE_SCOPE */ 414 415 enum AcpiDmarScopeType 416 { 417 ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0, 418 ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1, 419 ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2, 420 ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3, 421 ACPI_DMAR_SCOPE_TYPE_HPET = 4, 422 ACPI_DMAR_SCOPE_TYPE_RESERVED = 5 /* 5 and greater are reserved */ 423 }; 424 425 typedef struct acpi_dmar_pci_path 426 { 427 UINT8 Device; 428 UINT8 Function; 429 430 } ACPI_DMAR_PCI_PATH; 431 432 433 /* 434 * DMAR Sub-tables, correspond to Type in ACPI_DMAR_HEADER 435 */ 436 437 /* 0: Hardware Unit Definition */ 438 439 typedef struct acpi_dmar_hardware_unit 440 { 441 ACPI_DMAR_HEADER Header; 442 UINT8 Flags; 443 UINT8 Reserved; 444 UINT16 Segment; 445 UINT64 Address; /* Register Base Address */ 446 447 } ACPI_DMAR_HARDWARE_UNIT; 448 449 /* Masks for Flags field above */ 450 451 #define ACPI_DMAR_INCLUDE_ALL (1) 452 453 454 /* 1: Reserved Memory Defininition */ 455 456 typedef struct acpi_dmar_reserved_memory 457 { 458 ACPI_DMAR_HEADER Header; 459 UINT16 Reserved; 460 UINT16 Segment; 461 UINT64 BaseAddress; /* 4K aligned base address */ 462 UINT64 EndAddress; /* 4K aligned limit address */ 463 464 } ACPI_DMAR_RESERVED_MEMORY; 465 466 /* Masks for Flags field above */ 467 468 #define ACPI_DMAR_ALLOW_ALL (1) 469 470 471 /* 2: Root Port ATS Capability Reporting Structure */ 472 473 typedef struct acpi_dmar_atsr 474 { 475 ACPI_DMAR_HEADER Header; 476 UINT8 Flags; 477 UINT8 Reserved; 478 UINT16 Segment; 479 480 } ACPI_DMAR_ATSR; 481 482 /* Masks for Flags field above */ 483 484 #define ACPI_DMAR_ALL_PORTS (1) 485 486 487 /* 3: Remapping Hardware Static Affinity Structure */ 488 489 typedef struct acpi_dmar_rhsa 490 { 491 ACPI_DMAR_HEADER Header; 492 UINT32 Reserved; 493 UINT64 BaseAddress; 494 UINT32 ProximityDomain; 495 496 } ACPI_DMAR_RHSA; 497 498 499 /******************************************************************************* 500 * 501 * HPET - High Precision Event Timer table 502 * Version 1 503 * 504 * Conforms to "IA-PC HPET (High Precision Event Timers) Specification", 505 * Version 1.0a, October 2004 506 * 507 ******************************************************************************/ 508 509 typedef struct acpi_table_hpet 510 { 511 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 512 UINT32 Id; /* Hardware ID of event timer block */ 513 ACPI_GENERIC_ADDRESS Address; /* Address of event timer block */ 514 UINT8 Sequence; /* HPET sequence number */ 515 UINT16 MinimumTick; /* Main counter min tick, periodic mode */ 516 UINT8 Flags; 517 518 } ACPI_TABLE_HPET; 519 520 /* Masks for Flags field above */ 521 522 #define ACPI_HPET_PAGE_PROTECT_MASK (3) 523 524 /* Values for Page Protect flags */ 525 526 enum AcpiHpetPageProtect 527 { 528 ACPI_HPET_NO_PAGE_PROTECT = 0, 529 ACPI_HPET_PAGE_PROTECT4 = 1, 530 ACPI_HPET_PAGE_PROTECT64 = 2 531 }; 532 533 534 /******************************************************************************* 535 * 536 * IBFT - Boot Firmware Table 537 * Version 1 538 * 539 * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b 540 * Specification", Version 1.01, March 1, 2007 541 * 542 * Note: It appears that this table is not intended to appear in the RSDT/XSDT. 543 * Therefore, it is not currently supported by the disassembler. 544 * 545 ******************************************************************************/ 546 547 typedef struct acpi_table_ibft 548 { 549 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 550 UINT8 Reserved[12]; 551 552 } ACPI_TABLE_IBFT; 553 554 555 /* IBFT common subtable header */ 556 557 typedef struct acpi_ibft_header 558 { 559 UINT8 Type; 560 UINT8 Version; 561 UINT16 Length; 562 UINT8 Index; 563 UINT8 Flags; 564 565 } ACPI_IBFT_HEADER; 566 567 /* Values for Type field above */ 568 569 enum AcpiIbftType 570 { 571 ACPI_IBFT_TYPE_NOT_USED = 0, 572 ACPI_IBFT_TYPE_CONTROL = 1, 573 ACPI_IBFT_TYPE_INITIATOR = 2, 574 ACPI_IBFT_TYPE_NIC = 3, 575 ACPI_IBFT_TYPE_TARGET = 4, 576 ACPI_IBFT_TYPE_EXTENSIONS = 5, 577 ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */ 578 }; 579 580 581 /* IBFT subtables */ 582 583 typedef struct acpi_ibft_control 584 { 585 ACPI_IBFT_HEADER Header; 586 UINT16 Extensions; 587 UINT16 InitiatorOffset; 588 UINT16 Nic0Offset; 589 UINT16 Target0Offset; 590 UINT16 Nic1Offset; 591 UINT16 Target1Offset; 592 593 } ACPI_IBFT_CONTROL; 594 595 typedef struct acpi_ibft_initiator 596 { 597 ACPI_IBFT_HEADER Header; 598 UINT8 SnsServer[16]; 599 UINT8 SlpServer[16]; 600 UINT8 PrimaryServer[16]; 601 UINT8 SecondaryServer[16]; 602 UINT16 NameLength; 603 UINT16 NameOffset; 604 605 } ACPI_IBFT_INITIATOR; 606 607 typedef struct acpi_ibft_nic 608 { 609 ACPI_IBFT_HEADER Header; 610 UINT8 IpAddress[16]; 611 UINT8 SubnetMaskPrefix; 612 UINT8 Origin; 613 UINT8 Gateway[16]; 614 UINT8 PrimaryDns[16]; 615 UINT8 SecondaryDns[16]; 616 UINT8 Dhcp[16]; 617 UINT16 Vlan; 618 UINT8 MacAddress[6]; 619 UINT16 PciAddress; 620 UINT16 NameLength; 621 UINT16 NameOffset; 622 623 } ACPI_IBFT_NIC; 624 625 typedef struct acpi_ibft_target 626 { 627 ACPI_IBFT_HEADER Header; 628 UINT8 TargetIpAddress[16]; 629 UINT16 TargetIpSocket; 630 UINT8 TargetBootLun[8]; 631 UINT8 ChapType; 632 UINT8 NicAssociation; 633 UINT16 TargetNameLength; 634 UINT16 TargetNameOffset; 635 UINT16 ChapNameLength; 636 UINT16 ChapNameOffset; 637 UINT16 ChapSecretLength; 638 UINT16 ChapSecretOffset; 639 UINT16 ReverseChapNameLength; 640 UINT16 ReverseChapNameOffset; 641 UINT16 ReverseChapSecretLength; 642 UINT16 ReverseChapSecretOffset; 643 644 } ACPI_IBFT_TARGET; 645 646 647 /******************************************************************************* 648 * 649 * IVRS - I/O Virtualization Reporting Structure 650 * Version 1 651 * 652 * Conforms to "AMD I/O Virtualization Technology (IOMMU) Specification", 653 * Revision 1.26, February 2009. 654 * 655 ******************************************************************************/ 656 657 typedef struct acpi_table_ivrs 658 { 659 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 660 UINT32 Info; /* Common virtualization info */ 661 UINT64 Reserved; 662 663 } ACPI_TABLE_IVRS; 664 665 /* Values for Info field above */ 666 667 #define ACPI_IVRS_PHYSICAL_SIZE 0x00007F00 /* 7 bits, physical address size */ 668 #define ACPI_IVRS_VIRTUAL_SIZE 0x003F8000 /* 7 bits, virtual address size */ 669 #define ACPI_IVRS_ATS_RESERVED 0x00400000 /* ATS address translation range reserved */ 670 671 672 /* IVRS subtable header */ 673 674 typedef struct acpi_ivrs_header 675 { 676 UINT8 Type; /* Subtable type */ 677 UINT8 Flags; 678 UINT16 Length; /* Subtable length */ 679 UINT16 DeviceId; /* ID of IOMMU */ 680 681 } ACPI_IVRS_HEADER; 682 683 /* Values for subtable Type above */ 684 685 enum AcpiIvrsType 686 { 687 ACPI_IVRS_TYPE_HARDWARE = 0x10, 688 ACPI_IVRS_TYPE_MEMORY1 = 0x20, 689 ACPI_IVRS_TYPE_MEMORY2 = 0x21, 690 ACPI_IVRS_TYPE_MEMORY3 = 0x22 691 }; 692 693 /* Masks for Flags field above for IVHD subtable */ 694 695 #define ACPI_IVHD_TT_ENABLE (1) 696 #define ACPI_IVHD_PASS_PW (1<<1) 697 #define ACPI_IVHD_RES_PASS_PW (1<<2) 698 #define ACPI_IVHD_ISOC (1<<3) 699 #define ACPI_IVHD_IOTLB (1<<4) 700 701 /* Masks for Flags field above for IVMD subtable */ 702 703 #define ACPI_IVMD_UNITY (1) 704 #define ACPI_IVMD_READ (1<<1) 705 #define ACPI_IVMD_WRITE (1<<2) 706 #define ACPI_IVMD_EXCLUSION_RANGE (1<<3) 707 708 709 /* 710 * IVRS subtables, correspond to Type in ACPI_IVRS_HEADER 711 */ 712 713 /* 0x10: I/O Virtualization Hardware Definition Block (IVHD) */ 714 715 typedef struct acpi_ivrs_hardware 716 { 717 ACPI_IVRS_HEADER Header; 718 UINT16 CapabilityOffset; /* Offset for IOMMU control fields */ 719 UINT64 BaseAddress; /* IOMMU control registers */ 720 UINT16 PciSegmentGroup; 721 UINT16 Info; /* MSI number and unit ID */ 722 UINT32 Reserved; 723 724 } ACPI_IVRS_HARDWARE; 725 726 /* Masks for Info field above */ 727 728 #define ACPI_IVHD_MSI_NUMBER_MASK 0x001F /* 5 bits, MSI message number */ 729 #define ACPI_IVHD_UNIT_ID_MASK 0x1F00 /* 5 bits, UnitID */ 730 731 732 /* 733 * Device Entries for IVHD subtable, appear after ACPI_IVRS_HARDWARE structure. 734 * Upper two bits of the Type field are the (encoded) length of the structure. 735 * Currently, only 4 and 8 byte entries are defined. 16 and 32 byte entries 736 * are reserved for future use but not defined. 737 */ 738 typedef struct acpi_ivrs_de_header 739 { 740 UINT8 Type; 741 UINT16 Id; 742 UINT8 DataSetting; 743 744 } ACPI_IVRS_DE_HEADER; 745 746 /* Length of device entry is in the top two bits of Type field above */ 747 748 #define ACPI_IVHD_ENTRY_LENGTH 0xC0 749 750 /* Values for device entry Type field above */ 751 752 enum AcpiIvrsDeviceEntryType 753 { 754 /* 4-byte device entries, all use ACPI_IVRS_DEVICE4 */ 755 756 ACPI_IVRS_TYPE_PAD4 = 0, 757 ACPI_IVRS_TYPE_ALL = 1, 758 ACPI_IVRS_TYPE_SELECT = 2, 759 ACPI_IVRS_TYPE_START = 3, 760 ACPI_IVRS_TYPE_END = 4, 761 762 /* 8-byte device entries */ 763 764 ACPI_IVRS_TYPE_PAD8 = 64, 765 ACPI_IVRS_TYPE_NOT_USED = 65, 766 ACPI_IVRS_TYPE_ALIAS_SELECT = 66, /* Uses ACPI_IVRS_DEVICE8A */ 767 ACPI_IVRS_TYPE_ALIAS_START = 67, /* Uses ACPI_IVRS_DEVICE8A */ 768 ACPI_IVRS_TYPE_EXT_SELECT = 70, /* Uses ACPI_IVRS_DEVICE8B */ 769 ACPI_IVRS_TYPE_EXT_START = 71, /* Uses ACPI_IVRS_DEVICE8B */ 770 ACPI_IVRS_TYPE_SPECIAL = 72 /* Uses ACPI_IVRS_DEVICE8C */ 771 }; 772 773 /* Values for Data field above */ 774 775 #define ACPI_IVHD_INIT_PASS (1) 776 #define ACPI_IVHD_EINT_PASS (1<<1) 777 #define ACPI_IVHD_NMI_PASS (1<<2) 778 #define ACPI_IVHD_SYSTEM_MGMT (3<<4) 779 #define ACPI_IVHD_LINT0_PASS (1<<6) 780 #define ACPI_IVHD_LINT1_PASS (1<<7) 781 782 783 /* Types 0-4: 4-byte device entry */ 784 785 typedef struct acpi_ivrs_device4 786 { 787 ACPI_IVRS_DE_HEADER Header; 788 789 } ACPI_IVRS_DEVICE4; 790 791 /* Types 66-67: 8-byte device entry */ 792 793 typedef struct acpi_ivrs_device8a 794 { 795 ACPI_IVRS_DE_HEADER Header; 796 UINT8 Reserved1; 797 UINT16 UsedId; 798 UINT8 Reserved2; 799 800 } ACPI_IVRS_DEVICE8A; 801 802 /* Types 70-71: 8-byte device entry */ 803 804 typedef struct acpi_ivrs_device8b 805 { 806 ACPI_IVRS_DE_HEADER Header; 807 UINT32 ExtendedData; 808 809 } ACPI_IVRS_DEVICE8B; 810 811 /* Values for ExtendedData above */ 812 813 #define ACPI_IVHD_ATS_DISABLED (1<<31) 814 815 /* Type 72: 8-byte device entry */ 816 817 typedef struct acpi_ivrs_device8c 818 { 819 ACPI_IVRS_DE_HEADER Header; 820 UINT8 Handle; 821 UINT16 UsedId; 822 UINT8 Variety; 823 824 } ACPI_IVRS_DEVICE8C; 825 826 /* Values for Variety field above */ 827 828 #define ACPI_IVHD_IOAPIC 1 829 #define ACPI_IVHD_HPET 2 830 831 832 /* 0x20, 0x21, 0x22: I/O Virtualization Memory Definition Block (IVMD) */ 833 834 typedef struct acpi_ivrs_memory 835 { 836 ACPI_IVRS_HEADER Header; 837 UINT16 AuxData; 838 UINT64 Reserved; 839 UINT64 StartAddress; 840 UINT64 MemoryLength; 841 842 } ACPI_IVRS_MEMORY; 843 844 845 /******************************************************************************* 846 * 847 * MCFG - PCI Memory Mapped Configuration table and sub-table 848 * Version 1 849 * 850 * Conforms to "PCI Firmware Specification", Revision 3.0, June 20, 2005 851 * 852 ******************************************************************************/ 853 854 typedef struct acpi_table_mcfg 855 { 856 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 857 UINT8 Reserved[8]; 858 859 } ACPI_TABLE_MCFG; 860 861 862 /* Subtable */ 863 864 typedef struct acpi_mcfg_allocation 865 { 866 UINT64 Address; /* Base address, processor-relative */ 867 UINT16 PciSegment; /* PCI segment group number */ 868 UINT8 StartBusNumber; /* Starting PCI Bus number */ 869 UINT8 EndBusNumber; /* Final PCI Bus number */ 870 UINT32 Reserved; 871 872 } ACPI_MCFG_ALLOCATION; 873 874 875 /******************************************************************************* 876 * 877 * MCHI - Management Controller Host Interface Table 878 * Version 1 879 * 880 * Conforms to "Management Component Transport Protocol (MCTP) Host 881 * Interface Specification", Revision 1.0.0a, October 13, 2009 882 * 883 ******************************************************************************/ 884 885 typedef struct acpi_table_mchi 886 { 887 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 888 UINT8 InterfaceType; 889 UINT8 Protocol; 890 UINT64 ProtocolData; 891 UINT8 InterruptType; 892 UINT8 Gpe; 893 UINT8 PciDeviceFlag; 894 UINT32 GlobalInterrupt; 895 ACPI_GENERIC_ADDRESS ControlRegister; 896 UINT8 PciSegment; 897 UINT8 PciBus; 898 UINT8 PciDevice; 899 UINT8 PciFunction; 900 901 } ACPI_TABLE_MCHI; 902 903 904 /******************************************************************************* 905 * 906 * SLIC - Software Licensing Description Table 907 * Version 1 908 * 909 * Conforms to "OEM Activation 2.0 for Windows Vista Operating Systems", 910 * Copyright 2006 911 * 912 ******************************************************************************/ 913 914 /* Basic SLIC table is only the common ACPI header */ 915 916 typedef struct acpi_table_slic 917 { 918 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 919 920 } ACPI_TABLE_SLIC; 921 922 923 /* Common SLIC subtable header */ 924 925 typedef struct acpi_slic_header 926 { 927 UINT32 Type; 928 UINT32 Length; 929 930 } ACPI_SLIC_HEADER; 931 932 /* Values for Type field above */ 933 934 enum AcpiSlicType 935 { 936 ACPI_SLIC_TYPE_PUBLIC_KEY = 0, 937 ACPI_SLIC_TYPE_WINDOWS_MARKER = 1, 938 ACPI_SLIC_TYPE_RESERVED = 2 /* 2 and greater are reserved */ 939 }; 940 941 942 /* 943 * SLIC Sub-tables, correspond to Type in ACPI_SLIC_HEADER 944 */ 945 946 /* 0: Public Key Structure */ 947 948 typedef struct acpi_slic_key 949 { 950 ACPI_SLIC_HEADER Header; 951 UINT8 KeyType; 952 UINT8 Version; 953 UINT16 Reserved; 954 UINT32 Algorithm; 955 char Magic[4]; 956 UINT32 BitLength; 957 UINT32 Exponent; 958 UINT8 Modulus[128]; 959 960 } ACPI_SLIC_KEY; 961 962 963 /* 1: Windows Marker Structure */ 964 965 typedef struct acpi_slic_marker 966 { 967 ACPI_SLIC_HEADER Header; 968 UINT32 Version; 969 char OemId[ACPI_OEM_ID_SIZE]; /* ASCII OEM identification */ 970 char OemTableId[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */ 971 char WindowsFlag[8]; 972 UINT32 SlicVersion; 973 UINT8 Reserved[16]; 974 UINT8 Signature[128]; 975 976 } ACPI_SLIC_MARKER; 977 978 979 /******************************************************************************* 980 * 981 * SPCR - Serial Port Console Redirection table 982 * Version 1 983 * 984 * Conforms to "Serial Port Console Redirection Table", 985 * Version 1.00, January 11, 2002 986 * 987 ******************************************************************************/ 988 989 typedef struct acpi_table_spcr 990 { 991 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 992 UINT8 InterfaceType; /* 0=full 16550, 1=subset of 16550 */ 993 UINT8 Reserved[3]; 994 ACPI_GENERIC_ADDRESS SerialPort; 995 UINT8 InterruptType; 996 UINT8 PcInterrupt; 997 UINT32 Interrupt; 998 UINT8 BaudRate; 999 UINT8 Parity; 1000 UINT8 StopBits; 1001 UINT8 FlowControl; 1002 UINT8 TerminalType; 1003 UINT8 Reserved1; 1004 UINT16 PciDeviceId; 1005 UINT16 PciVendorId; 1006 UINT8 PciBus; 1007 UINT8 PciDevice; 1008 UINT8 PciFunction; 1009 UINT32 PciFlags; 1010 UINT8 PciSegment; 1011 UINT32 Reserved2; 1012 1013 } ACPI_TABLE_SPCR; 1014 1015 /* Masks for PciFlags field above */ 1016 1017 #define ACPI_SPCR_DO_NOT_DISABLE (1) 1018 1019 1020 /******************************************************************************* 1021 * 1022 * SPMI - Server Platform Management Interface table 1023 * Version 5 1024 * 1025 * Conforms to "Intelligent Platform Management Interface Specification 1026 * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with 1027 * June 12, 2009 markup. 1028 * 1029 ******************************************************************************/ 1030 1031 typedef struct acpi_table_spmi 1032 { 1033 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1034 UINT8 InterfaceType; 1035 UINT8 Reserved; /* Must be 1 */ 1036 UINT16 SpecRevision; /* Version of IPMI */ 1037 UINT8 InterruptType; 1038 UINT8 GpeNumber; /* GPE assigned */ 1039 UINT8 Reserved1; 1040 UINT8 PciDeviceFlag; 1041 UINT32 Interrupt; 1042 ACPI_GENERIC_ADDRESS IpmiRegister; 1043 UINT8 PciSegment; 1044 UINT8 PciBus; 1045 UINT8 PciDevice; 1046 UINT8 PciFunction; 1047 UINT8 Reserved2; 1048 1049 } ACPI_TABLE_SPMI; 1050 1051 /* Values for InterfaceType above */ 1052 1053 enum AcpiSpmiInterfaceTypes 1054 { 1055 ACPI_SPMI_NOT_USED = 0, 1056 ACPI_SPMI_KEYBOARD = 1, 1057 ACPI_SPMI_SMI = 2, 1058 ACPI_SPMI_BLOCK_TRANSFER = 3, 1059 ACPI_SPMI_SMBUS = 4, 1060 ACPI_SPMI_RESERVED = 5 /* 5 and above are reserved */ 1061 }; 1062 1063 1064 /******************************************************************************* 1065 * 1066 * TCPA - Trusted Computing Platform Alliance table 1067 * Version 1 1068 * 1069 * Conforms to "TCG PC Specific Implementation Specification", 1070 * Version 1.1, August 18, 2003 1071 * 1072 ******************************************************************************/ 1073 1074 typedef struct acpi_table_tcpa 1075 { 1076 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1077 UINT16 Reserved; 1078 UINT32 MaxLogLength; /* Maximum length for the event log area */ 1079 UINT64 LogAddress; /* Address of the event log area */ 1080 1081 } ACPI_TABLE_TCPA; 1082 1083 1084 /******************************************************************************* 1085 * 1086 * UEFI - UEFI Boot optimization Table 1087 * Version 1 1088 * 1089 * Conforms to "Unified Extensible Firmware Interface Specification", 1090 * Version 2.3, May 8, 2009 1091 * 1092 ******************************************************************************/ 1093 1094 typedef struct acpi_table_uefi 1095 { 1096 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1097 UINT8 Identifier[16]; /* UUID identifier */ 1098 UINT16 DataOffset; /* Offset of remaining data in table */ 1099 1100 } ACPI_TABLE_UEFI; 1101 1102 1103 /******************************************************************************* 1104 * 1105 * WAET - Windows ACPI Emulated devices Table 1106 * Version 1 1107 * 1108 * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009 1109 * 1110 ******************************************************************************/ 1111 1112 typedef struct acpi_table_waet 1113 { 1114 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1115 UINT32 Flags; 1116 1117 } ACPI_TABLE_WAET; 1118 1119 /* Masks for Flags field above */ 1120 1121 #define ACPI_WAET_RTC_NO_ACK (1) /* RTC requires no int acknowledge */ 1122 #define ACPI_WAET_TIMER_ONE_READ (1<<1) /* PM timer requires only one read */ 1123 1124 1125 /******************************************************************************* 1126 * 1127 * WDAT - Watchdog Action Table 1128 * Version 1 1129 * 1130 * Conforms to "Hardware Watchdog Timers Design Specification", 1131 * Copyright 2006 Microsoft Corporation. 1132 * 1133 ******************************************************************************/ 1134 1135 typedef struct acpi_table_wdat 1136 { 1137 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1138 UINT32 HeaderLength; /* Watchdog Header Length */ 1139 UINT16 PciSegment; /* PCI Segment number */ 1140 UINT8 PciBus; /* PCI Bus number */ 1141 UINT8 PciDevice; /* PCI Device number */ 1142 UINT8 PciFunction; /* PCI Function number */ 1143 UINT8 Reserved[3]; 1144 UINT32 TimerPeriod; /* Period of one timer count (msec) */ 1145 UINT32 MaxCount; /* Maximum counter value supported */ 1146 UINT32 MinCount; /* Minimum counter value */ 1147 UINT8 Flags; 1148 UINT8 Reserved2[3]; 1149 UINT32 Entries; /* Number of watchdog entries that follow */ 1150 1151 } ACPI_TABLE_WDAT; 1152 1153 /* Masks for Flags field above */ 1154 1155 #define ACPI_WDAT_ENABLED (1) 1156 #define ACPI_WDAT_STOPPED 0x80 1157 1158 1159 /* WDAT Instruction Entries (actions) */ 1160 1161 typedef struct acpi_wdat_entry 1162 { 1163 UINT8 Action; 1164 UINT8 Instruction; 1165 UINT16 Reserved; 1166 ACPI_GENERIC_ADDRESS RegisterRegion; 1167 UINT32 Value; /* Value used with Read/Write register */ 1168 UINT32 Mask; /* Bitmask required for this register instruction */ 1169 1170 } ACPI_WDAT_ENTRY; 1171 1172 /* Values for Action field above */ 1173 1174 enum AcpiWdatActions 1175 { 1176 ACPI_WDAT_RESET = 1, 1177 ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4, 1178 ACPI_WDAT_GET_COUNTDOWN = 5, 1179 ACPI_WDAT_SET_COUNTDOWN = 6, 1180 ACPI_WDAT_GET_RUNNING_STATE = 8, 1181 ACPI_WDAT_SET_RUNNING_STATE = 9, 1182 ACPI_WDAT_GET_STOPPED_STATE = 10, 1183 ACPI_WDAT_SET_STOPPED_STATE = 11, 1184 ACPI_WDAT_GET_REBOOT = 16, 1185 ACPI_WDAT_SET_REBOOT = 17, 1186 ACPI_WDAT_GET_SHUTDOWN = 18, 1187 ACPI_WDAT_SET_SHUTDOWN = 19, 1188 ACPI_WDAT_GET_STATUS = 32, 1189 ACPI_WDAT_SET_STATUS = 33, 1190 ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */ 1191 }; 1192 1193 /* Values for Instruction field above */ 1194 1195 enum AcpiWdatInstructions 1196 { 1197 ACPI_WDAT_READ_VALUE = 0, 1198 ACPI_WDAT_READ_COUNTDOWN = 1, 1199 ACPI_WDAT_WRITE_VALUE = 2, 1200 ACPI_WDAT_WRITE_COUNTDOWN = 3, 1201 ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */ 1202 ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */ 1203 }; 1204 1205 1206 /******************************************************************************* 1207 * 1208 * WDDT - Watchdog Descriptor Table 1209 * Version 1 1210 * 1211 * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)", 1212 * Version 001, September 2002 1213 * 1214 ******************************************************************************/ 1215 1216 typedef struct acpi_table_wddt 1217 { 1218 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1219 UINT16 SpecVersion; 1220 UINT16 TableVersion; 1221 UINT16 PciVendorId; 1222 ACPI_GENERIC_ADDRESS Address; 1223 UINT16 MaxCount; /* Maximum counter value supported */ 1224 UINT16 MinCount; /* Minimum counter value supported */ 1225 UINT16 Period; 1226 UINT16 Status; 1227 UINT16 Capability; 1228 1229 } ACPI_TABLE_WDDT; 1230 1231 /* Flags for Status field above */ 1232 1233 #define ACPI_WDDT_AVAILABLE (1) 1234 #define ACPI_WDDT_ACTIVE (1<<1) 1235 #define ACPI_WDDT_TCO_OS_OWNED (1<<2) 1236 #define ACPI_WDDT_USER_RESET (1<<11) 1237 #define ACPI_WDDT_WDT_RESET (1<<12) 1238 #define ACPI_WDDT_POWER_FAIL (1<<13) 1239 #define ACPI_WDDT_UNKNOWN_RESET (1<<14) 1240 1241 /* Flags for Capability field above */ 1242 1243 #define ACPI_WDDT_AUTO_RESET (1) 1244 #define ACPI_WDDT_ALERT_SUPPORT (1<<1) 1245 1246 1247 /******************************************************************************* 1248 * 1249 * WDRT - Watchdog Resource Table 1250 * Version 1 1251 * 1252 * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003", 1253 * Version 1.01, August 28, 2006 1254 * 1255 ******************************************************************************/ 1256 1257 typedef struct acpi_table_wdrt 1258 { 1259 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1260 ACPI_GENERIC_ADDRESS ControlRegister; 1261 ACPI_GENERIC_ADDRESS CountRegister; 1262 UINT16 PciDeviceId; 1263 UINT16 PciVendorId; 1264 UINT8 PciBus; /* PCI Bus number */ 1265 UINT8 PciDevice; /* PCI Device number */ 1266 UINT8 PciFunction; /* PCI Function number */ 1267 UINT8 PciSegment; /* PCI Segment number */ 1268 UINT16 MaxCount; /* Maximum counter value supported */ 1269 UINT8 Units; 1270 1271 } ACPI_TABLE_WDRT; 1272 1273 1274 /* Reset to default packing */ 1275 1276 #pragma pack() 1277 1278 #endif /* __ACTBL2_H__ */ 1279 1280