psopcode.c revision 82367
167754Smsmith/****************************************************************************** 267754Smsmith * 367754Smsmith * Module Name: psopcode - Parser opcode information table 482367Smsmith * $Revision: 35 $ 567754Smsmith * 667754Smsmith *****************************************************************************/ 767754Smsmith 867754Smsmith/****************************************************************************** 967754Smsmith * 1067754Smsmith * 1. Copyright Notice 1167754Smsmith * 1271867Smsmith * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp. 1370243Smsmith * All rights 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 12377424Smsmith#define _COMPONENT ACPI_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 13871867Smsmith#define MAX_EXTENDED_OPCODE 0x88 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) 17771867Smsmith#define ARGP_QWORD_OP ARGP_LIST1 (ARGP_QWORDDATA) 17867754Smsmith#define ARGP_SCOPE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_TERMLIST) 17967754Smsmith#define ARGP_BUFFER_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_BYTELIST) 18067754Smsmith#define ARGP_PACKAGE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_BYTEDATA, ARGP_DATAOBJLIST) 18171867Smsmith#define ARGP_VAR_PACKAGE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_BYTEDATA, ARGP_DATAOBJLIST) 18267754Smsmith#define ARGP_METHOD_OP ARGP_LIST4 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_TERMLIST) 18367754Smsmith#define ARGP_LOCAL0 ARG_NONE 18467754Smsmith#define ARGP_LOCAL1 ARG_NONE 18567754Smsmith#define ARGP_LOCAL2 ARG_NONE 18667754Smsmith#define ARGP_LOCAL3 ARG_NONE 18767754Smsmith#define ARGP_LOCAL4 ARG_NONE 18867754Smsmith#define ARGP_LOCAL5 ARG_NONE 18967754Smsmith#define ARGP_LOCAL6 ARG_NONE 19067754Smsmith#define ARGP_LOCAL7 ARG_NONE 19167754Smsmith#define ARGP_ARG0 ARG_NONE 19267754Smsmith#define ARGP_ARG1 ARG_NONE 19367754Smsmith#define ARGP_ARG2 ARG_NONE 19467754Smsmith#define ARGP_ARG3 ARG_NONE 19567754Smsmith#define ARGP_ARG4 ARG_NONE 19667754Smsmith#define ARGP_ARG5 ARG_NONE 19767754Smsmith#define ARGP_ARG6 ARG_NONE 19867754Smsmith#define ARGP_STORE_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_SUPERNAME) 19967754Smsmith#define ARGP_REF_OF_OP ARGP_LIST1 (ARGP_SUPERNAME) 20067754Smsmith#define ARGP_ADD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 20167754Smsmith#define ARGP_CONCAT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 20267754Smsmith#define ARGP_SUBTRACT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 20367754Smsmith#define ARGP_INCREMENT_OP ARGP_LIST1 (ARGP_SUPERNAME) 20467754Smsmith#define ARGP_DECREMENT_OP ARGP_LIST1 (ARGP_SUPERNAME) 20567754Smsmith#define ARGP_MULTIPLY_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 20667754Smsmith#define ARGP_DIVIDE_OP ARGP_LIST4 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET, ARGP_TARGET) 20767754Smsmith#define ARGP_SHIFT_LEFT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 20867754Smsmith#define ARGP_SHIFT_RIGHT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 20967754Smsmith#define ARGP_BIT_AND_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 21067754Smsmith#define ARGP_BIT_NAND_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 21167754Smsmith#define ARGP_BIT_OR_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 21267754Smsmith#define ARGP_BIT_NOR_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 21367754Smsmith#define ARGP_BIT_XOR_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 21467754Smsmith#define ARGP_BIT_NOT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) 21567754Smsmith#define ARGP_FIND_SET_LEFT_BIT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) 21667754Smsmith#define ARGP_FIND_SET_RIGHT_BIT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) 21767754Smsmith#define ARGP_DEREF_OF_OP ARGP_LIST1 (ARGP_TERMARG) 21871867Smsmith#define ARGP_CONCAT_RES_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 21971867Smsmith#define ARGP_MOD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 22067754Smsmith#define ARGP_NOTIFY_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_TERMARG) 22167754Smsmith#define ARGP_SIZE_OF_OP ARGP_LIST1 (ARGP_SUPERNAME) 22267754Smsmith#define ARGP_INDEX_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 22367754Smsmith#define ARGP_MATCH_OP ARGP_LIST6 (ARGP_TERMARG, ARGP_BYTEDATA, ARGP_TERMARG, ARGP_BYTEDATA, ARGP_TERMARG, ARGP_TERMARG) 22477424Smsmith#define ARGP_CREATE_DWORD_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME) 22577424Smsmith#define ARGP_CREATE_WORD_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME) 22677424Smsmith#define ARGP_CREATE_BYTE_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME) 22777424Smsmith#define ARGP_CREATE_BIT_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME) 22867754Smsmith#define ARGP_TYPE_OP ARGP_LIST1 (ARGP_SUPERNAME) 22977424Smsmith#define ARGP_CREATE_QWORD_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME) 23067754Smsmith#define ARGP_LAND_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG) 23167754Smsmith#define ARGP_LOR_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG) 23267754Smsmith#define ARGP_LNOT_OP ARGP_LIST1 (ARGP_TERMARG) 23367754Smsmith#define ARGP_LEQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG) 23467754Smsmith#define ARGP_LGREATER_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG) 23567754Smsmith#define ARGP_LLESS_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG) 23671867Smsmith#define ARGP_TO_BUFFER_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) 23771867Smsmith#define ARGP_TO_DEC_STR_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) 23871867Smsmith#define ARGP_TO_HEX_STR_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) 23971867Smsmith#define ARGP_TO_INTEGER_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) 24071867Smsmith#define ARGP_TO_STRING_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 24171867Smsmith#define ARGP_COPY_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_SIMPLENAME) 24271867Smsmith#define ARGP_MID_OP ARGP_LIST4 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) 24371867Smsmith#define ARGP_CONTINUE_OP ARG_NONE 24467754Smsmith#define ARGP_IF_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_TERMLIST) 24567754Smsmith#define ARGP_ELSE_OP ARGP_LIST2 (ARGP_PKGLENGTH, ARGP_TERMLIST) 24667754Smsmith#define ARGP_WHILE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_TERMLIST) 24767754Smsmith#define ARGP_NOOP_OP ARG_NONE 24867754Smsmith#define ARGP_RETURN_OP ARGP_LIST1 (ARGP_TERMARG) 24967754Smsmith#define ARGP_BREAK_OP ARG_NONE 25067754Smsmith#define ARGP_BREAK_POINT_OP ARG_NONE 25167754Smsmith#define ARGP_ONES_OP ARG_NONE 25267754Smsmith#define ARGP_MUTEX_OP ARGP_LIST2 (ARGP_NAME, ARGP_BYTEDATA) 25367754Smsmith#define ARGP_EVENT_OP ARGP_LIST1 (ARGP_NAME) 25467754Smsmith#define ARGP_COND_REF_OF_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_SUPERNAME) 25567754Smsmith#define ARGP_CREATE_FIELD_OP ARGP_LIST4 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME) 25671867Smsmith#define ARGP_LOAD_TABLE_OP ARGP_LIST6 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG) 25767754Smsmith#define ARGP_LOAD_OP ARGP_LIST2 (ARGP_NAMESTRING, ARGP_SUPERNAME) 25867754Smsmith#define ARGP_STALL_OP ARGP_LIST1 (ARGP_TERMARG) 25967754Smsmith#define ARGP_SLEEP_OP ARGP_LIST1 (ARGP_TERMARG) 26067754Smsmith#define ARGP_ACQUIRE_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_WORDDATA) 26167754Smsmith#define ARGP_SIGNAL_OP ARGP_LIST1 (ARGP_SUPERNAME) 26267754Smsmith#define ARGP_WAIT_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_TERMARG) 26367754Smsmith#define ARGP_RESET_OP ARGP_LIST1 (ARGP_SUPERNAME) 26467754Smsmith#define ARGP_RELEASE_OP ARGP_LIST1 (ARGP_SUPERNAME) 26567754Smsmith#define ARGP_FROM_BCD_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) 26667754Smsmith#define ARGP_TO_BCD_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) 26767754Smsmith#define ARGP_UNLOAD_OP ARGP_LIST1 (ARGP_SUPERNAME) 26867754Smsmith#define ARGP_REVISION_OP ARG_NONE 26967754Smsmith#define ARGP_DEBUG_OP ARG_NONE 27067754Smsmith#define ARGP_FATAL_OP ARGP_LIST3 (ARGP_BYTEDATA, ARGP_DWORDDATA, ARGP_TERMARG) 27167754Smsmith#define ARGP_REGION_OP ARGP_LIST4 (ARGP_NAME, ARGP_BYTEDATA, ARGP_TERMARG, ARGP_TERMARG) 27277424Smsmith#define ARGP_FIELD_OP ARGP_LIST4 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_BYTEDATA, ARGP_FIELDLIST) 27367754Smsmith#define ARGP_DEVICE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_OBJLIST) 27467754Smsmith#define ARGP_PROCESSOR_OP ARGP_LIST6 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_DWORDDATA, ARGP_BYTEDATA, ARGP_OBJLIST) 27567754Smsmith#define ARGP_POWER_RES_OP ARGP_LIST5 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_WORDDATA, ARGP_OBJLIST) 27667754Smsmith#define ARGP_THERMAL_ZONE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_OBJLIST) 27767754Smsmith#define ARGP_INDEX_FIELD_OP ARGP_LIST5 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_NAMESTRING,ARGP_BYTEDATA, ARGP_FIELDLIST) 27867754Smsmith#define ARGP_BANK_FIELD_OP ARGP_LIST6 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_NAMESTRING,ARGP_TERMARG, ARGP_BYTEDATA, ARGP_FIELDLIST) 27971867Smsmith#define ARGP_DATA_REGION_OP ARGP_LIST4 (ARGP_NAMESTRING, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG) 28067754Smsmith#define ARGP_LNOTEQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG) 28167754Smsmith#define ARGP_LLESSEQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG) 28267754Smsmith#define ARGP_LGREATEREQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG) 28367754Smsmith#define ARGP_NAMEPATH_OP ARGP_LIST1 (ARGP_NAMESTRING) 28467754Smsmith#define ARGP_METHODCALL_OP ARGP_LIST1 (ARGP_NAMESTRING) 28567754Smsmith#define ARGP_BYTELIST_OP ARGP_LIST1 (ARGP_NAMESTRING) 28667754Smsmith#define ARGP_RESERVEDFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING) 28767754Smsmith#define ARGP_NAMEDFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING) 28867754Smsmith#define ARGP_ACCESSFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING) 28967754Smsmith#define ARGP_STATICSTRING_OP ARGP_LIST1 (ARGP_NAMESTRING) 29067754Smsmith 29167754Smsmith 29267754Smsmith/* 29367754Smsmith * All AML opcodes and the runtime arguments for each. Used by the AML interpreter Each list is compressed 29467754Smsmith * into a 32-bit number and stored in the master opcode table at the end of this file. 29567754Smsmith * 29677424Smsmith * (Used by PrepOperands procedure and the ASL Compiler) 29767754Smsmith */ 29867754Smsmith 29967754Smsmith#define ARGI_ZERO_OP ARG_NONE 30067754Smsmith#define ARGI_ONE_OP ARG_NONE 30167754Smsmith#define ARGI_ALIAS_OP ARGI_INVALID_OPCODE 30267754Smsmith#define ARGI_NAME_OP ARGI_INVALID_OPCODE 30367754Smsmith#define ARGI_BYTE_OP ARGI_INVALID_OPCODE 30467754Smsmith#define ARGI_WORD_OP ARGI_INVALID_OPCODE 30567754Smsmith#define ARGI_DWORD_OP ARGI_INVALID_OPCODE 30667754Smsmith#define ARGI_STRING_OP ARGI_INVALID_OPCODE 30771867Smsmith#define ARGI_QWORD_OP ARGI_INVALID_OPCODE 30867754Smsmith#define ARGI_SCOPE_OP ARGI_INVALID_OPCODE 30967754Smsmith#define ARGI_BUFFER_OP ARGI_INVALID_OPCODE 31067754Smsmith#define ARGI_PACKAGE_OP ARGI_INVALID_OPCODE 31171867Smsmith#define ARGI_VAR_PACKAGE_OP ARGI_INVALID_OPCODE 31267754Smsmith#define ARGI_METHOD_OP ARGI_INVALID_OPCODE 31367754Smsmith#define ARGI_LOCAL0 ARG_NONE 31467754Smsmith#define ARGI_LOCAL1 ARG_NONE 31567754Smsmith#define ARGI_LOCAL2 ARG_NONE 31667754Smsmith#define ARGI_LOCAL3 ARG_NONE 31767754Smsmith#define ARGI_LOCAL4 ARG_NONE 31867754Smsmith#define ARGI_LOCAL5 ARG_NONE 31967754Smsmith#define ARGI_LOCAL6 ARG_NONE 32067754Smsmith#define ARGI_LOCAL7 ARG_NONE 32167754Smsmith#define ARGI_ARG0 ARG_NONE 32267754Smsmith#define ARGI_ARG1 ARG_NONE 32367754Smsmith#define ARGI_ARG2 ARG_NONE 32467754Smsmith#define ARGI_ARG3 ARG_NONE 32567754Smsmith#define ARGI_ARG4 ARG_NONE 32667754Smsmith#define ARGI_ARG5 ARG_NONE 32767754Smsmith#define ARGI_ARG6 ARG_NONE 32867754Smsmith#define ARGI_STORE_OP ARGI_LIST2 (ARGI_ANYTYPE, ARGI_TARGETREF) 32971867Smsmith#define ARGI_REF_OF_OP ARGI_LIST1 (ARGI_OBJECT_REF) 33071867Smsmith#define ARGI_ADD_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) 33171867Smsmith#define ARGI_CONCAT_OP ARGI_LIST3 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA, ARGI_TARGETREF) 33271867Smsmith#define ARGI_SUBTRACT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) 33371867Smsmith#define ARGI_INCREMENT_OP ARGI_LIST1 (ARGI_INTEGER_REF) 33471867Smsmith#define ARGI_DECREMENT_OP ARGI_LIST1 (ARGI_INTEGER_REF) 33571867Smsmith#define ARGI_MULTIPLY_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) 33671867Smsmith#define ARGI_DIVIDE_OP ARGI_LIST4 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF, ARGI_TARGETREF) 33771867Smsmith#define ARGI_SHIFT_LEFT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) 33871867Smsmith#define ARGI_SHIFT_RIGHT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) 33971867Smsmith#define ARGI_BIT_AND_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) 34071867Smsmith#define ARGI_BIT_NAND_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) 34171867Smsmith#define ARGI_BIT_OR_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) 34271867Smsmith#define ARGI_BIT_NOR_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) 34371867Smsmith#define ARGI_BIT_XOR_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) 34471867Smsmith#define ARGI_BIT_NOT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF) 34571867Smsmith#define ARGI_FIND_SET_LEFT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF) 34671867Smsmith#define ARGI_FIND_SET_RIGHT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF) 34767754Smsmith#define ARGI_DEREF_OF_OP ARGI_LIST1 (ARGI_REFERENCE) 34871867Smsmith#define ARGI_CONCAT_RES_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_BUFFER, ARGI_TARGETREF) 34971867Smsmith#define ARGI_MOD_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) 35071867Smsmith#define ARGI_NOTIFY_OP ARGI_LIST2 (ARGI_DEVICE_REF, ARGI_INTEGER) 35167754Smsmith#define ARGI_SIZE_OF_OP ARGI_LIST1 (ARGI_DATAOBJECT) 35271867Smsmith#define ARGI_INDEX_OP ARGI_LIST3 (ARGI_COMPLEXOBJ, ARGI_INTEGER, ARGI_TARGETREF) 35371867Smsmith#define ARGI_MATCH_OP ARGI_LIST6 (ARGI_PACKAGE, ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER) 35477424Smsmith#define ARGI_CREATE_DWORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE) 35577424Smsmith#define ARGI_CREATE_WORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE) 35677424Smsmith#define ARGI_CREATE_BYTE_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE) 35777424Smsmith#define ARGI_CREATE_BIT_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE) 35867754Smsmith#define ARGI_TYPE_OP ARGI_LIST1 (ARGI_ANYTYPE) 35977424Smsmith#define ARGI_CREATE_QWORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE) 36071867Smsmith#define ARGI_LAND_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER) 36171867Smsmith#define ARGI_LOR_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER) 36271867Smsmith#define ARGI_LNOT_OP ARGI_LIST1 (ARGI_INTEGER) 36371867Smsmith#define ARGI_LEQUAL_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER) 36471867Smsmith#define ARGI_LGREATER_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER) 36571867Smsmith#define ARGI_LLESS_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER) 36671867Smsmith#define ARGI_TO_BUFFER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET) 36771867Smsmith#define ARGI_TO_DEC_STR_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET) 36871867Smsmith#define ARGI_TO_HEX_STR_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET) 36971867Smsmith#define ARGI_TO_INTEGER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET) 37071867Smsmith#define ARGI_TO_STRING_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_FIXED_TARGET) 37171867Smsmith#define ARGI_COPY_OP ARGI_LIST2 (ARGI_ANYTYPE, ARGI_SIMPLE_TARGET) 37271867Smsmith#define ARGI_MID_OP ARGI_LIST4 (ARGI_BUFFERSTRING,ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) 37371867Smsmith#define ARGI_CONTINUE_OP ARGI_INVALID_OPCODE 37467754Smsmith#define ARGI_IF_OP ARGI_INVALID_OPCODE 37567754Smsmith#define ARGI_ELSE_OP ARGI_INVALID_OPCODE 37667754Smsmith#define ARGI_WHILE_OP ARGI_INVALID_OPCODE 37767754Smsmith#define ARGI_NOOP_OP ARG_NONE 37867754Smsmith#define ARGI_RETURN_OP ARGI_INVALID_OPCODE 37967754Smsmith#define ARGI_BREAK_OP ARG_NONE 38067754Smsmith#define ARGI_BREAK_POINT_OP ARG_NONE 38167754Smsmith#define ARGI_ONES_OP ARG_NONE 38267754Smsmith#define ARGI_MUTEX_OP ARGI_INVALID_OPCODE 38367754Smsmith#define ARGI_EVENT_OP ARGI_INVALID_OPCODE 38471867Smsmith#define ARGI_COND_REF_OF_OP ARGI_LIST2 (ARGI_OBJECT_REF, ARGI_TARGETREF) 38571867Smsmith#define ARGI_CREATE_FIELD_OP ARGI_LIST4 (ARGI_BUFFER, ARGI_INTEGER, ARGI_INTEGER, ARGI_REFERENCE) 38671867Smsmith#define ARGI_LOAD_TABLE_OP ARGI_LIST6 (ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_TARGETREF) 38767754Smsmith#define ARGI_LOAD_OP ARGI_LIST2 (ARGI_REGION, ARGI_TARGETREF) 38871867Smsmith#define ARGI_STALL_OP ARGI_LIST1 (ARGI_INTEGER) 38971867Smsmith#define ARGI_SLEEP_OP ARGI_LIST1 (ARGI_INTEGER) 39071867Smsmith#define ARGI_ACQUIRE_OP ARGI_LIST2 (ARGI_MUTEX, ARGI_INTEGER) 39167754Smsmith#define ARGI_SIGNAL_OP ARGI_LIST1 (ARGI_EVENT) 39271867Smsmith#define ARGI_WAIT_OP ARGI_LIST2 (ARGI_EVENT, ARGI_INTEGER) 39367754Smsmith#define ARGI_RESET_OP ARGI_LIST1 (ARGI_EVENT) 39467754Smsmith#define ARGI_RELEASE_OP ARGI_LIST1 (ARGI_MUTEX) 39571867Smsmith#define ARGI_FROM_BCD_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF) 39671867Smsmith#define ARGI_TO_BCD_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_FIXED_TARGET) 39767754Smsmith#define ARGI_UNLOAD_OP ARGI_LIST1 (ARGI_DDBHANDLE) 39867754Smsmith#define ARGI_REVISION_OP ARG_NONE 39967754Smsmith#define ARGI_DEBUG_OP ARG_NONE 40071867Smsmith#define ARGI_FATAL_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER) 40171867Smsmith#define ARGI_REGION_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER) 40277424Smsmith#define ARGI_FIELD_OP ARGI_INVALID_OPCODE 40367754Smsmith#define ARGI_DEVICE_OP ARGI_INVALID_OPCODE 40467754Smsmith#define ARGI_PROCESSOR_OP ARGI_INVALID_OPCODE 40567754Smsmith#define ARGI_POWER_RES_OP ARGI_INVALID_OPCODE 40667754Smsmith#define ARGI_THERMAL_ZONE_OP ARGI_INVALID_OPCODE 40767754Smsmith#define ARGI_INDEX_FIELD_OP ARGI_INVALID_OPCODE 40867754Smsmith#define ARGI_BANK_FIELD_OP ARGI_INVALID_OPCODE 40971867Smsmith#define ARGI_DATA_REGION_OP ARGI_LIST3 (ARGI_STRING, ARGI_STRING, ARGI_STRING) 41067754Smsmith#define ARGI_LNOTEQUAL_OP ARGI_INVALID_OPCODE 41167754Smsmith#define ARGI_LLESSEQUAL_OP ARGI_INVALID_OPCODE 41267754Smsmith#define ARGI_LGREATEREQUAL_OP ARGI_INVALID_OPCODE 41367754Smsmith#define ARGI_NAMEPATH_OP ARGI_INVALID_OPCODE 41467754Smsmith#define ARGI_METHODCALL_OP ARGI_INVALID_OPCODE 41567754Smsmith#define ARGI_BYTELIST_OP ARGI_INVALID_OPCODE 41667754Smsmith#define ARGI_RESERVEDFIELD_OP ARGI_INVALID_OPCODE 41767754Smsmith#define ARGI_NAMEDFIELD_OP ARGI_INVALID_OPCODE 41867754Smsmith#define ARGI_ACCESSFIELD_OP ARGI_INVALID_OPCODE 41967754Smsmith#define ARGI_STATICSTRING_OP ARGI_INVALID_OPCODE 42067754Smsmith 42167754Smsmith 42267754Smsmith/* 42367754Smsmith * Master Opcode information table. A summary of everything we know about each opcode, all in one place. 42467754Smsmith */ 42567754Smsmith 42667754Smsmith 42769450Smsmithstatic ACPI_OPCODE_INFO AmlOpInfo[] = 42867754Smsmith{ 42977424Smsmith/* Index Opcode Type Class Has Arguments? Name Parser Args Interpreter Args */ 43067754Smsmith 43177424Smsmith/* 00 */ /* AML_ZERO_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "Zero", ARGP_ZERO_OP, ARGI_ZERO_OP), 43277424Smsmith/* 01 */ /* AML_ONE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "One", ARGP_ONE_OP, ARGI_ONE_OP), 43377424Smsmith/* 02 */ /* AML_ALIAS_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Alias", ARGP_ALIAS_OP, ARGI_ALIAS_OP), 43477424Smsmith/* 03 */ /* AML_NAME_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Name", ARGP_NAME_OP, ARGI_NAME_OP), 43577424Smsmith/* 04 */ /* AML_BYTE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS, "ByteConst", ARGP_BYTE_OP, ARGI_BYTE_OP), 43677424Smsmith/* 05 */ /* AML_WORD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS, "WordConst", ARGP_WORD_OP, ARGI_WORD_OP), 43777424Smsmith/* 06 */ /* AML_DWORD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS, "DwordConst", ARGP_DWORD_OP, ARGI_DWORD_OP), 43877424Smsmith/* 07 */ /* AML_STRING_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS, "String", ARGP_STRING_OP, ARGI_STRING_OP), 43977424Smsmith/* 08 */ /* AML_SCOPE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Scope", ARGP_SCOPE_OP, ARGI_SCOPE_OP), 44077424Smsmith/* 09 */ /* AML_BUFFER_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DATA_TERM| AML_HAS_ARGS, "Buffer", ARGP_BUFFER_OP, ARGI_BUFFER_OP), 44177424Smsmith/* 0A */ /* AML_PACKAGE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DATA_TERM| AML_HAS_ARGS, "Package", ARGP_PACKAGE_OP, ARGI_PACKAGE_OP), 44277424Smsmith/* 0B */ /* AML_METHOD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Method", ARGP_METHOD_OP, ARGI_METHOD_OP), 44377424Smsmith/* 0C */ /* AML_LOCAL0 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS, "Local0", ARGP_LOCAL0, ARGI_LOCAL0), 44477424Smsmith/* 0D */ /* AML_LOCAL1 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS, "Local1", ARGP_LOCAL1, ARGI_LOCAL1), 44577424Smsmith/* 0E */ /* AML_LOCAL2 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS, "Local2", ARGP_LOCAL2, ARGI_LOCAL2), 44677424Smsmith/* 0F */ /* AML_LOCAL3 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS, "Local3", ARGP_LOCAL3, ARGI_LOCAL3), 44777424Smsmith/* 10 */ /* AML_LOCAL4 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS, "Local4", ARGP_LOCAL4, ARGI_LOCAL4), 44877424Smsmith/* 11 */ /* AML_LOCAL5 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS, "Local5", ARGP_LOCAL5, ARGI_LOCAL5), 44977424Smsmith/* 12 */ /* AML_LOCAL6 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS, "Local6", ARGP_LOCAL6, ARGI_LOCAL6), 45077424Smsmith/* 13 */ /* AML_LOCAL7 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS, "Local7", ARGP_LOCAL7, ARGI_LOCAL7), 45177424Smsmith/* 14 */ /* AML_ARG0 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS, "Arg0", ARGP_ARG0, ARGI_ARG0), 45277424Smsmith/* 15 */ /* AML_ARG1 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS, "Arg1", ARGP_ARG1, ARGI_ARG1), 45377424Smsmith/* 16 */ /* AML_ARG2 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS, "Arg2", ARGP_ARG2, ARGI_ARG2), 45477424Smsmith/* 17 */ /* AML_ARG3 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS, "Arg3", ARGP_ARG3, ARGI_ARG3), 45577424Smsmith/* 18 */ /* AML_ARG4 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS, "Arg4", ARGP_ARG4, ARGI_ARG4), 45677424Smsmith/* 19 */ /* AML_ARG5 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS, "Arg5", ARGP_ARG5, ARGI_ARG5), 45777424Smsmith/* 1A */ /* AML_ARG6 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS, "Arg6", ARGP_ARG6, ARGI_ARG6), 45877424Smsmith/* 1B */ /* AML_STORE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "Store", ARGP_STORE_OP, ARGI_STORE_OP), 45977424Smsmith/* 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), 46077424Smsmith/* 1D */ /* AML_ADD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Add", ARGP_ADD_OP, ARGI_ADD_OP), 46177424Smsmith/* 1E */ /* AML_CONCAT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Concatenate", ARGP_CONCAT_OP, ARGI_CONCAT_OP), 46277424Smsmith/* 1F */ /* AML_SUBTRACT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Subtract", ARGP_SUBTRACT_OP, ARGI_SUBTRACT_OP), 46377424Smsmith/* 20 */ /* AML_INCREMENT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS, "Increment", ARGP_INCREMENT_OP, ARGI_INCREMENT_OP), 46477424Smsmith/* 21 */ /* AML_DECREMENT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS, "Decrement", ARGP_DECREMENT_OP, ARGI_DECREMENT_OP), 46577424Smsmith/* 22 */ /* AML_MULTIPLY_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Multiply", ARGP_MULTIPLY_OP, ARGI_MULTIPLY_OP), 46677424Smsmith/* 23 */ /* AML_DIVIDE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Divide", ARGP_DIVIDE_OP, ARGI_DIVIDE_OP), 46777424Smsmith/* 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), 46877424Smsmith/* 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), 46977424Smsmith/* 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), 47077424Smsmith/* 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), 47177424Smsmith/* 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), 47277424Smsmith/* 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), 47377424Smsmith/* 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), 47477424Smsmith/* 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), 47567754Smsmith/* 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), 47677424Smsmith/* 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), 47777424Smsmith/* 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), 47877424Smsmith/* 2F */ /* AML_NOTIFY_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC1| AML_HAS_ARGS, "Notify", ARGP_NOTIFY_OP, ARGI_NOTIFY_OP), 47977424Smsmith/* 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), 48080062Smsmith/* 31 */ /* AML_INDEX_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_TRIADIC| AML_HAS_ARGS, "Index", ARGP_INDEX_OP, ARGI_INDEX_OP), 48180062Smsmith/* 32 */ /* AML_MATCH_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_HEXADIC| AML_HAS_ARGS, "Match", ARGP_MATCH_OP, ARGI_MATCH_OP), 48277424Smsmith/* 33 */ /* AML_CREATE_DWORD_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CREATE_FIELD| AML_HAS_ARGS, "CreateDWordField", ARGP_CREATE_DWORD_FIELD_OP,ARGI_CREATE_DWORD_FIELD_OP), 48377424Smsmith/* 34 */ /* AML_CREATE_WORD_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CREATE_FIELD| AML_HAS_ARGS, "CreateWordField", ARGP_CREATE_WORD_FIELD_OP, ARGI_CREATE_WORD_FIELD_OP), 48477424Smsmith/* 35 */ /* AML_CREATE_BYTE_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CREATE_FIELD| AML_HAS_ARGS, "CreateByteField", ARGP_CREATE_BYTE_FIELD_OP, ARGI_CREATE_BYTE_FIELD_OP), 48577424Smsmith/* 36 */ /* AML_CREATE_BIT_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CREATE_FIELD| AML_HAS_ARGS, "CreateBitField", ARGP_CREATE_BIT_FIELD_OP, ARGI_CREATE_BIT_FIELD_OP), 48677424Smsmith/* 37 */ /* AML_TYPE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS, "ObjectType", ARGP_TYPE_OP, ARGI_TYPE_OP), 48777424Smsmith/* 38 */ /* AML_LAND_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2| AML_HAS_ARGS, "LAnd", ARGP_LAND_OP, ARGI_LAND_OP), 48877424Smsmith/* 39 */ /* AML_LOR_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2| AML_HAS_ARGS, "LOr", ARGP_LOR_OP, ARGI_LOR_OP), 48977424Smsmith/* 3A */ /* AML_LNOT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS, "LNot", ARGP_LNOT_OP, ARGI_LNOT_OP), 49077424Smsmith/* 3B */ /* AML_LEQUAL_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2| AML_HAS_ARGS, "LEqual", ARGP_LEQUAL_OP, ARGI_LEQUAL_OP), 49177424Smsmith/* 3C */ /* AML_LGREATER_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2| AML_HAS_ARGS, "LGreater", ARGP_LGREATER_OP, ARGI_LGREATER_OP), 49277424Smsmith/* 3D */ /* AML_LLESS_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2| AML_HAS_ARGS, "LLess", ARGP_LLESS_OP, ARGI_LLESS_OP), 49377424Smsmith/* 3E */ /* AML_IF_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_HAS_ARGS, "If", ARGP_IF_OP, ARGI_IF_OP), 49477424Smsmith/* 3F */ /* AML_ELSE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_HAS_ARGS, "Else", ARGP_ELSE_OP, ARGI_ELSE_OP), 49577424Smsmith/* 40 */ /* AML_WHILE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_HAS_ARGS, "While", ARGP_WHILE_OP, ARGI_WHILE_OP), 49677424Smsmith/* 41 */ /* AML_NOOP_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_NO_ARGS, "Noop", ARGP_NOOP_OP, ARGI_NOOP_OP), 49777424Smsmith/* 42 */ /* AML_RETURN_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_HAS_ARGS, "Return", ARGP_RETURN_OP, ARGI_RETURN_OP), 49877424Smsmith/* 43 */ /* AML_BREAK_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_NO_ARGS, "Break", ARGP_BREAK_OP, ARGI_BREAK_OP), 49977424Smsmith/* 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), 50077424Smsmith/* 45 */ /* AML_ONES_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "Ones", ARGP_ONES_OP, ARGI_ONES_OP), 50167754Smsmith 50267754Smsmith/* Prefixed opcodes (Two-byte opcodes with a prefix op) */ 50367754Smsmith 50477424Smsmith/* 46 */ /* AML_MUTEX_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Mutex", ARGP_MUTEX_OP, ARGI_MUTEX_OP), 50577424Smsmith/* 47 */ /* AML_EVENT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_NO_ARGS, "Event", ARGP_EVENT_OP, ARGI_EVENT_OP), 50677424Smsmith/* 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), 50777424Smsmith/* 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), 50877424Smsmith/* 4A */ /* AML_LOAD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_RECONFIGURATION| AML_HAS_ARGS, "Load", ARGP_LOAD_OP, ARGI_LOAD_OP), 50977424Smsmith/* 4B */ /* AML_STALL_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC1| AML_HAS_ARGS, "Stall", ARGP_STALL_OP, ARGI_STALL_OP), 51077424Smsmith/* 4C */ /* AML_SLEEP_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC1| AML_HAS_ARGS, "Sleep", ARGP_SLEEP_OP, ARGI_SLEEP_OP), 51177424Smsmith/* 4D */ /* AML_ACQUIRE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2S| AML_HAS_ARGS, "Acquire", ARGP_ACQUIRE_OP, ARGI_ACQUIRE_OP), 51277424Smsmith/* 4E */ /* AML_SIGNAL_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC1| AML_HAS_ARGS, "Signal", ARGP_SIGNAL_OP, ARGI_SIGNAL_OP), 51377424Smsmith/* 4F */ /* AML_WAIT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2S| AML_HAS_ARGS, "Wait", ARGP_WAIT_OP, ARGI_WAIT_OP), 51477424Smsmith/* 50 */ /* AML_RESET_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC1| AML_HAS_ARGS, "Reset", ARGP_RESET_OP, ARGI_RESET_OP), 51577424Smsmith/* 51 */ /* AML_RELEASE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC1| AML_HAS_ARGS, "Release", ARGP_RELEASE_OP, ARGI_RELEASE_OP), 51677424Smsmith/* 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), 51777424Smsmith/* 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), 51877424Smsmith/* 54 */ /* AML_UNLOAD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_RECONFIGURATION| AML_HAS_ARGS, "Unload", ARGP_UNLOAD_OP, ARGI_UNLOAD_OP), 51977424Smsmith/* 55 */ /* AML_REVISION_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "Revision", ARGP_REVISION_OP, ARGI_REVISION_OP), 52077424Smsmith/* 56 */ /* AML_DEBUG_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "Debug", ARGP_DEBUG_OP, ARGI_DEBUG_OP), 52180062Smsmith/* 57 */ /* AML_FATAL_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_TRIADIC| AML_HAS_ARGS, "Fatal", ARGP_FATAL_OP, ARGI_FATAL_OP), 52277424Smsmith/* 58 */ /* AML_REGION_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "OpRegion", ARGP_REGION_OP, ARGI_REGION_OP), 52377424Smsmith/* 59 */ /* AML_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Field", ARGP_FIELD_OP, ARGI_FIELD_OP), 52477424Smsmith/* 5A */ /* AML_DEVICE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Device", ARGP_DEVICE_OP, ARGI_DEVICE_OP), 52577424Smsmith/* 5B */ /* AML_PROCESSOR_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Processor", ARGP_PROCESSOR_OP, ARGI_PROCESSOR_OP), 52677424Smsmith/* 5C */ /* AML_POWER_RES_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "PowerResource", ARGP_POWER_RES_OP, ARGI_POWER_RES_OP), 52777424Smsmith/* 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), 52877424Smsmith/* 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), 52977424Smsmith/* 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), 53067754Smsmith 53167754Smsmith/* Internal opcodes that map to invalid AML opcodes */ 53267754Smsmith 53377424Smsmith/* 60 */ /* AML_LNOTEQUAL_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_HAS_ARGS, "LNotEqual", ARGP_LNOTEQUAL_OP, ARGI_LNOTEQUAL_OP), 53477424Smsmith/* 61 */ /* AML_LLESSEQUAL_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_HAS_ARGS, "LLessEqual", ARGP_LLESSEQUAL_OP, ARGI_LLESSEQUAL_OP), 53577424Smsmith/* 62 */ /* AML_LGREATEREQUAL_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_HAS_ARGS, "LGreaterEqual", ARGP_LGREATEREQUAL_OP, ARGI_LGREATEREQUAL_OP), 53677424Smsmith/* 63 */ /* AML_INT_NAMEPATH_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS, "NamePath", ARGP_NAMEPATH_OP, ARGI_NAMEPATH_OP), 53777424Smsmith/* 64 */ /* AML_INT_METHODCALL_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_CALL| AML_HAS_ARGS, "MethodCall", ARGP_METHODCALL_OP, ARGI_METHODCALL_OP), 53877424Smsmith/* 65 */ /* AML_INT_BYTELIST_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS, "ByteList", ARGP_BYTELIST_OP, ARGI_BYTELIST_OP), 53977424Smsmith/* 66 */ /* AML_INT_RESERVEDFIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_NO_ARGS, "ReservedField", ARGP_RESERVEDFIELD_OP, ARGI_RESERVEDFIELD_OP), 54077424Smsmith/* 67 */ /* AML_INT_NAMEDFIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_NO_ARGS, "NamedField", ARGP_NAMEDFIELD_OP, ARGI_NAMEDFIELD_OP), 54177424Smsmith/* 68 */ /* AML_INT_ACCESSFIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_NO_ARGS, "AccessField", ARGP_ACCESSFIELD_OP, ARGI_ACCESSFIELD_OP), 54277424Smsmith/* 69 */ /* AML_INT_STATICSTRING_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_NO_ARGS, "StaticString", ARGP_STATICSTRING_OP, ARGI_STATICSTRING_OP), 54377424Smsmith/* 6A */ /* AML_INT_RETURN_VALUE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_RETURN| AML_HAS_ARGS, "[Return Value]", ARG_NONE, ARG_NONE), 54477424Smsmith/* 6B */ /* UNKNOWN OPCODES */ OP_INFO_ENTRY (ACPI_OP_TYPE_UNKNOWN | OPTYPE_BOGUS| AML_HAS_ARGS, "UNKNOWN_OP!", ARG_NONE, ARG_NONE), 54577424Smsmith/* 6C */ /* ASCII CHARACTERS */ OP_INFO_ENTRY (ACPI_OP_TYPE_ASCII | OPTYPE_BOGUS| AML_HAS_ARGS, "ASCII_ONLY!", ARG_NONE, ARG_NONE), 54677424Smsmith/* 6D */ /* PREFIX CHARACTERS */ OP_INFO_ENTRY (ACPI_OP_TYPE_PREFIX | OPTYPE_BOGUS| AML_HAS_ARGS, "PREFIX_ONLY!", ARG_NONE, ARG_NONE), 54771867Smsmith 54871867Smsmith 54971867Smsmith/* ACPI 2.0 (new) opcodes */ 55071867Smsmith 55177424Smsmith/* 6E */ /* AML_QWORD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS, "QwordConst", ARGP_QWORD_OP, ARGI_QWORD_OP), 55277424Smsmith/* 6F */ /* AML_VAR_PACKAGE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DATA_TERM| AML_HAS_ARGS, "VarPackage", ARGP_VAR_PACKAGE_OP, ARGI_VAR_PACKAGE_OP), 55377424Smsmith/* 70 */ /* AML_CONCAT_RES_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "ConcatRes", ARGP_CONCAT_RES_OP, ARGI_CONCAT_RES_OP), 55477424Smsmith/* 71 */ /* AML_MOD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Mod", ARGP_MOD_OP, ARGI_MOD_OP), 55577424Smsmith/* 72 */ /* AML_CREATE_QWORD_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CREATE_FIELD| AML_HAS_ARGS, "CreateQWordField", ARGP_CREATE_QWORD_FIELD_OP,ARGI_CREATE_QWORD_FIELD_OP), 55677424Smsmith/* 73 */ /* AML_TO_BUFFER_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "ToBuffer", ARGP_TO_BUFFER_OP, ARGI_TO_BUFFER_OP), 55782367Smsmith/* 74 */ /* AML_TO_DECSTR_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "ToDecimalString", ARGP_TO_DEC_STR_OP, ARGI_TO_DEC_STR_OP), 55880062Smsmith/* 75 */ /* AML_TO_HEXSTR_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "ToHexString", ARGP_TO_HEX_STR_OP, ARGI_TO_HEX_STR_OP), 55977424Smsmith/* 76 */ /* AML_TO_INTEGER_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "ToInteger", ARGP_TO_INTEGER_OP, ARGI_TO_INTEGER_OP), 56080062Smsmith/* 77 */ /* AML_TO_STRING_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "ToString", ARGP_TO_STRING_OP, ARGI_TO_STRING_OP), 56177424Smsmith/* 78 */ /* AML_COPY_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "CopyObject", ARGP_COPY_OP, ARGI_COPY_OP), 56277424Smsmith/* 79 */ /* AML_MID_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "Mid", ARGP_MID_OP, ARGI_MID_OP), 56377424Smsmith/* 7A */ /* AML_CONTINUE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_NO_ARGS, "Continue", ARGP_CONTINUE_OP, ARGI_CONTINUE_OP), 56477424Smsmith/* 7B */ /* AML_LOAD_TABLE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "LoadTable", ARGP_LOAD_TABLE_OP, ARGI_LOAD_TABLE_OP), 56577424Smsmith/* 7C */ /* AML_DATA_REGION_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "DataOpRegion", ARGP_DATA_REGION_OP, ARGI_DATA_REGION_OP), 56671867Smsmith 56767754Smsmith}; 56867754Smsmith 56967754Smsmith/* 57067754Smsmith * This table is directly indexed by the opcodes, and returns an 57167754Smsmith * index into the table above 57267754Smsmith */ 57367754Smsmith 57469450Smsmithstatic UINT8 AmlShortOpInfoIndex[256] = 57567754Smsmith{ 57667754Smsmith/* 0 1 2 3 4 5 6 7 */ 57771867Smsmith/* 8 9 A B C D E F */ 57867754Smsmith/* 0x00 */ 0x00, 0x01, _UNK, _UNK, _UNK, _UNK, 0x02, _UNK, 57971867Smsmith/* 0x08 */ 0x03, _UNK, 0x04, 0x05, 0x06, 0x07, 0x6E, _UNK, 58071867Smsmith/* 0x10 */ 0x08, 0x09, 0x0a, 0x6F, 0x0b, _UNK, _UNK, _UNK, 58167754Smsmith/* 0x18 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 58267754Smsmith/* 0x20 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 58367754Smsmith/* 0x28 */ _UNK, _UNK, _UNK, _UNK, _UNK, 0x63, _PFX, _PFX, 58467754Smsmith/* 0x30 */ 0x67, 0x66, 0x68, 0x65, 0x69, 0x64, 0x6A, _UNK, 58567754Smsmith/* 0x38 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 58667754Smsmith/* 0x40 */ _UNK, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, 58767754Smsmith/* 0x48 */ _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, 58867754Smsmith/* 0x50 */ _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, 58967754Smsmith/* 0x58 */ _ASC, _ASC, _ASC, _UNK, _PFX, _UNK, _PFX, _ASC, 59067754Smsmith/* 0x60 */ 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 59167754Smsmith/* 0x68 */ 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, _UNK, 59267754Smsmith/* 0x70 */ 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 59367754Smsmith/* 0x78 */ 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 59471867Smsmith/* 0x80 */ 0x2b, 0x2c, 0x2d, 0x2e, 0x70, 0x71, 0x2f, 0x30, 59571867Smsmith/* 0x88 */ 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x72, 59671867Smsmith/* 0x90 */ 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x73, 0x74, 59771867Smsmith/* 0x98 */ 0x75, 0x76, _UNK, _UNK, 0x77, 0x78, 0x79, 0x7A, 59867754Smsmith/* 0xA0 */ 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x60, 0x61, 59967754Smsmith/* 0xA8 */ 0x62, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 60067754Smsmith/* 0xB0 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 60167754Smsmith/* 0xB8 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 60267754Smsmith/* 0xC0 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 60367754Smsmith/* 0xC8 */ _UNK, _UNK, _UNK, _UNK, 0x44, _UNK, _UNK, _UNK, 60467754Smsmith/* 0xD0 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 60567754Smsmith/* 0xD8 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 60667754Smsmith/* 0xE0 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 60767754Smsmith/* 0xE8 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 60867754Smsmith/* 0xF0 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 60967754Smsmith/* 0xF8 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 0x45, 61067754Smsmith}; 61167754Smsmith 61267754Smsmith 61369450Smsmithstatic UINT8 AmlLongOpInfoIndex[NUM_EXTENDED_OPCODE] = 61467754Smsmith{ 61567754Smsmith/* 0 1 2 3 4 5 6 7 */ 61671867Smsmith/* 8 9 A B C D E F */ 61767754Smsmith/* 0x00 */ _UNK, 0x46, 0x47, _UNK, _UNK, _UNK, _UNK, _UNK, 61867754Smsmith/* 0x08 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 61967754Smsmith/* 0x10 */ _UNK, _UNK, 0x48, 0x49, _UNK, _UNK, _UNK, _UNK, 62071867Smsmith/* 0x18 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 0x7B, 62167754Smsmith/* 0x20 */ 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 62267754Smsmith/* 0x28 */ 0x52, 0x53, 0x54, _UNK, _UNK, _UNK, _UNK, _UNK, 62367754Smsmith/* 0x30 */ 0x55, 0x56, 0x57, _UNK, _UNK, _UNK, _UNK, _UNK, 62467754Smsmith/* 0x38 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 62567754Smsmith/* 0x40 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 62667754Smsmith/* 0x48 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 62767754Smsmith/* 0x50 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 62867754Smsmith/* 0x58 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 62967754Smsmith/* 0x60 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 63067754Smsmith/* 0x68 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 63167754Smsmith/* 0x70 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 63267754Smsmith/* 0x78 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 63367754Smsmith/* 0x80 */ 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 63471867Smsmith/* 0x88 */ 0x7C, 63567754Smsmith}; 63667754Smsmith 63767754Smsmith 63869450Smsmith/******************************************************************************* 63969450Smsmith * 64069450Smsmith * FUNCTION: AcpiPsGetOpcodeInfo 64169450Smsmith * 64269450Smsmith * PARAMETERS: Opcode - The AML opcode 64369450Smsmith * 64469450Smsmith * RETURN: A pointer to the info about the opcode. NULL if the opcode was 64569450Smsmith * not found in the table. 64669450Smsmith * 64769450Smsmith * DESCRIPTION: Find AML opcode description based on the opcode. 64869450Smsmith * NOTE: This procedure must ALWAYS return a valid pointer! 64969450Smsmith * 65069450Smsmith ******************************************************************************/ 65169450Smsmith 65269450SmsmithACPI_OPCODE_INFO * 65369450SmsmithAcpiPsGetOpcodeInfo ( 65469450Smsmith UINT16 Opcode) 65569450Smsmith{ 65669450Smsmith ACPI_OPCODE_INFO *OpInfo; 65769450Smsmith UINT8 UpperOpcode; 65869450Smsmith UINT8 LowerOpcode; 65969450Smsmith 66069450Smsmith 66177424Smsmith PROC_NAME ("PsGetOpcodeInfo"); 66277424Smsmith 66377424Smsmith 66469450Smsmith /* Split the 16-bit opcode into separate bytes */ 66569450Smsmith 66669450Smsmith UpperOpcode = (UINT8) (Opcode >> 8); 66769450Smsmith LowerOpcode = (UINT8) Opcode; 66869450Smsmith 66969450Smsmith /* Default is "unknown opcode" */ 67069450Smsmith 67169450Smsmith OpInfo = &AmlOpInfo [_UNK]; 67269450Smsmith 67369450Smsmith 67469450Smsmith /* 67569450Smsmith * Detect normal 8-bit opcode or extended 16-bit opcode 67669450Smsmith */ 67769450Smsmith 67869450Smsmith switch (UpperOpcode) 67969450Smsmith { 68069450Smsmith case 0: 68169450Smsmith 68269450Smsmith /* Simple (8-bit) opcode: 0-255, can't index beyond table */ 68369450Smsmith 68469450Smsmith OpInfo = &AmlOpInfo [AmlShortOpInfoIndex [LowerOpcode]]; 68569450Smsmith break; 68669450Smsmith 68769450Smsmith 68869450Smsmith case AML_EXTOP: 68969450Smsmith 69069450Smsmith /* Extended (16-bit, prefix+opcode) opcode */ 69169450Smsmith 69269450Smsmith if (LowerOpcode <= MAX_EXTENDED_OPCODE) 69369450Smsmith { 69469450Smsmith OpInfo = &AmlOpInfo [AmlLongOpInfoIndex [LowerOpcode]]; 69569450Smsmith } 69669450Smsmith break; 69769450Smsmith 69869450Smsmith 69969450Smsmith case AML_LNOT_OP: 70069450Smsmith 70169450Smsmith /* This case is for the bogus opcodes LNOTEQUAL, LLESSEQUAL, LGREATEREQUAL */ 70269450Smsmith /* TBD: [Investigate] remove this case? */ 70369450Smsmith 70482367Smsmith ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Bad multi-byte opcode=%X\n", Opcode)); 70569450Smsmith break; 70669450Smsmith 70769450Smsmith 70869450Smsmith default: 70969450Smsmith 71082367Smsmith ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unknown extended opcode=%X\n", Opcode)); 71169450Smsmith break; 71269450Smsmith } 71369450Smsmith 71469450Smsmith 71569450Smsmith /* Get the Op info pointer for this opcode */ 71669450Smsmith 71769450Smsmith return (OpInfo); 71869450Smsmith} 71969450Smsmith 72069450Smsmith 72169450Smsmith/******************************************************************************* 72269450Smsmith * 72369450Smsmith * FUNCTION: AcpiPsGetOpcodeName 72469450Smsmith * 72569450Smsmith * PARAMETERS: Opcode - The AML opcode 72669450Smsmith * 72769450Smsmith * RETURN: A pointer to the name of the opcode (ASCII String) 72869450Smsmith * Note: Never returns NULL. 72969450Smsmith * 73069450Smsmith * DESCRIPTION: Translate an opcode into a human-readable string 73169450Smsmith * 73269450Smsmith ******************************************************************************/ 73369450Smsmith 73469450SmsmithNATIVE_CHAR * 73569450SmsmithAcpiPsGetOpcodeName ( 73669450Smsmith UINT16 Opcode) 73769450Smsmith{ 73869450Smsmith ACPI_OPCODE_INFO *Op; 73969450Smsmith 74069450Smsmith 74169450Smsmith Op = AcpiPsGetOpcodeInfo (Opcode); 74269450Smsmith 74369450Smsmith /* Always guaranteed to return a valid pointer */ 74469450Smsmith 74569450Smsmith#ifdef ACPI_DEBUG 74669450Smsmith return (Op->Name); 74769450Smsmith#else 74869450Smsmith return ("AE_NOT_CONFIGURED"); 74969450Smsmith#endif 75069450Smsmith} 75169450Smsmith 75269450Smsmith 753