1 /****************************************************************************** 2 * 3 * Module Name: dmtbdump2 - Dump ACPI data tables that contain no AML code 4 * 5 *****************************************************************************/ 6 7 /****************************************************************************** 8 * 9 * 1. Copyright Notice 10 * 11 * Some or all of this work - Copyright (c) 1999 - 2018, 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 #include <contrib/dev/acpica/include/acpi.h> 153 #include <contrib/dev/acpica/include/accommon.h> 154 #include <contrib/dev/acpica/include/acdisasm.h> 155 #include <contrib/dev/acpica/include/actables.h> 156 157 /* This module used for application-level code only */ 158 159 #define _COMPONENT ACPI_CA_DISASSEMBLER 160 ACPI_MODULE_NAME ("dmtbdump2") 161 162 163 /******************************************************************************* 164 * 165 * FUNCTION: AcpiDmDumpIort 166 * 167 * PARAMETERS: Table - A IORT table 168 * 169 * RETURN: None 170 * 171 * DESCRIPTION: Format the contents of a IORT 172 * 173 ******************************************************************************/ 174 175 void 176 AcpiDmDumpIort ( 177 ACPI_TABLE_HEADER *Table) 178 { 179 ACPI_STATUS Status; 180 ACPI_TABLE_IORT *Iort; 181 ACPI_IORT_NODE *IortNode; 182 ACPI_IORT_ITS_GROUP *IortItsGroup = NULL; 183 ACPI_IORT_SMMU *IortSmmu = NULL; 184 UINT32 Offset; 185 UINT32 NodeOffset; 186 UINT32 Length; 187 ACPI_DMTABLE_INFO *InfoTable; 188 char *String; 189 UINT32 i; 190 191 192 /* Main table */ 193 194 Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoIort); 195 if (ACPI_FAILURE (Status)) 196 { 197 return; 198 } 199 200 Iort = ACPI_CAST_PTR (ACPI_TABLE_IORT, Table); 201 Offset = sizeof (ACPI_TABLE_IORT); 202 203 /* Dump the OptionalPadding (optional) */ 204 205 if (Iort->NodeOffset > Offset) 206 { 207 Status = AcpiDmDumpTable (Table->Length, Offset, Table, 208 Iort->NodeOffset - Offset, AcpiDmTableInfoIortPad); 209 if (ACPI_FAILURE (Status)) 210 { 211 return; 212 } 213 } 214 215 Offset = Iort->NodeOffset; 216 while (Offset < Table->Length) 217 { 218 /* Common subtable header */ 219 220 IortNode = ACPI_ADD_PTR (ACPI_IORT_NODE, Table, Offset); 221 AcpiOsPrintf ("\n"); 222 Length = ACPI_OFFSET (ACPI_IORT_NODE, NodeData); 223 Status = AcpiDmDumpTable (Table->Length, Offset, 224 IortNode, Length, AcpiDmTableInfoIortHdr); 225 if (ACPI_FAILURE (Status)) 226 { 227 return; 228 } 229 230 NodeOffset = Length; 231 232 switch (IortNode->Type) 233 { 234 case ACPI_IORT_NODE_ITS_GROUP: 235 236 InfoTable = AcpiDmTableInfoIort0; 237 Length = ACPI_OFFSET (ACPI_IORT_ITS_GROUP, Identifiers); 238 IortItsGroup = ACPI_ADD_PTR (ACPI_IORT_ITS_GROUP, IortNode, NodeOffset); 239 break; 240 241 case ACPI_IORT_NODE_NAMED_COMPONENT: 242 243 InfoTable = AcpiDmTableInfoIort1; 244 Length = ACPI_OFFSET (ACPI_IORT_NAMED_COMPONENT, DeviceName); 245 String = ACPI_ADD_PTR (char, IortNode, NodeOffset + Length); 246 Length += strlen (String) + 1; 247 break; 248 249 case ACPI_IORT_NODE_PCI_ROOT_COMPLEX: 250 251 InfoTable = AcpiDmTableInfoIort2; 252 Length = IortNode->Length - NodeOffset; 253 break; 254 255 case ACPI_IORT_NODE_SMMU: 256 257 InfoTable = AcpiDmTableInfoIort3; 258 Length = ACPI_OFFSET (ACPI_IORT_SMMU, Interrupts); 259 IortSmmu = ACPI_ADD_PTR (ACPI_IORT_SMMU, IortNode, NodeOffset); 260 break; 261 262 case ACPI_IORT_NODE_SMMU_V3: 263 264 InfoTable = AcpiDmTableInfoIort4; 265 Length = IortNode->Length - NodeOffset; 266 break; 267 268 default: 269 270 AcpiOsPrintf ("\n**** Unknown IORT node type 0x%X\n", 271 IortNode->Type); 272 273 /* Attempt to continue */ 274 275 if (!IortNode->Length) 276 { 277 AcpiOsPrintf ("Invalid zero length IORT node\n"); 278 return; 279 } 280 goto NextSubtable; 281 } 282 283 /* Dump the node subtable header */ 284 285 AcpiOsPrintf ("\n"); 286 Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset, 287 ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, NodeOffset), 288 Length, InfoTable); 289 if (ACPI_FAILURE (Status)) 290 { 291 return; 292 } 293 294 NodeOffset += Length; 295 296 /* Dump the node specific data */ 297 298 switch (IortNode->Type) 299 { 300 case ACPI_IORT_NODE_ITS_GROUP: 301 302 /* Validate IortItsGroup to avoid compiler warnings */ 303 304 if (IortItsGroup) 305 { 306 for (i = 0; i < IortItsGroup->ItsCount; i++) 307 { 308 Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset, 309 ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, NodeOffset), 310 4, AcpiDmTableInfoIort0a); 311 NodeOffset += 4; 312 } 313 } 314 break; 315 316 case ACPI_IORT_NODE_NAMED_COMPONENT: 317 318 /* Dump the Padding (optional) */ 319 320 if (IortNode->Length > NodeOffset) 321 { 322 Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset, 323 Table, IortNode->Length - NodeOffset, 324 AcpiDmTableInfoIort1a); 325 if (ACPI_FAILURE (Status)) 326 { 327 return; 328 } 329 } 330 break; 331 332 case ACPI_IORT_NODE_SMMU: 333 334 AcpiOsPrintf ("\n"); 335 336 /* Validate IortSmmu to avoid compiler warnings */ 337 338 if (IortSmmu) 339 { 340 Length = 2 * sizeof (UINT64); 341 NodeOffset = IortSmmu->GlobalInterruptOffset; 342 Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset, 343 ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, NodeOffset), 344 Length, AcpiDmTableInfoIort3a); 345 if (ACPI_FAILURE (Status)) 346 { 347 return; 348 } 349 350 NodeOffset = IortSmmu->ContextInterruptOffset; 351 for (i = 0; i < IortSmmu->ContextInterruptCount; i++) 352 { 353 Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset, 354 ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, NodeOffset), 355 8, AcpiDmTableInfoIort3b); 356 if (ACPI_FAILURE (Status)) 357 { 358 return; 359 } 360 361 NodeOffset += 8; 362 } 363 364 NodeOffset = IortSmmu->PmuInterruptOffset; 365 for (i = 0; i < IortSmmu->PmuInterruptCount; i++) 366 { 367 Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset, 368 ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, NodeOffset), 369 8, AcpiDmTableInfoIort3c); 370 if (ACPI_FAILURE (Status)) 371 { 372 return; 373 } 374 375 NodeOffset += 8; 376 } 377 } 378 break; 379 380 default: 381 382 break; 383 } 384 385 /* Dump the ID mappings */ 386 387 NodeOffset = IortNode->MappingOffset; 388 for (i = 0; i < IortNode->MappingCount; i++) 389 { 390 AcpiOsPrintf ("\n"); 391 Length = sizeof (ACPI_IORT_ID_MAPPING); 392 Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset, 393 ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, NodeOffset), 394 Length, AcpiDmTableInfoIortMap); 395 if (ACPI_FAILURE (Status)) 396 { 397 return; 398 } 399 400 NodeOffset += Length; 401 } 402 403 NextSubtable: 404 /* Point to next node subtable */ 405 406 Offset += IortNode->Length; 407 IortNode = ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, IortNode->Length); 408 } 409 } 410 411 412 /******************************************************************************* 413 * 414 * FUNCTION: AcpiDmDumpIvrs 415 * 416 * PARAMETERS: Table - A IVRS table 417 * 418 * RETURN: None 419 * 420 * DESCRIPTION: Format the contents of a IVRS 421 * 422 ******************************************************************************/ 423 424 static UINT8 EntrySizes[] = {4,8,16,32}; 425 426 void 427 AcpiDmDumpIvrs ( 428 ACPI_TABLE_HEADER *Table) 429 { 430 ACPI_STATUS Status; 431 UINT32 Offset = sizeof (ACPI_TABLE_IVRS); 432 UINT32 EntryOffset; 433 UINT32 EntryLength; 434 UINT32 EntryType; 435 ACPI_IVRS_DE_HEADER *DeviceEntry; 436 ACPI_IVRS_HEADER *Subtable; 437 ACPI_DMTABLE_INFO *InfoTable; 438 439 440 /* Main table */ 441 442 Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoIvrs); 443 if (ACPI_FAILURE (Status)) 444 { 445 return; 446 } 447 448 /* Subtables */ 449 450 Subtable = ACPI_ADD_PTR (ACPI_IVRS_HEADER, Table, Offset); 451 while (Offset < Table->Length) 452 { 453 /* Common subtable header */ 454 455 AcpiOsPrintf ("\n"); 456 Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, 457 Subtable->Length, AcpiDmTableInfoIvrsHdr); 458 if (ACPI_FAILURE (Status)) 459 { 460 return; 461 } 462 463 switch (Subtable->Type) 464 { 465 case ACPI_IVRS_TYPE_HARDWARE: 466 467 InfoTable = AcpiDmTableInfoIvrs0; 468 break; 469 470 case ACPI_IVRS_TYPE_MEMORY1: 471 case ACPI_IVRS_TYPE_MEMORY2: 472 case ACPI_IVRS_TYPE_MEMORY3: 473 474 InfoTable = AcpiDmTableInfoIvrs1; 475 break; 476 477 default: 478 479 AcpiOsPrintf ("\n**** Unknown IVRS subtable type 0x%X\n", 480 Subtable->Type); 481 482 /* Attempt to continue */ 483 484 if (!Subtable->Length) 485 { 486 AcpiOsPrintf ("Invalid zero length subtable\n"); 487 return; 488 } 489 goto NextSubtable; 490 } 491 492 /* Dump the subtable */ 493 494 AcpiOsPrintf ("\n"); 495 Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, 496 Subtable->Length, InfoTable); 497 if (ACPI_FAILURE (Status)) 498 { 499 return; 500 } 501 502 /* The hardware subtable can contain multiple device entries */ 503 504 if (Subtable->Type == ACPI_IVRS_TYPE_HARDWARE) 505 { 506 EntryOffset = Offset + sizeof (ACPI_IVRS_HARDWARE); 507 DeviceEntry = ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER, Subtable, 508 sizeof (ACPI_IVRS_HARDWARE)); 509 510 while (EntryOffset < (Offset + Subtable->Length)) 511 { 512 AcpiOsPrintf ("\n"); 513 /* 514 * Upper 2 bits of Type encode the length of the device entry 515 * 516 * 00 = 4 byte 517 * 01 = 8 byte 518 * 10 = 16 byte - currently no entries defined 519 * 11 = 32 byte - currently no entries defined 520 */ 521 EntryType = DeviceEntry->Type; 522 EntryLength = EntrySizes [EntryType >> 6]; 523 524 switch (EntryType) 525 { 526 /* 4-byte device entries */ 527 528 case ACPI_IVRS_TYPE_PAD4: 529 case ACPI_IVRS_TYPE_ALL: 530 case ACPI_IVRS_TYPE_SELECT: 531 case ACPI_IVRS_TYPE_START: 532 case ACPI_IVRS_TYPE_END: 533 534 InfoTable = AcpiDmTableInfoIvrs4; 535 break; 536 537 /* 8-byte entries, type A */ 538 539 case ACPI_IVRS_TYPE_ALIAS_SELECT: 540 case ACPI_IVRS_TYPE_ALIAS_START: 541 542 InfoTable = AcpiDmTableInfoIvrs8a; 543 break; 544 545 /* 8-byte entries, type B */ 546 547 case ACPI_IVRS_TYPE_PAD8: 548 case ACPI_IVRS_TYPE_EXT_SELECT: 549 case ACPI_IVRS_TYPE_EXT_START: 550 551 InfoTable = AcpiDmTableInfoIvrs8b; 552 break; 553 554 /* 8-byte entries, type C */ 555 556 case ACPI_IVRS_TYPE_SPECIAL: 557 558 InfoTable = AcpiDmTableInfoIvrs8c; 559 break; 560 561 default: 562 InfoTable = AcpiDmTableInfoIvrs4; 563 AcpiOsPrintf ( 564 "\n**** Unknown IVRS device entry type/length: " 565 "0x%.2X/0x%X at offset 0x%.4X: (header below)\n", 566 EntryType, EntryLength, EntryOffset); 567 break; 568 } 569 570 /* Dump the Device Entry */ 571 572 Status = AcpiDmDumpTable (Table->Length, EntryOffset, 573 DeviceEntry, EntryLength, InfoTable); 574 if (ACPI_FAILURE (Status)) 575 { 576 return; 577 } 578 579 EntryOffset += EntryLength; 580 DeviceEntry = ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER, DeviceEntry, 581 EntryLength); 582 } 583 } 584 585 NextSubtable: 586 /* Point to next subtable */ 587 588 Offset += Subtable->Length; 589 Subtable = ACPI_ADD_PTR (ACPI_IVRS_HEADER, Subtable, Subtable->Length); 590 } 591 } 592 593 594 /******************************************************************************* 595 * 596 * FUNCTION: AcpiDmDumpLpit 597 * 598 * PARAMETERS: Table - A LPIT table 599 * 600 * RETURN: None 601 * 602 * DESCRIPTION: Format the contents of a LPIT. This table type consists 603 * of an open-ended number of subtables. Note: There are no 604 * entries in the main table. An LPIT consists of the table 605 * header and then subtables only. 606 * 607 ******************************************************************************/ 608 609 void 610 AcpiDmDumpLpit ( 611 ACPI_TABLE_HEADER *Table) 612 { 613 ACPI_STATUS Status; 614 ACPI_LPIT_HEADER *Subtable; 615 UINT32 Length = Table->Length; 616 UINT32 Offset = sizeof (ACPI_TABLE_LPIT); 617 ACPI_DMTABLE_INFO *InfoTable; 618 UINT32 SubtableLength; 619 620 621 /* Subtables */ 622 623 Subtable = ACPI_ADD_PTR (ACPI_LPIT_HEADER, Table, Offset); 624 while (Offset < Table->Length) 625 { 626 /* Common subtable header */ 627 628 Status = AcpiDmDumpTable (Length, Offset, Subtable, 629 sizeof (ACPI_LPIT_HEADER), AcpiDmTableInfoLpitHdr); 630 if (ACPI_FAILURE (Status)) 631 { 632 return; 633 } 634 635 switch (Subtable->Type) 636 { 637 case ACPI_LPIT_TYPE_NATIVE_CSTATE: 638 639 InfoTable = AcpiDmTableInfoLpit0; 640 SubtableLength = sizeof (ACPI_LPIT_NATIVE); 641 break; 642 643 default: 644 645 /* Cannot continue on unknown type - no length */ 646 647 AcpiOsPrintf ("\n**** Unknown LPIT subtable type 0x%X\n", 648 Subtable->Type); 649 return; 650 } 651 652 Status = AcpiDmDumpTable (Length, Offset, Subtable, 653 SubtableLength, InfoTable); 654 if (ACPI_FAILURE (Status)) 655 { 656 return; 657 } 658 659 AcpiOsPrintf ("\n"); 660 661 /* Point to next subtable */ 662 663 Offset += SubtableLength; 664 Subtable = ACPI_ADD_PTR (ACPI_LPIT_HEADER, Subtable, SubtableLength); 665 } 666 } 667 668 669 /******************************************************************************* 670 * 671 * FUNCTION: AcpiDmDumpMadt 672 * 673 * PARAMETERS: Table - A MADT table 674 * 675 * RETURN: None 676 * 677 * DESCRIPTION: Format the contents of a MADT. This table type consists 678 * of an open-ended number of subtables. 679 * 680 ******************************************************************************/ 681 682 void 683 AcpiDmDumpMadt ( 684 ACPI_TABLE_HEADER *Table) 685 { 686 ACPI_STATUS Status; 687 ACPI_SUBTABLE_HEADER *Subtable; 688 UINT32 Length = Table->Length; 689 UINT32 Offset = sizeof (ACPI_TABLE_MADT); 690 ACPI_DMTABLE_INFO *InfoTable; 691 692 693 /* Main table */ 694 695 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoMadt); 696 if (ACPI_FAILURE (Status)) 697 { 698 return; 699 } 700 701 /* Subtables */ 702 703 Subtable = ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Table, Offset); 704 while (Offset < Table->Length) 705 { 706 /* Common subtable header */ 707 708 AcpiOsPrintf ("\n"); 709 Status = AcpiDmDumpTable (Length, Offset, Subtable, 710 Subtable->Length, AcpiDmTableInfoMadtHdr); 711 if (ACPI_FAILURE (Status)) 712 { 713 return; 714 } 715 716 switch (Subtable->Type) 717 { 718 case ACPI_MADT_TYPE_LOCAL_APIC: 719 720 InfoTable = AcpiDmTableInfoMadt0; 721 break; 722 723 case ACPI_MADT_TYPE_IO_APIC: 724 725 InfoTable = AcpiDmTableInfoMadt1; 726 break; 727 728 case ACPI_MADT_TYPE_INTERRUPT_OVERRIDE: 729 730 InfoTable = AcpiDmTableInfoMadt2; 731 break; 732 733 case ACPI_MADT_TYPE_NMI_SOURCE: 734 735 InfoTable = AcpiDmTableInfoMadt3; 736 break; 737 738 case ACPI_MADT_TYPE_LOCAL_APIC_NMI: 739 740 InfoTable = AcpiDmTableInfoMadt4; 741 break; 742 743 case ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE: 744 745 InfoTable = AcpiDmTableInfoMadt5; 746 break; 747 748 case ACPI_MADT_TYPE_IO_SAPIC: 749 750 InfoTable = AcpiDmTableInfoMadt6; 751 break; 752 753 case ACPI_MADT_TYPE_LOCAL_SAPIC: 754 755 InfoTable = AcpiDmTableInfoMadt7; 756 break; 757 758 case ACPI_MADT_TYPE_INTERRUPT_SOURCE: 759 760 InfoTable = AcpiDmTableInfoMadt8; 761 break; 762 763 case ACPI_MADT_TYPE_LOCAL_X2APIC: 764 765 InfoTable = AcpiDmTableInfoMadt9; 766 break; 767 768 case ACPI_MADT_TYPE_LOCAL_X2APIC_NMI: 769 770 InfoTable = AcpiDmTableInfoMadt10; 771 break; 772 773 case ACPI_MADT_TYPE_GENERIC_INTERRUPT: 774 775 InfoTable = AcpiDmTableInfoMadt11; 776 break; 777 778 case ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR: 779 780 InfoTable = AcpiDmTableInfoMadt12; 781 break; 782 783 case ACPI_MADT_TYPE_GENERIC_MSI_FRAME: 784 785 InfoTable = AcpiDmTableInfoMadt13; 786 break; 787 788 case ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR: 789 790 InfoTable = AcpiDmTableInfoMadt14; 791 break; 792 793 case ACPI_MADT_TYPE_GENERIC_TRANSLATOR: 794 795 InfoTable = AcpiDmTableInfoMadt15; 796 break; 797 798 default: 799 800 AcpiOsPrintf ("\n**** Unknown MADT subtable type 0x%X\n\n", 801 Subtable->Type); 802 803 /* Attempt to continue */ 804 805 if (!Subtable->Length) 806 { 807 AcpiOsPrintf ("Invalid zero length subtable\n"); 808 return; 809 } 810 811 goto NextSubtable; 812 } 813 814 Status = AcpiDmDumpTable (Length, Offset, Subtable, 815 Subtable->Length, InfoTable); 816 if (ACPI_FAILURE (Status)) 817 { 818 return; 819 } 820 821 NextSubtable: 822 /* Point to next subtable */ 823 824 Offset += Subtable->Length; 825 Subtable = ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Subtable, 826 Subtable->Length); 827 } 828 } 829 830 831 /******************************************************************************* 832 * 833 * FUNCTION: AcpiDmDumpMcfg 834 * 835 * PARAMETERS: Table - A MCFG Table 836 * 837 * RETURN: None 838 * 839 * DESCRIPTION: Format the contents of a MCFG table 840 * 841 ******************************************************************************/ 842 843 void 844 AcpiDmDumpMcfg ( 845 ACPI_TABLE_HEADER *Table) 846 { 847 ACPI_STATUS Status; 848 UINT32 Offset = sizeof (ACPI_TABLE_MCFG); 849 ACPI_MCFG_ALLOCATION *Subtable; 850 851 852 /* Main table */ 853 854 Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoMcfg); 855 if (ACPI_FAILURE (Status)) 856 { 857 return; 858 } 859 860 /* Subtables */ 861 862 Subtable = ACPI_ADD_PTR (ACPI_MCFG_ALLOCATION, Table, Offset); 863 while (Offset < Table->Length) 864 { 865 if (Offset + sizeof (ACPI_MCFG_ALLOCATION) > Table->Length) 866 { 867 AcpiOsPrintf ("Warning: there are %u invalid trailing bytes\n", 868 sizeof (ACPI_MCFG_ALLOCATION) - (Offset - Table->Length)); 869 return; 870 } 871 872 AcpiOsPrintf ("\n"); 873 Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, 874 sizeof (ACPI_MCFG_ALLOCATION), AcpiDmTableInfoMcfg0); 875 if (ACPI_FAILURE (Status)) 876 { 877 return; 878 } 879 880 /* Point to next subtable (each subtable is of fixed length) */ 881 882 Offset += sizeof (ACPI_MCFG_ALLOCATION); 883 Subtable = ACPI_ADD_PTR (ACPI_MCFG_ALLOCATION, Subtable, 884 sizeof (ACPI_MCFG_ALLOCATION)); 885 } 886 } 887 888 889 /******************************************************************************* 890 * 891 * FUNCTION: AcpiDmDumpMpst 892 * 893 * PARAMETERS: Table - A MPST Table 894 * 895 * RETURN: None 896 * 897 * DESCRIPTION: Format the contents of a MPST table 898 * 899 ******************************************************************************/ 900 901 void 902 AcpiDmDumpMpst ( 903 ACPI_TABLE_HEADER *Table) 904 { 905 ACPI_STATUS Status; 906 UINT32 Offset = sizeof (ACPI_TABLE_MPST); 907 ACPI_MPST_POWER_NODE *Subtable0; 908 ACPI_MPST_POWER_STATE *Subtable0A; 909 ACPI_MPST_COMPONENT *Subtable0B; 910 ACPI_MPST_DATA_HDR *Subtable1; 911 ACPI_MPST_POWER_DATA *Subtable2; 912 UINT16 SubtableCount; 913 UINT32 PowerStateCount; 914 UINT32 ComponentCount; 915 916 917 /* Main table */ 918 919 Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoMpst); 920 if (ACPI_FAILURE (Status)) 921 { 922 return; 923 } 924 925 /* Subtable: Memory Power Node(s) */ 926 927 SubtableCount = (ACPI_CAST_PTR (ACPI_TABLE_MPST, Table))->PowerNodeCount; 928 Subtable0 = ACPI_ADD_PTR (ACPI_MPST_POWER_NODE, Table, Offset); 929 930 while ((Offset < Table->Length) && SubtableCount) 931 { 932 AcpiOsPrintf ("\n"); 933 Status = AcpiDmDumpTable (Table->Length, Offset, Subtable0, 934 sizeof (ACPI_MPST_POWER_NODE), AcpiDmTableInfoMpst0); 935 if (ACPI_FAILURE (Status)) 936 { 937 return; 938 } 939 940 /* Extract the sub-subtable counts */ 941 942 PowerStateCount = Subtable0->NumPowerStates; 943 ComponentCount = Subtable0->NumPhysicalComponents; 944 Offset += sizeof (ACPI_MPST_POWER_NODE); 945 946 /* Sub-subtables - Memory Power State Structure(s) */ 947 948 Subtable0A = ACPI_ADD_PTR (ACPI_MPST_POWER_STATE, Subtable0, 949 sizeof (ACPI_MPST_POWER_NODE)); 950 951 while (PowerStateCount) 952 { 953 AcpiOsPrintf ("\n"); 954 Status = AcpiDmDumpTable (Table->Length, Offset, Subtable0A, 955 sizeof (ACPI_MPST_POWER_STATE), AcpiDmTableInfoMpst0A); 956 if (ACPI_FAILURE (Status)) 957 { 958 return; 959 } 960 961 Subtable0A++; 962 PowerStateCount--; 963 Offset += sizeof (ACPI_MPST_POWER_STATE); 964 } 965 966 /* Sub-subtables - Physical Component ID Structure(s) */ 967 968 Subtable0B = ACPI_CAST_PTR (ACPI_MPST_COMPONENT, Subtable0A); 969 970 if (ComponentCount) 971 { 972 AcpiOsPrintf ("\n"); 973 } 974 975 while (ComponentCount) 976 { 977 Status = AcpiDmDumpTable (Table->Length, Offset, Subtable0B, 978 sizeof (ACPI_MPST_COMPONENT), AcpiDmTableInfoMpst0B); 979 if (ACPI_FAILURE (Status)) 980 { 981 return; 982 } 983 984 Subtable0B++; 985 ComponentCount--; 986 Offset += sizeof (ACPI_MPST_COMPONENT); 987 } 988 989 /* Point to next Memory Power Node subtable */ 990 991 SubtableCount--; 992 Subtable0 = ACPI_ADD_PTR (ACPI_MPST_POWER_NODE, Subtable0, 993 sizeof (ACPI_MPST_POWER_NODE) + 994 (sizeof (ACPI_MPST_POWER_STATE) * Subtable0->NumPowerStates) + 995 (sizeof (ACPI_MPST_COMPONENT) * Subtable0->NumPhysicalComponents)); 996 } 997 998 /* Subtable: Count of Memory Power State Characteristic structures */ 999 1000 AcpiOsPrintf ("\n"); 1001 Subtable1 = ACPI_CAST_PTR (ACPI_MPST_DATA_HDR, Subtable0); 1002 Status = AcpiDmDumpTable (Table->Length, Offset, Subtable1, 1003 sizeof (ACPI_MPST_DATA_HDR), AcpiDmTableInfoMpst1); 1004 if (ACPI_FAILURE (Status)) 1005 { 1006 return; 1007 } 1008 1009 SubtableCount = Subtable1->CharacteristicsCount; 1010 Offset += sizeof (ACPI_MPST_DATA_HDR); 1011 1012 /* Subtable: Memory Power State Characteristics structure(s) */ 1013 1014 Subtable2 = ACPI_ADD_PTR (ACPI_MPST_POWER_DATA, Subtable1, 1015 sizeof (ACPI_MPST_DATA_HDR)); 1016 1017 while ((Offset < Table->Length) && SubtableCount) 1018 { 1019 AcpiOsPrintf ("\n"); 1020 Status = AcpiDmDumpTable (Table->Length, Offset, Subtable2, 1021 sizeof (ACPI_MPST_POWER_DATA), AcpiDmTableInfoMpst2); 1022 if (ACPI_FAILURE (Status)) 1023 { 1024 return; 1025 } 1026 1027 Subtable2++; 1028 SubtableCount--; 1029 Offset += sizeof (ACPI_MPST_POWER_DATA); 1030 } 1031 } 1032 1033 1034 /******************************************************************************* 1035 * 1036 * FUNCTION: AcpiDmDumpMsct 1037 * 1038 * PARAMETERS: Table - A MSCT table 1039 * 1040 * RETURN: None 1041 * 1042 * DESCRIPTION: Format the contents of a MSCT 1043 * 1044 ******************************************************************************/ 1045 1046 void 1047 AcpiDmDumpMsct ( 1048 ACPI_TABLE_HEADER *Table) 1049 { 1050 ACPI_STATUS Status; 1051 UINT32 Offset = sizeof (ACPI_TABLE_MSCT); 1052 ACPI_MSCT_PROXIMITY *Subtable; 1053 1054 1055 /* Main table */ 1056 1057 Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoMsct); 1058 if (ACPI_FAILURE (Status)) 1059 { 1060 return; 1061 } 1062 1063 /* Subtables */ 1064 1065 Subtable = ACPI_ADD_PTR (ACPI_MSCT_PROXIMITY, Table, Offset); 1066 while (Offset < Table->Length) 1067 { 1068 /* Common subtable header */ 1069 1070 AcpiOsPrintf ("\n"); 1071 Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, 1072 sizeof (ACPI_MSCT_PROXIMITY), AcpiDmTableInfoMsct0); 1073 if (ACPI_FAILURE (Status)) 1074 { 1075 return; 1076 } 1077 1078 /* Point to next subtable */ 1079 1080 Offset += sizeof (ACPI_MSCT_PROXIMITY); 1081 Subtable = ACPI_ADD_PTR (ACPI_MSCT_PROXIMITY, Subtable, 1082 sizeof (ACPI_MSCT_PROXIMITY)); 1083 } 1084 } 1085 1086 1087 /******************************************************************************* 1088 * 1089 * FUNCTION: AcpiDmDumpMtmr 1090 * 1091 * PARAMETERS: Table - A MTMR table 1092 * 1093 * RETURN: None 1094 * 1095 * DESCRIPTION: Format the contents of a MTMR 1096 * 1097 ******************************************************************************/ 1098 1099 void 1100 AcpiDmDumpMtmr ( 1101 ACPI_TABLE_HEADER *Table) 1102 { 1103 ACPI_STATUS Status; 1104 UINT32 Offset = sizeof (ACPI_TABLE_MTMR); 1105 ACPI_MTMR_ENTRY *Subtable; 1106 1107 1108 /* Main table */ 1109 1110 Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoMtmr); 1111 if (ACPI_FAILURE (Status)) 1112 { 1113 return; 1114 } 1115 1116 /* Subtables */ 1117 1118 Subtable = ACPI_ADD_PTR (ACPI_MTMR_ENTRY, Table, Offset); 1119 while (Offset < Table->Length) 1120 { 1121 /* Common subtable header */ 1122 1123 AcpiOsPrintf ("\n"); 1124 Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, 1125 sizeof (ACPI_MTMR_ENTRY), AcpiDmTableInfoMtmr0); 1126 if (ACPI_FAILURE (Status)) 1127 { 1128 return; 1129 } 1130 1131 /* Point to next subtable */ 1132 1133 Offset += sizeof (ACPI_MTMR_ENTRY); 1134 Subtable = ACPI_ADD_PTR (ACPI_MTMR_ENTRY, Subtable, 1135 sizeof (ACPI_MTMR_ENTRY)); 1136 } 1137 } 1138 1139 1140 /******************************************************************************* 1141 * 1142 * FUNCTION: AcpiDmDumpNfit 1143 * 1144 * PARAMETERS: Table - A NFIT table 1145 * 1146 * RETURN: None 1147 * 1148 * DESCRIPTION: Format the contents of an NFIT. 1149 * 1150 ******************************************************************************/ 1151 1152 void 1153 AcpiDmDumpNfit ( 1154 ACPI_TABLE_HEADER *Table) 1155 { 1156 ACPI_STATUS Status; 1157 UINT32 Offset = sizeof (ACPI_TABLE_NFIT); 1158 UINT32 FieldOffset = 0; 1159 UINT32 Length; 1160 ACPI_NFIT_HEADER *Subtable; 1161 ACPI_DMTABLE_INFO *InfoTable; 1162 ACPI_NFIT_INTERLEAVE *Interleave = NULL; 1163 ACPI_NFIT_SMBIOS *SmbiosInfo = NULL; 1164 ACPI_NFIT_FLUSH_ADDRESS *Hint = NULL; 1165 UINT32 i; 1166 1167 1168 /* Main table */ 1169 1170 Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoNfit); 1171 if (ACPI_FAILURE (Status)) 1172 { 1173 return; 1174 } 1175 1176 /* Subtables */ 1177 1178 Subtable = ACPI_ADD_PTR (ACPI_NFIT_HEADER, Table, Offset); 1179 while (Offset < Table->Length) 1180 { 1181 /* NFIT subtable header */ 1182 1183 AcpiOsPrintf ("\n"); 1184 Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, 1185 Subtable->Length, AcpiDmTableInfoNfitHdr); 1186 if (ACPI_FAILURE (Status)) 1187 { 1188 return; 1189 } 1190 1191 switch (Subtable->Type) 1192 { 1193 case ACPI_NFIT_TYPE_SYSTEM_ADDRESS: 1194 1195 InfoTable = AcpiDmTableInfoNfit0; 1196 break; 1197 1198 case ACPI_NFIT_TYPE_MEMORY_MAP: 1199 1200 InfoTable = AcpiDmTableInfoNfit1; 1201 break; 1202 1203 case ACPI_NFIT_TYPE_INTERLEAVE: 1204 1205 /* Has a variable number of 32-bit values at the end */ 1206 1207 InfoTable = AcpiDmTableInfoNfit2; 1208 Interleave = ACPI_CAST_PTR (ACPI_NFIT_INTERLEAVE, Subtable); 1209 FieldOffset = sizeof (ACPI_NFIT_INTERLEAVE); 1210 break; 1211 1212 case ACPI_NFIT_TYPE_SMBIOS: 1213 1214 SmbiosInfo = ACPI_CAST_PTR (ACPI_NFIT_SMBIOS, Subtable); 1215 InfoTable = AcpiDmTableInfoNfit3; 1216 break; 1217 1218 case ACPI_NFIT_TYPE_CONTROL_REGION: 1219 1220 InfoTable = AcpiDmTableInfoNfit4; 1221 break; 1222 1223 case ACPI_NFIT_TYPE_DATA_REGION: 1224 1225 InfoTable = AcpiDmTableInfoNfit5; 1226 break; 1227 1228 case ACPI_NFIT_TYPE_FLUSH_ADDRESS: 1229 1230 /* Has a variable number of 64-bit addresses at the end */ 1231 1232 InfoTable = AcpiDmTableInfoNfit6; 1233 Hint = ACPI_CAST_PTR (ACPI_NFIT_FLUSH_ADDRESS, Subtable); 1234 FieldOffset = sizeof (ACPI_NFIT_FLUSH_ADDRESS) - sizeof (UINT64); 1235 break; 1236 1237 case ACPI_NFIT_TYPE_CAPABILITIES: /* ACPI 6.0A */ 1238 1239 InfoTable = AcpiDmTableInfoNfit7; 1240 break; 1241 1242 default: 1243 AcpiOsPrintf ("\n**** Unknown NFIT subtable type 0x%X\n", 1244 Subtable->Type); 1245 1246 /* Attempt to continue */ 1247 1248 if (!Subtable->Length) 1249 { 1250 AcpiOsPrintf ("Invalid zero length subtable\n"); 1251 return; 1252 } 1253 goto NextSubtable; 1254 } 1255 1256 AcpiOsPrintf ("\n"); 1257 Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, 1258 Subtable->Length, InfoTable); 1259 if (ACPI_FAILURE (Status)) 1260 { 1261 return; 1262 } 1263 1264 /* Per-subtable variable-length fields */ 1265 1266 switch (Subtable->Type) 1267 { 1268 case ACPI_NFIT_TYPE_INTERLEAVE: 1269 1270 for (i = 0; i < Interleave->LineCount; i++) 1271 { 1272 Status = AcpiDmDumpTable (Table->Length, Offset + FieldOffset, 1273 &Interleave->LineOffset[i], 1274 sizeof (UINT32), AcpiDmTableInfoNfit2a); 1275 if (ACPI_FAILURE (Status)) 1276 { 1277 return; 1278 } 1279 1280 FieldOffset += sizeof (UINT32); 1281 } 1282 break; 1283 1284 case ACPI_NFIT_TYPE_SMBIOS: 1285 1286 Length = Subtable->Length - 1287 sizeof (ACPI_NFIT_SMBIOS) + sizeof (UINT8); 1288 1289 if (Length) 1290 { 1291 Status = AcpiDmDumpTable (Table->Length, 1292 sizeof (ACPI_NFIT_SMBIOS) - sizeof (UINT8), 1293 SmbiosInfo, 1294 Length, AcpiDmTableInfoNfit3a); 1295 if (ACPI_FAILURE (Status)) 1296 { 1297 return; 1298 } 1299 } 1300 1301 break; 1302 1303 case ACPI_NFIT_TYPE_FLUSH_ADDRESS: 1304 1305 for (i = 0; i < Hint->HintCount; i++) 1306 { 1307 Status = AcpiDmDumpTable (Table->Length, Offset + FieldOffset, 1308 &Hint->HintAddress[i], 1309 sizeof (UINT64), AcpiDmTableInfoNfit6a); 1310 if (ACPI_FAILURE (Status)) 1311 { 1312 return; 1313 } 1314 1315 FieldOffset += sizeof (UINT64); 1316 } 1317 break; 1318 1319 default: 1320 break; 1321 } 1322 1323 NextSubtable: 1324 /* Point to next subtable */ 1325 1326 Offset += Subtable->Length; 1327 Subtable = ACPI_ADD_PTR (ACPI_NFIT_HEADER, Subtable, Subtable->Length); 1328 } 1329 } 1330 1331 1332 /******************************************************************************* 1333 * 1334 * FUNCTION: AcpiDmDumpPcct 1335 * 1336 * PARAMETERS: Table - A PCCT table 1337 * 1338 * RETURN: None 1339 * 1340 * DESCRIPTION: Format the contents of a PCCT. This table type consists 1341 * of an open-ended number of subtables. 1342 * 1343 ******************************************************************************/ 1344 1345 void 1346 AcpiDmDumpPcct ( 1347 ACPI_TABLE_HEADER *Table) 1348 { 1349 ACPI_STATUS Status; 1350 ACPI_PCCT_SUBSPACE *Subtable; 1351 ACPI_DMTABLE_INFO *InfoTable; 1352 UINT32 Length = Table->Length; 1353 UINT32 Offset = sizeof (ACPI_TABLE_PCCT); 1354 1355 1356 /* Main table */ 1357 1358 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoPcct); 1359 if (ACPI_FAILURE (Status)) 1360 { 1361 return; 1362 } 1363 1364 /* Subtables */ 1365 1366 Subtable = ACPI_ADD_PTR (ACPI_PCCT_SUBSPACE, Table, Offset); 1367 while (Offset < Table->Length) 1368 { 1369 /* Common subtable header */ 1370 1371 AcpiOsPrintf ("\n"); 1372 Status = AcpiDmDumpTable (Length, Offset, Subtable, 1373 Subtable->Header.Length, AcpiDmTableInfoPcctHdr); 1374 if (ACPI_FAILURE (Status)) 1375 { 1376 return; 1377 } 1378 1379 switch (Subtable->Header.Type) 1380 { 1381 case ACPI_PCCT_TYPE_GENERIC_SUBSPACE: 1382 1383 InfoTable = AcpiDmTableInfoPcct0; 1384 break; 1385 1386 case ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE: 1387 1388 InfoTable = AcpiDmTableInfoPcct1; 1389 break; 1390 1391 case ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2: 1392 1393 InfoTable = AcpiDmTableInfoPcct2; 1394 break; 1395 1396 case ACPI_PCCT_TYPE_EXT_PCC_MASTER_SUBSPACE: 1397 1398 InfoTable = AcpiDmTableInfoPcct3; 1399 break; 1400 1401 case ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE: 1402 1403 InfoTable = AcpiDmTableInfoPcct4; 1404 break; 1405 1406 default: 1407 1408 AcpiOsPrintf ( 1409 "\n**** Unexpected or unknown PCCT subtable type 0x%X\n\n", 1410 Subtable->Header.Type); 1411 return; 1412 } 1413 1414 AcpiOsPrintf ("\n"); 1415 Status = AcpiDmDumpTable (Length, Offset, Subtable, 1416 Subtable->Header.Length, InfoTable); 1417 if (ACPI_FAILURE (Status)) 1418 { 1419 return; 1420 } 1421 1422 /* Point to next subtable */ 1423 1424 Offset += Subtable->Header.Length; 1425 Subtable = ACPI_ADD_PTR (ACPI_PCCT_SUBSPACE, Subtable, 1426 Subtable->Header.Length); 1427 } 1428 } 1429 1430 1431 /******************************************************************************* 1432 * 1433 * FUNCTION: AcpiDmDumpPdtt 1434 * 1435 * PARAMETERS: Table - A PDTT table 1436 * 1437 * RETURN: None 1438 * 1439 * DESCRIPTION: Format the contents of a Pdtt. This is a variable-length 1440 * table that contains an open-ended number of IDs 1441 * at the end of the table. 1442 * 1443 ******************************************************************************/ 1444 1445 void 1446 AcpiDmDumpPdtt ( 1447 ACPI_TABLE_HEADER *Table) 1448 { 1449 ACPI_STATUS Status; 1450 ACPI_PDTT_CHANNEL *Subtable; 1451 UINT32 Length = Table->Length; 1452 UINT32 Offset = sizeof (ACPI_TABLE_PDTT); 1453 1454 1455 /* Main table */ 1456 1457 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoPdtt); 1458 if (ACPI_FAILURE (Status)) 1459 { 1460 return; 1461 } 1462 1463 /* Subtables. Currently there is only one type, but can be multiples */ 1464 1465 Subtable = ACPI_ADD_PTR (ACPI_PDTT_CHANNEL, Table, Offset); 1466 while (Offset < Table->Length) 1467 { 1468 AcpiOsPrintf ("\n"); 1469 Status = AcpiDmDumpTable (Length, Offset, Subtable, 1470 sizeof (ACPI_PDTT_CHANNEL), AcpiDmTableInfoPdtt0); 1471 if (ACPI_FAILURE (Status)) 1472 { 1473 return; 1474 } 1475 1476 /* Point to next subtable */ 1477 1478 Offset += sizeof (ACPI_PDTT_CHANNEL); 1479 Subtable = ACPI_ADD_PTR (ACPI_PDTT_CHANNEL, Subtable, 1480 sizeof (ACPI_PDTT_CHANNEL)); 1481 } 1482 } 1483 1484 1485 /******************************************************************************* 1486 * 1487 * FUNCTION: AcpiDmDumpPmtt 1488 * 1489 * PARAMETERS: Table - A PMTT table 1490 * 1491 * RETURN: None 1492 * 1493 * DESCRIPTION: Format the contents of a PMTT. This table type consists 1494 * of an open-ended number of subtables. 1495 * 1496 ******************************************************************************/ 1497 1498 void 1499 AcpiDmDumpPmtt ( 1500 ACPI_TABLE_HEADER *Table) 1501 { 1502 ACPI_STATUS Status; 1503 ACPI_PMTT_HEADER *Subtable; 1504 ACPI_PMTT_HEADER *MemSubtable; 1505 ACPI_PMTT_HEADER *DimmSubtable; 1506 ACPI_PMTT_DOMAIN *DomainArray; 1507 UINT32 Length = Table->Length; 1508 UINT32 Offset = sizeof (ACPI_TABLE_PMTT); 1509 UINT32 MemOffset; 1510 UINT32 DimmOffset; 1511 UINT32 DomainOffset; 1512 UINT32 DomainCount; 1513 1514 1515 /* Main table */ 1516 1517 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoPmtt); 1518 if (ACPI_FAILURE (Status)) 1519 { 1520 return; 1521 } 1522 1523 /* Subtables */ 1524 1525 Subtable = ACPI_ADD_PTR (ACPI_PMTT_HEADER, Table, Offset); 1526 while (Offset < Table->Length) 1527 { 1528 /* Common subtable header */ 1529 1530 AcpiOsPrintf ("\n"); 1531 Status = AcpiDmDumpTable (Length, Offset, Subtable, 1532 Subtable->Length, AcpiDmTableInfoPmttHdr); 1533 if (ACPI_FAILURE (Status)) 1534 { 1535 return; 1536 } 1537 1538 /* Only Socket subtables are expected at this level */ 1539 1540 if (Subtable->Type != ACPI_PMTT_TYPE_SOCKET) 1541 { 1542 AcpiOsPrintf ( 1543 "\n**** Unexpected or unknown PMTT subtable type 0x%X\n\n", 1544 Subtable->Type); 1545 return; 1546 } 1547 1548 /* Dump the fixed-length portion of the subtable */ 1549 1550 Status = AcpiDmDumpTable (Length, Offset, Subtable, 1551 Subtable->Length, AcpiDmTableInfoPmtt0); 1552 if (ACPI_FAILURE (Status)) 1553 { 1554 return; 1555 } 1556 1557 /* Walk the memory controller subtables */ 1558 1559 MemOffset = sizeof (ACPI_PMTT_SOCKET); 1560 MemSubtable = ACPI_ADD_PTR (ACPI_PMTT_HEADER, Subtable, 1561 sizeof (ACPI_PMTT_SOCKET)); 1562 1563 while (((Offset + MemOffset) < Table->Length) && 1564 (MemOffset < Subtable->Length)) 1565 { 1566 /* Common subtable header */ 1567 1568 AcpiOsPrintf ("\n"); 1569 Status = AcpiDmDumpTable (Length, 1570 Offset + MemOffset, MemSubtable, 1571 MemSubtable->Length, AcpiDmTableInfoPmttHdr); 1572 if (ACPI_FAILURE (Status)) 1573 { 1574 return; 1575 } 1576 1577 /* Only memory controller subtables are expected at this level */ 1578 1579 if (MemSubtable->Type != ACPI_PMTT_TYPE_CONTROLLER) 1580 { 1581 AcpiOsPrintf ( 1582 "\n**** Unexpected or unknown PMTT subtable type 0x%X\n\n", 1583 MemSubtable->Type); 1584 return; 1585 } 1586 1587 /* Dump the fixed-length portion of the controller subtable */ 1588 1589 Status = AcpiDmDumpTable (Length, 1590 Offset + MemOffset, MemSubtable, 1591 MemSubtable->Length, AcpiDmTableInfoPmtt1); 1592 if (ACPI_FAILURE (Status)) 1593 { 1594 return; 1595 } 1596 1597 /* Walk the variable count of proximity domains */ 1598 1599 DomainCount = ((ACPI_PMTT_CONTROLLER *) MemSubtable)->DomainCount; 1600 DomainOffset = sizeof (ACPI_PMTT_CONTROLLER); 1601 DomainArray = ACPI_ADD_PTR (ACPI_PMTT_DOMAIN, MemSubtable, 1602 sizeof (ACPI_PMTT_CONTROLLER)); 1603 1604 while (((Offset + MemOffset + DomainOffset) < Table->Length) && 1605 ((MemOffset + DomainOffset) < Subtable->Length) && 1606 DomainCount) 1607 { 1608 Status = AcpiDmDumpTable (Length, 1609 Offset + MemOffset + DomainOffset, DomainArray, 1610 sizeof (ACPI_PMTT_DOMAIN), AcpiDmTableInfoPmtt1a); 1611 if (ACPI_FAILURE (Status)) 1612 { 1613 return; 1614 } 1615 1616 DomainOffset += sizeof (ACPI_PMTT_DOMAIN); 1617 DomainArray++; 1618 DomainCount--; 1619 } 1620 1621 if (DomainCount) 1622 { 1623 AcpiOsPrintf ( 1624 "\n**** DomainCount exceeds subtable length\n\n"); 1625 } 1626 1627 /* Walk the physical component (DIMM) subtables */ 1628 1629 DimmOffset = DomainOffset; 1630 DimmSubtable = ACPI_ADD_PTR (ACPI_PMTT_HEADER, MemSubtable, 1631 DomainOffset); 1632 1633 while (((Offset + MemOffset + DimmOffset) < Table->Length) && 1634 (DimmOffset < MemSubtable->Length)) 1635 { 1636 /* Common subtable header */ 1637 1638 AcpiOsPrintf ("\n"); 1639 Status = AcpiDmDumpTable (Length, 1640 Offset + MemOffset + DimmOffset, DimmSubtable, 1641 DimmSubtable->Length, AcpiDmTableInfoPmttHdr); 1642 if (ACPI_FAILURE (Status)) 1643 { 1644 return; 1645 } 1646 1647 /* Only DIMM subtables are expected at this level */ 1648 1649 if (DimmSubtable->Type != ACPI_PMTT_TYPE_DIMM) 1650 { 1651 AcpiOsPrintf ( 1652 "\n**** Unexpected or unknown PMTT subtable type 0x%X\n\n", 1653 DimmSubtable->Type); 1654 return; 1655 } 1656 1657 /* Dump the fixed-length DIMM subtable */ 1658 1659 Status = AcpiDmDumpTable (Length, 1660 Offset + MemOffset + DimmOffset, DimmSubtable, 1661 DimmSubtable->Length, AcpiDmTableInfoPmtt2); 1662 if (ACPI_FAILURE (Status)) 1663 { 1664 return; 1665 } 1666 1667 /* Point to next DIMM subtable */ 1668 1669 DimmOffset += DimmSubtable->Length; 1670 DimmSubtable = ACPI_ADD_PTR (ACPI_PMTT_HEADER, 1671 DimmSubtable, DimmSubtable->Length); 1672 } 1673 1674 /* Point to next Controller subtable */ 1675 1676 MemOffset += MemSubtable->Length; 1677 MemSubtable = ACPI_ADD_PTR (ACPI_PMTT_HEADER, 1678 MemSubtable, MemSubtable->Length); 1679 } 1680 1681 /* Point to next Socket subtable */ 1682 1683 Offset += Subtable->Length; 1684 Subtable = ACPI_ADD_PTR (ACPI_PMTT_HEADER, 1685 Subtable, Subtable->Length); 1686 } 1687 } 1688 1689 1690 /******************************************************************************* 1691 * 1692 * FUNCTION: AcpiDmDumpPptt 1693 * 1694 * PARAMETERS: Table - A PMTT table 1695 * 1696 * RETURN: None 1697 * 1698 * DESCRIPTION: Format the contents of a PPTT. This table type consists 1699 * of an open-ended number of subtables. 1700 * 1701 ******************************************************************************/ 1702 1703 void 1704 AcpiDmDumpPptt ( 1705 ACPI_TABLE_HEADER *Table) 1706 { 1707 ACPI_STATUS Status; 1708 ACPI_SUBTABLE_HEADER *Subtable; 1709 ACPI_PPTT_PROCESSOR *PpttProcessor; 1710 UINT8 Length; 1711 UINT8 SubtableOffset; 1712 UINT32 Offset = sizeof (ACPI_TABLE_FPDT); 1713 ACPI_DMTABLE_INFO *InfoTable; 1714 UINT32 i; 1715 1716 1717 /* There is no main table (other than the standard ACPI header) */ 1718 1719 /* Subtables */ 1720 1721 Offset = sizeof (ACPI_TABLE_HEADER); 1722 while (Offset < Table->Length) 1723 { 1724 AcpiOsPrintf ("\n"); 1725 1726 /* Common subtable header */ 1727 1728 Subtable = ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Table, Offset); 1729 if (Subtable->Length < sizeof (ACPI_SUBTABLE_HEADER)) 1730 { 1731 AcpiOsPrintf ("Invalid subtable length\n"); 1732 return; 1733 } 1734 Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, 1735 Subtable->Length, AcpiDmTableInfoPpttHdr); 1736 if (ACPI_FAILURE (Status)) 1737 { 1738 return; 1739 } 1740 1741 switch (Subtable->Type) 1742 { 1743 case ACPI_PPTT_TYPE_PROCESSOR: 1744 1745 InfoTable = AcpiDmTableInfoPptt0; 1746 Length = sizeof (ACPI_PPTT_PROCESSOR); 1747 break; 1748 1749 case ACPI_PPTT_TYPE_CACHE: 1750 1751 InfoTable = AcpiDmTableInfoPptt1; 1752 Length = sizeof (ACPI_PPTT_CACHE); 1753 break; 1754 1755 case ACPI_PPTT_TYPE_ID: 1756 1757 InfoTable = AcpiDmTableInfoPptt2; 1758 Length = sizeof (ACPI_PPTT_ID); 1759 break; 1760 1761 default: 1762 1763 AcpiOsPrintf ("\n**** Unknown PPTT subtable type 0x%X\n\n", 1764 Subtable->Type); 1765 1766 /* Attempt to continue */ 1767 1768 goto NextSubtable; 1769 } 1770 1771 if (Subtable->Length < Length) 1772 { 1773 AcpiOsPrintf ("Invalid subtable length\n"); 1774 return; 1775 } 1776 Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, 1777 Subtable->Length, InfoTable); 1778 if (ACPI_FAILURE (Status)) 1779 { 1780 return; 1781 } 1782 SubtableOffset = Length; 1783 1784 switch (Subtable->Type) 1785 { 1786 case ACPI_PPTT_TYPE_PROCESSOR: 1787 1788 PpttProcessor = ACPI_CAST_PTR (ACPI_PPTT_PROCESSOR, Subtable); 1789 1790 /* Dump SMBIOS handles */ 1791 1792 if ((UINT8)(Subtable->Length - SubtableOffset) < 1793 (UINT8)(PpttProcessor->NumberOfPrivResources * 4)) 1794 { 1795 AcpiOsPrintf ("Invalid private resource number\n"); 1796 return; 1797 } 1798 for (i = 0; i < PpttProcessor->NumberOfPrivResources; i++) 1799 { 1800 Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset, 1801 ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Subtable, SubtableOffset), 1802 4, AcpiDmTableInfoPptt0a); 1803 SubtableOffset += 4; 1804 } 1805 break; 1806 1807 default: 1808 1809 break; 1810 } 1811 1812 NextSubtable: 1813 /* Point to next subtable */ 1814 1815 Offset += Subtable->Length; 1816 } 1817 } 1818 1819 1820 /******************************************************************************* 1821 * 1822 * FUNCTION: AcpiDmDumpS3pt 1823 * 1824 * PARAMETERS: Table - A S3PT table 1825 * 1826 * RETURN: Length of the table 1827 * 1828 * DESCRIPTION: Format the contents of a S3PT 1829 * 1830 ******************************************************************************/ 1831 1832 UINT32 1833 AcpiDmDumpS3pt ( 1834 ACPI_TABLE_HEADER *Tables) 1835 { 1836 ACPI_STATUS Status; 1837 UINT32 Offset = sizeof (ACPI_TABLE_S3PT); 1838 ACPI_FPDT_HEADER *Subtable; 1839 ACPI_DMTABLE_INFO *InfoTable; 1840 ACPI_TABLE_S3PT *S3ptTable = ACPI_CAST_PTR (ACPI_TABLE_S3PT, Tables); 1841 1842 1843 /* Main table */ 1844 1845 Status = AcpiDmDumpTable (Offset, 0, S3ptTable, 0, AcpiDmTableInfoS3pt); 1846 if (ACPI_FAILURE (Status)) 1847 { 1848 return 0; 1849 } 1850 1851 Subtable = ACPI_ADD_PTR (ACPI_FPDT_HEADER, S3ptTable, Offset); 1852 while (Offset < S3ptTable->Length) 1853 { 1854 /* Common subtable header */ 1855 1856 AcpiOsPrintf ("\n"); 1857 Status = AcpiDmDumpTable (S3ptTable->Length, Offset, Subtable, 1858 Subtable->Length, AcpiDmTableInfoS3ptHdr); 1859 if (ACPI_FAILURE (Status)) 1860 { 1861 return 0; 1862 } 1863 1864 switch (Subtable->Type) 1865 { 1866 case ACPI_S3PT_TYPE_RESUME: 1867 1868 InfoTable = AcpiDmTableInfoS3pt0; 1869 break; 1870 1871 case ACPI_S3PT_TYPE_SUSPEND: 1872 1873 InfoTable = AcpiDmTableInfoS3pt1; 1874 break; 1875 1876 default: 1877 1878 AcpiOsPrintf ("\n**** Unknown S3PT subtable type 0x%X\n", 1879 Subtable->Type); 1880 1881 /* Attempt to continue */ 1882 1883 if (!Subtable->Length) 1884 { 1885 AcpiOsPrintf ("Invalid zero length subtable\n"); 1886 return 0; 1887 } 1888 goto NextSubtable; 1889 } 1890 1891 AcpiOsPrintf ("\n"); 1892 Status = AcpiDmDumpTable (S3ptTable->Length, Offset, Subtable, 1893 Subtable->Length, InfoTable); 1894 if (ACPI_FAILURE (Status)) 1895 { 1896 return 0; 1897 } 1898 1899 NextSubtable: 1900 /* Point to next subtable */ 1901 1902 Offset += Subtable->Length; 1903 Subtable = ACPI_ADD_PTR (ACPI_FPDT_HEADER, Subtable, Subtable->Length); 1904 } 1905 1906 return (S3ptTable->Length); 1907 } 1908 1909 1910 /******************************************************************************* 1911 * 1912 * FUNCTION: AcpiDmDumpSdev 1913 * 1914 * PARAMETERS: Table - A SDEV table 1915 * 1916 * RETURN: None 1917 * 1918 * DESCRIPTION: Format the contents of a SDEV. This is a variable-length 1919 * table that contains variable strings and vendor data. 1920 * 1921 ******************************************************************************/ 1922 1923 void 1924 AcpiDmDumpSdev ( 1925 ACPI_TABLE_HEADER *Table) 1926 { 1927 ACPI_STATUS Status; 1928 ACPI_SDEV_HEADER *Subtable; 1929 ACPI_SDEV_PCIE *Pcie; 1930 ACPI_SDEV_NAMESPACE *Namesp; 1931 ACPI_DMTABLE_INFO *InfoTable; 1932 UINT32 Length = Table->Length; 1933 UINT32 Offset = sizeof (ACPI_TABLE_SDEV); 1934 UINT16 PathOffset; 1935 UINT16 PathLength; 1936 UINT16 VendorDataOffset; 1937 UINT16 VendorDataLength; 1938 1939 1940 /* Main table */ 1941 1942 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoSdev); 1943 if (ACPI_FAILURE (Status)) 1944 { 1945 return; 1946 } 1947 1948 /* Subtables */ 1949 1950 Subtable = ACPI_ADD_PTR (ACPI_SDEV_HEADER, Table, Offset); 1951 while (Offset < Table->Length) 1952 { 1953 /* Common subtable header */ 1954 1955 AcpiOsPrintf ("\n"); 1956 Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, 1957 Subtable->Length, AcpiDmTableInfoSdevHdr); 1958 if (ACPI_FAILURE (Status)) 1959 { 1960 return; 1961 } 1962 1963 switch (Subtable->Type) 1964 { 1965 case ACPI_SDEV_TYPE_NAMESPACE_DEVICE: 1966 1967 InfoTable = AcpiDmTableInfoSdev0; 1968 break; 1969 1970 case ACPI_SDEV_TYPE_PCIE_ENDPOINT_DEVICE: 1971 1972 InfoTable = AcpiDmTableInfoSdev1; 1973 break; 1974 1975 default: 1976 goto NextSubtable; 1977 } 1978 1979 AcpiOsPrintf ("\n"); 1980 Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, 1981 Subtable->Length, InfoTable); 1982 if (ACPI_FAILURE (Status)) 1983 { 1984 return; 1985 } 1986 1987 switch (Subtable->Type) 1988 { 1989 case ACPI_SDEV_TYPE_NAMESPACE_DEVICE: 1990 1991 /* Dump the PCIe device ID(s) */ 1992 1993 Namesp = ACPI_CAST_PTR (ACPI_SDEV_NAMESPACE, Subtable); 1994 PathOffset = Namesp->DeviceIdOffset; 1995 PathLength = Namesp->DeviceIdLength; 1996 1997 if (PathLength) 1998 { 1999 Status = AcpiDmDumpTable (Table->Length, 0, 2000 ACPI_ADD_PTR (UINT8, Namesp, PathOffset), 2001 PathLength, AcpiDmTableInfoSdev0a); 2002 if (ACPI_FAILURE (Status)) 2003 { 2004 return; 2005 } 2006 } 2007 2008 /* Dump the vendor-specific data */ 2009 2010 VendorDataLength = 2011 Namesp->VendorDataLength; 2012 VendorDataOffset = 2013 Namesp->DeviceIdOffset + Namesp->DeviceIdLength; 2014 2015 if (VendorDataLength) 2016 { 2017 Status = AcpiDmDumpTable (Table->Length, 0, 2018 ACPI_ADD_PTR (UINT8, Namesp, VendorDataOffset), 2019 VendorDataLength, AcpiDmTableInfoSdev1b); 2020 if (ACPI_FAILURE (Status)) 2021 { 2022 return; 2023 } 2024 } 2025 break; 2026 2027 case ACPI_SDEV_TYPE_PCIE_ENDPOINT_DEVICE: 2028 2029 /* PCI path substructures */ 2030 2031 Pcie = ACPI_CAST_PTR (ACPI_SDEV_PCIE, Subtable); 2032 PathOffset = Pcie->PathOffset; 2033 PathLength = Pcie->PathLength; 2034 2035 while (PathLength) 2036 { 2037 Status = AcpiDmDumpTable (Table->Length, 2038 PathOffset + Offset, 2039 ACPI_ADD_PTR (UINT8, Pcie, PathOffset), 2040 sizeof (ACPI_SDEV_PCIE_PATH), AcpiDmTableInfoSdev1a); 2041 if (ACPI_FAILURE (Status)) 2042 { 2043 return; 2044 } 2045 2046 PathOffset += sizeof (ACPI_SDEV_PCIE_PATH); 2047 PathLength -= sizeof (ACPI_SDEV_PCIE_PATH); 2048 } 2049 2050 /* VendorData */ 2051 2052 VendorDataLength = Pcie->VendorDataLength; 2053 VendorDataOffset = Pcie->PathOffset + Pcie->PathLength; 2054 2055 if (VendorDataLength) 2056 { 2057 Status = AcpiDmDumpTable (Table->Length, 0, 2058 ACPI_ADD_PTR (UINT8, Pcie, VendorDataOffset), 2059 VendorDataLength, AcpiDmTableInfoSdev1b); 2060 } 2061 break; 2062 2063 default: 2064 goto NextSubtable; 2065 } 2066 2067 NextSubtable: 2068 /* Point to next subtable */ 2069 2070 Offset += Subtable->Length; 2071 Subtable = ACPI_ADD_PTR (ACPI_SDEV_HEADER, Subtable, 2072 Subtable->Length); 2073 } 2074 } 2075