1 /****************************************************************************** 2 * 3 * Name: actbl1.h - Additional ACPI table definitions 4 * 5 *****************************************************************************/ 6 7 /****************************************************************************** 8 * 9 * 1. Copyright Notice 10 * 11 * Some or all of this work - Copyright (c) 1999 - 2022, 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 __ACTBL1_H__ 153 #define __ACTBL1_H__ 154 155 156 /******************************************************************************* 157 * 158 * Additional ACPI Tables 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 ******************************************************************************/ 164 165 166 /* 167 * Values for description table header signatures for tables defined in this 168 * file. Useful because they make it more difficult to inadvertently type in 169 * the wrong signature. 170 */ 171 #define ACPI_SIG_AEST "AEST" /* Arm Error Source Table */ 172 #define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */ 173 #define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */ 174 #define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */ 175 #define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */ 176 #define ACPI_SIG_CEDT "CEDT" /* CXL Early Discovery Table */ 177 #define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */ 178 #define ACPI_SIG_CSRT "CSRT" /* Core System Resource Table */ 179 #define ACPI_SIG_DBG2 "DBG2" /* Debug Port table type 2 */ 180 #define ACPI_SIG_DBGP "DBGP" /* Debug Port table */ 181 #define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */ 182 #define ACPI_SIG_DRTM "DRTM" /* Dynamic Root of Trust for Measurement table */ 183 #define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */ 184 #define ACPI_SIG_EINJ "EINJ" /* Error Injection table */ 185 #define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */ 186 #define ACPI_SIG_FPDT "FPDT" /* Firmware Performance Data Table */ 187 #define ACPI_SIG_GTDT "GTDT" /* Generic Timer Description Table */ 188 #define ACPI_SIG_HEST "HEST" /* Hardware Error Source Table */ 189 #define ACPI_SIG_HMAT "HMAT" /* Heterogeneous Memory Attributes Table */ 190 #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */ 191 #define ACPI_SIG_IBFT "IBFT" /* iSCSI Boot Firmware Table */ 192 193 #define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */ 194 #define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */ 195 196 197 /* Reserved table signatures */ 198 199 #define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */ 200 #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */ 201 202 /* 203 * These tables have been seen in the field, but no definition has been found 204 */ 205 #ifdef ACPI_UNDEFINED_TABLES 206 #define ACPI_SIG_ATKG "ATKG" 207 #define ACPI_SIG_GSCI "GSCI" /* GMCH SCI table */ 208 #define ACPI_SIG_IEIT "IEIT" 209 #endif 210 211 /* 212 * All tables must be byte-packed to match the ACPI specification, since 213 * the tables are provided by the system BIOS. 214 */ 215 #pragma pack(1) 216 217 /* 218 * Note: C bitfields are not used for this reason: 219 * 220 * "Bitfields are great and easy to read, but unfortunately the C language 221 * does not specify the layout of bitfields in memory, which means they are 222 * essentially useless for dealing with packed data in on-disk formats or 223 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me, 224 * this decision was a design error in C. Ritchie could have picked an order 225 * and stuck with it." Norman Ramsey. 226 * See http://stackoverflow.com/a/1053662/41661 227 */ 228 229 230 /******************************************************************************* 231 * 232 * Common subtable headers 233 * 234 ******************************************************************************/ 235 236 /* Generic subtable header (used in MADT, SRAT, etc.) */ 237 238 typedef struct acpi_subtable_header 239 { 240 UINT8 Type; 241 UINT8 Length; 242 243 } ACPI_SUBTABLE_HEADER; 244 245 246 /* Subtable header for WHEA tables (EINJ, ERST, WDAT) */ 247 248 typedef struct acpi_whea_header 249 { 250 UINT8 Action; 251 UINT8 Instruction; 252 UINT8 Flags; 253 UINT8 Reserved; 254 ACPI_GENERIC_ADDRESS RegisterRegion; 255 UINT64 Value; /* Value used with Read/Write register */ 256 UINT64 Mask; /* Bitmask required for this register instruction */ 257 258 } ACPI_WHEA_HEADER; 259 260 261 /******************************************************************************* 262 * 263 * ASF - Alert Standard Format table (Signature "ASF!") 264 * Revision 0x10 265 * 266 * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003 267 * 268 ******************************************************************************/ 269 270 typedef struct acpi_table_asf 271 { 272 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 273 274 } ACPI_TABLE_ASF; 275 276 277 /* ASF subtable header */ 278 279 typedef struct acpi_asf_header 280 { 281 UINT8 Type; 282 UINT8 Reserved; 283 UINT16 Length; 284 285 } ACPI_ASF_HEADER; 286 287 288 /* Values for Type field above */ 289 290 enum AcpiAsfType 291 { 292 ACPI_ASF_TYPE_INFO = 0, 293 ACPI_ASF_TYPE_ALERT = 1, 294 ACPI_ASF_TYPE_CONTROL = 2, 295 ACPI_ASF_TYPE_BOOT = 3, 296 ACPI_ASF_TYPE_ADDRESS = 4, 297 ACPI_ASF_TYPE_RESERVED = 5 298 }; 299 300 /* 301 * ASF subtables 302 */ 303 304 /* 0: ASF Information */ 305 306 typedef struct acpi_asf_info 307 { 308 ACPI_ASF_HEADER Header; 309 UINT8 MinResetValue; 310 UINT8 MinPollInterval; 311 UINT16 SystemId; 312 UINT32 MfgId; 313 UINT8 Flags; 314 UINT8 Reserved2[3]; 315 316 } ACPI_ASF_INFO; 317 318 /* Masks for Flags field above */ 319 320 #define ACPI_ASF_SMBUS_PROTOCOLS (1) 321 322 323 /* 1: ASF Alerts */ 324 325 typedef struct acpi_asf_alert 326 { 327 ACPI_ASF_HEADER Header; 328 UINT8 AssertMask; 329 UINT8 DeassertMask; 330 UINT8 Alerts; 331 UINT8 DataLength; 332 333 } ACPI_ASF_ALERT; 334 335 typedef struct acpi_asf_alert_data 336 { 337 UINT8 Address; 338 UINT8 Command; 339 UINT8 Mask; 340 UINT8 Value; 341 UINT8 SensorType; 342 UINT8 Type; 343 UINT8 Offset; 344 UINT8 SourceType; 345 UINT8 Severity; 346 UINT8 SensorNumber; 347 UINT8 Entity; 348 UINT8 Instance; 349 350 } ACPI_ASF_ALERT_DATA; 351 352 353 /* 2: ASF Remote Control */ 354 355 typedef struct acpi_asf_remote 356 { 357 ACPI_ASF_HEADER Header; 358 UINT8 Controls; 359 UINT8 DataLength; 360 UINT16 Reserved2; 361 362 } ACPI_ASF_REMOTE; 363 364 typedef struct acpi_asf_control_data 365 { 366 UINT8 Function; 367 UINT8 Address; 368 UINT8 Command; 369 UINT8 Value; 370 371 } ACPI_ASF_CONTROL_DATA; 372 373 374 /* 3: ASF RMCP Boot Options */ 375 376 typedef struct acpi_asf_rmcp 377 { 378 ACPI_ASF_HEADER Header; 379 UINT8 Capabilities[7]; 380 UINT8 CompletionCode; 381 UINT32 EnterpriseId; 382 UINT8 Command; 383 UINT16 Parameter; 384 UINT16 BootOptions; 385 UINT16 OemParameters; 386 387 } ACPI_ASF_RMCP; 388 389 390 /* 4: ASF Address */ 391 392 typedef struct acpi_asf_address 393 { 394 ACPI_ASF_HEADER Header; 395 UINT8 EpromAddress; 396 UINT8 Devices; 397 398 } ACPI_ASF_ADDRESS; 399 400 401 /******************************************************************************* 402 * 403 * BERT - Boot Error Record Table (ACPI 4.0) 404 * Version 1 405 * 406 ******************************************************************************/ 407 408 typedef struct acpi_table_bert 409 { 410 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 411 UINT32 RegionLength; /* Length of the boot error region */ 412 UINT64 Address; /* Physical address of the error region */ 413 414 } ACPI_TABLE_BERT; 415 416 417 /* Boot Error Region (not a subtable, pointed to by Address field above) */ 418 419 typedef struct acpi_bert_region 420 { 421 UINT32 BlockStatus; /* Type of error information */ 422 UINT32 RawDataOffset; /* Offset to raw error data */ 423 UINT32 RawDataLength; /* Length of raw error data */ 424 UINT32 DataLength; /* Length of generic error data */ 425 UINT32 ErrorSeverity; /* Severity code */ 426 427 } ACPI_BERT_REGION; 428 429 /* Values for BlockStatus flags above */ 430 431 #define ACPI_BERT_UNCORRECTABLE (1) 432 #define ACPI_BERT_CORRECTABLE (1<<1) 433 #define ACPI_BERT_MULTIPLE_UNCORRECTABLE (1<<2) 434 #define ACPI_BERT_MULTIPLE_CORRECTABLE (1<<3) 435 #define ACPI_BERT_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */ 436 437 /* Values for ErrorSeverity above */ 438 439 enum AcpiBertErrorSeverity 440 { 441 ACPI_BERT_ERROR_CORRECTABLE = 0, 442 ACPI_BERT_ERROR_FATAL = 1, 443 ACPI_BERT_ERROR_CORRECTED = 2, 444 ACPI_BERT_ERROR_NONE = 3, 445 ACPI_BERT_ERROR_RESERVED = 4 /* 4 and greater are reserved */ 446 }; 447 448 /* 449 * Note: The generic error data that follows the ErrorSeverity field above 450 * uses the ACPI_HEST_GENERIC_DATA defined under the HEST table below 451 */ 452 453 454 /******************************************************************************* 455 * 456 * BGRT - Boot Graphics Resource Table (ACPI 5.0) 457 * Version 1 458 * 459 ******************************************************************************/ 460 461 typedef struct acpi_table_bgrt 462 { 463 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 464 UINT16 Version; 465 UINT8 Status; 466 UINT8 ImageType; 467 UINT64 ImageAddress; 468 UINT32 ImageOffsetX; 469 UINT32 ImageOffsetY; 470 471 } ACPI_TABLE_BGRT; 472 473 /* Flags for Status field above */ 474 475 #define ACPI_BGRT_DISPLAYED (1) 476 #define ACPI_BGRT_ORIENTATION_OFFSET (3 << 1) 477 478 479 /******************************************************************************* 480 * 481 * BOOT - Simple Boot Flag Table 482 * Version 1 483 * 484 * Conforms to the "Simple Boot Flag Specification", Version 2.1 485 * 486 ******************************************************************************/ 487 488 typedef struct acpi_table_boot 489 { 490 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 491 UINT8 CmosIndex; /* Index in CMOS RAM for the boot register */ 492 UINT8 Reserved[3]; 493 494 } ACPI_TABLE_BOOT; 495 496 497 /******************************************************************************* 498 * 499 * CEDT - CXL Early Discovery Table 500 * Version 1 501 * 502 * Conforms to the "CXL Early Discovery Table" (CXL 2.0) 503 * 504 ******************************************************************************/ 505 506 typedef struct acpi_table_cedt 507 { 508 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 509 510 } ACPI_TABLE_CEDT; 511 512 /* CEDT subtable header (Performance Record Structure) */ 513 514 typedef struct acpi_cedt_header 515 { 516 UINT8 Type; 517 UINT8 Reserved; 518 UINT16 Length; 519 520 } ACPI_CEDT_HEADER; 521 522 /* Values for Type field above */ 523 524 enum AcpiCedtType 525 { 526 ACPI_CEDT_TYPE_CHBS = 0, 527 ACPI_CEDT_TYPE_CFMWS = 1, 528 ACPI_CEDT_TYPE_RESERVED = 2, 529 }; 530 531 /* Values for version field above */ 532 533 #define ACPI_CEDT_CHBS_VERSION_CXL11 (0) 534 #define ACPI_CEDT_CHBS_VERSION_CXL20 (1) 535 536 /* Values for length field above */ 537 538 #define ACPI_CEDT_CHBS_LENGTH_CXL11 (0x2000) 539 #define ACPI_CEDT_CHBS_LENGTH_CXL20 (0x10000) 540 541 /* 542 * CEDT subtables 543 */ 544 545 /* 0: CXL Host Bridge Structure */ 546 547 typedef struct acpi_cedt_chbs 548 { 549 ACPI_CEDT_HEADER Header; 550 UINT32 Uid; 551 UINT32 CxlVersion; 552 UINT32 Reserved; 553 UINT64 Base; 554 UINT64 Length; 555 556 } ACPI_CEDT_CHBS; 557 558 559 /* 1: CXL Fixed Memory Window Structure */ 560 561 typedef struct acpi_cedt_cfmws 562 { 563 ACPI_CEDT_HEADER Header; 564 UINT32 Reserved1; 565 UINT64 BaseHpa; 566 UINT64 WindowSize; 567 UINT8 InterleaveWays; 568 UINT8 InterleaveArithmetic; 569 UINT16 Reserved2; 570 UINT32 Granularity; 571 UINT16 Restrictions; 572 UINT16 QtgId; 573 UINT32 InterleaveTargets[]; 574 575 } ACPI_CEDT_CFMWS; 576 577 typedef struct acpi_cedt_cfmws_target_element 578 { 579 UINT32 InterleaveTarget; 580 581 } ACPI_CEDT_CFMWS_TARGET_ELEMENT; 582 583 /* Values for Interleave Arithmetic field above */ 584 585 #define ACPI_CEDT_CFMWS_ARITHMETIC_MODULO (0) 586 587 /* Values for Restrictions field above */ 588 589 #define ACPI_CEDT_CFMWS_RESTRICT_TYPE2 (1) 590 #define ACPI_CEDT_CFMWS_RESTRICT_TYPE3 (1<<1) 591 #define ACPI_CEDT_CFMWS_RESTRICT_VOLATILE (1<<2) 592 #define ACPI_CEDT_CFMWS_RESTRICT_PMEM (1<<3) 593 #define ACPI_CEDT_CFMWS_RESTRICT_FIXED (1<<4) 594 595 596 /******************************************************************************* 597 * 598 * CPEP - Corrected Platform Error Polling table (ACPI 4.0) 599 * Version 1 600 * 601 ******************************************************************************/ 602 603 typedef struct acpi_table_cpep 604 { 605 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 606 UINT64 Reserved; 607 608 } ACPI_TABLE_CPEP; 609 610 611 /* Subtable */ 612 613 typedef struct acpi_cpep_polling 614 { 615 ACPI_SUBTABLE_HEADER Header; 616 UINT8 Id; /* Processor ID */ 617 UINT8 Eid; /* Processor EID */ 618 UINT32 Interval; /* Polling interval (msec) */ 619 620 } ACPI_CPEP_POLLING; 621 622 623 /******************************************************************************* 624 * 625 * CSRT - Core System Resource Table 626 * Version 0 627 * 628 * Conforms to the "Core System Resource Table (CSRT)", November 14, 2011 629 * 630 ******************************************************************************/ 631 632 typedef struct acpi_table_csrt 633 { 634 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 635 636 } ACPI_TABLE_CSRT; 637 638 639 /* Resource Group subtable */ 640 641 typedef struct acpi_csrt_group 642 { 643 UINT32 Length; 644 UINT32 VendorId; 645 UINT32 SubvendorId; 646 UINT16 DeviceId; 647 UINT16 SubdeviceId; 648 UINT16 Revision; 649 UINT16 Reserved; 650 UINT32 SharedInfoLength; 651 652 /* Shared data immediately follows (Length = SharedInfoLength) */ 653 654 } ACPI_CSRT_GROUP; 655 656 /* Shared Info subtable */ 657 658 typedef struct acpi_csrt_shared_info 659 { 660 UINT16 MajorVersion; 661 UINT16 MinorVersion; 662 UINT32 MmioBaseLow; 663 UINT32 MmioBaseHigh; 664 UINT32 GsiInterrupt; 665 UINT8 InterruptPolarity; 666 UINT8 InterruptMode; 667 UINT8 NumChannels; 668 UINT8 DmaAddressWidth; 669 UINT16 BaseRequestLine; 670 UINT16 NumHandshakeSignals; 671 UINT32 MaxBlockSize; 672 673 /* Resource descriptors immediately follow (Length = Group Length - SharedInfoLength) */ 674 675 } ACPI_CSRT_SHARED_INFO; 676 677 /* Resource Descriptor subtable */ 678 679 typedef struct acpi_csrt_descriptor 680 { 681 UINT32 Length; 682 UINT16 Type; 683 UINT16 Subtype; 684 UINT32 Uid; 685 686 /* Resource-specific information immediately follows */ 687 688 } ACPI_CSRT_DESCRIPTOR; 689 690 691 /* Resource Types */ 692 693 #define ACPI_CSRT_TYPE_INTERRUPT 0x0001 694 #define ACPI_CSRT_TYPE_TIMER 0x0002 695 #define ACPI_CSRT_TYPE_DMA 0x0003 696 697 /* Resource Subtypes */ 698 699 #define ACPI_CSRT_XRUPT_LINE 0x0000 700 #define ACPI_CSRT_XRUPT_CONTROLLER 0x0001 701 #define ACPI_CSRT_TIMER 0x0000 702 #define ACPI_CSRT_DMA_CHANNEL 0x0000 703 #define ACPI_CSRT_DMA_CONTROLLER 0x0001 704 705 706 /******************************************************************************* 707 * 708 * DBG2 - Debug Port Table 2 709 * Version 0 (Both main table and subtables) 710 * 711 * Conforms to "Microsoft Debug Port Table 2 (DBG2)", September 21, 2020 712 * 713 ******************************************************************************/ 714 715 typedef struct acpi_table_dbg2 716 { 717 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 718 UINT32 InfoOffset; 719 UINT32 InfoCount; 720 721 } ACPI_TABLE_DBG2; 722 723 724 typedef struct acpi_dbg2_header 725 { 726 UINT32 InfoOffset; 727 UINT32 InfoCount; 728 729 } ACPI_DBG2_HEADER; 730 731 732 /* Debug Device Information Subtable */ 733 734 typedef struct acpi_dbg2_device 735 { 736 UINT8 Revision; 737 UINT16 Length; 738 UINT8 RegisterCount; /* Number of BaseAddress registers */ 739 UINT16 NamepathLength; 740 UINT16 NamepathOffset; 741 UINT16 OemDataLength; 742 UINT16 OemDataOffset; 743 UINT16 PortType; 744 UINT16 PortSubtype; 745 UINT16 Reserved; 746 UINT16 BaseAddressOffset; 747 UINT16 AddressSizeOffset; 748 /* 749 * Data that follows: 750 * BaseAddress (required) - Each in 12-byte Generic Address Structure format. 751 * AddressSize (required) - Array of UINT32 sizes corresponding to each BaseAddress register. 752 * Namepath (required) - Null terminated string. Single dot if not supported. 753 * OemData (optional) - Length is OemDataLength. 754 */ 755 } ACPI_DBG2_DEVICE; 756 757 /* Types for PortType field above */ 758 759 #define ACPI_DBG2_SERIAL_PORT 0x8000 760 #define ACPI_DBG2_1394_PORT 0x8001 761 #define ACPI_DBG2_USB_PORT 0x8002 762 #define ACPI_DBG2_NET_PORT 0x8003 763 764 /* Subtypes for PortSubtype field above */ 765 766 #define ACPI_DBG2_16550_COMPATIBLE 0x0000 767 #define ACPI_DBG2_16550_SUBSET 0x0001 768 #define ACPI_DBG2_MAX311XE_SPI 0x0002 769 #define ACPI_DBG2_ARM_PL011 0x0003 770 #define ACPI_DBG2_MSM8X60 0x0004 771 #define ACPI_DBG2_16550_NVIDIA 0x0005 772 #define ACPI_DBG2_TI_OMAP 0x0006 773 #define ACPI_DBG2_APM88XXXX 0x0008 774 #define ACPI_DBG2_MSM8974 0x0009 775 #define ACPI_DBG2_SAM5250 0x000A 776 #define ACPI_DBG2_INTEL_USIF 0x000B 777 #define ACPI_DBG2_IMX6 0x000C 778 #define ACPI_DBG2_ARM_SBSA_32BIT 0x000D 779 #define ACPI_DBG2_ARM_SBSA_GENERIC 0x000E 780 #define ACPI_DBG2_ARM_DCC 0x000F 781 #define ACPI_DBG2_BCM2835 0x0010 782 #define ACPI_DBG2_SDM845_1_8432MHZ 0x0011 783 #define ACPI_DBG2_16550_WITH_GAS 0x0012 784 #define ACPI_DBG2_SDM845_7_372MHZ 0x0013 785 #define ACPI_DBG2_INTEL_LPSS 0x0014 786 787 #define ACPI_DBG2_1394_STANDARD 0x0000 788 789 #define ACPI_DBG2_USB_XHCI 0x0000 790 #define ACPI_DBG2_USB_EHCI 0x0001 791 792 793 /******************************************************************************* 794 * 795 * DBGP - Debug Port table 796 * Version 1 797 * 798 * Conforms to the "Debug Port Specification", Version 1.00, 2/9/2000 799 * 800 ******************************************************************************/ 801 802 typedef struct acpi_table_dbgp 803 { 804 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 805 UINT8 Type; /* 0=full 16550, 1=subset of 16550 */ 806 UINT8 Reserved[3]; 807 ACPI_GENERIC_ADDRESS DebugPort; 808 809 } ACPI_TABLE_DBGP; 810 811 812 /******************************************************************************* 813 * 814 * DMAR - DMA Remapping table 815 * Version 1 816 * 817 * Conforms to "Intel Virtualization Technology for Directed I/O", 818 * Version 2.3, October 2014 819 * 820 ******************************************************************************/ 821 822 typedef struct acpi_table_dmar 823 { 824 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 825 UINT8 Width; /* Host Address Width */ 826 UINT8 Flags; 827 UINT8 Reserved[10]; 828 829 } ACPI_TABLE_DMAR; 830 831 /* Masks for Flags field above */ 832 833 #define ACPI_DMAR_INTR_REMAP (1) 834 #define ACPI_DMAR_X2APIC_OPT_OUT (1<<1) 835 #define ACPI_DMAR_X2APIC_MODE (1<<2) 836 837 838 /* DMAR subtable header */ 839 840 typedef struct acpi_dmar_header 841 { 842 UINT16 Type; 843 UINT16 Length; 844 845 } ACPI_DMAR_HEADER; 846 847 /* Values for subtable type in ACPI_DMAR_HEADER */ 848 849 enum AcpiDmarType 850 { 851 ACPI_DMAR_TYPE_HARDWARE_UNIT = 0, 852 ACPI_DMAR_TYPE_RESERVED_MEMORY = 1, 853 ACPI_DMAR_TYPE_ROOT_ATS = 2, 854 ACPI_DMAR_TYPE_HARDWARE_AFFINITY = 3, 855 ACPI_DMAR_TYPE_NAMESPACE = 4, 856 ACPI_DMAR_TYPE_SATC = 5, 857 ACPI_DMAR_TYPE_RESERVED = 6 /* 6 and greater are reserved */ 858 }; 859 860 861 /* DMAR Device Scope structure */ 862 863 typedef struct acpi_dmar_device_scope 864 { 865 UINT8 EntryType; 866 UINT8 Length; 867 UINT16 Reserved; 868 UINT8 EnumerationId; 869 UINT8 Bus; 870 871 } ACPI_DMAR_DEVICE_SCOPE; 872 873 /* Values for EntryType in ACPI_DMAR_DEVICE_SCOPE - device types */ 874 875 enum AcpiDmarScopeType 876 { 877 ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0, 878 ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1, 879 ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2, 880 ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3, 881 ACPI_DMAR_SCOPE_TYPE_HPET = 4, 882 ACPI_DMAR_SCOPE_TYPE_NAMESPACE = 5, 883 ACPI_DMAR_SCOPE_TYPE_RESERVED = 6 /* 6 and greater are reserved */ 884 }; 885 886 typedef struct acpi_dmar_pci_path 887 { 888 UINT8 Device; 889 UINT8 Function; 890 891 } ACPI_DMAR_PCI_PATH; 892 893 894 /* 895 * DMAR Subtables, correspond to Type in ACPI_DMAR_HEADER 896 */ 897 898 /* 0: Hardware Unit Definition */ 899 900 typedef struct acpi_dmar_hardware_unit 901 { 902 ACPI_DMAR_HEADER Header; 903 UINT8 Flags; 904 UINT8 Reserved; 905 UINT16 Segment; 906 UINT64 Address; /* Register Base Address */ 907 908 } ACPI_DMAR_HARDWARE_UNIT; 909 910 /* Masks for Flags field above */ 911 912 #define ACPI_DMAR_INCLUDE_ALL (1) 913 914 915 /* 1: Reserved Memory Definition */ 916 917 typedef struct acpi_dmar_reserved_memory 918 { 919 ACPI_DMAR_HEADER Header; 920 UINT16 Reserved; 921 UINT16 Segment; 922 UINT64 BaseAddress; /* 4K aligned base address */ 923 UINT64 EndAddress; /* 4K aligned limit address */ 924 925 } ACPI_DMAR_RESERVED_MEMORY; 926 927 /* Masks for Flags field above */ 928 929 #define ACPI_DMAR_ALLOW_ALL (1) 930 931 932 /* 2: Root Port ATS Capability Reporting Structure */ 933 934 typedef struct acpi_dmar_atsr 935 { 936 ACPI_DMAR_HEADER Header; 937 UINT8 Flags; 938 UINT8 Reserved; 939 UINT16 Segment; 940 941 } ACPI_DMAR_ATSR; 942 943 /* Masks for Flags field above */ 944 945 #define ACPI_DMAR_ALL_PORTS (1) 946 947 948 /* 3: Remapping Hardware Static Affinity Structure */ 949 950 typedef struct acpi_dmar_rhsa 951 { 952 ACPI_DMAR_HEADER Header; 953 UINT32 Reserved; 954 UINT64 BaseAddress; 955 UINT32 ProximityDomain; 956 957 } ACPI_DMAR_RHSA; 958 959 960 /* 4: ACPI Namespace Device Declaration Structure */ 961 962 typedef struct acpi_dmar_andd 963 { 964 ACPI_DMAR_HEADER Header; 965 UINT8 Reserved[3]; 966 UINT8 DeviceNumber; 967 char DeviceName[1]; 968 969 } ACPI_DMAR_ANDD; 970 971 972 /* 5: SoC Integrated Address Translation Cache (SATC) */ 973 974 typedef struct acpi_dmar_satc 975 { 976 ACPI_DMAR_HEADER Header; 977 UINT8 Flags; 978 UINT8 Reserved; 979 UINT16 Segment; 980 981 } ACPI_DMAR_SATC 982 983 ; 984 /******************************************************************************* 985 * 986 * DRTM - Dynamic Root of Trust for Measurement table 987 * Conforms to "TCG D-RTM Architecture" June 17 2013, Version 1.0.0 988 * Table version 1 989 * 990 ******************************************************************************/ 991 992 typedef struct acpi_table_drtm 993 { 994 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 995 UINT64 EntryBaseAddress; 996 UINT64 EntryLength; 997 UINT32 EntryAddress32; 998 UINT64 EntryAddress64; 999 UINT64 ExitAddress; 1000 UINT64 LogAreaAddress; 1001 UINT32 LogAreaLength; 1002 UINT64 ArchDependentAddress; 1003 UINT32 Flags; 1004 1005 } ACPI_TABLE_DRTM; 1006 1007 /* Flag Definitions for above */ 1008 1009 #define ACPI_DRTM_ACCESS_ALLOWED (1) 1010 #define ACPI_DRTM_ENABLE_GAP_CODE (1<<1) 1011 #define ACPI_DRTM_INCOMPLETE_MEASUREMENTS (1<<2) 1012 #define ACPI_DRTM_AUTHORITY_ORDER (1<<3) 1013 1014 1015 /* 1) Validated Tables List (64-bit addresses) */ 1016 1017 typedef struct acpi_drtm_vtable_list 1018 { 1019 UINT32 ValidatedTableCount; 1020 UINT64 ValidatedTables[1]; 1021 1022 } ACPI_DRTM_VTABLE_LIST; 1023 1024 /* 2) Resources List (of Resource Descriptors) */ 1025 1026 /* Resource Descriptor */ 1027 1028 typedef struct acpi_drtm_resource 1029 { 1030 UINT8 Size[7]; 1031 UINT8 Type; 1032 UINT64 Address; 1033 1034 } ACPI_DRTM_RESOURCE; 1035 1036 typedef struct acpi_drtm_resource_list 1037 { 1038 UINT32 ResourceCount; 1039 ACPI_DRTM_RESOURCE Resources[1]; 1040 1041 } ACPI_DRTM_RESOURCE_LIST; 1042 1043 /* 3) Platform-specific Identifiers List */ 1044 1045 typedef struct acpi_drtm_dps_id 1046 { 1047 UINT32 DpsIdLength; 1048 UINT8 DpsId[16]; 1049 1050 } ACPI_DRTM_DPS_ID; 1051 1052 1053 /******************************************************************************* 1054 * 1055 * ECDT - Embedded Controller Boot Resources Table 1056 * Version 1 1057 * 1058 ******************************************************************************/ 1059 1060 typedef struct acpi_table_ecdt 1061 { 1062 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1063 ACPI_GENERIC_ADDRESS Control; /* Address of EC command/status register */ 1064 ACPI_GENERIC_ADDRESS Data; /* Address of EC data register */ 1065 UINT32 Uid; /* Unique ID - must be same as the EC _UID method */ 1066 UINT8 Gpe; /* The GPE for the EC */ 1067 UINT8 Id[1]; /* Full namepath of the EC in the ACPI namespace */ 1068 1069 } ACPI_TABLE_ECDT; 1070 1071 1072 /******************************************************************************* 1073 * 1074 * EINJ - Error Injection Table (ACPI 4.0) 1075 * Version 1 1076 * 1077 ******************************************************************************/ 1078 1079 typedef struct acpi_table_einj 1080 { 1081 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1082 UINT32 HeaderLength; 1083 UINT8 Flags; 1084 UINT8 Reserved[3]; 1085 UINT32 Entries; 1086 1087 } ACPI_TABLE_EINJ; 1088 1089 1090 /* EINJ Injection Instruction Entries (actions) */ 1091 1092 typedef struct acpi_einj_entry 1093 { 1094 ACPI_WHEA_HEADER WheaHeader; /* Common header for WHEA tables */ 1095 1096 } ACPI_EINJ_ENTRY; 1097 1098 /* Masks for Flags field above */ 1099 1100 #define ACPI_EINJ_PRESERVE (1) 1101 1102 /* Values for Action field above */ 1103 1104 enum AcpiEinjActions 1105 { 1106 ACPI_EINJ_BEGIN_OPERATION = 0, 1107 ACPI_EINJ_GET_TRIGGER_TABLE = 1, 1108 ACPI_EINJ_SET_ERROR_TYPE = 2, 1109 ACPI_EINJ_GET_ERROR_TYPE = 3, 1110 ACPI_EINJ_END_OPERATION = 4, 1111 ACPI_EINJ_EXECUTE_OPERATION = 5, 1112 ACPI_EINJ_CHECK_BUSY_STATUS = 6, 1113 ACPI_EINJ_GET_COMMAND_STATUS = 7, 1114 ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 8, 1115 ACPI_EINJ_GET_EXECUTE_TIMINGS = 9, 1116 ACPI_EINJ_ACTION_RESERVED = 10, /* 10 and greater are reserved */ 1117 ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */ 1118 }; 1119 1120 /* Values for Instruction field above */ 1121 1122 enum AcpiEinjInstructions 1123 { 1124 ACPI_EINJ_READ_REGISTER = 0, 1125 ACPI_EINJ_READ_REGISTER_VALUE = 1, 1126 ACPI_EINJ_WRITE_REGISTER = 2, 1127 ACPI_EINJ_WRITE_REGISTER_VALUE = 3, 1128 ACPI_EINJ_NOOP = 4, 1129 ACPI_EINJ_FLUSH_CACHELINE = 5, 1130 ACPI_EINJ_INSTRUCTION_RESERVED = 6 /* 6 and greater are reserved */ 1131 }; 1132 1133 typedef struct acpi_einj_error_type_with_addr 1134 { 1135 UINT32 ErrorType; 1136 UINT32 VendorStructOffset; 1137 UINT32 Flags; 1138 UINT32 ApicId; 1139 UINT64 Address; 1140 UINT64 Range; 1141 UINT32 PcieId; 1142 1143 } ACPI_EINJ_ERROR_TYPE_WITH_ADDR; 1144 1145 typedef struct acpi_einj_vendor 1146 { 1147 UINT32 Length; 1148 UINT32 PcieId; 1149 UINT16 VendorId; 1150 UINT16 DeviceId; 1151 UINT8 RevisionId; 1152 UINT8 Reserved[3]; 1153 1154 } ACPI_EINJ_VENDOR; 1155 1156 1157 /* EINJ Trigger Error Action Table */ 1158 1159 typedef struct acpi_einj_trigger 1160 { 1161 UINT32 HeaderSize; 1162 UINT32 Revision; 1163 UINT32 TableSize; 1164 UINT32 EntryCount; 1165 1166 } ACPI_EINJ_TRIGGER; 1167 1168 /* Command status return values */ 1169 1170 enum AcpiEinjCommandStatus 1171 { 1172 ACPI_EINJ_SUCCESS = 0, 1173 ACPI_EINJ_FAILURE = 1, 1174 ACPI_EINJ_INVALID_ACCESS = 2, 1175 ACPI_EINJ_STATUS_RESERVED = 3 /* 3 and greater are reserved */ 1176 }; 1177 1178 1179 /* Error types returned from ACPI_EINJ_GET_ERROR_TYPE (bitfield) */ 1180 1181 #define ACPI_EINJ_PROCESSOR_CORRECTABLE (1) 1182 #define ACPI_EINJ_PROCESSOR_UNCORRECTABLE (1<<1) 1183 #define ACPI_EINJ_PROCESSOR_FATAL (1<<2) 1184 #define ACPI_EINJ_MEMORY_CORRECTABLE (1<<3) 1185 #define ACPI_EINJ_MEMORY_UNCORRECTABLE (1<<4) 1186 #define ACPI_EINJ_MEMORY_FATAL (1<<5) 1187 #define ACPI_EINJ_PCIX_CORRECTABLE (1<<6) 1188 #define ACPI_EINJ_PCIX_UNCORRECTABLE (1<<7) 1189 #define ACPI_EINJ_PCIX_FATAL (1<<8) 1190 #define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9) 1191 #define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10) 1192 #define ACPI_EINJ_PLATFORM_FATAL (1<<11) 1193 #define ACPI_EINJ_VENDOR_DEFINED (1<<31) 1194 1195 1196 /******************************************************************************* 1197 * 1198 * ERST - Error Record Serialization Table (ACPI 4.0) 1199 * Version 1 1200 * 1201 ******************************************************************************/ 1202 1203 typedef struct acpi_table_erst 1204 { 1205 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1206 UINT32 HeaderLength; 1207 UINT32 Reserved; 1208 UINT32 Entries; 1209 1210 } ACPI_TABLE_ERST; 1211 1212 1213 /* ERST Serialization Entries (actions) */ 1214 1215 typedef struct acpi_erst_entry 1216 { 1217 ACPI_WHEA_HEADER WheaHeader; /* Common header for WHEA tables */ 1218 1219 } ACPI_ERST_ENTRY; 1220 1221 /* Masks for Flags field above */ 1222 1223 #define ACPI_ERST_PRESERVE (1) 1224 1225 /* Values for Action field above */ 1226 1227 enum AcpiErstActions 1228 { 1229 ACPI_ERST_BEGIN_WRITE = 0, 1230 ACPI_ERST_BEGIN_READ = 1, 1231 ACPI_ERST_BEGIN_CLEAR = 2, 1232 ACPI_ERST_END = 3, 1233 ACPI_ERST_SET_RECORD_OFFSET = 4, 1234 ACPI_ERST_EXECUTE_OPERATION = 5, 1235 ACPI_ERST_CHECK_BUSY_STATUS = 6, 1236 ACPI_ERST_GET_COMMAND_STATUS = 7, 1237 ACPI_ERST_GET_RECORD_ID = 8, 1238 ACPI_ERST_SET_RECORD_ID = 9, 1239 ACPI_ERST_GET_RECORD_COUNT = 10, 1240 ACPI_ERST_BEGIN_DUMMY_WRIITE = 11, 1241 ACPI_ERST_NOT_USED = 12, 1242 ACPI_ERST_GET_ERROR_RANGE = 13, 1243 ACPI_ERST_GET_ERROR_LENGTH = 14, 1244 ACPI_ERST_GET_ERROR_ATTRIBUTES = 15, 1245 ACPI_ERST_EXECUTE_TIMINGS = 16, 1246 ACPI_ERST_ACTION_RESERVED = 17 /* 17 and greater are reserved */ 1247 }; 1248 1249 /* Values for Instruction field above */ 1250 1251 enum AcpiErstInstructions 1252 { 1253 ACPI_ERST_READ_REGISTER = 0, 1254 ACPI_ERST_READ_REGISTER_VALUE = 1, 1255 ACPI_ERST_WRITE_REGISTER = 2, 1256 ACPI_ERST_WRITE_REGISTER_VALUE = 3, 1257 ACPI_ERST_NOOP = 4, 1258 ACPI_ERST_LOAD_VAR1 = 5, 1259 ACPI_ERST_LOAD_VAR2 = 6, 1260 ACPI_ERST_STORE_VAR1 = 7, 1261 ACPI_ERST_ADD = 8, 1262 ACPI_ERST_SUBTRACT = 9, 1263 ACPI_ERST_ADD_VALUE = 10, 1264 ACPI_ERST_SUBTRACT_VALUE = 11, 1265 ACPI_ERST_STALL = 12, 1266 ACPI_ERST_STALL_WHILE_TRUE = 13, 1267 ACPI_ERST_SKIP_NEXT_IF_TRUE = 14, 1268 ACPI_ERST_GOTO = 15, 1269 ACPI_ERST_SET_SRC_ADDRESS_BASE = 16, 1270 ACPI_ERST_SET_DST_ADDRESS_BASE = 17, 1271 ACPI_ERST_MOVE_DATA = 18, 1272 ACPI_ERST_INSTRUCTION_RESERVED = 19 /* 19 and greater are reserved */ 1273 }; 1274 1275 /* Command status return values */ 1276 1277 enum AcpiErstCommandStatus 1278 { 1279 ACPI_ERST_SUCCESS = 0, 1280 ACPI_ERST_NO_SPACE = 1, 1281 ACPI_ERST_NOT_AVAILABLE = 2, 1282 ACPI_ERST_FAILURE = 3, 1283 ACPI_ERST_RECORD_EMPTY = 4, 1284 ACPI_ERST_NOT_FOUND = 5, 1285 ACPI_ERST_STATUS_RESERVED = 6 /* 6 and greater are reserved */ 1286 }; 1287 1288 1289 /* Error Record Serialization Information */ 1290 1291 typedef struct acpi_erst_info 1292 { 1293 UINT16 Signature; /* Should be "ER" */ 1294 UINT8 Data[48]; 1295 1296 } ACPI_ERST_INFO; 1297 1298 1299 /******************************************************************************* 1300 * 1301 * FPDT - Firmware Performance Data Table (ACPI 5.0) 1302 * Version 1 1303 * 1304 ******************************************************************************/ 1305 1306 typedef struct acpi_table_fpdt 1307 { 1308 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1309 1310 } ACPI_TABLE_FPDT; 1311 1312 1313 /* FPDT subtable header (Performance Record Structure) */ 1314 1315 typedef struct acpi_fpdt_header 1316 { 1317 UINT16 Type; 1318 UINT8 Length; 1319 UINT8 Revision; 1320 1321 } ACPI_FPDT_HEADER; 1322 1323 /* Values for Type field above */ 1324 1325 enum AcpiFpdtType 1326 { 1327 ACPI_FPDT_TYPE_BOOT = 0, 1328 ACPI_FPDT_TYPE_S3PERF = 1 1329 }; 1330 1331 1332 /* 1333 * FPDT subtables 1334 */ 1335 1336 /* 0: Firmware Basic Boot Performance Record */ 1337 1338 typedef struct acpi_fpdt_boot_pointer 1339 { 1340 ACPI_FPDT_HEADER Header; 1341 UINT8 Reserved[4]; 1342 UINT64 Address; 1343 1344 } ACPI_FPDT_BOOT_POINTER; 1345 1346 1347 /* 1: S3 Performance Table Pointer Record */ 1348 1349 typedef struct acpi_fpdt_s3pt_pointer 1350 { 1351 ACPI_FPDT_HEADER Header; 1352 UINT8 Reserved[4]; 1353 UINT64 Address; 1354 1355 } ACPI_FPDT_S3PT_POINTER; 1356 1357 1358 /* 1359 * S3PT - S3 Performance Table. This table is pointed to by the 1360 * S3 Pointer Record above. 1361 */ 1362 typedef struct acpi_table_s3pt 1363 { 1364 UINT8 Signature[4]; /* "S3PT" */ 1365 UINT32 Length; 1366 1367 } ACPI_TABLE_S3PT; 1368 1369 1370 /* 1371 * S3PT Subtables (Not part of the actual FPDT) 1372 */ 1373 1374 /* Values for Type field in S3PT header */ 1375 1376 enum AcpiS3ptType 1377 { 1378 ACPI_S3PT_TYPE_RESUME = 0, 1379 ACPI_S3PT_TYPE_SUSPEND = 1, 1380 ACPI_FPDT_BOOT_PERFORMANCE = 2 1381 }; 1382 1383 typedef struct acpi_s3pt_resume 1384 { 1385 ACPI_FPDT_HEADER Header; 1386 UINT32 ResumeCount; 1387 UINT64 FullResume; 1388 UINT64 AverageResume; 1389 1390 } ACPI_S3PT_RESUME; 1391 1392 typedef struct acpi_s3pt_suspend 1393 { 1394 ACPI_FPDT_HEADER Header; 1395 UINT64 SuspendStart; 1396 UINT64 SuspendEnd; 1397 1398 } ACPI_S3PT_SUSPEND; 1399 1400 1401 /* 1402 * FPDT Boot Performance Record (Not part of the actual FPDT) 1403 */ 1404 typedef struct acpi_fpdt_boot 1405 { 1406 ACPI_FPDT_HEADER Header; 1407 UINT8 Reserved[4]; 1408 UINT64 ResetEnd; 1409 UINT64 LoadStart; 1410 UINT64 StartupStart; 1411 UINT64 ExitServicesEntry; 1412 UINT64 ExitServicesExit; 1413 1414 } ACPI_FPDT_BOOT; 1415 1416 1417 /******************************************************************************* 1418 * 1419 * GTDT - Generic Timer Description Table (ACPI 5.1) 1420 * Version 2 1421 * 1422 ******************************************************************************/ 1423 1424 typedef struct acpi_table_gtdt 1425 { 1426 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1427 UINT64 CounterBlockAddresss; 1428 UINT32 Reserved; 1429 UINT32 SecureEl1Interrupt; 1430 UINT32 SecureEl1Flags; 1431 UINT32 NonSecureEl1Interrupt; 1432 UINT32 NonSecureEl1Flags; 1433 UINT32 VirtualTimerInterrupt; 1434 UINT32 VirtualTimerFlags; 1435 UINT32 NonSecureEl2Interrupt; 1436 UINT32 NonSecureEl2Flags; 1437 UINT64 CounterReadBlockAddress; 1438 UINT32 PlatformTimerCount; 1439 UINT32 PlatformTimerOffset; 1440 1441 } ACPI_TABLE_GTDT; 1442 1443 /* Flag Definitions: Timer Block Physical Timers and Virtual timers */ 1444 1445 #define ACPI_GTDT_INTERRUPT_MODE (1) 1446 #define ACPI_GTDT_INTERRUPT_POLARITY (1<<1) 1447 #define ACPI_GTDT_ALWAYS_ON (1<<2) 1448 1449 typedef struct acpi_gtdt_el2 1450 { 1451 UINT32 VirtualEL2TimerGsiv; 1452 UINT32 VirtualEL2TimerFlags; 1453 } ACPI_GTDT_EL2; 1454 1455 1456 /* Common GTDT subtable header */ 1457 1458 typedef struct acpi_gtdt_header 1459 { 1460 UINT8 Type; 1461 UINT16 Length; 1462 1463 } ACPI_GTDT_HEADER; 1464 1465 /* Values for GTDT subtable type above */ 1466 1467 enum AcpiGtdtType 1468 { 1469 ACPI_GTDT_TYPE_TIMER_BLOCK = 0, 1470 ACPI_GTDT_TYPE_WATCHDOG = 1, 1471 ACPI_GTDT_TYPE_RESERVED = 2 /* 2 and greater are reserved */ 1472 }; 1473 1474 1475 /* GTDT Subtables, correspond to Type in acpi_gtdt_header */ 1476 1477 /* 0: Generic Timer Block */ 1478 1479 typedef struct acpi_gtdt_timer_block 1480 { 1481 ACPI_GTDT_HEADER Header; 1482 UINT8 Reserved; 1483 UINT64 BlockAddress; 1484 UINT32 TimerCount; 1485 UINT32 TimerOffset; 1486 1487 } ACPI_GTDT_TIMER_BLOCK; 1488 1489 /* Timer Sub-Structure, one per timer */ 1490 1491 typedef struct acpi_gtdt_timer_entry 1492 { 1493 UINT8 FrameNumber; 1494 UINT8 Reserved[3]; 1495 UINT64 BaseAddress; 1496 UINT64 El0BaseAddress; 1497 UINT32 TimerInterrupt; 1498 UINT32 TimerFlags; 1499 UINT32 VirtualTimerInterrupt; 1500 UINT32 VirtualTimerFlags; 1501 UINT32 CommonFlags; 1502 1503 } ACPI_GTDT_TIMER_ENTRY; 1504 1505 /* Flag Definitions: TimerFlags and VirtualTimerFlags above */ 1506 1507 #define ACPI_GTDT_GT_IRQ_MODE (1) 1508 #define ACPI_GTDT_GT_IRQ_POLARITY (1<<1) 1509 1510 /* Flag Definitions: CommonFlags above */ 1511 1512 #define ACPI_GTDT_GT_IS_SECURE_TIMER (1) 1513 #define ACPI_GTDT_GT_ALWAYS_ON (1<<1) 1514 1515 1516 /* 1: SBSA Generic Watchdog Structure */ 1517 1518 typedef struct acpi_gtdt_watchdog 1519 { 1520 ACPI_GTDT_HEADER Header; 1521 UINT8 Reserved; 1522 UINT64 RefreshFrameAddress; 1523 UINT64 ControlFrameAddress; 1524 UINT32 TimerInterrupt; 1525 UINT32 TimerFlags; 1526 1527 } ACPI_GTDT_WATCHDOG; 1528 1529 /* Flag Definitions: TimerFlags above */ 1530 1531 #define ACPI_GTDT_WATCHDOG_IRQ_MODE (1) 1532 #define ACPI_GTDT_WATCHDOG_IRQ_POLARITY (1<<1) 1533 #define ACPI_GTDT_WATCHDOG_SECURE (1<<2) 1534 1535 1536 /******************************************************************************* 1537 * 1538 * HEST - Hardware Error Source Table (ACPI 4.0) 1539 * Version 1 1540 * 1541 ******************************************************************************/ 1542 1543 typedef struct acpi_table_hest 1544 { 1545 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1546 UINT32 ErrorSourceCount; 1547 1548 } ACPI_TABLE_HEST; 1549 1550 1551 /* HEST subtable header */ 1552 1553 typedef struct acpi_hest_header 1554 { 1555 UINT16 Type; 1556 UINT16 SourceId; 1557 1558 } ACPI_HEST_HEADER; 1559 1560 1561 /* Values for Type field above for subtables */ 1562 1563 enum AcpiHestTypes 1564 { 1565 ACPI_HEST_TYPE_IA32_CHECK = 0, 1566 ACPI_HEST_TYPE_IA32_CORRECTED_CHECK = 1, 1567 ACPI_HEST_TYPE_IA32_NMI = 2, 1568 ACPI_HEST_TYPE_NOT_USED3 = 3, 1569 ACPI_HEST_TYPE_NOT_USED4 = 4, 1570 ACPI_HEST_TYPE_NOT_USED5 = 5, 1571 ACPI_HEST_TYPE_AER_ROOT_PORT = 6, 1572 ACPI_HEST_TYPE_AER_ENDPOINT = 7, 1573 ACPI_HEST_TYPE_AER_BRIDGE = 8, 1574 ACPI_HEST_TYPE_GENERIC_ERROR = 9, 1575 ACPI_HEST_TYPE_GENERIC_ERROR_V2 = 10, 1576 ACPI_HEST_TYPE_IA32_DEFERRED_CHECK = 11, 1577 ACPI_HEST_TYPE_RESERVED = 12 /* 12 and greater are reserved */ 1578 }; 1579 1580 1581 /* 1582 * HEST substructures contained in subtables 1583 */ 1584 1585 /* 1586 * IA32 Error Bank(s) - Follows the ACPI_HEST_IA_MACHINE_CHECK and 1587 * ACPI_HEST_IA_CORRECTED structures. 1588 */ 1589 typedef struct acpi_hest_ia_error_bank 1590 { 1591 UINT8 BankNumber; 1592 UINT8 ClearStatusOnInit; 1593 UINT8 StatusFormat; 1594 UINT8 Reserved; 1595 UINT32 ControlRegister; 1596 UINT64 ControlData; 1597 UINT32 StatusRegister; 1598 UINT32 AddressRegister; 1599 UINT32 MiscRegister; 1600 1601 } ACPI_HEST_IA_ERROR_BANK; 1602 1603 1604 /* Common HEST sub-structure for PCI/AER structures below (6,7,8) */ 1605 1606 typedef struct acpi_hest_aer_common 1607 { 1608 UINT16 Reserved1; 1609 UINT8 Flags; 1610 UINT8 Enabled; 1611 UINT32 RecordsToPreallocate; 1612 UINT32 MaxSectionsPerRecord; 1613 UINT32 Bus; /* Bus and Segment numbers */ 1614 UINT16 Device; 1615 UINT16 Function; 1616 UINT16 DeviceControl; 1617 UINT16 Reserved2; 1618 UINT32 UncorrectableMask; 1619 UINT32 UncorrectableSeverity; 1620 UINT32 CorrectableMask; 1621 UINT32 AdvancedCapabilities; 1622 1623 } ACPI_HEST_AER_COMMON; 1624 1625 /* Masks for HEST Flags fields */ 1626 1627 #define ACPI_HEST_FIRMWARE_FIRST (1) 1628 #define ACPI_HEST_GLOBAL (1<<1) 1629 #define ACPI_HEST_GHES_ASSIST (1<<2) 1630 1631 /* 1632 * Macros to access the bus/segment numbers in Bus field above: 1633 * Bus number is encoded in bits 7:0 1634 * Segment number is encoded in bits 23:8 1635 */ 1636 #define ACPI_HEST_BUS(Bus) ((Bus) & 0xFF) 1637 #define ACPI_HEST_SEGMENT(Bus) (((Bus) >> 8) & 0xFFFF) 1638 1639 1640 /* Hardware Error Notification */ 1641 1642 typedef struct acpi_hest_notify 1643 { 1644 UINT8 Type; 1645 UINT8 Length; 1646 UINT16 ConfigWriteEnable; 1647 UINT32 PollInterval; 1648 UINT32 Vector; 1649 UINT32 PollingThresholdValue; 1650 UINT32 PollingThresholdWindow; 1651 UINT32 ErrorThresholdValue; 1652 UINT32 ErrorThresholdWindow; 1653 1654 } ACPI_HEST_NOTIFY; 1655 1656 /* Values for Notify Type field above */ 1657 1658 enum AcpiHestNotifyTypes 1659 { 1660 ACPI_HEST_NOTIFY_POLLED = 0, 1661 ACPI_HEST_NOTIFY_EXTERNAL = 1, 1662 ACPI_HEST_NOTIFY_LOCAL = 2, 1663 ACPI_HEST_NOTIFY_SCI = 3, 1664 ACPI_HEST_NOTIFY_NMI = 4, 1665 ACPI_HEST_NOTIFY_CMCI = 5, /* ACPI 5.0 */ 1666 ACPI_HEST_NOTIFY_MCE = 6, /* ACPI 5.0 */ 1667 ACPI_HEST_NOTIFY_GPIO = 7, /* ACPI 6.0 */ 1668 ACPI_HEST_NOTIFY_SEA = 8, /* ACPI 6.1 */ 1669 ACPI_HEST_NOTIFY_SEI = 9, /* ACPI 6.1 */ 1670 ACPI_HEST_NOTIFY_GSIV = 10, /* ACPI 6.1 */ 1671 ACPI_HEST_NOTIFY_SOFTWARE_DELEGATED = 11, /* ACPI 6.2 */ 1672 ACPI_HEST_NOTIFY_RESERVED = 12 /* 12 and greater are reserved */ 1673 }; 1674 1675 /* Values for ConfigWriteEnable bitfield above */ 1676 1677 #define ACPI_HEST_TYPE (1) 1678 #define ACPI_HEST_POLL_INTERVAL (1<<1) 1679 #define ACPI_HEST_POLL_THRESHOLD_VALUE (1<<2) 1680 #define ACPI_HEST_POLL_THRESHOLD_WINDOW (1<<3) 1681 #define ACPI_HEST_ERR_THRESHOLD_VALUE (1<<4) 1682 #define ACPI_HEST_ERR_THRESHOLD_WINDOW (1<<5) 1683 1684 1685 /* 1686 * HEST subtables 1687 */ 1688 1689 /* 0: IA32 Machine Check Exception */ 1690 1691 typedef struct acpi_hest_ia_machine_check 1692 { 1693 ACPI_HEST_HEADER Header; 1694 UINT16 Reserved1; 1695 UINT8 Flags; /* See flags ACPI_HEST_GLOBAL, etc. above */ 1696 UINT8 Enabled; 1697 UINT32 RecordsToPreallocate; 1698 UINT32 MaxSectionsPerRecord; 1699 UINT64 GlobalCapabilityData; 1700 UINT64 GlobalControlData; 1701 UINT8 NumHardwareBanks; 1702 UINT8 Reserved3[7]; 1703 1704 } ACPI_HEST_IA_MACHINE_CHECK; 1705 1706 1707 /* 1: IA32 Corrected Machine Check */ 1708 1709 typedef struct acpi_hest_ia_corrected 1710 { 1711 ACPI_HEST_HEADER Header; 1712 UINT16 Reserved1; 1713 UINT8 Flags; /* See flags ACPI_HEST_GLOBAL, etc. above */ 1714 UINT8 Enabled; 1715 UINT32 RecordsToPreallocate; 1716 UINT32 MaxSectionsPerRecord; 1717 ACPI_HEST_NOTIFY Notify; 1718 UINT8 NumHardwareBanks; 1719 UINT8 Reserved2[3]; 1720 1721 } ACPI_HEST_IA_CORRECTED; 1722 1723 1724 /* 2: IA32 Non-Maskable Interrupt */ 1725 1726 typedef struct acpi_hest_ia_nmi 1727 { 1728 ACPI_HEST_HEADER Header; 1729 UINT32 Reserved; 1730 UINT32 RecordsToPreallocate; 1731 UINT32 MaxSectionsPerRecord; 1732 UINT32 MaxRawDataLength; 1733 1734 } ACPI_HEST_IA_NMI; 1735 1736 1737 /* 3,4,5: Not used */ 1738 1739 /* 6: PCI Express Root Port AER */ 1740 1741 typedef struct acpi_hest_aer_root 1742 { 1743 ACPI_HEST_HEADER Header; 1744 ACPI_HEST_AER_COMMON Aer; 1745 UINT32 RootErrorCommand; 1746 1747 } ACPI_HEST_AER_ROOT; 1748 1749 1750 /* 7: PCI Express AER (AER Endpoint) */ 1751 1752 typedef struct acpi_hest_aer 1753 { 1754 ACPI_HEST_HEADER Header; 1755 ACPI_HEST_AER_COMMON Aer; 1756 1757 } ACPI_HEST_AER; 1758 1759 1760 /* 8: PCI Express/PCI-X Bridge AER */ 1761 1762 typedef struct acpi_hest_aer_bridge 1763 { 1764 ACPI_HEST_HEADER Header; 1765 ACPI_HEST_AER_COMMON Aer; 1766 UINT32 UncorrectableMask2; 1767 UINT32 UncorrectableSeverity2; 1768 UINT32 AdvancedCapabilities2; 1769 1770 } ACPI_HEST_AER_BRIDGE; 1771 1772 1773 /* 9: Generic Hardware Error Source */ 1774 1775 typedef struct acpi_hest_generic 1776 { 1777 ACPI_HEST_HEADER Header; 1778 UINT16 RelatedSourceId; 1779 UINT8 Reserved; 1780 UINT8 Enabled; 1781 UINT32 RecordsToPreallocate; 1782 UINT32 MaxSectionsPerRecord; 1783 UINT32 MaxRawDataLength; 1784 ACPI_GENERIC_ADDRESS ErrorStatusAddress; 1785 ACPI_HEST_NOTIFY Notify; 1786 UINT32 ErrorBlockLength; 1787 1788 } ACPI_HEST_GENERIC; 1789 1790 1791 /* 10: Generic Hardware Error Source, version 2 */ 1792 1793 typedef struct acpi_hest_generic_v2 1794 { 1795 ACPI_HEST_HEADER Header; 1796 UINT16 RelatedSourceId; 1797 UINT8 Reserved; 1798 UINT8 Enabled; 1799 UINT32 RecordsToPreallocate; 1800 UINT32 MaxSectionsPerRecord; 1801 UINT32 MaxRawDataLength; 1802 ACPI_GENERIC_ADDRESS ErrorStatusAddress; 1803 ACPI_HEST_NOTIFY Notify; 1804 UINT32 ErrorBlockLength; 1805 ACPI_GENERIC_ADDRESS ReadAckRegister; 1806 UINT64 ReadAckPreserve; 1807 UINT64 ReadAckWrite; 1808 1809 } ACPI_HEST_GENERIC_V2; 1810 1811 1812 /* Generic Error Status block */ 1813 1814 typedef struct acpi_hest_generic_status 1815 { 1816 UINT32 BlockStatus; 1817 UINT32 RawDataOffset; 1818 UINT32 RawDataLength; 1819 UINT32 DataLength; 1820 UINT32 ErrorSeverity; 1821 1822 } ACPI_HEST_GENERIC_STATUS; 1823 1824 /* Values for BlockStatus flags above */ 1825 1826 #define ACPI_HEST_UNCORRECTABLE (1) 1827 #define ACPI_HEST_CORRECTABLE (1<<1) 1828 #define ACPI_HEST_MULTIPLE_UNCORRECTABLE (1<<2) 1829 #define ACPI_HEST_MULTIPLE_CORRECTABLE (1<<3) 1830 #define ACPI_HEST_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */ 1831 1832 1833 /* Generic Error Data entry */ 1834 1835 typedef struct acpi_hest_generic_data 1836 { 1837 UINT8 SectionType[16]; 1838 UINT32 ErrorSeverity; 1839 UINT16 Revision; 1840 UINT8 ValidationBits; 1841 UINT8 Flags; 1842 UINT32 ErrorDataLength; 1843 UINT8 FruId[16]; 1844 UINT8 FruText[20]; 1845 1846 } ACPI_HEST_GENERIC_DATA; 1847 1848 /* Extension for revision 0x0300 */ 1849 1850 typedef struct acpi_hest_generic_data_v300 1851 { 1852 UINT8 SectionType[16]; 1853 UINT32 ErrorSeverity; 1854 UINT16 Revision; 1855 UINT8 ValidationBits; 1856 UINT8 Flags; 1857 UINT32 ErrorDataLength; 1858 UINT8 FruId[16]; 1859 UINT8 FruText[20]; 1860 UINT64 TimeStamp; 1861 1862 } ACPI_HEST_GENERIC_DATA_V300; 1863 1864 /* Values for ErrorSeverity above */ 1865 1866 #define ACPI_HEST_GEN_ERROR_RECOVERABLE 0 1867 #define ACPI_HEST_GEN_ERROR_FATAL 1 1868 #define ACPI_HEST_GEN_ERROR_CORRECTED 2 1869 #define ACPI_HEST_GEN_ERROR_NONE 3 1870 1871 /* Flags for ValidationBits above */ 1872 1873 #define ACPI_HEST_GEN_VALID_FRU_ID (1) 1874 #define ACPI_HEST_GEN_VALID_FRU_STRING (1<<1) 1875 #define ACPI_HEST_GEN_VALID_TIMESTAMP (1<<2) 1876 1877 1878 /* 11: IA32 Deferred Machine Check Exception (ACPI 6.2) */ 1879 1880 typedef struct acpi_hest_ia_deferred_check 1881 { 1882 ACPI_HEST_HEADER Header; 1883 UINT16 Reserved1; 1884 UINT8 Flags; /* See flags ACPI_HEST_GLOBAL, etc. above */ 1885 UINT8 Enabled; 1886 UINT32 RecordsToPreallocate; 1887 UINT32 MaxSectionsPerRecord; 1888 ACPI_HEST_NOTIFY Notify; 1889 UINT8 NumHardwareBanks; 1890 UINT8 Reserved2[3]; 1891 1892 } ACPI_HEST_IA_DEFERRED_CHECK; 1893 1894 1895 /******************************************************************************* 1896 * 1897 * HMAT - Heterogeneous Memory Attributes Table (ACPI 6.3) 1898 * 1899 ******************************************************************************/ 1900 1901 typedef struct acpi_table_hmat 1902 { 1903 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1904 UINT32 Reserved; 1905 1906 } ACPI_TABLE_HMAT; 1907 1908 1909 /* Values for HMAT structure types */ 1910 1911 enum AcpiHmatType 1912 { 1913 ACPI_HMAT_TYPE_ADDRESS_RANGE = 0, /* Memory subsystem address range */ 1914 ACPI_HMAT_TYPE_LOCALITY = 1, /* System locality latency and bandwidth information */ 1915 ACPI_HMAT_TYPE_CACHE = 2, /* Memory side cache information */ 1916 ACPI_HMAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */ 1917 }; 1918 1919 typedef struct acpi_hmat_structure 1920 { 1921 UINT16 Type; 1922 UINT16 Reserved; 1923 UINT32 Length; 1924 1925 } ACPI_HMAT_STRUCTURE; 1926 1927 1928 /* 1929 * HMAT Structures, correspond to Type in ACPI_HMAT_STRUCTURE 1930 */ 1931 1932 /* 0: Memory proximity domain attributes */ 1933 1934 typedef struct acpi_hmat_proximity_domain 1935 { 1936 ACPI_HMAT_STRUCTURE Header; 1937 UINT16 Flags; 1938 UINT16 Reserved1; 1939 UINT32 InitiatorPD; /* Attached Initiator proximity domain */ 1940 UINT32 MemoryPD; /* Memory proximity domain */ 1941 UINT32 Reserved2; 1942 UINT64 Reserved3; 1943 UINT64 Reserved4; 1944 1945 } ACPI_HMAT_PROXIMITY_DOMAIN; 1946 1947 /* Masks for Flags field above */ 1948 1949 #define ACPI_HMAT_INITIATOR_PD_VALID (1) /* 1: InitiatorPD field is valid */ 1950 1951 1952 /* 1: System locality latency and bandwidth information */ 1953 1954 typedef struct acpi_hmat_locality 1955 { 1956 ACPI_HMAT_STRUCTURE Header; 1957 UINT8 Flags; 1958 UINT8 DataType; 1959 UINT8 MinTransferSize; 1960 UINT8 Reserved1; 1961 UINT32 NumberOfInitiatorPDs; 1962 UINT32 NumberOfTargetPDs; 1963 UINT32 Reserved2; 1964 UINT64 EntryBaseUnit; 1965 1966 } ACPI_HMAT_LOCALITY; 1967 1968 /* Masks for Flags field above */ 1969 1970 #define ACPI_HMAT_MEMORY_HIERARCHY (0x0F) /* Bits 0-3 */ 1971 1972 /* Values for Memory Hierarchy flags */ 1973 1974 #define ACPI_HMAT_MEMORY 0 1975 #define ACPI_HMAT_1ST_LEVEL_CACHE 1 1976 #define ACPI_HMAT_2ND_LEVEL_CACHE 2 1977 #define ACPI_HMAT_3RD_LEVEL_CACHE 3 1978 #define ACPI_HMAT_MINIMUM_XFER_SIZE 0x10 /* Bit 4: ACPI 6.4 */ 1979 #define ACPI_HMAT_NON_SEQUENTIAL_XFERS 0x20 /* Bit 5: ACPI 6.4 */ 1980 1981 1982 /* Values for DataType field above */ 1983 1984 #define ACPI_HMAT_ACCESS_LATENCY 0 1985 #define ACPI_HMAT_READ_LATENCY 1 1986 #define ACPI_HMAT_WRITE_LATENCY 2 1987 #define ACPI_HMAT_ACCESS_BANDWIDTH 3 1988 #define ACPI_HMAT_READ_BANDWIDTH 4 1989 #define ACPI_HMAT_WRITE_BANDWIDTH 5 1990 1991 1992 /* 2: Memory side cache information */ 1993 1994 typedef struct acpi_hmat_cache 1995 { 1996 ACPI_HMAT_STRUCTURE Header; 1997 UINT32 MemoryPD; 1998 UINT32 Reserved1; 1999 UINT64 CacheSize; 2000 UINT32 CacheAttributes; 2001 UINT16 Reserved2; 2002 UINT16 NumberOfSMBIOSHandles; 2003 2004 } ACPI_HMAT_CACHE; 2005 2006 /* Masks for CacheAttributes field above */ 2007 2008 #define ACPI_HMAT_TOTAL_CACHE_LEVEL (0x0000000F) 2009 #define ACPI_HMAT_CACHE_LEVEL (0x000000F0) 2010 #define ACPI_HMAT_CACHE_ASSOCIATIVITY (0x00000F00) 2011 #define ACPI_HMAT_WRITE_POLICY (0x0000F000) 2012 #define ACPI_HMAT_CACHE_LINE_SIZE (0xFFFF0000) 2013 2014 /* Values for cache associativity flag */ 2015 2016 #define ACPI_HMAT_CA_NONE (0) 2017 #define ACPI_HMAT_CA_DIRECT_MAPPED (1) 2018 #define ACPI_HMAT_CA_COMPLEX_CACHE_INDEXING (2) 2019 2020 /* Values for write policy flag */ 2021 2022 #define ACPI_HMAT_CP_NONE (0) 2023 #define ACPI_HMAT_CP_WB (1) 2024 #define ACPI_HMAT_CP_WT (2) 2025 2026 2027 /******************************************************************************* 2028 * 2029 * HPET - High Precision Event Timer table 2030 * Version 1 2031 * 2032 * Conforms to "IA-PC HPET (High Precision Event Timers) Specification", 2033 * Version 1.0a, October 2004 2034 * 2035 ******************************************************************************/ 2036 2037 typedef struct acpi_table_hpet 2038 { 2039 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 2040 UINT32 Id; /* Hardware ID of event timer block */ 2041 ACPI_GENERIC_ADDRESS Address; /* Address of event timer block */ 2042 UINT8 Sequence; /* HPET sequence number */ 2043 UINT16 MinimumTick; /* Main counter min tick, periodic mode */ 2044 UINT8 Flags; 2045 2046 } ACPI_TABLE_HPET; 2047 2048 /* Masks for Flags field above */ 2049 2050 #define ACPI_HPET_PAGE_PROTECT_MASK (3) 2051 2052 /* Values for Page Protect flags */ 2053 2054 enum AcpiHpetPageProtect 2055 { 2056 ACPI_HPET_NO_PAGE_PROTECT = 0, 2057 ACPI_HPET_PAGE_PROTECT4 = 1, 2058 ACPI_HPET_PAGE_PROTECT64 = 2 2059 }; 2060 2061 2062 /******************************************************************************* 2063 * 2064 * IBFT - Boot Firmware Table 2065 * Version 1 2066 * 2067 * Conforms to "iSCSI Boot Firmware Table (iBFT) as Defined in ACPI 3.0b 2068 * Specification", Version 1.01, March 1, 2007 2069 * 2070 * Note: It appears that this table is not intended to appear in the RSDT/XSDT. 2071 * Therefore, it is not currently supported by the disassembler. 2072 * 2073 ******************************************************************************/ 2074 2075 typedef struct acpi_table_ibft 2076 { 2077 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 2078 UINT8 Reserved[12]; 2079 2080 } ACPI_TABLE_IBFT; 2081 2082 2083 /* IBFT common subtable header */ 2084 2085 typedef struct acpi_ibft_header 2086 { 2087 UINT8 Type; 2088 UINT8 Version; 2089 UINT16 Length; 2090 UINT8 Index; 2091 UINT8 Flags; 2092 2093 } ACPI_IBFT_HEADER; 2094 2095 /* Values for Type field above */ 2096 2097 enum AcpiIbftType 2098 { 2099 ACPI_IBFT_TYPE_NOT_USED = 0, 2100 ACPI_IBFT_TYPE_CONTROL = 1, 2101 ACPI_IBFT_TYPE_INITIATOR = 2, 2102 ACPI_IBFT_TYPE_NIC = 3, 2103 ACPI_IBFT_TYPE_TARGET = 4, 2104 ACPI_IBFT_TYPE_EXTENSIONS = 5, 2105 ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */ 2106 }; 2107 2108 2109 /* IBFT subtables */ 2110 2111 typedef struct acpi_ibft_control 2112 { 2113 ACPI_IBFT_HEADER Header; 2114 UINT16 Extensions; 2115 UINT16 InitiatorOffset; 2116 UINT16 Nic0Offset; 2117 UINT16 Target0Offset; 2118 UINT16 Nic1Offset; 2119 UINT16 Target1Offset; 2120 2121 } ACPI_IBFT_CONTROL; 2122 2123 typedef struct acpi_ibft_initiator 2124 { 2125 ACPI_IBFT_HEADER Header; 2126 UINT8 SnsServer[16]; 2127 UINT8 SlpServer[16]; 2128 UINT8 PrimaryServer[16]; 2129 UINT8 SecondaryServer[16]; 2130 UINT16 NameLength; 2131 UINT16 NameOffset; 2132 2133 } ACPI_IBFT_INITIATOR; 2134 2135 typedef struct acpi_ibft_nic 2136 { 2137 ACPI_IBFT_HEADER Header; 2138 UINT8 IpAddress[16]; 2139 UINT8 SubnetMaskPrefix; 2140 UINT8 Origin; 2141 UINT8 Gateway[16]; 2142 UINT8 PrimaryDns[16]; 2143 UINT8 SecondaryDns[16]; 2144 UINT8 Dhcp[16]; 2145 UINT16 Vlan; 2146 UINT8 MacAddress[6]; 2147 UINT16 PciAddress; 2148 UINT16 NameLength; 2149 UINT16 NameOffset; 2150 2151 } ACPI_IBFT_NIC; 2152 2153 typedef struct acpi_ibft_target 2154 { 2155 ACPI_IBFT_HEADER Header; 2156 UINT8 TargetIpAddress[16]; 2157 UINT16 TargetIpSocket; 2158 UINT8 TargetBootLun[8]; 2159 UINT8 ChapType; 2160 UINT8 NicAssociation; 2161 UINT16 TargetNameLength; 2162 UINT16 TargetNameOffset; 2163 UINT16 ChapNameLength; 2164 UINT16 ChapNameOffset; 2165 UINT16 ChapSecretLength; 2166 UINT16 ChapSecretOffset; 2167 UINT16 ReverseChapNameLength; 2168 UINT16 ReverseChapNameOffset; 2169 UINT16 ReverseChapSecretLength; 2170 UINT16 ReverseChapSecretOffset; 2171 2172 } ACPI_IBFT_TARGET; 2173 2174 2175 /* Reset to default packing */ 2176 2177 #pragma pack() 2178 2179 #endif /* __ACTBL1_H__ */ 2180