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