1 /****************************************************************************** 2 * 3 * Name: actbl1.h - Additional ACPI table definitions 4 * 5 *****************************************************************************/ 6 7 /* 8 * Copyright (C) 2000 - 2016, Intel Corp. 9 * All rights reserved. 10 * 11 * Redistribution and use in source and binary forms, with or without 12 * modification, are permitted provided that the following conditions 13 * are met: 14 * 1. Redistributions of source code must retain the above copyright 15 * notice, this list of conditions, and the following disclaimer, 16 * without modification. 17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer 18 * substantially similar to the "NO WARRANTY" disclaimer below 19 * ("Disclaimer") and any redistribution must be conditioned upon 20 * including a substantially similar Disclaimer requirement for further 21 * binary redistribution. 22 * 3. Neither the names of the above-listed copyright holders nor the names 23 * of any contributors may be used to endorse or promote products derived 24 * from this software without specific prior written permission. 25 * 26 * Alternatively, this software may be distributed under the terms of the 27 * GNU General Public License ("GPL") version 2 as published by the Free 28 * Software Foundation. 29 * 30 * NO WARRANTY 31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR 34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 * POSSIBILITY OF SUCH DAMAGES. 42 */ 43 44 #ifndef __ACTBL1_H__ 45 #define __ACTBL1_H__ 46 47 48 /******************************************************************************* 49 * 50 * Additional ACPI Tables (1) 51 * 52 * These tables are not consumed directly by the ACPICA subsystem, but are 53 * included here to support device drivers and the AML disassembler. 54 * 55 * The tables in this file are fully defined within the ACPI specification. 56 * 57 ******************************************************************************/ 58 59 60 /* 61 * Values for description table header signatures for tables defined in this 62 * file. Useful because they make it more difficult to inadvertently type in 63 * the wrong signature. 64 */ 65 #define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */ 66 #define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */ 67 #define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */ 68 #define ACPI_SIG_EINJ "EINJ" /* Error Injection table */ 69 #define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */ 70 #define ACPI_SIG_HEST "HEST" /* Hardware Error Source Table */ 71 #define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */ 72 #define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table */ 73 #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */ 74 #define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */ 75 #define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */ 76 #define ACPI_SIG_NFIT "NFIT" /* NVDIMM Firmware Interface Table */ 77 78 79 /* 80 * All tables must be byte-packed to match the ACPI specification, since 81 * the tables are provided by the system BIOS. 82 */ 83 #pragma pack(1) 84 85 /* 86 * Note: C bitfields are not used for this reason: 87 * 88 * "Bitfields are great and easy to read, but unfortunately the C language 89 * does not specify the layout of bitfields in memory, which means they are 90 * essentially useless for dealing with packed data in on-disk formats or 91 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me, 92 * this decision was a design error in C. Ritchie could have picked an order 93 * and stuck with it." Norman Ramsey. 94 * See http://stackoverflow.com/a/1053662/41661 95 */ 96 97 98 /******************************************************************************* 99 * 100 * Common subtable headers 101 * 102 ******************************************************************************/ 103 104 /* Generic subtable header (used in MADT, SRAT, etc.) */ 105 106 typedef struct acpi_subtable_header 107 { 108 UINT8 Type; 109 UINT8 Length; 110 111 } ACPI_SUBTABLE_HEADER; 112 113 114 /* Subtable header for WHEA tables (EINJ, ERST, WDAT) */ 115 116 typedef struct acpi_whea_header 117 { 118 UINT8 Action; 119 UINT8 Instruction; 120 UINT8 Flags; 121 UINT8 Reserved; 122 ACPI_GENERIC_ADDRESS RegisterRegion; 123 UINT64 Value; /* Value used with Read/Write register */ 124 UINT64 Mask; /* Bitmask required for this register instruction */ 125 126 } ACPI_WHEA_HEADER; 127 128 129 /******************************************************************************* 130 * 131 * BERT - Boot Error Record Table (ACPI 4.0) 132 * Version 1 133 * 134 ******************************************************************************/ 135 136 typedef struct acpi_table_bert 137 { 138 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 139 UINT32 RegionLength; /* Length of the boot error region */ 140 UINT64 Address; /* Physical address of the error region */ 141 142 } ACPI_TABLE_BERT; 143 144 145 /* Boot Error Region (not a subtable, pointed to by Address field above) */ 146 147 typedef struct acpi_bert_region 148 { 149 UINT32 BlockStatus; /* Type of error information */ 150 UINT32 RawDataOffset; /* Offset to raw error data */ 151 UINT32 RawDataLength; /* Length of raw error data */ 152 UINT32 DataLength; /* Length of generic error data */ 153 UINT32 ErrorSeverity; /* Severity code */ 154 155 } ACPI_BERT_REGION; 156 157 /* Values for BlockStatus flags above */ 158 159 #define ACPI_BERT_UNCORRECTABLE (1) 160 #define ACPI_BERT_CORRECTABLE (1<<1) 161 #define ACPI_BERT_MULTIPLE_UNCORRECTABLE (1<<2) 162 #define ACPI_BERT_MULTIPLE_CORRECTABLE (1<<3) 163 #define ACPI_BERT_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */ 164 165 /* Values for ErrorSeverity above */ 166 167 enum AcpiBertErrorSeverity 168 { 169 ACPI_BERT_ERROR_CORRECTABLE = 0, 170 ACPI_BERT_ERROR_FATAL = 1, 171 ACPI_BERT_ERROR_CORRECTED = 2, 172 ACPI_BERT_ERROR_NONE = 3, 173 ACPI_BERT_ERROR_RESERVED = 4 /* 4 and greater are reserved */ 174 }; 175 176 /* 177 * Note: The generic error data that follows the ErrorSeverity field above 178 * uses the ACPI_HEST_GENERIC_DATA defined under the HEST table below 179 */ 180 181 182 /******************************************************************************* 183 * 184 * CPEP - Corrected Platform Error Polling table (ACPI 4.0) 185 * Version 1 186 * 187 ******************************************************************************/ 188 189 typedef struct acpi_table_cpep 190 { 191 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 192 UINT64 Reserved; 193 194 } ACPI_TABLE_CPEP; 195 196 197 /* Subtable */ 198 199 typedef struct acpi_cpep_polling 200 { 201 ACPI_SUBTABLE_HEADER Header; 202 UINT8 Id; /* Processor ID */ 203 UINT8 Eid; /* Processor EID */ 204 UINT32 Interval; /* Polling interval (msec) */ 205 206 } ACPI_CPEP_POLLING; 207 208 209 /******************************************************************************* 210 * 211 * ECDT - Embedded Controller Boot Resources Table 212 * Version 1 213 * 214 ******************************************************************************/ 215 216 typedef struct acpi_table_ecdt 217 { 218 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 219 ACPI_GENERIC_ADDRESS Control; /* Address of EC command/status register */ 220 ACPI_GENERIC_ADDRESS Data; /* Address of EC data register */ 221 UINT32 Uid; /* Unique ID - must be same as the EC _UID method */ 222 UINT8 Gpe; /* The GPE for the EC */ 223 UINT8 Id[1]; /* Full namepath of the EC in the ACPI namespace */ 224 225 } ACPI_TABLE_ECDT; 226 227 228 /******************************************************************************* 229 * 230 * EINJ - Error Injection Table (ACPI 4.0) 231 * Version 1 232 * 233 ******************************************************************************/ 234 235 typedef struct acpi_table_einj 236 { 237 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 238 UINT32 HeaderLength; 239 UINT8 Flags; 240 UINT8 Reserved[3]; 241 UINT32 Entries; 242 243 } ACPI_TABLE_EINJ; 244 245 246 /* EINJ Injection Instruction Entries (actions) */ 247 248 typedef struct acpi_einj_entry 249 { 250 ACPI_WHEA_HEADER WheaHeader; /* Common header for WHEA tables */ 251 252 } ACPI_EINJ_ENTRY; 253 254 /* Masks for Flags field above */ 255 256 #define ACPI_EINJ_PRESERVE (1) 257 258 /* Values for Action field above */ 259 260 enum AcpiEinjActions 261 { 262 ACPI_EINJ_BEGIN_OPERATION = 0, 263 ACPI_EINJ_GET_TRIGGER_TABLE = 1, 264 ACPI_EINJ_SET_ERROR_TYPE = 2, 265 ACPI_EINJ_GET_ERROR_TYPE = 3, 266 ACPI_EINJ_END_OPERATION = 4, 267 ACPI_EINJ_EXECUTE_OPERATION = 5, 268 ACPI_EINJ_CHECK_BUSY_STATUS = 6, 269 ACPI_EINJ_GET_COMMAND_STATUS = 7, 270 ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 8, 271 ACPI_EINJ_GET_EXECUTE_TIMINGS = 9, 272 ACPI_EINJ_ACTION_RESERVED = 10, /* 10 and greater are reserved */ 273 ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */ 274 }; 275 276 /* Values for Instruction field above */ 277 278 enum AcpiEinjInstructions 279 { 280 ACPI_EINJ_READ_REGISTER = 0, 281 ACPI_EINJ_READ_REGISTER_VALUE = 1, 282 ACPI_EINJ_WRITE_REGISTER = 2, 283 ACPI_EINJ_WRITE_REGISTER_VALUE = 3, 284 ACPI_EINJ_NOOP = 4, 285 ACPI_EINJ_FLUSH_CACHELINE = 5, 286 ACPI_EINJ_INSTRUCTION_RESERVED = 6 /* 6 and greater are reserved */ 287 }; 288 289 typedef struct acpi_einj_error_type_with_addr 290 { 291 UINT32 ErrorType; 292 UINT32 VendorStructOffset; 293 UINT32 Flags; 294 UINT32 ApicId; 295 UINT64 Address; 296 UINT64 Range; 297 UINT32 PcieId; 298 299 } ACPI_EINJ_ERROR_TYPE_WITH_ADDR; 300 301 typedef struct acpi_einj_vendor 302 { 303 UINT32 Length; 304 UINT32 PcieId; 305 UINT16 VendorId; 306 UINT16 DeviceId; 307 UINT8 RevisionId; 308 UINT8 Reserved[3]; 309 310 } ACPI_EINJ_VENDOR; 311 312 313 /* EINJ Trigger Error Action Table */ 314 315 typedef struct acpi_einj_trigger 316 { 317 UINT32 HeaderSize; 318 UINT32 Revision; 319 UINT32 TableSize; 320 UINT32 EntryCount; 321 322 } ACPI_EINJ_TRIGGER; 323 324 /* Command status return values */ 325 326 enum AcpiEinjCommandStatus 327 { 328 ACPI_EINJ_SUCCESS = 0, 329 ACPI_EINJ_FAILURE = 1, 330 ACPI_EINJ_INVALID_ACCESS = 2, 331 ACPI_EINJ_STATUS_RESERVED = 3 /* 3 and greater are reserved */ 332 }; 333 334 335 /* Error types returned from ACPI_EINJ_GET_ERROR_TYPE (bitfield) */ 336 337 #define ACPI_EINJ_PROCESSOR_CORRECTABLE (1) 338 #define ACPI_EINJ_PROCESSOR_UNCORRECTABLE (1<<1) 339 #define ACPI_EINJ_PROCESSOR_FATAL (1<<2) 340 #define ACPI_EINJ_MEMORY_CORRECTABLE (1<<3) 341 #define ACPI_EINJ_MEMORY_UNCORRECTABLE (1<<4) 342 #define ACPI_EINJ_MEMORY_FATAL (1<<5) 343 #define ACPI_EINJ_PCIX_CORRECTABLE (1<<6) 344 #define ACPI_EINJ_PCIX_UNCORRECTABLE (1<<7) 345 #define ACPI_EINJ_PCIX_FATAL (1<<8) 346 #define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9) 347 #define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10) 348 #define ACPI_EINJ_PLATFORM_FATAL (1<<11) 349 #define ACPI_EINJ_VENDOR_DEFINED (1<<31) 350 351 352 /******************************************************************************* 353 * 354 * ERST - Error Record Serialization Table (ACPI 4.0) 355 * Version 1 356 * 357 ******************************************************************************/ 358 359 typedef struct acpi_table_erst 360 { 361 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 362 UINT32 HeaderLength; 363 UINT32 Reserved; 364 UINT32 Entries; 365 366 } ACPI_TABLE_ERST; 367 368 369 /* ERST Serialization Entries (actions) */ 370 371 typedef struct acpi_erst_entry 372 { 373 ACPI_WHEA_HEADER WheaHeader; /* Common header for WHEA tables */ 374 375 } ACPI_ERST_ENTRY; 376 377 /* Masks for Flags field above */ 378 379 #define ACPI_ERST_PRESERVE (1) 380 381 /* Values for Action field above */ 382 383 enum AcpiErstActions 384 { 385 ACPI_ERST_BEGIN_WRITE = 0, 386 ACPI_ERST_BEGIN_READ = 1, 387 ACPI_ERST_BEGIN_CLEAR = 2, 388 ACPI_ERST_END = 3, 389 ACPI_ERST_SET_RECORD_OFFSET = 4, 390 ACPI_ERST_EXECUTE_OPERATION = 5, 391 ACPI_ERST_CHECK_BUSY_STATUS = 6, 392 ACPI_ERST_GET_COMMAND_STATUS = 7, 393 ACPI_ERST_GET_RECORD_ID = 8, 394 ACPI_ERST_SET_RECORD_ID = 9, 395 ACPI_ERST_GET_RECORD_COUNT = 10, 396 ACPI_ERST_BEGIN_DUMMY_WRIITE = 11, 397 ACPI_ERST_NOT_USED = 12, 398 ACPI_ERST_GET_ERROR_RANGE = 13, 399 ACPI_ERST_GET_ERROR_LENGTH = 14, 400 ACPI_ERST_GET_ERROR_ATTRIBUTES = 15, 401 ACPI_ERST_EXECUTE_TIMINGS = 16, 402 ACPI_ERST_ACTION_RESERVED = 17 /* 17 and greater are reserved */ 403 }; 404 405 /* Values for Instruction field above */ 406 407 enum AcpiErstInstructions 408 { 409 ACPI_ERST_READ_REGISTER = 0, 410 ACPI_ERST_READ_REGISTER_VALUE = 1, 411 ACPI_ERST_WRITE_REGISTER = 2, 412 ACPI_ERST_WRITE_REGISTER_VALUE = 3, 413 ACPI_ERST_NOOP = 4, 414 ACPI_ERST_LOAD_VAR1 = 5, 415 ACPI_ERST_LOAD_VAR2 = 6, 416 ACPI_ERST_STORE_VAR1 = 7, 417 ACPI_ERST_ADD = 8, 418 ACPI_ERST_SUBTRACT = 9, 419 ACPI_ERST_ADD_VALUE = 10, 420 ACPI_ERST_SUBTRACT_VALUE = 11, 421 ACPI_ERST_STALL = 12, 422 ACPI_ERST_STALL_WHILE_TRUE = 13, 423 ACPI_ERST_SKIP_NEXT_IF_TRUE = 14, 424 ACPI_ERST_GOTO = 15, 425 ACPI_ERST_SET_SRC_ADDRESS_BASE = 16, 426 ACPI_ERST_SET_DST_ADDRESS_BASE = 17, 427 ACPI_ERST_MOVE_DATA = 18, 428 ACPI_ERST_INSTRUCTION_RESERVED = 19 /* 19 and greater are reserved */ 429 }; 430 431 /* Command status return values */ 432 433 enum AcpiErstCommandStatus 434 { 435 ACPI_ERST_SUCESS = 0, 436 ACPI_ERST_NO_SPACE = 1, 437 ACPI_ERST_NOT_AVAILABLE = 2, 438 ACPI_ERST_FAILURE = 3, 439 ACPI_ERST_RECORD_EMPTY = 4, 440 ACPI_ERST_NOT_FOUND = 5, 441 ACPI_ERST_STATUS_RESERVED = 6 /* 6 and greater are reserved */ 442 }; 443 444 445 /* Error Record Serialization Information */ 446 447 typedef struct acpi_erst_info 448 { 449 UINT16 Signature; /* Should be "ER" */ 450 UINT8 Data[48]; 451 452 } ACPI_ERST_INFO; 453 454 455 /******************************************************************************* 456 * 457 * HEST - Hardware Error Source Table (ACPI 4.0) 458 * Version 1 459 * 460 ******************************************************************************/ 461 462 typedef struct acpi_table_hest 463 { 464 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 465 UINT32 ErrorSourceCount; 466 467 } ACPI_TABLE_HEST; 468 469 470 /* HEST subtable header */ 471 472 typedef struct acpi_hest_header 473 { 474 UINT16 Type; 475 UINT16 SourceId; 476 477 } ACPI_HEST_HEADER; 478 479 480 /* Values for Type field above for subtables */ 481 482 enum AcpiHestTypes 483 { 484 ACPI_HEST_TYPE_IA32_CHECK = 0, 485 ACPI_HEST_TYPE_IA32_CORRECTED_CHECK = 1, 486 ACPI_HEST_TYPE_IA32_NMI = 2, 487 ACPI_HEST_TYPE_NOT_USED3 = 3, 488 ACPI_HEST_TYPE_NOT_USED4 = 4, 489 ACPI_HEST_TYPE_NOT_USED5 = 5, 490 ACPI_HEST_TYPE_AER_ROOT_PORT = 6, 491 ACPI_HEST_TYPE_AER_ENDPOINT = 7, 492 ACPI_HEST_TYPE_AER_BRIDGE = 8, 493 ACPI_HEST_TYPE_GENERIC_ERROR = 9, 494 ACPI_HEST_TYPE_GENERIC_ERROR_V2 = 10, 495 ACPI_HEST_TYPE_RESERVED = 11 /* 11 and greater are reserved */ 496 }; 497 498 499 /* 500 * HEST substructures contained in subtables 501 */ 502 503 /* 504 * IA32 Error Bank(s) - Follows the ACPI_HEST_IA_MACHINE_CHECK and 505 * ACPI_HEST_IA_CORRECTED structures. 506 */ 507 typedef struct acpi_hest_ia_error_bank 508 { 509 UINT8 BankNumber; 510 UINT8 ClearStatusOnInit; 511 UINT8 StatusFormat; 512 UINT8 Reserved; 513 UINT32 ControlRegister; 514 UINT64 ControlData; 515 UINT32 StatusRegister; 516 UINT32 AddressRegister; 517 UINT32 MiscRegister; 518 519 } ACPI_HEST_IA_ERROR_BANK; 520 521 522 /* Common HEST sub-structure for PCI/AER structures below (6,7,8) */ 523 524 typedef struct acpi_hest_aer_common 525 { 526 UINT16 Reserved1; 527 UINT8 Flags; 528 UINT8 Enabled; 529 UINT32 RecordsToPreallocate; 530 UINT32 MaxSectionsPerRecord; 531 UINT32 Bus; /* Bus and Segment numbers */ 532 UINT16 Device; 533 UINT16 Function; 534 UINT16 DeviceControl; 535 UINT16 Reserved2; 536 UINT32 UncorrectableMask; 537 UINT32 UncorrectableSeverity; 538 UINT32 CorrectableMask; 539 UINT32 AdvancedCapabilities; 540 541 } ACPI_HEST_AER_COMMON; 542 543 /* Masks for HEST Flags fields */ 544 545 #define ACPI_HEST_FIRMWARE_FIRST (1) 546 #define ACPI_HEST_GLOBAL (1<<1) 547 548 /* 549 * Macros to access the bus/segment numbers in Bus field above: 550 * Bus number is encoded in bits 7:0 551 * Segment number is encoded in bits 23:8 552 */ 553 #define ACPI_HEST_BUS(Bus) ((Bus) & 0xFF) 554 #define ACPI_HEST_SEGMENT(Bus) (((Bus) >> 8) & 0xFFFF) 555 556 557 /* Hardware Error Notification */ 558 559 typedef struct acpi_hest_notify 560 { 561 UINT8 Type; 562 UINT8 Length; 563 UINT16 ConfigWriteEnable; 564 UINT32 PollInterval; 565 UINT32 Vector; 566 UINT32 PollingThresholdValue; 567 UINT32 PollingThresholdWindow; 568 UINT32 ErrorThresholdValue; 569 UINT32 ErrorThresholdWindow; 570 571 } ACPI_HEST_NOTIFY; 572 573 /* Values for Notify Type field above */ 574 575 enum AcpiHestNotifyTypes 576 { 577 ACPI_HEST_NOTIFY_POLLED = 0, 578 ACPI_HEST_NOTIFY_EXTERNAL = 1, 579 ACPI_HEST_NOTIFY_LOCAL = 2, 580 ACPI_HEST_NOTIFY_SCI = 3, 581 ACPI_HEST_NOTIFY_NMI = 4, 582 ACPI_HEST_NOTIFY_CMCI = 5, /* ACPI 5.0 */ 583 ACPI_HEST_NOTIFY_MCE = 6, /* ACPI 5.0 */ 584 ACPI_HEST_NOTIFY_GPIO = 7, /* ACPI 6.0 */ 585 ACPI_HEST_NOTIFY_SEA = 8, /* ACPI 6.1 */ 586 ACPI_HEST_NOTIFY_SEI = 9, /* ACPI 6.1 */ 587 ACPI_HEST_NOTIFY_GSIV = 10, /* ACPI 6.1 */ 588 ACPI_HEST_NOTIFY_RESERVED = 11 /* 11 and greater are reserved */ 589 }; 590 591 /* Values for ConfigWriteEnable bitfield above */ 592 593 #define ACPI_HEST_TYPE (1) 594 #define ACPI_HEST_POLL_INTERVAL (1<<1) 595 #define ACPI_HEST_POLL_THRESHOLD_VALUE (1<<2) 596 #define ACPI_HEST_POLL_THRESHOLD_WINDOW (1<<3) 597 #define ACPI_HEST_ERR_THRESHOLD_VALUE (1<<4) 598 #define ACPI_HEST_ERR_THRESHOLD_WINDOW (1<<5) 599 600 601 /* 602 * HEST subtables 603 */ 604 605 /* 0: IA32 Machine Check Exception */ 606 607 typedef struct acpi_hest_ia_machine_check 608 { 609 ACPI_HEST_HEADER Header; 610 UINT16 Reserved1; 611 UINT8 Flags; 612 UINT8 Enabled; 613 UINT32 RecordsToPreallocate; 614 UINT32 MaxSectionsPerRecord; 615 UINT64 GlobalCapabilityData; 616 UINT64 GlobalControlData; 617 UINT8 NumHardwareBanks; 618 UINT8 Reserved3[7]; 619 620 } ACPI_HEST_IA_MACHINE_CHECK; 621 622 623 /* 1: IA32 Corrected Machine Check */ 624 625 typedef struct acpi_hest_ia_corrected 626 { 627 ACPI_HEST_HEADER Header; 628 UINT16 Reserved1; 629 UINT8 Flags; 630 UINT8 Enabled; 631 UINT32 RecordsToPreallocate; 632 UINT32 MaxSectionsPerRecord; 633 ACPI_HEST_NOTIFY Notify; 634 UINT8 NumHardwareBanks; 635 UINT8 Reserved2[3]; 636 637 } ACPI_HEST_IA_CORRECTED; 638 639 640 /* 2: IA32 Non-Maskable Interrupt */ 641 642 typedef struct acpi_hest_ia_nmi 643 { 644 ACPI_HEST_HEADER Header; 645 UINT32 Reserved; 646 UINT32 RecordsToPreallocate; 647 UINT32 MaxSectionsPerRecord; 648 UINT32 MaxRawDataLength; 649 650 } ACPI_HEST_IA_NMI; 651 652 653 /* 3,4,5: Not used */ 654 655 /* 6: PCI Express Root Port AER */ 656 657 typedef struct acpi_hest_aer_root 658 { 659 ACPI_HEST_HEADER Header; 660 ACPI_HEST_AER_COMMON Aer; 661 UINT32 RootErrorCommand; 662 663 } ACPI_HEST_AER_ROOT; 664 665 666 /* 7: PCI Express AER (AER Endpoint) */ 667 668 typedef struct acpi_hest_aer 669 { 670 ACPI_HEST_HEADER Header; 671 ACPI_HEST_AER_COMMON Aer; 672 673 } ACPI_HEST_AER; 674 675 676 /* 8: PCI Express/PCI-X Bridge AER */ 677 678 typedef struct acpi_hest_aer_bridge 679 { 680 ACPI_HEST_HEADER Header; 681 ACPI_HEST_AER_COMMON Aer; 682 UINT32 UncorrectableMask2; 683 UINT32 UncorrectableSeverity2; 684 UINT32 AdvancedCapabilities2; 685 686 } ACPI_HEST_AER_BRIDGE; 687 688 689 /* 9: Generic Hardware Error Source */ 690 691 typedef struct acpi_hest_generic 692 { 693 ACPI_HEST_HEADER Header; 694 UINT16 RelatedSourceId; 695 UINT8 Reserved; 696 UINT8 Enabled; 697 UINT32 RecordsToPreallocate; 698 UINT32 MaxSectionsPerRecord; 699 UINT32 MaxRawDataLength; 700 ACPI_GENERIC_ADDRESS ErrorStatusAddress; 701 ACPI_HEST_NOTIFY Notify; 702 UINT32 ErrorBlockLength; 703 704 } ACPI_HEST_GENERIC; 705 706 707 /* 10: Generic Hardware Error Source, version 2 */ 708 709 typedef struct acpi_hest_generic_v2 710 { 711 ACPI_HEST_HEADER Header; 712 UINT16 RelatedSourceId; 713 UINT8 Reserved; 714 UINT8 Enabled; 715 UINT32 RecordsToPreallocate; 716 UINT32 MaxSectionsPerRecord; 717 UINT32 MaxRawDataLength; 718 ACPI_GENERIC_ADDRESS ErrorStatusAddress; 719 ACPI_HEST_NOTIFY Notify; 720 UINT32 ErrorBlockLength; 721 ACPI_GENERIC_ADDRESS ReadAckRegister; 722 UINT64 ReadAckPreserve; 723 UINT64 ReadAckWrite; 724 725 } ACPI_HEST_GENERIC_V2; 726 727 728 /* Generic Error Status block */ 729 730 typedef struct acpi_hest_generic_status 731 { 732 UINT32 BlockStatus; 733 UINT32 RawDataOffset; 734 UINT32 RawDataLength; 735 UINT32 DataLength; 736 UINT32 ErrorSeverity; 737 738 } ACPI_HEST_GENERIC_STATUS; 739 740 /* Values for BlockStatus flags above */ 741 742 #define ACPI_HEST_UNCORRECTABLE (1) 743 #define ACPI_HEST_CORRECTABLE (1<<1) 744 #define ACPI_HEST_MULTIPLE_UNCORRECTABLE (1<<2) 745 #define ACPI_HEST_MULTIPLE_CORRECTABLE (1<<3) 746 #define ACPI_HEST_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */ 747 748 749 /* Generic Error Data entry */ 750 751 typedef struct acpi_hest_generic_data 752 { 753 UINT8 SectionType[16]; 754 UINT32 ErrorSeverity; 755 UINT16 Revision; 756 UINT8 ValidationBits; 757 UINT8 Flags; 758 UINT32 ErrorDataLength; 759 UINT8 FruId[16]; 760 UINT8 FruText[20]; 761 762 } ACPI_HEST_GENERIC_DATA; 763 764 /* Extension for revision 0x0300 */ 765 766 typedef struct acpi_hest_generic_data_v300 767 { 768 UINT8 SectionType[16]; 769 UINT32 ErrorSeverity; 770 UINT16 Revision; 771 UINT8 ValidationBits; 772 UINT8 Flags; 773 UINT32 ErrorDataLength; 774 UINT8 FruId[16]; 775 UINT8 FruText[20]; 776 UINT64 TimeStamp; 777 778 } ACPI_HEST_GENERIC_DATA_V300; 779 780 /* Values for ErrorSeverity above */ 781 782 #define ACPI_HEST_GEN_ERROR_RECOVERABLE 0 783 #define ACPI_HEST_GEN_ERROR_FATAL 1 784 #define ACPI_HEST_GEN_ERROR_CORRECTED 2 785 #define ACPI_HEST_GEN_ERROR_NONE 3 786 787 /* Flags for ValidationBits above */ 788 789 #define ACPI_HEST_GEN_VALID_FRU_ID (1) 790 #define ACPI_HEST_GEN_VALID_FRU_STRING (1<<1) 791 #define ACPI_HEST_GEN_VALID_TIMESTAMP (1<<2) 792 793 794 /******************************************************************************* 795 * 796 * MADT - Multiple APIC Description Table 797 * Version 3 798 * 799 ******************************************************************************/ 800 801 typedef struct acpi_table_madt 802 { 803 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 804 UINT32 Address; /* Physical address of local APIC */ 805 UINT32 Flags; 806 807 } ACPI_TABLE_MADT; 808 809 /* Masks for Flags field above */ 810 811 #define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */ 812 813 /* Values for PCATCompat flag */ 814 815 #define ACPI_MADT_DUAL_PIC 0 816 #define ACPI_MADT_MULTIPLE_APIC 1 817 818 819 /* Values for MADT subtable type in ACPI_SUBTABLE_HEADER */ 820 821 enum AcpiMadtType 822 { 823 ACPI_MADT_TYPE_LOCAL_APIC = 0, 824 ACPI_MADT_TYPE_IO_APIC = 1, 825 ACPI_MADT_TYPE_INTERRUPT_OVERRIDE = 2, 826 ACPI_MADT_TYPE_NMI_SOURCE = 3, 827 ACPI_MADT_TYPE_LOCAL_APIC_NMI = 4, 828 ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE = 5, 829 ACPI_MADT_TYPE_IO_SAPIC = 6, 830 ACPI_MADT_TYPE_LOCAL_SAPIC = 7, 831 ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8, 832 ACPI_MADT_TYPE_LOCAL_X2APIC = 9, 833 ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10, 834 ACPI_MADT_TYPE_GENERIC_INTERRUPT = 11, 835 ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR = 12, 836 ACPI_MADT_TYPE_GENERIC_MSI_FRAME = 13, 837 ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR = 14, 838 ACPI_MADT_TYPE_GENERIC_TRANSLATOR = 15, 839 ACPI_MADT_TYPE_RESERVED = 16 /* 16 and greater are reserved */ 840 }; 841 842 843 /* 844 * MADT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER 845 */ 846 847 /* 0: Processor Local APIC */ 848 849 typedef struct acpi_madt_local_apic 850 { 851 ACPI_SUBTABLE_HEADER Header; 852 UINT8 ProcessorId; /* ACPI processor id */ 853 UINT8 Id; /* Processor's local APIC id */ 854 UINT32 LapicFlags; 855 856 } ACPI_MADT_LOCAL_APIC; 857 858 859 /* 1: IO APIC */ 860 861 typedef struct acpi_madt_io_apic 862 { 863 ACPI_SUBTABLE_HEADER Header; 864 UINT8 Id; /* I/O APIC ID */ 865 UINT8 Reserved; /* Reserved - must be zero */ 866 UINT32 Address; /* APIC physical address */ 867 UINT32 GlobalIrqBase; /* Global system interrupt where INTI lines start */ 868 869 } ACPI_MADT_IO_APIC; 870 871 872 /* 2: Interrupt Override */ 873 874 typedef struct acpi_madt_interrupt_override 875 { 876 ACPI_SUBTABLE_HEADER Header; 877 UINT8 Bus; /* 0 - ISA */ 878 UINT8 SourceIrq; /* Interrupt source (IRQ) */ 879 UINT32 GlobalIrq; /* Global system interrupt */ 880 UINT16 IntiFlags; 881 882 } ACPI_MADT_INTERRUPT_OVERRIDE; 883 884 885 /* 3: NMI Source */ 886 887 typedef struct acpi_madt_nmi_source 888 { 889 ACPI_SUBTABLE_HEADER Header; 890 UINT16 IntiFlags; 891 UINT32 GlobalIrq; /* Global system interrupt */ 892 893 } ACPI_MADT_NMI_SOURCE; 894 895 896 /* 4: Local APIC NMI */ 897 898 typedef struct acpi_madt_local_apic_nmi 899 { 900 ACPI_SUBTABLE_HEADER Header; 901 UINT8 ProcessorId; /* ACPI processor id */ 902 UINT16 IntiFlags; 903 UINT8 Lint; /* LINTn to which NMI is connected */ 904 905 } ACPI_MADT_LOCAL_APIC_NMI; 906 907 908 /* 5: Address Override */ 909 910 typedef struct acpi_madt_local_apic_override 911 { 912 ACPI_SUBTABLE_HEADER Header; 913 UINT16 Reserved; /* Reserved, must be zero */ 914 UINT64 Address; /* APIC physical address */ 915 916 } ACPI_MADT_LOCAL_APIC_OVERRIDE; 917 918 919 /* 6: I/O Sapic */ 920 921 typedef struct acpi_madt_io_sapic 922 { 923 ACPI_SUBTABLE_HEADER Header; 924 UINT8 Id; /* I/O SAPIC ID */ 925 UINT8 Reserved; /* Reserved, must be zero */ 926 UINT32 GlobalIrqBase; /* Global interrupt for SAPIC start */ 927 UINT64 Address; /* SAPIC physical address */ 928 929 } ACPI_MADT_IO_SAPIC; 930 931 932 /* 7: Local Sapic */ 933 934 typedef struct acpi_madt_local_sapic 935 { 936 ACPI_SUBTABLE_HEADER Header; 937 UINT8 ProcessorId; /* ACPI processor id */ 938 UINT8 Id; /* SAPIC ID */ 939 UINT8 Eid; /* SAPIC EID */ 940 UINT8 Reserved[3]; /* Reserved, must be zero */ 941 UINT32 LapicFlags; 942 UINT32 Uid; /* Numeric UID - ACPI 3.0 */ 943 char UidString[1]; /* String UID - ACPI 3.0 */ 944 945 } ACPI_MADT_LOCAL_SAPIC; 946 947 948 /* 8: Platform Interrupt Source */ 949 950 typedef struct acpi_madt_interrupt_source 951 { 952 ACPI_SUBTABLE_HEADER Header; 953 UINT16 IntiFlags; 954 UINT8 Type; /* 1=PMI, 2=INIT, 3=corrected */ 955 UINT8 Id; /* Processor ID */ 956 UINT8 Eid; /* Processor EID */ 957 UINT8 IoSapicVector; /* Vector value for PMI interrupts */ 958 UINT32 GlobalIrq; /* Global system interrupt */ 959 UINT32 Flags; /* Interrupt Source Flags */ 960 961 } ACPI_MADT_INTERRUPT_SOURCE; 962 963 /* Masks for Flags field above */ 964 965 #define ACPI_MADT_CPEI_OVERRIDE (1) 966 967 968 /* 9: Processor Local X2APIC (ACPI 4.0) */ 969 970 typedef struct acpi_madt_local_x2apic 971 { 972 ACPI_SUBTABLE_HEADER Header; 973 UINT16 Reserved; /* Reserved - must be zero */ 974 UINT32 LocalApicId; /* Processor x2APIC ID */ 975 UINT32 LapicFlags; 976 UINT32 Uid; /* ACPI processor UID */ 977 978 } ACPI_MADT_LOCAL_X2APIC; 979 980 981 /* 10: Local X2APIC NMI (ACPI 4.0) */ 982 983 typedef struct acpi_madt_local_x2apic_nmi 984 { 985 ACPI_SUBTABLE_HEADER Header; 986 UINT16 IntiFlags; 987 UINT32 Uid; /* ACPI processor UID */ 988 UINT8 Lint; /* LINTn to which NMI is connected */ 989 UINT8 Reserved[3]; /* Reserved - must be zero */ 990 991 } ACPI_MADT_LOCAL_X2APIC_NMI; 992 993 994 /* 11: Generic Interrupt (ACPI 5.0 + ACPI 6.0 changes) */ 995 996 typedef struct acpi_madt_generic_interrupt 997 { 998 ACPI_SUBTABLE_HEADER Header; 999 UINT16 Reserved; /* Reserved - must be zero */ 1000 UINT32 CpuInterfaceNumber; 1001 UINT32 Uid; 1002 UINT32 Flags; 1003 UINT32 ParkingVersion; 1004 UINT32 PerformanceInterrupt; 1005 UINT64 ParkedAddress; 1006 UINT64 BaseAddress; 1007 UINT64 GicvBaseAddress; 1008 UINT64 GichBaseAddress; 1009 UINT32 VgicInterrupt; 1010 UINT64 GicrBaseAddress; 1011 UINT64 ArmMpidr; 1012 UINT8 EfficiencyClass; 1013 UINT8 Reserved2[3]; 1014 1015 } ACPI_MADT_GENERIC_INTERRUPT; 1016 1017 /* Masks for Flags field above */ 1018 1019 /* ACPI_MADT_ENABLED (1) Processor is usable if set */ 1020 #define ACPI_MADT_PERFORMANCE_IRQ_MODE (1<<1) /* 01: Performance Interrupt Mode */ 1021 #define ACPI_MADT_VGIC_IRQ_MODE (1<<2) /* 02: VGIC Maintenance Interrupt mode */ 1022 1023 1024 /* 12: Generic Distributor (ACPI 5.0 + ACPI 6.0 changes) */ 1025 1026 typedef struct acpi_madt_generic_distributor 1027 { 1028 ACPI_SUBTABLE_HEADER Header; 1029 UINT16 Reserved; /* Reserved - must be zero */ 1030 UINT32 GicId; 1031 UINT64 BaseAddress; 1032 UINT32 GlobalIrqBase; 1033 UINT8 Version; 1034 UINT8 Reserved2[3]; /* Reserved - must be zero */ 1035 1036 } ACPI_MADT_GENERIC_DISTRIBUTOR; 1037 1038 /* Values for Version field above */ 1039 1040 enum AcpiMadtGicVersion 1041 { 1042 ACPI_MADT_GIC_VERSION_NONE = 0, 1043 ACPI_MADT_GIC_VERSION_V1 = 1, 1044 ACPI_MADT_GIC_VERSION_V2 = 2, 1045 ACPI_MADT_GIC_VERSION_V3 = 3, 1046 ACPI_MADT_GIC_VERSION_V4 = 4, 1047 ACPI_MADT_GIC_VERSION_RESERVED = 5 /* 5 and greater are reserved */ 1048 }; 1049 1050 1051 /* 13: Generic MSI Frame (ACPI 5.1) */ 1052 1053 typedef struct acpi_madt_generic_msi_frame 1054 { 1055 ACPI_SUBTABLE_HEADER Header; 1056 UINT16 Reserved; /* Reserved - must be zero */ 1057 UINT32 MsiFrameId; 1058 UINT64 BaseAddress; 1059 UINT32 Flags; 1060 UINT16 SpiCount; 1061 UINT16 SpiBase; 1062 1063 } ACPI_MADT_GENERIC_MSI_FRAME; 1064 1065 /* Masks for Flags field above */ 1066 1067 #define ACPI_MADT_OVERRIDE_SPI_VALUES (1) 1068 1069 1070 /* 14: Generic Redistributor (ACPI 5.1) */ 1071 1072 typedef struct acpi_madt_generic_redistributor 1073 { 1074 ACPI_SUBTABLE_HEADER Header; 1075 UINT16 Reserved; /* reserved - must be zero */ 1076 UINT64 BaseAddress; 1077 UINT32 Length; 1078 1079 } ACPI_MADT_GENERIC_REDISTRIBUTOR; 1080 1081 1082 /* 15: Generic Translator (ACPI 6.0) */ 1083 1084 typedef struct acpi_madt_generic_translator 1085 { 1086 ACPI_SUBTABLE_HEADER Header; 1087 UINT16 Reserved; /* reserved - must be zero */ 1088 UINT32 TranslationId; 1089 UINT64 BaseAddress; 1090 UINT32 Reserved2; 1091 1092 } ACPI_MADT_GENERIC_TRANSLATOR; 1093 1094 1095 /* 1096 * Common flags fields for MADT subtables 1097 */ 1098 1099 /* MADT Local APIC flags */ 1100 1101 #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */ 1102 1103 /* MADT MPS INTI flags (IntiFlags) */ 1104 1105 #define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */ 1106 #define ACPI_MADT_TRIGGER_MASK (3<<2) /* 02-03: Trigger mode of APIC input signals */ 1107 1108 /* Values for MPS INTI flags */ 1109 1110 #define ACPI_MADT_POLARITY_CONFORMS 0 1111 #define ACPI_MADT_POLARITY_ACTIVE_HIGH 1 1112 #define ACPI_MADT_POLARITY_RESERVED 2 1113 #define ACPI_MADT_POLARITY_ACTIVE_LOW 3 1114 1115 #define ACPI_MADT_TRIGGER_CONFORMS (0) 1116 #define ACPI_MADT_TRIGGER_EDGE (1<<2) 1117 #define ACPI_MADT_TRIGGER_RESERVED (2<<2) 1118 #define ACPI_MADT_TRIGGER_LEVEL (3<<2) 1119 1120 1121 /******************************************************************************* 1122 * 1123 * MSCT - Maximum System Characteristics Table (ACPI 4.0) 1124 * Version 1 1125 * 1126 ******************************************************************************/ 1127 1128 typedef struct acpi_table_msct 1129 { 1130 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1131 UINT32 ProximityOffset; /* Location of proximity info struct(s) */ 1132 UINT32 MaxProximityDomains;/* Max number of proximity domains */ 1133 UINT32 MaxClockDomains; /* Max number of clock domains */ 1134 UINT64 MaxAddress; /* Max physical address in system */ 1135 1136 } ACPI_TABLE_MSCT; 1137 1138 1139 /* Subtable - Maximum Proximity Domain Information. Version 1 */ 1140 1141 typedef struct acpi_msct_proximity 1142 { 1143 UINT8 Revision; 1144 UINT8 Length; 1145 UINT32 RangeStart; /* Start of domain range */ 1146 UINT32 RangeEnd; /* End of domain range */ 1147 UINT32 ProcessorCapacity; 1148 UINT64 MemoryCapacity; /* In bytes */ 1149 1150 } ACPI_MSCT_PROXIMITY; 1151 1152 1153 /******************************************************************************* 1154 * 1155 * NFIT - NVDIMM Interface Table (ACPI 6.0+) 1156 * Version 1 1157 * 1158 ******************************************************************************/ 1159 1160 typedef struct acpi_table_nfit 1161 { 1162 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1163 UINT32 Reserved; /* Reserved, must be zero */ 1164 1165 } ACPI_TABLE_NFIT; 1166 1167 /* Subtable header for NFIT */ 1168 1169 typedef struct acpi_nfit_header 1170 { 1171 UINT16 Type; 1172 UINT16 Length; 1173 1174 } ACPI_NFIT_HEADER; 1175 1176 1177 /* Values for subtable type in ACPI_NFIT_HEADER */ 1178 1179 enum AcpiNfitType 1180 { 1181 ACPI_NFIT_TYPE_SYSTEM_ADDRESS = 0, 1182 ACPI_NFIT_TYPE_MEMORY_MAP = 1, 1183 ACPI_NFIT_TYPE_INTERLEAVE = 2, 1184 ACPI_NFIT_TYPE_SMBIOS = 3, 1185 ACPI_NFIT_TYPE_CONTROL_REGION = 4, 1186 ACPI_NFIT_TYPE_DATA_REGION = 5, 1187 ACPI_NFIT_TYPE_FLUSH_ADDRESS = 6, 1188 ACPI_NFIT_TYPE_RESERVED = 7 /* 7 and greater are reserved */ 1189 }; 1190 1191 /* 1192 * NFIT Subtables 1193 */ 1194 1195 /* 0: System Physical Address Range Structure */ 1196 1197 typedef struct acpi_nfit_system_address 1198 { 1199 ACPI_NFIT_HEADER Header; 1200 UINT16 RangeIndex; 1201 UINT16 Flags; 1202 UINT32 Reserved; /* Reseved, must be zero */ 1203 UINT32 ProximityDomain; 1204 UINT8 RangeGuid[16]; 1205 UINT64 Address; 1206 UINT64 Length; 1207 UINT64 MemoryMapping; 1208 1209 } ACPI_NFIT_SYSTEM_ADDRESS; 1210 1211 /* Flags */ 1212 1213 #define ACPI_NFIT_ADD_ONLINE_ONLY (1) /* 00: Add/Online Operation Only */ 1214 #define ACPI_NFIT_PROXIMITY_VALID (1<<1) /* 01: Proximity Domain Valid */ 1215 1216 /* Range Type GUIDs appear in the include/acuuid.h file */ 1217 1218 1219 /* 1: Memory Device to System Address Range Map Structure */ 1220 1221 typedef struct acpi_nfit_memory_map 1222 { 1223 ACPI_NFIT_HEADER Header; 1224 UINT32 DeviceHandle; 1225 UINT16 PhysicalId; 1226 UINT16 RegionId; 1227 UINT16 RangeIndex; 1228 UINT16 RegionIndex; 1229 UINT64 RegionSize; 1230 UINT64 RegionOffset; 1231 UINT64 Address; 1232 UINT16 InterleaveIndex; 1233 UINT16 InterleaveWays; 1234 UINT16 Flags; 1235 UINT16 Reserved; /* Reserved, must be zero */ 1236 1237 } ACPI_NFIT_MEMORY_MAP; 1238 1239 /* Flags */ 1240 1241 #define ACPI_NFIT_MEM_SAVE_FAILED (1) /* 00: Last SAVE to Memory Device failed */ 1242 #define ACPI_NFIT_MEM_RESTORE_FAILED (1<<1) /* 01: Last RESTORE from Memory Device failed */ 1243 #define ACPI_NFIT_MEM_FLUSH_FAILED (1<<2) /* 02: Platform flush failed */ 1244 #define ACPI_NFIT_MEM_NOT_ARMED (1<<3) /* 03: Memory Device is not armed */ 1245 #define ACPI_NFIT_MEM_HEALTH_OBSERVED (1<<4) /* 04: Memory Device observed SMART/health events */ 1246 #define ACPI_NFIT_MEM_HEALTH_ENABLED (1<<5) /* 05: SMART/health events enabled */ 1247 #define ACPI_NFIT_MEM_MAP_FAILED (1<<6) /* 06: Mapping to SPA failed */ 1248 1249 1250 /* 2: Interleave Structure */ 1251 1252 typedef struct acpi_nfit_interleave 1253 { 1254 ACPI_NFIT_HEADER Header; 1255 UINT16 InterleaveIndex; 1256 UINT16 Reserved; /* Reserved, must be zero */ 1257 UINT32 LineCount; 1258 UINT32 LineSize; 1259 UINT32 LineOffset[1]; /* Variable length */ 1260 1261 } ACPI_NFIT_INTERLEAVE; 1262 1263 1264 /* 3: SMBIOS Management Information Structure */ 1265 1266 typedef struct acpi_nfit_smbios 1267 { 1268 ACPI_NFIT_HEADER Header; 1269 UINT32 Reserved; /* Reserved, must be zero */ 1270 UINT8 Data[1]; /* Variable length */ 1271 1272 } ACPI_NFIT_SMBIOS; 1273 1274 1275 /* 4: NVDIMM Control Region Structure */ 1276 1277 typedef struct acpi_nfit_control_region 1278 { 1279 ACPI_NFIT_HEADER Header; 1280 UINT16 RegionIndex; 1281 UINT16 VendorId; 1282 UINT16 DeviceId; 1283 UINT16 RevisionId; 1284 UINT16 SubsystemVendorId; 1285 UINT16 SubsystemDeviceId; 1286 UINT16 SubsystemRevisionId; 1287 UINT8 ValidFields; 1288 UINT8 ManufacturingLocation; 1289 UINT16 ManufacturingDate; 1290 UINT8 Reserved[2]; /* Reserved, must be zero */ 1291 UINT32 SerialNumber; 1292 UINT16 Code; 1293 UINT16 Windows; 1294 UINT64 WindowSize; 1295 UINT64 CommandOffset; 1296 UINT64 CommandSize; 1297 UINT64 StatusOffset; 1298 UINT64 StatusSize; 1299 UINT16 Flags; 1300 UINT8 Reserved1[6]; /* Reserved, must be zero */ 1301 1302 } ACPI_NFIT_CONTROL_REGION; 1303 1304 /* Flags */ 1305 1306 #define ACPI_NFIT_CONTROL_BUFFERED (1) /* Block Data Windows implementation is buffered */ 1307 1308 /* ValidFields bits */ 1309 1310 #define ACPI_NFIT_CONTROL_MFG_INFO_VALID (1) /* Manufacturing fields are valid */ 1311 1312 1313 /* 5: NVDIMM Block Data Window Region Structure */ 1314 1315 typedef struct acpi_nfit_data_region 1316 { 1317 ACPI_NFIT_HEADER Header; 1318 UINT16 RegionIndex; 1319 UINT16 Windows; 1320 UINT64 Offset; 1321 UINT64 Size; 1322 UINT64 Capacity; 1323 UINT64 StartAddress; 1324 1325 } ACPI_NFIT_DATA_REGION; 1326 1327 1328 /* 6: Flush Hint Address Structure */ 1329 1330 typedef struct acpi_nfit_flush_address 1331 { 1332 ACPI_NFIT_HEADER Header; 1333 UINT32 DeviceHandle; 1334 UINT16 HintCount; 1335 UINT8 Reserved[6]; /* Reserved, must be zero */ 1336 UINT64 HintAddress[1]; /* Variable length */ 1337 1338 } ACPI_NFIT_FLUSH_ADDRESS; 1339 1340 1341 /******************************************************************************* 1342 * 1343 * SBST - Smart Battery Specification Table 1344 * Version 1 1345 * 1346 ******************************************************************************/ 1347 1348 typedef struct acpi_table_sbst 1349 { 1350 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1351 UINT32 WarningLevel; 1352 UINT32 LowLevel; 1353 UINT32 CriticalLevel; 1354 1355 } ACPI_TABLE_SBST; 1356 1357 1358 /******************************************************************************* 1359 * 1360 * SLIT - System Locality Distance Information Table 1361 * Version 1 1362 * 1363 ******************************************************************************/ 1364 1365 typedef struct acpi_table_slit 1366 { 1367 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1368 UINT64 LocalityCount; 1369 UINT8 Entry[1]; /* Real size = localities^2 */ 1370 1371 } ACPI_TABLE_SLIT; 1372 1373 1374 /******************************************************************************* 1375 * 1376 * SRAT - System Resource Affinity Table 1377 * Version 3 1378 * 1379 ******************************************************************************/ 1380 1381 typedef struct acpi_table_srat 1382 { 1383 ACPI_TABLE_HEADER Header; /* Common ACPI table header */ 1384 UINT32 TableRevision; /* Must be value '1' */ 1385 UINT64 Reserved; /* Reserved, must be zero */ 1386 1387 } ACPI_TABLE_SRAT; 1388 1389 /* Values for subtable type in ACPI_SUBTABLE_HEADER */ 1390 1391 enum AcpiSratType 1392 { 1393 ACPI_SRAT_TYPE_CPU_AFFINITY = 0, 1394 ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1, 1395 ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2, 1396 ACPI_SRAT_TYPE_GICC_AFFINITY = 3, 1397 ACPI_SRAT_TYPE_RESERVED = 4 /* 4 and greater are reserved */ 1398 }; 1399 1400 /* 1401 * SRAT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER 1402 */ 1403 1404 /* 0: Processor Local APIC/SAPIC Affinity */ 1405 1406 typedef struct acpi_srat_cpu_affinity 1407 { 1408 ACPI_SUBTABLE_HEADER Header; 1409 UINT8 ProximityDomainLo; 1410 UINT8 ApicId; 1411 UINT32 Flags; 1412 UINT8 LocalSapicEid; 1413 UINT8 ProximityDomainHi[3]; 1414 UINT32 ClockDomain; 1415 1416 } ACPI_SRAT_CPU_AFFINITY; 1417 1418 /* Flags */ 1419 1420 #define ACPI_SRAT_CPU_USE_AFFINITY (1) /* 00: Use affinity structure */ 1421 1422 1423 /* 1: Memory Affinity */ 1424 1425 typedef struct acpi_srat_mem_affinity 1426 { 1427 ACPI_SUBTABLE_HEADER Header; 1428 UINT32 ProximityDomain; 1429 UINT16 Reserved; /* Reserved, must be zero */ 1430 UINT64 BaseAddress; 1431 UINT64 Length; 1432 UINT32 Reserved1; 1433 UINT32 Flags; 1434 UINT64 Reserved2; /* Reserved, must be zero */ 1435 1436 } ACPI_SRAT_MEM_AFFINITY; 1437 1438 /* Flags */ 1439 1440 #define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */ 1441 #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */ 1442 #define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */ 1443 1444 1445 /* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */ 1446 1447 typedef struct acpi_srat_x2apic_cpu_affinity 1448 { 1449 ACPI_SUBTABLE_HEADER Header; 1450 UINT16 Reserved; /* Reserved, must be zero */ 1451 UINT32 ProximityDomain; 1452 UINT32 ApicId; 1453 UINT32 Flags; 1454 UINT32 ClockDomain; 1455 UINT32 Reserved2; 1456 1457 } ACPI_SRAT_X2APIC_CPU_AFFINITY; 1458 1459 /* Flags for ACPI_SRAT_CPU_AFFINITY and ACPI_SRAT_X2APIC_CPU_AFFINITY */ 1460 1461 #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */ 1462 1463 1464 /* 3: GICC Affinity (ACPI 5.1) */ 1465 1466 typedef struct acpi_srat_gicc_affinity 1467 { 1468 ACPI_SUBTABLE_HEADER Header; 1469 UINT32 ProximityDomain; 1470 UINT32 AcpiProcessorUid; 1471 UINT32 Flags; 1472 UINT32 ClockDomain; 1473 1474 } ACPI_SRAT_GICC_AFFINITY; 1475 1476 /* Flags for ACPI_SRAT_GICC_AFFINITY */ 1477 1478 #define ACPI_SRAT_GICC_ENABLED (1) /* 00: Use affinity structure */ 1479 1480 1481 /* Reset to default packing */ 1482 1483 #pragma pack() 1484 1485 #endif /* __ACTBL1_H__ */ 1486