1 /*******************************************************************************
   2  *
   3  * Module Name: dmopcode - AML disassembler, specific AML opcodes
   4  *
   5  ******************************************************************************/
   6 
   7 /*
   8  * Copyright (C) 2000 - 2014, Intel Corp.
   9  * All rights reserved.
  10  *
  11  * Redistribution and use in source and binary forms, with or without
  12  * modification, are permitted provided that the following conditions
  13  * are met:
  14  * 1. Redistributions of source code must retain the above copyright
  15  *    notice, this list of conditions, and the following disclaimer,
  16  *    without modification.
  17  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  18  *    substantially similar to the "NO WARRANTY" disclaimer below
  19  *    ("Disclaimer") and any redistribution must be conditioned upon
  20  *    including a substantially similar Disclaimer requirement for further
  21  *    binary redistribution.
  22  * 3. Neither the names of the above-listed copyright holders nor the names
  23  *    of any contributors may be used to endorse or promote products derived
  24  *    from this software without specific prior written permission.
  25  *
  26  * Alternatively, this software may be distributed under the terms of the
  27  * GNU General Public License ("GPL") version 2 as published by the Free
  28  * Software Foundation.
  29  *
  30  * NO WARRANTY
  31  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  32  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  33  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
  34  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  35  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  36  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  37  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  38  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  39  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  40  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  41  * POSSIBILITY OF SUCH DAMAGES.
  42  */
  43 
  44 #include "acpi.h"
  45 #include "accommon.h"
  46 #include "acparser.h"
  47 #include "amlcode.h"
  48 #include "acdisasm.h"
  49 
  50 #ifdef ACPI_DISASSEMBLER
  51 
  52 #define _COMPONENT          ACPI_CA_DEBUGGER
  53         ACPI_MODULE_NAME    ("dmopcode")
  54 
  55 /* Local prototypes */
  56 
  57 static void
  58 AcpiDmMatchKeyword (
  59     ACPI_PARSE_OBJECT       *Op);
  60 
  61 
  62 /*******************************************************************************
  63  *
  64  * FUNCTION:    AcpiDmPredefinedDescription
  65  *
  66  * PARAMETERS:  Op              - Name() parse object
  67  *
  68  * RETURN:      None
  69  *
  70  * DESCRIPTION: Emit a description comment for a predefined ACPI name.
  71  *              Used for iASL compiler only.
  72  *
  73  ******************************************************************************/
  74 
  75 void
  76 AcpiDmPredefinedDescription (
  77     ACPI_PARSE_OBJECT       *Op)
  78 {
  79 #ifdef ACPI_ASL_COMPILER
  80     const AH_PREDEFINED_NAME    *Info;
  81     char                        *NameString;
  82     int                         LastCharIsDigit;
  83     int                         LastCharsAreHex;
  84 
  85 
  86     if (!Op)
  87     {
  88         return;
  89     }
  90 
  91     /* Ensure that the comment field is emitted only once */
  92 
  93     if (Op->Common.DisasmFlags & ACPI_PARSEOP_PREDEF_CHECKED)
  94     {
  95         return;
  96     }
  97     Op->Common.DisasmFlags |= ACPI_PARSEOP_PREDEF_CHECKED;
  98 
  99     /* Predefined name must start with an underscore */
 100 
 101     NameString = ACPI_CAST_PTR (char, &Op->Named.Name);
 102     if (NameString[0] != '_')
 103     {
 104         return;
 105     }
 106 
 107     /*
 108      * Check for the special ACPI names:
 109      * _ACd, _ALd, _EJd, _Exx, _Lxx, _Qxx, _Wxx, _T_a
 110      * (where d=decimal_digit, x=hex_digit, a=anything)
 111      *
 112      * Convert these to the generic name for table lookup.
 113      * Note: NameString is guaranteed to be upper case here.
 114      */
 115     LastCharIsDigit =
 116         (ACPI_IS_DIGIT (NameString[3]));    /* d */
 117     LastCharsAreHex =
 118         (ACPI_IS_XDIGIT (NameString[2]) &&  /* xx */
 119          ACPI_IS_XDIGIT (NameString[3]));
 120 
 121     switch (NameString[1])
 122     {
 123     case 'A':
 124 
 125         if ((NameString[2] == 'C') && (LastCharIsDigit))
 126         {
 127             NameString = "_ACx";
 128         }
 129         else if ((NameString[2] == 'L') && (LastCharIsDigit))
 130         {
 131             NameString = "_ALx";
 132         }
 133         break;
 134 
 135     case 'E':
 136 
 137         if ((NameString[2] == 'J') && (LastCharIsDigit))
 138         {
 139             NameString = "_EJx";
 140         }
 141         else if (LastCharsAreHex)
 142         {
 143             NameString = "_Exx";
 144         }
 145         break;
 146 
 147     case 'L':
 148 
 149         if (LastCharsAreHex)
 150         {
 151             NameString = "_Lxx";
 152         }
 153         break;
 154 
 155     case 'Q':
 156 
 157         if (LastCharsAreHex)
 158         {
 159             NameString = "_Qxx";
 160         }
 161         break;
 162 
 163     case 'T':
 164 
 165         if (NameString[2] == '_')
 166         {
 167             NameString = "_T_x";
 168         }
 169         break;
 170 
 171     case 'W':
 172 
 173         if (LastCharsAreHex)
 174         {
 175             NameString = "_Wxx";
 176         }
 177         break;
 178 
 179     default:
 180 
 181         break;
 182     }
 183 
 184     /* Match the name in the info table */
 185 
 186     for (Info = AslPredefinedInfo; Info->Name; Info++)
 187     {
 188         if (ACPI_COMPARE_NAME (NameString, Info->Name))
 189         {
 190             AcpiOsPrintf ("  // %4.4s: %s",
 191                 NameString, ACPI_CAST_PTR (char, Info->Description));
 192             return;
 193         }
 194     }
 195 
 196 #endif
 197     return;
 198 }
 199 
 200 
 201 /*******************************************************************************
 202  *
 203  * FUNCTION:    AcpiDmFieldPredefinedDescription
 204  *
 205  * PARAMETERS:  Op              - Parse object
 206  *
 207  * RETURN:      None
 208  *
 209  * DESCRIPTION: Emit a description comment for a resource descriptor tag
 210  *              (which is a predefined ACPI name.) Used for iASL compiler only.
 211  *
 212  ******************************************************************************/
 213 
 214 void
 215 AcpiDmFieldPredefinedDescription (
 216     ACPI_PARSE_OBJECT       *Op)
 217 {
 218 #ifdef ACPI_ASL_COMPILER
 219     ACPI_PARSE_OBJECT       *IndexOp;
 220     char                    *Tag;
 221     const ACPI_OPCODE_INFO  *OpInfo;
 222     const AH_PREDEFINED_NAME *Info;
 223 
 224 
 225     if (!Op)
 226     {
 227         return;
 228     }
 229 
 230     /* Ensure that the comment field is emitted only once */
 231 
 232     if (Op->Common.DisasmFlags & ACPI_PARSEOP_PREDEF_CHECKED)
 233     {
 234         return;
 235     }
 236     Op->Common.DisasmFlags |= ACPI_PARSEOP_PREDEF_CHECKED;
 237 
 238     /*
 239      * Op must be one of the Create* operators: CreateField, CreateBitField,
 240      * CreateByteField, CreateWordField, CreateDwordField, CreateQwordField
 241      */
 242     OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
 243     if (!(OpInfo->Flags & AML_CREATE))
 244     {
 245         return;
 246     }
 247 
 248     /* Second argument is the Index argument */
 249 
 250     IndexOp = Op->Common.Value.Arg;
 251     IndexOp = IndexOp->Common.Next;
 252 
 253     /* Index argument must be a namepath */
 254 
 255     if (IndexOp->Common.AmlOpcode != AML_INT_NAMEPATH_OP)
 256     {
 257         return;
 258     }
 259 
 260     /* Major cheat: We previously put the Tag ptr in the Node field */
 261 
 262     Tag = ACPI_CAST_PTR (char, IndexOp->Common.Node);
 263     if (!Tag)
 264     {
 265         return;
 266     }
 267 
 268     /* Match the name in the info table */
 269 
 270     for (Info = AslPredefinedInfo; Info->Name; Info++)
 271     {
 272         if (ACPI_COMPARE_NAME (Tag, Info->Name))
 273         {
 274             AcpiOsPrintf ("  // %4.4s: %s", Tag,
 275                 ACPI_CAST_PTR (char, Info->Description));
 276             return;
 277         }
 278     }
 279 
 280 #endif
 281     return;
 282 }
 283 
 284 
 285 /*******************************************************************************
 286  *
 287  * FUNCTION:    AcpiDmMethodFlags
 288  *
 289  * PARAMETERS:  Op              - Method Object to be examined
 290  *
 291  * RETURN:      None
 292  *
 293  * DESCRIPTION: Decode control method flags
 294  *
 295  ******************************************************************************/
 296 
 297 void
 298 AcpiDmMethodFlags (
 299     ACPI_PARSE_OBJECT       *Op)
 300 {
 301     UINT32                  Flags;
 302     UINT32                  Args;
 303 
 304 
 305     /* The next Op contains the flags */
 306 
 307     Op = AcpiPsGetDepthNext (NULL, Op);
 308     Flags = (UINT8) Op->Common.Value.Integer;
 309     Args = Flags & 0x07;
 310 
 311     /* Mark the Op as completed */
 312 
 313     Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
 314 
 315     /* 1) Method argument count */
 316 
 317     AcpiOsPrintf (", %u, ", Args);
 318 
 319     /* 2) Serialize rule */
 320 
 321     if (!(Flags & 0x08))
 322     {
 323         AcpiOsPrintf ("Not");
 324     }
 325 
 326     AcpiOsPrintf ("Serialized");
 327 
 328     /* 3) SyncLevel */
 329 
 330     if (Flags & 0xF0)
 331     {
 332         AcpiOsPrintf (", %u", Flags >> 4);
 333     }
 334 }
 335 
 336 
 337 /*******************************************************************************
 338  *
 339  * FUNCTION:    AcpiDmFieldFlags
 340  *
 341  * PARAMETERS:  Op              - Field Object to be examined
 342  *
 343  * RETURN:      None
 344  *
 345  * DESCRIPTION: Decode Field definition flags
 346  *
 347  ******************************************************************************/
 348 
 349 void
 350 AcpiDmFieldFlags (
 351     ACPI_PARSE_OBJECT       *Op)
 352 {
 353     UINT32                  Flags;
 354 
 355 
 356     Op = Op->Common.Next;
 357     Flags = (UINT8) Op->Common.Value.Integer;
 358 
 359     /* Mark the Op as completed */
 360 
 361     Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
 362 
 363     AcpiOsPrintf ("%s, ", AcpiGbl_AccessTypes [Flags & 0x07]);
 364     AcpiOsPrintf ("%s, ", AcpiGbl_LockRule [(Flags & 0x10) >> 4]);
 365     AcpiOsPrintf ("%s)",  AcpiGbl_UpdateRules [(Flags & 0x60) >> 5]);
 366 }
 367 
 368 
 369 /*******************************************************************************
 370  *
 371  * FUNCTION:    AcpiDmAddressSpace
 372  *
 373  * PARAMETERS:  SpaceId         - ID to be translated
 374  *
 375  * RETURN:      None
 376  *
 377  * DESCRIPTION: Decode a SpaceId to an AddressSpaceKeyword
 378  *
 379  ******************************************************************************/
 380 
 381 void
 382 AcpiDmAddressSpace (
 383     UINT8                   SpaceId)
 384 {
 385 
 386     if (SpaceId >= ACPI_NUM_PREDEFINED_REGIONS)
 387     {
 388         if (SpaceId == 0x7F)
 389         {
 390             AcpiOsPrintf ("FFixedHW, ");
 391         }
 392         else
 393         {
 394             AcpiOsPrintf ("0x%.2X, ", SpaceId);
 395         }
 396     }
 397     else
 398     {
 399         AcpiOsPrintf ("%s, ", AcpiGbl_RegionTypes [SpaceId]);
 400     }
 401 }
 402 
 403 
 404 /*******************************************************************************
 405  *
 406  * FUNCTION:    AcpiDmRegionFlags
 407  *
 408  * PARAMETERS:  Op              - Object to be examined
 409  *
 410  * RETURN:      None
 411  *
 412  * DESCRIPTION: Decode OperationRegion flags
 413  *
 414  ******************************************************************************/
 415 
 416 void
 417 AcpiDmRegionFlags (
 418     ACPI_PARSE_OBJECT       *Op)
 419 {
 420 
 421 
 422     /* The next Op contains the SpaceId */
 423 
 424     Op = AcpiPsGetDepthNext (NULL, Op);
 425 
 426     /* Mark the Op as completed */
 427 
 428     Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
 429 
 430     AcpiOsPrintf (", ");
 431     AcpiDmAddressSpace ((UINT8) Op->Common.Value.Integer);
 432 }
 433 
 434 
 435 /*******************************************************************************
 436  *
 437  * FUNCTION:    AcpiDmMatchOp
 438  *
 439  * PARAMETERS:  Op              - Match Object to be examined
 440  *
 441  * RETURN:      None
 442  *
 443  * DESCRIPTION: Decode Match opcode operands
 444  *
 445  ******************************************************************************/
 446 
 447 void
 448 AcpiDmMatchOp (
 449     ACPI_PARSE_OBJECT       *Op)
 450 {
 451     ACPI_PARSE_OBJECT       *NextOp;
 452 
 453 
 454     NextOp = AcpiPsGetDepthNext (NULL, Op);
 455     NextOp = NextOp->Common.Next;
 456 
 457     if (!NextOp)
 458     {
 459         /* Handle partial tree during single-step */
 460 
 461         return;
 462     }
 463 
 464     /* Mark the two nodes that contain the encoding for the match keywords */
 465 
 466     NextOp->Common.DisasmOpcode = ACPI_DASM_MATCHOP;
 467 
 468     NextOp = NextOp->Common.Next;
 469     NextOp = NextOp->Common.Next;
 470     NextOp->Common.DisasmOpcode = ACPI_DASM_MATCHOP;
 471 }
 472 
 473 
 474 /*******************************************************************************
 475  *
 476  * FUNCTION:    AcpiDmMatchKeyword
 477  *
 478  * PARAMETERS:  Op              - Match Object to be examined
 479  *
 480  * RETURN:      None
 481  *
 482  * DESCRIPTION: Decode Match opcode operands
 483  *
 484  ******************************************************************************/
 485 
 486 static void
 487 AcpiDmMatchKeyword (
 488     ACPI_PARSE_OBJECT       *Op)
 489 {
 490 
 491 
 492     if (((UINT32) Op->Common.Value.Integer) > ACPI_MAX_MATCH_OPCODE)
 493     {
 494         AcpiOsPrintf ("/* Unknown Match Keyword encoding */");
 495     }
 496     else
 497     {
 498         AcpiOsPrintf ("%s", ACPI_CAST_PTR (char,
 499             AcpiGbl_MatchOps[(ACPI_SIZE) Op->Common.Value.Integer]));
 500     }
 501 }
 502 
 503 
 504 /*******************************************************************************
 505  *
 506  * FUNCTION:    AcpiDmDisassembleOneOp
 507  *
 508  * PARAMETERS:  WalkState           - Current walk info
 509  *              Info                - Parse tree walk info
 510  *              Op                  - Op that is to be printed
 511  *
 512  * RETURN:      None
 513  *
 514  * DESCRIPTION: Disassemble a single AML opcode
 515  *
 516  ******************************************************************************/
 517 
 518 void
 519 AcpiDmDisassembleOneOp (
 520     ACPI_WALK_STATE         *WalkState,
 521     ACPI_OP_WALK_INFO       *Info,
 522     ACPI_PARSE_OBJECT       *Op)
 523 {
 524     const ACPI_OPCODE_INFO  *OpInfo = NULL;
 525     UINT32                  Offset;
 526     UINT32                  Length;
 527     ACPI_PARSE_OBJECT       *Child;
 528     ACPI_STATUS             Status;
 529     UINT8                   *Aml;
 530 
 531 
 532     if (!Op)
 533     {
 534         AcpiOsPrintf ("<NULL OP PTR>");
 535         return;
 536     }
 537 
 538     switch (Op->Common.DisasmOpcode)
 539     {
 540     case ACPI_DASM_MATCHOP:
 541 
 542         AcpiDmMatchKeyword (Op);
 543         return;
 544 
 545     case ACPI_DASM_LNOT_SUFFIX:
 546 
 547         switch (Op->Common.AmlOpcode)
 548         {
 549         case AML_LEQUAL_OP:
 550 
 551             AcpiOsPrintf ("LNotEqual");
 552             break;
 553 
 554         case AML_LGREATER_OP:
 555 
 556             AcpiOsPrintf ("LLessEqual");
 557             break;
 558 
 559         case AML_LLESS_OP:
 560 
 561             AcpiOsPrintf ("LGreaterEqual");
 562             break;
 563 
 564         default:
 565 
 566             break;
 567         }
 568         Op->Common.DisasmOpcode = 0;
 569         Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
 570         return;
 571 
 572     default:
 573         break;
 574     }
 575 
 576 
 577     OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
 578 
 579     /* The op and arguments */
 580 
 581     switch (Op->Common.AmlOpcode)
 582     {
 583     case AML_LNOT_OP:
 584 
 585         Child = Op->Common.Value.Arg;
 586         if ((Child->Common.AmlOpcode == AML_LEQUAL_OP) ||
 587             (Child->Common.AmlOpcode == AML_LGREATER_OP) ||
 588             (Child->Common.AmlOpcode == AML_LLESS_OP))
 589         {
 590             Child->Common.DisasmOpcode = ACPI_DASM_LNOT_SUFFIX;
 591             Op->Common.DisasmOpcode = ACPI_DASM_LNOT_PREFIX;
 592         }
 593         else
 594         {
 595             AcpiOsPrintf ("%s", OpInfo->Name);
 596         }
 597         break;
 598 
 599     case AML_BYTE_OP:
 600 
 601         AcpiOsPrintf ("0x%2.2X", (UINT32) Op->Common.Value.Integer);
 602         break;
 603 
 604     case AML_WORD_OP:
 605 
 606         if (Op->Common.DisasmOpcode == ACPI_DASM_EISAID)
 607         {
 608             AcpiDmEisaId ((UINT32) Op->Common.Value.Integer);
 609         }
 610         else
 611         {
 612             AcpiOsPrintf ("0x%4.4X", (UINT32) Op->Common.Value.Integer);
 613         }
 614         break;
 615 
 616     case AML_DWORD_OP:
 617 
 618         if (Op->Common.DisasmOpcode == ACPI_DASM_EISAID)
 619         {
 620             AcpiDmEisaId ((UINT32) Op->Common.Value.Integer);
 621         }
 622         else
 623         {
 624             AcpiOsPrintf ("0x%8.8X", (UINT32) Op->Common.Value.Integer);
 625         }
 626         break;
 627 
 628     case AML_QWORD_OP:
 629 
 630         AcpiOsPrintf ("0x%8.8X%8.8X",
 631             ACPI_FORMAT_UINT64 (Op->Common.Value.Integer));
 632         break;
 633 
 634     case AML_STRING_OP:
 635 
 636         AcpiUtPrintString (Op->Common.Value.String, ACPI_UINT16_MAX);
 637         break;
 638 
 639     case AML_BUFFER_OP:
 640         /*
 641          * Determine the type of buffer. We can have one of the following:
 642          *
 643          * 1) ResourceTemplate containing Resource Descriptors.
 644          * 2) Unicode String buffer
 645          * 3) ASCII String buffer
 646          * 4) Raw data buffer (if none of the above)
 647          *
 648          * Since there are no special AML opcodes to differentiate these
 649          * types of buffers, we have to closely look at the data in the
 650          * buffer to determine the type.
 651          */
 652         if (!AcpiGbl_NoResourceDisassembly)
 653         {
 654             Status = AcpiDmIsResourceTemplate (WalkState, Op);
 655             if (ACPI_SUCCESS (Status))
 656             {
 657                 Op->Common.DisasmOpcode = ACPI_DASM_RESOURCE;
 658                 AcpiOsPrintf ("ResourceTemplate");
 659                 break;
 660             }
 661             else if (Status == AE_AML_NO_RESOURCE_END_TAG)
 662             {
 663                 AcpiOsPrintf ("/**** Is ResourceTemplate, but EndTag not at buffer end ****/ ");
 664             }
 665         }
 666 
 667         if (AcpiDmIsUnicodeBuffer (Op))
 668         {
 669             Op->Common.DisasmOpcode = ACPI_DASM_UNICODE;
 670             AcpiOsPrintf ("Unicode (");
 671         }
 672         else if (AcpiDmIsStringBuffer (Op))
 673         {
 674             Op->Common.DisasmOpcode = ACPI_DASM_STRING;
 675             AcpiOsPrintf ("Buffer");
 676         }
 677         else if (AcpiDmIsPldBuffer (Op))
 678         {
 679             Op->Common.DisasmOpcode = ACPI_DASM_PLD_METHOD;
 680             AcpiOsPrintf ("Buffer");
 681         }
 682         else
 683         {
 684             Op->Common.DisasmOpcode = ACPI_DASM_BUFFER;
 685             AcpiOsPrintf ("Buffer");
 686         }
 687         break;
 688 
 689     case AML_INT_STATICSTRING_OP:
 690 
 691         if (Op->Common.Value.String)
 692         {
 693             AcpiOsPrintf ("%s", Op->Common.Value.String);
 694         }
 695         else
 696         {
 697             AcpiOsPrintf ("\"<NULL STATIC STRING PTR>\"");
 698         }
 699         break;
 700 
 701     case AML_INT_NAMEPATH_OP:
 702 
 703         AcpiDmNamestring (Op->Common.Value.Name);
 704         break;
 705 
 706     case AML_INT_NAMEDFIELD_OP:
 707 
 708         Length = AcpiDmDumpName (Op->Named.Name);
 709         AcpiOsPrintf (",%*.s  %u", (unsigned) (5 - Length), " ",
 710             (UINT32) Op->Common.Value.Integer);
 711         AcpiDmCommaIfFieldMember (Op);
 712 
 713         Info->BitOffset += (UINT32) Op->Common.Value.Integer;
 714         break;
 715 
 716     case AML_INT_RESERVEDFIELD_OP:
 717 
 718         /* Offset() -- Must account for previous offsets */
 719 
 720         Offset = (UINT32) Op->Common.Value.Integer;
 721         Info->BitOffset += Offset;
 722 
 723         if (Info->BitOffset % 8 == 0)
 724         {
 725             AcpiOsPrintf ("Offset (0x%.2X)", ACPI_DIV_8 (Info->BitOffset));
 726         }
 727         else
 728         {
 729             AcpiOsPrintf ("    ,   %u", Offset);
 730         }
 731 
 732         AcpiDmCommaIfFieldMember (Op);
 733         break;
 734 
 735     case AML_INT_ACCESSFIELD_OP:
 736     case AML_INT_EXTACCESSFIELD_OP:
 737 
 738         AcpiOsPrintf ("AccessAs (%s, ",
 739             AcpiGbl_AccessTypes [(UINT32) (Op->Common.Value.Integer & 0x7)]);
 740 
 741         AcpiDmDecodeAttribute ((UINT8) (Op->Common.Value.Integer >> 8));
 742 
 743         if (Op->Common.AmlOpcode == AML_INT_EXTACCESSFIELD_OP)
 744         {
 745             AcpiOsPrintf (" (0x%2.2X)", (unsigned) ((Op->Common.Value.Integer >> 16) & 0xFF));
 746         }
 747 
 748         AcpiOsPrintf (")");
 749         AcpiDmCommaIfFieldMember (Op);
 750         break;
 751 
 752     case AML_INT_CONNECTION_OP:
 753         /*
 754          * Two types of Connection() - one with a buffer object, the
 755          * other with a namestring that points to a buffer object.
 756          */
 757         AcpiOsPrintf ("Connection (");
 758         Child = Op->Common.Value.Arg;
 759 
 760         if (Child->Common.AmlOpcode == AML_INT_BYTELIST_OP)
 761         {
 762             AcpiOsPrintf ("\n");
 763 
 764             Aml = Child->Named.Data;
 765             Length = (UINT32) Child->Common.Value.Integer;
 766 
 767             Info->Level += 1;
 768             Op->Common.DisasmOpcode = ACPI_DASM_RESOURCE;
 769             AcpiDmResourceTemplate (Info, Op->Common.Parent, Aml, Length);
 770 
 771             Info->Level -= 1;
 772             AcpiDmIndent (Info->Level);
 773         }
 774         else
 775         {
 776             AcpiDmNamestring (Child->Common.Value.Name);
 777         }
 778 
 779         AcpiOsPrintf (")");
 780         AcpiDmCommaIfFieldMember (Op);
 781         AcpiOsPrintf ("\n");
 782 
 783         Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; /* for now, ignore in AcpiDmAscendingOp */
 784         Child->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
 785         break;
 786 
 787     case AML_INT_BYTELIST_OP:
 788 
 789         AcpiDmByteList (Info, Op);
 790         break;
 791 
 792     case AML_INT_METHODCALL_OP:
 793 
 794         Op = AcpiPsGetDepthNext (NULL, Op);
 795         Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
 796 
 797         AcpiDmNamestring (Op->Common.Value.Name);
 798         break;
 799 
 800     default:
 801 
 802         /* Just get the opcode name and print it */
 803 
 804         AcpiOsPrintf ("%s", OpInfo->Name);
 805 
 806 
 807 #ifdef ACPI_DEBUGGER
 808 
 809         if ((Op->Common.AmlOpcode == AML_INT_RETURN_VALUE_OP) &&
 810             (WalkState) &&
 811             (WalkState->Results) &&
 812             (WalkState->ResultCount))
 813         {
 814             AcpiDmDecodeInternalObject (
 815                 WalkState->Results->Results.ObjDesc [
 816                     (WalkState->ResultCount - 1) %
 817                         ACPI_RESULTS_FRAME_OBJ_NUM]);
 818         }
 819 #endif
 820 
 821         break;
 822     }
 823 }
 824 
 825 #endif  /* ACPI_DISASSEMBLER */