1 /****************************************************************************** 2 * 3 * Module Name: dmtbdump - Dump ACPI data tables that contain no AML code 4 * 5 *****************************************************************************/ 6 7 /* 8 * Copyright (C) 2000 - 2014, 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 #include <contrib/dev/acpica/include/acpi.h> 45 #include <contrib/dev/acpica/include/accommon.h> 46 #include <contrib/dev/acpica/include/acdisasm.h> 47 #include <contrib/dev/acpica/include/actables.h> 48 49 /* This module used for application-level code only */ 50 51 #define _COMPONENT ACPI_CA_DISASSEMBLER 52 ACPI_MODULE_NAME ("dmtbdump") 53 54 55 /* Local prototypes */ 56 57 static void 58 AcpiDmValidateFadtLength ( 59 UINT32 Revision, 60 UINT32 Length); 61 62 static void 63 AcpiDmDumpBuffer ( 64 void *Table, 65 UINT32 BufferOffset, 66 UINT32 Length, 67 UINT32 AbsoluteOffset, 68 char *Header); 69 70 71 /******************************************************************************* 72 * 73 * FUNCTION: AcpiDmDumpBuffer 74 * 75 * PARAMETERS: Table - ACPI Table or subtable 76 * BufferOffset - Offset of buffer from Table above 77 * Length - Length of the buffer 78 * AbsoluteOffset - Offset of buffer in the main ACPI table 79 * Header - Name of the buffer field (printed on the 80 * first line only.) 81 * 82 * RETURN: None 83 * 84 * DESCRIPTION: Format the contents of an arbitrary length data buffer (in the 85 * disassembler output format.) 86 * 87 ******************************************************************************/ 88 89 static void 90 AcpiDmDumpBuffer ( 91 void *Table, 92 UINT32 BufferOffset, 93 UINT32 Length, 94 UINT32 AbsoluteOffset, 95 char *Header) 96 { 97 UINT8 *Buffer; 98 UINT32 i; 99 100 101 if (!Length) 102 { 103 return; 104 } 105 106 Buffer = ACPI_CAST_PTR (UINT8, Table) + BufferOffset; 107 i = 0; 108 109 while (i < Length) 110 { 111 if (!(i % 16)) 112 { 113 AcpiOsPrintf ("\n"); 114 AcpiDmLineHeader (AbsoluteOffset, 115 ((Length - i) > 16) ? 16 : (Length - i), Header); 116 Header = NULL; 117 } 118 119 AcpiOsPrintf ("%.02X ", *Buffer); 120 i++; 121 Buffer++; 122 AbsoluteOffset++; 123 } 124 125 AcpiOsPrintf ("\n"); 126 } 127 128 129 /******************************************************************************* 130 * 131 * FUNCTION: AcpiDmDumpRsdp 132 * 133 * PARAMETERS: Table - A RSDP 134 * 135 * RETURN: Length of the table (there is not always a length field, 136 * use revision or length if available (ACPI 2.0+)) 137 * 138 * DESCRIPTION: Format the contents of a RSDP 139 * 140 ******************************************************************************/ 141 142 UINT32 143 AcpiDmDumpRsdp ( 144 ACPI_TABLE_HEADER *Table) 145 { 146 ACPI_TABLE_RSDP *Rsdp = ACPI_CAST_PTR (ACPI_TABLE_RSDP, Table); 147 UINT32 Length = sizeof (ACPI_RSDP_COMMON); 148 UINT8 Checksum; 149 150 151 /* Dump the common ACPI 1.0 portion */ 152 153 AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoRsdp1); 154 155 /* Validate the first checksum */ 156 157 Checksum = AcpiDmGenerateChecksum (Rsdp, sizeof (ACPI_RSDP_COMMON), 158 Rsdp->Checksum); 159 if (Checksum != Rsdp->Checksum) 160 { 161 AcpiOsPrintf ("/* Incorrect Checksum above, should be 0x%2.2X */\n", 162 Checksum); 163 } 164 165 /* The RSDP for ACPI 2.0+ contains more data and has a Length field */ 166 167 if (Rsdp->Revision > 0) 168 { 169 Length = Rsdp->Length; 170 AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoRsdp2); 171 172 /* Validate the extended checksum over entire RSDP */ 173 174 Checksum = AcpiDmGenerateChecksum (Rsdp, sizeof (ACPI_TABLE_RSDP), 175 Rsdp->ExtendedChecksum); 176 if (Checksum != Rsdp->ExtendedChecksum) 177 { 178 AcpiOsPrintf ( 179 "/* Incorrect Extended Checksum above, should be 0x%2.2X */\n", 180 Checksum); 181 } 182 } 183 184 return (Length); 185 } 186 187 188 /******************************************************************************* 189 * 190 * FUNCTION: AcpiDmDumpRsdt 191 * 192 * PARAMETERS: Table - A RSDT 193 * 194 * RETURN: None 195 * 196 * DESCRIPTION: Format the contents of a RSDT 197 * 198 ******************************************************************************/ 199 200 void 201 AcpiDmDumpRsdt ( 202 ACPI_TABLE_HEADER *Table) 203 { 204 UINT32 *Array; 205 UINT32 Entries; 206 UINT32 Offset; 207 UINT32 i; 208 209 210 /* Point to start of table pointer array */ 211 212 Array = ACPI_CAST_PTR (ACPI_TABLE_RSDT, Table)->TableOffsetEntry; 213 Offset = sizeof (ACPI_TABLE_HEADER); 214 215 /* RSDT uses 32-bit pointers */ 216 217 Entries = (Table->Length - sizeof (ACPI_TABLE_HEADER)) / sizeof (UINT32); 218 219 for (i = 0; i < Entries; i++) 220 { 221 AcpiDmLineHeader2 (Offset, sizeof (UINT32), "ACPI Table Address", i); 222 AcpiOsPrintf ("%8.8X\n", Array[i]); 223 Offset += sizeof (UINT32); 224 } 225 } 226 227 228 /******************************************************************************* 229 * 230 * FUNCTION: AcpiDmDumpXsdt 231 * 232 * PARAMETERS: Table - A XSDT 233 * 234 * RETURN: None 235 * 236 * DESCRIPTION: Format the contents of a XSDT 237 * 238 ******************************************************************************/ 239 240 void 241 AcpiDmDumpXsdt ( 242 ACPI_TABLE_HEADER *Table) 243 { 244 UINT64 *Array; 245 UINT32 Entries; 246 UINT32 Offset; 247 UINT32 i; 248 249 250 /* Point to start of table pointer array */ 251 252 Array = ACPI_CAST_PTR (ACPI_TABLE_XSDT, Table)->TableOffsetEntry; 253 Offset = sizeof (ACPI_TABLE_HEADER); 254 255 /* XSDT uses 64-bit pointers */ 256 257 Entries = (Table->Length - sizeof (ACPI_TABLE_HEADER)) / sizeof (UINT64); 258 259 for (i = 0; i < Entries; i++) 260 { 261 AcpiDmLineHeader2 (Offset, sizeof (UINT64), "ACPI Table Address", i); 262 AcpiOsPrintf ("%8.8X%8.8X\n", ACPI_FORMAT_UINT64 (Array[i])); 263 Offset += sizeof (UINT64); 264 } 265 } 266 267 268 /******************************************************************************* 269 * 270 * FUNCTION: AcpiDmDumpFadt 271 * 272 * PARAMETERS: Table - A FADT 273 * 274 * RETURN: None 275 * 276 * DESCRIPTION: Format the contents of a FADT 277 * 278 * NOTE: We cannot depend on the FADT version to indicate the actual 279 * contents of the FADT because of BIOS bugs. The table length 280 * is the only reliable indicator. 281 * 282 ******************************************************************************/ 283 284 void 285 AcpiDmDumpFadt ( 286 ACPI_TABLE_HEADER *Table) 287 { 288 289 /* Always dump the minimum FADT revision 1 fields (ACPI 1.0) */ 290 291 AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoFadt1); 292 293 /* Check for FADT revision 2 fields (ACPI 1.0B MS extensions) */ 294 295 if ((Table->Length > ACPI_FADT_V1_SIZE) && 296 (Table->Length <= ACPI_FADT_V2_SIZE)) 297 { 298 AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoFadt2); 299 } 300 301 /* Check for FADT revision 3/4 fields and up (ACPI 2.0+ extended data) */ 302 303 else if (Table->Length > ACPI_FADT_V2_SIZE) 304 { 305 AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoFadt3); 306 307 /* Check for FADT revision 5 fields and up (ACPI 5.0+) */ 308 309 if (Table->Length > ACPI_FADT_V3_SIZE) 310 { 311 AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoFadt5); 312 } 313 } 314 315 /* Validate various fields in the FADT, including length */ 316 317 AcpiTbCreateLocalFadt (Table, Table->Length); 318 319 /* Validate FADT length against the revision */ 320 321 AcpiDmValidateFadtLength (Table->Revision, Table->Length); 322 } 323 324 325 /******************************************************************************* 326 * 327 * FUNCTION: AcpiDmValidateFadtLength 328 * 329 * PARAMETERS: Revision - FADT revision (Header->Revision) 330 * Length - FADT length (Header->Length 331 * 332 * RETURN: None 333 * 334 * DESCRIPTION: Check the FADT revision against the expected table length for 335 * that revision. Issue a warning if the length is not what was 336 * expected. This seems to be such a common BIOS bug that the 337 * FADT revision has been rendered virtually meaningless. 338 * 339 ******************************************************************************/ 340 341 static void 342 AcpiDmValidateFadtLength ( 343 UINT32 Revision, 344 UINT32 Length) 345 { 346 UINT32 ExpectedLength; 347 348 349 switch (Revision) 350 { 351 case 0: 352 353 AcpiOsPrintf ("// ACPI Warning: Invalid FADT revision: 0\n"); 354 return; 355 356 case 1: 357 358 ExpectedLength = ACPI_FADT_V1_SIZE; 359 break; 360 361 case 2: 362 363 ExpectedLength = ACPI_FADT_V2_SIZE; 364 break; 365 366 case 3: 367 case 4: 368 369 ExpectedLength = ACPI_FADT_V3_SIZE; 370 break; 371 372 case 5: 373 374 ExpectedLength = ACPI_FADT_V5_SIZE; 375 break; 376 377 default: 378 379 return; 380 } 381 382 if (Length == ExpectedLength) 383 { 384 return; 385 } 386 387 AcpiOsPrintf ( 388 "\n// ACPI Warning: FADT revision %X does not match length: found %X expected %X\n", 389 Revision, Length, ExpectedLength); 390 } 391 392 393 /******************************************************************************* 394 * 395 * FUNCTION: AcpiDmDumpAsf 396 * 397 * PARAMETERS: Table - A ASF table 398 * 399 * RETURN: None 400 * 401 * DESCRIPTION: Format the contents of a ASF table 402 * 403 ******************************************************************************/ 404 405 void 406 AcpiDmDumpAsf ( 407 ACPI_TABLE_HEADER *Table) 408 { 409 ACPI_STATUS Status; 410 UINT32 Offset = sizeof (ACPI_TABLE_HEADER); 411 ACPI_ASF_INFO *SubTable; 412 ACPI_DMTABLE_INFO *InfoTable; 413 ACPI_DMTABLE_INFO *DataInfoTable = NULL; 414 UINT8 *DataTable = NULL; 415 UINT32 DataCount = 0; 416 UINT32 DataLength = 0; 417 UINT32 DataOffset = 0; 418 UINT32 i; 419 UINT8 Type; 420 421 422 /* No main table, only subtables */ 423 424 SubTable = ACPI_ADD_PTR (ACPI_ASF_INFO, Table, Offset); 425 while (Offset < Table->Length) 426 { 427 /* Common subtable header */ 428 429 Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, 430 SubTable->Header.Length, AcpiDmTableInfoAsfHdr); 431 if (ACPI_FAILURE (Status)) 432 { 433 return; 434 } 435 436 /* The actual type is the lower 7 bits of Type */ 437 438 Type = (UINT8) (SubTable->Header.Type & 0x7F); 439 440 switch (Type) 441 { 442 case ACPI_ASF_TYPE_INFO: 443 444 InfoTable = AcpiDmTableInfoAsf0; 445 break; 446 447 case ACPI_ASF_TYPE_ALERT: 448 449 InfoTable = AcpiDmTableInfoAsf1; 450 DataInfoTable = AcpiDmTableInfoAsf1a; 451 DataTable = ACPI_ADD_PTR (UINT8, SubTable, sizeof (ACPI_ASF_ALERT)); 452 DataCount = ACPI_CAST_PTR (ACPI_ASF_ALERT, SubTable)->Alerts; 453 DataLength = ACPI_CAST_PTR (ACPI_ASF_ALERT, SubTable)->DataLength; 454 DataOffset = Offset + sizeof (ACPI_ASF_ALERT); 455 break; 456 457 case ACPI_ASF_TYPE_CONTROL: 458 459 InfoTable = AcpiDmTableInfoAsf2; 460 DataInfoTable = AcpiDmTableInfoAsf2a; 461 DataTable = ACPI_ADD_PTR (UINT8, SubTable, sizeof (ACPI_ASF_REMOTE)); 462 DataCount = ACPI_CAST_PTR (ACPI_ASF_REMOTE, SubTable)->Controls; 463 DataLength = ACPI_CAST_PTR (ACPI_ASF_REMOTE, SubTable)->DataLength; 464 DataOffset = Offset + sizeof (ACPI_ASF_REMOTE); 465 break; 466 467 case ACPI_ASF_TYPE_BOOT: 468 469 InfoTable = AcpiDmTableInfoAsf3; 470 break; 471 472 case ACPI_ASF_TYPE_ADDRESS: 473 474 InfoTable = AcpiDmTableInfoAsf4; 475 DataTable = ACPI_ADD_PTR (UINT8, SubTable, sizeof (ACPI_ASF_ADDRESS)); 476 DataLength = ACPI_CAST_PTR (ACPI_ASF_ADDRESS, SubTable)->Devices; 477 DataOffset = Offset + sizeof (ACPI_ASF_ADDRESS); 478 break; 479 480 default: 481 482 AcpiOsPrintf ("\n**** Unknown ASF subtable type 0x%X\n", SubTable->Header.Type); 483 return; 484 } 485 486 Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, 487 SubTable->Header.Length, InfoTable); 488 if (ACPI_FAILURE (Status)) 489 { 490 return; 491 } 492 493 /* Dump variable-length extra data */ 494 495 switch (Type) 496 { 497 case ACPI_ASF_TYPE_ALERT: 498 case ACPI_ASF_TYPE_CONTROL: 499 500 for (i = 0; i < DataCount; i++) 501 { 502 AcpiOsPrintf ("\n"); 503 Status = AcpiDmDumpTable (Table->Length, DataOffset, 504 DataTable, DataLength, DataInfoTable); 505 if (ACPI_FAILURE (Status)) 506 { 507 return; 508 } 509 510 DataTable = ACPI_ADD_PTR (UINT8, DataTable, DataLength); 511 DataOffset += DataLength; 512 } 513 break; 514 515 case ACPI_ASF_TYPE_ADDRESS: 516 517 for (i = 0; i < DataLength; i++) 518 { 519 if (!(i % 16)) 520 { 521 AcpiDmLineHeader (DataOffset, 1, "Addresses"); 522 } 523 524 AcpiOsPrintf ("%2.2X ", *DataTable); 525 DataTable++; 526 DataOffset++; 527 if (DataOffset > Table->Length) 528 { 529 AcpiOsPrintf ("**** ACPI table terminates in the middle of a data structure!\n"); 530 return; 531 } 532 } 533 534 AcpiOsPrintf ("\n"); 535 break; 536 537 default: 538 539 break; 540 } 541 542 AcpiOsPrintf ("\n"); 543 544 /* Point to next subtable */ 545 546 if (!SubTable->Header.Length) 547 { 548 AcpiOsPrintf ("Invalid zero subtable header length\n"); 549 return; 550 } 551 552 Offset += SubTable->Header.Length; 553 SubTable = ACPI_ADD_PTR (ACPI_ASF_INFO, SubTable, SubTable->Header.Length); 554 } 555 } 556 557 558 /******************************************************************************* 559 * 560 * FUNCTION: AcpiDmDumpCpep 561 * 562 * PARAMETERS: Table - A CPEP table 563 * 564 * RETURN: None 565 * 566 * DESCRIPTION: Format the contents of a CPEP. This table type consists 567 * of an open-ended number of subtables. 568 * 569 ******************************************************************************/ 570 571 void 572 AcpiDmDumpCpep ( 573 ACPI_TABLE_HEADER *Table) 574 { 575 ACPI_STATUS Status; 576 ACPI_CPEP_POLLING *SubTable; 577 UINT32 Length = Table->Length; 578 UINT32 Offset = sizeof (ACPI_TABLE_CPEP); 579 580 581 /* Main table */ 582 583 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoCpep); 584 if (ACPI_FAILURE (Status)) 585 { 586 return; 587 } 588 589 /* Subtables */ 590 591 SubTable = ACPI_ADD_PTR (ACPI_CPEP_POLLING, Table, Offset); 592 while (Offset < Table->Length) 593 { 594 AcpiOsPrintf ("\n"); 595 Status = AcpiDmDumpTable (Length, Offset, SubTable, 596 SubTable->Header.Length, AcpiDmTableInfoCpep0); 597 if (ACPI_FAILURE (Status)) 598 { 599 return; 600 } 601 602 /* Point to next subtable */ 603 604 Offset += SubTable->Header.Length; 605 SubTable = ACPI_ADD_PTR (ACPI_CPEP_POLLING, SubTable, 606 SubTable->Header.Length); 607 } 608 } 609 610 611 /******************************************************************************* 612 * 613 * FUNCTION: AcpiDmDumpCsrt 614 * 615 * PARAMETERS: Table - A CSRT table 616 * 617 * RETURN: None 618 * 619 * DESCRIPTION: Format the contents of a CSRT. This table type consists 620 * of an open-ended number of subtables. 621 * 622 ******************************************************************************/ 623 624 void 625 AcpiDmDumpCsrt ( 626 ACPI_TABLE_HEADER *Table) 627 { 628 ACPI_STATUS Status; 629 ACPI_CSRT_GROUP *SubTable; 630 ACPI_CSRT_SHARED_INFO *SharedInfoTable; 631 ACPI_CSRT_DESCRIPTOR *SubSubTable; 632 UINT32 Length = Table->Length; 633 UINT32 Offset = sizeof (ACPI_TABLE_CSRT); 634 UINT32 SubOffset; 635 UINT32 SubSubOffset; 636 UINT32 InfoLength; 637 638 639 /* The main table only contains the ACPI header, thus already handled */ 640 641 /* Subtables (Resource Groups) */ 642 643 SubTable = ACPI_ADD_PTR (ACPI_CSRT_GROUP, Table, Offset); 644 while (Offset < Table->Length) 645 { 646 /* Resource group subtable */ 647 648 AcpiOsPrintf ("\n"); 649 Status = AcpiDmDumpTable (Length, Offset, SubTable, 650 SubTable->Length, AcpiDmTableInfoCsrt0); 651 if (ACPI_FAILURE (Status)) 652 { 653 return; 654 } 655 656 /* Shared info subtable (One per resource group) */ 657 658 SubOffset = sizeof (ACPI_CSRT_GROUP); 659 SharedInfoTable = ACPI_ADD_PTR (ACPI_CSRT_SHARED_INFO, Table, 660 Offset + SubOffset); 661 662 AcpiOsPrintf ("\n"); 663 Status = AcpiDmDumpTable (Length, Offset + SubOffset, SharedInfoTable, 664 sizeof (ACPI_CSRT_SHARED_INFO), AcpiDmTableInfoCsrt1); 665 if (ACPI_FAILURE (Status)) 666 { 667 return; 668 } 669 670 SubOffset += SubTable->SharedInfoLength; 671 672 /* Sub-Subtables (Resource Descriptors) */ 673 674 SubSubTable = ACPI_ADD_PTR (ACPI_CSRT_DESCRIPTOR, Table, 675 Offset + SubOffset); 676 677 while ((SubOffset < SubTable->Length) && 678 ((Offset + SubOffset) < Table->Length)) 679 { 680 AcpiOsPrintf ("\n"); 681 Status = AcpiDmDumpTable (Length, Offset + SubOffset, SubSubTable, 682 SubSubTable->Length, AcpiDmTableInfoCsrt2); 683 if (ACPI_FAILURE (Status)) 684 { 685 return; 686 } 687 688 SubSubOffset = sizeof (ACPI_CSRT_DESCRIPTOR); 689 690 /* Resource-specific info buffer */ 691 692 InfoLength = SubSubTable->Length - SubSubOffset; 693 694 AcpiDmDumpBuffer (SubSubTable, SubSubOffset, InfoLength, 695 Offset + SubOffset + SubSubOffset, "ResourceInfo"); 696 SubSubOffset += InfoLength; 697 698 /* Point to next sub-subtable */ 699 700 SubOffset += SubSubTable->Length; 701 SubSubTable = ACPI_ADD_PTR (ACPI_CSRT_DESCRIPTOR, SubSubTable, 702 SubSubTable->Length); 703 } 704 705 /* Point to next subtable */ 706 707 Offset += SubTable->Length; 708 SubTable = ACPI_ADD_PTR (ACPI_CSRT_GROUP, SubTable, 709 SubTable->Length); 710 } 711 } 712 713 714 /******************************************************************************* 715 * 716 * FUNCTION: AcpiDmDumpDbg2 717 * 718 * PARAMETERS: Table - A DBG2 table 719 * 720 * RETURN: None 721 * 722 * DESCRIPTION: Format the contents of a DBG2. This table type consists 723 * of an open-ended number of subtables. 724 * 725 ******************************************************************************/ 726 727 void 728 AcpiDmDumpDbg2 ( 729 ACPI_TABLE_HEADER *Table) 730 { 731 ACPI_STATUS Status; 732 ACPI_DBG2_DEVICE *SubTable; 733 UINT32 Length = Table->Length; 734 UINT32 Offset = sizeof (ACPI_TABLE_DBG2); 735 UINT32 i; 736 UINT32 ArrayOffset; 737 UINT32 AbsoluteOffset; 738 UINT8 *Array; 739 740 741 /* Main table */ 742 743 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoDbg2); 744 if (ACPI_FAILURE (Status)) 745 { 746 return; 747 } 748 749 /* Subtables */ 750 751 SubTable = ACPI_ADD_PTR (ACPI_DBG2_DEVICE, Table, Offset); 752 while (Offset < Table->Length) 753 { 754 AcpiOsPrintf ("\n"); 755 Status = AcpiDmDumpTable (Length, Offset, SubTable, 756 SubTable->Length, AcpiDmTableInfoDbg2Device); 757 if (ACPI_FAILURE (Status)) 758 { 759 return; 760 } 761 762 /* Dump the BaseAddress array */ 763 764 for (i = 0; i < SubTable->RegisterCount; i++) 765 { 766 ArrayOffset = SubTable->BaseAddressOffset + 767 (sizeof (ACPI_GENERIC_ADDRESS) * i); 768 AbsoluteOffset = Offset + ArrayOffset; 769 Array = (UINT8 *) SubTable + ArrayOffset; 770 771 Status = AcpiDmDumpTable (Length, AbsoluteOffset, Array, 772 SubTable->Length, AcpiDmTableInfoDbg2Addr); 773 if (ACPI_FAILURE (Status)) 774 { 775 return; 776 } 777 } 778 779 /* Dump the AddressSize array */ 780 781 for (i = 0; i < SubTable->RegisterCount; i++) 782 { 783 ArrayOffset = SubTable->AddressSizeOffset + 784 (sizeof (UINT32) * i); 785 AbsoluteOffset = Offset + ArrayOffset; 786 Array = (UINT8 *) SubTable + ArrayOffset; 787 788 Status = AcpiDmDumpTable (Length, AbsoluteOffset, Array, 789 SubTable->Length, AcpiDmTableInfoDbg2Size); 790 if (ACPI_FAILURE (Status)) 791 { 792 return; 793 } 794 } 795 796 /* Dump the Namestring (required) */ 797 798 AcpiOsPrintf ("\n"); 799 ArrayOffset = SubTable->NamepathOffset; 800 AbsoluteOffset = Offset + ArrayOffset; 801 Array = (UINT8 *) SubTable + ArrayOffset; 802 803 Status = AcpiDmDumpTable (Length, AbsoluteOffset, Array, 804 SubTable->Length, AcpiDmTableInfoDbg2Name); 805 if (ACPI_FAILURE (Status)) 806 { 807 return; 808 } 809 810 /* Dump the OemData (optional) */ 811 812 if (SubTable->OemDataOffset) 813 { 814 AcpiDmDumpBuffer (SubTable, SubTable->OemDataOffset, SubTable->OemDataLength, 815 Offset + SubTable->OemDataOffset, "OEM Data"); 816 } 817 818 /* Point to next subtable */ 819 820 Offset += SubTable->Length; 821 SubTable = ACPI_ADD_PTR (ACPI_DBG2_DEVICE, SubTable, 822 SubTable->Length); 823 } 824 } 825 826 827 /******************************************************************************* 828 * 829 * FUNCTION: AcpiDmDumpDmar 830 * 831 * PARAMETERS: Table - A DMAR table 832 * 833 * RETURN: None 834 * 835 * DESCRIPTION: Format the contents of a DMAR. This table type consists 836 * of an open-ended number of subtables. 837 * 838 ******************************************************************************/ 839 840 841 void 842 AcpiDmDumpDmar ( 843 ACPI_TABLE_HEADER *Table) 844 { 845 ACPI_STATUS Status; 846 ACPI_DMAR_HEADER *SubTable; 847 UINT32 Length = Table->Length; 848 UINT32 Offset = sizeof (ACPI_TABLE_DMAR); 849 ACPI_DMTABLE_INFO *InfoTable; 850 ACPI_DMAR_DEVICE_SCOPE *ScopeTable; 851 UINT32 ScopeOffset; 852 UINT8 *PciPath; 853 UINT32 PathOffset; 854 855 856 /* Main table */ 857 858 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoDmar); 859 if (ACPI_FAILURE (Status)) 860 { 861 return; 862 } 863 864 /* Subtables */ 865 866 SubTable = ACPI_ADD_PTR (ACPI_DMAR_HEADER, Table, Offset); 867 while (Offset < Table->Length) 868 { 869 /* Common subtable header */ 870 871 AcpiOsPrintf ("\n"); 872 Status = AcpiDmDumpTable (Length, Offset, SubTable, 873 SubTable->Length, AcpiDmTableInfoDmarHdr); 874 if (ACPI_FAILURE (Status)) 875 { 876 return; 877 } 878 AcpiOsPrintf ("\n"); 879 880 switch (SubTable->Type) 881 { 882 case ACPI_DMAR_TYPE_HARDWARE_UNIT: 883 884 InfoTable = AcpiDmTableInfoDmar0; 885 ScopeOffset = sizeof (ACPI_DMAR_HARDWARE_UNIT); 886 break; 887 888 case ACPI_DMAR_TYPE_RESERVED_MEMORY: 889 890 InfoTable = AcpiDmTableInfoDmar1; 891 ScopeOffset = sizeof (ACPI_DMAR_RESERVED_MEMORY); 892 break; 893 894 case ACPI_DMAR_TYPE_ROOT_ATS: 895 896 InfoTable = AcpiDmTableInfoDmar2; 897 ScopeOffset = sizeof (ACPI_DMAR_ATSR); 898 break; 899 900 case ACPI_DMAR_TYPE_HARDWARE_AFFINITY: 901 902 InfoTable = AcpiDmTableInfoDmar3; 903 ScopeOffset = sizeof (ACPI_DMAR_RHSA); 904 break; 905 906 case ACPI_DMAR_TYPE_NAMESPACE: 907 908 InfoTable = AcpiDmTableInfoDmar4; 909 ScopeOffset = sizeof (ACPI_DMAR_ANDD); 910 break; 911 912 default: 913 914 AcpiOsPrintf ("\n**** Unknown DMAR subtable type 0x%X\n\n", SubTable->Type); 915 return; 916 } 917 918 Status = AcpiDmDumpTable (Length, Offset, SubTable, 919 SubTable->Length, InfoTable); 920 if (ACPI_FAILURE (Status)) 921 { 922 return; 923 } 924 925 /* 926 * Dump the optional device scope entries 927 */ 928 if ((SubTable->Type == ACPI_DMAR_TYPE_HARDWARE_AFFINITY) || 929 (SubTable->Type == ACPI_DMAR_TYPE_NAMESPACE)) 930 { 931 /* These types do not support device scopes */ 932 933 goto NextSubtable; 934 } 935 936 ScopeTable = ACPI_ADD_PTR (ACPI_DMAR_DEVICE_SCOPE, SubTable, ScopeOffset); 937 while (ScopeOffset < SubTable->Length) 938 { 939 AcpiOsPrintf ("\n"); 940 Status = AcpiDmDumpTable (Length, Offset + ScopeOffset, ScopeTable, 941 ScopeTable->Length, AcpiDmTableInfoDmarScope); 942 if (ACPI_FAILURE (Status)) 943 { 944 return; 945 } 946 AcpiOsPrintf ("\n"); 947 948 /* Dump the PCI Path entries for this device scope */ 949 950 PathOffset = sizeof (ACPI_DMAR_DEVICE_SCOPE); /* Path entries start at this offset */ 951 952 PciPath = ACPI_ADD_PTR (UINT8, ScopeTable, 953 sizeof (ACPI_DMAR_DEVICE_SCOPE)); 954 955 while (PathOffset < ScopeTable->Length) 956 { 957 AcpiDmLineHeader ((PathOffset + ScopeOffset + Offset), 2, "PCI Path"); 958 AcpiOsPrintf ("%2.2X,%2.2X\n", PciPath[0], PciPath[1]); 959 960 /* Point to next PCI Path entry */ 961 962 PathOffset += 2; 963 PciPath += 2; 964 AcpiOsPrintf ("\n"); 965 } 966 967 /* Point to next device scope entry */ 968 969 ScopeOffset += ScopeTable->Length; 970 ScopeTable = ACPI_ADD_PTR (ACPI_DMAR_DEVICE_SCOPE, 971 ScopeTable, ScopeTable->Length); 972 } 973 974 NextSubtable: 975 /* Point to next subtable */ 976 977 Offset += SubTable->Length; 978 SubTable = ACPI_ADD_PTR (ACPI_DMAR_HEADER, SubTable, SubTable->Length); 979 } 980 } 981 982 983 /******************************************************************************* 984 * 985 * FUNCTION: AcpiDmDumpEinj 986 * 987 * PARAMETERS: Table - A EINJ table 988 * 989 * RETURN: None 990 * 991 * DESCRIPTION: Format the contents of a EINJ. This table type consists 992 * of an open-ended number of subtables. 993 * 994 ******************************************************************************/ 995 996 void 997 AcpiDmDumpEinj ( 998 ACPI_TABLE_HEADER *Table) 999 { 1000 ACPI_STATUS Status; 1001 ACPI_WHEA_HEADER *SubTable; 1002 UINT32 Length = Table->Length; 1003 UINT32 Offset = sizeof (ACPI_TABLE_EINJ); 1004 1005 1006 /* Main table */ 1007 1008 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoEinj); 1009 if (ACPI_FAILURE (Status)) 1010 { 1011 return; 1012 } 1013 1014 /* Subtables */ 1015 1016 SubTable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Table, Offset); 1017 while (Offset < Table->Length) 1018 { 1019 AcpiOsPrintf ("\n"); 1020 Status = AcpiDmDumpTable (Length, Offset, SubTable, 1021 sizeof (ACPI_WHEA_HEADER), AcpiDmTableInfoEinj0); 1022 if (ACPI_FAILURE (Status)) 1023 { 1024 return; 1025 } 1026 1027 /* Point to next subtable (each subtable is of fixed length) */ 1028 1029 Offset += sizeof (ACPI_WHEA_HEADER); 1030 SubTable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, SubTable, 1031 sizeof (ACPI_WHEA_HEADER)); 1032 } 1033 } 1034 1035 1036 /******************************************************************************* 1037 * 1038 * FUNCTION: AcpiDmDumpErst 1039 * 1040 * PARAMETERS: Table - A ERST table 1041 * 1042 * RETURN: None 1043 * 1044 * DESCRIPTION: Format the contents of a ERST. This table type consists 1045 * of an open-ended number of subtables. 1046 * 1047 ******************************************************************************/ 1048 1049 void 1050 AcpiDmDumpErst ( 1051 ACPI_TABLE_HEADER *Table) 1052 { 1053 ACPI_STATUS Status; 1054 ACPI_WHEA_HEADER *SubTable; 1055 UINT32 Length = Table->Length; 1056 UINT32 Offset = sizeof (ACPI_TABLE_ERST); 1057 1058 1059 /* Main table */ 1060 1061 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoErst); 1062 if (ACPI_FAILURE (Status)) 1063 { 1064 return; 1065 } 1066 1067 /* Subtables */ 1068 1069 SubTable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Table, Offset); 1070 while (Offset < Table->Length) 1071 { 1072 AcpiOsPrintf ("\n"); 1073 Status = AcpiDmDumpTable (Length, Offset, SubTable, 1074 sizeof (ACPI_WHEA_HEADER), AcpiDmTableInfoErst0); 1075 if (ACPI_FAILURE (Status)) 1076 { 1077 return; 1078 } 1079 1080 /* Point to next subtable (each subtable is of fixed length) */ 1081 1082 Offset += sizeof (ACPI_WHEA_HEADER); 1083 SubTable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, SubTable, 1084 sizeof (ACPI_WHEA_HEADER)); 1085 } 1086 } 1087 1088 1089 /******************************************************************************* 1090 * 1091 * FUNCTION: AcpiDmDumpFpdt 1092 * 1093 * PARAMETERS: Table - A FPDT table 1094 * 1095 * RETURN: None 1096 * 1097 * DESCRIPTION: Format the contents of a FPDT. This table type consists 1098 * of an open-ended number of subtables. 1099 * 1100 ******************************************************************************/ 1101 1102 void 1103 AcpiDmDumpFpdt ( 1104 ACPI_TABLE_HEADER *Table) 1105 { 1106 ACPI_STATUS Status; 1107 ACPI_FPDT_HEADER *SubTable; 1108 UINT32 Length = Table->Length; 1109 UINT32 Offset = sizeof (ACPI_TABLE_FPDT); 1110 ACPI_DMTABLE_INFO *InfoTable; 1111 1112 1113 /* There is no main table (other than the standard ACPI header) */ 1114 1115 /* Subtables */ 1116 1117 SubTable = ACPI_ADD_PTR (ACPI_FPDT_HEADER, Table, Offset); 1118 while (Offset < Table->Length) 1119 { 1120 /* Common subtable header */ 1121 1122 AcpiOsPrintf ("\n"); 1123 Status = AcpiDmDumpTable (Length, Offset, SubTable, 1124 SubTable->Length, AcpiDmTableInfoFpdtHdr); 1125 if (ACPI_FAILURE (Status)) 1126 { 1127 return; 1128 } 1129 1130 switch (SubTable->Type) 1131 { 1132 case ACPI_FPDT_TYPE_BOOT: 1133 1134 InfoTable = AcpiDmTableInfoFpdt0; 1135 break; 1136 1137 case ACPI_FPDT_TYPE_S3PERF: 1138 1139 InfoTable = AcpiDmTableInfoFpdt1; 1140 break; 1141 1142 default: 1143 1144 AcpiOsPrintf ("\n**** Unknown FPDT subtable type 0x%X\n\n", SubTable->Type); 1145 1146 /* Attempt to continue */ 1147 1148 if (!SubTable->Length) 1149 { 1150 AcpiOsPrintf ("Invalid zero length subtable\n"); 1151 return; 1152 } 1153 goto NextSubTable; 1154 } 1155 1156 Status = AcpiDmDumpTable (Length, Offset, SubTable, 1157 SubTable->Length, InfoTable); 1158 if (ACPI_FAILURE (Status)) 1159 { 1160 return; 1161 } 1162 1163 NextSubTable: 1164 /* Point to next subtable */ 1165 1166 Offset += SubTable->Length; 1167 SubTable = ACPI_ADD_PTR (ACPI_FPDT_HEADER, SubTable, SubTable->Length); 1168 } 1169 } 1170 1171 1172 /******************************************************************************* 1173 * 1174 * FUNCTION: AcpiDmDumpGtdt 1175 * 1176 * PARAMETERS: Table - A GTDT table 1177 * 1178 * RETURN: None 1179 * 1180 * DESCRIPTION: Format the contents of a GTDT. This table type consists 1181 * of an open-ended number of subtables. 1182 * 1183 ******************************************************************************/ 1184 1185 void 1186 AcpiDmDumpGtdt ( 1187 ACPI_TABLE_HEADER *Table) 1188 { 1189 ACPI_STATUS Status; 1190 ACPI_GTDT_HEADER *SubTable; 1191 UINT32 Length = Table->Length; 1192 UINT32 Offset = sizeof (ACPI_TABLE_GTDT); 1193 ACPI_DMTABLE_INFO *InfoTable; 1194 UINT32 SubTableLength; 1195 UINT32 GtCount; 1196 ACPI_GTDT_TIMER_ENTRY *GtxTable; 1197 1198 1199 /* Main table */ 1200 1201 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoGtdt); 1202 if (ACPI_FAILURE (Status)) 1203 { 1204 return; 1205 } 1206 1207 /* Subtables */ 1208 1209 SubTable = ACPI_ADD_PTR (ACPI_GTDT_HEADER, Table, Offset); 1210 while (Offset < Table->Length) 1211 { 1212 /* Common subtable header */ 1213 1214 AcpiOsPrintf ("\n"); 1215 Status = AcpiDmDumpTable (Length, Offset, SubTable, 1216 SubTable->Length, AcpiDmTableInfoGtdtHdr); 1217 if (ACPI_FAILURE (Status)) 1218 { 1219 return; 1220 } 1221 1222 GtCount = 0; 1223 switch (SubTable->Type) 1224 { 1225 case ACPI_GTDT_TYPE_TIMER_BLOCK: 1226 1227 SubTableLength = sizeof (ACPI_GTDT_TIMER_BLOCK); 1228 GtCount = (ACPI_CAST_PTR (ACPI_GTDT_TIMER_BLOCK, 1229 SubTable))->TimerCount; 1230 1231 InfoTable = AcpiDmTableInfoGtdt0; 1232 break; 1233 1234 case ACPI_GTDT_TYPE_WATCHDOG: 1235 1236 SubTableLength = sizeof (ACPI_GTDT_WATCHDOG); 1237 1238 InfoTable = AcpiDmTableInfoGtdt1; 1239 break; 1240 1241 default: 1242 1243 /* Cannot continue on unknown type - no length */ 1244 1245 AcpiOsPrintf ("\n**** Unknown GTDT subtable type 0x%X\n", SubTable->Type); 1246 return; 1247 } 1248 1249 Status = AcpiDmDumpTable (Length, Offset, SubTable, 1250 SubTable->Length, InfoTable); 1251 if (ACPI_FAILURE (Status)) 1252 { 1253 return; 1254 } 1255 1256 /* Point to end of current subtable (each subtable above is of fixed length) */ 1257 1258 Offset += SubTableLength; 1259 1260 /* If there are any Gt Timer Blocks from above, dump them now */ 1261 1262 if (GtCount) 1263 { 1264 GtxTable = ACPI_ADD_PTR (ACPI_GTDT_TIMER_ENTRY, SubTable, SubTableLength); 1265 SubTableLength += GtCount * sizeof (ACPI_GTDT_TIMER_ENTRY); 1266 1267 while (GtCount) 1268 { 1269 AcpiOsPrintf ("\n"); 1270 Status = AcpiDmDumpTable (Length, Offset, GtxTable, 1271 sizeof (ACPI_GTDT_TIMER_ENTRY), AcpiDmTableInfoGtdt0a); 1272 if (ACPI_FAILURE (Status)) 1273 { 1274 return; 1275 } 1276 Offset += sizeof (ACPI_GTDT_TIMER_ENTRY); 1277 GtxTable++; 1278 GtCount--; 1279 } 1280 } 1281 1282 /* Point to next subtable */ 1283 1284 SubTable = ACPI_ADD_PTR (ACPI_GTDT_HEADER, SubTable, SubTableLength); 1285 } 1286 } 1287 1288 1289 /******************************************************************************* 1290 * 1291 * FUNCTION: AcpiDmDumpHest 1292 * 1293 * PARAMETERS: Table - A HEST table 1294 * 1295 * RETURN: None 1296 * 1297 * DESCRIPTION: Format the contents of a HEST. This table type consists 1298 * of an open-ended number of subtables. 1299 * 1300 ******************************************************************************/ 1301 1302 void 1303 AcpiDmDumpHest ( 1304 ACPI_TABLE_HEADER *Table) 1305 { 1306 ACPI_STATUS Status; 1307 ACPI_HEST_HEADER *SubTable; 1308 UINT32 Length = Table->Length; 1309 UINT32 Offset = sizeof (ACPI_TABLE_HEST); 1310 ACPI_DMTABLE_INFO *InfoTable; 1311 UINT32 SubTableLength; 1312 UINT32 BankCount; 1313 ACPI_HEST_IA_ERROR_BANK *BankTable; 1314 1315 1316 /* Main table */ 1317 1318 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoHest); 1319 if (ACPI_FAILURE (Status)) 1320 { 1321 return; 1322 } 1323 1324 /* Subtables */ 1325 1326 SubTable = ACPI_ADD_PTR (ACPI_HEST_HEADER, Table, Offset); 1327 while (Offset < Table->Length) 1328 { 1329 BankCount = 0; 1330 switch (SubTable->Type) 1331 { 1332 case ACPI_HEST_TYPE_IA32_CHECK: 1333 1334 InfoTable = AcpiDmTableInfoHest0; 1335 SubTableLength = sizeof (ACPI_HEST_IA_MACHINE_CHECK); 1336 BankCount = (ACPI_CAST_PTR (ACPI_HEST_IA_MACHINE_CHECK, 1337 SubTable))->NumHardwareBanks; 1338 break; 1339 1340 case ACPI_HEST_TYPE_IA32_CORRECTED_CHECK: 1341 1342 InfoTable = AcpiDmTableInfoHest1; 1343 SubTableLength = sizeof (ACPI_HEST_IA_CORRECTED); 1344 BankCount = (ACPI_CAST_PTR (ACPI_HEST_IA_CORRECTED, 1345 SubTable))->NumHardwareBanks; 1346 break; 1347 1348 case ACPI_HEST_TYPE_IA32_NMI: 1349 1350 InfoTable = AcpiDmTableInfoHest2; 1351 SubTableLength = sizeof (ACPI_HEST_IA_NMI); 1352 break; 1353 1354 case ACPI_HEST_TYPE_AER_ROOT_PORT: 1355 1356 InfoTable = AcpiDmTableInfoHest6; 1357 SubTableLength = sizeof (ACPI_HEST_AER_ROOT); 1358 break; 1359 1360 case ACPI_HEST_TYPE_AER_ENDPOINT: 1361 1362 InfoTable = AcpiDmTableInfoHest7; 1363 SubTableLength = sizeof (ACPI_HEST_AER); 1364 break; 1365 1366 case ACPI_HEST_TYPE_AER_BRIDGE: 1367 1368 InfoTable = AcpiDmTableInfoHest8; 1369 SubTableLength = sizeof (ACPI_HEST_AER_BRIDGE); 1370 break; 1371 1372 case ACPI_HEST_TYPE_GENERIC_ERROR: 1373 1374 InfoTable = AcpiDmTableInfoHest9; 1375 SubTableLength = sizeof (ACPI_HEST_GENERIC); 1376 break; 1377 1378 default: 1379 1380 /* Cannot continue on unknown type - no length */ 1381 1382 AcpiOsPrintf ("\n**** Unknown HEST subtable type 0x%X\n", SubTable->Type); 1383 return; 1384 } 1385 1386 AcpiOsPrintf ("\n"); 1387 Status = AcpiDmDumpTable (Length, Offset, SubTable, 1388 SubTableLength, InfoTable); 1389 if (ACPI_FAILURE (Status)) 1390 { 1391 return; 1392 } 1393 1394 /* Point to end of current subtable (each subtable above is of fixed length) */ 1395 1396 Offset += SubTableLength; 1397 1398 /* If there are any (fixed-length) Error Banks from above, dump them now */ 1399 1400 if (BankCount) 1401 { 1402 BankTable = ACPI_ADD_PTR (ACPI_HEST_IA_ERROR_BANK, SubTable, SubTableLength); 1403 SubTableLength += BankCount * sizeof (ACPI_HEST_IA_ERROR_BANK); 1404 1405 while (BankCount) 1406 { 1407 AcpiOsPrintf ("\n"); 1408 Status = AcpiDmDumpTable (Length, Offset, BankTable, 1409 sizeof (ACPI_HEST_IA_ERROR_BANK), AcpiDmTableInfoHestBank); 1410 if (ACPI_FAILURE (Status)) 1411 { 1412 return; 1413 } 1414 Offset += sizeof (ACPI_HEST_IA_ERROR_BANK); 1415 BankTable++; 1416 BankCount--; 1417 } 1418 } 1419 1420 /* Point to next subtable */ 1421 1422 SubTable = ACPI_ADD_PTR (ACPI_HEST_HEADER, SubTable, SubTableLength); 1423 } 1424 } 1425 1426 1427 /******************************************************************************* 1428 * 1429 * FUNCTION: AcpiDmDumpIvrs 1430 * 1431 * PARAMETERS: Table - A IVRS table 1432 * 1433 * RETURN: None 1434 * 1435 * DESCRIPTION: Format the contents of a IVRS 1436 * 1437 ******************************************************************************/ 1438 1439 static UINT8 EntrySizes[] = {4,8,16,32}; 1440 1441 void 1442 AcpiDmDumpIvrs ( 1443 ACPI_TABLE_HEADER *Table) 1444 { 1445 ACPI_STATUS Status; 1446 UINT32 Offset = sizeof (ACPI_TABLE_IVRS); 1447 UINT32 EntryOffset; 1448 UINT32 EntryLength; 1449 UINT32 EntryType; 1450 ACPI_IVRS_DE_HEADER *DeviceEntry; 1451 ACPI_IVRS_HEADER *SubTable; 1452 ACPI_DMTABLE_INFO *InfoTable; 1453 1454 1455 /* Main table */ 1456 1457 Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoIvrs); 1458 if (ACPI_FAILURE (Status)) 1459 { 1460 return; 1461 } 1462 1463 /* Subtables */ 1464 1465 SubTable = ACPI_ADD_PTR (ACPI_IVRS_HEADER, Table, Offset); 1466 while (Offset < Table->Length) 1467 { 1468 /* Common subtable header */ 1469 1470 AcpiOsPrintf ("\n"); 1471 Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, 1472 SubTable->Length, AcpiDmTableInfoIvrsHdr); 1473 if (ACPI_FAILURE (Status)) 1474 { 1475 return; 1476 } 1477 1478 switch (SubTable->Type) 1479 { 1480 case ACPI_IVRS_TYPE_HARDWARE: 1481 1482 InfoTable = AcpiDmTableInfoIvrs0; 1483 break; 1484 1485 case ACPI_IVRS_TYPE_MEMORY1: 1486 case ACPI_IVRS_TYPE_MEMORY2: 1487 case ACPI_IVRS_TYPE_MEMORY3: 1488 1489 InfoTable = AcpiDmTableInfoIvrs1; 1490 break; 1491 1492 default: 1493 1494 AcpiOsPrintf ("\n**** Unknown IVRS subtable type 0x%X\n", 1495 SubTable->Type); 1496 1497 /* Attempt to continue */ 1498 1499 if (!SubTable->Length) 1500 { 1501 AcpiOsPrintf ("Invalid zero length subtable\n"); 1502 return; 1503 } 1504 goto NextSubTable; 1505 } 1506 1507 /* Dump the subtable */ 1508 1509 AcpiOsPrintf ("\n"); 1510 Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, 1511 SubTable->Length, InfoTable); 1512 if (ACPI_FAILURE (Status)) 1513 { 1514 return; 1515 } 1516 1517 /* The hardware subtable can contain multiple device entries */ 1518 1519 if (SubTable->Type == ACPI_IVRS_TYPE_HARDWARE) 1520 { 1521 EntryOffset = Offset + sizeof (ACPI_IVRS_HARDWARE); 1522 DeviceEntry = ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER, SubTable, 1523 sizeof (ACPI_IVRS_HARDWARE)); 1524 1525 while (EntryOffset < (Offset + SubTable->Length)) 1526 { 1527 AcpiOsPrintf ("\n"); 1528 /* 1529 * Upper 2 bits of Type encode the length of the device entry 1530 * 1531 * 00 = 4 byte 1532 * 01 = 8 byte 1533 * 10 = 16 byte - currently no entries defined 1534 * 11 = 32 byte - currently no entries defined 1535 */ 1536 EntryType = DeviceEntry->Type; 1537 EntryLength = EntrySizes [EntryType >> 6]; 1538 1539 switch (EntryType) 1540 { 1541 /* 4-byte device entries */ 1542 1543 case ACPI_IVRS_TYPE_PAD4: 1544 case ACPI_IVRS_TYPE_ALL: 1545 case ACPI_IVRS_TYPE_SELECT: 1546 case ACPI_IVRS_TYPE_START: 1547 case ACPI_IVRS_TYPE_END: 1548 1549 InfoTable = AcpiDmTableInfoIvrs4; 1550 break; 1551 1552 /* 8-byte entries, type A */ 1553 1554 case ACPI_IVRS_TYPE_ALIAS_SELECT: 1555 case ACPI_IVRS_TYPE_ALIAS_START: 1556 1557 InfoTable = AcpiDmTableInfoIvrs8a; 1558 break; 1559 1560 /* 8-byte entries, type B */ 1561 1562 case ACPI_IVRS_TYPE_PAD8: 1563 case ACPI_IVRS_TYPE_EXT_SELECT: 1564 case ACPI_IVRS_TYPE_EXT_START: 1565 1566 InfoTable = AcpiDmTableInfoIvrs8b; 1567 break; 1568 1569 /* 8-byte entries, type C */ 1570 1571 case ACPI_IVRS_TYPE_SPECIAL: 1572 1573 InfoTable = AcpiDmTableInfoIvrs8c; 1574 break; 1575 1576 default: 1577 InfoTable = AcpiDmTableInfoIvrs4; 1578 AcpiOsPrintf ( 1579 "\n**** Unknown IVRS device entry type/length: " 1580 "0x%.2X/0x%X at offset 0x%.4X: (header below)\n", 1581 EntryType, EntryLength, EntryOffset); 1582 break; 1583 } 1584 1585 /* Dump the Device Entry */ 1586 1587 Status = AcpiDmDumpTable (Table->Length, EntryOffset, 1588 DeviceEntry, EntryLength, InfoTable); 1589 1590 EntryOffset += EntryLength; 1591 DeviceEntry = ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER, DeviceEntry, 1592 EntryLength); 1593 } 1594 } 1595 1596 NextSubTable: 1597 /* Point to next subtable */ 1598 1599 Offset += SubTable->Length; 1600 SubTable = ACPI_ADD_PTR (ACPI_IVRS_HEADER, SubTable, SubTable->Length); 1601 } 1602 } 1603 1604 1605 /******************************************************************************* 1606 * 1607 * FUNCTION: AcpiDmDumpLpit 1608 * 1609 * PARAMETERS: Table - A LPIT table 1610 * 1611 * RETURN: None 1612 * 1613 * DESCRIPTION: Format the contents of a LPIT. This table type consists 1614 * of an open-ended number of subtables. Note: There are no 1615 * entries in the main table. An LPIT consists of the table 1616 * header and then subtables only. 1617 * 1618 ******************************************************************************/ 1619 1620 void 1621 AcpiDmDumpLpit ( 1622 ACPI_TABLE_HEADER *Table) 1623 { 1624 ACPI_STATUS Status; 1625 ACPI_LPIT_HEADER *SubTable; 1626 UINT32 Length = Table->Length; 1627 UINT32 Offset = sizeof (ACPI_TABLE_LPIT); 1628 ACPI_DMTABLE_INFO *InfoTable; 1629 UINT32 SubTableLength; 1630 1631 1632 /* Subtables */ 1633 1634 SubTable = ACPI_ADD_PTR (ACPI_LPIT_HEADER, Table, Offset); 1635 while (Offset < Table->Length) 1636 { 1637 /* Common subtable header */ 1638 1639 Status = AcpiDmDumpTable (Length, Offset, SubTable, 1640 sizeof (ACPI_LPIT_HEADER), AcpiDmTableInfoLpitHdr); 1641 if (ACPI_FAILURE (Status)) 1642 { 1643 return; 1644 } 1645 1646 switch (SubTable->Type) 1647 { 1648 case ACPI_LPIT_TYPE_NATIVE_CSTATE: 1649 1650 InfoTable = AcpiDmTableInfoLpit0; 1651 SubTableLength = sizeof (ACPI_LPIT_NATIVE); 1652 break; 1653 1654 case ACPI_LPIT_TYPE_SIMPLE_IO: 1655 1656 InfoTable = AcpiDmTableInfoLpit1; 1657 SubTableLength = sizeof (ACPI_LPIT_IO); 1658 break; 1659 1660 default: 1661 1662 /* Cannot continue on unknown type - no length */ 1663 1664 AcpiOsPrintf ("\n**** Unknown LPIT subtable type 0x%X\n", SubTable->Type); 1665 return; 1666 } 1667 1668 Status = AcpiDmDumpTable (Length, Offset, SubTable, 1669 SubTableLength, InfoTable); 1670 if (ACPI_FAILURE (Status)) 1671 { 1672 return; 1673 } 1674 AcpiOsPrintf ("\n"); 1675 1676 /* Point to next subtable */ 1677 1678 Offset += SubTableLength; 1679 SubTable = ACPI_ADD_PTR (ACPI_LPIT_HEADER, SubTable, SubTableLength); 1680 } 1681 } 1682 1683 1684 /******************************************************************************* 1685 * 1686 * FUNCTION: AcpiDmDumpMadt 1687 * 1688 * PARAMETERS: Table - A MADT table 1689 * 1690 * RETURN: None 1691 * 1692 * DESCRIPTION: Format the contents of a MADT. This table type consists 1693 * of an open-ended number of subtables. 1694 * 1695 ******************************************************************************/ 1696 1697 void 1698 AcpiDmDumpMadt ( 1699 ACPI_TABLE_HEADER *Table) 1700 { 1701 ACPI_STATUS Status; 1702 ACPI_SUBTABLE_HEADER *SubTable; 1703 UINT32 Length = Table->Length; 1704 UINT32 Offset = sizeof (ACPI_TABLE_MADT); 1705 ACPI_DMTABLE_INFO *InfoTable; 1706 1707 1708 /* Main table */ 1709 1710 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoMadt); 1711 if (ACPI_FAILURE (Status)) 1712 { 1713 return; 1714 } 1715 1716 /* Subtables */ 1717 1718 SubTable = ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Table, Offset); 1719 while (Offset < Table->Length) 1720 { 1721 /* Common subtable header */ 1722 1723 AcpiOsPrintf ("\n"); 1724 Status = AcpiDmDumpTable (Length, Offset, SubTable, 1725 SubTable->Length, AcpiDmTableInfoMadtHdr); 1726 if (ACPI_FAILURE (Status)) 1727 { 1728 return; 1729 } 1730 1731 switch (SubTable->Type) 1732 { 1733 case ACPI_MADT_TYPE_LOCAL_APIC: 1734 1735 InfoTable = AcpiDmTableInfoMadt0; 1736 break; 1737 1738 case ACPI_MADT_TYPE_IO_APIC: 1739 1740 InfoTable = AcpiDmTableInfoMadt1; 1741 break; 1742 1743 case ACPI_MADT_TYPE_INTERRUPT_OVERRIDE: 1744 1745 InfoTable = AcpiDmTableInfoMadt2; 1746 break; 1747 1748 case ACPI_MADT_TYPE_NMI_SOURCE: 1749 1750 InfoTable = AcpiDmTableInfoMadt3; 1751 break; 1752 1753 case ACPI_MADT_TYPE_LOCAL_APIC_NMI: 1754 1755 InfoTable = AcpiDmTableInfoMadt4; 1756 break; 1757 1758 case ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE: 1759 1760 InfoTable = AcpiDmTableInfoMadt5; 1761 break; 1762 1763 case ACPI_MADT_TYPE_IO_SAPIC: 1764 1765 InfoTable = AcpiDmTableInfoMadt6; 1766 break; 1767 1768 case ACPI_MADT_TYPE_LOCAL_SAPIC: 1769 1770 InfoTable = AcpiDmTableInfoMadt7; 1771 break; 1772 1773 case ACPI_MADT_TYPE_INTERRUPT_SOURCE: 1774 1775 InfoTable = AcpiDmTableInfoMadt8; 1776 break; 1777 1778 case ACPI_MADT_TYPE_LOCAL_X2APIC: 1779 1780 InfoTable = AcpiDmTableInfoMadt9; 1781 break; 1782 1783 case ACPI_MADT_TYPE_LOCAL_X2APIC_NMI: 1784 1785 InfoTable = AcpiDmTableInfoMadt10; 1786 break; 1787 1788 case ACPI_MADT_TYPE_GENERIC_INTERRUPT: 1789 1790 InfoTable = AcpiDmTableInfoMadt11; 1791 break; 1792 1793 case ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR: 1794 1795 InfoTable = AcpiDmTableInfoMadt12; 1796 break; 1797 1798 case ACPI_MADT_TYPE_GENERIC_MSI_FRAME: 1799 1800 InfoTable = AcpiDmTableInfoMadt13; 1801 break; 1802 1803 case ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR: 1804 1805 InfoTable = AcpiDmTableInfoMadt14; 1806 break; 1807 1808 default: 1809 1810 AcpiOsPrintf ("\n**** Unknown MADT subtable type 0x%X\n\n", SubTable->Type); 1811 1812 /* Attempt to continue */ 1813 1814 if (!SubTable->Length) 1815 { 1816 AcpiOsPrintf ("Invalid zero length subtable\n"); 1817 return; 1818 } 1819 goto NextSubTable; 1820 } 1821 1822 Status = AcpiDmDumpTable (Length, Offset, SubTable, 1823 SubTable->Length, InfoTable); 1824 if (ACPI_FAILURE (Status)) 1825 { 1826 return; 1827 } 1828 1829 NextSubTable: 1830 /* Point to next subtable */ 1831 1832 Offset += SubTable->Length; 1833 SubTable = ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, SubTable, SubTable->Length); 1834 } 1835 } 1836 1837 1838 /******************************************************************************* 1839 * 1840 * FUNCTION: AcpiDmDumpMcfg 1841 * 1842 * PARAMETERS: Table - A MCFG Table 1843 * 1844 * RETURN: None 1845 * 1846 * DESCRIPTION: Format the contents of a MCFG table 1847 * 1848 ******************************************************************************/ 1849 1850 void 1851 AcpiDmDumpMcfg ( 1852 ACPI_TABLE_HEADER *Table) 1853 { 1854 ACPI_STATUS Status; 1855 UINT32 Offset = sizeof (ACPI_TABLE_MCFG); 1856 ACPI_MCFG_ALLOCATION *SubTable; 1857 1858 1859 /* Main table */ 1860 1861 Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoMcfg); 1862 if (ACPI_FAILURE (Status)) 1863 { 1864 return; 1865 } 1866 1867 /* Subtables */ 1868 1869 SubTable = ACPI_ADD_PTR (ACPI_MCFG_ALLOCATION, Table, Offset); 1870 while (Offset < Table->Length) 1871 { 1872 if (Offset + sizeof (ACPI_MCFG_ALLOCATION) > Table->Length) 1873 { 1874 AcpiOsPrintf ("Warning: there are %u invalid trailing bytes\n", 1875 sizeof (ACPI_MCFG_ALLOCATION) - (Offset - Table->Length)); 1876 return; 1877 } 1878 1879 AcpiOsPrintf ("\n"); 1880 Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, 1881 sizeof (ACPI_MCFG_ALLOCATION), AcpiDmTableInfoMcfg0); 1882 if (ACPI_FAILURE (Status)) 1883 { 1884 return; 1885 } 1886 1887 /* Point to next subtable (each subtable is of fixed length) */ 1888 1889 Offset += sizeof (ACPI_MCFG_ALLOCATION); 1890 SubTable = ACPI_ADD_PTR (ACPI_MCFG_ALLOCATION, SubTable, 1891 sizeof (ACPI_MCFG_ALLOCATION)); 1892 } 1893 } 1894 1895 1896 /******************************************************************************* 1897 * 1898 * FUNCTION: AcpiDmDumpMpst 1899 * 1900 * PARAMETERS: Table - A MPST Table 1901 * 1902 * RETURN: None 1903 * 1904 * DESCRIPTION: Format the contents of a MPST table 1905 * 1906 ******************************************************************************/ 1907 1908 void 1909 AcpiDmDumpMpst ( 1910 ACPI_TABLE_HEADER *Table) 1911 { 1912 ACPI_STATUS Status; 1913 UINT32 Offset = sizeof (ACPI_TABLE_MPST); 1914 ACPI_MPST_POWER_NODE *SubTable0; 1915 ACPI_MPST_POWER_STATE *SubTable0A; 1916 ACPI_MPST_COMPONENT *SubTable0B; 1917 ACPI_MPST_DATA_HDR *SubTable1; 1918 ACPI_MPST_POWER_DATA *SubTable2; 1919 UINT16 SubtableCount; 1920 UINT32 PowerStateCount; 1921 UINT32 ComponentCount; 1922 1923 1924 /* Main table */ 1925 1926 Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoMpst); 1927 if (ACPI_FAILURE (Status)) 1928 { 1929 return; 1930 } 1931 1932 /* Subtable: Memory Power Node(s) */ 1933 1934 SubtableCount = (ACPI_CAST_PTR (ACPI_TABLE_MPST, Table))->PowerNodeCount; 1935 SubTable0 = ACPI_ADD_PTR (ACPI_MPST_POWER_NODE, Table, Offset); 1936 1937 while ((Offset < Table->Length) && SubtableCount) 1938 { 1939 AcpiOsPrintf ("\n"); 1940 Status = AcpiDmDumpTable (Table->Length, Offset, SubTable0, 1941 sizeof (ACPI_MPST_POWER_NODE), AcpiDmTableInfoMpst0); 1942 if (ACPI_FAILURE (Status)) 1943 { 1944 return; 1945 } 1946 1947 /* Extract the sub-subtable counts */ 1948 1949 PowerStateCount = SubTable0->NumPowerStates; 1950 ComponentCount = SubTable0->NumPhysicalComponents; 1951 Offset += sizeof (ACPI_MPST_POWER_NODE); 1952 1953 /* Sub-subtables - Memory Power State Structure(s) */ 1954 1955 SubTable0A = ACPI_ADD_PTR (ACPI_MPST_POWER_STATE, SubTable0, 1956 sizeof (ACPI_MPST_POWER_NODE)); 1957 1958 while (PowerStateCount) 1959 { 1960 AcpiOsPrintf ("\n"); 1961 Status = AcpiDmDumpTable (Table->Length, Offset, SubTable0A, 1962 sizeof (ACPI_MPST_POWER_STATE), AcpiDmTableInfoMpst0A); 1963 if (ACPI_FAILURE (Status)) 1964 { 1965 return; 1966 } 1967 1968 SubTable0A++; 1969 PowerStateCount--; 1970 Offset += sizeof (ACPI_MPST_POWER_STATE); 1971 } 1972 1973 /* Sub-subtables - Physical Component ID Structure(s) */ 1974 1975 SubTable0B = ACPI_CAST_PTR (ACPI_MPST_COMPONENT, SubTable0A); 1976 1977 if (ComponentCount) 1978 { 1979 AcpiOsPrintf ("\n"); 1980 } 1981 1982 while (ComponentCount) 1983 { 1984 Status = AcpiDmDumpTable (Table->Length, Offset, SubTable0B, 1985 sizeof (ACPI_MPST_COMPONENT), AcpiDmTableInfoMpst0B); 1986 if (ACPI_FAILURE (Status)) 1987 { 1988 return; 1989 } 1990 1991 SubTable0B++; 1992 ComponentCount--; 1993 Offset += sizeof (ACPI_MPST_COMPONENT); 1994 } 1995 1996 /* Point to next Memory Power Node subtable */ 1997 1998 SubtableCount--; 1999 SubTable0 = ACPI_ADD_PTR (ACPI_MPST_POWER_NODE, SubTable0, 2000 sizeof (ACPI_MPST_POWER_NODE) + 2001 (sizeof (ACPI_MPST_POWER_STATE) * SubTable0->NumPowerStates) + 2002 (sizeof (ACPI_MPST_COMPONENT) * SubTable0->NumPhysicalComponents)); 2003 } 2004 2005 /* Subtable: Count of Memory Power State Characteristic structures */ 2006 2007 AcpiOsPrintf ("\n"); 2008 SubTable1 = ACPI_CAST_PTR (ACPI_MPST_DATA_HDR, SubTable0); 2009 Status = AcpiDmDumpTable (Table->Length, Offset, SubTable1, 2010 sizeof (ACPI_MPST_DATA_HDR), AcpiDmTableInfoMpst1); 2011 if (ACPI_FAILURE (Status)) 2012 { 2013 return; 2014 } 2015 2016 SubtableCount = SubTable1->CharacteristicsCount; 2017 Offset += sizeof (ACPI_MPST_DATA_HDR); 2018 2019 /* Subtable: Memory Power State Characteristics structure(s) */ 2020 2021 SubTable2 = ACPI_ADD_PTR (ACPI_MPST_POWER_DATA, SubTable1, sizeof (ACPI_MPST_DATA_HDR)); 2022 2023 while ((Offset < Table->Length) && SubtableCount) 2024 { 2025 AcpiOsPrintf ("\n"); 2026 Status = AcpiDmDumpTable (Table->Length, Offset, SubTable2, 2027 sizeof (ACPI_MPST_POWER_DATA), AcpiDmTableInfoMpst2); 2028 if (ACPI_FAILURE (Status)) 2029 { 2030 return; 2031 } 2032 2033 SubTable2++; 2034 SubtableCount--; 2035 Offset += sizeof (ACPI_MPST_POWER_DATA); 2036 } 2037 } 2038 2039 2040 /******************************************************************************* 2041 * 2042 * FUNCTION: AcpiDmDumpMsct 2043 * 2044 * PARAMETERS: Table - A MSCT table 2045 * 2046 * RETURN: None 2047 * 2048 * DESCRIPTION: Format the contents of a MSCT 2049 * 2050 ******************************************************************************/ 2051 2052 void 2053 AcpiDmDumpMsct ( 2054 ACPI_TABLE_HEADER *Table) 2055 { 2056 ACPI_STATUS Status; 2057 UINT32 Offset = sizeof (ACPI_TABLE_MSCT); 2058 ACPI_MSCT_PROXIMITY *SubTable; 2059 2060 2061 /* Main table */ 2062 2063 Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoMsct); 2064 if (ACPI_FAILURE (Status)) 2065 { 2066 return; 2067 } 2068 2069 /* Subtables */ 2070 2071 SubTable = ACPI_ADD_PTR (ACPI_MSCT_PROXIMITY, Table, Offset); 2072 while (Offset < Table->Length) 2073 { 2074 /* Common subtable header */ 2075 2076 AcpiOsPrintf ("\n"); 2077 Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, 2078 sizeof (ACPI_MSCT_PROXIMITY), AcpiDmTableInfoMsct0); 2079 if (ACPI_FAILURE (Status)) 2080 { 2081 return; 2082 } 2083 2084 /* Point to next subtable */ 2085 2086 Offset += sizeof (ACPI_MSCT_PROXIMITY); 2087 SubTable = ACPI_ADD_PTR (ACPI_MSCT_PROXIMITY, SubTable, sizeof (ACPI_MSCT_PROXIMITY)); 2088 } 2089 } 2090 2091 2092 /******************************************************************************* 2093 * 2094 * FUNCTION: AcpiDmDumpMtmr 2095 * 2096 * PARAMETERS: Table - A MTMR table 2097 * 2098 * RETURN: None 2099 * 2100 * DESCRIPTION: Format the contents of a MTMR 2101 * 2102 ******************************************************************************/ 2103 2104 void 2105 AcpiDmDumpMtmr ( 2106 ACPI_TABLE_HEADER *Table) 2107 { 2108 ACPI_STATUS Status; 2109 UINT32 Offset = sizeof (ACPI_TABLE_MTMR); 2110 ACPI_MTMR_ENTRY *SubTable; 2111 2112 2113 /* Main table */ 2114 2115 Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoMtmr); 2116 if (ACPI_FAILURE (Status)) 2117 { 2118 return; 2119 } 2120 2121 /* Subtables */ 2122 2123 SubTable = ACPI_ADD_PTR (ACPI_MTMR_ENTRY, Table, Offset); 2124 while (Offset < Table->Length) 2125 { 2126 /* Common subtable header */ 2127 2128 AcpiOsPrintf ("\n"); 2129 Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, 2130 sizeof (ACPI_MTMR_ENTRY), AcpiDmTableInfoMtmr0); 2131 if (ACPI_FAILURE (Status)) 2132 { 2133 return; 2134 } 2135 2136 /* Point to next subtable */ 2137 2138 Offset += sizeof (ACPI_MTMR_ENTRY); 2139 SubTable = ACPI_ADD_PTR (ACPI_MTMR_ENTRY, SubTable, sizeof (ACPI_MTMR_ENTRY)); 2140 } 2141 } 2142 2143 2144 /******************************************************************************* 2145 * 2146 * FUNCTION: AcpiDmDumpPcct 2147 * 2148 * PARAMETERS: Table - A PCCT table 2149 * 2150 * RETURN: None 2151 * 2152 * DESCRIPTION: Format the contents of a PCCT. This table type consists 2153 * of an open-ended number of subtables. 2154 * 2155 ******************************************************************************/ 2156 2157 void 2158 AcpiDmDumpPcct ( 2159 ACPI_TABLE_HEADER *Table) 2160 { 2161 ACPI_STATUS Status; 2162 ACPI_PCCT_SUBSPACE *SubTable; 2163 ACPI_DMTABLE_INFO *InfoTable; 2164 UINT32 Length = Table->Length; 2165 UINT32 Offset = sizeof (ACPI_TABLE_PCCT); 2166 2167 2168 /* Main table */ 2169 2170 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoPcct); 2171 if (ACPI_FAILURE (Status)) 2172 { 2173 return; 2174 } 2175 2176 /* Subtables */ 2177 2178 SubTable = ACPI_ADD_PTR (ACPI_PCCT_SUBSPACE, Table, Offset); 2179 while (Offset < Table->Length) 2180 { 2181 /* Common subtable header */ 2182 2183 AcpiOsPrintf ("\n"); 2184 Status = AcpiDmDumpTable (Length, Offset, SubTable, 2185 SubTable->Header.Length, AcpiDmTableInfoPcctHdr); 2186 if (ACPI_FAILURE (Status)) 2187 { 2188 return; 2189 } 2190 2191 switch (SubTable->Header.Type) 2192 { 2193 case ACPI_PCCT_TYPE_GENERIC_SUBSPACE: 2194 2195 InfoTable = AcpiDmTableInfoPcct0; 2196 break; 2197 2198 case ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE: 2199 2200 InfoTable = AcpiDmTableInfoPcct1; 2201 break; 2202 2203 default: 2204 2205 AcpiOsPrintf ( 2206 "\n**** Unexpected or unknown PCCT subtable type 0x%X\n\n", 2207 SubTable->Header.Type); 2208 return; 2209 } 2210 2211 AcpiOsPrintf ("\n"); 2212 Status = AcpiDmDumpTable (Length, Offset, SubTable, 2213 SubTable->Header.Length, InfoTable); 2214 if (ACPI_FAILURE (Status)) 2215 { 2216 return; 2217 } 2218 2219 /* Point to next subtable */ 2220 2221 Offset += SubTable->Header.Length; 2222 SubTable = ACPI_ADD_PTR (ACPI_PCCT_SUBSPACE, SubTable, 2223 SubTable->Header.Length); 2224 } 2225 } 2226 2227 2228 /******************************************************************************* 2229 * 2230 * FUNCTION: AcpiDmDumpPmtt 2231 * 2232 * PARAMETERS: Table - A PMTT table 2233 * 2234 * RETURN: None 2235 * 2236 * DESCRIPTION: Format the contents of a PMTT. This table type consists 2237 * of an open-ended number of subtables. 2238 * 2239 ******************************************************************************/ 2240 2241 void 2242 AcpiDmDumpPmtt ( 2243 ACPI_TABLE_HEADER *Table) 2244 { 2245 ACPI_STATUS Status; 2246 ACPI_PMTT_HEADER *SubTable; 2247 ACPI_PMTT_HEADER *MemSubTable; 2248 ACPI_PMTT_HEADER *DimmSubTable; 2249 ACPI_PMTT_DOMAIN *DomainArray; 2250 UINT32 Length = Table->Length; 2251 UINT32 Offset = sizeof (ACPI_TABLE_PMTT); 2252 UINT32 MemOffset; 2253 UINT32 DimmOffset; 2254 UINT32 DomainOffset; 2255 UINT32 DomainCount; 2256 2257 2258 /* Main table */ 2259 2260 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoPmtt); 2261 if (ACPI_FAILURE (Status)) 2262 { 2263 return; 2264 } 2265 2266 /* Subtables */ 2267 2268 SubTable = ACPI_ADD_PTR (ACPI_PMTT_HEADER, Table, Offset); 2269 while (Offset < Table->Length) 2270 { 2271 /* Common subtable header */ 2272 2273 AcpiOsPrintf ("\n"); 2274 Status = AcpiDmDumpTable (Length, Offset, SubTable, 2275 SubTable->Length, AcpiDmTableInfoPmttHdr); 2276 if (ACPI_FAILURE (Status)) 2277 { 2278 return; 2279 } 2280 2281 /* Only Socket subtables are expected at this level */ 2282 2283 if (SubTable->Type != ACPI_PMTT_TYPE_SOCKET) 2284 { 2285 AcpiOsPrintf ( 2286 "\n**** Unexpected or unknown PMTT subtable type 0x%X\n\n", 2287 SubTable->Type); 2288 return; 2289 } 2290 2291 /* Dump the fixed-length portion of the subtable */ 2292 2293 Status = AcpiDmDumpTable (Length, Offset, SubTable, 2294 SubTable->Length, AcpiDmTableInfoPmtt0); 2295 if (ACPI_FAILURE (Status)) 2296 { 2297 return; 2298 } 2299 2300 /* Walk the memory controller subtables */ 2301 2302 MemOffset = sizeof (ACPI_PMTT_SOCKET); 2303 MemSubTable = ACPI_ADD_PTR (ACPI_PMTT_HEADER, SubTable, 2304 sizeof (ACPI_PMTT_SOCKET)); 2305 2306 while (((Offset + MemOffset) < Table->Length) && 2307 (MemOffset < SubTable->Length)) 2308 { 2309 /* Common subtable header */ 2310 2311 AcpiOsPrintf ("\n"); 2312 Status = AcpiDmDumpTable (Length, 2313 Offset + MemOffset, MemSubTable, 2314 MemSubTable->Length, AcpiDmTableInfoPmttHdr); 2315 if (ACPI_FAILURE (Status)) 2316 { 2317 return; 2318 } 2319 2320 /* Only memory controller subtables are expected at this level */ 2321 2322 if (MemSubTable->Type != ACPI_PMTT_TYPE_CONTROLLER) 2323 { 2324 AcpiOsPrintf ( 2325 "\n**** Unexpected or unknown PMTT subtable type 0x%X\n\n", 2326 MemSubTable->Type); 2327 return; 2328 } 2329 2330 /* Dump the fixed-length portion of the controller subtable */ 2331 2332 Status = AcpiDmDumpTable (Length, 2333 Offset + MemOffset, MemSubTable, 2334 MemSubTable->Length, AcpiDmTableInfoPmtt1); 2335 if (ACPI_FAILURE (Status)) 2336 { 2337 return; 2338 } 2339 2340 /* Walk the variable count of proximity domains */ 2341 2342 DomainCount = ((ACPI_PMTT_CONTROLLER *) MemSubTable)->DomainCount; 2343 DomainOffset = sizeof (ACPI_PMTT_CONTROLLER); 2344 DomainArray = ACPI_ADD_PTR (ACPI_PMTT_DOMAIN, MemSubTable, 2345 sizeof (ACPI_PMTT_CONTROLLER)); 2346 2347 while (((Offset + MemOffset + DomainOffset) < Table->Length) && 2348 ((MemOffset + DomainOffset) < SubTable->Length) && 2349 DomainCount) 2350 { 2351 Status = AcpiDmDumpTable (Length, 2352 Offset + MemOffset + DomainOffset, DomainArray, 2353 sizeof (ACPI_PMTT_DOMAIN), AcpiDmTableInfoPmtt1a); 2354 if (ACPI_FAILURE (Status)) 2355 { 2356 return; 2357 } 2358 2359 DomainOffset += sizeof (ACPI_PMTT_DOMAIN); 2360 DomainArray++; 2361 DomainCount--; 2362 } 2363 2364 if (DomainCount) 2365 { 2366 AcpiOsPrintf ( 2367 "\n**** DomainCount exceeds subtable length\n\n"); 2368 } 2369 2370 /* Walk the physical component (DIMM) subtables */ 2371 2372 DimmOffset = DomainOffset; 2373 DimmSubTable = ACPI_ADD_PTR (ACPI_PMTT_HEADER, MemSubTable, 2374 DomainOffset); 2375 2376 while (((Offset + MemOffset + DimmOffset) < Table->Length) && 2377 (DimmOffset < MemSubTable->Length)) 2378 { 2379 /* Common subtable header */ 2380 2381 AcpiOsPrintf ("\n"); 2382 Status = AcpiDmDumpTable (Length, 2383 Offset + MemOffset + DimmOffset, DimmSubTable, 2384 DimmSubTable->Length, AcpiDmTableInfoPmttHdr); 2385 if (ACPI_FAILURE (Status)) 2386 { 2387 return; 2388 } 2389 2390 /* Only DIMM subtables are expected at this level */ 2391 2392 if (DimmSubTable->Type != ACPI_PMTT_TYPE_DIMM) 2393 { 2394 AcpiOsPrintf ( 2395 "\n**** Unexpected or unknown PMTT subtable type 0x%X\n\n", 2396 DimmSubTable->Type); 2397 return; 2398 } 2399 2400 /* Dump the fixed-length DIMM subtable */ 2401 2402 Status = AcpiDmDumpTable (Length, 2403 Offset + MemOffset + DimmOffset, DimmSubTable, 2404 DimmSubTable->Length, AcpiDmTableInfoPmtt2); 2405 if (ACPI_FAILURE (Status)) 2406 { 2407 return; 2408 } 2409 2410 /* Point to next DIMM subtable */ 2411 2412 DimmOffset += DimmSubTable->Length; 2413 DimmSubTable = ACPI_ADD_PTR (ACPI_PMTT_HEADER, 2414 DimmSubTable, DimmSubTable->Length); 2415 } 2416 2417 /* Point to next Controller subtable */ 2418 2419 MemOffset += MemSubTable->Length; 2420 MemSubTable = ACPI_ADD_PTR (ACPI_PMTT_HEADER, 2421 MemSubTable, MemSubTable->Length); 2422 } 2423 2424 /* Point to next Socket subtable */ 2425 2426 Offset += SubTable->Length; 2427 SubTable = ACPI_ADD_PTR (ACPI_PMTT_HEADER, 2428 SubTable, SubTable->Length); 2429 } 2430 } 2431 2432 2433 /******************************************************************************* 2434 * 2435 * FUNCTION: AcpiDmDumpS3pt 2436 * 2437 * PARAMETERS: Table - A S3PT table 2438 * 2439 * RETURN: Length of the table 2440 * 2441 * DESCRIPTION: Format the contents of a S3PT 2442 * 2443 ******************************************************************************/ 2444 2445 UINT32 2446 AcpiDmDumpS3pt ( 2447 ACPI_TABLE_HEADER *Tables) 2448 { 2449 ACPI_STATUS Status; 2450 UINT32 Offset = sizeof (ACPI_TABLE_S3PT); 2451 ACPI_S3PT_HEADER *SubTable; 2452 ACPI_DMTABLE_INFO *InfoTable; 2453 ACPI_TABLE_S3PT *S3ptTable = ACPI_CAST_PTR (ACPI_TABLE_S3PT, Tables); 2454 2455 2456 /* Main table */ 2457 2458 Status = AcpiDmDumpTable (Offset, 0, S3ptTable, 0, AcpiDmTableInfoS3pt); 2459 if (ACPI_FAILURE (Status)) 2460 { 2461 return 0; 2462 } 2463 2464 SubTable = ACPI_ADD_PTR (ACPI_S3PT_HEADER, S3ptTable, Offset); 2465 while (Offset < S3ptTable->Length) 2466 { 2467 /* Common subtable header */ 2468 2469 AcpiOsPrintf ("\n"); 2470 Status = AcpiDmDumpTable (S3ptTable->Length, Offset, SubTable, 2471 SubTable->Length, AcpiDmTableInfoS3ptHdr); 2472 if (ACPI_FAILURE (Status)) 2473 { 2474 return 0; 2475 } 2476 2477 switch (SubTable->Type) 2478 { 2479 case ACPI_S3PT_TYPE_RESUME: 2480 2481 InfoTable = AcpiDmTableInfoS3pt0; 2482 break; 2483 2484 case ACPI_S3PT_TYPE_SUSPEND: 2485 2486 InfoTable = AcpiDmTableInfoS3pt1; 2487 break; 2488 2489 default: 2490 2491 AcpiOsPrintf ("\n**** Unknown S3PT subtable type 0x%X\n", SubTable->Type); 2492 2493 /* Attempt to continue */ 2494 2495 if (!SubTable->Length) 2496 { 2497 AcpiOsPrintf ("Invalid zero length subtable\n"); 2498 return 0; 2499 } 2500 goto NextSubTable; 2501 } 2502 2503 AcpiOsPrintf ("\n"); 2504 Status = AcpiDmDumpTable (S3ptTable->Length, Offset, SubTable, 2505 SubTable->Length, InfoTable); 2506 if (ACPI_FAILURE (Status)) 2507 { 2508 return 0; 2509 } 2510 2511 NextSubTable: 2512 /* Point to next subtable */ 2513 2514 Offset += SubTable->Length; 2515 SubTable = ACPI_ADD_PTR (ACPI_S3PT_HEADER, SubTable, SubTable->Length); 2516 } 2517 2518 return (S3ptTable->Length); 2519 } 2520 2521 2522 /******************************************************************************* 2523 * 2524 * FUNCTION: AcpiDmDumpSlic 2525 * 2526 * PARAMETERS: Table - A SLIC table 2527 * 2528 * RETURN: None 2529 * 2530 * DESCRIPTION: Format the contents of a SLIC 2531 * 2532 ******************************************************************************/ 2533 2534 void 2535 AcpiDmDumpSlic ( 2536 ACPI_TABLE_HEADER *Table) 2537 { 2538 ACPI_STATUS Status; 2539 UINT32 Offset = sizeof (ACPI_TABLE_SLIC); 2540 ACPI_SLIC_HEADER *SubTable; 2541 ACPI_DMTABLE_INFO *InfoTable; 2542 2543 2544 /* There is no main SLIC table, only subtables */ 2545 2546 SubTable = ACPI_ADD_PTR (ACPI_SLIC_HEADER, Table, Offset); 2547 while (Offset < Table->Length) 2548 { 2549 /* Common subtable header */ 2550 2551 AcpiOsPrintf ("\n"); 2552 Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, 2553 SubTable->Length, AcpiDmTableInfoSlicHdr); 2554 if (ACPI_FAILURE (Status)) 2555 { 2556 return; 2557 } 2558 2559 switch (SubTable->Type) 2560 { 2561 case ACPI_SLIC_TYPE_PUBLIC_KEY: 2562 2563 InfoTable = AcpiDmTableInfoSlic0; 2564 break; 2565 2566 case ACPI_SLIC_TYPE_WINDOWS_MARKER: 2567 2568 InfoTable = AcpiDmTableInfoSlic1; 2569 break; 2570 2571 default: 2572 2573 AcpiOsPrintf ("\n**** Unknown SLIC subtable type 0x%X\n", SubTable->Type); 2574 2575 /* Attempt to continue */ 2576 2577 if (!SubTable->Length) 2578 { 2579 AcpiOsPrintf ("Invalid zero length subtable\n"); 2580 return; 2581 } 2582 goto NextSubTable; 2583 } 2584 2585 AcpiOsPrintf ("\n"); 2586 Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, 2587 SubTable->Length, InfoTable); 2588 if (ACPI_FAILURE (Status)) 2589 { 2590 return; 2591 } 2592 2593 NextSubTable: 2594 /* Point to next subtable */ 2595 2596 Offset += SubTable->Length; 2597 SubTable = ACPI_ADD_PTR (ACPI_SLIC_HEADER, SubTable, SubTable->Length); 2598 } 2599 } 2600 2601 2602 /******************************************************************************* 2603 * 2604 * FUNCTION: AcpiDmDumpSlit 2605 * 2606 * PARAMETERS: Table - An SLIT 2607 * 2608 * RETURN: None 2609 * 2610 * DESCRIPTION: Format the contents of a SLIT 2611 * 2612 ******************************************************************************/ 2613 2614 void 2615 AcpiDmDumpSlit ( 2616 ACPI_TABLE_HEADER *Table) 2617 { 2618 ACPI_STATUS Status; 2619 UINT32 Offset; 2620 UINT8 *Row; 2621 UINT32 Localities; 2622 UINT32 i; 2623 UINT32 j; 2624 2625 2626 /* Main table */ 2627 2628 Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoSlit); 2629 if (ACPI_FAILURE (Status)) 2630 { 2631 return; 2632 } 2633 2634 /* Display the Locality NxN Matrix */ 2635 2636 Localities = (UINT32) ACPI_CAST_PTR (ACPI_TABLE_SLIT, Table)->LocalityCount; 2637 Offset = ACPI_OFFSET (ACPI_TABLE_SLIT, Entry[0]); 2638 Row = (UINT8 *) ACPI_CAST_PTR (ACPI_TABLE_SLIT, Table)->Entry; 2639 2640 for (i = 0; i < Localities; i++) 2641 { 2642 /* Display one row of the matrix */ 2643 2644 AcpiDmLineHeader2 (Offset, Localities, "Locality", i); 2645 for (j = 0; j < Localities; j++) 2646 { 2647 /* Check for beyond EOT */ 2648 2649 if (Offset >= Table->Length) 2650 { 2651 AcpiOsPrintf ("\n**** Not enough room in table for all localities\n"); 2652 return; 2653 } 2654 2655 AcpiOsPrintf ("%2.2X", Row[j]); 2656 Offset++; 2657 2658 /* Display up to 16 bytes per output row */ 2659 2660 if ((j+1) < Localities) 2661 { 2662 AcpiOsPrintf (" "); 2663 2664 if (j && (((j+1) % 16) == 0)) 2665 { 2666 AcpiOsPrintf ("\\\n"); /* With line continuation char */ 2667 AcpiDmLineHeader (Offset, 0, NULL); 2668 } 2669 } 2670 } 2671 2672 /* Point to next row */ 2673 2674 AcpiOsPrintf ("\n"); 2675 Row += Localities; 2676 } 2677 } 2678 2679 2680 /******************************************************************************* 2681 * 2682 * FUNCTION: AcpiDmDumpSrat 2683 * 2684 * PARAMETERS: Table - A SRAT table 2685 * 2686 * RETURN: None 2687 * 2688 * DESCRIPTION: Format the contents of a SRAT 2689 * 2690 ******************************************************************************/ 2691 2692 void 2693 AcpiDmDumpSrat ( 2694 ACPI_TABLE_HEADER *Table) 2695 { 2696 ACPI_STATUS Status; 2697 UINT32 Offset = sizeof (ACPI_TABLE_SRAT); 2698 ACPI_SUBTABLE_HEADER *SubTable; 2699 ACPI_DMTABLE_INFO *InfoTable; 2700 2701 2702 /* Main table */ 2703 2704 Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoSrat); 2705 if (ACPI_FAILURE (Status)) 2706 { 2707 return; 2708 } 2709 2710 /* Subtables */ 2711 2712 SubTable = ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Table, Offset); 2713 while (Offset < Table->Length) 2714 { 2715 /* Common subtable header */ 2716 2717 AcpiOsPrintf ("\n"); 2718 Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, 2719 SubTable->Length, AcpiDmTableInfoSratHdr); 2720 if (ACPI_FAILURE (Status)) 2721 { 2722 return; 2723 } 2724 2725 switch (SubTable->Type) 2726 { 2727 case ACPI_SRAT_TYPE_CPU_AFFINITY: 2728 2729 InfoTable = AcpiDmTableInfoSrat0; 2730 break; 2731 2732 case ACPI_SRAT_TYPE_MEMORY_AFFINITY: 2733 2734 InfoTable = AcpiDmTableInfoSrat1; 2735 break; 2736 2737 case ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY: 2738 2739 InfoTable = AcpiDmTableInfoSrat2; 2740 break; 2741 2742 case ACPI_SRAT_TYPE_GICC_AFFINITY: 2743 2744 InfoTable = AcpiDmTableInfoSrat3; 2745 break; 2746 2747 default: 2748 AcpiOsPrintf ("\n**** Unknown SRAT subtable type 0x%X\n", SubTable->Type); 2749 2750 /* Attempt to continue */ 2751 2752 if (!SubTable->Length) 2753 { 2754 AcpiOsPrintf ("Invalid zero length subtable\n"); 2755 return; 2756 } 2757 goto NextSubTable; 2758 } 2759 2760 AcpiOsPrintf ("\n"); 2761 Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, 2762 SubTable->Length, InfoTable); 2763 if (ACPI_FAILURE (Status)) 2764 { 2765 return; 2766 } 2767 2768 NextSubTable: 2769 /* Point to next subtable */ 2770 2771 Offset += SubTable->Length; 2772 SubTable = ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, SubTable, SubTable->Length); 2773 } 2774 } 2775 2776 2777 /******************************************************************************* 2778 * 2779 * FUNCTION: AcpiDmDumpVrtc 2780 * 2781 * PARAMETERS: Table - A VRTC table 2782 * 2783 * RETURN: None 2784 * 2785 * DESCRIPTION: Format the contents of a VRTC 2786 * 2787 ******************************************************************************/ 2788 2789 void 2790 AcpiDmDumpVrtc ( 2791 ACPI_TABLE_HEADER *Table) 2792 { 2793 ACPI_STATUS Status; 2794 UINT32 Offset = sizeof (ACPI_TABLE_VRTC); 2795 ACPI_VRTC_ENTRY *SubTable; 2796 2797 2798 /* Main table */ 2799 2800 Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoVrtc); 2801 if (ACPI_FAILURE (Status)) 2802 { 2803 return; 2804 } 2805 2806 /* Subtables */ 2807 2808 SubTable = ACPI_ADD_PTR (ACPI_VRTC_ENTRY, Table, Offset); 2809 while (Offset < Table->Length) 2810 { 2811 /* Common subtable header */ 2812 2813 AcpiOsPrintf ("\n"); 2814 Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, 2815 sizeof (ACPI_VRTC_ENTRY), AcpiDmTableInfoVrtc0); 2816 if (ACPI_FAILURE (Status)) 2817 { 2818 return; 2819 } 2820 2821 /* Point to next subtable */ 2822 2823 Offset += sizeof (ACPI_VRTC_ENTRY); 2824 SubTable = ACPI_ADD_PTR (ACPI_VRTC_ENTRY, SubTable, sizeof (ACPI_VRTC_ENTRY)); 2825 } 2826 } 2827 2828 2829 /******************************************************************************* 2830 * 2831 * FUNCTION: AcpiDmDumpWdat 2832 * 2833 * PARAMETERS: Table - A WDAT table 2834 * 2835 * RETURN: None 2836 * 2837 * DESCRIPTION: Format the contents of a WDAT 2838 * 2839 ******************************************************************************/ 2840 2841 void 2842 AcpiDmDumpWdat ( 2843 ACPI_TABLE_HEADER *Table) 2844 { 2845 ACPI_STATUS Status; 2846 UINT32 Offset = sizeof (ACPI_TABLE_WDAT); 2847 ACPI_WDAT_ENTRY *SubTable; 2848 2849 2850 /* Main table */ 2851 2852 Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoWdat); 2853 if (ACPI_FAILURE (Status)) 2854 { 2855 return; 2856 } 2857 2858 /* Subtables */ 2859 2860 SubTable = ACPI_ADD_PTR (ACPI_WDAT_ENTRY, Table, Offset); 2861 while (Offset < Table->Length) 2862 { 2863 /* Common subtable header */ 2864 2865 AcpiOsPrintf ("\n"); 2866 Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, 2867 sizeof (ACPI_WDAT_ENTRY), AcpiDmTableInfoWdat0); 2868 if (ACPI_FAILURE (Status)) 2869 { 2870 return; 2871 } 2872 2873 /* Point to next subtable */ 2874 2875 Offset += sizeof (ACPI_WDAT_ENTRY); 2876 SubTable = ACPI_ADD_PTR (ACPI_WDAT_ENTRY, SubTable, sizeof (ACPI_WDAT_ENTRY)); 2877 } 2878 } 2879