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