1 /****************************************************************************** 2 * 3 * Name: actbl3.h - ACPI Table Definitions 4 * 5 *****************************************************************************/ 6 7 /* 8 * Copyright (C) 2000 - 2014, 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 __ACTBL3_H__ 45 #define __ACTBL3_H__ 46 47 48 /******************************************************************************* 49 * 50 * Additional ACPI Tables (3) 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 fully defined within the ACPI specification. 56 * 57 ******************************************************************************/ 58 59 60 /* 61 * Values for description table header signatures for tables defined in this 62 * file. Useful because they make it more difficult to inadvertently type in 63 * the wrong signature. 64 */ 65 #define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */ 66 #define ACPI_SIG_DRTM "DRTM" /* Dynamic Root of Trust for Measurement table */ 67 #define ACPI_SIG_FPDT "FPDT" /* Firmware Performance Data Table */ 68 #define ACPI_SIG_GTDT "GTDT" /* Generic Timer Description Table */ 69 #define ACPI_SIG_MPST "MPST" /* Memory Power State Table */ 70 #define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */ 71 #define ACPI_SIG_PMTT "PMTT" /* Platform Memory Topology Table */ 72 #define ACPI_SIG_RASF "RASF" /* RAS Feature table */ 73 #define ACPI_SIG_TPM2 "TPM2" /* Trusted Platform Module 2.0 H/W interface table */ 74 75 #define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */ 76 #define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */ 77 78 /* Reserved table signatures */ 79 80 #define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */ 81 #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */ 82 #define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */ 83 84 /* 85 * All tables must be byte-packed to match the ACPI specification, since 86 * the tables are provided by the system BIOS. 87 */ 88 #pragma pack(1) 89 90 /* 91 * Note: C bitfields are not used for this reason: 92 * 93 * "Bitfields are great and easy to read, but unfortunately the C language 94 * does not specify the layout of bitfields in memory, which means they are 95 * essentially useless for dealing with packed data in on-disk formats or 96 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me, 97 * this decision was a design error in C. Ritchie could have picked an order 98 * and stuck with it." Norman Ramsey. 99 * See http://stackoverflow.com/a/1053662/41661 100 */ 101 102 103 /******************************************************************************* 104 * 105 * BGRT - Boot Graphics Resource Table (ACPI 5.0) 106 * Version 1 107 * 108 ******************************************************************************/ 109 110 typedef struct acpi_table_bgrt 111 { 112 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 113 UINT16 Version; 114 UINT8 Status; 115 UINT8 ImageType; 116 UINT64 ImageAddress; 117 UINT32 ImageOffsetX; 118 UINT32 ImageOffsetY; 119 120 } ACPI_TABLE_BGRT; 121 122 123 /******************************************************************************* 124 * 125 * DRTM - Dynamic Root of Trust for Measurement table 126 * 127 ******************************************************************************/ 128 129 typedef struct acpi_table_drtm 130 { 131 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 132 UINT64 EntryBaseAddress; 133 UINT64 EntryLength; 134 UINT32 EntryAddress32; 135 UINT64 EntryAddress64; 136 UINT64 ExitAddress; 137 UINT64 LogAreaAddress; 138 UINT32 LogAreaLength; 139 UINT64 ArchDependentAddress; 140 UINT32 Flags; 141 142 } ACPI_TABLE_DRTM; 143 144 /* 1) Validated Tables List */ 145 146 typedef struct acpi_drtm_vtl_list 147 { 148 UINT32 ValidatedTableListCount; 149 150 } ACPI_DRTM_VTL_LIST; 151 152 /* 2) Resources List */ 153 154 typedef struct acpi_drtm_resource_list 155 { 156 UINT32 ResourceListCount; 157 158 } ACPI_DRTM_RESOURCE_LIST; 159 160 /* 3) Platform-specific Identifiers List */ 161 162 typedef struct acpi_drtm_id_list 163 { 164 UINT32 IdListCount; 165 166 } ACPI_DRTM_ID_LIST; 167 168 169 /******************************************************************************* 170 * 171 * FPDT - Firmware Performance Data Table (ACPI 5.0) 172 * Version 1 173 * 174 ******************************************************************************/ 175 176 typedef struct acpi_table_fpdt 177 { 178 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 179 180 } ACPI_TABLE_FPDT; 181 182 183 /* FPDT subtable header */ 184 185 typedef struct acpi_fpdt_header 186 { 187 UINT16 Type; 188 UINT8 Length; 189 UINT8 Revision; 190 191 } ACPI_FPDT_HEADER; 192 193 /* Values for Type field above */ 194 195 enum AcpiFpdtType 196 { 197 ACPI_FPDT_TYPE_BOOT = 0, 198 ACPI_FPDT_TYPE_S3PERF = 1 199 }; 200 201 202 /* 203 * FPDT subtables 204 */ 205 206 /* 0: Firmware Basic Boot Performance Record */ 207 208 typedef struct acpi_fpdt_boot 209 { 210 ACPI_FPDT_HEADER Header; 211 UINT8 Reserved[4]; 212 UINT64 ResetEnd; 213 UINT64 LoadStart; 214 UINT64 StartupStart; 215 UINT64 ExitServicesEntry; 216 UINT64 ExitServicesExit; 217 218 } ACPI_FPDT_BOOT; 219 220 221 /* 1: S3 Performance Table Pointer Record */ 222 223 typedef struct acpi_fpdt_s3pt_ptr 224 { 225 ACPI_FPDT_HEADER Header; 226 UINT8 Reserved[4]; 227 UINT64 Address; 228 229 } ACPI_FPDT_S3PT_PTR; 230 231 232 /* 233 * S3PT - S3 Performance Table. This table is pointed to by the 234 * FPDT S3 Pointer Record above. 235 */ 236 typedef struct acpi_table_s3pt 237 { 238 UINT8 Signature[4]; /* "S3PT" */ 239 UINT32 Length; 240 241 } ACPI_TABLE_S3PT; 242 243 244 /* 245 * S3PT Subtables 246 */ 247 typedef struct acpi_s3pt_header 248 { 249 UINT16 Type; 250 UINT8 Length; 251 UINT8 Revision; 252 253 } ACPI_S3PT_HEADER; 254 255 /* Values for Type field above */ 256 257 enum AcpiS3ptType 258 { 259 ACPI_S3PT_TYPE_RESUME = 0, 260 ACPI_S3PT_TYPE_SUSPEND = 1 261 }; 262 263 typedef struct acpi_s3pt_resume 264 { 265 ACPI_S3PT_HEADER Header; 266 UINT32 ResumeCount; 267 UINT64 FullResume; 268 UINT64 AverageResume; 269 270 } ACPI_S3PT_RESUME; 271 272 typedef struct acpi_s3pt_suspend 273 { 274 ACPI_S3PT_HEADER Header; 275 UINT64 SuspendStart; 276 UINT64 SuspendEnd; 277 278 } ACPI_S3PT_SUSPEND; 279 280 281 /******************************************************************************* 282 * 283 * GTDT - Generic Timer Description Table (ACPI 5.1) 284 * Version 2 285 * 286 ******************************************************************************/ 287 288 typedef struct acpi_table_gtdt 289 { 290 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 291 UINT64 CounterBlockAddresss; 292 UINT32 Reserved; 293 UINT32 SecureEl1Interrupt; 294 UINT32 SecureEl1Flags; 295 UINT32 NonSecureEl1Interrupt; 296 UINT32 NonSecureEl1Flags; 297 UINT32 VirtualTimerInterrupt; 298 UINT32 VirtualTimerFlags; 299 UINT32 NonSecureEl2Interrupt; 300 UINT32 NonSecureEl2Flags; 301 UINT64 CounterReadBlockAddress; 302 UINT32 PlatformTimerCount; 303 UINT32 PlatformTimerOffset; 304 305 } ACPI_TABLE_GTDT; 306 307 /* Flag Definitions: Timer Block Physical Timers and Virtual timers */ 308 309 #define ACPI_GTDT_INTERRUPT_MODE (1) 310 #define ACPI_GTDT_INTERRUPT_POLARITY (1<<1) 311 #define ACPI_GTDT_ALWAYS_ON (1<<2) 312 313 314 /* Common GTDT subtable header */ 315 316 typedef struct acpi_gtdt_header 317 { 318 UINT8 Type; 319 UINT16 Length; 320 321 } ACPI_GTDT_HEADER; 322 323 /* Values for GTDT subtable type above */ 324 325 enum AcpiGtdtType 326 { 327 ACPI_GTDT_TYPE_TIMER_BLOCK = 0, 328 ACPI_GTDT_TYPE_WATCHDOG = 1, 329 ACPI_GTDT_TYPE_RESERVED = 2 /* 2 and greater are reserved */ 330 }; 331 332 333 /* GTDT Subtables, correspond to Type in acpi_gtdt_header */ 334 335 /* 0: Generic Timer Block */ 336 337 typedef struct acpi_gtdt_timer_block 338 { 339 ACPI_GTDT_HEADER Header; 340 UINT8 Reserved; 341 UINT64 BlockAddress; 342 UINT32 TimerCount; 343 UINT32 TimerOffset; 344 345 } ACPI_GTDT_TIMER_BLOCK; 346 347 /* Timer Sub-Structure, one per timer */ 348 349 typedef struct acpi_gtdt_timer_entry 350 { 351 UINT8 FrameNumber; 352 UINT8 Reserved[3]; 353 UINT64 BaseAddress; 354 UINT64 El0BaseAddress; 355 UINT32 TimerInterrupt; 356 UINT32 TimerFlags; 357 UINT32 VirtualTimerInterrupt; 358 UINT32 VirtualTimerFlags; 359 UINT32 CommonFlags; 360 361 } ACPI_GTDT_TIMER_ENTRY; 362 363 364 /* Flag Definitions: CommonFlags above */ 365 366 #define ACPI_GTDT_GT_IS_SECURE_TIMER (1) 367 #define ACPI_GTDT_GT_ALWAYS_ON (1<<1) 368 369 370 /* 1: SBSA Generic Watchdog Structure */ 371 372 typedef struct acpi_gtdt_watchdog 373 { 374 ACPI_GTDT_HEADER Header; 375 UINT8 Reserved; 376 UINT64 RefreshFrameAddress; 377 UINT64 ControlFrameAddress; 378 UINT32 TimerInterrupt; 379 UINT32 TimerFlags; 380 381 } ACPI_GTDT_WATCHDOG; 382 383 /* Flag Definitions: TimerFlags above */ 384 385 #define ACPI_GTDT_WATCHDOG_IRQ_MODE (1) 386 #define ACPI_GTDT_WATCHDOG_IRQ_POLARITY (1<<1) 387 #define ACPI_GTDT_WATCHDOG_SECURE (1<<2) 388 389 390 /******************************************************************************* 391 * 392 * MPST - Memory Power State Table (ACPI 5.0) 393 * Version 1 394 * 395 ******************************************************************************/ 396 397 #define ACPI_MPST_CHANNEL_INFO \ 398 UINT8 ChannelId; \ 399 UINT8 Reserved1[3]; \ 400 UINT16 PowerNodeCount; \ 401 UINT16 Reserved2; 402 403 /* Main table */ 404 405 typedef struct acpi_table_mpst 406 { 407 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 408 ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */ 409 410 } ACPI_TABLE_MPST; 411 412 413 /* Memory Platform Communication Channel Info */ 414 415 typedef struct acpi_mpst_channel 416 { 417 ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */ 418 419 } ACPI_MPST_CHANNEL; 420 421 422 /* Memory Power Node Structure */ 423 424 typedef struct acpi_mpst_power_node 425 { 426 UINT8 Flags; 427 UINT8 Reserved1; 428 UINT16 NodeId; 429 UINT32 Length; 430 UINT64 RangeAddress; 431 UINT64 RangeLength; 432 UINT32 NumPowerStates; 433 UINT32 NumPhysicalComponents; 434 435 } ACPI_MPST_POWER_NODE; 436 437 /* Values for Flags field above */ 438 439 #define ACPI_MPST_ENABLED 1 440 #define ACPI_MPST_POWER_MANAGED 2 441 #define ACPI_MPST_HOT_PLUG_CAPABLE 4 442 443 444 /* Memory Power State Structure (follows POWER_NODE above) */ 445 446 typedef struct acpi_mpst_power_state 447 { 448 UINT8 PowerState; 449 UINT8 InfoIndex; 450 451 } ACPI_MPST_POWER_STATE; 452 453 454 /* Physical Component ID Structure (follows POWER_STATE above) */ 455 456 typedef struct acpi_mpst_component 457 { 458 UINT16 ComponentId; 459 460 } ACPI_MPST_COMPONENT; 461 462 463 /* Memory Power State Characteristics Structure (follows all POWER_NODEs) */ 464 465 typedef struct acpi_mpst_data_hdr 466 { 467 UINT16 CharacteristicsCount; 468 UINT16 Reserved; 469 470 } ACPI_MPST_DATA_HDR; 471 472 typedef struct acpi_mpst_power_data 473 { 474 UINT8 StructureId; 475 UINT8 Flags; 476 UINT16 Reserved1; 477 UINT32 AveragePower; 478 UINT32 PowerSaving; 479 UINT64 ExitLatency; 480 UINT64 Reserved2; 481 482 } ACPI_MPST_POWER_DATA; 483 484 /* Values for Flags field above */ 485 486 #define ACPI_MPST_PRESERVE 1 487 #define ACPI_MPST_AUTOENTRY 2 488 #define ACPI_MPST_AUTOEXIT 4 489 490 491 /* Shared Memory Region (not part of an ACPI table) */ 492 493 typedef struct acpi_mpst_shared 494 { 495 UINT32 Signature; 496 UINT16 PccCommand; 497 UINT16 PccStatus; 498 UINT32 CommandRegister; 499 UINT32 StatusRegister; 500 UINT32 PowerStateId; 501 UINT32 PowerNodeId; 502 UINT64 EnergyConsumed; 503 UINT64 AveragePower; 504 505 } ACPI_MPST_SHARED; 506 507 508 /******************************************************************************* 509 * 510 * PCCT - Platform Communications Channel Table (ACPI 5.0) 511 * Version 1 512 * 513 ******************************************************************************/ 514 515 typedef struct acpi_table_pcct 516 { 517 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 518 UINT32 Flags; 519 UINT64 Reserved; 520 521 } ACPI_TABLE_PCCT; 522 523 /* Values for Flags field above */ 524 525 #define ACPI_PCCT_DOORBELL 1 526 527 /* Values for subtable type in ACPI_SUBTABLE_HEADER */ 528 529 enum AcpiPcctType 530 { 531 ACPI_PCCT_TYPE_GENERIC_SUBSPACE = 0, 532 ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE = 1, 533 ACPI_PCCT_TYPE_RESERVED = 2 /* 2 and greater are reserved */ 534 }; 535 536 /* 537 * PCCT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER 538 */ 539 540 /* 0: Generic Communications Subspace */ 541 542 typedef struct acpi_pcct_subspace 543 { 544 ACPI_SUBTABLE_HEADER Header; 545 UINT8 Reserved[6]; 546 UINT64 BaseAddress; 547 UINT64 Length; 548 ACPI_GENERIC_ADDRESS DoorbellRegister; 549 UINT64 PreserveMask; 550 UINT64 WriteMask; 551 UINT32 Latency; 552 UINT32 MaxAccessRate; 553 UINT16 MinTurnaroundTime; 554 555 } ACPI_PCCT_SUBSPACE; 556 557 558 /* 1: HW-reduced Communications Subspace (ACPI 5.1) */ 559 560 typedef struct acpi_pcct_hw_reduced 561 { 562 ACPI_SUBTABLE_HEADER Header; 563 UINT32 DoorbellInterrupt; 564 UINT8 Flags; 565 UINT8 Reserved; 566 UINT64 BaseAddress; 567 UINT64 Length; 568 ACPI_GENERIC_ADDRESS DoorbellRegister; 569 UINT64 PreserveMask; 570 UINT64 WriteMask; 571 UINT32 Latency; 572 UINT32 MaxAccessRate; 573 UINT16 MinTurnaroundTime; 574 575 } ACPI_PCCT_HW_REDUCED; 576 577 /* Values for doorbell flags above */ 578 579 #define ACPI_PCCT_INTERRUPT_POLARITY (1) 580 #define ACPI_PCCT_INTERRUPT_MODE (1<<1) 581 582 583 /* 584 * PCC memory structures (not part of the ACPI table) 585 */ 586 587 /* Shared Memory Region */ 588 589 typedef struct acpi_pcct_shared_memory 590 { 591 UINT32 Signature; 592 UINT16 Command; 593 UINT16 Status; 594 595 } ACPI_PCCT_SHARED_MEMORY; 596 597 598 /******************************************************************************* 599 * 600 * PMTT - Platform Memory Topology Table (ACPI 5.0) 601 * Version 1 602 * 603 ******************************************************************************/ 604 605 typedef struct acpi_table_pmtt 606 { 607 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 608 UINT32 Reserved; 609 610 } ACPI_TABLE_PMTT; 611 612 613 /* Common header for PMTT subtables that follow main table */ 614 615 typedef struct acpi_pmtt_header 616 { 617 UINT8 Type; 618 UINT8 Reserved1; 619 UINT16 Length; 620 UINT16 Flags; 621 UINT16 Reserved2; 622 623 } ACPI_PMTT_HEADER; 624 625 /* Values for Type field above */ 626 627 #define ACPI_PMTT_TYPE_SOCKET 0 628 #define ACPI_PMTT_TYPE_CONTROLLER 1 629 #define ACPI_PMTT_TYPE_DIMM 2 630 #define ACPI_PMTT_TYPE_RESERVED 3 /* 0x03-0xFF are reserved */ 631 632 /* Values for Flags field above */ 633 634 #define ACPI_PMTT_TOP_LEVEL 0x0001 635 #define ACPI_PMTT_PHYSICAL 0x0002 636 #define ACPI_PMTT_MEMORY_TYPE 0x000C 637 638 639 /* 640 * PMTT subtables, correspond to Type in acpi_pmtt_header 641 */ 642 643 644 /* 0: Socket Structure */ 645 646 typedef struct acpi_pmtt_socket 647 { 648 ACPI_PMTT_HEADER Header; 649 UINT16 SocketId; 650 UINT16 Reserved; 651 652 } ACPI_PMTT_SOCKET; 653 654 655 /* 1: Memory Controller subtable */ 656 657 typedef struct acpi_pmtt_controller 658 { 659 ACPI_PMTT_HEADER Header; 660 UINT32 ReadLatency; 661 UINT32 WriteLatency; 662 UINT32 ReadBandwidth; 663 UINT32 WriteBandwidth; 664 UINT16 AccessWidth; 665 UINT16 Alignment; 666 UINT16 Reserved; 667 UINT16 DomainCount; 668 669 } ACPI_PMTT_CONTROLLER; 670 671 /* 1a: Proximity Domain substructure */ 672 673 typedef struct acpi_pmtt_domain 674 { 675 UINT32 ProximityDomain; 676 677 } ACPI_PMTT_DOMAIN; 678 679 680 /* 2: Physical Component Identifier (DIMM) */ 681 682 typedef struct acpi_pmtt_physical_component 683 { 684 ACPI_PMTT_HEADER Header; 685 UINT16 ComponentId; 686 UINT16 Reserved; 687 UINT32 MemorySize; 688 UINT32 BiosHandle; 689 690 } ACPI_PMTT_PHYSICAL_COMPONENT; 691 692 693 /******************************************************************************* 694 * 695 * RASF - RAS Feature Table (ACPI 5.0) 696 * Version 1 697 * 698 ******************************************************************************/ 699 700 typedef struct acpi_table_rasf 701 { 702 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 703 UINT8 ChannelId[12]; 704 705 } ACPI_TABLE_RASF; 706 707 /* RASF Platform Communication Channel Shared Memory Region */ 708 709 typedef struct acpi_rasf_shared_memory 710 { 711 UINT32 Signature; 712 UINT16 Command; 713 UINT16 Status; 714 UINT16 Version; 715 UINT8 Capabilities[16]; 716 UINT8 SetCapabilities[16]; 717 UINT16 NumParameterBlocks; 718 UINT32 SetCapabilitiesStatus; 719 720 } ACPI_RASF_SHARED_MEMORY; 721 722 /* RASF Parameter Block Structure Header */ 723 724 typedef struct acpi_rasf_parameter_block 725 { 726 UINT16 Type; 727 UINT16 Version; 728 UINT16 Length; 729 730 } ACPI_RASF_PARAMETER_BLOCK; 731 732 /* RASF Parameter Block Structure for PATROL_SCRUB */ 733 734 typedef struct acpi_rasf_patrol_scrub_parameter 735 { 736 ACPI_RASF_PARAMETER_BLOCK Header; 737 UINT16 PatrolScrubCommand; 738 UINT64 RequestedAddressRange[2]; 739 UINT64 ActualAddressRange[2]; 740 UINT16 Flags; 741 UINT8 RequestedSpeed; 742 743 } ACPI_RASF_PATROL_SCRUB_PARAMETER; 744 745 /* Masks for Flags and Speed fields above */ 746 747 #define ACPI_RASF_SCRUBBER_RUNNING 1 748 #define ACPI_RASF_SPEED (7<<1) 749 #define ACPI_RASF_SPEED_SLOW (0<<1) 750 #define ACPI_RASF_SPEED_MEDIUM (4<<1) 751 #define ACPI_RASF_SPEED_FAST (7<<1) 752 753 /* Channel Commands */ 754 755 enum AcpiRasfCommands 756 { 757 ACPI_RASF_EXECUTE_RASF_COMMAND = 1 758 }; 759 760 /* Platform RAS Capabilities */ 761 762 enum AcpiRasfCapabiliities 763 { 764 ACPI_HW_PATROL_SCRUB_SUPPORTED = 0, 765 ACPI_SW_PATROL_SCRUB_EXPOSED = 1 766 }; 767 768 /* Patrol Scrub Commands */ 769 770 enum AcpiRasfPatrolScrubCommands 771 { 772 ACPI_RASF_GET_PATROL_PARAMETERS = 1, 773 ACPI_RASF_START_PATROL_SCRUBBER = 2, 774 ACPI_RASF_STOP_PATROL_SCRUBBER = 3 775 }; 776 777 /* Channel Command flags */ 778 779 #define ACPI_RASF_GENERATE_SCI (1<<15) 780 781 /* Status values */ 782 783 enum AcpiRasfStatus 784 { 785 ACPI_RASF_SUCCESS = 0, 786 ACPI_RASF_NOT_VALID = 1, 787 ACPI_RASF_NOT_SUPPORTED = 2, 788 ACPI_RASF_BUSY = 3, 789 ACPI_RASF_FAILED = 4, 790 ACPI_RASF_ABORTED = 5, 791 ACPI_RASF_INVALID_DATA = 6 792 }; 793 794 /* Status flags */ 795 796 #define ACPI_RASF_COMMAND_COMPLETE (1) 797 #define ACPI_RASF_SCI_DOORBELL (1<<1) 798 #define ACPI_RASF_ERROR (1<<2) 799 #define ACPI_RASF_STATUS (0x1F<<3) 800 801 802 /******************************************************************************* 803 * 804 * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table 805 * Version 3 806 * 807 * Conforms to "TPM 2.0 Hardware Interface Table (TPM2)" 29 November 2011 808 * 809 ******************************************************************************/ 810 811 typedef struct acpi_table_tpm2 812 { 813 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 814 UINT32 Flags; 815 UINT64 ControlAddress; 816 UINT32 StartMethod; 817 818 } ACPI_TABLE_TPM2; 819 820 /* Control area structure (not part of table, pointed to by ControlAddress) */ 821 822 typedef struct acpi_tpm2_control 823 { 824 UINT32 Reserved; 825 UINT32 Error; 826 UINT32 Cancel; 827 UINT32 Start; 828 UINT64 InterruptControl; 829 UINT32 CommandSize; 830 UINT64 CommandAddress; 831 UINT32 ResponseSize; 832 UINT64 ResponseAddress; 833 834 } ACPI_TPM2_CONTROL; 835 836 837 /* Reset to default packing */ 838 839 #pragma pack() 840 841 #endif /* __ACTBL3_H__ */ 842