exdump.c revision 102550
1/****************************************************************************** 2 * 3 * Module Name: exdump - Interpreter debug output routines 4 * $Revision: 159 $ 5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999 - 2002, 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 133#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 134 135/***************************************************************************** 136 * 137 * FUNCTION: AcpiExDumpOperand 138 * 139 * PARAMETERS: *ObjDesc - Pointer to entry to be dumped 140 * 141 * RETURN: Status 142 * 143 * DESCRIPTION: Dump an operand object 144 * 145 ****************************************************************************/ 146 147void 148AcpiExDumpOperand ( 149 ACPI_OPERAND_OBJECT *ObjDesc) 150{ 151 UINT8 *Buf = NULL; 152 UINT32 Length; 153 UINT32 i; 154 ACPI_OPERAND_OBJECT **Element; 155 UINT16 ElementIndex; 156 157 158 ACPI_FUNCTION_NAME ("ExDumpOperand") 159 160 161 if (!((ACPI_LV_EXEC & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer))) 162 { 163 return; 164 } 165 166 if (!ObjDesc) 167 { 168 /* 169 * This usually indicates that something serious is wrong -- 170 * since most (if not all) 171 * code that dumps the stack expects something to be there! 172 */ 173 AcpiOsPrintf ("Null stack entry ptr\n"); 174 return; 175 } 176 177 if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_NAMED) 178 { 179 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p NS Node: ", ObjDesc)); 180 ACPI_DUMP_ENTRY (ObjDesc, ACPI_LV_EXEC); 181 return; 182 } 183 184 if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND) 185 { 186 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p is not a local object\n", ObjDesc)); 187 ACPI_DUMP_BUFFER (ObjDesc, sizeof (ACPI_OPERAND_OBJECT)); 188 return; 189 } 190 191 /* ObjDesc is a valid object */ 192 193 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p ", ObjDesc)); 194 195 switch (ACPI_GET_OBJECT_TYPE (ObjDesc)) 196 { 197 case INTERNAL_TYPE_REFERENCE: 198 199 switch (ObjDesc->Reference.Opcode) 200 { 201 case AML_DEBUG_OP: 202 203 AcpiOsPrintf ("Reference: Debug\n"); 204 break; 205 206 207 case AML_NAME_OP: 208 209 ACPI_DUMP_PATHNAME (ObjDesc->Reference.Object, "Reference: Name: ", 210 ACPI_LV_INFO, _COMPONENT); 211 ACPI_DUMP_ENTRY (ObjDesc->Reference.Object, ACPI_LV_INFO); 212 break; 213 214 215 case AML_INDEX_OP: 216 217 AcpiOsPrintf ("Reference: Index %p\n", 218 ObjDesc->Reference.Object); 219 break; 220 221 222 case AML_REF_OF_OP: 223 224 AcpiOsPrintf ("Reference: (RefOf) %p\n", 225 ObjDesc->Reference.Object); 226 break; 227 228 229 case AML_ARG_OP: 230 231 AcpiOsPrintf ("Reference: Arg%d", 232 ObjDesc->Reference.Offset); 233 234 if (ACPI_GET_OBJECT_TYPE (ObjDesc) == ACPI_TYPE_INTEGER) 235 { 236 /* Value is a Number */ 237 238 AcpiOsPrintf (" value is [%8.8X%8.8x]", 239 ACPI_HIDWORD(ObjDesc->Integer.Value), 240 ACPI_LODWORD(ObjDesc->Integer.Value)); 241 } 242 243 AcpiOsPrintf ("\n"); 244 break; 245 246 247 case AML_LOCAL_OP: 248 249 AcpiOsPrintf ("Reference: Local%d", 250 ObjDesc->Reference.Offset); 251 252 if (ACPI_GET_OBJECT_TYPE (ObjDesc) == ACPI_TYPE_INTEGER) 253 { 254 255 /* Value is a Number */ 256 257 AcpiOsPrintf (" value is [%8.8X%8.8x]", 258 ACPI_HIDWORD(ObjDesc->Integer.Value), 259 ACPI_LODWORD(ObjDesc->Integer.Value)); 260 } 261 262 AcpiOsPrintf ("\n"); 263 break; 264 265 266 case AML_INT_NAMEPATH_OP: 267 268 AcpiOsPrintf ("Reference.Node->Name %X\n", 269 ObjDesc->Reference.Node->Name.Integer); 270 break; 271 272 273 default: 274 275 /* unknown opcode */ 276 277 AcpiOsPrintf ("Unknown Reference opcode=%X\n", 278 ObjDesc->Reference.Opcode); 279 break; 280 281 } 282 283 break; 284 285 286 case ACPI_TYPE_BUFFER: 287 288 AcpiOsPrintf ("Buffer len %X @ %p \n", 289 ObjDesc->Buffer.Length, 290 ObjDesc->Buffer.Pointer); 291 292 Length = ObjDesc->Buffer.Length; 293 294 if (Length > 64) 295 { 296 Length = 64; 297 } 298 299 /* Debug only -- dump the buffer contents */ 300 301 if (ObjDesc->Buffer.Pointer) 302 { 303 AcpiOsPrintf ("Buffer Contents: "); 304 305 for (Buf = ObjDesc->Buffer.Pointer; Length--; ++Buf) 306 { 307 AcpiOsPrintf (" %02x", *Buf); 308 } 309 AcpiOsPrintf ("\n"); 310 } 311 312 break; 313 314 315 case ACPI_TYPE_INTEGER: 316 317 AcpiOsPrintf ("Integer %8.8X%8.8X\n", 318 ACPI_HIDWORD (ObjDesc->Integer.Value), 319 ACPI_LODWORD (ObjDesc->Integer.Value)); 320 break; 321 322 323 case INTERNAL_TYPE_IF: 324 325 AcpiOsPrintf ("If [Integer] %8.8X%8.8X\n", 326 ACPI_HIDWORD (ObjDesc->Integer.Value), 327 ACPI_LODWORD (ObjDesc->Integer.Value)); 328 break; 329 330 331 case INTERNAL_TYPE_WHILE: 332 333 AcpiOsPrintf ("While [Integer] %8.8X%8.8X\n", 334 ACPI_HIDWORD (ObjDesc->Integer.Value), 335 ACPI_LODWORD (ObjDesc->Integer.Value)); 336 break; 337 338 339 case ACPI_TYPE_PACKAGE: 340 341 AcpiOsPrintf ("Package count %X @ %p\n", 342 ObjDesc->Package.Count, ObjDesc->Package.Elements); 343 344 /* 345 * If elements exist, package vector pointer is valid, 346 * and debug_level exceeds 1, dump package's elements. 347 */ 348 if (ObjDesc->Package.Count && 349 ObjDesc->Package.Elements && 350 AcpiDbgLevel > 1) 351 { 352 for (ElementIndex = 0, Element = ObjDesc->Package.Elements; 353 ElementIndex < ObjDesc->Package.Count; 354 ++ElementIndex, ++Element) 355 { 356 AcpiExDumpOperand (*Element); 357 } 358 } 359 AcpiOsPrintf ("\n"); 360 break; 361 362 363 case ACPI_TYPE_REGION: 364 365 AcpiOsPrintf ("Region %s (%X)", 366 AcpiUtGetRegionName (ObjDesc->Region.SpaceId), 367 ObjDesc->Region.SpaceId); 368 369 /* 370 * If the address and length have not been evaluated, 371 * don't print them. 372 */ 373 if (!(ObjDesc->Region.Flags & AOPOBJ_DATA_VALID)) 374 { 375 AcpiOsPrintf ("\n"); 376 } 377 else 378 { 379 AcpiOsPrintf (" base %8.8X%8.8X Length %X\n", 380 ACPI_HIDWORD (ObjDesc->Region.Address), 381 ACPI_LODWORD (ObjDesc->Region.Address), 382 ObjDesc->Region.Length); 383 } 384 break; 385 386 387 case ACPI_TYPE_STRING: 388 389 AcpiOsPrintf ("String length %X @ %p \"", 390 ObjDesc->String.Length, ObjDesc->String.Pointer); 391 392 for (i = 0; i < ObjDesc->String.Length; i++) 393 { 394 AcpiOsPrintf ("%c", 395 ObjDesc->String.Pointer[i]); 396 } 397 AcpiOsPrintf ("\"\n"); 398 break; 399 400 401 case INTERNAL_TYPE_BANK_FIELD: 402 403 AcpiOsPrintf ("BankField\n"); 404 break; 405 406 407 case INTERNAL_TYPE_REGION_FIELD: 408 409 AcpiOsPrintf ( 410 "RegionField: Bits=%X AccWidth=%X Lock=%X Update=%X at byte=%X bit=%X of below:\n", 411 ObjDesc->Field.BitLength, ObjDesc->Field.AccessByteWidth, 412 ObjDesc->Field.FieldFlags & AML_FIELD_LOCK_RULE_MASK, 413 ObjDesc->Field.FieldFlags & AML_FIELD_UPDATE_RULE_MASK, 414 ObjDesc->Field.BaseByteOffset, ObjDesc->Field.StartFieldBitOffset); 415 ACPI_DUMP_STACK_ENTRY (ObjDesc->Field.RegionObj); 416 break; 417 418 419 case INTERNAL_TYPE_INDEX_FIELD: 420 421 AcpiOsPrintf ("IndexField\n"); 422 break; 423 424 425 case ACPI_TYPE_BUFFER_FIELD: 426 427 AcpiOsPrintf ( 428 "BufferField: %X bits at byte %X bit %X of \n", 429 ObjDesc->BufferField.BitLength, ObjDesc->BufferField.BaseByteOffset, 430 ObjDesc->BufferField.StartFieldBitOffset); 431 432 if (!ObjDesc->BufferField.BufferObj) 433 { 434 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "*NULL* \n")); 435 } 436 else if (ACPI_GET_OBJECT_TYPE (ObjDesc->BufferField.BufferObj) != ACPI_TYPE_BUFFER) 437 { 438 AcpiOsPrintf ("*not a Buffer* \n"); 439 } 440 else 441 { 442 ACPI_DUMP_STACK_ENTRY (ObjDesc->BufferField.BufferObj); 443 } 444 445 break; 446 447 448 case ACPI_TYPE_EVENT: 449 450 AcpiOsPrintf ("Event\n"); 451 break; 452 453 454 case ACPI_TYPE_METHOD: 455 456 AcpiOsPrintf ( 457 "Method(%X) @ %p:%X\n", 458 ObjDesc->Method.ParamCount, 459 ObjDesc->Method.AmlStart, ObjDesc->Method.AmlLength); 460 break; 461 462 463 case ACPI_TYPE_MUTEX: 464 465 AcpiOsPrintf ("Mutex\n"); 466 break; 467 468 469 case ACPI_TYPE_DEVICE: 470 471 AcpiOsPrintf ("Device\n"); 472 break; 473 474 475 case ACPI_TYPE_POWER: 476 477 AcpiOsPrintf ("Power\n"); 478 break; 479 480 481 case ACPI_TYPE_PROCESSOR: 482 483 AcpiOsPrintf ("Processor\n"); 484 break; 485 486 487 case ACPI_TYPE_THERMAL: 488 489 AcpiOsPrintf ("Thermal\n"); 490 break; 491 492 493 default: 494 /* Unknown Type */ 495 496 AcpiOsPrintf ("Unknown Type %X\n", ACPI_GET_OBJECT_TYPE (ObjDesc)); 497 break; 498 } 499 500 return; 501} 502 503 504/***************************************************************************** 505 * 506 * FUNCTION: AcpiExDumpOperands 507 * 508 * PARAMETERS: InterpreterMode - Load or Exec 509 * *Ident - Identification 510 * NumLevels - # of stack entries to dump above line 511 * *Note - Output notation 512 * 513 * DESCRIPTION: Dump the object stack 514 * 515 ****************************************************************************/ 516 517void 518AcpiExDumpOperands ( 519 ACPI_OPERAND_OBJECT **Operands, 520 ACPI_INTERPRETER_MODE InterpreterMode, 521 NATIVE_CHAR *Ident, 522 UINT32 NumLevels, 523 NATIVE_CHAR *Note, 524 NATIVE_CHAR *ModuleName, 525 UINT32 LineNumber) 526{ 527 NATIVE_UINT i; 528 ACPI_OPERAND_OBJECT **ObjDesc; 529 530 531 ACPI_FUNCTION_NAME ("ExDumpOperands"); 532 533 534 if (!Ident) 535 { 536 Ident = "?"; 537 } 538 539 if (!Note) 540 { 541 Note = "?"; 542 } 543 544 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, 545 "************* Operand Stack Contents (Opcode [%s], %d Operands)\n", 546 Ident, NumLevels)); 547 548 if (NumLevels == 0) 549 { 550 NumLevels = 1; 551 } 552 553 /* Dump the operand stack starting at the top */ 554 555 for (i = 0; NumLevels > 0; i--, NumLevels--) 556 { 557 ObjDesc = &Operands[i]; 558 AcpiExDumpOperand (*ObjDesc); 559 } 560 561 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, 562 "************* Stack dump from %s(%d), %s\n", 563 ModuleName, LineNumber, Note)); 564 return; 565} 566 567 568/***************************************************************************** 569 * 570 * FUNCTION: AcpiExOut* 571 * 572 * PARAMETERS: Title - Descriptive text 573 * Value - Value to be displayed 574 * 575 * DESCRIPTION: Object dump output formatting functions. These functions 576 * reduce the number of format strings required and keeps them 577 * all in one place for easy modification. 578 * 579 ****************************************************************************/ 580 581void 582AcpiExOutString ( 583 char *Title, 584 char *Value) 585{ 586 AcpiOsPrintf ("%20s : %s\n", Title, Value); 587} 588 589void 590AcpiExOutPointer ( 591 char *Title, 592 void *Value) 593{ 594 AcpiOsPrintf ("%20s : %p\n", Title, Value); 595} 596 597void 598AcpiExOutInteger ( 599 char *Title, 600 UINT32 Value) 601{ 602 AcpiOsPrintf ("%20s : %X\n", Title, Value); 603} 604 605void 606AcpiExOutAddress ( 607 char *Title, 608 ACPI_PHYSICAL_ADDRESS Value) 609{ 610 611#if ACPI_MACHINE_WIDTH == 16 612 AcpiOsPrintf ("%20s : %p\n", Title, Value); 613#else 614 AcpiOsPrintf ("%20s : %8.8X%8.8X\n", Title, 615 ACPI_HIDWORD (Value), ACPI_LODWORD (Value)); 616#endif 617} 618 619 620/***************************************************************************** 621 * 622 * FUNCTION: AcpiExDumpNode 623 * 624 * PARAMETERS: *Node - Descriptor to dump 625 * Flags - Force display 626 * 627 * DESCRIPTION: Dumps the members of the given.Node 628 * 629 ****************************************************************************/ 630 631void 632AcpiExDumpNode ( 633 ACPI_NAMESPACE_NODE *Node, 634 UINT32 Flags) 635{ 636 637 ACPI_FUNCTION_ENTRY (); 638 639 640 if (!Flags) 641 { 642 if (!((ACPI_LV_OBJECTS & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer))) 643 { 644 return; 645 } 646 } 647 648 AcpiOsPrintf ("%20s : %4.4s\n", "Name", Node->Name.Ascii); 649 AcpiExOutString ("Type", AcpiUtGetTypeName (Node->Type)); 650 AcpiExOutInteger ("Flags", Node->Flags); 651 AcpiExOutInteger ("Owner Id", Node->OwnerId); 652 AcpiExOutInteger ("Reference Count", Node->ReferenceCount); 653 AcpiExOutPointer ("Attached Object", AcpiNsGetAttachedObject (Node)); 654 AcpiExOutPointer ("ChildList", Node->Child); 655 AcpiExOutPointer ("NextPeer", Node->Peer); 656 AcpiExOutPointer ("Parent", AcpiNsGetParentNode (Node)); 657} 658 659 660/***************************************************************************** 661 * 662 * FUNCTION: AcpiExDumpObjectDescriptor 663 * 664 * PARAMETERS: *Object - Descriptor to dump 665 * Flags - Force display 666 * 667 * DESCRIPTION: Dumps the members of the object descriptor given. 668 * 669 ****************************************************************************/ 670 671void 672AcpiExDumpObjectDescriptor ( 673 ACPI_OPERAND_OBJECT *ObjDesc, 674 UINT32 Flags) 675{ 676 UINT32 i; 677 678 679 ACPI_FUNCTION_TRACE ("ExDumpObjectDescriptor"); 680 681 682 if (!Flags) 683 { 684 if (!((ACPI_LV_OBJECTS & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer))) 685 { 686 return_VOID; 687 } 688 } 689 690 if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND) 691 { 692 AcpiOsPrintf ("ExDumpObjectDescriptor: %p is not a valid ACPI object\n", ObjDesc); 693 return_VOID; 694 } 695 696 /* Common Fields */ 697 698 AcpiExOutString ("Type", AcpiUtGetObjectTypeName (ObjDesc)); 699 AcpiExOutInteger ("Reference Count", ObjDesc->Common.ReferenceCount); 700 AcpiExOutInteger ("Flags", ObjDesc->Common.Flags); 701 702 /* Object-specific Fields */ 703 704 switch (ACPI_GET_OBJECT_TYPE (ObjDesc)) 705 { 706 case ACPI_TYPE_INTEGER: 707 708 AcpiOsPrintf ("%20s : %8.8X%8.8X\n", "Value", 709 ACPI_HIDWORD (ObjDesc->Integer.Value), 710 ACPI_LODWORD (ObjDesc->Integer.Value)); 711 break; 712 713 714 case ACPI_TYPE_STRING: 715 716 AcpiExOutInteger ("Length", ObjDesc->String.Length); 717 AcpiExOutPointer ("Pointer", ObjDesc->String.Pointer); 718 break; 719 720 721 case ACPI_TYPE_BUFFER: 722 723 AcpiExOutInteger ("Length", ObjDesc->Buffer.Length); 724 AcpiExOutPointer ("Pointer", ObjDesc->Buffer.Pointer); 725 break; 726 727 728 case ACPI_TYPE_PACKAGE: 729 730 AcpiExOutInteger ("Flags", ObjDesc->Package.Flags); 731 AcpiExOutInteger ("Count", ObjDesc->Package.Count); 732 AcpiExOutPointer ("Elements", ObjDesc->Package.Elements); 733 734 /* Dump the package contents */ 735 736 if (ObjDesc->Package.Count > 0) 737 { 738 AcpiOsPrintf ("\nPackage Contents:\n"); 739 for (i = 0; i < ObjDesc->Package.Count; i++) 740 { 741 AcpiOsPrintf ("[%.3d] %p", i, ObjDesc->Package.Elements[i]); 742 if (ObjDesc->Package.Elements[i]) 743 { 744 AcpiOsPrintf (" %s", AcpiUtGetObjectTypeName (ObjDesc->Package.Elements[i])); 745 } 746 AcpiOsPrintf ("\n"); 747 } 748 } 749 break; 750 751 752 case ACPI_TYPE_DEVICE: 753 754 AcpiExOutPointer ("AddrHandler", ObjDesc->Device.AddrHandler); 755 AcpiExOutPointer ("SysHandler", ObjDesc->Device.SysHandler); 756 AcpiExOutPointer ("DrvHandler", ObjDesc->Device.DrvHandler); 757 break; 758 759 760 case ACPI_TYPE_EVENT: 761 762 AcpiExOutPointer ("Semaphore", ObjDesc->Event.Semaphore); 763 break; 764 765 766 case ACPI_TYPE_METHOD: 767 768 AcpiExOutInteger ("ParamCount", ObjDesc->Method.ParamCount); 769 AcpiExOutInteger ("Concurrency", ObjDesc->Method.Concurrency); 770 AcpiExOutPointer ("Semaphore", ObjDesc->Method.Semaphore); 771 AcpiExOutInteger ("OwningId", ObjDesc->Method.OwningId); 772 AcpiExOutInteger ("AmlLength", ObjDesc->Method.AmlLength); 773 AcpiExOutPointer ("AmlStart", ObjDesc->Method.AmlStart); 774 break; 775 776 777 case ACPI_TYPE_MUTEX: 778 779 AcpiExOutInteger ("SyncLevel", ObjDesc->Mutex.SyncLevel); 780 AcpiExOutPointer ("OwnerThread", ObjDesc->Mutex.OwnerThread); 781 AcpiExOutInteger ("AcquisitionDepth",ObjDesc->Mutex.AcquisitionDepth); 782 AcpiExOutPointer ("Semaphore", ObjDesc->Mutex.Semaphore); 783 break; 784 785 786 case ACPI_TYPE_REGION: 787 788 AcpiExOutInteger ("SpaceId", ObjDesc->Region.SpaceId); 789 AcpiExOutInteger ("Flags", ObjDesc->Region.Flags); 790 AcpiExOutAddress ("Address", ObjDesc->Region.Address); 791 AcpiExOutInteger ("Length", ObjDesc->Region.Length); 792 AcpiExOutPointer ("AddrHandler", ObjDesc->Region.AddrHandler); 793 AcpiExOutPointer ("Next", ObjDesc->Region.Next); 794 break; 795 796 797 case ACPI_TYPE_POWER: 798 799 AcpiExOutInteger ("SystemLevel", ObjDesc->PowerResource.SystemLevel); 800 AcpiExOutInteger ("ResourceOrder", ObjDesc->PowerResource.ResourceOrder); 801 AcpiExOutPointer ("SysHandler", ObjDesc->PowerResource.SysHandler); 802 AcpiExOutPointer ("DrvHandler", ObjDesc->PowerResource.DrvHandler); 803 break; 804 805 806 case ACPI_TYPE_PROCESSOR: 807 808 AcpiExOutInteger ("Processor ID", ObjDesc->Processor.ProcId); 809 AcpiExOutInteger ("Length", ObjDesc->Processor.Length); 810 AcpiExOutAddress ("Address", (ACPI_PHYSICAL_ADDRESS) ObjDesc->Processor.Address); 811 AcpiExOutPointer ("SysHandler", ObjDesc->Processor.SysHandler); 812 AcpiExOutPointer ("DrvHandler", ObjDesc->Processor.DrvHandler); 813 AcpiExOutPointer ("AddrHandler", ObjDesc->Processor.AddrHandler); 814 break; 815 816 817 case ACPI_TYPE_THERMAL: 818 819 AcpiExOutPointer ("SysHandler", ObjDesc->ThermalZone.SysHandler); 820 AcpiExOutPointer ("DrvHandler", ObjDesc->ThermalZone.DrvHandler); 821 AcpiExOutPointer ("AddrHandler", ObjDesc->ThermalZone.AddrHandler); 822 break; 823 824 825 case ACPI_TYPE_BUFFER_FIELD: 826 case INTERNAL_TYPE_REGION_FIELD: 827 case INTERNAL_TYPE_BANK_FIELD: 828 case INTERNAL_TYPE_INDEX_FIELD: 829 830 AcpiExOutInteger ("FieldFlags", ObjDesc->CommonField.FieldFlags); 831 AcpiExOutInteger ("AccessByteWidth", ObjDesc->CommonField.AccessByteWidth); 832 AcpiExOutInteger ("BitLength", ObjDesc->CommonField.BitLength); 833 AcpiExOutInteger ("FldBitOffset", ObjDesc->CommonField.StartFieldBitOffset); 834 AcpiExOutInteger ("BaseByteOffset", ObjDesc->CommonField.BaseByteOffset); 835 AcpiExOutInteger ("DatumValidBits", ObjDesc->CommonField.DatumValidBits); 836 AcpiExOutInteger ("EndFldValidBits", ObjDesc->CommonField.EndFieldValidBits); 837 AcpiExOutInteger ("EndBufValidBits", ObjDesc->CommonField.EndBufferValidBits); 838 AcpiExOutPointer ("ParentNode", ObjDesc->CommonField.Node); 839 840 switch (ACPI_GET_OBJECT_TYPE (ObjDesc)) 841 { 842 case ACPI_TYPE_BUFFER_FIELD: 843 AcpiExOutPointer ("BufferObj", ObjDesc->BufferField.BufferObj); 844 break; 845 846 case INTERNAL_TYPE_REGION_FIELD: 847 AcpiExOutPointer ("RegionObj", ObjDesc->Field.RegionObj); 848 break; 849 850 case INTERNAL_TYPE_BANK_FIELD: 851 AcpiExOutInteger ("Value", ObjDesc->BankField.Value); 852 AcpiExOutPointer ("RegionObj", ObjDesc->BankField.RegionObj); 853 AcpiExOutPointer ("BankObj", ObjDesc->BankField.BankObj); 854 break; 855 856 case INTERNAL_TYPE_INDEX_FIELD: 857 AcpiExOutInteger ("Value", ObjDesc->IndexField.Value); 858 AcpiExOutPointer ("Index", ObjDesc->IndexField.IndexObj); 859 AcpiExOutPointer ("Data", ObjDesc->IndexField.DataObj); 860 break; 861 862 default: 863 /* All object types covered above */ 864 break; 865 } 866 break; 867 868 869 case INTERNAL_TYPE_REFERENCE: 870 871 AcpiExOutInteger ("TargetType", ObjDesc->Reference.TargetType); 872 AcpiExOutString ("Opcode", (AcpiPsGetOpcodeInfo (ObjDesc->Reference.Opcode))->Name); 873 AcpiExOutInteger ("Offset", ObjDesc->Reference.Offset); 874 AcpiExOutPointer ("ObjDesc", ObjDesc->Reference.Object); 875 AcpiExOutPointer ("Node", ObjDesc->Reference.Node); 876 AcpiExOutPointer ("Where", ObjDesc->Reference.Where); 877 break; 878 879 880 case INTERNAL_TYPE_ADDRESS_HANDLER: 881 882 AcpiExOutInteger ("SpaceId", ObjDesc->AddrHandler.SpaceId); 883 AcpiExOutPointer ("Next", ObjDesc->AddrHandler.Next); 884 AcpiExOutPointer ("RegionList", ObjDesc->AddrHandler.RegionList); 885 AcpiExOutPointer ("Node", ObjDesc->AddrHandler.Node); 886 AcpiExOutPointer ("Context", ObjDesc->AddrHandler.Context); 887 break; 888 889 890 case INTERNAL_TYPE_NOTIFY: 891 892 AcpiExOutPointer ("Node", ObjDesc->NotifyHandler.Node); 893 AcpiExOutPointer ("Context", ObjDesc->NotifyHandler.Context); 894 break; 895 896 897 case INTERNAL_TYPE_ALIAS: 898 case INTERNAL_TYPE_FIELD_DEFN: 899 case INTERNAL_TYPE_BANK_FIELD_DEFN: 900 case INTERNAL_TYPE_INDEX_FIELD_DEFN: 901 case INTERNAL_TYPE_IF: 902 case INTERNAL_TYPE_ELSE: 903 case INTERNAL_TYPE_WHILE: 904 case INTERNAL_TYPE_SCOPE: 905 case INTERNAL_TYPE_DEF_ANY: 906 case INTERNAL_TYPE_EXTRA: 907 case INTERNAL_TYPE_DATA: 908 default: 909 910 AcpiOsPrintf ("ExDumpObjectDescriptor: Display not implemented for object type %s\n", 911 AcpiUtGetObjectTypeName (ObjDesc)); 912 break; 913 } 914 915 return_VOID; 916} 917 918#endif 919 920