psopcode.c revision 69450
167754Smsmith/****************************************************************************** 267754Smsmith * 367754Smsmith * Module Name: psopcode - Parser opcode information table 469450Smsmith * $Revision: 24 $ 567754Smsmith * 667754Smsmith *****************************************************************************/ 767754Smsmith 867754Smsmith/****************************************************************************** 967754Smsmith * 1067754Smsmith * 1. Copyright Notice 1167754Smsmith * 1267754Smsmith * Some or all of this work - Copyright (c) 1999, Intel Corp. All rights 1367754Smsmith * reserved. 1467754Smsmith * 1567754Smsmith * 2. License 1667754Smsmith * 1767754Smsmith * 2.1. This is your license from Intel Corp. under its intellectual property 1867754Smsmith * rights. You may have additional license terms from the party that provided 1967754Smsmith * you this software, covering your right to use that party's intellectual 2067754Smsmith * property rights. 2167754Smsmith * 2267754Smsmith * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 2367754Smsmith * copy of the source code appearing in this file ("Covered Code") an 2467754Smsmith * irrevocable, perpetual, worldwide license under Intel's copyrights in the 2567754Smsmith * base code distributed originally by Intel ("Original Intel Code") to copy, 2667754Smsmith * make derivatives, distribute, use and display any portion of the Covered 2767754Smsmith * Code in any form, with the right to sublicense such rights; and 2867754Smsmith * 2967754Smsmith * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 3067754Smsmith * license (with the right to sublicense), under only those claims of Intel 3167754Smsmith * patents that are infringed by the Original Intel Code, to make, use, sell, 3267754Smsmith * offer to sell, and import the Covered Code and derivative works thereof 3367754Smsmith * solely to the minimum extent necessary to exercise the above copyright 3467754Smsmith * license, and in no event shall the patent license extend to any additions 3567754Smsmith * to or modifications of the Original Intel Code. No other license or right 3667754Smsmith * is granted directly or by implication, estoppel or otherwise; 3767754Smsmith * 3867754Smsmith * The above copyright and patent license is granted only if the following 3967754Smsmith * conditions are met: 4067754Smsmith * 4167754Smsmith * 3. Conditions 4267754Smsmith * 4367754Smsmith * 3.1. Redistribution of Source with Rights to Further Distribute Source. 4467754Smsmith * Redistribution of source code of any substantial portion of the Covered 4567754Smsmith * Code or modification with rights to further distribute source must include 4667754Smsmith * the above Copyright Notice, the above License, this list of Conditions, 4767754Smsmith * and the following Disclaimer and Export Compliance provision. In addition, 4867754Smsmith * Licensee must cause all Covered Code to which Licensee contributes to 4967754Smsmith * contain a file documenting the changes Licensee made to create that Covered 5067754Smsmith * Code and the date of any change. Licensee must include in that file the 5167754Smsmith * documentation of any changes made by any predecessor Licensee. Licensee 5267754Smsmith * must include a prominent statement that the modification is derived, 5367754Smsmith * directly or indirectly, from Original Intel Code. 5467754Smsmith * 5567754Smsmith * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 5667754Smsmith * Redistribution of source code of any substantial portion of the Covered 5767754Smsmith * Code or modification without rights to further distribute source must 5867754Smsmith * include the following Disclaimer and Export Compliance provision in the 5967754Smsmith * documentation and/or other materials provided with distribution. In 6067754Smsmith * addition, Licensee may not authorize further sublicense of source of any 6167754Smsmith * portion of the Covered Code, and must include terms to the effect that the 6267754Smsmith * license from Licensee to its licensee is limited to the intellectual 6367754Smsmith * property embodied in the software Licensee provides to its licensee, and 6467754Smsmith * not to intellectual property embodied in modifications its licensee may 6567754Smsmith * make. 6667754Smsmith * 6767754Smsmith * 3.3. Redistribution of Executable. Redistribution in executable form of any 6867754Smsmith * substantial portion of the Covered Code or modification must reproduce the 6967754Smsmith * above Copyright Notice, and the following Disclaimer and Export Compliance 7067754Smsmith * provision in the documentation and/or other materials provided with the 7167754Smsmith * distribution. 7267754Smsmith * 7367754Smsmith * 3.4. Intel retains all right, title, and interest in and to the Original 7467754Smsmith * Intel Code. 7567754Smsmith * 7667754Smsmith * 3.5. Neither the name Intel nor any other trademark owned or controlled by 7767754Smsmith * Intel shall be used in advertising or otherwise to promote the sale, use or 7867754Smsmith * other dealings in products derived from or relating to the Covered Code 7967754Smsmith * without prior written authorization from Intel. 8067754Smsmith * 8167754Smsmith * 4. Disclaimer and Export Compliance 8267754Smsmith * 8367754Smsmith * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 8467754Smsmith * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 8567754Smsmith * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 8667754Smsmith * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 8767754Smsmith * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 8867754Smsmith * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 8967754Smsmith * PARTICULAR PURPOSE. 9067754Smsmith * 9167754Smsmith * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 9267754Smsmith * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 9367754Smsmith * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 9467754Smsmith * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 9567754Smsmith * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 9667754Smsmith * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 9767754Smsmith * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 9867754Smsmith * LIMITED REMEDY. 9967754Smsmith * 10067754Smsmith * 4.3. Licensee shall not export, either directly or indirectly, any of this 10167754Smsmith * software or system incorporating such software without first obtaining any 10267754Smsmith * required license or other approval from the U. S. Department of Commerce or 10367754Smsmith * any other agency or department of the United States Government. In the 10467754Smsmith * event Licensee exports any such software from the United States or 10567754Smsmith * re-exports any such software from a foreign destination, Licensee shall 10667754Smsmith * ensure that the distribution and export/re-export of the software is in 10767754Smsmith * compliance with all laws, regulations, orders, or other restrictions of the 10867754Smsmith * U.S. Export Administration Regulations. Licensee agrees that neither it nor 10967754Smsmith * any of its subsidiaries will export/re-export any technical data, process, 11067754Smsmith * software, or service, directly or indirectly, to any country for which the 11167754Smsmith * United States government or any agency thereof requires an export license, 11267754Smsmith * other governmental approval, or letter of assurance, without first obtaining 11367754Smsmith * such license, approval or letter. 11467754Smsmith * 11567754Smsmith *****************************************************************************/ 11667754Smsmith 11767754Smsmith 11867754Smsmith#include "acpi.h" 11967754Smsmith#include "acparser.h" 12067754Smsmith#include "amlcode.h" 12167754Smsmith 12267754Smsmith 12367754Smsmith#define _COMPONENT PARSER 12467754Smsmith MODULE_NAME ("psopcode") 12567754Smsmith 12667754Smsmith 12767754Smsmith#define _UNK 0x6B 12867754Smsmith/* 12967754Smsmith * Reserved ASCII characters. Do not use any of these for 13067754Smsmith * internal opcodes, since they are used to differentiate 13167754Smsmith * name strings from AML opcodes 13267754Smsmith */ 13367754Smsmith#define _ASC 0x6C 13467754Smsmith#define _NAM 0x6C 13567754Smsmith#define _PFX 0x6D 13667754Smsmith#define _UNKNOWN_OPCODE 0x02 /* An example unknown opcode */ 13767754Smsmith 13867754Smsmith#define MAX_EXTENDED_OPCODE 0x87 13967754Smsmith#define NUM_EXTENDED_OPCODE MAX_EXTENDED_OPCODE + 1 14067754Smsmith#define MAX_INTERNAL_OPCODE 14167754Smsmith#define NUM_INTERNAL_OPCODE MAX_INTERNAL_OPCODE + 1 14267754Smsmith 14367754Smsmith 14467754Smsmith/******************************************************************************* 14567754Smsmith * 14667754Smsmith * NAME: AcpiGbl_AmlOpInfo 14767754Smsmith * 14867754Smsmith * DESCRIPTION: Opcode table. Each entry contains <opcode, type, name, operands> 14967754Smsmith * The name is a simple ascii string, the operand specifier is an 15067754Smsmith * ascii string with one letter per operand. The letter specifies 15167754Smsmith * the operand type. 15267754Smsmith * 15367754Smsmith ******************************************************************************/ 15467754Smsmith 15567754Smsmith 15667754Smsmith/* 15767754Smsmith * Flags byte: 0-4 (5 bits) = Opcode Type 15867754Smsmith * 5 (1 bit) = Has arguments flag 15967754Smsmith * 6-7 (2 bits) = Reserved 16067754Smsmith */ 16167754Smsmith#define AML_NO_ARGS 0 16267754Smsmith#define AML_HAS_ARGS ACPI_OP_ARGS_MASK 16367754Smsmith 16467754Smsmith/* 16567754Smsmith * All AML opcodes and the parse-time arguments for each. Used by the AML parser Each list is compressed 16667754Smsmith * into a 32-bit number and stored in the master opcode table at the end of this file. 16767754Smsmith */ 16867754Smsmith 16967754Smsmith#define ARGP_ZERO_OP ARG_NONE 17067754Smsmith#define ARGP_ONE_OP ARG_NONE 17167754Smsmith#define ARGP_ALIAS_OP ARGP_LIST2 (ARGP_NAMESTRING, ARGP_NAME) 17267754Smsmith#define ARGP_NAME_OP ARGP_LIST2 (ARGP_NAME, ARGP_DATAOBJ) 17367754Smsmith#define ARGP_BYTE_OP ARGP_LIST1 (ARGP_BYTEDATA) 17467754Smsmith#define ARGP_WORD_OP ARGP_LIST1 (ARGP_WORDDATA) 17567754Smsmith#define ARGP_DWORD_OP ARGP_LIST1 (ARGP_DWORDDATA) 17667754Smsmith#define ARGP_STRING_OP ARGP_LIST1 (ARGP_CHARLIST) 17767754Smsmith#define ARGP_SCOPE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_TERMLIST) 17867754Smsmith#define ARGP_BUFFER_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_BYTELIST) 17967754Smsmith#define ARGP_PACKAGE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_BYTEDATA, ARGP_DATAOBJLIST) 18067754Smsmith#define ARGP_METHOD_OP ARGP_LIST4 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_TERMLIST) 18167754Smsmith#define ARGP_LOCAL0 ARG_NONE 18267754Smsmith#define ARGP_LOCAL1 ARG_NONE 18367754Smsmith#define ARGP_LOCAL2 ARG_NONE 18467754Smsmith#define ARGP_LOCAL3 ARG_NONE 18567754Smsmith#define ARGP_LOCAL4 ARG_NONE 18667754Smsmith#define ARGP_LOCAL5 ARG_NONE 18767754Smsmith#define ARGP_LOCAL6 ARG_NONE 18867754Smsmith#define ARGP_LOCAL7 ARG_NONE 18967754Smsmith#define ARGP_ARG0 ARG_NONE 19067754Smsmith#define ARGP_ARG1 ARG_NONE 19167754Smsmith#define ARGP_ARG2 ARG_NONE 19267754Smsmith#define ARGP_ARG3 ARG_NONE 19367754Smsmith#define ARGP_ARG4 ARG_NONE 19467754Smsmith#define ARGP_ARG5 ARG_NONE 19567754Smsmith#define ARGP_ARG6 ARG_NONE 19667754Smsmith#define ARGP_STORE_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_SUPERNAME) 19767754Smsmith#define ARGP_REF_OF_OP ARGP_LIST1 (ARGP_SUPERNAME) 19867754Smsmith#define ARGP_ADD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 19967754Smsmith#define ARGP_CONCAT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 20067754Smsmith#define ARGP_SUBTRACT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 20167754Smsmith#define ARGP_INCREMENT_OP ARGP_LIST1 (ARGP_SUPERNAME) 20267754Smsmith#define ARGP_DECREMENT_OP ARGP_LIST1 (ARGP_SUPERNAME) 20367754Smsmith#define ARGP_MULTIPLY_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 20467754Smsmith#define ARGP_DIVIDE_OP ARGP_LIST4 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET, ARGP_TARGET) 20567754Smsmith#define ARGP_SHIFT_LEFT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 20667754Smsmith#define ARGP_SHIFT_RIGHT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 20767754Smsmith#define ARGP_BIT_AND_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 20867754Smsmith#define ARGP_BIT_NAND_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 20967754Smsmith#define ARGP_BIT_OR_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 21067754Smsmith#define ARGP_BIT_NOR_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 21167754Smsmith#define ARGP_BIT_XOR_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 21267754Smsmith#define ARGP_BIT_NOT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) 21367754Smsmith#define ARGP_FIND_SET_LEFT_BIT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) 21467754Smsmith#define ARGP_FIND_SET_RIGHT_BIT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) 21567754Smsmith#define ARGP_DEREF_OF_OP ARGP_LIST1 (ARGP_TERMARG) 21667754Smsmith#define ARGP_NOTIFY_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_TERMARG) 21767754Smsmith#define ARGP_SIZE_OF_OP ARGP_LIST1 (ARGP_SUPERNAME) 21867754Smsmith#define ARGP_INDEX_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 21967754Smsmith#define ARGP_MATCH_OP ARGP_LIST6 (ARGP_TERMARG, ARGP_BYTEDATA, ARGP_TERMARG, ARGP_BYTEDATA, ARGP_TERMARG, ARGP_TERMARG) 22067754Smsmith#define ARGP_DWORD_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME) 22167754Smsmith#define ARGP_WORD_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME) 22267754Smsmith#define ARGP_BYTE_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME) 22367754Smsmith#define ARGP_BIT_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME) 22467754Smsmith#define ARGP_TYPE_OP ARGP_LIST1 (ARGP_SUPERNAME) 22567754Smsmith#define ARGP_LAND_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG) 22667754Smsmith#define ARGP_LOR_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG) 22767754Smsmith#define ARGP_LNOT_OP ARGP_LIST1 (ARGP_TERMARG) 22867754Smsmith#define ARGP_LEQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG) 22967754Smsmith#define ARGP_LGREATER_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG) 23067754Smsmith#define ARGP_LLESS_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG) 23167754Smsmith#define ARGP_IF_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_TERMLIST) 23267754Smsmith#define ARGP_ELSE_OP ARGP_LIST2 (ARGP_PKGLENGTH, ARGP_TERMLIST) 23367754Smsmith#define ARGP_WHILE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_TERMLIST) 23467754Smsmith#define ARGP_NOOP_OP ARG_NONE 23567754Smsmith#define ARGP_RETURN_OP ARGP_LIST1 (ARGP_TERMARG) 23667754Smsmith#define ARGP_BREAK_OP ARG_NONE 23767754Smsmith#define ARGP_BREAK_POINT_OP ARG_NONE 23867754Smsmith#define ARGP_ONES_OP ARG_NONE 23967754Smsmith#define ARGP_MUTEX_OP ARGP_LIST2 (ARGP_NAME, ARGP_BYTEDATA) 24067754Smsmith#define ARGP_EVENT_OP ARGP_LIST1 (ARGP_NAME) 24167754Smsmith#define ARGP_COND_REF_OF_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_SUPERNAME) 24267754Smsmith#define ARGP_CREATE_FIELD_OP ARGP_LIST4 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME) 24367754Smsmith#define ARGP_LOAD_OP ARGP_LIST2 (ARGP_NAMESTRING, ARGP_SUPERNAME) 24467754Smsmith#define ARGP_STALL_OP ARGP_LIST1 (ARGP_TERMARG) 24567754Smsmith#define ARGP_SLEEP_OP ARGP_LIST1 (ARGP_TERMARG) 24667754Smsmith#define ARGP_ACQUIRE_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_WORDDATA) 24767754Smsmith#define ARGP_SIGNAL_OP ARGP_LIST1 (ARGP_SUPERNAME) 24867754Smsmith#define ARGP_WAIT_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_TERMARG) 24967754Smsmith#define ARGP_RESET_OP ARGP_LIST1 (ARGP_SUPERNAME) 25067754Smsmith#define ARGP_RELEASE_OP ARGP_LIST1 (ARGP_SUPERNAME) 25167754Smsmith#define ARGP_FROM_BCD_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) 25267754Smsmith#define ARGP_TO_BCD_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) 25367754Smsmith#define ARGP_UNLOAD_OP ARGP_LIST1 (ARGP_SUPERNAME) 25467754Smsmith#define ARGP_REVISION_OP ARG_NONE 25567754Smsmith#define ARGP_DEBUG_OP ARG_NONE 25667754Smsmith#define ARGP_FATAL_OP ARGP_LIST3 (ARGP_BYTEDATA, ARGP_DWORDDATA, ARGP_TERMARG) 25767754Smsmith#define ARGP_REGION_OP ARGP_LIST4 (ARGP_NAME, ARGP_BYTEDATA, ARGP_TERMARG, ARGP_TERMARG) 25867754Smsmith#define ARGP_DEF_FIELD_OP ARGP_LIST4 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_BYTEDATA, ARGP_FIELDLIST) 25967754Smsmith#define ARGP_DEVICE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_OBJLIST) 26067754Smsmith#define ARGP_PROCESSOR_OP ARGP_LIST6 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_DWORDDATA, ARGP_BYTEDATA, ARGP_OBJLIST) 26167754Smsmith#define ARGP_POWER_RES_OP ARGP_LIST5 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_WORDDATA, ARGP_OBJLIST) 26267754Smsmith#define ARGP_THERMAL_ZONE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_OBJLIST) 26367754Smsmith#define ARGP_INDEX_FIELD_OP ARGP_LIST5 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_NAMESTRING,ARGP_BYTEDATA, ARGP_FIELDLIST) 26467754Smsmith#define ARGP_BANK_FIELD_OP ARGP_LIST6 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_NAMESTRING,ARGP_TERMARG, ARGP_BYTEDATA, ARGP_FIELDLIST) 26567754Smsmith#define ARGP_LNOTEQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG) 26667754Smsmith#define ARGP_LLESSEQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG) 26767754Smsmith#define ARGP_LGREATEREQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG) 26867754Smsmith#define ARGP_NAMEPATH_OP ARGP_LIST1 (ARGP_NAMESTRING) 26967754Smsmith#define ARGP_METHODCALL_OP ARGP_LIST1 (ARGP_NAMESTRING) 27067754Smsmith#define ARGP_BYTELIST_OP ARGP_LIST1 (ARGP_NAMESTRING) 27167754Smsmith#define ARGP_RESERVEDFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING) 27267754Smsmith#define ARGP_NAMEDFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING) 27367754Smsmith#define ARGP_ACCESSFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING) 27467754Smsmith#define ARGP_STATICSTRING_OP ARGP_LIST1 (ARGP_NAMESTRING) 27567754Smsmith 27667754Smsmith 27767754Smsmith/* 27867754Smsmith * All AML opcodes and the runtime arguments for each. Used by the AML interpreter Each list is compressed 27967754Smsmith * into a 32-bit number and stored in the master opcode table at the end of this file. 28067754Smsmith * 28167754Smsmith * (Used by AcpiAmlPrepOperands procedure) 28267754Smsmith */ 28367754Smsmith 28467754Smsmith#define ARGI_ZERO_OP ARG_NONE 28567754Smsmith#define ARGI_ONE_OP ARG_NONE 28667754Smsmith#define ARGI_ALIAS_OP ARGI_INVALID_OPCODE 28767754Smsmith#define ARGI_NAME_OP ARGI_INVALID_OPCODE 28867754Smsmith#define ARGI_BYTE_OP ARGI_INVALID_OPCODE 28967754Smsmith#define ARGI_WORD_OP ARGI_INVALID_OPCODE 29067754Smsmith#define ARGI_DWORD_OP ARGI_INVALID_OPCODE 29167754Smsmith#define ARGI_STRING_OP ARGI_INVALID_OPCODE 29267754Smsmith#define ARGI_SCOPE_OP ARGI_INVALID_OPCODE 29367754Smsmith#define ARGI_BUFFER_OP ARGI_INVALID_OPCODE 29467754Smsmith#define ARGI_PACKAGE_OP ARGI_INVALID_OPCODE 29567754Smsmith#define ARGI_METHOD_OP ARGI_INVALID_OPCODE 29667754Smsmith#define ARGI_LOCAL0 ARG_NONE 29767754Smsmith#define ARGI_LOCAL1 ARG_NONE 29867754Smsmith#define ARGI_LOCAL2 ARG_NONE 29967754Smsmith#define ARGI_LOCAL3 ARG_NONE 30067754Smsmith#define ARGI_LOCAL4 ARG_NONE 30167754Smsmith#define ARGI_LOCAL5 ARG_NONE 30267754Smsmith#define ARGI_LOCAL6 ARG_NONE 30367754Smsmith#define ARGI_LOCAL7 ARG_NONE 30467754Smsmith#define ARGI_ARG0 ARG_NONE 30567754Smsmith#define ARGI_ARG1 ARG_NONE 30667754Smsmith#define ARGI_ARG2 ARG_NONE 30767754Smsmith#define ARGI_ARG3 ARG_NONE 30867754Smsmith#define ARGI_ARG4 ARG_NONE 30967754Smsmith#define ARGI_ARG5 ARG_NONE 31067754Smsmith#define ARGI_ARG6 ARG_NONE 31167754Smsmith#define ARGI_STORE_OP ARGI_LIST2 (ARGI_ANYTYPE, ARGI_TARGETREF) 31267754Smsmith#define ARGI_REF_OF_OP ARGI_LIST1 (ARGI_REFERENCE) 31367754Smsmith#define ARGI_ADD_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF) 31467754Smsmith#define ARGI_CONCAT_OP ARGI_LIST3 (ARGI_STRING, ARGI_STRING, ARGI_TARGETREF) 31567754Smsmith#define ARGI_SUBTRACT_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF) 31667754Smsmith#define ARGI_INCREMENT_OP ARGI_LIST1 (ARGI_REFERENCE) 31767754Smsmith#define ARGI_DECREMENT_OP ARGI_LIST1 (ARGI_REFERENCE) 31867754Smsmith#define ARGI_MULTIPLY_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF) 31967754Smsmith#define ARGI_DIVIDE_OP ARGI_LIST4 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF, ARGI_TARGETREF) 32067754Smsmith#define ARGI_SHIFT_LEFT_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF) 32167754Smsmith#define ARGI_SHIFT_RIGHT_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF) 32267754Smsmith#define ARGI_BIT_AND_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF) 32367754Smsmith#define ARGI_BIT_NAND_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF) 32467754Smsmith#define ARGI_BIT_OR_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF) 32567754Smsmith#define ARGI_BIT_NOR_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF) 32667754Smsmith#define ARGI_BIT_XOR_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF) 32767754Smsmith#define ARGI_BIT_NOT_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_TARGETREF) 32867754Smsmith#define ARGI_FIND_SET_LEFT_BIT_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_TARGETREF) 32967754Smsmith#define ARGI_FIND_SET_RIGHT_BIT_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_TARGETREF) 33067754Smsmith#define ARGI_DEREF_OF_OP ARGI_LIST1 (ARGI_REFERENCE) 33167754Smsmith#define ARGI_NOTIFY_OP ARGI_LIST2 (ARGI_REFERENCE, ARGI_NUMBER) 33267754Smsmith#define ARGI_SIZE_OF_OP ARGI_LIST1 (ARGI_DATAOBJECT) 33367754Smsmith#define ARGI_INDEX_OP ARGI_LIST3 (ARGI_COMPLEXOBJ, ARGI_NUMBER, ARGI_TARGETREF) 33467754Smsmith#define ARGI_MATCH_OP ARGI_LIST6 (ARGI_PACKAGE, ARGI_NUMBER, ARGI_NUMBER, ARGI_NUMBER, ARGI_NUMBER, ARGI_NUMBER) 33567754Smsmith#define ARGI_DWORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_NUMBER, ARGI_REFERENCE) 33667754Smsmith#define ARGI_WORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_NUMBER, ARGI_REFERENCE) 33767754Smsmith#define ARGI_BYTE_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_NUMBER, ARGI_REFERENCE) 33867754Smsmith#define ARGI_BIT_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_NUMBER, ARGI_REFERENCE) 33967754Smsmith#define ARGI_TYPE_OP ARGI_LIST1 (ARGI_ANYTYPE) 34067754Smsmith#define ARGI_LAND_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_NUMBER) 34167754Smsmith#define ARGI_LOR_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_NUMBER) 34267754Smsmith#define ARGI_LNOT_OP ARGI_LIST1 (ARGI_NUMBER) 34367754Smsmith#define ARGI_LEQUAL_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_NUMBER) 34467754Smsmith#define ARGI_LGREATER_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_NUMBER) 34567754Smsmith#define ARGI_LLESS_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_NUMBER) 34667754Smsmith#define ARGI_IF_OP ARGI_INVALID_OPCODE 34767754Smsmith#define ARGI_ELSE_OP ARGI_INVALID_OPCODE 34867754Smsmith#define ARGI_WHILE_OP ARGI_INVALID_OPCODE 34967754Smsmith#define ARGI_NOOP_OP ARG_NONE 35067754Smsmith#define ARGI_RETURN_OP ARGI_INVALID_OPCODE 35167754Smsmith#define ARGI_BREAK_OP ARG_NONE 35267754Smsmith#define ARGI_BREAK_POINT_OP ARG_NONE 35367754Smsmith#define ARGI_ONES_OP ARG_NONE 35467754Smsmith#define ARGI_MUTEX_OP ARGI_INVALID_OPCODE 35567754Smsmith#define ARGI_EVENT_OP ARGI_INVALID_OPCODE 35667754Smsmith#define ARGI_COND_REF_OF_OP ARGI_LIST2 (ARGI_REFERENCE, ARGI_TARGETREF) 35767754Smsmith#define ARGI_CREATE_FIELD_OP ARGI_LIST4 (ARGI_BUFFER, ARGI_NUMBER, ARGI_NUMBER, ARGI_REFERENCE) 35867754Smsmith#define ARGI_LOAD_OP ARGI_LIST2 (ARGI_REGION, ARGI_TARGETREF) 35967754Smsmith#define ARGI_STALL_OP ARGI_LIST1 (ARGI_NUMBER) 36067754Smsmith#define ARGI_SLEEP_OP ARGI_LIST1 (ARGI_NUMBER) 36167754Smsmith#define ARGI_ACQUIRE_OP ARGI_LIST2 (ARGI_MUTEX, ARGI_NUMBER) 36267754Smsmith#define ARGI_SIGNAL_OP ARGI_LIST1 (ARGI_EVENT) 36367754Smsmith#define ARGI_WAIT_OP ARGI_LIST2 (ARGI_EVENT, ARGI_NUMBER) 36467754Smsmith#define ARGI_RESET_OP ARGI_LIST1 (ARGI_EVENT) 36567754Smsmith#define ARGI_RELEASE_OP ARGI_LIST1 (ARGI_MUTEX) 36667754Smsmith#define ARGI_FROM_BCD_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_TARGETREF) 36767754Smsmith#define ARGI_TO_BCD_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_TARGETREF) 36867754Smsmith#define ARGI_UNLOAD_OP ARGI_LIST1 (ARGI_DDBHANDLE) 36967754Smsmith#define ARGI_REVISION_OP ARG_NONE 37067754Smsmith#define ARGI_DEBUG_OP ARG_NONE 37167754Smsmith#define ARGI_FATAL_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_NUMBER) 37269450Smsmith#define ARGI_REGION_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_NUMBER) 37367754Smsmith#define ARGI_DEF_FIELD_OP ARGI_INVALID_OPCODE 37467754Smsmith#define ARGI_DEVICE_OP ARGI_INVALID_OPCODE 37567754Smsmith#define ARGI_PROCESSOR_OP ARGI_INVALID_OPCODE 37667754Smsmith#define ARGI_POWER_RES_OP ARGI_INVALID_OPCODE 37767754Smsmith#define ARGI_THERMAL_ZONE_OP ARGI_INVALID_OPCODE 37867754Smsmith#define ARGI_INDEX_FIELD_OP ARGI_INVALID_OPCODE 37967754Smsmith#define ARGI_BANK_FIELD_OP ARGI_INVALID_OPCODE 38067754Smsmith#define ARGI_LNOTEQUAL_OP ARGI_INVALID_OPCODE 38167754Smsmith#define ARGI_LLESSEQUAL_OP ARGI_INVALID_OPCODE 38267754Smsmith#define ARGI_LGREATEREQUAL_OP ARGI_INVALID_OPCODE 38367754Smsmith#define ARGI_NAMEPATH_OP ARGI_INVALID_OPCODE 38467754Smsmith#define ARGI_METHODCALL_OP ARGI_INVALID_OPCODE 38567754Smsmith#define ARGI_BYTELIST_OP ARGI_INVALID_OPCODE 38667754Smsmith#define ARGI_RESERVEDFIELD_OP ARGI_INVALID_OPCODE 38767754Smsmith#define ARGI_NAMEDFIELD_OP ARGI_INVALID_OPCODE 38867754Smsmith#define ARGI_ACCESSFIELD_OP ARGI_INVALID_OPCODE 38967754Smsmith#define ARGI_STATICSTRING_OP ARGI_INVALID_OPCODE 39067754Smsmith 39167754Smsmith 39267754Smsmith/* 39367754Smsmith * Master Opcode information table. A summary of everything we know about each opcode, all in one place. 39467754Smsmith */ 39567754Smsmith 39667754Smsmith 39769450Smsmithstatic ACPI_OPCODE_INFO AmlOpInfo[] = 39867754Smsmith{ 39967754Smsmith/* Index Opcode Type Class Has Arguments? Name Parser Args Interpreter Args */ 40067754Smsmith 40167754Smsmith/* 00 */ /* AML_ZERO_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "ZeroOp", ARGP_ZERO_OP, ARGI_ZERO_OP), 40267754Smsmith/* 01 */ /* AML_ONE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "OneOp", ARGP_ONE_OP, ARGI_ONE_OP), 40367754Smsmith/* 02 */ /* AML_ALIAS_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Alias", ARGP_ALIAS_OP, ARGI_ALIAS_OP), 40467754Smsmith/* 03 */ /* AML_NAME_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Name", ARGP_NAME_OP, ARGI_NAME_OP), 40567754Smsmith/* 04 */ /* AML_BYTE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS, "ByteConst", ARGP_BYTE_OP, ARGI_BYTE_OP), 40667754Smsmith/* 05 */ /* AML_WORD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS, "WordConst", ARGP_WORD_OP, ARGI_WORD_OP), 40767754Smsmith/* 06 */ /* AML_DWORD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS, "DwordConst", ARGP_DWORD_OP, ARGI_DWORD_OP), 40867754Smsmith/* 07 */ /* AML_STRING_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS, "String", ARGP_STRING_OP, ARGI_STRING_OP), 40967754Smsmith/* 08 */ /* AML_SCOPE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Scope", ARGP_SCOPE_OP, ARGI_SCOPE_OP), 41067754Smsmith/* 09 */ /* AML_BUFFER_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DATA_TERM| AML_HAS_ARGS, "Buffer", ARGP_BUFFER_OP, ARGI_BUFFER_OP), 41167754Smsmith/* 0A */ /* AML_PACKAGE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DATA_TERM| AML_HAS_ARGS, "Package", ARGP_PACKAGE_OP, ARGI_PACKAGE_OP), 41267754Smsmith/* 0B */ /* AML_METHOD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Method", ARGP_METHOD_OP, ARGI_METHOD_OP), 41367754Smsmith/* 0C */ /* AML_LOCAL0 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS, "Local0", ARGP_LOCAL0, ARGI_LOCAL0), 41467754Smsmith/* 0D */ /* AML_LOCAL1 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS, "Local1", ARGP_LOCAL1, ARGI_LOCAL1), 41567754Smsmith/* 0E */ /* AML_LOCAL2 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS, "Local2", ARGP_LOCAL2, ARGI_LOCAL2), 41667754Smsmith/* 0F */ /* AML_LOCAL3 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS, "Local3", ARGP_LOCAL3, ARGI_LOCAL3), 41767754Smsmith/* 10 */ /* AML_LOCAL4 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS, "Local4", ARGP_LOCAL4, ARGI_LOCAL4), 41867754Smsmith/* 11 */ /* AML_LOCAL5 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS, "Local5", ARGP_LOCAL5, ARGI_LOCAL5), 41967754Smsmith/* 12 */ /* AML_LOCAL6 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS, "Local6", ARGP_LOCAL6, ARGI_LOCAL6), 42067754Smsmith/* 13 */ /* AML_LOCAL7 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS, "Local7", ARGP_LOCAL7, ARGI_LOCAL7), 42167754Smsmith/* 14 */ /* AML_ARG0 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS, "Arg0", ARGP_ARG0, ARGI_ARG0), 42267754Smsmith/* 15 */ /* AML_ARG1 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS, "Arg1", ARGP_ARG1, ARGI_ARG1), 42367754Smsmith/* 16 */ /* AML_ARG2 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS, "Arg2", ARGP_ARG2, ARGI_ARG2), 42467754Smsmith/* 17 */ /* AML_ARG3 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS, "Arg3", ARGP_ARG3, ARGI_ARG3), 42567754Smsmith/* 18 */ /* AML_ARG4 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS, "Arg4", ARGP_ARG4, ARGI_ARG4), 42667754Smsmith/* 19 */ /* AML_ARG5 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS, "Arg5", ARGP_ARG5, ARGI_ARG5), 42767754Smsmith/* 1A */ /* AML_ARG6 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS, "Arg6", ARGP_ARG6, ARGI_ARG6), 42867754Smsmith/* 1B */ /* AML_STORE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "Store", ARGP_STORE_OP, ARGI_STORE_OP), 42967754Smsmith/* 1C */ /* AML_REF_OF_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS, "RefOf", ARGP_REF_OF_OP, ARGI_REF_OF_OP), 43067754Smsmith/* 1D */ /* AML_ADD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Add", ARGP_ADD_OP, ARGI_ADD_OP), 43167754Smsmith/* 1E */ /* AML_CONCAT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Concat", ARGP_CONCAT_OP, ARGI_CONCAT_OP), 43267754Smsmith/* 1F */ /* AML_SUBTRACT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Subtract", ARGP_SUBTRACT_OP, ARGI_SUBTRACT_OP), 43367754Smsmith/* 20 */ /* AML_INCREMENT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS, "Increment", ARGP_INCREMENT_OP, ARGI_INCREMENT_OP), 43467754Smsmith/* 21 */ /* AML_DECREMENT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS, "Decrement", ARGP_DECREMENT_OP, ARGI_DECREMENT_OP), 43567754Smsmith/* 22 */ /* AML_MULTIPLY_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Multiply", ARGP_MULTIPLY_OP, ARGI_MULTIPLY_OP), 43667754Smsmith/* 23 */ /* AML_DIVIDE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Divide", ARGP_DIVIDE_OP, ARGI_DIVIDE_OP), 43767754Smsmith/* 24 */ /* AML_SHIFT_LEFT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "ShiftLeft", ARGP_SHIFT_LEFT_OP, ARGI_SHIFT_LEFT_OP), 43867754Smsmith/* 25 */ /* AML_SHIFT_RIGHT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "ShiftRight", ARGP_SHIFT_RIGHT_OP, ARGI_SHIFT_RIGHT_OP), 43967754Smsmith/* 26 */ /* AML_BIT_AND_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "And", ARGP_BIT_AND_OP, ARGI_BIT_AND_OP), 44067754Smsmith/* 27 */ /* AML_BIT_NAND_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "NAnd", ARGP_BIT_NAND_OP, ARGI_BIT_NAND_OP), 44167754Smsmith/* 28 */ /* AML_BIT_OR_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Or", ARGP_BIT_OR_OP, ARGI_BIT_OR_OP), 44267754Smsmith/* 29 */ /* AML_BIT_NOR_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "NOr", ARGP_BIT_NOR_OP, ARGI_BIT_NOR_OP), 44367754Smsmith/* 2A */ /* AML_BIT_XOR_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "XOr", ARGP_BIT_XOR_OP, ARGI_BIT_XOR_OP), 44467754Smsmith/* 2B */ /* AML_BIT_NOT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "Not", ARGP_BIT_NOT_OP, ARGI_BIT_NOT_OP), 44567754Smsmith/* 2C */ /* AML_FIND_SET_LEFT_BIT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "FindSetLeftBit", ARGP_FIND_SET_LEFT_BIT_OP, ARGI_FIND_SET_LEFT_BIT_OP), 44667754Smsmith/* 2D */ /* AML_FIND_SET_RIGHT_BIT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "FindSetRightBit", ARGP_FIND_SET_RIGHT_BIT_OP, ARGI_FIND_SET_RIGHT_BIT_OP), 44767754Smsmith/* 2E */ /* AML_DEREF_OF_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS, "DerefOf", ARGP_DEREF_OF_OP, ARGI_DEREF_OF_OP), 44867754Smsmith/* 2F */ /* AML_NOTIFY_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC1| AML_HAS_ARGS, "Notify", ARGP_NOTIFY_OP, ARGI_NOTIFY_OP), 44967754Smsmith/* 30 */ /* AML_SIZE_OF_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS, "SizeOf", ARGP_SIZE_OF_OP, ARGI_SIZE_OF_OP), 45067754Smsmith/* 31 */ /* AML_INDEX_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_INDEX| AML_HAS_ARGS, "Index", ARGP_INDEX_OP, ARGI_INDEX_OP), 45167754Smsmith/* 32 */ /* AML_MATCH_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MATCH| AML_HAS_ARGS, "Match", ARGP_MATCH_OP, ARGI_MATCH_OP), 45267754Smsmith/* 33 */ /* AML_DWORD_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CREATE_FIELD| AML_HAS_ARGS, "CreateDWordField", ARGP_DWORD_FIELD_OP, ARGI_DWORD_FIELD_OP), 45367754Smsmith/* 34 */ /* AML_WORD_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CREATE_FIELD| AML_HAS_ARGS, "CreateWordField", ARGP_WORD_FIELD_OP, ARGI_WORD_FIELD_OP), 45467754Smsmith/* 35 */ /* AML_BYTE_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CREATE_FIELD| AML_HAS_ARGS, "CreateByteField", ARGP_BYTE_FIELD_OP, ARGI_BYTE_FIELD_OP), 45567754Smsmith/* 36 */ /* AML_BIT_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CREATE_FIELD| AML_HAS_ARGS, "CreateBitField", ARGP_BIT_FIELD_OP, ARGI_BIT_FIELD_OP), 45667754Smsmith/* 37 */ /* AML_TYPE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS, "ObjectType", ARGP_TYPE_OP, ARGI_TYPE_OP), 45767754Smsmith/* 38 */ /* AML_LAND_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2| AML_HAS_ARGS, "LAnd", ARGP_LAND_OP, ARGI_LAND_OP), 45867754Smsmith/* 39 */ /* AML_LOR_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2| AML_HAS_ARGS, "LOr", ARGP_LOR_OP, ARGI_LOR_OP), 45967754Smsmith/* 3A */ /* AML_LNOT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS, "LNot", ARGP_LNOT_OP, ARGI_LNOT_OP), 46067754Smsmith/* 3B */ /* AML_LEQUAL_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2| AML_HAS_ARGS, "LEqual", ARGP_LEQUAL_OP, ARGI_LEQUAL_OP), 46167754Smsmith/* 3C */ /* AML_LGREATER_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2| AML_HAS_ARGS, "LGreater", ARGP_LGREATER_OP, ARGI_LGREATER_OP), 46267754Smsmith/* 3D */ /* AML_LLESS_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2| AML_HAS_ARGS, "LLess", ARGP_LLESS_OP, ARGI_LLESS_OP), 46367754Smsmith/* 3E */ /* AML_IF_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_HAS_ARGS, "If", ARGP_IF_OP, ARGI_IF_OP), 46467754Smsmith/* 3F */ /* AML_ELSE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_HAS_ARGS, "Else", ARGP_ELSE_OP, ARGI_ELSE_OP), 46567754Smsmith/* 40 */ /* AML_WHILE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_HAS_ARGS, "While", ARGP_WHILE_OP, ARGI_WHILE_OP), 46667754Smsmith/* 41 */ /* AML_NOOP_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_NO_ARGS, "Noop", ARGP_NOOP_OP, ARGI_NOOP_OP), 46767754Smsmith/* 42 */ /* AML_RETURN_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_HAS_ARGS, "Return", ARGP_RETURN_OP, ARGI_RETURN_OP), 46867754Smsmith/* 43 */ /* AML_BREAK_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_NO_ARGS, "Break", ARGP_BREAK_OP, ARGI_BREAK_OP), 46967754Smsmith/* 44 */ /* AML_BREAK_POINT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_NO_ARGS, "BreakPoint", ARGP_BREAK_POINT_OP, ARGI_BREAK_POINT_OP), 47067754Smsmith/* 45 */ /* AML_ONES_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "OnesOp", ARGP_ONES_OP, ARGI_ONES_OP), 47167754Smsmith 47267754Smsmith/* Prefixed opcodes (Two-byte opcodes with a prefix op) */ 47367754Smsmith 47467754Smsmith/* 46 */ /* AML_MUTEX_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Mutex", ARGP_MUTEX_OP, ARGI_MUTEX_OP), 47567754Smsmith/* 47 */ /* AML_EVENT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_NO_ARGS, "Event", ARGP_EVENT_OP, ARGI_EVENT_OP), 47667754Smsmith/* 48 */ /* AML_COND_REF_OF_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "CondRefOf", ARGP_COND_REF_OF_OP, ARGI_COND_REF_OF_OP), 47767754Smsmith/* 49 */ /* AML_CREATE_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CREATE_FIELD| AML_HAS_ARGS, "CreateField", ARGP_CREATE_FIELD_OP, ARGI_CREATE_FIELD_OP), 47867754Smsmith/* 4A */ /* AML_LOAD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_RECONFIGURATION| AML_HAS_ARGS, "Load", ARGP_LOAD_OP, ARGI_LOAD_OP), 47967754Smsmith/* 4B */ /* AML_STALL_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC1| AML_HAS_ARGS, "Stall", ARGP_STALL_OP, ARGI_STALL_OP), 48067754Smsmith/* 4C */ /* AML_SLEEP_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC1| AML_HAS_ARGS, "Sleep", ARGP_SLEEP_OP, ARGI_SLEEP_OP), 48167754Smsmith/* 4D */ /* AML_ACQUIRE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2S| AML_HAS_ARGS, "Acquire", ARGP_ACQUIRE_OP, ARGI_ACQUIRE_OP), 48267754Smsmith/* 4E */ /* AML_SIGNAL_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC1| AML_HAS_ARGS, "Signal", ARGP_SIGNAL_OP, ARGI_SIGNAL_OP), 48367754Smsmith/* 4F */ /* AML_WAIT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2S| AML_HAS_ARGS, "Wait", ARGP_WAIT_OP, ARGI_WAIT_OP), 48467754Smsmith/* 50 */ /* AML_RESET_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC1| AML_HAS_ARGS, "Reset", ARGP_RESET_OP, ARGI_RESET_OP), 48567754Smsmith/* 51 */ /* AML_RELEASE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC1| AML_HAS_ARGS, "Release", ARGP_RELEASE_OP, ARGI_RELEASE_OP), 48667754Smsmith/* 52 */ /* AML_FROM_BCD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "FromBCD", ARGP_FROM_BCD_OP, ARGI_FROM_BCD_OP), 48767754Smsmith/* 53 */ /* AML_TO_BCD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "ToBCD", ARGP_TO_BCD_OP, ARGI_TO_BCD_OP), 48867754Smsmith/* 54 */ /* AML_UNLOAD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_RECONFIGURATION| AML_HAS_ARGS, "Unload", ARGP_UNLOAD_OP, ARGI_UNLOAD_OP), 48967754Smsmith/* 55 */ /* AML_REVISION_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "Revision", ARGP_REVISION_OP, ARGI_REVISION_OP), 49067754Smsmith/* 56 */ /* AML_DEBUG_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "Debug", ARGP_DEBUG_OP, ARGI_DEBUG_OP), 49167754Smsmith/* 57 */ /* AML_FATAL_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_FATAL| AML_HAS_ARGS, "Fatal", ARGP_FATAL_OP, ARGI_FATAL_OP), 49267754Smsmith/* 58 */ /* AML_REGION_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "OpRegion", ARGP_REGION_OP, ARGI_REGION_OP), 49367754Smsmith/* 59 */ /* AML_DEF_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Field", ARGP_DEF_FIELD_OP, ARGI_DEF_FIELD_OP), 49467754Smsmith/* 5A */ /* AML_DEVICE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Device", ARGP_DEVICE_OP, ARGI_DEVICE_OP), 49567754Smsmith/* 5B */ /* AML_PROCESSOR_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Processor", ARGP_PROCESSOR_OP, ARGI_PROCESSOR_OP), 49667754Smsmith/* 5C */ /* AML_POWER_RES_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "PowerRes", ARGP_POWER_RES_OP, ARGI_POWER_RES_OP), 49767754Smsmith/* 5D */ /* AML_THERMAL_ZONE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "ThermalZone", ARGP_THERMAL_ZONE_OP, ARGI_THERMAL_ZONE_OP), 49867754Smsmith/* 5E */ /* AML_INDEX_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "IndexField", ARGP_INDEX_FIELD_OP, ARGI_INDEX_FIELD_OP), 49967754Smsmith/* 5F */ /* AML_BANK_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "BankField", ARGP_BANK_FIELD_OP, ARGI_BANK_FIELD_OP), 50067754Smsmith 50167754Smsmith/* Internal opcodes that map to invalid AML opcodes */ 50267754Smsmith 50367754Smsmith/* 60 */ /* AML_LNOTEQUAL_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_HAS_ARGS, "LNotEqual", ARGP_LNOTEQUAL_OP, ARGI_LNOTEQUAL_OP), 50467754Smsmith/* 61 */ /* AML_LLESSEQUAL_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_HAS_ARGS, "LLessEqual", ARGP_LLESSEQUAL_OP, ARGI_LLESSEQUAL_OP), 50567754Smsmith/* 62 */ /* AML_LGREATEREQUAL_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_HAS_ARGS, "LGreaterEqual", ARGP_LGREATEREQUAL_OP, ARGI_LGREATEREQUAL_OP), 50667754Smsmith/* 63 */ /* AML_NAMEPATH_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS, "NamePath", ARGP_NAMEPATH_OP, ARGI_NAMEPATH_OP), 50767754Smsmith/* 64 */ /* AML_METHODCALL_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_CALL| AML_HAS_ARGS, "MethodCall", ARGP_METHODCALL_OP, ARGI_METHODCALL_OP), 50867754Smsmith/* 65 */ /* AML_BYTELIST_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS, "ByteList", ARGP_BYTELIST_OP, ARGI_BYTELIST_OP), 50967754Smsmith/* 66 */ /* AML_RESERVEDFIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_NO_ARGS, "ReservedField", ARGP_RESERVEDFIELD_OP, ARGI_RESERVEDFIELD_OP), 51067754Smsmith/* 67 */ /* AML_NAMEDFIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_NO_ARGS, "NamedField", ARGP_NAMEDFIELD_OP, ARGI_NAMEDFIELD_OP), 51167754Smsmith/* 68 */ /* AML_ACCESSFIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_NO_ARGS, "AccessField", ARGP_ACCESSFIELD_OP, ARGI_ACCESSFIELD_OP), 51267754Smsmith/* 69 */ /* AML_STATICSTRING_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_NO_ARGS, "StaticString", ARGP_STATICSTRING_OP, ARGI_STATICSTRING_OP), 51367754Smsmith/* 6A */ /* AML_RETURN_VALUE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_RETURN| AML_HAS_ARGS, "[Return Value]", ARG_NONE, ARG_NONE), 51467754Smsmith/* 6B */ /* UNKNOWN OPCODES */ OP_INFO_ENTRY (ACPI_OP_TYPE_UNKNOWN | OPTYPE_BOGUS| AML_HAS_ARGS, "UNKNOWN_OP!", ARG_NONE, ARG_NONE), 51567754Smsmith/* 6C */ /* ASCII CHARACTERS */ OP_INFO_ENTRY (ACPI_OP_TYPE_ASCII | OPTYPE_BOGUS| AML_HAS_ARGS, "ASCII_ONLY!", ARG_NONE, ARG_NONE), 51667754Smsmith/* 6D */ /* PREFIX CHARACTERS */ OP_INFO_ENTRY (ACPI_OP_TYPE_PREFIX | OPTYPE_BOGUS| AML_HAS_ARGS, "PREFIX_ONLY!", ARG_NONE, ARG_NONE), 51767754Smsmith}; 51867754Smsmith 51967754Smsmith/* 52067754Smsmith * This table is directly indexed by the opcodes, and returns an 52167754Smsmith * index into the table above 52267754Smsmith */ 52367754Smsmith 52469450Smsmithstatic UINT8 AmlShortOpInfoIndex[256] = 52567754Smsmith{ 52667754Smsmith/* 0 1 2 3 4 5 6 7 */ 52767754Smsmith/* 0x00 */ 0x00, 0x01, _UNK, _UNK, _UNK, _UNK, 0x02, _UNK, 52867754Smsmith/* 0x08 */ 0x03, _UNK, 0x04, 0x05, 0x06, 0x07, _UNK, _UNK, 52967754Smsmith/* 0x10 */ 0x08, 0x09, 0x0a, _UNK, 0x0b, _UNK, _UNK, _UNK, 53067754Smsmith/* 0x18 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 53167754Smsmith/* 0x20 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 53267754Smsmith/* 0x28 */ _UNK, _UNK, _UNK, _UNK, _UNK, 0x63, _PFX, _PFX, 53367754Smsmith/* 0x30 */ 0x67, 0x66, 0x68, 0x65, 0x69, 0x64, 0x6A, _UNK, 53467754Smsmith/* 0x38 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 53567754Smsmith/* 0x40 */ _UNK, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, 53667754Smsmith/* 0x48 */ _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, 53767754Smsmith/* 0x50 */ _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, 53867754Smsmith/* 0x58 */ _ASC, _ASC, _ASC, _UNK, _PFX, _UNK, _PFX, _ASC, 53967754Smsmith/* 0x60 */ 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 54067754Smsmith/* 0x68 */ 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, _UNK, 54167754Smsmith/* 0x70 */ 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 54267754Smsmith/* 0x78 */ 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 54367754Smsmith/* 0x80 */ 0x2b, 0x2c, 0x2d, 0x2e, _UNK, _UNK, 0x2f, 0x30, 54467754Smsmith/* 0x88 */ 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, _UNK, 54567754Smsmith/* 0x90 */ 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, _UNK, _UNK, 54667754Smsmith/* 0x98 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 54767754Smsmith/* 0xA0 */ 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x60, 0x61, 54867754Smsmith/* 0xA8 */ 0x62, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 54967754Smsmith/* 0xB0 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 55067754Smsmith/* 0xB8 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 55167754Smsmith/* 0xC0 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 55267754Smsmith/* 0xC8 */ _UNK, _UNK, _UNK, _UNK, 0x44, _UNK, _UNK, _UNK, 55367754Smsmith/* 0xD0 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 55467754Smsmith/* 0xD8 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 55567754Smsmith/* 0xE0 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 55667754Smsmith/* 0xE8 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 55767754Smsmith/* 0xF0 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 55867754Smsmith/* 0xF8 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 0x45, 55967754Smsmith}; 56067754Smsmith 56167754Smsmith 56269450Smsmithstatic UINT8 AmlLongOpInfoIndex[NUM_EXTENDED_OPCODE] = 56367754Smsmith{ 56467754Smsmith/* 0 1 2 3 4 5 6 7 */ 56567754Smsmith/* 0x00 */ _UNK, 0x46, 0x47, _UNK, _UNK, _UNK, _UNK, _UNK, 56667754Smsmith/* 0x08 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 56767754Smsmith/* 0x10 */ _UNK, _UNK, 0x48, 0x49, _UNK, _UNK, _UNK, _UNK, 56867754Smsmith/* 0x18 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 56967754Smsmith/* 0x20 */ 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 57067754Smsmith/* 0x28 */ 0x52, 0x53, 0x54, _UNK, _UNK, _UNK, _UNK, _UNK, 57167754Smsmith/* 0x30 */ 0x55, 0x56, 0x57, _UNK, _UNK, _UNK, _UNK, _UNK, 57267754Smsmith/* 0x38 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 57367754Smsmith/* 0x40 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 57467754Smsmith/* 0x48 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 57567754Smsmith/* 0x50 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 57667754Smsmith/* 0x58 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 57767754Smsmith/* 0x60 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 57867754Smsmith/* 0x68 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 57967754Smsmith/* 0x70 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 58067754Smsmith/* 0x78 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 58167754Smsmith/* 0x80 */ 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 58267754Smsmith}; 58367754Smsmith 58467754Smsmith 58567754Smsmith/* 0 1 2 3 4 5 6 7 */ 58667754Smsmith/* 0x00 */ 58767754Smsmith 58867754Smsmith 58969450Smsmith/******************************************************************************* 59069450Smsmith * 59169450Smsmith * FUNCTION: AcpiPsGetOpcodeInfo 59269450Smsmith * 59369450Smsmith * PARAMETERS: Opcode - The AML opcode 59469450Smsmith * 59569450Smsmith * RETURN: A pointer to the info about the opcode. NULL if the opcode was 59669450Smsmith * not found in the table. 59769450Smsmith * 59869450Smsmith * DESCRIPTION: Find AML opcode description based on the opcode. 59969450Smsmith * NOTE: This procedure must ALWAYS return a valid pointer! 60069450Smsmith * 60169450Smsmith ******************************************************************************/ 60269450Smsmith 60369450SmsmithACPI_OPCODE_INFO * 60469450SmsmithAcpiPsGetOpcodeInfo ( 60569450Smsmith UINT16 Opcode) 60669450Smsmith{ 60769450Smsmith ACPI_OPCODE_INFO *OpInfo; 60869450Smsmith UINT8 UpperOpcode; 60969450Smsmith UINT8 LowerOpcode; 61069450Smsmith 61169450Smsmith 61269450Smsmith /* Split the 16-bit opcode into separate bytes */ 61369450Smsmith 61469450Smsmith UpperOpcode = (UINT8) (Opcode >> 8); 61569450Smsmith LowerOpcode = (UINT8) Opcode; 61669450Smsmith 61769450Smsmith /* Default is "unknown opcode" */ 61869450Smsmith 61969450Smsmith OpInfo = &AmlOpInfo [_UNK]; 62069450Smsmith 62169450Smsmith 62269450Smsmith /* 62369450Smsmith * Detect normal 8-bit opcode or extended 16-bit opcode 62469450Smsmith */ 62569450Smsmith 62669450Smsmith switch (UpperOpcode) 62769450Smsmith { 62869450Smsmith case 0: 62969450Smsmith 63069450Smsmith /* Simple (8-bit) opcode: 0-255, can't index beyond table */ 63169450Smsmith 63269450Smsmith OpInfo = &AmlOpInfo [AmlShortOpInfoIndex [LowerOpcode]]; 63369450Smsmith break; 63469450Smsmith 63569450Smsmith 63669450Smsmith case AML_EXTOP: 63769450Smsmith 63869450Smsmith /* Extended (16-bit, prefix+opcode) opcode */ 63969450Smsmith 64069450Smsmith if (LowerOpcode <= MAX_EXTENDED_OPCODE) 64169450Smsmith { 64269450Smsmith OpInfo = &AmlOpInfo [AmlLongOpInfoIndex [LowerOpcode]]; 64369450Smsmith } 64469450Smsmith break; 64569450Smsmith 64669450Smsmith 64769450Smsmith case AML_LNOT_OP: 64869450Smsmith 64969450Smsmith /* This case is for the bogus opcodes LNOTEQUAL, LLESSEQUAL, LGREATEREQUAL */ 65069450Smsmith /* TBD: [Investigate] remove this case? */ 65169450Smsmith 65269450Smsmith DEBUG_PRINT (ACPI_ERROR, ("PsGetOpcodeInfo: Bad multi-byte opcode=%X\n", 65369450Smsmith Opcode)); 65469450Smsmith 65569450Smsmith break; 65669450Smsmith 65769450Smsmith 65869450Smsmith default: 65969450Smsmith 66069450Smsmith DEBUG_PRINT (ACPI_ERROR, ("PsGetOpcodeInfo: Unknown extended opcode=%X\n", 66169450Smsmith Opcode)); 66269450Smsmith 66369450Smsmith break; 66469450Smsmith } 66569450Smsmith 66669450Smsmith 66769450Smsmith /* Get the Op info pointer for this opcode */ 66869450Smsmith 66969450Smsmith return (OpInfo); 67069450Smsmith} 67169450Smsmith 67269450Smsmith 67369450Smsmith/******************************************************************************* 67469450Smsmith * 67569450Smsmith * FUNCTION: AcpiPsGetOpcodeName 67669450Smsmith * 67769450Smsmith * PARAMETERS: Opcode - The AML opcode 67869450Smsmith * 67969450Smsmith * RETURN: A pointer to the name of the opcode (ASCII String) 68069450Smsmith * Note: Never returns NULL. 68169450Smsmith * 68269450Smsmith * DESCRIPTION: Translate an opcode into a human-readable string 68369450Smsmith * 68469450Smsmith ******************************************************************************/ 68569450Smsmith 68669450SmsmithNATIVE_CHAR * 68769450SmsmithAcpiPsGetOpcodeName ( 68869450Smsmith UINT16 Opcode) 68969450Smsmith{ 69069450Smsmith ACPI_OPCODE_INFO *Op; 69169450Smsmith 69269450Smsmith 69369450Smsmith Op = AcpiPsGetOpcodeInfo (Opcode); 69469450Smsmith 69569450Smsmith /* Always guaranteed to return a valid pointer */ 69669450Smsmith 69769450Smsmith#ifdef ACPI_DEBUG 69869450Smsmith return (Op->Name); 69969450Smsmith#else 70069450Smsmith return ("AE_NOT_CONFIGURED"); 70169450Smsmith#endif 70269450Smsmith} 70369450Smsmith 70469450Smsmith 705