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