exdump.c revision 138287
1/****************************************************************************** 2 * 3 * Module Name: exdump - Interpreter debug output routines 4 * $Revision: 176 $ 5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999 - 2004, Intel Corp. 13 * All rights reserved. 14 * 15 * 2. License 16 * 17 * 2.1. This is your license from Intel Corp. under its intellectual property 18 * rights. You may have additional license terms from the party that provided 19 * you this software, covering your right to use that party's intellectual 20 * property rights. 21 * 22 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 23 * copy of the source code appearing in this file ("Covered Code") an 24 * irrevocable, perpetual, worldwide license under Intel's copyrights in the 25 * base code distributed originally by Intel ("Original Intel Code") to copy, 26 * make derivatives, distribute, use and display any portion of the Covered 27 * Code in any form, with the right to sublicense such rights; and 28 * 29 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 30 * license (with the right to sublicense), under only those claims of Intel 31 * patents that are infringed by the Original Intel Code, to make, use, sell, 32 * offer to sell, and import the Covered Code and derivative works thereof 33 * solely to the minimum extent necessary to exercise the above copyright 34 * license, and in no event shall the patent license extend to any additions 35 * to or modifications of the Original Intel Code. No other license or right 36 * is granted directly or by implication, estoppel or otherwise; 37 * 38 * The above copyright and patent license is granted only if the following 39 * conditions are met: 40 * 41 * 3. Conditions 42 * 43 * 3.1. Redistribution of Source with Rights to Further Distribute Source. 44 * Redistribution of source code of any substantial portion of the Covered 45 * Code or modification with rights to further distribute source must include 46 * the above Copyright Notice, the above License, this list of Conditions, 47 * and the following Disclaimer and Export Compliance provision. In addition, 48 * Licensee must cause all Covered Code to which Licensee contributes to 49 * contain a file documenting the changes Licensee made to create that Covered 50 * Code and the date of any change. Licensee must include in that file the 51 * documentation of any changes made by any predecessor Licensee. Licensee 52 * must include a prominent statement that the modification is derived, 53 * directly or indirectly, from Original Intel Code. 54 * 55 * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 56 * Redistribution of source code of any substantial portion of the Covered 57 * Code or modification without rights to further distribute source must 58 * include the following Disclaimer and Export Compliance provision in the 59 * documentation and/or other materials provided with distribution. In 60 * addition, Licensee may not authorize further sublicense of source of any 61 * portion of the Covered Code, and must include terms to the effect that the 62 * license from Licensee to its licensee is limited to the intellectual 63 * property embodied in the software Licensee provides to its licensee, and 64 * not to intellectual property embodied in modifications its licensee may 65 * make. 66 * 67 * 3.3. Redistribution of Executable. Redistribution in executable form of any 68 * substantial portion of the Covered Code or modification must reproduce the 69 * above Copyright Notice, and the following Disclaimer and Export Compliance 70 * provision in the documentation and/or other materials provided with the 71 * distribution. 72 * 73 * 3.4. Intel retains all right, title, and interest in and to the Original 74 * Intel Code. 75 * 76 * 3.5. Neither the name Intel nor any other trademark owned or controlled by 77 * Intel shall be used in advertising or otherwise to promote the sale, use or 78 * other dealings in products derived from or relating to the Covered Code 79 * without prior written authorization from Intel. 80 * 81 * 4. Disclaimer and Export Compliance 82 * 83 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 84 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 85 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 86 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 87 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 88 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 89 * PARTICULAR PURPOSE. 90 * 91 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 92 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 93 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 94 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 95 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 96 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 97 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 98 * LIMITED REMEDY. 99 * 100 * 4.3. Licensee shall not export, either directly or indirectly, any of this 101 * software or system incorporating such software without first obtaining any 102 * required license or other approval from the U. S. Department of Commerce or 103 * any other agency or department of the United States Government. In the 104 * event Licensee exports any such software from the United States or 105 * re-exports any such software from a foreign destination, Licensee shall 106 * ensure that the distribution and export/re-export of the software is in 107 * compliance with all laws, regulations, orders, or other restrictions of the 108 * U.S. Export Administration Regulations. Licensee agrees that neither it nor 109 * any of its subsidiaries will export/re-export any technical data, process, 110 * software, or service, directly or indirectly, to any country for which the 111 * United States government or any agency thereof requires an export license, 112 * other governmental approval, or letter of assurance, without first obtaining 113 * such license, approval or letter. 114 * 115 *****************************************************************************/ 116 117#define __EXDUMP_C__ 118 119#include "acpi.h" 120#include "acinterp.h" 121#include "amlcode.h" 122#include "acnamesp.h" 123#include "acparser.h" 124 125#define _COMPONENT ACPI_EXECUTER 126 ACPI_MODULE_NAME ("exdump") 127 128 129/* 130 * The following routines are used for debug output only 131 */ 132#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 133 134/***************************************************************************** 135 * 136 * FUNCTION: AcpiExDumpOperand 137 * 138 * PARAMETERS: *ObjDesc - Pointer to entry to be dumped 139 * 140 * RETURN: None 141 * 142 * DESCRIPTION: Dump an operand object 143 * 144 ****************************************************************************/ 145 146void 147AcpiExDumpOperand ( 148 ACPI_OPERAND_OBJECT *ObjDesc, 149 UINT32 Depth) 150{ 151 UINT32 Length; 152 UINT32 Index; 153 154 155 ACPI_FUNCTION_NAME ("ExDumpOperand") 156 157 158 if (!((ACPI_LV_EXEC & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer))) 159 { 160 return; 161 } 162 163 if (!ObjDesc) 164 { 165 /* 166 * This could be a null element of a package 167 */ 168 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Null Object Descriptor\n")); 169 return; 170 } 171 172 if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_NAMED) 173 { 174 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p is a NS Node: ", ObjDesc)); 175 ACPI_DUMP_ENTRY (ObjDesc, ACPI_LV_EXEC); 176 return; 177 } 178 179 if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND) 180 { 181 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, 182 "%p is not a node or operand object: [%s]\n", 183 ObjDesc, AcpiUtGetDescriptorName (ObjDesc))); 184 ACPI_DUMP_BUFFER (ObjDesc, sizeof (ACPI_OPERAND_OBJECT)); 185 return; 186 } 187 188 /* ObjDesc is a valid object */ 189 190 if (Depth > 0) 191 { 192 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%*s[%u] %p ", 193 Depth, " ", Depth, ObjDesc)); 194 } 195 else 196 { 197 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p ", ObjDesc)); 198 } 199 200 201 switch (ACPI_GET_OBJECT_TYPE (ObjDesc)) 202 { 203 case ACPI_TYPE_LOCAL_REFERENCE: 204 205 switch (ObjDesc->Reference.Opcode) 206 { 207 case AML_DEBUG_OP: 208 209 AcpiOsPrintf ("Reference: Debug\n"); 210 break; 211 212 213 case AML_NAME_OP: 214 215 ACPI_DUMP_PATHNAME (ObjDesc->Reference.Object, 216 "Reference: Name: ", ACPI_LV_INFO, _COMPONENT); 217 ACPI_DUMP_ENTRY (ObjDesc->Reference.Object, ACPI_LV_INFO); 218 break; 219 220 221 case AML_INDEX_OP: 222 223 AcpiOsPrintf ("Reference: Index %p\n", 224 ObjDesc->Reference.Object); 225 break; 226 227 228 case AML_REF_OF_OP: 229 230 AcpiOsPrintf ("Reference: (RefOf) %p\n", 231 ObjDesc->Reference.Object); 232 break; 233 234 235 case AML_ARG_OP: 236 237 AcpiOsPrintf ("Reference: Arg%d", 238 ObjDesc->Reference.Offset); 239 240 if (ACPI_GET_OBJECT_TYPE (ObjDesc) == ACPI_TYPE_INTEGER) 241 { 242 /* Value is an Integer */ 243 244 AcpiOsPrintf (" value is [%8.8X%8.8x]", 245 ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value)); 246 } 247 248 AcpiOsPrintf ("\n"); 249 break; 250 251 252 case AML_LOCAL_OP: 253 254 AcpiOsPrintf ("Reference: Local%d", 255 ObjDesc->Reference.Offset); 256 257 if (ACPI_GET_OBJECT_TYPE (ObjDesc) == ACPI_TYPE_INTEGER) 258 { 259 260 /* Value is an Integer */ 261 262 AcpiOsPrintf (" value is [%8.8X%8.8x]", 263 ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value)); 264 } 265 266 AcpiOsPrintf ("\n"); 267 break; 268 269 270 case AML_INT_NAMEPATH_OP: 271 272 AcpiOsPrintf ("Reference.Node->Name %X\n", 273 ObjDesc->Reference.Node->Name.Integer); 274 break; 275 276 277 default: 278 279 /* Unknown opcode */ 280 281 AcpiOsPrintf ("Unknown Reference opcode=%X\n", 282 ObjDesc->Reference.Opcode); 283 break; 284 285 } 286 break; 287 288 289 case ACPI_TYPE_BUFFER: 290 291 AcpiOsPrintf ("Buffer len %X @ %p \n", 292 ObjDesc->Buffer.Length, ObjDesc->Buffer.Pointer); 293 294 Length = ObjDesc->Buffer.Length; 295 if (Length > 64) 296 { 297 Length = 64; 298 } 299 300 /* Debug only -- dump the buffer contents */ 301 302 if (ObjDesc->Buffer.Pointer) 303 { 304 AcpiOsPrintf ("Buffer Contents: "); 305 306 for (Index = 0; Index < Length; Index++) 307 { 308 AcpiOsPrintf (" %02x", ObjDesc->Buffer.Pointer[Index]); 309 } 310 AcpiOsPrintf ("\n"); 311 } 312 break; 313 314 315 case ACPI_TYPE_INTEGER: 316 317 AcpiOsPrintf ("Integer %8.8X%8.8X\n", 318 ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value)); 319 break; 320 321 322 case ACPI_TYPE_PACKAGE: 323 324 AcpiOsPrintf ("Package [Len %X] ElementArray %p\n", 325 ObjDesc->Package.Count, ObjDesc->Package.Elements); 326 327 /* 328 * If elements exist, package element pointer is valid, 329 * and debug_level exceeds 1, dump package's elements. 330 */ 331 if (ObjDesc->Package.Count && 332 ObjDesc->Package.Elements && 333 AcpiDbgLevel > 1) 334 { 335 for (Index = 0; Index < ObjDesc->Package.Count; Index++) 336 { 337 AcpiExDumpOperand (ObjDesc->Package.Elements[Index], Depth+1); 338 } 339 } 340 break; 341 342 343 case ACPI_TYPE_REGION: 344 345 AcpiOsPrintf ("Region %s (%X)", 346 AcpiUtGetRegionName (ObjDesc->Region.SpaceId), 347 ObjDesc->Region.SpaceId); 348 349 /* 350 * If the address and length have not been evaluated, 351 * don't print them. 352 */ 353 if (!(ObjDesc->Region.Flags & AOPOBJ_DATA_VALID)) 354 { 355 AcpiOsPrintf ("\n"); 356 } 357 else 358 { 359 AcpiOsPrintf (" base %8.8X%8.8X Length %X\n", 360 ACPI_FORMAT_UINT64 (ObjDesc->Region.Address), 361 ObjDesc->Region.Length); 362 } 363 break; 364 365 366 case ACPI_TYPE_STRING: 367 368 AcpiOsPrintf ("String length %X @ %p ", 369 ObjDesc->String.Length, ObjDesc->String.Pointer); 370 AcpiUtPrintString (ObjDesc->String.Pointer, ACPI_UINT8_MAX); 371 AcpiOsPrintf ("\n"); 372 break; 373 374 375 case ACPI_TYPE_LOCAL_BANK_FIELD: 376 377 AcpiOsPrintf ("BankField\n"); 378 break; 379 380 381 case ACPI_TYPE_LOCAL_REGION_FIELD: 382 383 AcpiOsPrintf ( 384 "RegionField: Bits=%X AccWidth=%X Lock=%X Update=%X at byte=%X bit=%X of below:\n", 385 ObjDesc->Field.BitLength, ObjDesc->Field.AccessByteWidth, 386 ObjDesc->Field.FieldFlags & AML_FIELD_LOCK_RULE_MASK, 387 ObjDesc->Field.FieldFlags & AML_FIELD_UPDATE_RULE_MASK, 388 ObjDesc->Field.BaseByteOffset, ObjDesc->Field.StartFieldBitOffset); 389 AcpiExDumpOperand (ObjDesc->Field.RegionObj, Depth+1); 390 break; 391 392 393 case ACPI_TYPE_LOCAL_INDEX_FIELD: 394 395 AcpiOsPrintf ("IndexField\n"); 396 break; 397 398 399 case ACPI_TYPE_BUFFER_FIELD: 400 401 AcpiOsPrintf ( 402 "BufferField: %X bits at byte %X bit %X of \n", 403 ObjDesc->BufferField.BitLength, ObjDesc->BufferField.BaseByteOffset, 404 ObjDesc->BufferField.StartFieldBitOffset); 405 406 if (!ObjDesc->BufferField.BufferObj) 407 { 408 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "*NULL* \n")); 409 } 410 else if (ACPI_GET_OBJECT_TYPE (ObjDesc->BufferField.BufferObj) != ACPI_TYPE_BUFFER) 411 { 412 AcpiOsPrintf ("*not a Buffer* \n"); 413 } 414 else 415 { 416 AcpiExDumpOperand (ObjDesc->BufferField.BufferObj, Depth+1); 417 } 418 break; 419 420 421 case ACPI_TYPE_EVENT: 422 423 AcpiOsPrintf ("Event\n"); 424 break; 425 426 427 case ACPI_TYPE_METHOD: 428 429 AcpiOsPrintf ( 430 "Method(%X) @ %p:%X\n", 431 ObjDesc->Method.ParamCount, 432 ObjDesc->Method.AmlStart, ObjDesc->Method.AmlLength); 433 break; 434 435 436 case ACPI_TYPE_MUTEX: 437 438 AcpiOsPrintf ("Mutex\n"); 439 break; 440 441 442 case ACPI_TYPE_DEVICE: 443 444 AcpiOsPrintf ("Device\n"); 445 break; 446 447 448 case ACPI_TYPE_POWER: 449 450 AcpiOsPrintf ("Power\n"); 451 break; 452 453 454 case ACPI_TYPE_PROCESSOR: 455 456 AcpiOsPrintf ("Processor\n"); 457 break; 458 459 460 case ACPI_TYPE_THERMAL: 461 462 AcpiOsPrintf ("Thermal\n"); 463 break; 464 465 466 default: 467 /* Unknown Type */ 468 469 AcpiOsPrintf ("Unknown Type %X\n", ACPI_GET_OBJECT_TYPE (ObjDesc)); 470 break; 471 } 472 473 return; 474} 475 476 477/***************************************************************************** 478 * 479 * FUNCTION: AcpiExDumpOperands 480 * 481 * PARAMETERS: Operands - Operand list 482 * InterpreterMode - Load or Exec 483 * Ident - Identification 484 * NumLevels - # of stack entries to dump above line 485 * Note - Output notation 486 * ModuleName - Caller's module name 487 * LineNumber - Caller's invocation line number 488 * 489 * DESCRIPTION: Dump the object stack 490 * 491 ****************************************************************************/ 492 493void 494AcpiExDumpOperands ( 495 ACPI_OPERAND_OBJECT **Operands, 496 ACPI_INTERPRETER_MODE InterpreterMode, 497 char *Ident, 498 UINT32 NumLevels, 499 char *Note, 500 char *ModuleName, 501 UINT32 LineNumber) 502{ 503 ACPI_NATIVE_UINT i; 504 505 506 ACPI_FUNCTION_NAME ("ExDumpOperands"); 507 508 509 if (!Ident) 510 { 511 Ident = "?"; 512 } 513 514 if (!Note) 515 { 516 Note = "?"; 517 } 518 519 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, 520 "************* Operand Stack Contents (Opcode [%s], %d Operands)\n", 521 Ident, NumLevels)); 522 523 if (NumLevels == 0) 524 { 525 NumLevels = 1; 526 } 527 528 /* Dump the operand stack starting at the top */ 529 530 for (i = 0; NumLevels > 0; i--, NumLevels--) 531 { 532 AcpiExDumpOperand (Operands[i], 0); 533 } 534 535 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, 536 "************* Stack dump from %s(%d), %s\n", 537 ModuleName, LineNumber, Note)); 538 return; 539} 540 541 542/***************************************************************************** 543 * 544 * FUNCTION: AcpiExOut* 545 * 546 * PARAMETERS: Title - Descriptive text 547 * Value - Value to be displayed 548 * 549 * DESCRIPTION: Object dump output formatting functions. These functions 550 * reduce the number of format strings required and keeps them 551 * all in one place for easy modification. 552 * 553 ****************************************************************************/ 554 555void 556AcpiExOutString ( 557 char *Title, 558 char *Value) 559{ 560 AcpiOsPrintf ("%20s : %s\n", Title, Value); 561} 562 563void 564AcpiExOutPointer ( 565 char *Title, 566 void *Value) 567{ 568 AcpiOsPrintf ("%20s : %p\n", Title, Value); 569} 570 571void 572AcpiExOutInteger ( 573 char *Title, 574 UINT32 Value) 575{ 576 AcpiOsPrintf ("%20s : %X\n", Title, Value); 577} 578 579void 580AcpiExOutAddress ( 581 char *Title, 582 ACPI_PHYSICAL_ADDRESS Value) 583{ 584 585#if ACPI_MACHINE_WIDTH == 16 586 AcpiOsPrintf ("%20s : %p\n", Title, Value); 587#else 588 AcpiOsPrintf ("%20s : %8.8X%8.8X\n", Title, ACPI_FORMAT_UINT64 (Value)); 589#endif 590} 591 592 593/***************************************************************************** 594 * 595 * FUNCTION: AcpiExDumpNode 596 * 597 * PARAMETERS: *Node - Descriptor to dump 598 * Flags - Force display 599 * 600 * DESCRIPTION: Dumps the members of the given.Node 601 * 602 ****************************************************************************/ 603 604void 605AcpiExDumpNode ( 606 ACPI_NAMESPACE_NODE *Node, 607 UINT32 Flags) 608{ 609 610 ACPI_FUNCTION_ENTRY (); 611 612 613 if (!Flags) 614 { 615 if (!((ACPI_LV_OBJECTS & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer))) 616 { 617 return; 618 } 619 } 620 621 AcpiOsPrintf ("%20s : %4.4s\n", "Name", AcpiUtGetNodeName (Node)); 622 AcpiExOutString ("Type", AcpiUtGetTypeName (Node->Type)); 623 AcpiExOutInteger ("Flags", Node->Flags); 624 AcpiExOutInteger ("Owner Id", Node->OwnerId); 625 AcpiExOutInteger ("Reference Count", Node->ReferenceCount); 626 AcpiExOutPointer ("Attached Object", AcpiNsGetAttachedObject (Node)); 627 AcpiExOutPointer ("ChildList", Node->Child); 628 AcpiExOutPointer ("NextPeer", Node->Peer); 629 AcpiExOutPointer ("Parent", AcpiNsGetParentNode (Node)); 630} 631 632 633/***************************************************************************** 634 * 635 * FUNCTION: AcpiExDumpObjectDescriptor 636 * 637 * PARAMETERS: *Object - Descriptor to dump 638 * Flags - Force display 639 * 640 * DESCRIPTION: Dumps the members of the object descriptor given. 641 * 642 ****************************************************************************/ 643 644void 645AcpiExDumpObjectDescriptor ( 646 ACPI_OPERAND_OBJECT *ObjDesc, 647 UINT32 Flags) 648{ 649 UINT32 i; 650 651 652 ACPI_FUNCTION_TRACE ("ExDumpObjectDescriptor"); 653 654 655 if (!Flags) 656 { 657 if (!((ACPI_LV_OBJECTS & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer))) 658 { 659 return_VOID; 660 } 661 } 662 663 if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_NAMED) 664 { 665 AcpiExDumpNode ((ACPI_NAMESPACE_NODE *) ObjDesc, Flags); 666 AcpiOsPrintf ("\nAttached Object (%p):\n", 667 ((ACPI_NAMESPACE_NODE *) ObjDesc)->Object); 668 AcpiExDumpObjectDescriptor ( 669 ((ACPI_NAMESPACE_NODE *) ObjDesc)->Object, Flags); 670 return_VOID; 671 } 672 673 if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND) 674 { 675 AcpiOsPrintf ( 676 "ExDumpObjectDescriptor: %p is not an ACPI operand object: [%s]\n", 677 ObjDesc, AcpiUtGetDescriptorName (ObjDesc)); 678 return_VOID; 679 } 680 681 /* Common Fields */ 682 683 AcpiExOutString ("Type", AcpiUtGetObjectTypeName (ObjDesc)); 684 AcpiExOutInteger ("Reference Count", ObjDesc->Common.ReferenceCount); 685 AcpiExOutInteger ("Flags", ObjDesc->Common.Flags); 686 687 /* Object-specific Fields */ 688 689 switch (ACPI_GET_OBJECT_TYPE (ObjDesc)) 690 { 691 case ACPI_TYPE_INTEGER: 692 693 AcpiOsPrintf ("%20s : %8.8X%8.8X\n", "Value", 694 ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value)); 695 break; 696 697 698 case ACPI_TYPE_STRING: 699 700 AcpiExOutInteger ("Length", ObjDesc->String.Length); 701 702 AcpiOsPrintf ("%20s : %p ", "Pointer", ObjDesc->String.Pointer); 703 AcpiUtPrintString (ObjDesc->String.Pointer, ACPI_UINT8_MAX); 704 AcpiOsPrintf ("\n"); 705 break; 706 707 708 case ACPI_TYPE_BUFFER: 709 710 AcpiExOutInteger ("Length", ObjDesc->Buffer.Length); 711 AcpiExOutPointer ("Pointer", ObjDesc->Buffer.Pointer); 712 ACPI_DUMP_BUFFER (ObjDesc->Buffer.Pointer, ObjDesc->Buffer.Length); 713 break; 714 715 716 case ACPI_TYPE_PACKAGE: 717 718 AcpiExOutInteger ("Flags", ObjDesc->Package.Flags); 719 AcpiExOutInteger ("Count", ObjDesc->Package.Count); 720 AcpiExOutPointer ("Elements", ObjDesc->Package.Elements); 721 722 /* Dump the package contents */ 723 724 if (ObjDesc->Package.Count > 0) 725 { 726 AcpiOsPrintf ("\nPackage Contents:\n"); 727 for (i = 0; i < ObjDesc->Package.Count; i++) 728 { 729 AcpiOsPrintf ("[%.3d] %p", i, ObjDesc->Package.Elements[i]); 730 if (ObjDesc->Package.Elements[i]) 731 { 732 AcpiOsPrintf (" %s", 733 AcpiUtGetObjectTypeName (ObjDesc->Package.Elements[i])); 734 } 735 AcpiOsPrintf ("\n"); 736 } 737 } 738 break; 739 740 741 case ACPI_TYPE_DEVICE: 742 743 AcpiExOutPointer ("Handler", ObjDesc->Device.Handler); 744 AcpiExOutPointer ("SystemNotify", ObjDesc->Device.SystemNotify); 745 AcpiExOutPointer ("DeviceNotify", ObjDesc->Device.DeviceNotify); 746 break; 747 748 749 case ACPI_TYPE_EVENT: 750 751 AcpiExOutPointer ("Semaphore", ObjDesc->Event.Semaphore); 752 break; 753 754 755 case ACPI_TYPE_METHOD: 756 757 AcpiExOutInteger ("ParamCount", ObjDesc->Method.ParamCount); 758 AcpiExOutInteger ("Concurrency", ObjDesc->Method.Concurrency); 759 AcpiExOutPointer ("Semaphore", ObjDesc->Method.Semaphore); 760 AcpiExOutInteger ("OwningId", ObjDesc->Method.OwningId); 761 AcpiExOutInteger ("AmlLength", ObjDesc->Method.AmlLength); 762 AcpiExOutPointer ("AmlStart", ObjDesc->Method.AmlStart); 763 break; 764 765 766 case ACPI_TYPE_MUTEX: 767 768 AcpiExOutInteger ("SyncLevel", ObjDesc->Mutex.SyncLevel); 769 AcpiExOutPointer ("OwnerThread", ObjDesc->Mutex.OwnerThread); 770 AcpiExOutInteger ("AcquireDepth", ObjDesc->Mutex.AcquisitionDepth); 771 AcpiExOutPointer ("Semaphore", ObjDesc->Mutex.Semaphore); 772 break; 773 774 775 case ACPI_TYPE_REGION: 776 777 AcpiExOutInteger ("SpaceId", ObjDesc->Region.SpaceId); 778 AcpiExOutInteger ("Flags", ObjDesc->Region.Flags); 779 AcpiExOutAddress ("Address", ObjDesc->Region.Address); 780 AcpiExOutInteger ("Length", ObjDesc->Region.Length); 781 AcpiExOutPointer ("Handler", ObjDesc->Region.Handler); 782 AcpiExOutPointer ("Next", ObjDesc->Region.Next); 783 break; 784 785 786 case ACPI_TYPE_POWER: 787 788 AcpiExOutInteger ("SystemLevel", ObjDesc->PowerResource.SystemLevel); 789 AcpiExOutInteger ("ResourceOrder", ObjDesc->PowerResource.ResourceOrder); 790 AcpiExOutPointer ("SystemNotify", ObjDesc->PowerResource.SystemNotify); 791 AcpiExOutPointer ("DeviceNotify", ObjDesc->PowerResource.DeviceNotify); 792 break; 793 794 795 case ACPI_TYPE_PROCESSOR: 796 797 AcpiExOutInteger ("Processor ID", ObjDesc->Processor.ProcId); 798 AcpiExOutInteger ("Length", ObjDesc->Processor.Length); 799 AcpiExOutAddress ("Address", (ACPI_PHYSICAL_ADDRESS) ObjDesc->Processor.Address); 800 AcpiExOutPointer ("SystemNotify", ObjDesc->Processor.SystemNotify); 801 AcpiExOutPointer ("DeviceNotify", ObjDesc->Processor.DeviceNotify); 802 AcpiExOutPointer ("Handler", ObjDesc->Processor.Handler); 803 break; 804 805 806 case ACPI_TYPE_THERMAL: 807 808 AcpiExOutPointer ("SystemNotify", ObjDesc->ThermalZone.SystemNotify); 809 AcpiExOutPointer ("DeviceNotify", ObjDesc->ThermalZone.DeviceNotify); 810 AcpiExOutPointer ("Handler", ObjDesc->ThermalZone.Handler); 811 break; 812 813 814 case ACPI_TYPE_BUFFER_FIELD: 815 case ACPI_TYPE_LOCAL_REGION_FIELD: 816 case ACPI_TYPE_LOCAL_BANK_FIELD: 817 case ACPI_TYPE_LOCAL_INDEX_FIELD: 818 819 AcpiExOutInteger ("FieldFlags", ObjDesc->CommonField.FieldFlags); 820 AcpiExOutInteger ("AccessByteWidth",ObjDesc->CommonField.AccessByteWidth); 821 AcpiExOutInteger ("BitLength", ObjDesc->CommonField.BitLength); 822 AcpiExOutInteger ("FldBitOffset", ObjDesc->CommonField.StartFieldBitOffset); 823 AcpiExOutInteger ("BaseByteOffset", ObjDesc->CommonField.BaseByteOffset); 824 AcpiExOutInteger ("DatumValidBits", ObjDesc->CommonField.DatumValidBits); 825 AcpiExOutInteger ("EndFldValidBits",ObjDesc->CommonField.EndFieldValidBits); 826 AcpiExOutInteger ("EndBufValidBits",ObjDesc->CommonField.EndBufferValidBits); 827 AcpiExOutPointer ("ParentNode", ObjDesc->CommonField.Node); 828 829 switch (ACPI_GET_OBJECT_TYPE (ObjDesc)) 830 { 831 case ACPI_TYPE_BUFFER_FIELD: 832 AcpiExOutPointer ("BufferObj", ObjDesc->BufferField.BufferObj); 833 break; 834 835 case ACPI_TYPE_LOCAL_REGION_FIELD: 836 AcpiExOutPointer ("RegionObj", ObjDesc->Field.RegionObj); 837 break; 838 839 case ACPI_TYPE_LOCAL_BANK_FIELD: 840 AcpiExOutInteger ("Value", ObjDesc->BankField.Value); 841 AcpiExOutPointer ("RegionObj", ObjDesc->BankField.RegionObj); 842 AcpiExOutPointer ("BankObj", ObjDesc->BankField.BankObj); 843 break; 844 845 case ACPI_TYPE_LOCAL_INDEX_FIELD: 846 AcpiExOutInteger ("Value", ObjDesc->IndexField.Value); 847 AcpiExOutPointer ("Index", ObjDesc->IndexField.IndexObj); 848 AcpiExOutPointer ("Data", ObjDesc->IndexField.DataObj); 849 break; 850 851 default: 852 /* All object types covered above */ 853 break; 854 } 855 break; 856 857 858 case ACPI_TYPE_LOCAL_REFERENCE: 859 860 AcpiExOutInteger ("TargetType", ObjDesc->Reference.TargetType); 861 AcpiExOutString ("Opcode", (AcpiPsGetOpcodeInfo (ObjDesc->Reference.Opcode))->Name); 862 AcpiExOutInteger ("Offset", ObjDesc->Reference.Offset); 863 AcpiExOutPointer ("ObjDesc", ObjDesc->Reference.Object); 864 AcpiExOutPointer ("Node", ObjDesc->Reference.Node); 865 AcpiExOutPointer ("Where", ObjDesc->Reference.Where); 866 break; 867 868 869 case ACPI_TYPE_LOCAL_ADDRESS_HANDLER: 870 871 AcpiExOutInteger ("SpaceId", ObjDesc->AddressSpace.SpaceId); 872 AcpiExOutPointer ("Next", ObjDesc->AddressSpace.Next); 873 AcpiExOutPointer ("RegionList", ObjDesc->AddressSpace.RegionList); 874 AcpiExOutPointer ("Node", ObjDesc->AddressSpace.Node); 875 AcpiExOutPointer ("Context", ObjDesc->AddressSpace.Context); 876 break; 877 878 879 case ACPI_TYPE_LOCAL_NOTIFY: 880 881 AcpiExOutPointer ("Node", ObjDesc->Notify.Node); 882 AcpiExOutPointer ("Context", ObjDesc->Notify.Context); 883 break; 884 885 886 case ACPI_TYPE_LOCAL_ALIAS: 887 case ACPI_TYPE_LOCAL_METHOD_ALIAS: 888 case ACPI_TYPE_LOCAL_EXTRA: 889 case ACPI_TYPE_LOCAL_DATA: 890 default: 891 892 AcpiOsPrintf ( 893 "ExDumpObjectDescriptor: Display not implemented for object type %s\n", 894 AcpiUtGetObjectTypeName (ObjDesc)); 895 break; 896 } 897 898 return_VOID; 899} 900 901#endif 902 903