1 /****************************************************************************** 2 * 3 * Module Name: dmtbdump3 - Dump ACPI data tables that contain no AML code 4 * 5 *****************************************************************************/ 6 7 /* 8 * Copyright (C) 2000 - 2025, 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 MERCHANTABILITY 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 #include "acpi.h" 45 #include "accommon.h" 46 #include "acdisasm.h" 47 #include "actables.h" 48 49 /* This module used for application-level code only */ 50 51 #define _COMPONENT ACPI_CA_DISASSEMBLER 52 ACPI_MODULE_NAME ("dmtbdump3") 53 54 55 /******************************************************************************* 56 * 57 * FUNCTION: AcpiDmDumpSlic 58 * 59 * PARAMETERS: Table - A SLIC table 60 * 61 * RETURN: None 62 * 63 * DESCRIPTION: Format the contents of a SLIC 64 * 65 ******************************************************************************/ 66 67 void 68 AcpiDmDumpSlic ( 69 ACPI_TABLE_HEADER *Table) 70 { 71 72 (void) AcpiDmDumpTable (Table->Length, sizeof (ACPI_TABLE_HEADER), 73 (void *) ((UINT8 *)Table + sizeof (*Table)), 74 Table->Length - sizeof (*Table), AcpiDmTableInfoSlic); 75 } 76 77 78 /******************************************************************************* 79 * 80 * FUNCTION: AcpiDmDumpSlit 81 * 82 * PARAMETERS: Table - An SLIT 83 * 84 * RETURN: None 85 * 86 * DESCRIPTION: Format the contents of a SLIT 87 * 88 ******************************************************************************/ 89 90 void 91 AcpiDmDumpSlit ( 92 ACPI_TABLE_HEADER *Table) 93 { 94 ACPI_STATUS Status; 95 UINT32 Offset; 96 UINT8 *Row; 97 UINT32 Localities; 98 UINT32 i; 99 UINT32 j; 100 101 102 /* Main table */ 103 104 Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoSlit); 105 if (ACPI_FAILURE (Status)) 106 { 107 return; 108 } 109 110 /* Display the Locality NxN Matrix */ 111 112 Localities = (UINT32) ACPI_CAST_PTR (ACPI_TABLE_SLIT, Table)->LocalityCount; 113 Offset = ACPI_OFFSET (ACPI_TABLE_SLIT, Entry[0]); 114 Row = (UINT8 *) ACPI_CAST_PTR (ACPI_TABLE_SLIT, Table)->Entry; 115 116 for (i = 0; i < Localities; i++) 117 { 118 /* Display one row of the matrix */ 119 120 AcpiDmLineHeader2 (Offset, Localities, "Locality", i); 121 for (j = 0; j < Localities; j++) 122 { 123 /* Check for beyond EOT */ 124 125 if (Offset >= Table->Length) 126 { 127 AcpiOsPrintf ( 128 "\n**** Not enough room in table for all localities\n"); 129 return; 130 } 131 132 AcpiOsPrintf ("%2.2X", Row[j]); 133 Offset++; 134 135 /* Display up to 16 bytes per output row */ 136 137 if ((j+1) < Localities) 138 { 139 AcpiOsPrintf (" "); 140 141 if (j && (((j+1) % 16) == 0)) 142 { 143 AcpiOsPrintf ("\\\n"); /* With line continuation char */ 144 AcpiDmLineHeader (Offset, 0, NULL); 145 } 146 } 147 } 148 149 /* Point to next row */ 150 151 AcpiOsPrintf ("\n"); 152 Row += Localities; 153 } 154 } 155 156 157 /******************************************************************************* 158 * 159 * FUNCTION: AcpiDmDumpSrat 160 * 161 * PARAMETERS: Table - A SRAT table 162 * 163 * RETURN: None 164 * 165 * DESCRIPTION: Format the contents of a SRAT 166 * 167 ******************************************************************************/ 168 169 void 170 AcpiDmDumpSrat ( 171 ACPI_TABLE_HEADER *Table) 172 { 173 ACPI_STATUS Status; 174 UINT32 Offset = sizeof (ACPI_TABLE_SRAT); 175 ACPI_SUBTABLE_HEADER *Subtable; 176 ACPI_DMTABLE_INFO *InfoTable; 177 178 179 /* Main table */ 180 181 Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoSrat); 182 if (ACPI_FAILURE (Status)) 183 { 184 return; 185 } 186 187 /* Subtables */ 188 189 Subtable = ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Table, Offset); 190 while (Offset < Table->Length) 191 { 192 /* Common subtable header */ 193 194 AcpiOsPrintf ("\n"); 195 Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, 196 Subtable->Length, AcpiDmTableInfoSratHdr); 197 if (ACPI_FAILURE (Status)) 198 { 199 return; 200 } 201 202 switch (Subtable->Type) 203 { 204 case ACPI_SRAT_TYPE_CPU_AFFINITY: 205 206 InfoTable = AcpiDmTableInfoSrat0; 207 break; 208 209 case ACPI_SRAT_TYPE_MEMORY_AFFINITY: 210 211 InfoTable = AcpiDmTableInfoSrat1; 212 break; 213 214 case ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY: 215 216 InfoTable = AcpiDmTableInfoSrat2; 217 break; 218 219 case ACPI_SRAT_TYPE_GICC_AFFINITY: 220 221 InfoTable = AcpiDmTableInfoSrat3; 222 break; 223 224 case ACPI_SRAT_TYPE_GIC_ITS_AFFINITY: 225 226 InfoTable = AcpiDmTableInfoSrat4; 227 break; 228 229 case ACPI_SRAT_TYPE_GENERIC_AFFINITY: 230 231 InfoTable = AcpiDmTableInfoSrat5; 232 break; 233 234 case ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY: 235 236 InfoTable = AcpiDmTableInfoSrat6; 237 break; 238 239 case ACPI_SRAT_TYPE_RINTC_AFFINITY: 240 241 InfoTable = AcpiDmTableInfoSrat7; 242 break; 243 244 default: 245 AcpiOsPrintf ("\n**** Unknown SRAT subtable type 0x%X\n", 246 Subtable->Type); 247 248 /* Attempt to continue */ 249 250 if (!Subtable->Length) 251 { 252 AcpiOsPrintf ("Invalid zero length subtable\n"); 253 return; 254 } 255 goto NextSubtable; 256 } 257 258 AcpiOsPrintf ("\n"); 259 Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, 260 Subtable->Length, InfoTable); 261 if (ACPI_FAILURE (Status)) 262 { 263 return; 264 } 265 266 NextSubtable: 267 /* Point to next subtable */ 268 269 Offset += Subtable->Length; 270 Subtable = ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Subtable, 271 Subtable->Length); 272 } 273 } 274 275 276 /******************************************************************************* 277 * 278 * FUNCTION: AcpiDmDumpStao 279 * 280 * PARAMETERS: Table - A STAO table 281 * 282 * RETURN: None 283 * 284 * DESCRIPTION: Format the contents of a STAO. This is a variable-length 285 * table that contains an open-ended number of ASCII strings 286 * at the end of the table. 287 * 288 ******************************************************************************/ 289 290 void 291 AcpiDmDumpStao ( 292 ACPI_TABLE_HEADER *Table) 293 { 294 ACPI_STATUS Status; 295 char *Namepath; 296 UINT32 Length = Table->Length; 297 UINT32 StringLength; 298 UINT32 Offset = sizeof (ACPI_TABLE_STAO); 299 300 301 /* Main table */ 302 303 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoStao); 304 if (ACPI_FAILURE (Status)) 305 { 306 return; 307 } 308 309 /* The rest of the table consists of Namepath strings */ 310 311 while (Offset < Table->Length) 312 { 313 Namepath = ACPI_ADD_PTR (char, Table, Offset); 314 StringLength = strlen (Namepath) + 1; 315 316 AcpiDmLineHeader (Offset, StringLength, "Namepath"); 317 AcpiOsPrintf ("\"%s\"\n", Namepath); 318 319 /* Point to next namepath */ 320 321 Offset += StringLength; 322 } 323 } 324 325 326 /******************************************************************************* 327 * 328 * FUNCTION: AcpiDmDumpSvkl 329 * 330 * PARAMETERS: Table - A SVKL table 331 * 332 * RETURN: None 333 * 334 * DESCRIPTION: Format the contents of a SVKL. This is a variable-length 335 * table that contains an open-ended number of key subtables at 336 * the end of the header. 337 * 338 * NOTES: SVKL is essentially a flat table, with a small main table and 339 * a variable number of a single type of subtable. 340 * 341 ******************************************************************************/ 342 343 void 344 AcpiDmDumpSvkl ( 345 ACPI_TABLE_HEADER *Table) 346 { 347 ACPI_STATUS Status; 348 UINT32 Length = Table->Length; 349 UINT32 Offset = sizeof (ACPI_TABLE_SVKL); 350 ACPI_SVKL_KEY *Subtable; 351 352 353 /* Main table */ 354 355 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoSvkl); 356 if (ACPI_FAILURE (Status)) 357 { 358 return; 359 } 360 361 /* The rest of the table consists of subtables (single type) */ 362 363 Subtable = ACPI_ADD_PTR (ACPI_SVKL_KEY, Table, Offset); 364 while (Offset < Table->Length) 365 { 366 /* Dump the subtable */ 367 368 AcpiOsPrintf ("\n"); 369 Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, 370 sizeof (ACPI_SVKL_KEY), AcpiDmTableInfoSvkl0); 371 if (ACPI_FAILURE (Status)) 372 { 373 return; 374 } 375 376 /* Point to next subtable */ 377 378 Offset += sizeof (ACPI_SVKL_KEY); 379 Subtable = ACPI_ADD_PTR (ACPI_SVKL_KEY, Subtable, 380 sizeof (ACPI_SVKL_KEY)); 381 } 382 } 383 384 385 /******************************************************************************* 386 * 387 * FUNCTION: AcpiDmDumpSwft 388 * 389 * PARAMETERS: Table - A SWFT table 390 * 391 * RETURN: None 392 * 393 * DESCRIPTION: Format the contents of a SWFT. This is a variable-length 394 * table that contains an open-ended number of SoundWire files 395 * after the end of the header. 396 * 397 ******************************************************************************/ 398 399 void 400 AcpiDmDumpSwft ( 401 ACPI_TABLE_HEADER *Table) 402 { 403 ACPI_STATUS Status; 404 UINT32 Length = Table->Length; 405 UINT32 Offset = sizeof (ACPI_TABLE_SWFT); 406 ACPI_SWFT_FILE *SubtableHdr; 407 ACPI_SWFT_FILE *SubtableData; 408 409 410 /* Main table */ 411 412 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoSwft); 413 if (ACPI_FAILURE (Status)) 414 { 415 return; 416 } 417 418 /* The rest of the table consists of subtables (single type) */ 419 420 while (Offset < Table->Length) 421 { 422 SubtableHdr = ACPI_ADD_PTR (ACPI_SWFT_FILE, Table, Offset); 423 424 /* Dump the subtable */ 425 426 AcpiOsPrintf ("\n"); 427 Status = AcpiDmDumpTable (Table->Length, Offset, SubtableHdr, 428 sizeof (ACPI_SWFT_FILE), AcpiDmTableInfoSwftFileHdr); 429 if (ACPI_FAILURE (Status)) 430 { 431 return; 432 } 433 434 Offset += sizeof(ACPI_SWFT_FILE); 435 436 SubtableData = ACPI_ADD_PTR (ACPI_SWFT_FILE, Table, Offset); 437 438 Status = AcpiDmDumpTable (Table->Length, Offset, SubtableData, 439 SubtableHdr->FileLength - sizeof(ACPI_SWFT_FILE), AcpiDmTableInfoSwftFileData); 440 if (ACPI_FAILURE (Status)) 441 { 442 return; 443 } 444 445 /* Point to next subtable */ 446 447 Offset += SubtableHdr->FileLength - sizeof(ACPI_SWFT_FILE); 448 } 449 } 450 451 452 /******************************************************************************* 453 * 454 * FUNCTION: AcpiDmDumpTcpa 455 * 456 * PARAMETERS: Table - A TCPA table 457 * 458 * RETURN: None 459 * 460 * DESCRIPTION: Format the contents of a TCPA. 461 * 462 * NOTE: There are two versions of the table with the same signature: 463 * the client version and the server version. The common 464 * PlatformClass field is used to differentiate the two types of 465 * tables. 466 * 467 ******************************************************************************/ 468 469 void 470 AcpiDmDumpTcpa ( 471 ACPI_TABLE_HEADER *Table) 472 { 473 UINT32 Offset = sizeof (ACPI_TABLE_TCPA_HDR); 474 ACPI_TABLE_TCPA_HDR *CommonHeader = ACPI_CAST_PTR ( 475 ACPI_TABLE_TCPA_HDR, Table); 476 ACPI_TABLE_TCPA_HDR *Subtable = ACPI_ADD_PTR ( 477 ACPI_TABLE_TCPA_HDR, Table, Offset); 478 ACPI_STATUS Status; 479 480 481 /* Main table */ 482 483 Status = AcpiDmDumpTable (Table->Length, 0, Table, 484 0, AcpiDmTableInfoTcpaHdr); 485 if (ACPI_FAILURE (Status)) 486 { 487 return; 488 } 489 490 /* 491 * Examine the PlatformClass field to determine the table type. 492 * Either a client or server table. Only one. 493 */ 494 switch (CommonHeader->PlatformClass) 495 { 496 case ACPI_TCPA_CLIENT_TABLE: 497 498 Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, 499 Table->Length - Offset, AcpiDmTableInfoTcpaClient); 500 break; 501 502 case ACPI_TCPA_SERVER_TABLE: 503 504 Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, 505 Table->Length - Offset, AcpiDmTableInfoTcpaServer); 506 break; 507 508 default: 509 510 AcpiOsPrintf ("\n**** Unknown TCPA Platform Class 0x%X\n", 511 CommonHeader->PlatformClass); 512 Status = AE_ERROR; 513 break; 514 } 515 516 if (ACPI_FAILURE (Status)) 517 { 518 AcpiOsPrintf ("\n**** Cannot disassemble TCPA table\n"); 519 } 520 } 521 522 523 /******************************************************************************* 524 * 525 * FUNCTION: AcpiDmDumpTpm2 526 * 527 * PARAMETERS: Table - A TPM2 table 528 * 529 * RETURN: None 530 * 531 * DESCRIPTION: Format the contents of a TPM2. 532 * 533 ******************************************************************************/ 534 535 static void 536 AcpiDmDumpTpm2Rev3 ( 537 ACPI_TABLE_HEADER *Table) 538 { 539 UINT32 Offset = sizeof (ACPI_TABLE_TPM23); 540 ACPI_TABLE_TPM23 *CommonHeader = ACPI_CAST_PTR (ACPI_TABLE_TPM23, Table); 541 ACPI_TPM23_TRAILER *Subtable = ACPI_ADD_PTR (ACPI_TPM23_TRAILER, Table, Offset); 542 ACPI_STATUS Status; 543 544 545 /* Main table */ 546 547 Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoTpm23); 548 if (ACPI_FAILURE (Status)) 549 { 550 return; 551 } 552 553 /* Optional subtable if start method is ACPI start method */ 554 555 switch (CommonHeader->StartMethod) 556 { 557 case ACPI_TPM23_ACPI_START_METHOD: 558 559 (void) AcpiDmDumpTable (Table->Length, Offset, Subtable, 560 Table->Length - Offset, AcpiDmTableInfoTpm23a); 561 break; 562 563 default: 564 break; 565 } 566 } 567 568 569 /******************************************************************************* 570 * 571 * FUNCTION: AcpiDmDumpTpm2 572 * 573 * PARAMETERS: Table - A TPM2 table 574 * 575 * RETURN: None 576 * 577 * DESCRIPTION: Format the contents of a TPM2. 578 * 579 ******************************************************************************/ 580 581 void 582 AcpiDmDumpTpm2 ( 583 ACPI_TABLE_HEADER *Table) 584 { 585 UINT32 Offset = sizeof (ACPI_TABLE_TPM2); 586 ACPI_TABLE_TPM2 *CommonHeader = ACPI_CAST_PTR (ACPI_TABLE_TPM2, Table); 587 ACPI_TPM2_TRAILER *Subtable = ACPI_ADD_PTR (ACPI_TPM2_TRAILER, Table, Offset); 588 ACPI_TPM2_ARM_SMC *ArmSubtable; 589 ACPI_STATUS Status; 590 591 592 if (Table->Revision == 3) 593 { 594 AcpiDmDumpTpm2Rev3(Table); 595 return; 596 } 597 598 /* Main table */ 599 600 Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoTpm2); 601 602 if (ACPI_FAILURE (Status)) 603 { 604 return; 605 } 606 607 AcpiOsPrintf ("\n"); 608 Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, 609 Table->Length - Offset, AcpiDmTableInfoTpm2a); 610 if (ACPI_FAILURE (Status)) 611 { 612 return; 613 } 614 615 switch (CommonHeader->StartMethod) 616 { 617 case ACPI_TPM2_COMMAND_BUFFER_WITH_ARM_SMC: 618 619 ArmSubtable = ACPI_ADD_PTR (ACPI_TPM2_ARM_SMC, Subtable, 620 sizeof (ACPI_TPM2_TRAILER)); 621 Offset += sizeof (ACPI_TPM2_TRAILER); 622 623 AcpiOsPrintf ("\n"); 624 (void) AcpiDmDumpTable (Table->Length, Offset, ArmSubtable, 625 Table->Length - Offset, AcpiDmTableInfoTpm211); 626 break; 627 628 default: 629 break; 630 } 631 } 632 633 634 /******************************************************************************* 635 * 636 * FUNCTION: AcpiDmDumpViot 637 * 638 * PARAMETERS: Table - A VIOT table 639 * 640 * RETURN: None 641 * 642 * DESCRIPTION: Format the contents of a VIOT 643 * 644 ******************************************************************************/ 645 646 void 647 AcpiDmDumpViot ( 648 ACPI_TABLE_HEADER *Table) 649 { 650 ACPI_STATUS Status; 651 ACPI_TABLE_VIOT *Viot; 652 ACPI_VIOT_HEADER *ViotHeader; 653 UINT16 Length; 654 UINT32 Offset; 655 ACPI_DMTABLE_INFO *InfoTable; 656 657 /* Main table */ 658 659 Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoViot); 660 if (ACPI_FAILURE (Status)) 661 { 662 return; 663 } 664 665 Viot = ACPI_CAST_PTR (ACPI_TABLE_VIOT, Table); 666 667 Offset = Viot->NodeOffset; 668 while (Offset < Table->Length) 669 { 670 /* Common subtable header */ 671 ViotHeader = ACPI_ADD_PTR (ACPI_VIOT_HEADER, Table, Offset); 672 AcpiOsPrintf ("\n"); 673 674 Length = sizeof (ACPI_VIOT_HEADER); 675 Status = AcpiDmDumpTable (Table->Length, Offset, ViotHeader, Length, 676 AcpiDmTableInfoViotHeader); 677 if (ACPI_FAILURE (Status)) 678 { 679 return; 680 } 681 682 Length = ViotHeader->Length; 683 switch (ViotHeader->Type) 684 { 685 case ACPI_VIOT_NODE_PCI_RANGE: 686 687 InfoTable = AcpiDmTableInfoViot1; 688 break; 689 690 case ACPI_VIOT_NODE_MMIO: 691 692 InfoTable = AcpiDmTableInfoViot2; 693 break; 694 695 case ACPI_VIOT_NODE_VIRTIO_IOMMU_PCI: 696 697 InfoTable = AcpiDmTableInfoViot3; 698 break; 699 700 case ACPI_VIOT_NODE_VIRTIO_IOMMU_MMIO: 701 702 InfoTable = AcpiDmTableInfoViot4; 703 break; 704 705 default: 706 707 AcpiOsPrintf ("\n*** Unknown VIOT node type 0x%X\n", 708 ViotHeader->Type); 709 710 /* Attempt to continue */ 711 712 if (!Length) 713 { 714 AcpiOsPrintf ("Invalid zero length VIOT node\n"); 715 return; 716 } 717 goto NextSubtable; 718 } 719 720 AcpiOsPrintf ("\n"); 721 Status = AcpiDmDumpTable (Table->Length, Offset, ViotHeader, Length, 722 InfoTable); 723 if (ACPI_FAILURE (Status)) 724 { 725 return; 726 } 727 728 NextSubtable: 729 Offset += Length; 730 } 731 } 732 733 734 /******************************************************************************* 735 * 736 * FUNCTION: AcpiDmDumpWdat 737 * 738 * PARAMETERS: Table - A WDAT table 739 * 740 * RETURN: None 741 * 742 * DESCRIPTION: Format the contents of a WDAT 743 * 744 ******************************************************************************/ 745 746 void 747 AcpiDmDumpWdat ( 748 ACPI_TABLE_HEADER *Table) 749 { 750 ACPI_STATUS Status; 751 UINT32 Offset = sizeof (ACPI_TABLE_WDAT); 752 ACPI_WDAT_ENTRY *Subtable; 753 754 755 /* Main table */ 756 757 Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoWdat); 758 if (ACPI_FAILURE (Status)) 759 { 760 return; 761 } 762 763 /* Subtables */ 764 765 Subtable = ACPI_ADD_PTR (ACPI_WDAT_ENTRY, Table, Offset); 766 while (Offset < Table->Length) 767 { 768 /* Common subtable header */ 769 770 AcpiOsPrintf ("\n"); 771 Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, 772 sizeof (ACPI_WDAT_ENTRY), AcpiDmTableInfoWdat0); 773 if (ACPI_FAILURE (Status)) 774 { 775 return; 776 } 777 778 /* Point to next subtable */ 779 780 Offset += sizeof (ACPI_WDAT_ENTRY); 781 Subtable = ACPI_ADD_PTR (ACPI_WDAT_ENTRY, Subtable, 782 sizeof (ACPI_WDAT_ENTRY)); 783 } 784 } 785 786 787 /******************************************************************************* 788 * 789 * FUNCTION: AcpiDmDumpWpbt 790 * 791 * PARAMETERS: Table - A WPBT table 792 * 793 * RETURN: None 794 * 795 * DESCRIPTION: Format the contents of a WPBT. This table type consists 796 * of an open-ended arguments buffer at the end of the table. 797 * 798 ******************************************************************************/ 799 800 void 801 AcpiDmDumpWpbt ( 802 ACPI_TABLE_HEADER *Table) 803 { 804 ACPI_STATUS Status; 805 ACPI_TABLE_WPBT *Subtable; 806 UINT16 ArgumentsLength; 807 808 809 /* Dump the main table */ 810 811 Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoWpbt); 812 if (ACPI_FAILURE (Status)) 813 { 814 return; 815 } 816 817 /* Extract the arguments buffer length from the main table */ 818 819 Subtable = ACPI_CAST_PTR (ACPI_TABLE_WPBT, Table); 820 ArgumentsLength = Subtable->ArgumentsLength; 821 822 /* Dump the arguments buffer if present */ 823 824 if (ArgumentsLength) 825 { 826 (void) AcpiDmDumpTable (Table->Length, 0, Table, ArgumentsLength, 827 AcpiDmTableInfoWpbt0); 828 } 829 } 830