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