dmopcode.c revision 209746
1251607Sdim/******************************************************************************* 2251607Sdim * 3251607Sdim * Module Name: dmopcode - AML disassembler, specific AML opcodes 4251607Sdim * 5251607Sdim ******************************************************************************/ 6251607Sdim 7251607Sdim/****************************************************************************** 8251607Sdim * 9251607Sdim * 1. Copyright Notice 10251607Sdim * 11251607Sdim * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. 12251607Sdim * All rights reserved. 13251607Sdim * 14251607Sdim * 2. License 15251607Sdim * 16251607Sdim * 2.1. This is your license from Intel Corp. under its intellectual property 17251607Sdim * rights. You may have additional license terms from the party that provided 18251607Sdim * you this software, covering your right to use that party's intellectual 19288943Sdim * property rights. 20288943Sdim * 21288943Sdim * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 22288943Sdim * copy of the source code appearing in this file ("Covered Code") an 23288943Sdim * irrevocable, perpetual, worldwide license under Intel's copyrights in the 24251607Sdim * base code distributed originally by Intel ("Original Intel Code") to copy, 25251607Sdim * make derivatives, distribute, use and display any portion of the Covered 26251607Sdim * Code in any form, with the right to sublicense such rights; and 27251607Sdim * 28251607Sdim * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 29251607Sdim * license (with the right to sublicense), under only those claims of Intel 30251607Sdim * patents that are infringed by the Original Intel Code, to make, use, sell, 31251607Sdim * offer to sell, and import the Covered Code and derivative works thereof 32261991Sdim * solely to the minimum extent necessary to exercise the above copyright 33251607Sdim * license, and in no event shall the patent license extend to any additions 34251607Sdim * to or modifications of the Original Intel Code. No other license or right 35251607Sdim * is granted directly or by implication, estoppel or otherwise; 36261991Sdim * 37261991Sdim * The above copyright and patent license is granted only if the following 38261991Sdim * conditions are met: 39261991Sdim * 40261991Sdim * 3. Conditions 41261991Sdim * 42288943Sdim * 3.1. Redistribution of Source with Rights to Further Distribute Source. 43288943Sdim * Redistribution of source code of any substantial portion of the Covered 44288943Sdim * Code or modification with rights to further distribute source must include 45288943Sdim * the above Copyright Notice, the above License, this list of Conditions, 46288943Sdim * and the following Disclaimer and Export Compliance provision. In addition, 47261991Sdim * Licensee must cause all Covered Code to which Licensee contributes to 48261991Sdim * contain a file documenting the changes Licensee made to create that Covered 49261991Sdim * Code and the date of any change. Licensee must include in that file the 50261991Sdim * documentation of any changes made by any predecessor Licensee. Licensee 51261991Sdim * must include a prominent statement that the modification is derived, 52261991Sdim * directly or indirectly, from Original Intel Code. 53261991Sdim * 54288943Sdim * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 55288943Sdim * Redistribution of source code of any substantial portion of the Covered 56288943Sdim * Code or modification without rights to further distribute source must 57288943Sdim * include the following Disclaimer and Export Compliance provision in the 58261991Sdim * documentation and/or other materials provided with distribution. In 59251607Sdim * addition, Licensee may not authorize further sublicense of source of any 60261991Sdim * portion of the Covered Code, and must include terms to the effect that the 61261991Sdim * license from Licensee to its licensee is limited to the intellectual 62261991Sdim * property embodied in the software Licensee provides to its licensee, and 63261991Sdim * not to intellectual property embodied in modifications its licensee may 64261991Sdim * make. 65261991Sdim * 66251607Sdim * 3.3. Redistribution of Executable. Redistribution in executable form of any 67251607Sdim * substantial portion of the Covered Code or modification must reproduce the 68251607Sdim * above Copyright Notice, and the following Disclaimer and Export Compliance 69251607Sdim * provision in the documentation and/or other materials provided with the 70251607Sdim * distribution. 71261991Sdim * 72261991Sdim * 3.4. Intel retains all right, title, and interest in and to the Original 73261991Sdim * Intel Code. 74261991Sdim * 75251607Sdim * 3.5. Neither the name Intel nor any other trademark owned or controlled by 76261991Sdim * Intel shall be used in advertising or otherwise to promote the sale, use or 77251607Sdim * other dealings in products derived from or relating to the Covered Code 78251607Sdim * without prior written authorization from Intel. 79251607Sdim * 80251607Sdim * 4. Disclaimer and Export Compliance 81288943Sdim * 82288943Sdim * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 83288943Sdim * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 84288943Sdim * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 85288943Sdim * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 86288943Sdim * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 87288943Sdim * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 88288943Sdim * PARTICULAR PURPOSE. 89288943Sdim * 90288943Sdim * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 91288943Sdim * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 92288943Sdim * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 93288943Sdim * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 94288943Sdim * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 95288943Sdim * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 96288943Sdim * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 97251607Sdim * LIMITED REMEDY. 98261991Sdim * 99261991Sdim * 4.3. Licensee shall not export, either directly or indirectly, any of this 100261991Sdim * software or system incorporating such software without first obtaining any 101261991Sdim * required license or other approval from the U. S. Department of Commerce or 102261991Sdim * any other agency or department of the United States Government. In the 103261991Sdim * event Licensee exports any such software from the United States or 104261991Sdim * re-exports any such software from a foreign destination, Licensee shall 105261991Sdim * ensure that the distribution and export/re-export of the software is in 106261991Sdim * compliance with all laws, regulations, orders, or other restrictions of the 107261991Sdim * U.S. Export Administration Regulations. Licensee agrees that neither it nor 108261991Sdim * any of its subsidiaries will export/re-export any technical data, process, 109251607Sdim * software, or service, directly or indirectly, to any country for which the 110261991Sdim * United States government or any agency thereof requires an export license, 111251607Sdim * other governmental approval, or letter of assurance, without first obtaining 112288943Sdim * such license, approval or letter. 113251607Sdim * 114251607Sdim *****************************************************************************/ 115251607Sdim 116261991Sdim#include <contrib/dev/acpica/include/acpi.h> 117251607Sdim#include <contrib/dev/acpica/include/accommon.h> 118251607Sdim#include <contrib/dev/acpica/include/acparser.h> 119251607Sdim#include <contrib/dev/acpica/include/amlcode.h> 120251607Sdim#include <contrib/dev/acpica/include/acdisasm.h> 121251607Sdim 122261991Sdim#ifdef ACPI_DISASSEMBLER 123251607Sdim 124251607Sdim#define _COMPONENT ACPI_CA_DEBUGGER 125251607Sdim ACPI_MODULE_NAME ("dmopcode") 126251607Sdim 127261991Sdim/* Local prototypes */ 128261991Sdim 129261991Sdimstatic void 130261991SdimAcpiDmMatchKeyword ( 131261991Sdim ACPI_PARSE_OBJECT *Op); 132261991Sdim 133261991Sdim 134261991Sdim/******************************************************************************* 135261991Sdim * 136288943Sdim * FUNCTION: AcpiDmMethodFlags 137288943Sdim * 138288943Sdim * PARAMETERS: Op - Method Object to be examined 139288943Sdim * 140288943Sdim * RETURN: None 141288943Sdim * 142288943Sdim * DESCRIPTION: Decode control method flags 143251607Sdim * 144251607Sdim ******************************************************************************/ 145251607Sdim 146251607Sdimvoid 147251607SdimAcpiDmMethodFlags ( 148251607Sdim ACPI_PARSE_OBJECT *Op) 149251607Sdim{ 150251607Sdim UINT32 Flags; 151251607Sdim UINT32 Args; 152288943Sdim 153251607Sdim 154251607Sdim /* The next Op contains the flags */ 155251607Sdim 156251607Sdim Op = AcpiPsGetDepthNext (NULL, Op); 157251607Sdim Flags = (UINT8) Op->Common.Value.Integer; 158288943Sdim Args = Flags & 0x07; 159251607Sdim 160251607Sdim /* Mark the Op as completed */ 161251607Sdim 162251607Sdim Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; 163251607Sdim 164288943Sdim /* 1) Method argument count */ 165251607Sdim 166251607Sdim AcpiOsPrintf (", %u, ", Args); 167251607Sdim 168251607Sdim /* 2) Serialize rule */ 169251607Sdim 170288943Sdim if (!(Flags & 0x08)) 171251607Sdim { 172251607Sdim AcpiOsPrintf ("Not"); 173251607Sdim } 174251607Sdim 175251607Sdim AcpiOsPrintf ("Serialized"); 176288943Sdim 177251607Sdim /* 3) SyncLevel */ 178251607Sdim 179251607Sdim if (Flags & 0xF0) 180251607Sdim { 181251607Sdim AcpiOsPrintf (", %u", Flags >> 4); 182288943Sdim } 183251607Sdim} 184251607Sdim 185251607Sdim 186251607Sdim/******************************************************************************* 187288943Sdim * 188288943Sdim * FUNCTION: AcpiDmFieldFlags 189251607Sdim * 190251607Sdim * PARAMETERS: Op - Field Object to be examined 191251607Sdim * 192251607Sdim * RETURN: None 193288943Sdim * 194288943Sdim * DESCRIPTION: Decode Field definition flags 195251607Sdim * 196251607Sdim ******************************************************************************/ 197288943Sdim 198288943Sdimvoid 199288943SdimAcpiDmFieldFlags ( 200288943Sdim ACPI_PARSE_OBJECT *Op) 201288943Sdim{ 202288943Sdim UINT32 Flags; 203288943Sdim 204288943Sdim 205288943Sdim Op = Op->Common.Next; 206288943Sdim Flags = (UINT8) Op->Common.Value.Integer; 207288943Sdim 208288943Sdim /* Mark the Op as completed */ 209251607Sdim 210251607Sdim Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; 211288943Sdim 212288943Sdim AcpiOsPrintf ("%s, ", AcpiGbl_AccessTypes [Flags & 0x07]); 213251607Sdim AcpiOsPrintf ("%s, ", AcpiGbl_LockRule [(Flags & 0x10) >> 4]); 214251607Sdim AcpiOsPrintf ("%s)", AcpiGbl_UpdateRules [(Flags & 0x60) >> 5]); 215251607Sdim} 216251607Sdim 217288943Sdim 218288943Sdim/******************************************************************************* 219251607Sdim * 220251607Sdim * FUNCTION: AcpiDmAddressSpace 221251607Sdim * 222251607Sdim * PARAMETERS: SpaceId - ID to be translated 223288943Sdim * 224288943Sdim * RETURN: None 225251607Sdim * 226251607Sdim * DESCRIPTION: Decode a SpaceId to an AddressSpaceKeyword 227251607Sdim * 228251607Sdim ******************************************************************************/ 229288943Sdim 230288943Sdimvoid 231251607SdimAcpiDmAddressSpace ( 232251607Sdim UINT8 SpaceId) 233251607Sdim{ 234251607Sdim 235288943Sdim if (SpaceId >= ACPI_NUM_PREDEFINED_REGIONS) 236288943Sdim { 237251607Sdim if (SpaceId == 0x7F) 238251607Sdim { 239251607Sdim AcpiOsPrintf ("FFixedHW, "); 240251607Sdim } 241251607Sdim else 242251607Sdim { 243288943Sdim AcpiOsPrintf ("0x%.2X, ", SpaceId); 244288943Sdim } 245288943Sdim } 246251607Sdim else 247251607Sdim { 248251607Sdim AcpiOsPrintf ("%s, ", AcpiGbl_RegionTypes [SpaceId]); 249251607Sdim } 250288943Sdim} 251251607Sdim 252251607Sdim 253251607Sdim/******************************************************************************* 254251607Sdim * 255251607Sdim * FUNCTION: AcpiDmRegionFlags 256251607Sdim * 257251607Sdim * PARAMETERS: Op - Object to be examined 258251607Sdim * 259251607Sdim * RETURN: None 260251607Sdim * 261251607Sdim * DESCRIPTION: Decode OperationRegion flags 262251607Sdim * 263251607Sdim ******************************************************************************/ 264251607Sdim 265251607Sdimvoid 266251607SdimAcpiDmRegionFlags ( 267251607Sdim ACPI_PARSE_OBJECT *Op) 268251607Sdim{ 269251607Sdim 270251607Sdim 271251607Sdim /* The next Op contains the SpaceId */ 272251607Sdim 273251607Sdim Op = AcpiPsGetDepthNext (NULL, Op); 274251607Sdim 275251607Sdim /* Mark the Op as completed */ 276251607Sdim 277251607Sdim Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; 278251607Sdim 279251607Sdim AcpiOsPrintf (", "); 280251607Sdim AcpiDmAddressSpace ((UINT8) Op->Common.Value.Integer); 281288943Sdim} 282288943Sdim 283288943Sdim 284288943Sdim/******************************************************************************* 285288943Sdim * 286288943Sdim * FUNCTION: AcpiDmMatchOp 287288943Sdim * 288288943Sdim * PARAMETERS: Op - Match Object to be examined 289288943Sdim * 290288943Sdim * RETURN: None 291288943Sdim * 292288943Sdim * DESCRIPTION: Decode Match opcode operands 293276479Sdim * 294276479Sdim ******************************************************************************/ 295276479Sdim 296276479Sdimvoid 297288943SdimAcpiDmMatchOp ( 298288943Sdim ACPI_PARSE_OBJECT *Op) 299288943Sdim{ 300288943Sdim ACPI_PARSE_OBJECT *NextOp; 301288943Sdim 302288943Sdim 303276479Sdim NextOp = AcpiPsGetDepthNext (NULL, Op); 304276479Sdim NextOp = NextOp->Common.Next; 305276479Sdim 306276479Sdim if (!NextOp) 307251607Sdim { 308251607Sdim /* Handle partial tree during single-step */ 309251607Sdim 310251607Sdim return; 311251607Sdim } 312251607Sdim 313251607Sdim /* Mark the two nodes that contain the encoding for the match keywords */ 314251607Sdim 315251607Sdim NextOp->Common.DisasmOpcode = ACPI_DASM_MATCHOP; 316251607Sdim 317288943Sdim NextOp = NextOp->Common.Next; 318288943Sdim NextOp = NextOp->Common.Next; 319288943Sdim NextOp->Common.DisasmOpcode = ACPI_DASM_MATCHOP; 320288943Sdim} 321251607Sdim 322251607Sdim 323251607Sdim/******************************************************************************* 324251607Sdim * 325251607Sdim * FUNCTION: AcpiDmMatchKeyword 326251607Sdim * 327251607Sdim * PARAMETERS: Op - Match Object to be examined 328251607Sdim * 329251607Sdim * RETURN: None 330251607Sdim * 331251607Sdim * DESCRIPTION: Decode Match opcode operands 332251607Sdim * 333251607Sdim ******************************************************************************/ 334251607Sdim 335251607Sdimstatic void 336251607SdimAcpiDmMatchKeyword ( 337251607Sdim ACPI_PARSE_OBJECT *Op) 338251607Sdim{ 339251607Sdim 340251607Sdim 341251607Sdim if (((UINT32) Op->Common.Value.Integer) > ACPI_MAX_MATCH_OPCODE) 342251607Sdim { 343251607Sdim AcpiOsPrintf ("/* Unknown Match Keyword encoding */"); 344251607Sdim } 345251607Sdim else 346251607Sdim { 347251607Sdim AcpiOsPrintf ("%s", ACPI_CAST_PTR (char, 348251607Sdim AcpiGbl_MatchOps[(ACPI_SIZE) Op->Common.Value.Integer])); 349251607Sdim } 350251607Sdim} 351251607Sdim 352251607Sdim 353251607Sdim/******************************************************************************* 354251607Sdim * 355251607Sdim * FUNCTION: AcpiDmDisassembleOneOp 356251607Sdim * 357251607Sdim * PARAMETERS: WalkState - Current walk info 358251607Sdim * Info - Parse tree walk info 359251607Sdim * Op - Op that is to be printed 360251607Sdim * 361251607Sdim * RETURN: None 362251607Sdim * 363251607Sdim * DESCRIPTION: Disassemble a single AML opcode 364251607Sdim * 365251607Sdim ******************************************************************************/ 366251607Sdim 367251607Sdimvoid 368251607SdimAcpiDmDisassembleOneOp ( 369251607Sdim ACPI_WALK_STATE *WalkState, 370251607Sdim ACPI_OP_WALK_INFO *Info, 371251607Sdim ACPI_PARSE_OBJECT *Op) 372251607Sdim{ 373251607Sdim const ACPI_OPCODE_INFO *OpInfo = NULL; 374251607Sdim UINT32 Offset; 375251607Sdim UINT32 Length; 376251607Sdim ACPI_PARSE_OBJECT *Child; 377251607Sdim ACPI_STATUS Status; 378251607Sdim 379251607Sdim 380251607Sdim if (!Op) 381251607Sdim { 382251607Sdim AcpiOsPrintf ("<NULL OP PTR>"); 383251607Sdim return; 384251607Sdim } 385251607Sdim 386251607Sdim switch (Op->Common.DisasmOpcode) 387251607Sdim { 388251607Sdim case ACPI_DASM_MATCHOP: 389251607Sdim 390251607Sdim AcpiDmMatchKeyword (Op); 391251607Sdim return; 392251607Sdim 393251607Sdim case ACPI_DASM_LNOT_SUFFIX: 394251607Sdim switch (Op->Common.AmlOpcode) 395251607Sdim { 396251607Sdim case AML_LEQUAL_OP: 397251607Sdim AcpiOsPrintf ("LNotEqual"); 398251607Sdim break; 399251607Sdim 400251607Sdim case AML_LGREATER_OP: 401251607Sdim AcpiOsPrintf ("LLessEqual"); 402251607Sdim break; 403251607Sdim 404261991Sdim case AML_LLESS_OP: 405261991Sdim AcpiOsPrintf ("LGreaterEqual"); 406261991Sdim break; 407261991Sdim 408251607Sdim default: 409251607Sdim break; 410251607Sdim } 411251607Sdim Op->Common.DisasmOpcode = 0; 412251607Sdim Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; 413251607Sdim return; 414251607Sdim 415251607Sdim default: 416251607Sdim break; 417251607Sdim } 418251607Sdim 419251607Sdim 420251607Sdim OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); 421251607Sdim 422251607Sdim /* The op and arguments */ 423251607Sdim 424251607Sdim switch (Op->Common.AmlOpcode) 425251607Sdim { 426251607Sdim case AML_LNOT_OP: 427251607Sdim 428261991Sdim Child = Op->Common.Value.Arg; 429251607Sdim if ((Child->Common.AmlOpcode == AML_LEQUAL_OP) || 430251607Sdim (Child->Common.AmlOpcode == AML_LGREATER_OP) || 431251607Sdim (Child->Common.AmlOpcode == AML_LLESS_OP)) 432251607Sdim { 433251607Sdim Child->Common.DisasmOpcode = ACPI_DASM_LNOT_SUFFIX; 434251607Sdim Op->Common.DisasmOpcode = ACPI_DASM_LNOT_PREFIX; 435251607Sdim } 436251607Sdim else 437251607Sdim { 438251607Sdim AcpiOsPrintf ("%s", OpInfo->Name); 439251607Sdim } 440251607Sdim break; 441251607Sdim 442251607Sdim case AML_BYTE_OP: 443251607Sdim 444261991Sdim AcpiOsPrintf ("0x%2.2X", (UINT32) Op->Common.Value.Integer); 445261991Sdim break; 446261991Sdim 447288943Sdim 448288943Sdim case AML_WORD_OP: 449261991Sdim 450251607Sdim if (Op->Common.DisasmOpcode == ACPI_DASM_EISAID) 451251607Sdim { 452261991Sdim AcpiDmEisaId ((UINT32) Op->Common.Value.Integer); 453251607Sdim } 454261991Sdim else 455251607Sdim { 456261991Sdim AcpiOsPrintf ("0x%4.4X", (UINT32) Op->Common.Value.Integer); 457251607Sdim } 458261991Sdim break; 459251607Sdim 460251607Sdim 461288943Sdim case AML_DWORD_OP: 462288943Sdim 463288943Sdim if (Op->Common.DisasmOpcode == ACPI_DASM_EISAID) 464288943Sdim { 465288943Sdim AcpiDmEisaId ((UINT32) Op->Common.Value.Integer); 466288943Sdim } 467288943Sdim else 468288943Sdim { 469288943Sdim AcpiOsPrintf ("0x%8.8X", (UINT32) Op->Common.Value.Integer); 470288943Sdim } 471288943Sdim break; 472288943Sdim 473288943Sdim 474288943Sdim case AML_QWORD_OP: 475251607Sdim 476251607Sdim AcpiOsPrintf ("0x%8.8X%8.8X", 477261991Sdim ACPI_FORMAT_UINT64 (Op->Common.Value.Integer)); 478251607Sdim break; 479261991Sdim 480251607Sdim 481251607Sdim case AML_STRING_OP: 482251607Sdim 483251607Sdim AcpiUtPrintString (Op->Common.Value.String, ACPI_UINT8_MAX); 484251607Sdim break; 485251607Sdim 486251607Sdim 487251607Sdim case AML_BUFFER_OP: 488251607Sdim 489251607Sdim /* 490251607Sdim * Determine the type of buffer. We can have one of the following: 491251607Sdim * 492251607Sdim * 1) ResourceTemplate containing Resource Descriptors. 493251607Sdim * 2) Unicode String buffer 494261991Sdim * 3) ASCII String buffer 495261991Sdim * 4) Raw data buffer (if none of the above) 496261991Sdim * 497261991Sdim * Since there are no special AML opcodes to differentiate these 498261991Sdim * types of buffers, we have to closely look at the data in the 499261991Sdim * buffer to determine the type. 500261991Sdim */ 501288943Sdim Status = AcpiDmIsResourceTemplate (Op); 502251607Sdim if (ACPI_SUCCESS (Status)) 503251607Sdim { 504261991Sdim Op->Common.DisasmOpcode = ACPI_DASM_RESOURCE; 505251607Sdim AcpiOsPrintf ("ResourceTemplate"); 506251607Sdim break; 507251607Sdim } 508251607Sdim else if (Status == AE_AML_NO_RESOURCE_END_TAG) 509261991Sdim { 510251607Sdim AcpiOsPrintf ("/**** Is ResourceTemplate, but EndTag not at buffer end ****/ "); 511251607Sdim } 512251607Sdim 513261991Sdim if (AcpiDmIsUnicodeBuffer (Op)) 514288943Sdim { 515251607Sdim Op->Common.DisasmOpcode = ACPI_DASM_UNICODE; 516251607Sdim AcpiOsPrintf ("Unicode ("); 517251607Sdim } 518251607Sdim else if (AcpiDmIsStringBuffer (Op)) 519251607Sdim { 520251607Sdim Op->Common.DisasmOpcode = ACPI_DASM_STRING; 521251607Sdim AcpiOsPrintf ("Buffer"); 522251607Sdim } 523251607Sdim else 524251607Sdim { 525261991Sdim Op->Common.DisasmOpcode = ACPI_DASM_BUFFER; 526261991Sdim AcpiOsPrintf ("Buffer"); 527261991Sdim } 528261991Sdim break; 529261991Sdim 530261991Sdim 531261991Sdim case AML_INT_STATICSTRING_OP: 532261991Sdim 533261991Sdim if (Op->Common.Value.String) 534261991Sdim { 535261991Sdim AcpiOsPrintf ("%s", Op->Common.Value.String); 536261991Sdim } 537261991Sdim else 538261991Sdim { 539261991Sdim AcpiOsPrintf ("\"<NULL STATIC STRING PTR>\""); 540261991Sdim } 541261991Sdim break; 542261991Sdim 543261991Sdim 544261991Sdim case AML_INT_NAMEPATH_OP: 545261991Sdim 546261991Sdim AcpiDmNamestring (Op->Common.Value.Name); 547288943Sdim break; 548251607Sdim 549251607Sdim 550251607Sdim case AML_INT_NAMEDFIELD_OP: 551251607Sdim 552251607Sdim Length = AcpiDmDumpName (Op->Named.Name); 553251607Sdim AcpiOsPrintf (",%*.s %u", (unsigned) (5 - Length), " ", 554251607Sdim (UINT32) Op->Common.Value.Integer); 555251607Sdim AcpiDmCommaIfFieldMember (Op); 556251607Sdim 557251607Sdim Info->BitOffset += (UINT32) Op->Common.Value.Integer; 558251607Sdim break; 559276479Sdim 560251607Sdim 561251607Sdim case AML_INT_RESERVEDFIELD_OP: 562251607Sdim 563251607Sdim /* Offset() -- Must account for previous offsets */ 564251607Sdim 565276479Sdim Offset = (UINT32) Op->Common.Value.Integer; 566276479Sdim Info->BitOffset += Offset; 567251607Sdim 568251607Sdim if (Info->BitOffset % 8 == 0) 569 { 570 AcpiOsPrintf (" Offset (0x%.2X)", ACPI_DIV_8 (Info->BitOffset)); 571 } 572 else 573 { 574 AcpiOsPrintf (" , %u", Offset); 575 } 576 577 AcpiDmCommaIfFieldMember (Op); 578 break; 579 580 581 case AML_INT_ACCESSFIELD_OP: 582 583 AcpiOsPrintf (" AccessAs (%s, ", 584 AcpiGbl_AccessTypes [(UINT32) (Op->Common.Value.Integer >> 8) & 0x7]); 585 586 AcpiDmDecodeAttribute ((UINT8) Op->Common.Value.Integer); 587 AcpiOsPrintf (")"); 588 AcpiDmCommaIfFieldMember (Op); 589 break; 590 591 592 case AML_INT_BYTELIST_OP: 593 594 AcpiDmByteList (Info, Op); 595 break; 596 597 598 case AML_INT_METHODCALL_OP: 599 600 Op = AcpiPsGetDepthNext (NULL, Op); 601 Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; 602 603 AcpiDmNamestring (Op->Common.Value.Name); 604 break; 605 606 607 default: 608 609 /* Just get the opcode name and print it */ 610 611 AcpiOsPrintf ("%s", OpInfo->Name); 612 613 614#ifdef ACPI_DEBUGGER 615 616 if ((Op->Common.AmlOpcode == AML_INT_RETURN_VALUE_OP) && 617 (WalkState) && 618 (WalkState->Results) && 619 (WalkState->ResultCount)) 620 { 621 AcpiDmDecodeInternalObject ( 622 WalkState->Results->Results.ObjDesc [ 623 (WalkState->ResultCount - 1) % 624 ACPI_RESULTS_FRAME_OBJ_NUM]); 625 } 626#endif 627 628 break; 629 } 630} 631 632#endif /* ACPI_DISASSEMBLER */ 633