actbl3.h revision 284460
1114472Sru/****************************************************************************** 2146515Sru * 321495Sjmacd * Name: actbl3.h - ACPI Table Definitions 4146515Sru * 521495Sjmacd *****************************************************************************/ 621495Sjmacd 721495Sjmacd/* 821495Sjmacd * Copyright (C) 2000 - 2015, Intel Corp. 921495Sjmacd * All rights reserved. 1021495Sjmacd * 1121495Sjmacd * Redistribution and use in source and binary forms, with or without 1221495Sjmacd * modification, are permitted provided that the following conditions 1321495Sjmacd * are met: 1421495Sjmacd * 1. Redistributions of source code must retain the above copyright 1521495Sjmacd * notice, this list of conditions, and the following disclaimer, 1621495Sjmacd * without modification. 1721495Sjmacd * 2. Redistributions in binary form must reproduce at minimum a disclaimer 1821495Sjmacd * substantially similar to the "NO WARRANTY" disclaimer below 1921495Sjmacd * ("Disclaimer") and any redistribution must be conditioned upon 2021495Sjmacd * including a substantially similar Disclaimer requirement for further 2121495Sjmacd * binary redistribution. 2221495Sjmacd * 3. Neither the names of the above-listed copyright holders nor the names 2321495Sjmacd * of any contributors may be used to endorse or promote products derived 2421495Sjmacd * from this software without specific prior written permission. 2521495Sjmacd * 2642660Smarkm * Alternatively, this software may be distributed under the terms of the 2742660Smarkm * GNU General Public License ("GPL") version 2 as published by the Free 2842660Smarkm * Software Foundation. 2921495Sjmacd * 3021495Sjmacd * NO WARRANTY 3121495Sjmacd * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 3221495Sjmacd * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 3321495Sjmacd * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR 3421495Sjmacd * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 3521495Sjmacd * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 3621495Sjmacd * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 3742660Smarkm * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 3821495Sjmacd * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 3921495Sjmacd * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 4021495Sjmacd * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 4142660Smarkm * POSSIBILITY OF SUCH DAMAGES. 4221495Sjmacd */ 4321495Sjmacd 4421495Sjmacd#ifndef __ACTBL3_H__ 4542660Smarkm#define __ACTBL3_H__ 4621495Sjmacd 4721495Sjmacd 4821495Sjmacd/******************************************************************************* 4942660Smarkm * 5021495Sjmacd * Additional ACPI Tables (3) 5121495Sjmacd * 5221495Sjmacd * These tables are not consumed directly by the ACPICA subsystem, but are 5342660Smarkm * included here to support device drivers and the AML disassembler. 5421495Sjmacd * 5521495Sjmacd * The tables in this file are fully defined within the ACPI specification. 5642660Smarkm * 5721495Sjmacd ******************************************************************************/ 5821495Sjmacd 5921495Sjmacd 6042660Smarkm/* 6121495Sjmacd * Values for description table header signatures for tables defined in this 6221495Sjmacd * file. Useful because they make it more difficult to inadvertently type in 6321495Sjmacd * the wrong signature. 6442660Smarkm */ 6521495Sjmacd#define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */ 6621495Sjmacd#define ACPI_SIG_DRTM "DRTM" /* Dynamic Root of Trust for Measurement table */ 6721495Sjmacd#define ACPI_SIG_FPDT "FPDT" /* Firmware Performance Data Table */ 6842660Smarkm#define ACPI_SIG_GTDT "GTDT" /* Generic Timer Description Table */ 6921495Sjmacd#define ACPI_SIG_MPST "MPST" /* Memory Power State Table */ 7021495Sjmacd#define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */ 7121495Sjmacd#define ACPI_SIG_PMTT "PMTT" /* Platform Memory Topology Table */ 7221495Sjmacd#define ACPI_SIG_RASF "RASF" /* RAS Feature table */ 7321495Sjmacd#define ACPI_SIG_STAO "STAO" /* Status Override table */ 7442660Smarkm#define ACPI_SIG_TPM2 "TPM2" /* Trusted Platform Module 2.0 H/W interface table */ 7521495Sjmacd#define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */ 7621495Sjmacd#define ACPI_SIG_XENV "XENV" /* Xen Environment table */ 7721495Sjmacd 7821495Sjmacd#define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */ 7921495Sjmacd#define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */ 80146515Sru 8121495Sjmacd/* Reserved table signatures */ 8221495Sjmacd 8321495Sjmacd#define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */ 8421495Sjmacd#define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */ 8542660Smarkm 8642660Smarkm/* 8721495Sjmacd * All tables must be byte-packed to match the ACPI specification, since 8821495Sjmacd * the tables are provided by the system BIOS. 8921495Sjmacd */ 9042660Smarkm#pragma pack(1) 9121495Sjmacd 9242660Smarkm/* 9342660Smarkm * Note: C bitfields are not used for this reason: 9421495Sjmacd * 95146515Sru * "Bitfields are great and easy to read, but unfortunately the C language 9621495Sjmacd * does not specify the layout of bitfields in memory, which means they are 9721495Sjmacd * essentially useless for dealing with packed data in on-disk formats or 9821495Sjmacd * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me, 9942660Smarkm * this decision was a design error in C. Ritchie could have picked an order 10021495Sjmacd * and stuck with it." Norman Ramsey. 10121495Sjmacd * See http://stackoverflow.com/a/1053662/41661 10221495Sjmacd */ 10321495Sjmacd 10421495Sjmacd 105146515Sru/******************************************************************************* 10621495Sjmacd * 10721495Sjmacd * BGRT - Boot Graphics Resource Table (ACPI 5.0) 10821495Sjmacd * Version 1 10921495Sjmacd * 11021495Sjmacd ******************************************************************************/ 11121495Sjmacd 11221495Sjmacdtypedef struct acpi_table_bgrt 11321495Sjmacd{ 11421495Sjmacd ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 11521495Sjmacd UINT16 Version; 11642660Smarkm UINT8 Status; 11721495Sjmacd UINT8 ImageType; 11842660Smarkm UINT64 ImageAddress; 11942660Smarkm UINT32 ImageOffsetX; 12042660Smarkm UINT32 ImageOffsetY; 12142660Smarkm 12221495Sjmacd} ACPI_TABLE_BGRT; 12342660Smarkm 12442660Smarkm 12542660Smarkm/******************************************************************************* 12621495Sjmacd * 12742660Smarkm * DRTM - Dynamic Root of Trust for Measurement table 12842660Smarkm * Conforms to "TCG D-RTM Architecture" June 17 2013, Version 1.0.0 12942660Smarkm * Table version 1 13021495Sjmacd * 13142660Smarkm ******************************************************************************/ 13242660Smarkm 13342660Smarkmtypedef struct acpi_table_drtm 13421495Sjmacd{ 13542660Smarkm ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 13642660Smarkm UINT64 EntryBaseAddress; 13742660Smarkm UINT64 EntryLength; 13842660Smarkm UINT32 EntryAddress32; 13942660Smarkm UINT64 EntryAddress64; 14042660Smarkm UINT64 ExitAddress; 14121495Sjmacd UINT64 LogAreaAddress; 14242660Smarkm UINT32 LogAreaLength; 14321495Sjmacd UINT64 ArchDependentAddress; 14421495Sjmacd UINT32 Flags; 14521495Sjmacd 14642660Smarkm} ACPI_TABLE_DRTM; 14742660Smarkm 14842660Smarkm/* Flag Definitions for above */ 14942660Smarkm 15021495Sjmacd#define ACPI_DRTM_ACCESS_ALLOWED (1) 15142660Smarkm#define ACPI_DRTM_ENABLE_GAP_CODE (1<<1) 15242660Smarkm#define ACPI_DRTM_INCOMPLETE_MEASUREMENTS (1<<2) 15342660Smarkm#define ACPI_DRTM_AUTHORITY_ORDER (1<<3) 15421495Sjmacd 15542660Smarkm 15642660Smarkm/* 1) Validated Tables List (64-bit addresses) */ 15742660Smarkm 15842660Smarkmtypedef struct acpi_drtm_vtable_list 15921495Sjmacd{ 16042660Smarkm UINT32 ValidatedTableCount; 16142660Smarkm UINT64 ValidatedTables[1]; 16242660Smarkm 16321495Sjmacd} ACPI_DRTM_VTABLE_LIST; 16442660Smarkm 16542660Smarkm/* 2) Resources List (of Resource Descriptors) */ 16621495Sjmacd 16742660Smarkm/* Resource Descriptor */ 16842660Smarkm 16921495Sjmacdtypedef struct acpi_drtm_resource 17042660Smarkm{ 17121495Sjmacd UINT8 Size[7]; 17242660Smarkm UINT8 Type; 17342660Smarkm UINT64 Address; 17421495Sjmacd 17542660Smarkm} ACPI_DRTM_RESOURCE; 17642660Smarkm 17742660Smarkmtypedef struct acpi_drtm_resource_list 17842660Smarkm{ 17942660Smarkm UINT32 ResourceCount; 18042660Smarkm ACPI_DRTM_RESOURCE Resources[1]; 18121495Sjmacd 18242660Smarkm} ACPI_DRTM_RESOURCE_LIST; 18342660Smarkm 18442660Smarkm/* 3) Platform-specific Identifiers List */ 18542660Smarkm 18642660Smarkmtypedef struct acpi_drtm_dps_id 18742660Smarkm{ 18821495Sjmacd UINT32 DpsIdLength; 18942660Smarkm UINT8 DpsId[16]; 19042660Smarkm 19142660Smarkm} ACPI_DRTM_DPS_ID; 19242660Smarkm 19321495Sjmacd 19442660Smarkm/******************************************************************************* 19542660Smarkm * 19621495Sjmacd * FPDT - Firmware Performance Data Table (ACPI 5.0) 19721495Sjmacd * Version 1 19821495Sjmacd * 19921495Sjmacd ******************************************************************************/ 20021495Sjmacd 20121495Sjmacdtypedef struct acpi_table_fpdt 20221495Sjmacd{ 20321495Sjmacd ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 204146515Sru 20521495Sjmacd} ACPI_TABLE_FPDT; 20621495Sjmacd 20721495Sjmacd 20821495Sjmacd/* FPDT subtable header */ 20921495Sjmacd 21021495Sjmacdtypedef struct acpi_fpdt_header 21121495Sjmacd{ 21221495Sjmacd UINT16 Type; 21321495Sjmacd UINT8 Length; 21421495Sjmacd UINT8 Revision; 21521495Sjmacd 21621495Sjmacd} ACPI_FPDT_HEADER; 21721495Sjmacd 21821495Sjmacd/* Values for Type field above */ 21921495Sjmacd 22021495Sjmacdenum AcpiFpdtType 22121495Sjmacd{ 22221495Sjmacd ACPI_FPDT_TYPE_BOOT = 0, 22321495Sjmacd ACPI_FPDT_TYPE_S3PERF = 1 22421495Sjmacd}; 22521495Sjmacd 22621495Sjmacd 22721495Sjmacd/* 22821495Sjmacd * FPDT subtables 22921495Sjmacd */ 23021495Sjmacd 23121495Sjmacd/* 0: Firmware Basic Boot Performance Record */ 23221495Sjmacd 23321495Sjmacdtypedef struct acpi_fpdt_boot 23421495Sjmacd{ 23521495Sjmacd ACPI_FPDT_HEADER Header; 23621495Sjmacd UINT8 Reserved[4]; 23721495Sjmacd UINT64 ResetEnd; 23821495Sjmacd UINT64 LoadStart; 23921495Sjmacd UINT64 StartupStart; 24021495Sjmacd UINT64 ExitServicesEntry; 24121495Sjmacd UINT64 ExitServicesExit; 24221495Sjmacd 24321495Sjmacd} ACPI_FPDT_BOOT; 24421495Sjmacd 24521495Sjmacd 24621495Sjmacd/* 1: S3 Performance Table Pointer Record */ 24721495Sjmacd 24821495Sjmacdtypedef struct acpi_fpdt_s3pt_ptr 24921495Sjmacd{ 250146515Sru ACPI_FPDT_HEADER Header; 25121495Sjmacd UINT8 Reserved[4]; 25221495Sjmacd UINT64 Address; 25321495Sjmacd 25421495Sjmacd} ACPI_FPDT_S3PT_PTR; 25521495Sjmacd 25621495Sjmacd 25721495Sjmacd/* 25821495Sjmacd * S3PT - S3 Performance Table. This table is pointed to by the 25921495Sjmacd * FPDT S3 Pointer Record above. 26042660Smarkm */ 26142660Smarkmtypedef struct acpi_table_s3pt 26221495Sjmacd{ 26321495Sjmacd UINT8 Signature[4]; /* "S3PT" */ 26421495Sjmacd UINT32 Length; 26521495Sjmacd 26642660Smarkm} ACPI_TABLE_S3PT; 26721495Sjmacd 26821495Sjmacd 26921495Sjmacd/* 27021495Sjmacd * S3PT Subtables 27193139Sru */ 27293139Srutypedef struct acpi_s3pt_header 27393139Sru{ 27493139Sru UINT16 Type; 275146515Sru UINT8 Length; 27693139Sru UINT8 Revision; 27793139Sru 27893139Sru} ACPI_S3PT_HEADER; 27993139Sru 28093139Sru/* Values for Type field above */ 28193139Sru 28293139Sruenum AcpiS3ptType 28393139Sru{ 28493139Sru ACPI_S3PT_TYPE_RESUME = 0, 28593139Sru ACPI_S3PT_TYPE_SUSPEND = 1 28693139Sru}; 28793139Sru 28893139Srutypedef struct acpi_s3pt_resume 28993139Sru{ 29093139Sru ACPI_S3PT_HEADER Header; 29193139Sru UINT32 ResumeCount; 29293139Sru UINT64 FullResume; 29393139Sru UINT64 AverageResume; 29493139Sru 29593139Sru} ACPI_S3PT_RESUME; 29693139Sru 29793139Srutypedef struct acpi_s3pt_suspend 29893139Sru{ 29993139Sru ACPI_S3PT_HEADER Header; 30093139Sru UINT64 SuspendStart; 30193139Sru UINT64 SuspendEnd; 30293139Sru 30393139Sru} ACPI_S3PT_SUSPEND; 30493139Sru 30593139Sru 306/******************************************************************************* 307 * 308 * GTDT - Generic Timer Description Table (ACPI 5.1) 309 * Version 2 310 * 311 ******************************************************************************/ 312 313typedef struct acpi_table_gtdt 314{ 315 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 316 UINT64 CounterBlockAddresss; 317 UINT32 Reserved; 318 UINT32 SecureEl1Interrupt; 319 UINT32 SecureEl1Flags; 320 UINT32 NonSecureEl1Interrupt; 321 UINT32 NonSecureEl1Flags; 322 UINT32 VirtualTimerInterrupt; 323 UINT32 VirtualTimerFlags; 324 UINT32 NonSecureEl2Interrupt; 325 UINT32 NonSecureEl2Flags; 326 UINT64 CounterReadBlockAddress; 327 UINT32 PlatformTimerCount; 328 UINT32 PlatformTimerOffset; 329 330} ACPI_TABLE_GTDT; 331 332/* Flag Definitions: Timer Block Physical Timers and Virtual timers */ 333 334#define ACPI_GTDT_INTERRUPT_MODE (1) 335#define ACPI_GTDT_INTERRUPT_POLARITY (1<<1) 336#define ACPI_GTDT_ALWAYS_ON (1<<2) 337 338 339/* Common GTDT subtable header */ 340 341typedef struct acpi_gtdt_header 342{ 343 UINT8 Type; 344 UINT16 Length; 345 346} ACPI_GTDT_HEADER; 347 348/* Values for GTDT subtable type above */ 349 350enum AcpiGtdtType 351{ 352 ACPI_GTDT_TYPE_TIMER_BLOCK = 0, 353 ACPI_GTDT_TYPE_WATCHDOG = 1, 354 ACPI_GTDT_TYPE_RESERVED = 2 /* 2 and greater are reserved */ 355}; 356 357 358/* GTDT Subtables, correspond to Type in acpi_gtdt_header */ 359 360/* 0: Generic Timer Block */ 361 362typedef struct acpi_gtdt_timer_block 363{ 364 ACPI_GTDT_HEADER Header; 365 UINT8 Reserved; 366 UINT64 BlockAddress; 367 UINT32 TimerCount; 368 UINT32 TimerOffset; 369 370} ACPI_GTDT_TIMER_BLOCK; 371 372/* Timer Sub-Structure, one per timer */ 373 374typedef struct acpi_gtdt_timer_entry 375{ 376 UINT8 FrameNumber; 377 UINT8 Reserved[3]; 378 UINT64 BaseAddress; 379 UINT64 El0BaseAddress; 380 UINT32 TimerInterrupt; 381 UINT32 TimerFlags; 382 UINT32 VirtualTimerInterrupt; 383 UINT32 VirtualTimerFlags; 384 UINT32 CommonFlags; 385 386} ACPI_GTDT_TIMER_ENTRY; 387 388/* Flag Definitions: TimerFlags and VirtualTimerFlags above */ 389 390#define ACPI_GTDT_GT_IRQ_MODE (1) 391#define ACPI_GTDT_GT_IRQ_POLARITY (1<<1) 392 393/* Flag Definitions: CommonFlags above */ 394 395#define ACPI_GTDT_GT_IS_SECURE_TIMER (1) 396#define ACPI_GTDT_GT_ALWAYS_ON (1<<1) 397 398 399/* 1: SBSA Generic Watchdog Structure */ 400 401typedef struct acpi_gtdt_watchdog 402{ 403 ACPI_GTDT_HEADER Header; 404 UINT8 Reserved; 405 UINT64 RefreshFrameAddress; 406 UINT64 ControlFrameAddress; 407 UINT32 TimerInterrupt; 408 UINT32 TimerFlags; 409 410} ACPI_GTDT_WATCHDOG; 411 412/* Flag Definitions: TimerFlags above */ 413 414#define ACPI_GTDT_WATCHDOG_IRQ_MODE (1) 415#define ACPI_GTDT_WATCHDOG_IRQ_POLARITY (1<<1) 416#define ACPI_GTDT_WATCHDOG_SECURE (1<<2) 417 418 419/******************************************************************************* 420 * 421 * MPST - Memory Power State Table (ACPI 5.0) 422 * Version 1 423 * 424 ******************************************************************************/ 425 426#define ACPI_MPST_CHANNEL_INFO \ 427 UINT8 ChannelId; \ 428 UINT8 Reserved1[3]; \ 429 UINT16 PowerNodeCount; \ 430 UINT16 Reserved2; 431 432/* Main table */ 433 434typedef struct acpi_table_mpst 435{ 436 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 437 ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */ 438 439} ACPI_TABLE_MPST; 440 441 442/* Memory Platform Communication Channel Info */ 443 444typedef struct acpi_mpst_channel 445{ 446 ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */ 447 448} ACPI_MPST_CHANNEL; 449 450 451/* Memory Power Node Structure */ 452 453typedef struct acpi_mpst_power_node 454{ 455 UINT8 Flags; 456 UINT8 Reserved1; 457 UINT16 NodeId; 458 UINT32 Length; 459 UINT64 RangeAddress; 460 UINT64 RangeLength; 461 UINT32 NumPowerStates; 462 UINT32 NumPhysicalComponents; 463 464} ACPI_MPST_POWER_NODE; 465 466/* Values for Flags field above */ 467 468#define ACPI_MPST_ENABLED 1 469#define ACPI_MPST_POWER_MANAGED 2 470#define ACPI_MPST_HOT_PLUG_CAPABLE 4 471 472 473/* Memory Power State Structure (follows POWER_NODE above) */ 474 475typedef struct acpi_mpst_power_state 476{ 477 UINT8 PowerState; 478 UINT8 InfoIndex; 479 480} ACPI_MPST_POWER_STATE; 481 482 483/* Physical Component ID Structure (follows POWER_STATE above) */ 484 485typedef struct acpi_mpst_component 486{ 487 UINT16 ComponentId; 488 489} ACPI_MPST_COMPONENT; 490 491 492/* Memory Power State Characteristics Structure (follows all POWER_NODEs) */ 493 494typedef struct acpi_mpst_data_hdr 495{ 496 UINT16 CharacteristicsCount; 497 UINT16 Reserved; 498 499} ACPI_MPST_DATA_HDR; 500 501typedef struct acpi_mpst_power_data 502{ 503 UINT8 StructureId; 504 UINT8 Flags; 505 UINT16 Reserved1; 506 UINT32 AveragePower; 507 UINT32 PowerSaving; 508 UINT64 ExitLatency; 509 UINT64 Reserved2; 510 511} ACPI_MPST_POWER_DATA; 512 513/* Values for Flags field above */ 514 515#define ACPI_MPST_PRESERVE 1 516#define ACPI_MPST_AUTOENTRY 2 517#define ACPI_MPST_AUTOEXIT 4 518 519 520/* Shared Memory Region (not part of an ACPI table) */ 521 522typedef struct acpi_mpst_shared 523{ 524 UINT32 Signature; 525 UINT16 PccCommand; 526 UINT16 PccStatus; 527 UINT32 CommandRegister; 528 UINT32 StatusRegister; 529 UINT32 PowerStateId; 530 UINT32 PowerNodeId; 531 UINT64 EnergyConsumed; 532 UINT64 AveragePower; 533 534} ACPI_MPST_SHARED; 535 536 537/******************************************************************************* 538 * 539 * PCCT - Platform Communications Channel Table (ACPI 5.0) 540 * Version 1 541 * 542 ******************************************************************************/ 543 544typedef struct acpi_table_pcct 545{ 546 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 547 UINT32 Flags; 548 UINT64 Reserved; 549 550} ACPI_TABLE_PCCT; 551 552/* Values for Flags field above */ 553 554#define ACPI_PCCT_DOORBELL 1 555 556/* Values for subtable type in ACPI_SUBTABLE_HEADER */ 557 558enum AcpiPcctType 559{ 560 ACPI_PCCT_TYPE_GENERIC_SUBSPACE = 0, 561 ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE = 1, 562 ACPI_PCCT_TYPE_RESERVED = 2 /* 2 and greater are reserved */ 563}; 564 565/* 566 * PCCT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER 567 */ 568 569/* 0: Generic Communications Subspace */ 570 571typedef struct acpi_pcct_subspace 572{ 573 ACPI_SUBTABLE_HEADER Header; 574 UINT8 Reserved[6]; 575 UINT64 BaseAddress; 576 UINT64 Length; 577 ACPI_GENERIC_ADDRESS DoorbellRegister; 578 UINT64 PreserveMask; 579 UINT64 WriteMask; 580 UINT32 Latency; 581 UINT32 MaxAccessRate; 582 UINT16 MinTurnaroundTime; 583 584} ACPI_PCCT_SUBSPACE; 585 586 587/* 1: HW-reduced Communications Subspace (ACPI 5.1) */ 588 589typedef struct acpi_pcct_hw_reduced 590{ 591 ACPI_SUBTABLE_HEADER Header; 592 UINT32 DoorbellInterrupt; 593 UINT8 Flags; 594 UINT8 Reserved; 595 UINT64 BaseAddress; 596 UINT64 Length; 597 ACPI_GENERIC_ADDRESS DoorbellRegister; 598 UINT64 PreserveMask; 599 UINT64 WriteMask; 600 UINT32 Latency; 601 UINT32 MaxAccessRate; 602 UINT16 MinTurnaroundTime; 603 604} ACPI_PCCT_HW_REDUCED; 605 606/* Values for doorbell flags above */ 607 608#define ACPI_PCCT_INTERRUPT_POLARITY (1) 609#define ACPI_PCCT_INTERRUPT_MODE (1<<1) 610 611 612/* 613 * PCC memory structures (not part of the ACPI table) 614 */ 615 616/* Shared Memory Region */ 617 618typedef struct acpi_pcct_shared_memory 619{ 620 UINT32 Signature; 621 UINT16 Command; 622 UINT16 Status; 623 624} ACPI_PCCT_SHARED_MEMORY; 625 626 627/******************************************************************************* 628 * 629 * PMTT - Platform Memory Topology Table (ACPI 5.0) 630 * Version 1 631 * 632 ******************************************************************************/ 633 634typedef struct acpi_table_pmtt 635{ 636 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 637 UINT32 Reserved; 638 639} ACPI_TABLE_PMTT; 640 641 642/* Common header for PMTT subtables that follow main table */ 643 644typedef struct acpi_pmtt_header 645{ 646 UINT8 Type; 647 UINT8 Reserved1; 648 UINT16 Length; 649 UINT16 Flags; 650 UINT16 Reserved2; 651 652} ACPI_PMTT_HEADER; 653 654/* Values for Type field above */ 655 656#define ACPI_PMTT_TYPE_SOCKET 0 657#define ACPI_PMTT_TYPE_CONTROLLER 1 658#define ACPI_PMTT_TYPE_DIMM 2 659#define ACPI_PMTT_TYPE_RESERVED 3 /* 0x03-0xFF are reserved */ 660 661/* Values for Flags field above */ 662 663#define ACPI_PMTT_TOP_LEVEL 0x0001 664#define ACPI_PMTT_PHYSICAL 0x0002 665#define ACPI_PMTT_MEMORY_TYPE 0x000C 666 667 668/* 669 * PMTT subtables, correspond to Type in acpi_pmtt_header 670 */ 671 672 673/* 0: Socket Structure */ 674 675typedef struct acpi_pmtt_socket 676{ 677 ACPI_PMTT_HEADER Header; 678 UINT16 SocketId; 679 UINT16 Reserved; 680 681} ACPI_PMTT_SOCKET; 682 683 684/* 1: Memory Controller subtable */ 685 686typedef struct acpi_pmtt_controller 687{ 688 ACPI_PMTT_HEADER Header; 689 UINT32 ReadLatency; 690 UINT32 WriteLatency; 691 UINT32 ReadBandwidth; 692 UINT32 WriteBandwidth; 693 UINT16 AccessWidth; 694 UINT16 Alignment; 695 UINT16 Reserved; 696 UINT16 DomainCount; 697 698} ACPI_PMTT_CONTROLLER; 699 700/* 1a: Proximity Domain substructure */ 701 702typedef struct acpi_pmtt_domain 703{ 704 UINT32 ProximityDomain; 705 706} ACPI_PMTT_DOMAIN; 707 708 709/* 2: Physical Component Identifier (DIMM) */ 710 711typedef struct acpi_pmtt_physical_component 712{ 713 ACPI_PMTT_HEADER Header; 714 UINT16 ComponentId; 715 UINT16 Reserved; 716 UINT32 MemorySize; 717 UINT32 BiosHandle; 718 719} ACPI_PMTT_PHYSICAL_COMPONENT; 720 721 722/******************************************************************************* 723 * 724 * RASF - RAS Feature Table (ACPI 5.0) 725 * Version 1 726 * 727 ******************************************************************************/ 728 729typedef struct acpi_table_rasf 730{ 731 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 732 UINT8 ChannelId[12]; 733 734} ACPI_TABLE_RASF; 735 736/* RASF Platform Communication Channel Shared Memory Region */ 737 738typedef struct acpi_rasf_shared_memory 739{ 740 UINT32 Signature; 741 UINT16 Command; 742 UINT16 Status; 743 UINT16 Version; 744 UINT8 Capabilities[16]; 745 UINT8 SetCapabilities[16]; 746 UINT16 NumParameterBlocks; 747 UINT32 SetCapabilitiesStatus; 748 749} ACPI_RASF_SHARED_MEMORY; 750 751/* RASF Parameter Block Structure Header */ 752 753typedef struct acpi_rasf_parameter_block 754{ 755 UINT16 Type; 756 UINT16 Version; 757 UINT16 Length; 758 759} ACPI_RASF_PARAMETER_BLOCK; 760 761/* RASF Parameter Block Structure for PATROL_SCRUB */ 762 763typedef struct acpi_rasf_patrol_scrub_parameter 764{ 765 ACPI_RASF_PARAMETER_BLOCK Header; 766 UINT16 PatrolScrubCommand; 767 UINT64 RequestedAddressRange[2]; 768 UINT64 ActualAddressRange[2]; 769 UINT16 Flags; 770 UINT8 RequestedSpeed; 771 772} ACPI_RASF_PATROL_SCRUB_PARAMETER; 773 774/* Masks for Flags and Speed fields above */ 775 776#define ACPI_RASF_SCRUBBER_RUNNING 1 777#define ACPI_RASF_SPEED (7<<1) 778#define ACPI_RASF_SPEED_SLOW (0<<1) 779#define ACPI_RASF_SPEED_MEDIUM (4<<1) 780#define ACPI_RASF_SPEED_FAST (7<<1) 781 782/* Channel Commands */ 783 784enum AcpiRasfCommands 785{ 786 ACPI_RASF_EXECUTE_RASF_COMMAND = 1 787}; 788 789/* Platform RAS Capabilities */ 790 791enum AcpiRasfCapabiliities 792{ 793 ACPI_HW_PATROL_SCRUB_SUPPORTED = 0, 794 ACPI_SW_PATROL_SCRUB_EXPOSED = 1 795}; 796 797/* Patrol Scrub Commands */ 798 799enum AcpiRasfPatrolScrubCommands 800{ 801 ACPI_RASF_GET_PATROL_PARAMETERS = 1, 802 ACPI_RASF_START_PATROL_SCRUBBER = 2, 803 ACPI_RASF_STOP_PATROL_SCRUBBER = 3 804}; 805 806/* Channel Command flags */ 807 808#define ACPI_RASF_GENERATE_SCI (1<<15) 809 810/* Status values */ 811 812enum AcpiRasfStatus 813{ 814 ACPI_RASF_SUCCESS = 0, 815 ACPI_RASF_NOT_VALID = 1, 816 ACPI_RASF_NOT_SUPPORTED = 2, 817 ACPI_RASF_BUSY = 3, 818 ACPI_RASF_FAILED = 4, 819 ACPI_RASF_ABORTED = 5, 820 ACPI_RASF_INVALID_DATA = 6 821}; 822 823/* Status flags */ 824 825#define ACPI_RASF_COMMAND_COMPLETE (1) 826#define ACPI_RASF_SCI_DOORBELL (1<<1) 827#define ACPI_RASF_ERROR (1<<2) 828#define ACPI_RASF_STATUS (0x1F<<3) 829 830 831/******************************************************************************* 832 * 833 * STAO - Status Override Table (_STA override) - ACPI 6.0 834 * Version 1 835 * 836 * Conforms to "ACPI Specification for Status Override Table" 837 * 6 January 2015 838 * 839 ******************************************************************************/ 840 841typedef struct acpi_table_stao 842{ 843 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 844 UINT8 IgnoreUart; 845 846} ACPI_TABLE_STAO; 847 848 849/******************************************************************************* 850 * 851 * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table 852 * Version 3 853 * 854 * Conforms to "TPM 2.0 Hardware Interface Table (TPM2)" 29 November 2011 855 * 856 ******************************************************************************/ 857 858typedef struct acpi_table_tpm2 859{ 860 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 861 UINT32 Flags; 862 UINT64 ControlAddress; 863 UINT32 StartMethod; 864 865} ACPI_TABLE_TPM2; 866 867/* Control area structure (not part of table, pointed to by ControlAddress) */ 868 869typedef struct acpi_tpm2_control 870{ 871 UINT32 Reserved; 872 UINT32 Error; 873 UINT32 Cancel; 874 UINT32 Start; 875 UINT64 InterruptControl; 876 UINT32 CommandSize; 877 UINT64 CommandAddress; 878 UINT32 ResponseSize; 879 UINT64 ResponseAddress; 880 881} ACPI_TPM2_CONTROL; 882 883 884/******************************************************************************* 885 * 886 * WPBT - Windows Platform Environment Table (ACPI 6.0) 887 * Version 1 888 * 889 * Conforms to "Windows Platform Binary Table (WPBT)" 29 November 2011 890 * 891 ******************************************************************************/ 892 893typedef struct acpi_table_wpbt 894{ 895 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 896 UINT32 HandoffSize; 897 UINT64 HandoffAddress; 898 UINT8 Layout; 899 UINT8 Type; 900 UINT16 ArgumentsLength; 901 902} ACPI_TABLE_WPBT; 903 904 905/******************************************************************************* 906 * 907 * XENV - Xen Environment Table (ACPI 6.0) 908 * Version 1 909 * 910 * Conforms to "ACPI Specification for Xen Environment Table" 4 January 2015 911 * 912 ******************************************************************************/ 913 914typedef struct acpi_table_xenv 915{ 916 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 917 UINT64 GrantTableAddress; 918 UINT64 GrantTableSize; 919 UINT32 EventInterrupt; 920 UINT8 EventFlags; 921 922} ACPI_TABLE_XENV; 923 924 925/* Reset to default packing */ 926 927#pragma pack() 928 929#endif /* __ACTBL3_H__ */ 930