1 /****************************************************************************** 2 * 3 * Module Name: nsdump - table dumping routines for debug 4 * 5 *****************************************************************************/ 6 7 /* 8 * Copyright (C) 2000 - 2013, 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 #define __NSDUMP_C__ 45 46 #include <contrib/dev/acpica/include/acpi.h> 47 #include <contrib/dev/acpica/include/accommon.h> 48 #include <contrib/dev/acpica/include/acnamesp.h> 49 #include <contrib/dev/acpica/include/acoutput.h> 50 51 52 #define _COMPONENT ACPI_NAMESPACE 53 ACPI_MODULE_NAME ("nsdump") 54 55 /* Local prototypes */ 56 57 #ifdef ACPI_OBSOLETE_FUNCTIONS 58 void 59 AcpiNsDumpRootDevices ( 60 void); 61 62 static ACPI_STATUS 63 AcpiNsDumpOneDevice ( 64 ACPI_HANDLE ObjHandle, 65 UINT32 Level, 66 void *Context, 67 void **ReturnValue); 68 #endif 69 70 71 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 72 /******************************************************************************* 73 * 74 * FUNCTION: AcpiNsPrintPathname 75 * 76 * PARAMETERS: NumSegments - Number of ACPI name segments 77 * Pathname - The compressed (internal) path 78 * 79 * RETURN: None 80 * 81 * DESCRIPTION: Print an object's full namespace pathname 82 * 83 ******************************************************************************/ 84 85 void 86 AcpiNsPrintPathname ( 87 UINT32 NumSegments, 88 char *Pathname) 89 { 90 UINT32 i; 91 92 93 ACPI_FUNCTION_NAME (NsPrintPathname); 94 95 96 /* Check if debug output enabled */ 97 98 if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_NAMES, ACPI_NAMESPACE)) 99 { 100 return; 101 } 102 103 /* Print the entire name */ 104 105 ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "[")); 106 107 while (NumSegments) 108 { 109 for (i = 0; i < 4; i++) 110 { 111 ACPI_IS_PRINT (Pathname[i]) ? 112 AcpiOsPrintf ("%c", Pathname[i]) : 113 AcpiOsPrintf ("?"); 114 } 115 116 Pathname += ACPI_NAME_SIZE; 117 NumSegments--; 118 if (NumSegments) 119 { 120 AcpiOsPrintf ("."); 121 } 122 } 123 124 AcpiOsPrintf ("]\n"); 125 } 126 127 128 /******************************************************************************* 129 * 130 * FUNCTION: AcpiNsDumpPathname 131 * 132 * PARAMETERS: Handle - Object 133 * Msg - Prefix message 134 * Level - Desired debug level 135 * Component - Caller's component ID 136 * 137 * RETURN: None 138 * 139 * DESCRIPTION: Print an object's full namespace pathname 140 * Manages allocation/freeing of a pathname buffer 141 * 142 ******************************************************************************/ 143 144 void 145 AcpiNsDumpPathname ( 146 ACPI_HANDLE Handle, 147 char *Msg, 148 UINT32 Level, 149 UINT32 Component) 150 { 151 152 ACPI_FUNCTION_TRACE (NsDumpPathname); 153 154 155 /* Do this only if the requested debug level and component are enabled */ 156 157 if (!ACPI_IS_DEBUG_ENABLED (Level, Component)) 158 { 159 return_VOID; 160 } 161 162 /* Convert handle to a full pathname and print it (with supplied message) */ 163 164 AcpiNsPrintNodePathname (Handle, Msg); 165 AcpiOsPrintf ("\n"); 166 return_VOID; 167 } 168 169 170 /******************************************************************************* 171 * 172 * FUNCTION: AcpiNsDumpOneObject 173 * 174 * PARAMETERS: ObjHandle - Node to be dumped 175 * Level - Nesting level of the handle 176 * Context - Passed into WalkNamespace 177 * ReturnValue - Not used 178 * 179 * RETURN: Status 180 * 181 * DESCRIPTION: Dump a single Node 182 * This procedure is a UserFunction called by AcpiNsWalkNamespace. 183 * 184 ******************************************************************************/ 185 186 ACPI_STATUS 187 AcpiNsDumpOneObject ( 188 ACPI_HANDLE ObjHandle, 189 UINT32 Level, 190 void *Context, 191 void **ReturnValue) 192 { 193 ACPI_WALK_INFO *Info = (ACPI_WALK_INFO *) Context; 194 ACPI_NAMESPACE_NODE *ThisNode; 195 ACPI_OPERAND_OBJECT *ObjDesc = NULL; 196 ACPI_OBJECT_TYPE ObjType; 197 ACPI_OBJECT_TYPE Type; 198 UINT32 BytesToDump; 199 UINT32 DbgLevel; 200 UINT32 i; 201 202 203 ACPI_FUNCTION_NAME (NsDumpOneObject); 204 205 206 /* Is output enabled? */ 207 208 if (!(AcpiDbgLevel & Info->DebugLevel)) 209 { 210 return (AE_OK); 211 } 212 213 if (!ObjHandle) 214 { 215 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Null object handle\n")); 216 return (AE_OK); 217 } 218 219 ThisNode = AcpiNsValidateHandle (ObjHandle); 220 if (!ThisNode) 221 { 222 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Invalid object handle %p\n", 223 ObjHandle)); 224 return (AE_OK); 225 } 226 227 Type = ThisNode->Type; 228 229 /* Check if the owner matches */ 230 231 if ((Info->OwnerId != ACPI_OWNER_ID_MAX) && 232 (Info->OwnerId != ThisNode->OwnerId)) 233 { 234 return (AE_OK); 235 } 236 237 if (!(Info->DisplayType & ACPI_DISPLAY_SHORT)) 238 { 239 /* Indent the object according to the level */ 240 241 AcpiOsPrintf ("%2d%*s", (UINT32) Level - 1, (int) Level * 2, " "); 242 243 /* Check the node type and name */ 244 245 if (Type > ACPI_TYPE_LOCAL_MAX) 246 { 247 ACPI_WARNING ((AE_INFO, "Invalid ACPI Object Type 0x%08X", Type)); 248 } 249 250 AcpiOsPrintf ("%4.4s", AcpiUtGetNodeName (ThisNode)); 251 } 252 253 /* Now we can print out the pertinent information */ 254 255 AcpiOsPrintf (" %-12s %p %2.2X ", 256 AcpiUtGetTypeName (Type), ThisNode, ThisNode->OwnerId); 257 258 DbgLevel = AcpiDbgLevel; 259 AcpiDbgLevel = 0; 260 ObjDesc = AcpiNsGetAttachedObject (ThisNode); 261 AcpiDbgLevel = DbgLevel; 262 263 /* Temp nodes are those nodes created by a control method */ 264 265 if (ThisNode->Flags & ANOBJ_TEMPORARY) 266 { 267 AcpiOsPrintf ("(T) "); 268 } 269 270 switch (Info->DisplayType & ACPI_DISPLAY_MASK) 271 { 272 case ACPI_DISPLAY_SUMMARY: 273 274 if (!ObjDesc) 275 { 276 /* No attached object. Some types should always have an object */ 277 278 switch (Type) 279 { 280 case ACPI_TYPE_INTEGER: 281 case ACPI_TYPE_PACKAGE: 282 case ACPI_TYPE_BUFFER: 283 case ACPI_TYPE_STRING: 284 case ACPI_TYPE_METHOD: 285 AcpiOsPrintf ("<No attached object>"); 286 break; 287 288 default: 289 break; 290 } 291 292 AcpiOsPrintf ("\n"); 293 return (AE_OK); 294 } 295 296 switch (Type) 297 { 298 case ACPI_TYPE_PROCESSOR: 299 300 AcpiOsPrintf ("ID %02X Len %02X Addr %p\n", 301 ObjDesc->Processor.ProcId, ObjDesc->Processor.Length, 302 ACPI_CAST_PTR (void, ObjDesc->Processor.Address)); 303 break; 304 305 306 case ACPI_TYPE_DEVICE: 307 308 AcpiOsPrintf ("Notify Object: %p\n", ObjDesc); 309 break; 310 311 312 case ACPI_TYPE_METHOD: 313 314 AcpiOsPrintf ("Args %X Len %.4X Aml %p\n", 315 (UINT32) ObjDesc->Method.ParamCount, 316 ObjDesc->Method.AmlLength, ObjDesc->Method.AmlStart); 317 break; 318 319 320 case ACPI_TYPE_INTEGER: 321 322 AcpiOsPrintf ("= %8.8X%8.8X\n", 323 ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value)); 324 break; 325 326 327 case ACPI_TYPE_PACKAGE: 328 329 if (ObjDesc->Common.Flags & AOPOBJ_DATA_VALID) 330 { 331 AcpiOsPrintf ("Elements %.2X\n", 332 ObjDesc->Package.Count); 333 } 334 else 335 { 336 AcpiOsPrintf ("[Length not yet evaluated]\n"); 337 } 338 break; 339 340 341 case ACPI_TYPE_BUFFER: 342 343 if (ObjDesc->Common.Flags & AOPOBJ_DATA_VALID) 344 { 345 AcpiOsPrintf ("Len %.2X", 346 ObjDesc->Buffer.Length); 347 348 /* Dump some of the buffer */ 349 350 if (ObjDesc->Buffer.Length > 0) 351 { 352 AcpiOsPrintf (" ="); 353 for (i = 0; (i < ObjDesc->Buffer.Length && i < 12); i++) 354 { 355 AcpiOsPrintf (" %.2hX", ObjDesc->Buffer.Pointer[i]); 356 } 357 } 358 AcpiOsPrintf ("\n"); 359 } 360 else 361 { 362 AcpiOsPrintf ("[Length not yet evaluated]\n"); 363 } 364 break; 365 366 367 case ACPI_TYPE_STRING: 368 369 AcpiOsPrintf ("Len %.2X ", ObjDesc->String.Length); 370 AcpiUtPrintString (ObjDesc->String.Pointer, 32); 371 AcpiOsPrintf ("\n"); 372 break; 373 374 375 case ACPI_TYPE_REGION: 376 377 AcpiOsPrintf ("[%s]", 378 AcpiUtGetRegionName (ObjDesc->Region.SpaceId)); 379 if (ObjDesc->Region.Flags & AOPOBJ_DATA_VALID) 380 { 381 AcpiOsPrintf (" Addr %8.8X%8.8X Len %.4X\n", 382 ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address), 383 ObjDesc->Region.Length); 384 } 385 else 386 { 387 AcpiOsPrintf (" [Address/Length not yet evaluated]\n"); 388 } 389 break; 390 391 392 case ACPI_TYPE_LOCAL_REFERENCE: 393 394 AcpiOsPrintf ("[%s]\n", AcpiUtGetReferenceName (ObjDesc)); 395 break; 396 397 398 case ACPI_TYPE_BUFFER_FIELD: 399 400 if (ObjDesc->BufferField.BufferObj && 401 ObjDesc->BufferField.BufferObj->Buffer.Node) 402 { 403 AcpiOsPrintf ("Buf [%4.4s]", 404 AcpiUtGetNodeName ( 405 ObjDesc->BufferField.BufferObj->Buffer.Node)); 406 } 407 break; 408 409 410 case ACPI_TYPE_LOCAL_REGION_FIELD: 411 412 AcpiOsPrintf ("Rgn [%4.4s]", 413 AcpiUtGetNodeName ( 414 ObjDesc->CommonField.RegionObj->Region.Node)); 415 break; 416 417 418 case ACPI_TYPE_LOCAL_BANK_FIELD: 419 420 AcpiOsPrintf ("Rgn [%4.4s] Bnk [%4.4s]", 421 AcpiUtGetNodeName ( 422 ObjDesc->CommonField.RegionObj->Region.Node), 423 AcpiUtGetNodeName ( 424 ObjDesc->BankField.BankObj->CommonField.Node)); 425 break; 426 427 428 case ACPI_TYPE_LOCAL_INDEX_FIELD: 429 430 AcpiOsPrintf ("Idx [%4.4s] Dat [%4.4s]", 431 AcpiUtGetNodeName ( 432 ObjDesc->IndexField.IndexObj->CommonField.Node), 433 AcpiUtGetNodeName ( 434 ObjDesc->IndexField.DataObj->CommonField.Node)); 435 break; 436 437 438 case ACPI_TYPE_LOCAL_ALIAS: 439 case ACPI_TYPE_LOCAL_METHOD_ALIAS: 440 441 AcpiOsPrintf ("Target %4.4s (%p)\n", 442 AcpiUtGetNodeName (ObjDesc), ObjDesc); 443 break; 444 445 default: 446 447 AcpiOsPrintf ("Object %p\n", ObjDesc); 448 break; 449 } 450 451 /* Common field handling */ 452 453 switch (Type) 454 { 455 case ACPI_TYPE_BUFFER_FIELD: 456 case ACPI_TYPE_LOCAL_REGION_FIELD: 457 case ACPI_TYPE_LOCAL_BANK_FIELD: 458 case ACPI_TYPE_LOCAL_INDEX_FIELD: 459 460 AcpiOsPrintf (" Off %.3X Len %.2X Acc %.2hd\n", 461 (ObjDesc->CommonField.BaseByteOffset * 8) 462 + ObjDesc->CommonField.StartFieldBitOffset, 463 ObjDesc->CommonField.BitLength, 464 ObjDesc->CommonField.AccessByteWidth); 465 break; 466 467 default: 468 break; 469 } 470 break; 471 472 473 case ACPI_DISPLAY_OBJECTS: 474 475 AcpiOsPrintf ("O:%p", ObjDesc); 476 if (!ObjDesc) 477 { 478 /* No attached object, we are done */ 479 480 AcpiOsPrintf ("\n"); 481 return (AE_OK); 482 } 483 484 AcpiOsPrintf ("(R%u)", ObjDesc->Common.ReferenceCount); 485 486 switch (Type) 487 { 488 case ACPI_TYPE_METHOD: 489 490 /* Name is a Method and its AML offset/length are set */ 491 492 AcpiOsPrintf (" M:%p-%X\n", ObjDesc->Method.AmlStart, 493 ObjDesc->Method.AmlLength); 494 break; 495 496 case ACPI_TYPE_INTEGER: 497 498 AcpiOsPrintf (" I:%8.8X8.8%X\n", 499 ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value)); 500 break; 501 502 case ACPI_TYPE_STRING: 503 504 AcpiOsPrintf (" S:%p-%X\n", ObjDesc->String.Pointer, 505 ObjDesc->String.Length); 506 break; 507 508 case ACPI_TYPE_BUFFER: 509 510 AcpiOsPrintf (" B:%p-%X\n", ObjDesc->Buffer.Pointer, 511 ObjDesc->Buffer.Length); 512 break; 513 514 default: 515 516 AcpiOsPrintf ("\n"); 517 break; 518 } 519 break; 520 521 522 default: 523 AcpiOsPrintf ("\n"); 524 break; 525 } 526 527 /* If debug turned off, done */ 528 529 if (!(AcpiDbgLevel & ACPI_LV_VALUES)) 530 { 531 return (AE_OK); 532 } 533 534 /* If there is an attached object, display it */ 535 536 DbgLevel = AcpiDbgLevel; 537 AcpiDbgLevel = 0; 538 ObjDesc = AcpiNsGetAttachedObject (ThisNode); 539 AcpiDbgLevel = DbgLevel; 540 541 /* Dump attached objects */ 542 543 while (ObjDesc) 544 { 545 ObjType = ACPI_TYPE_INVALID; 546 AcpiOsPrintf ("Attached Object %p: ", ObjDesc); 547 548 /* Decode the type of attached object and dump the contents */ 549 550 switch (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc)) 551 { 552 case ACPI_DESC_TYPE_NAMED: 553 554 AcpiOsPrintf ("(Ptr to Node)\n"); 555 BytesToDump = sizeof (ACPI_NAMESPACE_NODE); 556 ACPI_DUMP_BUFFER (ObjDesc, BytesToDump); 557 break; 558 559 case ACPI_DESC_TYPE_OPERAND: 560 561 ObjType = ObjDesc->Common.Type; 562 563 if (ObjType > ACPI_TYPE_LOCAL_MAX) 564 { 565 AcpiOsPrintf ("(Pointer to ACPI Object type %.2X [UNKNOWN])\n", 566 ObjType); 567 BytesToDump = 32; 568 } 569 else 570 { 571 AcpiOsPrintf ("(Pointer to ACPI Object type %.2X [%s])\n", 572 ObjType, AcpiUtGetTypeName (ObjType)); 573 BytesToDump = sizeof (ACPI_OPERAND_OBJECT); 574 } 575 576 ACPI_DUMP_BUFFER (ObjDesc, BytesToDump); 577 break; 578 579 default: 580 581 break; 582 } 583 584 /* If value is NOT an internal object, we are done */ 585 586 if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND) 587 { 588 goto Cleanup; 589 } 590 591 /* Valid object, get the pointer to next level, if any */ 592 593 switch (ObjType) 594 { 595 case ACPI_TYPE_BUFFER: 596 case ACPI_TYPE_STRING: 597 /* 598 * NOTE: takes advantage of common fields between string/buffer 599 */ 600 BytesToDump = ObjDesc->String.Length; 601 ObjDesc = (void *) ObjDesc->String.Pointer; 602 AcpiOsPrintf ( "(Buffer/String pointer %p length %X)\n", 603 ObjDesc, BytesToDump); 604 ACPI_DUMP_BUFFER (ObjDesc, BytesToDump); 605 goto Cleanup; 606 607 case ACPI_TYPE_BUFFER_FIELD: 608 ObjDesc = (ACPI_OPERAND_OBJECT *) ObjDesc->BufferField.BufferObj; 609 break; 610 611 case ACPI_TYPE_PACKAGE: 612 ObjDesc = (void *) ObjDesc->Package.Elements; 613 break; 614 615 case ACPI_TYPE_METHOD: 616 ObjDesc = (void *) ObjDesc->Method.AmlStart; 617 break; 618 619 case ACPI_TYPE_LOCAL_REGION_FIELD: 620 ObjDesc = (void *) ObjDesc->Field.RegionObj; 621 break; 622 623 case ACPI_TYPE_LOCAL_BANK_FIELD: 624 ObjDesc = (void *) ObjDesc->BankField.RegionObj; 625 break; 626 627 case ACPI_TYPE_LOCAL_INDEX_FIELD: 628 ObjDesc = (void *) ObjDesc->IndexField.IndexObj; 629 break; 630 631 default: 632 goto Cleanup; 633 } 634 635 ObjType = ACPI_TYPE_INVALID; /* Terminate loop after next pass */ 636 } 637 638 Cleanup: 639 AcpiOsPrintf ("\n"); 640 return (AE_OK); 641 } 642 643 644 /******************************************************************************* 645 * 646 * FUNCTION: AcpiNsDumpObjects 647 * 648 * PARAMETERS: Type - Object type to be dumped 649 * DisplayType - 0 or ACPI_DISPLAY_SUMMARY 650 * MaxDepth - Maximum depth of dump. Use ACPI_UINT32_MAX 651 * for an effectively unlimited depth. 652 * OwnerId - Dump only objects owned by this ID. Use 653 * ACPI_UINT32_MAX to match all owners. 654 * StartHandle - Where in namespace to start/end search 655 * 656 * RETURN: None 657 * 658 * DESCRIPTION: Dump typed objects within the loaded namespace. Uses 659 * AcpiNsWalkNamespace in conjunction with AcpiNsDumpOneObject. 660 * 661 ******************************************************************************/ 662 663 void 664 AcpiNsDumpObjects ( 665 ACPI_OBJECT_TYPE Type, 666 UINT8 DisplayType, 667 UINT32 MaxDepth, 668 ACPI_OWNER_ID OwnerId, 669 ACPI_HANDLE StartHandle) 670 { 671 ACPI_WALK_INFO Info; 672 ACPI_STATUS Status; 673 674 675 ACPI_FUNCTION_ENTRY (); 676 677 678 /* 679 * Just lock the entire namespace for the duration of the dump. 680 * We don't want any changes to the namespace during this time, 681 * especially the temporary nodes since we are going to display 682 * them also. 683 */ 684 Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); 685 if (ACPI_FAILURE (Status)) 686 { 687 AcpiOsPrintf ("Could not acquire namespace mutex\n"); 688 return; 689 } 690 691 Info.DebugLevel = ACPI_LV_TABLES; 692 Info.OwnerId = OwnerId; 693 Info.DisplayType = DisplayType; 694 695 (void) AcpiNsWalkNamespace (Type, StartHandle, MaxDepth, 696 ACPI_NS_WALK_NO_UNLOCK | ACPI_NS_WALK_TEMP_NODES, 697 AcpiNsDumpOneObject, NULL, (void *) &Info, NULL); 698 699 (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); 700 } 701 702 703 /******************************************************************************* 704 * 705 * FUNCTION: AcpiNsDumpEntry 706 * 707 * PARAMETERS: Handle - Node to be dumped 708 * DebugLevel - Output level 709 * 710 * RETURN: None 711 * 712 * DESCRIPTION: Dump a single Node 713 * 714 ******************************************************************************/ 715 716 void 717 AcpiNsDumpEntry ( 718 ACPI_HANDLE Handle, 719 UINT32 DebugLevel) 720 { 721 ACPI_WALK_INFO Info; 722 723 724 ACPI_FUNCTION_ENTRY (); 725 726 727 Info.DebugLevel = DebugLevel; 728 Info.OwnerId = ACPI_OWNER_ID_MAX; 729 Info.DisplayType = ACPI_DISPLAY_SUMMARY; 730 731 (void) AcpiNsDumpOneObject (Handle, 1, &Info, NULL); 732 } 733 734 735 #ifdef ACPI_ASL_COMPILER 736 /******************************************************************************* 737 * 738 * FUNCTION: AcpiNsDumpTables 739 * 740 * PARAMETERS: SearchBase - Root of subtree to be dumped, or 741 * NS_ALL to dump the entire namespace 742 * MaxDepth - Maximum depth of dump. Use INT_MAX 743 * for an effectively unlimited depth. 744 * 745 * RETURN: None 746 * 747 * DESCRIPTION: Dump the name space, or a portion of it. 748 * 749 ******************************************************************************/ 750 751 void 752 AcpiNsDumpTables ( 753 ACPI_HANDLE SearchBase, 754 UINT32 MaxDepth) 755 { 756 ACPI_HANDLE SearchHandle = SearchBase; 757 758 759 ACPI_FUNCTION_TRACE (NsDumpTables); 760 761 762 if (!AcpiGbl_RootNode) 763 { 764 /* 765 * If the name space has not been initialized, 766 * there is nothing to dump. 767 */ 768 ACPI_DEBUG_PRINT ((ACPI_DB_TABLES, "namespace not initialized!\n")); 769 return_VOID; 770 } 771 772 if (ACPI_NS_ALL == SearchBase) 773 { 774 /* Entire namespace */ 775 776 SearchHandle = AcpiGbl_RootNode; 777 ACPI_DEBUG_PRINT ((ACPI_DB_TABLES, "\\\n")); 778 } 779 780 AcpiNsDumpObjects (ACPI_TYPE_ANY, ACPI_DISPLAY_OBJECTS, MaxDepth, 781 ACPI_OWNER_ID_MAX, SearchHandle); 782 return_VOID; 783 } 784 #endif 785 #endif 786