1 /****************************************************************************** 2 * 3 * Name: actbl3.h - ACPI Table Definitions 4 * 5 *****************************************************************************/ 6 7 /****************************************************************************** 8 * 9 * 1. Copyright Notice 10 * 11 * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. 12 * All rights reserved. 13 * 14 * 2. License 15 * 16 * 2.1. This is your license from Intel Corp. under its intellectual property 17 * rights. You may have additional license terms from the party that provided 18 * you this software, covering your right to use that party's intellectual 19 * property rights. 20 * 21 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 22 * copy of the source code appearing in this file ("Covered Code") an 23 * irrevocable, perpetual, worldwide license under Intel's copyrights in the 24 * base code distributed originally by Intel ("Original Intel Code") to copy, 25 * make derivatives, distribute, use and display any portion of the Covered 26 * Code in any form, with the right to sublicense such rights; and 27 * 28 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 29 * license (with the right to sublicense), under only those claims of Intel 30 * patents that are infringed by the Original Intel Code, to make, use, sell, 31 * offer to sell, and import the Covered Code and derivative works thereof 32 * solely to the minimum extent necessary to exercise the above copyright 33 * license, and in no event shall the patent license extend to any additions 34 * to or modifications of the Original Intel Code. No other license or right 35 * is granted directly or by implication, estoppel or otherwise; 36 * 37 * The above copyright and patent license is granted only if the following 38 * conditions are met: 39 * 40 * 3. Conditions 41 * 42 * 3.1. Redistribution of Source with Rights to Further Distribute Source. 43 * Redistribution of source code of any substantial portion of the Covered 44 * Code or modification with rights to further distribute source must include 45 * the above Copyright Notice, the above License, this list of Conditions, 46 * and the following Disclaimer and Export Compliance provision. In addition, 47 * Licensee must cause all Covered Code to which Licensee contributes to 48 * contain a file documenting the changes Licensee made to create that Covered 49 * Code and the date of any change. Licensee must include in that file the 50 * documentation of any changes made by any predecessor Licensee. Licensee 51 * must include a prominent statement that the modification is derived, 52 * directly or indirectly, from Original Intel Code. 53 * 54 * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 55 * Redistribution of source code of any substantial portion of the Covered 56 * Code or modification without rights to further distribute source must 57 * include the following Disclaimer and Export Compliance provision in the 58 * documentation and/or other materials provided with distribution. In 59 * addition, Licensee may not authorize further sublicense of source of any 60 * portion of the Covered Code, and must include terms to the effect that the 61 * license from Licensee to its licensee is limited to the intellectual 62 * property embodied in the software Licensee provides to its licensee, and 63 * not to intellectual property embodied in modifications its licensee may 64 * make. 65 * 66 * 3.3. Redistribution of Executable. Redistribution in executable form of any 67 * substantial portion of the Covered Code or modification must reproduce the 68 * above Copyright Notice, and the following Disclaimer and Export Compliance 69 * provision in the documentation and/or other materials provided with the 70 * distribution. 71 * 72 * 3.4. Intel retains all right, title, and interest in and to the Original 73 * Intel Code. 74 * 75 * 3.5. Neither the name Intel nor any other trademark owned or controlled by 76 * Intel shall be used in advertising or otherwise to promote the sale, use or 77 * other dealings in products derived from or relating to the Covered Code 78 * without prior written authorization from Intel. 79 * 80 * 4. Disclaimer and Export Compliance 81 * 82 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 83 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 84 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 85 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 86 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 87 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 88 * PARTICULAR PURPOSE. 89 * 90 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 91 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 92 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 93 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 94 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 95 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 96 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 97 * LIMITED REMEDY. 98 * 99 * 4.3. Licensee shall not export, either directly or indirectly, any of this 100 * software or system incorporating such software without first obtaining any 101 * required license or other approval from the U. S. Department of Commerce or 102 * any other agency or department of the United States Government. In the 103 * event Licensee exports any such software from the United States or 104 * re-exports any such software from a foreign destination, Licensee shall 105 * ensure that the distribution and export/re-export of the software is in 106 * compliance with all laws, regulations, orders, or other restrictions of the 107 * U.S. Export Administration Regulations. Licensee agrees that neither it nor 108 * any of its subsidiaries will export/re-export any technical data, process, 109 * software, or service, directly or indirectly, to any country for which the 110 * United States government or any agency thereof requires an export license, 111 * other governmental approval, or letter of assurance, without first obtaining 112 * such license, approval or letter. 113 * 114 *****************************************************************************/ 115 116 #ifndef __ACTBL3_H__ 117 #define __ACTBL3_H__ 118 119 120 /******************************************************************************* 121 * 122 * Additional ACPI Tables (3) 123 * 124 * These tables are not consumed directly by the ACPICA subsystem, but are 125 * included here to support device drivers and the AML disassembler. 126 * 127 * The tables in this file are fully defined within the ACPI specification. 128 * 129 ******************************************************************************/ 130 131 132 /* 133 * Values for description table header signatures for tables defined in this 134 * file. Useful because they make it more difficult to inadvertently type in 135 * the wrong signature. 136 */ 137 #define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */ 138 #define ACPI_SIG_DRTM "DRTM" /* Dynamic Root of Trust for Measurement table */ 139 #define ACPI_SIG_FPDT "FPDT" /* Firmware Performance Data Table */ 140 #define ACPI_SIG_GTDT "GTDT" /* Generic Timer Description Table */ 141 #define ACPI_SIG_MPST "MPST" /* Memory Power State Table */ 142 #define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */ 143 #define ACPI_SIG_PMTT "PMTT" /* Platform Memory Topology Table */ 144 #define ACPI_SIG_RASF "RASF" /* RAS Feature table */ 145 #define ACPI_SIG_TPM2 "TPM2" /* Trusted Platform Module 2.0 H/W interface table */ 146 147 #define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */ 148 #define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */ 149 150 /* Reserved table signatures */ 151 152 #define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */ 153 #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */ 154 #define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */ 155 156 /* 157 * All tables must be byte-packed to match the ACPI specification, since 158 * the tables are provided by the system BIOS. 159 */ 160 #pragma pack(1) 161 162 /* 163 * Note: C bitfields are not used for this reason: 164 * 165 * "Bitfields are great and easy to read, but unfortunately the C language 166 * does not specify the layout of bitfields in memory, which means they are 167 * essentially useless for dealing with packed data in on-disk formats or 168 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me, 169 * this decision was a design error in C. Ritchie could have picked an order 170 * and stuck with it." Norman Ramsey. 171 * See http://stackoverflow.com/a/1053662/41661 172 */ 173 174 175 /******************************************************************************* 176 * 177 * BGRT - Boot Graphics Resource Table (ACPI 5.0) 178 * Version 1 179 * 180 ******************************************************************************/ 181 182 typedef struct acpi_table_bgrt 183 { 184 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 185 UINT16 Version; 186 UINT8 Status; 187 UINT8 ImageType; 188 UINT64 ImageAddress; 189 UINT32 ImageOffsetX; 190 UINT32 ImageOffsetY; 191 192 } ACPI_TABLE_BGRT; 193 194 195 /******************************************************************************* 196 * 197 * DRTM - Dynamic Root of Trust for Measurement table 198 * 199 ******************************************************************************/ 200 201 typedef struct acpi_table_drtm 202 { 203 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 204 UINT64 EntryBaseAddress; 205 UINT64 EntryLength; 206 UINT32 EntryAddress32; 207 UINT64 EntryAddress64; 208 UINT64 ExitAddress; 209 UINT64 LogAreaAddress; 210 UINT32 LogAreaLength; 211 UINT64 ArchDependentAddress; 212 UINT32 Flags; 213 214 } ACPI_TABLE_DRTM; 215 216 /* 1) Validated Tables List */ 217 218 typedef struct acpi_drtm_vtl_list 219 { 220 UINT32 ValidatedTableListCount; 221 222 } ACPI_DRTM_VTL_LIST; 223 224 /* 2) Resources List */ 225 226 typedef struct acpi_drtm_resource_list 227 { 228 UINT32 ResourceListCount; 229 230 } ACPI_DRTM_RESOURCE_LIST; 231 232 /* 3) Platform-specific Identifiers List */ 233 234 typedef struct acpi_drtm_id_list 235 { 236 UINT32 IdListCount; 237 238 } ACPI_DRTM_ID_LIST; 239 240 241 /******************************************************************************* 242 * 243 * FPDT - Firmware Performance Data Table (ACPI 5.0) 244 * Version 1 245 * 246 ******************************************************************************/ 247 248 typedef struct acpi_table_fpdt 249 { 250 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 251 252 } ACPI_TABLE_FPDT; 253 254 255 /* FPDT subtable header */ 256 257 typedef struct acpi_fpdt_header 258 { 259 UINT16 Type; 260 UINT8 Length; 261 UINT8 Revision; 262 263 } ACPI_FPDT_HEADER; 264 265 /* Values for Type field above */ 266 267 enum AcpiFpdtType 268 { 269 ACPI_FPDT_TYPE_BOOT = 0, 270 ACPI_FPDT_TYPE_S3PERF = 1 271 }; 272 273 274 /* 275 * FPDT subtables 276 */ 277 278 /* 0: Firmware Basic Boot Performance Record */ 279 280 typedef struct acpi_fpdt_boot 281 { 282 ACPI_FPDT_HEADER Header; 283 UINT8 Reserved[4]; 284 UINT64 ResetEnd; 285 UINT64 LoadStart; 286 UINT64 StartupStart; 287 UINT64 ExitServicesEntry; 288 UINT64 ExitServicesExit; 289 290 } ACPI_FPDT_BOOT; 291 292 293 /* 1: S3 Performance Table Pointer Record */ 294 295 typedef struct acpi_fpdt_s3pt_ptr 296 { 297 ACPI_FPDT_HEADER Header; 298 UINT8 Reserved[4]; 299 UINT64 Address; 300 301 } ACPI_FPDT_S3PT_PTR; 302 303 304 /* 305 * S3PT - S3 Performance Table. This table is pointed to by the 306 * FPDT S3 Pointer Record above. 307 */ 308 typedef struct acpi_table_s3pt 309 { 310 UINT8 Signature[4]; /* "S3PT" */ 311 UINT32 Length; 312 313 } ACPI_TABLE_S3PT; 314 315 316 /* 317 * S3PT Subtables 318 */ 319 typedef struct acpi_s3pt_header 320 { 321 UINT16 Type; 322 UINT8 Length; 323 UINT8 Revision; 324 325 } ACPI_S3PT_HEADER; 326 327 /* Values for Type field above */ 328 329 enum AcpiS3ptType 330 { 331 ACPI_S3PT_TYPE_RESUME = 0, 332 ACPI_S3PT_TYPE_SUSPEND = 1 333 }; 334 335 typedef struct acpi_s3pt_resume 336 { 337 ACPI_S3PT_HEADER Header; 338 UINT32 ResumeCount; 339 UINT64 FullResume; 340 UINT64 AverageResume; 341 342 } ACPI_S3PT_RESUME; 343 344 typedef struct acpi_s3pt_suspend 345 { 346 ACPI_S3PT_HEADER Header; 347 UINT64 SuspendStart; 348 UINT64 SuspendEnd; 349 350 } ACPI_S3PT_SUSPEND; 351 352 353 /******************************************************************************* 354 * 355 * GTDT - Generic Timer Description Table (ACPI 5.1) 356 * Version 2 357 * 358 ******************************************************************************/ 359 360 typedef struct acpi_table_gtdt 361 { 362 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 363 UINT64 CounterBlockAddresss; 364 UINT32 Reserved; 365 UINT32 SecureEl1Interrupt; 366 UINT32 SecureEl1Flags; 367 UINT32 NonSecureEl1Interrupt; 368 UINT32 NonSecureEl1Flags; 369 UINT32 VirtualTimerInterrupt; 370 UINT32 VirtualTimerFlags; 371 UINT32 NonSecureEl2Interrupt; 372 UINT32 NonSecureEl2Flags; 373 UINT64 CounterReadBlockAddress; 374 UINT32 PlatformTimerCount; 375 UINT32 PlatformTimerOffset; 376 377 } ACPI_TABLE_GTDT; 378 379 /* Flag Definitions: Timer Block Physical Timers and Virtual timers */ 380 381 #define ACPI_GTDT_INTERRUPT_MODE (1) 382 #define ACPI_GTDT_INTERRUPT_POLARITY (1<<1) 383 #define ACPI_GTDT_ALWAYS_ON (1<<2) 384 385 386 /* Common GTDT subtable header */ 387 388 typedef struct acpi_gtdt_header 389 { 390 UINT8 Type; 391 UINT16 Length; 392 393 } ACPI_GTDT_HEADER; 394 395 /* Values for GTDT subtable type above */ 396 397 enum AcpiGtdtType 398 { 399 ACPI_GTDT_TYPE_TIMER_BLOCK = 0, 400 ACPI_GTDT_TYPE_WATCHDOG = 1, 401 ACPI_GTDT_TYPE_RESERVED = 2 /* 2 and greater are reserved */ 402 }; 403 404 405 /* GTDT Subtables, correspond to Type in acpi_gtdt_header */ 406 407 /* 0: Generic Timer Block */ 408 409 typedef struct acpi_gtdt_timer_block 410 { 411 ACPI_GTDT_HEADER Header; 412 UINT8 Reserved; 413 UINT64 BlockAddress; 414 UINT32 TimerCount; 415 UINT32 TimerOffset; 416 417 } ACPI_GTDT_TIMER_BLOCK; 418 419 /* Timer Sub-Structure, one per timer */ 420 421 typedef struct acpi_gtdt_timer_entry 422 { 423 UINT8 FrameNumber; 424 UINT8 Reserved[3]; 425 UINT64 BaseAddress; 426 UINT64 El0BaseAddress; 427 UINT32 TimerInterrupt; 428 UINT32 TimerFlags; 429 UINT32 VirtualTimerInterrupt; 430 UINT32 VirtualTimerFlags; 431 UINT32 CommonFlags; 432 433 } ACPI_GTDT_TIMER_ENTRY; 434 435 436 /* Flag Definitions: CommonFlags above */ 437 438 #define ACPI_GTDT_GT_IS_SECURE_TIMER (1) 439 #define ACPI_GTDT_GT_ALWAYS_ON (1<<1) 440 441 442 /* 1: SBSA Generic Watchdog Structure */ 443 444 typedef struct acpi_gtdt_watchdog 445 { 446 ACPI_GTDT_HEADER Header; 447 UINT8 Reserved; 448 UINT64 RefreshFrameAddress; 449 UINT64 ControlFrameAddress; 450 UINT32 TimerInterrupt; 451 UINT32 TimerFlags; 452 453 } ACPI_GTDT_WATCHDOG; 454 455 /* Flag Definitions: TimerFlags above */ 456 457 #define ACPI_GTDT_WATCHDOG_IRQ_MODE (1) 458 #define ACPI_GTDT_WATCHDOG_IRQ_POLARITY (1<<1) 459 #define ACPI_GTDT_WATCHDOG_SECURE (1<<2) 460 461 462 /******************************************************************************* 463 * 464 * MPST - Memory Power State Table (ACPI 5.0) 465 * Version 1 466 * 467 ******************************************************************************/ 468 469 #define ACPI_MPST_CHANNEL_INFO \ 470 UINT8 ChannelId; \ 471 UINT8 Reserved1[3]; \ 472 UINT16 PowerNodeCount; \ 473 UINT16 Reserved2; 474 475 /* Main table */ 476 477 typedef struct acpi_table_mpst 478 { 479 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 480 ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */ 481 482 } ACPI_TABLE_MPST; 483 484 485 /* Memory Platform Communication Channel Info */ 486 487 typedef struct acpi_mpst_channel 488 { 489 ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */ 490 491 } ACPI_MPST_CHANNEL; 492 493 494 /* Memory Power Node Structure */ 495 496 typedef struct acpi_mpst_power_node 497 { 498 UINT8 Flags; 499 UINT8 Reserved1; 500 UINT16 NodeId; 501 UINT32 Length; 502 UINT64 RangeAddress; 503 UINT64 RangeLength; 504 UINT32 NumPowerStates; 505 UINT32 NumPhysicalComponents; 506 507 } ACPI_MPST_POWER_NODE; 508 509 /* Values for Flags field above */ 510 511 #define ACPI_MPST_ENABLED 1 512 #define ACPI_MPST_POWER_MANAGED 2 513 #define ACPI_MPST_HOT_PLUG_CAPABLE 4 514 515 516 /* Memory Power State Structure (follows POWER_NODE above) */ 517 518 typedef struct acpi_mpst_power_state 519 { 520 UINT8 PowerState; 521 UINT8 InfoIndex; 522 523 } ACPI_MPST_POWER_STATE; 524 525 526 /* Physical Component ID Structure (follows POWER_STATE above) */ 527 528 typedef struct acpi_mpst_component 529 { 530 UINT16 ComponentId; 531 532 } ACPI_MPST_COMPONENT; 533 534 535 /* Memory Power State Characteristics Structure (follows all POWER_NODEs) */ 536 537 typedef struct acpi_mpst_data_hdr 538 { 539 UINT16 CharacteristicsCount; 540 UINT16 Reserved; 541 542 } ACPI_MPST_DATA_HDR; 543 544 typedef struct acpi_mpst_power_data 545 { 546 UINT8 StructureId; 547 UINT8 Flags; 548 UINT16 Reserved1; 549 UINT32 AveragePower; 550 UINT32 PowerSaving; 551 UINT64 ExitLatency; 552 UINT64 Reserved2; 553 554 } ACPI_MPST_POWER_DATA; 555 556 /* Values for Flags field above */ 557 558 #define ACPI_MPST_PRESERVE 1 559 #define ACPI_MPST_AUTOENTRY 2 560 #define ACPI_MPST_AUTOEXIT 4 561 562 563 /* Shared Memory Region (not part of an ACPI table) */ 564 565 typedef struct acpi_mpst_shared 566 { 567 UINT32 Signature; 568 UINT16 PccCommand; 569 UINT16 PccStatus; 570 UINT32 CommandRegister; 571 UINT32 StatusRegister; 572 UINT32 PowerStateId; 573 UINT32 PowerNodeId; 574 UINT64 EnergyConsumed; 575 UINT64 AveragePower; 576 577 } ACPI_MPST_SHARED; 578 579 580 /******************************************************************************* 581 * 582 * PCCT - Platform Communications Channel Table (ACPI 5.0) 583 * Version 1 584 * 585 ******************************************************************************/ 586 587 typedef struct acpi_table_pcct 588 { 589 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 590 UINT32 Flags; 591 UINT64 Reserved; 592 593 } ACPI_TABLE_PCCT; 594 595 /* Values for Flags field above */ 596 597 #define ACPI_PCCT_DOORBELL 1 598 599 /* Values for subtable type in ACPI_SUBTABLE_HEADER */ 600 601 enum AcpiPcctType 602 { 603 ACPI_PCCT_TYPE_GENERIC_SUBSPACE = 0, 604 ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE = 1, 605 ACPI_PCCT_TYPE_RESERVED = 2 /* 2 and greater are reserved */ 606 }; 607 608 /* 609 * PCCT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER 610 */ 611 612 /* 0: Generic Communications Subspace */ 613 614 typedef struct acpi_pcct_subspace 615 { 616 ACPI_SUBTABLE_HEADER Header; 617 UINT8 Reserved[6]; 618 UINT64 BaseAddress; 619 UINT64 Length; 620 ACPI_GENERIC_ADDRESS DoorbellRegister; 621 UINT64 PreserveMask; 622 UINT64 WriteMask; 623 UINT32 Latency; 624 UINT32 MaxAccessRate; 625 UINT16 MinTurnaroundTime; 626 627 } ACPI_PCCT_SUBSPACE; 628 629 630 /* 1: HW-reduced Communications Subspace (ACPI 5.1) */ 631 632 typedef struct acpi_pcct_hw_reduced 633 { 634 ACPI_SUBTABLE_HEADER Header; 635 UINT32 DoorbellInterrupt; 636 UINT8 Flags; 637 UINT8 Reserved; 638 UINT64 BaseAddress; 639 UINT64 Length; 640 ACPI_GENERIC_ADDRESS DoorbellRegister; 641 UINT64 PreserveMask; 642 UINT64 WriteMask; 643 UINT32 Latency; 644 UINT32 MaxAccessRate; 645 UINT16 MinTurnaroundTime; 646 647 } ACPI_PCCT_HW_REDUCED; 648 649 /* Values for doorbell flags above */ 650 651 #define ACPI_PCCT_INTERRUPT_POLARITY (1) 652 #define ACPI_PCCT_INTERRUPT_MODE (1<<1) 653 654 655 /* 656 * PCC memory structures (not part of the ACPI table) 657 */ 658 659 /* Shared Memory Region */ 660 661 typedef struct acpi_pcct_shared_memory 662 { 663 UINT32 Signature; 664 UINT16 Command; 665 UINT16 Status; 666 667 } ACPI_PCCT_SHARED_MEMORY; 668 669 670 /******************************************************************************* 671 * 672 * PMTT - Platform Memory Topology Table (ACPI 5.0) 673 * Version 1 674 * 675 ******************************************************************************/ 676 677 typedef struct acpi_table_pmtt 678 { 679 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 680 UINT32 Reserved; 681 682 } ACPI_TABLE_PMTT; 683 684 685 /* Common header for PMTT subtables that follow main table */ 686 687 typedef struct acpi_pmtt_header 688 { 689 UINT8 Type; 690 UINT8 Reserved1; 691 UINT16 Length; 692 UINT16 Flags; 693 UINT16 Reserved2; 694 695 } ACPI_PMTT_HEADER; 696 697 /* Values for Type field above */ 698 699 #define ACPI_PMTT_TYPE_SOCKET 0 700 #define ACPI_PMTT_TYPE_CONTROLLER 1 701 #define ACPI_PMTT_TYPE_DIMM 2 702 #define ACPI_PMTT_TYPE_RESERVED 3 /* 0x03-0xFF are reserved */ 703 704 /* Values for Flags field above */ 705 706 #define ACPI_PMTT_TOP_LEVEL 0x0001 707 #define ACPI_PMTT_PHYSICAL 0x0002 708 #define ACPI_PMTT_MEMORY_TYPE 0x000C 709 710 711 /* 712 * PMTT subtables, correspond to Type in acpi_pmtt_header 713 */ 714 715 716 /* 0: Socket Structure */ 717 718 typedef struct acpi_pmtt_socket 719 { 720 ACPI_PMTT_HEADER Header; 721 UINT16 SocketId; 722 UINT16 Reserved; 723 724 } ACPI_PMTT_SOCKET; 725 726 727 /* 1: Memory Controller subtable */ 728 729 typedef struct acpi_pmtt_controller 730 { 731 ACPI_PMTT_HEADER Header; 732 UINT32 ReadLatency; 733 UINT32 WriteLatency; 734 UINT32 ReadBandwidth; 735 UINT32 WriteBandwidth; 736 UINT16 AccessWidth; 737 UINT16 Alignment; 738 UINT16 Reserved; 739 UINT16 DomainCount; 740 741 } ACPI_PMTT_CONTROLLER; 742 743 /* 1a: Proximity Domain substructure */ 744 745 typedef struct acpi_pmtt_domain 746 { 747 UINT32 ProximityDomain; 748 749 } ACPI_PMTT_DOMAIN; 750 751 752 /* 2: Physical Component Identifier (DIMM) */ 753 754 typedef struct acpi_pmtt_physical_component 755 { 756 ACPI_PMTT_HEADER Header; 757 UINT16 ComponentId; 758 UINT16 Reserved; 759 UINT32 MemorySize; 760 UINT32 BiosHandle; 761 762 } ACPI_PMTT_PHYSICAL_COMPONENT; 763 764 765 /******************************************************************************* 766 * 767 * RASF - RAS Feature Table (ACPI 5.0) 768 * Version 1 769 * 770 ******************************************************************************/ 771 772 typedef struct acpi_table_rasf 773 { 774 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 775 UINT8 ChannelId[12]; 776 777 } ACPI_TABLE_RASF; 778 779 /* RASF Platform Communication Channel Shared Memory Region */ 780 781 typedef struct acpi_rasf_shared_memory 782 { 783 UINT32 Signature; 784 UINT16 Command; 785 UINT16 Status; 786 UINT16 Version; 787 UINT8 Capabilities[16]; 788 UINT8 SetCapabilities[16]; 789 UINT16 NumParameterBlocks; 790 UINT32 SetCapabilitiesStatus; 791 792 } ACPI_RASF_SHARED_MEMORY; 793 794 /* RASF Parameter Block Structure Header */ 795 796 typedef struct acpi_rasf_parameter_block 797 { 798 UINT16 Type; 799 UINT16 Version; 800 UINT16 Length; 801 802 } ACPI_RASF_PARAMETER_BLOCK; 803 804 /* RASF Parameter Block Structure for PATROL_SCRUB */ 805 806 typedef struct acpi_rasf_patrol_scrub_parameter 807 { 808 ACPI_RASF_PARAMETER_BLOCK Header; 809 UINT16 PatrolScrubCommand; 810 UINT64 RequestedAddressRange[2]; 811 UINT64 ActualAddressRange[2]; 812 UINT16 Flags; 813 UINT8 RequestedSpeed; 814 815 } ACPI_RASF_PATROL_SCRUB_PARAMETER; 816 817 /* Masks for Flags and Speed fields above */ 818 819 #define ACPI_RASF_SCRUBBER_RUNNING 1 820 #define ACPI_RASF_SPEED (7<<1) 821 #define ACPI_RASF_SPEED_SLOW (0<<1) 822 #define ACPI_RASF_SPEED_MEDIUM (4<<1) 823 #define ACPI_RASF_SPEED_FAST (7<<1) 824 825 /* Channel Commands */ 826 827 enum AcpiRasfCommands 828 { 829 ACPI_RASF_EXECUTE_RASF_COMMAND = 1 830 }; 831 832 /* Platform RAS Capabilities */ 833 834 enum AcpiRasfCapabiliities 835 { 836 ACPI_HW_PATROL_SCRUB_SUPPORTED = 0, 837 ACPI_SW_PATROL_SCRUB_EXPOSED = 1 838 }; 839 840 /* Patrol Scrub Commands */ 841 842 enum AcpiRasfPatrolScrubCommands 843 { 844 ACPI_RASF_GET_PATROL_PARAMETERS = 1, 845 ACPI_RASF_START_PATROL_SCRUBBER = 2, 846 ACPI_RASF_STOP_PATROL_SCRUBBER = 3 847 }; 848 849 /* Channel Command flags */ 850 851 #define ACPI_RASF_GENERATE_SCI (1<<15) 852 853 /* Status values */ 854 855 enum AcpiRasfStatus 856 { 857 ACPI_RASF_SUCCESS = 0, 858 ACPI_RASF_NOT_VALID = 1, 859 ACPI_RASF_NOT_SUPPORTED = 2, 860 ACPI_RASF_BUSY = 3, 861 ACPI_RASF_FAILED = 4, 862 ACPI_RASF_ABORTED = 5, 863 ACPI_RASF_INVALID_DATA = 6 864 }; 865 866 /* Status flags */ 867 868 #define ACPI_RASF_COMMAND_COMPLETE (1) 869 #define ACPI_RASF_SCI_DOORBELL (1<<1) 870 #define ACPI_RASF_ERROR (1<<2) 871 #define ACPI_RASF_STATUS (0x1F<<3) 872 873 874 /******************************************************************************* 875 * 876 * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table 877 * Version 3 878 * 879 * Conforms to "TPM 2.0 Hardware Interface Table (TPM2)" 29 November 2011 880 * 881 ******************************************************************************/ 882 883 typedef struct acpi_table_tpm2 884 { 885 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 886 UINT32 Flags; 887 UINT64 ControlAddress; 888 UINT32 StartMethod; 889 890 } ACPI_TABLE_TPM2; 891 892 /* Control area structure (not part of table, pointed to by ControlAddress) */ 893 894 typedef struct acpi_tpm2_control 895 { 896 UINT32 Reserved; 897 UINT32 Error; 898 UINT32 Cancel; 899 UINT32 Start; 900 UINT64 InterruptControl; 901 UINT32 CommandSize; 902 UINT64 CommandAddress; 903 UINT32 ResponseSize; 904 UINT64 ResponseAddress; 905 906 } ACPI_TPM2_CONTROL; 907 908 909 /* Reset to default packing */ 910 911 #pragma pack() 912 913 #endif /* __ACTBL3_H__ */ 914