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 - 2016, 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 * In general, the tables in this file are fully defined within the ACPI 128 * specification. 129 * 130 ******************************************************************************/ 131 132 133 /* 134 * Values for description table header signatures for tables defined in this 135 * file. Useful because they make it more difficult to inadvertently type in 136 * the wrong signature. 137 */ 138 #define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */ 139 #define ACPI_SIG_DRTM "DRTM" /* Dynamic Root of Trust for Measurement table */ 140 #define ACPI_SIG_FPDT "FPDT" /* Firmware Performance Data Table */ 141 #define ACPI_SIG_GTDT "GTDT" /* Generic Timer Description Table */ 142 #define ACPI_SIG_MPST "MPST" /* Memory Power State Table */ 143 #define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */ 144 #define ACPI_SIG_PMTT "PMTT" /* Platform Memory Topology Table */ 145 #define ACPI_SIG_RASF "RASF" /* RAS Feature table */ 146 #define ACPI_SIG_STAO "STAO" /* Status Override table */ 147 #define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */ 148 #define ACPI_SIG_XENV "XENV" /* Xen Environment table */ 149 150 #define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */ 151 #define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */ 152 153 /* Reserved table signatures */ 154 155 #define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */ 156 #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */ 157 158 /* 159 * All tables must be byte-packed to match the ACPI specification, since 160 * the tables are provided by the system BIOS. 161 */ 162 #pragma pack(1) 163 164 /* 165 * Note: C bitfields are not used for this reason: 166 * 167 * "Bitfields are great and easy to read, but unfortunately the C language 168 * does not specify the layout of bitfields in memory, which means they are 169 * essentially useless for dealing with packed data in on-disk formats or 170 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me, 171 * this decision was a design error in C. Ritchie could have picked an order 172 * and stuck with it." Norman Ramsey. 173 * See http://stackoverflow.com/a/1053662/41661 174 */ 175 176 177 /******************************************************************************* 178 * 179 * BGRT - Boot Graphics Resource Table (ACPI 5.0) 180 * Version 1 181 * 182 ******************************************************************************/ 183 184 typedef struct acpi_table_bgrt 185 { 186 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 187 UINT16 Version; 188 UINT8 Status; 189 UINT8 ImageType; 190 UINT64 ImageAddress; 191 UINT32 ImageOffsetX; 192 UINT32 ImageOffsetY; 193 194 } ACPI_TABLE_BGRT; 195 196 197 /******************************************************************************* 198 * 199 * DRTM - Dynamic Root of Trust for Measurement table 200 * Conforms to "TCG D-RTM Architecture" June 17 2013, Version 1.0.0 201 * Table version 1 202 * 203 ******************************************************************************/ 204 205 typedef struct acpi_table_drtm 206 { 207 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 208 UINT64 EntryBaseAddress; 209 UINT64 EntryLength; 210 UINT32 EntryAddress32; 211 UINT64 EntryAddress64; 212 UINT64 ExitAddress; 213 UINT64 LogAreaAddress; 214 UINT32 LogAreaLength; 215 UINT64 ArchDependentAddress; 216 UINT32 Flags; 217 218 } ACPI_TABLE_DRTM; 219 220 /* Flag Definitions for above */ 221 222 #define ACPI_DRTM_ACCESS_ALLOWED (1) 223 #define ACPI_DRTM_ENABLE_GAP_CODE (1<<1) 224 #define ACPI_DRTM_INCOMPLETE_MEASUREMENTS (1<<2) 225 #define ACPI_DRTM_AUTHORITY_ORDER (1<<3) 226 227 228 /* 1) Validated Tables List (64-bit addresses) */ 229 230 typedef struct acpi_drtm_vtable_list 231 { 232 UINT32 ValidatedTableCount; 233 UINT64 ValidatedTables[1]; 234 235 } ACPI_DRTM_VTABLE_LIST; 236 237 /* 2) Resources List (of Resource Descriptors) */ 238 239 /* Resource Descriptor */ 240 241 typedef struct acpi_drtm_resource 242 { 243 UINT8 Size[7]; 244 UINT8 Type; 245 UINT64 Address; 246 247 } ACPI_DRTM_RESOURCE; 248 249 typedef struct acpi_drtm_resource_list 250 { 251 UINT32 ResourceCount; 252 ACPI_DRTM_RESOURCE Resources[1]; 253 254 } ACPI_DRTM_RESOURCE_LIST; 255 256 /* 3) Platform-specific Identifiers List */ 257 258 typedef struct acpi_drtm_dps_id 259 { 260 UINT32 DpsIdLength; 261 UINT8 DpsId[16]; 262 263 } ACPI_DRTM_DPS_ID; 264 265 266 /******************************************************************************* 267 * 268 * FPDT - Firmware Performance Data Table (ACPI 5.0) 269 * Version 1 270 * 271 ******************************************************************************/ 272 273 typedef struct acpi_table_fpdt 274 { 275 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 276 277 } ACPI_TABLE_FPDT; 278 279 280 /* FPDT subtable header (Performance Record Structure) */ 281 282 typedef struct acpi_fpdt_header 283 { 284 UINT16 Type; 285 UINT8 Length; 286 UINT8 Revision; 287 288 } ACPI_FPDT_HEADER; 289 290 /* Values for Type field above */ 291 292 enum AcpiFpdtType 293 { 294 ACPI_FPDT_TYPE_BOOT = 0, 295 ACPI_FPDT_TYPE_S3PERF = 1 296 }; 297 298 299 /* 300 * FPDT subtables 301 */ 302 303 /* 0: Firmware Basic Boot Performance Record */ 304 305 typedef struct acpi_fpdt_boot_pointer 306 { 307 ACPI_FPDT_HEADER Header; 308 UINT8 Reserved[4]; 309 UINT64 Address; 310 311 } ACPI_FPDT_BOOT_POINTER; 312 313 314 /* 1: S3 Performance Table Pointer Record */ 315 316 typedef struct acpi_fpdt_s3pt_pointer 317 { 318 ACPI_FPDT_HEADER Header; 319 UINT8 Reserved[4]; 320 UINT64 Address; 321 322 } ACPI_FPDT_S3PT_POINTER; 323 324 325 /* 326 * S3PT - S3 Performance Table. This table is pointed to by the 327 * S3 Pointer Record above. 328 */ 329 typedef struct acpi_table_s3pt 330 { 331 UINT8 Signature[4]; /* "S3PT" */ 332 UINT32 Length; 333 334 } ACPI_TABLE_S3PT; 335 336 337 /* 338 * S3PT Subtables (Not part of the actual FPDT) 339 */ 340 341 /* Values for Type field in S3PT header */ 342 343 enum AcpiS3ptType 344 { 345 ACPI_S3PT_TYPE_RESUME = 0, 346 ACPI_S3PT_TYPE_SUSPEND = 1, 347 ACPI_FPDT_BOOT_PERFORMANCE = 2 348 }; 349 350 typedef struct acpi_s3pt_resume 351 { 352 ACPI_FPDT_HEADER Header; 353 UINT32 ResumeCount; 354 UINT64 FullResume; 355 UINT64 AverageResume; 356 357 } ACPI_S3PT_RESUME; 358 359 typedef struct acpi_s3pt_suspend 360 { 361 ACPI_FPDT_HEADER Header; 362 UINT64 SuspendStart; 363 UINT64 SuspendEnd; 364 365 } ACPI_S3PT_SUSPEND; 366 367 368 /* 369 * FPDT Boot Performance Record (Not part of the actual FPDT) 370 */ 371 typedef struct acpi_fpdt_boot 372 { 373 ACPI_FPDT_HEADER Header; 374 UINT8 Reserved[4]; 375 UINT64 ResetEnd; 376 UINT64 LoadStart; 377 UINT64 StartupStart; 378 UINT64 ExitServicesEntry; 379 UINT64 ExitServicesExit; 380 381 } ACPI_FPDT_BOOT; 382 383 384 /******************************************************************************* 385 * 386 * GTDT - Generic Timer Description Table (ACPI 5.1) 387 * Version 2 388 * 389 ******************************************************************************/ 390 391 typedef struct acpi_table_gtdt 392 { 393 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 394 UINT64 CounterBlockAddresss; 395 UINT32 Reserved; 396 UINT32 SecureEl1Interrupt; 397 UINT32 SecureEl1Flags; 398 UINT32 NonSecureEl1Interrupt; 399 UINT32 NonSecureEl1Flags; 400 UINT32 VirtualTimerInterrupt; 401 UINT32 VirtualTimerFlags; 402 UINT32 NonSecureEl2Interrupt; 403 UINT32 NonSecureEl2Flags; 404 UINT64 CounterReadBlockAddress; 405 UINT32 PlatformTimerCount; 406 UINT32 PlatformTimerOffset; 407 408 } ACPI_TABLE_GTDT; 409 410 /* Flag Definitions: Timer Block Physical Timers and Virtual timers */ 411 412 #define ACPI_GTDT_INTERRUPT_MODE (1) 413 #define ACPI_GTDT_INTERRUPT_POLARITY (1<<1) 414 #define ACPI_GTDT_ALWAYS_ON (1<<2) 415 416 417 /* Common GTDT subtable header */ 418 419 typedef struct acpi_gtdt_header 420 { 421 UINT8 Type; 422 UINT16 Length; 423 424 } ACPI_GTDT_HEADER; 425 426 /* Values for GTDT subtable type above */ 427 428 enum AcpiGtdtType 429 { 430 ACPI_GTDT_TYPE_TIMER_BLOCK = 0, 431 ACPI_GTDT_TYPE_WATCHDOG = 1, 432 ACPI_GTDT_TYPE_RESERVED = 2 /* 2 and greater are reserved */ 433 }; 434 435 436 /* GTDT Subtables, correspond to Type in acpi_gtdt_header */ 437 438 /* 0: Generic Timer Block */ 439 440 typedef struct acpi_gtdt_timer_block 441 { 442 ACPI_GTDT_HEADER Header; 443 UINT8 Reserved; 444 UINT64 BlockAddress; 445 UINT32 TimerCount; 446 UINT32 TimerOffset; 447 448 } ACPI_GTDT_TIMER_BLOCK; 449 450 /* Timer Sub-Structure, one per timer */ 451 452 typedef struct acpi_gtdt_timer_entry 453 { 454 UINT8 FrameNumber; 455 UINT8 Reserved[3]; 456 UINT64 BaseAddress; 457 UINT64 El0BaseAddress; 458 UINT32 TimerInterrupt; 459 UINT32 TimerFlags; 460 UINT32 VirtualTimerInterrupt; 461 UINT32 VirtualTimerFlags; 462 UINT32 CommonFlags; 463 464 } ACPI_GTDT_TIMER_ENTRY; 465 466 /* Flag Definitions: TimerFlags and VirtualTimerFlags above */ 467 468 #define ACPI_GTDT_GT_IRQ_MODE (1) 469 #define ACPI_GTDT_GT_IRQ_POLARITY (1<<1) 470 471 /* Flag Definitions: CommonFlags above */ 472 473 #define ACPI_GTDT_GT_IS_SECURE_TIMER (1) 474 #define ACPI_GTDT_GT_ALWAYS_ON (1<<1) 475 476 477 /* 1: SBSA Generic Watchdog Structure */ 478 479 typedef struct acpi_gtdt_watchdog 480 { 481 ACPI_GTDT_HEADER Header; 482 UINT8 Reserved; 483 UINT64 RefreshFrameAddress; 484 UINT64 ControlFrameAddress; 485 UINT32 TimerInterrupt; 486 UINT32 TimerFlags; 487 488 } ACPI_GTDT_WATCHDOG; 489 490 /* Flag Definitions: TimerFlags above */ 491 492 #define ACPI_GTDT_WATCHDOG_IRQ_MODE (1) 493 #define ACPI_GTDT_WATCHDOG_IRQ_POLARITY (1<<1) 494 #define ACPI_GTDT_WATCHDOG_SECURE (1<<2) 495 496 497 /******************************************************************************* 498 * 499 * MPST - Memory Power State Table (ACPI 5.0) 500 * Version 1 501 * 502 ******************************************************************************/ 503 504 #define ACPI_MPST_CHANNEL_INFO \ 505 UINT8 ChannelId; \ 506 UINT8 Reserved1[3]; \ 507 UINT16 PowerNodeCount; \ 508 UINT16 Reserved2; 509 510 /* Main table */ 511 512 typedef struct acpi_table_mpst 513 { 514 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 515 ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */ 516 517 } ACPI_TABLE_MPST; 518 519 520 /* Memory Platform Communication Channel Info */ 521 522 typedef struct acpi_mpst_channel 523 { 524 ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */ 525 526 } ACPI_MPST_CHANNEL; 527 528 529 /* Memory Power Node Structure */ 530 531 typedef struct acpi_mpst_power_node 532 { 533 UINT8 Flags; 534 UINT8 Reserved1; 535 UINT16 NodeId; 536 UINT32 Length; 537 UINT64 RangeAddress; 538 UINT64 RangeLength; 539 UINT32 NumPowerStates; 540 UINT32 NumPhysicalComponents; 541 542 } ACPI_MPST_POWER_NODE; 543 544 /* Values for Flags field above */ 545 546 #define ACPI_MPST_ENABLED 1 547 #define ACPI_MPST_POWER_MANAGED 2 548 #define ACPI_MPST_HOT_PLUG_CAPABLE 4 549 550 551 /* Memory Power State Structure (follows POWER_NODE above) */ 552 553 typedef struct acpi_mpst_power_state 554 { 555 UINT8 PowerState; 556 UINT8 InfoIndex; 557 558 } ACPI_MPST_POWER_STATE; 559 560 561 /* Physical Component ID Structure (follows POWER_STATE above) */ 562 563 typedef struct acpi_mpst_component 564 { 565 UINT16 ComponentId; 566 567 } ACPI_MPST_COMPONENT; 568 569 570 /* Memory Power State Characteristics Structure (follows all POWER_NODEs) */ 571 572 typedef struct acpi_mpst_data_hdr 573 { 574 UINT16 CharacteristicsCount; 575 UINT16 Reserved; 576 577 } ACPI_MPST_DATA_HDR; 578 579 typedef struct acpi_mpst_power_data 580 { 581 UINT8 StructureId; 582 UINT8 Flags; 583 UINT16 Reserved1; 584 UINT32 AveragePower; 585 UINT32 PowerSaving; 586 UINT64 ExitLatency; 587 UINT64 Reserved2; 588 589 } ACPI_MPST_POWER_DATA; 590 591 /* Values for Flags field above */ 592 593 #define ACPI_MPST_PRESERVE 1 594 #define ACPI_MPST_AUTOENTRY 2 595 #define ACPI_MPST_AUTOEXIT 4 596 597 598 /* Shared Memory Region (not part of an ACPI table) */ 599 600 typedef struct acpi_mpst_shared 601 { 602 UINT32 Signature; 603 UINT16 PccCommand; 604 UINT16 PccStatus; 605 UINT32 CommandRegister; 606 UINT32 StatusRegister; 607 UINT32 PowerStateId; 608 UINT32 PowerNodeId; 609 UINT64 EnergyConsumed; 610 UINT64 AveragePower; 611 612 } ACPI_MPST_SHARED; 613 614 615 /******************************************************************************* 616 * 617 * PCCT - Platform Communications Channel Table (ACPI 5.0) 618 * Version 1 619 * 620 ******************************************************************************/ 621 622 typedef struct acpi_table_pcct 623 { 624 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 625 UINT32 Flags; 626 UINT64 Reserved; 627 628 } ACPI_TABLE_PCCT; 629 630 /* Values for Flags field above */ 631 632 #define ACPI_PCCT_DOORBELL 1 633 634 /* Values for subtable type in ACPI_SUBTABLE_HEADER */ 635 636 enum AcpiPcctType 637 { 638 ACPI_PCCT_TYPE_GENERIC_SUBSPACE = 0, 639 ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE = 1, 640 ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 = 2, /* ACPI 6.1 */ 641 ACPI_PCCT_TYPE_RESERVED = 3 /* 3 and greater are reserved */ 642 }; 643 644 /* 645 * PCCT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER 646 */ 647 648 /* 0: Generic Communications Subspace */ 649 650 typedef struct acpi_pcct_subspace 651 { 652 ACPI_SUBTABLE_HEADER Header; 653 UINT8 Reserved[6]; 654 UINT64 BaseAddress; 655 UINT64 Length; 656 ACPI_GENERIC_ADDRESS DoorbellRegister; 657 UINT64 PreserveMask; 658 UINT64 WriteMask; 659 UINT32 Latency; 660 UINT32 MaxAccessRate; 661 UINT16 MinTurnaroundTime; 662 663 } ACPI_PCCT_SUBSPACE; 664 665 666 /* 1: HW-reduced Communications Subspace (ACPI 5.1) */ 667 668 typedef struct acpi_pcct_hw_reduced 669 { 670 ACPI_SUBTABLE_HEADER Header; 671 UINT32 DoorbellInterrupt; 672 UINT8 Flags; 673 UINT8 Reserved; 674 UINT64 BaseAddress; 675 UINT64 Length; 676 ACPI_GENERIC_ADDRESS DoorbellRegister; 677 UINT64 PreserveMask; 678 UINT64 WriteMask; 679 UINT32 Latency; 680 UINT32 MaxAccessRate; 681 UINT16 MinTurnaroundTime; 682 683 } ACPI_PCCT_HW_REDUCED; 684 685 686 /* 2: HW-reduced Communications Subspace Type 2 (ACPI 6.1) */ 687 688 typedef struct acpi_pcct_hw_reduced_type2 689 { 690 ACPI_SUBTABLE_HEADER Header; 691 UINT32 DoorbellInterrupt; 692 UINT8 Flags; 693 UINT8 Reserved; 694 UINT64 BaseAddress; 695 UINT64 Length; 696 ACPI_GENERIC_ADDRESS DoorbellRegister; 697 UINT64 PreserveMask; 698 UINT64 WriteMask; 699 UINT32 Latency; 700 UINT32 MaxAccessRate; 701 UINT16 MinTurnaroundTime; 702 ACPI_GENERIC_ADDRESS DoorbellAckRegister; 703 UINT64 AckPreserveMask; 704 UINT64 AckWriteMask; 705 706 } ACPI_PCCT_HW_REDUCED_TYPE2; 707 708 709 /* Values for doorbell flags above */ 710 711 #define ACPI_PCCT_INTERRUPT_POLARITY (1) 712 #define ACPI_PCCT_INTERRUPT_MODE (1<<1) 713 714 715 /* 716 * PCC memory structures (not part of the ACPI table) 717 */ 718 719 /* Shared Memory Region */ 720 721 typedef struct acpi_pcct_shared_memory 722 { 723 UINT32 Signature; 724 UINT16 Command; 725 UINT16 Status; 726 727 } ACPI_PCCT_SHARED_MEMORY; 728 729 730 /******************************************************************************* 731 * 732 * PMTT - Platform Memory Topology Table (ACPI 5.0) 733 * Version 1 734 * 735 ******************************************************************************/ 736 737 typedef struct acpi_table_pmtt 738 { 739 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 740 UINT32 Reserved; 741 742 } ACPI_TABLE_PMTT; 743 744 745 /* Common header for PMTT subtables that follow main table */ 746 747 typedef struct acpi_pmtt_header 748 { 749 UINT8 Type; 750 UINT8 Reserved1; 751 UINT16 Length; 752 UINT16 Flags; 753 UINT16 Reserved2; 754 755 } ACPI_PMTT_HEADER; 756 757 /* Values for Type field above */ 758 759 #define ACPI_PMTT_TYPE_SOCKET 0 760 #define ACPI_PMTT_TYPE_CONTROLLER 1 761 #define ACPI_PMTT_TYPE_DIMM 2 762 #define ACPI_PMTT_TYPE_RESERVED 3 /* 0x03-0xFF are reserved */ 763 764 /* Values for Flags field above */ 765 766 #define ACPI_PMTT_TOP_LEVEL 0x0001 767 #define ACPI_PMTT_PHYSICAL 0x0002 768 #define ACPI_PMTT_MEMORY_TYPE 0x000C 769 770 771 /* 772 * PMTT subtables, correspond to Type in acpi_pmtt_header 773 */ 774 775 776 /* 0: Socket Structure */ 777 778 typedef struct acpi_pmtt_socket 779 { 780 ACPI_PMTT_HEADER Header; 781 UINT16 SocketId; 782 UINT16 Reserved; 783 784 } ACPI_PMTT_SOCKET; 785 786 787 /* 1: Memory Controller subtable */ 788 789 typedef struct acpi_pmtt_controller 790 { 791 ACPI_PMTT_HEADER Header; 792 UINT32 ReadLatency; 793 UINT32 WriteLatency; 794 UINT32 ReadBandwidth; 795 UINT32 WriteBandwidth; 796 UINT16 AccessWidth; 797 UINT16 Alignment; 798 UINT16 Reserved; 799 UINT16 DomainCount; 800 801 } ACPI_PMTT_CONTROLLER; 802 803 /* 1a: Proximity Domain substructure */ 804 805 typedef struct acpi_pmtt_domain 806 { 807 UINT32 ProximityDomain; 808 809 } ACPI_PMTT_DOMAIN; 810 811 812 /* 2: Physical Component Identifier (DIMM) */ 813 814 typedef struct acpi_pmtt_physical_component 815 { 816 ACPI_PMTT_HEADER Header; 817 UINT16 ComponentId; 818 UINT16 Reserved; 819 UINT32 MemorySize; 820 UINT32 BiosHandle; 821 822 } ACPI_PMTT_PHYSICAL_COMPONENT; 823 824 825 /******************************************************************************* 826 * 827 * RASF - RAS Feature Table (ACPI 5.0) 828 * Version 1 829 * 830 ******************************************************************************/ 831 832 typedef struct acpi_table_rasf 833 { 834 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 835 UINT8 ChannelId[12]; 836 837 } ACPI_TABLE_RASF; 838 839 /* RASF Platform Communication Channel Shared Memory Region */ 840 841 typedef struct acpi_rasf_shared_memory 842 { 843 UINT32 Signature; 844 UINT16 Command; 845 UINT16 Status; 846 UINT16 Version; 847 UINT8 Capabilities[16]; 848 UINT8 SetCapabilities[16]; 849 UINT16 NumParameterBlocks; 850 UINT32 SetCapabilitiesStatus; 851 852 } ACPI_RASF_SHARED_MEMORY; 853 854 /* RASF Parameter Block Structure Header */ 855 856 typedef struct acpi_rasf_parameter_block 857 { 858 UINT16 Type; 859 UINT16 Version; 860 UINT16 Length; 861 862 } ACPI_RASF_PARAMETER_BLOCK; 863 864 /* RASF Parameter Block Structure for PATROL_SCRUB */ 865 866 typedef struct acpi_rasf_patrol_scrub_parameter 867 { 868 ACPI_RASF_PARAMETER_BLOCK Header; 869 UINT16 PatrolScrubCommand; 870 UINT64 RequestedAddressRange[2]; 871 UINT64 ActualAddressRange[2]; 872 UINT16 Flags; 873 UINT8 RequestedSpeed; 874 875 } ACPI_RASF_PATROL_SCRUB_PARAMETER; 876 877 /* Masks for Flags and Speed fields above */ 878 879 #define ACPI_RASF_SCRUBBER_RUNNING 1 880 #define ACPI_RASF_SPEED (7<<1) 881 #define ACPI_RASF_SPEED_SLOW (0<<1) 882 #define ACPI_RASF_SPEED_MEDIUM (4<<1) 883 #define ACPI_RASF_SPEED_FAST (7<<1) 884 885 /* Channel Commands */ 886 887 enum AcpiRasfCommands 888 { 889 ACPI_RASF_EXECUTE_RASF_COMMAND = 1 890 }; 891 892 /* Platform RAS Capabilities */ 893 894 enum AcpiRasfCapabiliities 895 { 896 ACPI_HW_PATROL_SCRUB_SUPPORTED = 0, 897 ACPI_SW_PATROL_SCRUB_EXPOSED = 1 898 }; 899 900 /* Patrol Scrub Commands */ 901 902 enum AcpiRasfPatrolScrubCommands 903 { 904 ACPI_RASF_GET_PATROL_PARAMETERS = 1, 905 ACPI_RASF_START_PATROL_SCRUBBER = 2, 906 ACPI_RASF_STOP_PATROL_SCRUBBER = 3 907 }; 908 909 /* Channel Command flags */ 910 911 #define ACPI_RASF_GENERATE_SCI (1<<15) 912 913 /* Status values */ 914 915 enum AcpiRasfStatus 916 { 917 ACPI_RASF_SUCCESS = 0, 918 ACPI_RASF_NOT_VALID = 1, 919 ACPI_RASF_NOT_SUPPORTED = 2, 920 ACPI_RASF_BUSY = 3, 921 ACPI_RASF_FAILED = 4, 922 ACPI_RASF_ABORTED = 5, 923 ACPI_RASF_INVALID_DATA = 6 924 }; 925 926 /* Status flags */ 927 928 #define ACPI_RASF_COMMAND_COMPLETE (1) 929 #define ACPI_RASF_SCI_DOORBELL (1<<1) 930 #define ACPI_RASF_ERROR (1<<2) 931 #define ACPI_RASF_STATUS (0x1F<<3) 932 933 934 /******************************************************************************* 935 * 936 * STAO - Status Override Table (_STA override) - ACPI 6.0 937 * Version 1 938 * 939 * Conforms to "ACPI Specification for Status Override Table" 940 * 6 January 2015 941 * 942 ******************************************************************************/ 943 944 typedef struct acpi_table_stao 945 { 946 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 947 UINT8 IgnoreUart; 948 949 } ACPI_TABLE_STAO; 950 951 952 /******************************************************************************* 953 * 954 * WPBT - Windows Platform Environment Table (ACPI 6.0) 955 * Version 1 956 * 957 * Conforms to "Windows Platform Binary Table (WPBT)" 29 November 2011 958 * 959 ******************************************************************************/ 960 961 typedef struct acpi_table_wpbt 962 { 963 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 964 UINT32 HandoffSize; 965 UINT64 HandoffAddress; 966 UINT8 Layout; 967 UINT8 Type; 968 UINT16 ArgumentsLength; 969 970 } ACPI_TABLE_WPBT; 971 972 973 /******************************************************************************* 974 * 975 * XENV - Xen Environment Table (ACPI 6.0) 976 * Version 1 977 * 978 * Conforms to "ACPI Specification for Xen Environment Table" 4 January 2015 979 * 980 ******************************************************************************/ 981 982 typedef struct acpi_table_xenv 983 { 984 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 985 UINT64 GrantTableAddress; 986 UINT64 GrantTableSize; 987 UINT32 EventInterrupt; 988 UINT8 EventFlags; 989 990 } ACPI_TABLE_XENV; 991 992 993 /* Reset to default packing */ 994 995 #pragma pack() 996 997 #endif /* __ACTBL3_H__ */ 998