13446Smrj /******************************************************************************* 23446Smrj * 33446Smrj * Module Name: dmopcode - AML disassembler, specific AML opcodes 4*7851SDana.Myers@Sun.COM * $Revision: 1.106 $ 53446Smrj * 63446Smrj ******************************************************************************/ 73446Smrj 83446Smrj /****************************************************************************** 93446Smrj * 103446Smrj * 1. Copyright Notice 113446Smrj * 12*7851SDana.Myers@Sun.COM * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp. 133446Smrj * All rights reserved. 143446Smrj * 153446Smrj * 2. License 163446Smrj * 173446Smrj * 2.1. This is your license from Intel Corp. under its intellectual property 183446Smrj * rights. You may have additional license terms from the party that provided 193446Smrj * you this software, covering your right to use that party's intellectual 203446Smrj * property rights. 213446Smrj * 223446Smrj * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 233446Smrj * copy of the source code appearing in this file ("Covered Code") an 243446Smrj * irrevocable, perpetual, worldwide license under Intel's copyrights in the 253446Smrj * base code distributed originally by Intel ("Original Intel Code") to copy, 263446Smrj * make derivatives, distribute, use and display any portion of the Covered 273446Smrj * Code in any form, with the right to sublicense such rights; and 283446Smrj * 293446Smrj * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 303446Smrj * license (with the right to sublicense), under only those claims of Intel 313446Smrj * patents that are infringed by the Original Intel Code, to make, use, sell, 323446Smrj * offer to sell, and import the Covered Code and derivative works thereof 333446Smrj * solely to the minimum extent necessary to exercise the above copyright 343446Smrj * license, and in no event shall the patent license extend to any additions 353446Smrj * to or modifications of the Original Intel Code. No other license or right 363446Smrj * is granted directly or by implication, estoppel or otherwise; 373446Smrj * 383446Smrj * The above copyright and patent license is granted only if the following 393446Smrj * conditions are met: 403446Smrj * 413446Smrj * 3. Conditions 423446Smrj * 433446Smrj * 3.1. Redistribution of Source with Rights to Further Distribute Source. 443446Smrj * Redistribution of source code of any substantial portion of the Covered 453446Smrj * Code or modification with rights to further distribute source must include 463446Smrj * the above Copyright Notice, the above License, this list of Conditions, 473446Smrj * and the following Disclaimer and Export Compliance provision. In addition, 483446Smrj * Licensee must cause all Covered Code to which Licensee contributes to 493446Smrj * contain a file documenting the changes Licensee made to create that Covered 503446Smrj * Code and the date of any change. Licensee must include in that file the 513446Smrj * documentation of any changes made by any predecessor Licensee. Licensee 523446Smrj * must include a prominent statement that the modification is derived, 533446Smrj * directly or indirectly, from Original Intel Code. 543446Smrj * 553446Smrj * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 563446Smrj * Redistribution of source code of any substantial portion of the Covered 573446Smrj * Code or modification without rights to further distribute source must 583446Smrj * include the following Disclaimer and Export Compliance provision in the 593446Smrj * documentation and/or other materials provided with distribution. In 603446Smrj * addition, Licensee may not authorize further sublicense of source of any 613446Smrj * portion of the Covered Code, and must include terms to the effect that the 623446Smrj * license from Licensee to its licensee is limited to the intellectual 633446Smrj * property embodied in the software Licensee provides to its licensee, and 643446Smrj * not to intellectual property embodied in modifications its licensee may 653446Smrj * make. 663446Smrj * 673446Smrj * 3.3. Redistribution of Executable. Redistribution in executable form of any 683446Smrj * substantial portion of the Covered Code or modification must reproduce the 693446Smrj * above Copyright Notice, and the following Disclaimer and Export Compliance 703446Smrj * provision in the documentation and/or other materials provided with the 713446Smrj * distribution. 723446Smrj * 733446Smrj * 3.4. Intel retains all right, title, and interest in and to the Original 743446Smrj * Intel Code. 753446Smrj * 763446Smrj * 3.5. Neither the name Intel nor any other trademark owned or controlled by 773446Smrj * Intel shall be used in advertising or otherwise to promote the sale, use or 783446Smrj * other dealings in products derived from or relating to the Covered Code 793446Smrj * without prior written authorization from Intel. 803446Smrj * 813446Smrj * 4. Disclaimer and Export Compliance 823446Smrj * 833446Smrj * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 843446Smrj * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 853446Smrj * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 863446Smrj * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 873446Smrj * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 883446Smrj * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 893446Smrj * PARTICULAR PURPOSE. 903446Smrj * 913446Smrj * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 923446Smrj * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 933446Smrj * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 943446Smrj * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 953446Smrj * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 963446Smrj * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 973446Smrj * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 983446Smrj * LIMITED REMEDY. 993446Smrj * 1003446Smrj * 4.3. Licensee shall not export, either directly or indirectly, any of this 1013446Smrj * software or system incorporating such software without first obtaining any 1023446Smrj * required license or other approval from the U. S. Department of Commerce or 1033446Smrj * any other agency or department of the United States Government. In the 1043446Smrj * event Licensee exports any such software from the United States or 1053446Smrj * re-exports any such software from a foreign destination, Licensee shall 1063446Smrj * ensure that the distribution and export/re-export of the software is in 1073446Smrj * compliance with all laws, regulations, orders, or other restrictions of the 1083446Smrj * U.S. Export Administration Regulations. Licensee agrees that neither it nor 1093446Smrj * any of its subsidiaries will export/re-export any technical data, process, 1103446Smrj * software, or service, directly or indirectly, to any country for which the 1113446Smrj * United States government or any agency thereof requires an export license, 1123446Smrj * other governmental approval, or letter of assurance, without first obtaining 1133446Smrj * such license, approval or letter. 1143446Smrj * 1153446Smrj *****************************************************************************/ 1163446Smrj 1173446Smrj #include "acpi.h" 1183446Smrj #include "acparser.h" 1193446Smrj #include "amlcode.h" 1203446Smrj #include "acdisasm.h" 1213446Smrj 1223446Smrj #ifdef ACPI_DISASSEMBLER 1233446Smrj 1243446Smrj #define _COMPONENT ACPI_CA_DEBUGGER 1253446Smrj ACPI_MODULE_NAME ("dmopcode") 1263446Smrj 1273446Smrj /* Local prototypes */ 1283446Smrj 1293446Smrj static void 1303446Smrj AcpiDmMatchKeyword ( 1313446Smrj ACPI_PARSE_OBJECT *Op); 1323446Smrj 1333446Smrj 1343446Smrj /******************************************************************************* 1353446Smrj * 1363446Smrj * FUNCTION: AcpiDmMethodFlags 1373446Smrj * 1383446Smrj * PARAMETERS: Op - Method Object to be examined 1393446Smrj * 1403446Smrj * RETURN: None 1413446Smrj * 1423446Smrj * DESCRIPTION: Decode control method flags 1433446Smrj * 1443446Smrj ******************************************************************************/ 1453446Smrj 1463446Smrj void 1473446Smrj AcpiDmMethodFlags ( 1483446Smrj ACPI_PARSE_OBJECT *Op) 1493446Smrj { 1503446Smrj UINT32 Flags; 1513446Smrj UINT32 Args; 1523446Smrj 1533446Smrj 1543446Smrj /* The next Op contains the flags */ 1553446Smrj 1563446Smrj Op = AcpiPsGetDepthNext (NULL, Op); 1573446Smrj Flags = (UINT8) Op->Common.Value.Integer; 1583446Smrj Args = Flags & 0x07; 1593446Smrj 1603446Smrj /* Mark the Op as completed */ 1613446Smrj 1623446Smrj Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; 1633446Smrj 1643446Smrj /* 1) Method argument count */ 1653446Smrj 1663446Smrj AcpiOsPrintf (", %d, ", Args); 1673446Smrj 1683446Smrj /* 2) Serialize rule */ 1693446Smrj 1703446Smrj if (!(Flags & 0x08)) 1713446Smrj { 1723446Smrj AcpiOsPrintf ("Not"); 1733446Smrj } 1743446Smrj 1753446Smrj AcpiOsPrintf ("Serialized"); 1763446Smrj 1773446Smrj /* 3) SyncLevel */ 1783446Smrj 1793446Smrj if (Flags & 0xF0) 1803446Smrj { 1813446Smrj AcpiOsPrintf (", %d", Flags >> 4); 1823446Smrj } 1833446Smrj } 1843446Smrj 1853446Smrj 1863446Smrj /******************************************************************************* 1873446Smrj * 1883446Smrj * FUNCTION: AcpiDmFieldFlags 1893446Smrj * 1903446Smrj * PARAMETERS: Op - Field Object to be examined 1913446Smrj * 1923446Smrj * RETURN: None 1933446Smrj * 1943446Smrj * DESCRIPTION: Decode Field definition flags 1953446Smrj * 1963446Smrj ******************************************************************************/ 1973446Smrj 1983446Smrj void 1993446Smrj AcpiDmFieldFlags ( 2003446Smrj ACPI_PARSE_OBJECT *Op) 2013446Smrj { 2023446Smrj UINT32 Flags; 2033446Smrj 2043446Smrj 2053446Smrj Op = Op->Common.Next; 2063446Smrj Flags = (UINT8) Op->Common.Value.Integer; 2073446Smrj 2083446Smrj /* Mark the Op as completed */ 2093446Smrj 2103446Smrj Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; 2113446Smrj 2123446Smrj AcpiOsPrintf ("%s, ", AcpiGbl_AccessTypes [Flags & 0x07]); 2133446Smrj AcpiOsPrintf ("%s, ", AcpiGbl_LockRule [(Flags & 0x10) >> 4]); 2143446Smrj AcpiOsPrintf ("%s)", AcpiGbl_UpdateRules [(Flags & 0x60) >> 5]); 2153446Smrj } 2163446Smrj 2173446Smrj 2183446Smrj /******************************************************************************* 2193446Smrj * 2203446Smrj * FUNCTION: AcpiDmAddressSpace 2213446Smrj * 2223446Smrj * PARAMETERS: SpaceId - ID to be translated 2233446Smrj * 2243446Smrj * RETURN: None 2253446Smrj * 2263446Smrj * DESCRIPTION: Decode a SpaceId to an AddressSpaceKeyword 2273446Smrj * 2283446Smrj ******************************************************************************/ 2293446Smrj 2303446Smrj void 2313446Smrj AcpiDmAddressSpace ( 2323446Smrj UINT8 SpaceId) 2333446Smrj { 2343446Smrj 2353446Smrj if (SpaceId >= ACPI_NUM_PREDEFINED_REGIONS) 2363446Smrj { 2373446Smrj if (SpaceId == 0x7F) 2383446Smrj { 2393446Smrj AcpiOsPrintf ("FFixedHW, "); 2403446Smrj } 2413446Smrj else 2423446Smrj { 2433446Smrj AcpiOsPrintf ("0x%.2X, ", SpaceId); 2443446Smrj } 2453446Smrj } 2463446Smrj else 2473446Smrj { 2483446Smrj AcpiOsPrintf ("%s, ", AcpiGbl_RegionTypes [SpaceId]); 2493446Smrj } 2503446Smrj } 2513446Smrj 2523446Smrj 2533446Smrj /******************************************************************************* 2543446Smrj * 2553446Smrj * FUNCTION: AcpiDmRegionFlags 2563446Smrj * 2573446Smrj * PARAMETERS: Op - Object to be examined 2583446Smrj * 2593446Smrj * RETURN: None 2603446Smrj * 2613446Smrj * DESCRIPTION: Decode OperationRegion flags 2623446Smrj * 2633446Smrj ******************************************************************************/ 2643446Smrj 2653446Smrj void 2663446Smrj AcpiDmRegionFlags ( 2673446Smrj ACPI_PARSE_OBJECT *Op) 2683446Smrj { 2693446Smrj 2703446Smrj 2713446Smrj /* The next Op contains the SpaceId */ 2723446Smrj 2733446Smrj Op = AcpiPsGetDepthNext (NULL, Op); 2743446Smrj 2753446Smrj /* Mark the Op as completed */ 2763446Smrj 2773446Smrj Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; 2783446Smrj 2793446Smrj AcpiOsPrintf (", "); 2803446Smrj AcpiDmAddressSpace ((UINT8) Op->Common.Value.Integer); 2813446Smrj } 2823446Smrj 2833446Smrj 2843446Smrj /******************************************************************************* 2853446Smrj * 2863446Smrj * FUNCTION: AcpiDmMatchOp 2873446Smrj * 2883446Smrj * PARAMETERS: Op - Match Object to be examined 2893446Smrj * 2903446Smrj * RETURN: None 2913446Smrj * 2923446Smrj * DESCRIPTION: Decode Match opcode operands 2933446Smrj * 2943446Smrj ******************************************************************************/ 2953446Smrj 2963446Smrj void 2973446Smrj AcpiDmMatchOp ( 2983446Smrj ACPI_PARSE_OBJECT *Op) 2993446Smrj { 3003446Smrj ACPI_PARSE_OBJECT *NextOp; 3013446Smrj 3023446Smrj 3033446Smrj NextOp = AcpiPsGetDepthNext (NULL, Op); 3043446Smrj NextOp = NextOp->Common.Next; 3053446Smrj 3063446Smrj if (!NextOp) 3073446Smrj { 3083446Smrj /* Handle partial tree during single-step */ 3093446Smrj 3103446Smrj return; 3113446Smrj } 3123446Smrj 3133446Smrj /* Mark the two nodes that contain the encoding for the match keywords */ 3143446Smrj 3153446Smrj NextOp->Common.DisasmOpcode = ACPI_DASM_MATCHOP; 3163446Smrj 3173446Smrj NextOp = NextOp->Common.Next; 3183446Smrj NextOp = NextOp->Common.Next; 3193446Smrj NextOp->Common.DisasmOpcode = ACPI_DASM_MATCHOP; 3203446Smrj } 3213446Smrj 3223446Smrj 3233446Smrj /******************************************************************************* 3243446Smrj * 3253446Smrj * FUNCTION: AcpiDmMatchKeyword 3263446Smrj * 3273446Smrj * PARAMETERS: Op - Match Object to be examined 3283446Smrj * 3293446Smrj * RETURN: None 3303446Smrj * 3313446Smrj * DESCRIPTION: Decode Match opcode operands 3323446Smrj * 3333446Smrj ******************************************************************************/ 3343446Smrj 3353446Smrj static void 3363446Smrj AcpiDmMatchKeyword ( 3373446Smrj ACPI_PARSE_OBJECT *Op) 3383446Smrj { 3393446Smrj 3403446Smrj 3413446Smrj if (((UINT32) Op->Common.Value.Integer) > ACPI_MAX_MATCH_OPCODE) 3423446Smrj { 3433446Smrj AcpiOsPrintf ("/* Unknown Match Keyword encoding */"); 3443446Smrj } 3453446Smrj else 3463446Smrj { 3473446Smrj AcpiOsPrintf ("%s", ACPI_CAST_PTR (char, 3483446Smrj AcpiGbl_MatchOps[(ACPI_SIZE) Op->Common.Value.Integer])); 3493446Smrj } 3503446Smrj } 3513446Smrj 3523446Smrj 3533446Smrj /******************************************************************************* 3543446Smrj * 3553446Smrj * FUNCTION: AcpiDmDisassembleOneOp 3563446Smrj * 3573446Smrj * PARAMETERS: WalkState - Current walk info 3583446Smrj * Info - Parse tree walk info 3593446Smrj * Op - Op that is to be printed 3603446Smrj * 3613446Smrj * RETURN: None 3623446Smrj * 3633446Smrj * DESCRIPTION: Disassemble a single AML opcode 3643446Smrj * 3653446Smrj ******************************************************************************/ 3663446Smrj 3673446Smrj void 3683446Smrj AcpiDmDisassembleOneOp ( 3693446Smrj ACPI_WALK_STATE *WalkState, 3703446Smrj ACPI_OP_WALK_INFO *Info, 3713446Smrj ACPI_PARSE_OBJECT *Op) 3723446Smrj { 3733446Smrj const ACPI_OPCODE_INFO *OpInfo = NULL; 3743446Smrj UINT32 Offset; 3753446Smrj UINT32 Length; 3763446Smrj ACPI_PARSE_OBJECT *Child; 377*7851SDana.Myers@Sun.COM ACPI_STATUS Status; 3783446Smrj 3793446Smrj 3803446Smrj if (!Op) 3813446Smrj { 3823446Smrj AcpiOsPrintf ("<NULL OP PTR>"); 3833446Smrj return; 3843446Smrj } 3853446Smrj 3863446Smrj switch (Op->Common.DisasmOpcode) 3873446Smrj { 3883446Smrj case ACPI_DASM_MATCHOP: 3893446Smrj 3903446Smrj AcpiDmMatchKeyword (Op); 3913446Smrj return; 3923446Smrj 3933446Smrj case ACPI_DASM_LNOT_SUFFIX: 3943446Smrj switch (Op->Common.AmlOpcode) 3953446Smrj { 3963446Smrj case AML_LEQUAL_OP: 3973446Smrj AcpiOsPrintf ("LNotEqual"); 3983446Smrj break; 3993446Smrj 4003446Smrj case AML_LGREATER_OP: 4013446Smrj AcpiOsPrintf ("LLessEqual"); 4023446Smrj break; 4033446Smrj 4043446Smrj case AML_LLESS_OP: 4053446Smrj AcpiOsPrintf ("LGreaterEqual"); 4063446Smrj break; 407*7851SDana.Myers@Sun.COM 408*7851SDana.Myers@Sun.COM default: 409*7851SDana.Myers@Sun.COM break; 4103446Smrj } 4113446Smrj Op->Common.DisasmOpcode = 0; 4123446Smrj Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; 4133446Smrj return; 4143446Smrj 4153446Smrj default: 4163446Smrj break; 4173446Smrj } 4183446Smrj 4193446Smrj 4203446Smrj OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); 4213446Smrj 4223446Smrj /* The op and arguments */ 4233446Smrj 4243446Smrj switch (Op->Common.AmlOpcode) 4253446Smrj { 4263446Smrj case AML_LNOT_OP: 4273446Smrj 4283446Smrj Child = Op->Common.Value.Arg; 4293446Smrj if ((Child->Common.AmlOpcode == AML_LEQUAL_OP) || 4303446Smrj (Child->Common.AmlOpcode == AML_LGREATER_OP) || 4313446Smrj (Child->Common.AmlOpcode == AML_LLESS_OP)) 4323446Smrj { 4333446Smrj Child->Common.DisasmOpcode = ACPI_DASM_LNOT_SUFFIX; 4343446Smrj Op->Common.DisasmOpcode = ACPI_DASM_LNOT_PREFIX; 4353446Smrj } 4363446Smrj else 4373446Smrj { 4383446Smrj AcpiOsPrintf ("%s", OpInfo->Name); 4393446Smrj } 4403446Smrj break; 4413446Smrj 4423446Smrj case AML_BYTE_OP: 4433446Smrj 4443446Smrj AcpiOsPrintf ("0x%2.2X", (UINT32) Op->Common.Value.Integer); 4453446Smrj break; 4463446Smrj 4473446Smrj 4483446Smrj case AML_WORD_OP: 4493446Smrj 4503446Smrj if (Op->Common.DisasmOpcode == ACPI_DASM_EISAID) 4513446Smrj { 4523446Smrj AcpiDmEisaId ((UINT32) Op->Common.Value.Integer); 4533446Smrj } 4543446Smrj else 4553446Smrj { 4563446Smrj AcpiOsPrintf ("0x%4.4X", (UINT32) Op->Common.Value.Integer); 4573446Smrj } 4583446Smrj break; 4593446Smrj 4603446Smrj 4613446Smrj case AML_DWORD_OP: 4623446Smrj 4633446Smrj if (Op->Common.DisasmOpcode == ACPI_DASM_EISAID) 4643446Smrj { 4653446Smrj AcpiDmEisaId ((UINT32) Op->Common.Value.Integer); 4663446Smrj } 4673446Smrj else 4683446Smrj { 4693446Smrj AcpiOsPrintf ("0x%8.8X", (UINT32) Op->Common.Value.Integer); 4703446Smrj } 4713446Smrj break; 4723446Smrj 4733446Smrj 4743446Smrj case AML_QWORD_OP: 4753446Smrj 4763446Smrj AcpiOsPrintf ("0x%8.8X%8.8X", Op->Common.Value.Integer64.Hi, 4773446Smrj Op->Common.Value.Integer64.Lo); 4783446Smrj break; 4793446Smrj 4803446Smrj 4813446Smrj case AML_STRING_OP: 4823446Smrj 4833446Smrj AcpiUtPrintString (Op->Common.Value.String, ACPI_UINT8_MAX); 4843446Smrj break; 4853446Smrj 4863446Smrj 4873446Smrj case AML_BUFFER_OP: 4883446Smrj 4893446Smrj /* 4903446Smrj * Determine the type of buffer. We can have one of the following: 4913446Smrj * 4923446Smrj * 1) ResourceTemplate containing Resource Descriptors. 4933446Smrj * 2) Unicode String buffer 4943446Smrj * 3) ASCII String buffer 4953446Smrj * 4) Raw data buffer (if none of the above) 4963446Smrj * 4973446Smrj * Since there are no special AML opcodes to differentiate these 4983446Smrj * types of buffers, we have to closely look at the data in the 4993446Smrj * buffer to determine the type. 5003446Smrj */ 501*7851SDana.Myers@Sun.COM Status = AcpiDmIsResourceTemplate (Op); 502*7851SDana.Myers@Sun.COM if (ACPI_SUCCESS (Status)) 5033446Smrj { 5043446Smrj Op->Common.DisasmOpcode = ACPI_DASM_RESOURCE; 5053446Smrj AcpiOsPrintf ("ResourceTemplate"); 506*7851SDana.Myers@Sun.COM break; 5073446Smrj } 508*7851SDana.Myers@Sun.COM else if (Status == AE_AML_NO_RESOURCE_END_TAG) 509*7851SDana.Myers@Sun.COM { 510*7851SDana.Myers@Sun.COM AcpiOsPrintf ("/**** Is ResourceTemplate, but EndTag not at buffer end ****/ "); 511*7851SDana.Myers@Sun.COM } 512*7851SDana.Myers@Sun.COM 513*7851SDana.Myers@Sun.COM if (AcpiDmIsUnicodeBuffer (Op)) 5143446Smrj { 5153446Smrj Op->Common.DisasmOpcode = ACPI_DASM_UNICODE; 5163446Smrj AcpiOsPrintf ("Unicode ("); 5173446Smrj } 5183446Smrj else if (AcpiDmIsStringBuffer (Op)) 5193446Smrj { 5203446Smrj Op->Common.DisasmOpcode = ACPI_DASM_STRING; 5213446Smrj AcpiOsPrintf ("Buffer"); 5223446Smrj } 5233446Smrj else 5243446Smrj { 5253446Smrj Op->Common.DisasmOpcode = ACPI_DASM_BUFFER; 5263446Smrj AcpiOsPrintf ("Buffer"); 5273446Smrj } 5283446Smrj break; 5293446Smrj 5303446Smrj 5313446Smrj case AML_INT_STATICSTRING_OP: 5323446Smrj 5333446Smrj if (Op->Common.Value.String) 5343446Smrj { 5353446Smrj AcpiOsPrintf ("%s", Op->Common.Value.String); 5363446Smrj } 5373446Smrj else 5383446Smrj { 5393446Smrj AcpiOsPrintf ("\"<NULL STATIC STRING PTR>\""); 5403446Smrj } 5413446Smrj break; 5423446Smrj 5433446Smrj 5443446Smrj case AML_INT_NAMEPATH_OP: 5453446Smrj 5463446Smrj AcpiDmNamestring (Op->Common.Value.Name); 5473446Smrj break; 5483446Smrj 5493446Smrj 5503446Smrj case AML_INT_NAMEDFIELD_OP: 5513446Smrj 552*7851SDana.Myers@Sun.COM Length = AcpiDmDumpName (Op->Named.Name); 5533446Smrj AcpiOsPrintf (",%*.s %d", (int) (5 - Length), " ", 5543446Smrj (UINT32) Op->Common.Value.Integer); 5553446Smrj AcpiDmCommaIfFieldMember (Op); 5563446Smrj 5573446Smrj Info->BitOffset += (UINT32) Op->Common.Value.Integer; 5583446Smrj break; 5593446Smrj 5603446Smrj 5613446Smrj case AML_INT_RESERVEDFIELD_OP: 5623446Smrj 5633446Smrj /* Offset() -- Must account for previous offsets */ 5643446Smrj 5653446Smrj Offset = (UINT32) Op->Common.Value.Integer; 5663446Smrj Info->BitOffset += Offset; 5673446Smrj 5683446Smrj if (Info->BitOffset % 8 == 0) 5693446Smrj { 5703446Smrj AcpiOsPrintf (" Offset (0x%.2X)", ACPI_DIV_8 (Info->BitOffset)); 5713446Smrj } 5723446Smrj else 5733446Smrj { 5743446Smrj AcpiOsPrintf (" , %d", Offset); 5753446Smrj } 5763446Smrj 5773446Smrj AcpiDmCommaIfFieldMember (Op); 5783446Smrj break; 5793446Smrj 5803446Smrj 5813446Smrj case AML_INT_ACCESSFIELD_OP: 5823446Smrj 5833446Smrj AcpiOsPrintf (" AccessAs (%s, ", 5843446Smrj AcpiGbl_AccessTypes [(UINT32) (Op->Common.Value.Integer >> 8) & 0x7]); 5853446Smrj 5863446Smrj AcpiDmDecodeAttribute ((UINT8) Op->Common.Value.Integer); 5873446Smrj AcpiOsPrintf (")"); 5883446Smrj AcpiDmCommaIfFieldMember (Op); 5893446Smrj break; 5903446Smrj 5913446Smrj 5923446Smrj case AML_INT_BYTELIST_OP: 5933446Smrj 5943446Smrj AcpiDmByteList (Info, Op); 5953446Smrj break; 5963446Smrj 5973446Smrj 5983446Smrj case AML_INT_METHODCALL_OP: 5993446Smrj 6003446Smrj Op = AcpiPsGetDepthNext (NULL, Op); 6013446Smrj Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; 6023446Smrj 6033446Smrj AcpiDmNamestring (Op->Common.Value.Name); 6043446Smrj break; 6053446Smrj 6063446Smrj 6073446Smrj default: 6083446Smrj 6093446Smrj /* Just get the opcode name and print it */ 6103446Smrj 6113446Smrj AcpiOsPrintf ("%s", OpInfo->Name); 6123446Smrj 6133446Smrj 6143446Smrj #ifdef ACPI_DEBUGGER 6153446Smrj 6163446Smrj if ((Op->Common.AmlOpcode == AML_INT_RETURN_VALUE_OP) && 6173446Smrj (WalkState) && 6183446Smrj (WalkState->Results) && 619*7851SDana.Myers@Sun.COM (WalkState->ResultCount)) 6203446Smrj { 6213446Smrj AcpiDmDecodeInternalObject ( 6223446Smrj WalkState->Results->Results.ObjDesc [ 623*7851SDana.Myers@Sun.COM (WalkState->ResultCount - 1) % 624*7851SDana.Myers@Sun.COM ACPI_RESULTS_FRAME_OBJ_NUM]); 6253446Smrj } 6263446Smrj #endif 627*7851SDana.Myers@Sun.COM 6283446Smrj break; 6293446Smrj } 6303446Smrj } 6313446Smrj 6323446Smrj #endif /* ACPI_DISASSEMBLER */ 633