1*0Sstevel@tonic-gate /******************************************************************************
2*0Sstevel@tonic-gate  *
3*0Sstevel@tonic-gate  * Name: amlcode.h - Definitions for AML, as included in "definition blocks"
4*0Sstevel@tonic-gate  *                   Declarations and definitions contained herein are derived
5*0Sstevel@tonic-gate  *                   directly from the ACPI specification.
6*0Sstevel@tonic-gate  *       $Revision: 81 $
7*0Sstevel@tonic-gate  *
8*0Sstevel@tonic-gate  *****************************************************************************/
9*0Sstevel@tonic-gate 
10*0Sstevel@tonic-gate /******************************************************************************
11*0Sstevel@tonic-gate  *
12*0Sstevel@tonic-gate  * 1. Copyright Notice
13*0Sstevel@tonic-gate  *
14*0Sstevel@tonic-gate  * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp.
15*0Sstevel@tonic-gate  * All rights reserved.
16*0Sstevel@tonic-gate  *
17*0Sstevel@tonic-gate  * 2. License
18*0Sstevel@tonic-gate  *
19*0Sstevel@tonic-gate  * 2.1. This is your license from Intel Corp. under its intellectual property
20*0Sstevel@tonic-gate  * rights.  You may have additional license terms from the party that provided
21*0Sstevel@tonic-gate  * you this software, covering your right to use that party's intellectual
22*0Sstevel@tonic-gate  * property rights.
23*0Sstevel@tonic-gate  *
24*0Sstevel@tonic-gate  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
25*0Sstevel@tonic-gate  * copy of the source code appearing in this file ("Covered Code") an
26*0Sstevel@tonic-gate  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
27*0Sstevel@tonic-gate  * base code distributed originally by Intel ("Original Intel Code") to copy,
28*0Sstevel@tonic-gate  * make derivatives, distribute, use and display any portion of the Covered
29*0Sstevel@tonic-gate  * Code in any form, with the right to sublicense such rights; and
30*0Sstevel@tonic-gate  *
31*0Sstevel@tonic-gate  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
32*0Sstevel@tonic-gate  * license (with the right to sublicense), under only those claims of Intel
33*0Sstevel@tonic-gate  * patents that are infringed by the Original Intel Code, to make, use, sell,
34*0Sstevel@tonic-gate  * offer to sell, and import the Covered Code and derivative works thereof
35*0Sstevel@tonic-gate  * solely to the minimum extent necessary to exercise the above copyright
36*0Sstevel@tonic-gate  * license, and in no event shall the patent license extend to any additions
37*0Sstevel@tonic-gate  * to or modifications of the Original Intel Code.  No other license or right
38*0Sstevel@tonic-gate  * is granted directly or by implication, estoppel or otherwise;
39*0Sstevel@tonic-gate  *
40*0Sstevel@tonic-gate  * The above copyright and patent license is granted only if the following
41*0Sstevel@tonic-gate  * conditions are met:
42*0Sstevel@tonic-gate  *
43*0Sstevel@tonic-gate  * 3. Conditions
44*0Sstevel@tonic-gate  *
45*0Sstevel@tonic-gate  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
46*0Sstevel@tonic-gate  * Redistribution of source code of any substantial portion of the Covered
47*0Sstevel@tonic-gate  * Code or modification with rights to further distribute source must include
48*0Sstevel@tonic-gate  * the above Copyright Notice, the above License, this list of Conditions,
49*0Sstevel@tonic-gate  * and the following Disclaimer and Export Compliance provision.  In addition,
50*0Sstevel@tonic-gate  * Licensee must cause all Covered Code to which Licensee contributes to
51*0Sstevel@tonic-gate  * contain a file documenting the changes Licensee made to create that Covered
52*0Sstevel@tonic-gate  * Code and the date of any change.  Licensee must include in that file the
53*0Sstevel@tonic-gate  * documentation of any changes made by any predecessor Licensee.  Licensee
54*0Sstevel@tonic-gate  * must include a prominent statement that the modification is derived,
55*0Sstevel@tonic-gate  * directly or indirectly, from Original Intel Code.
56*0Sstevel@tonic-gate  *
57*0Sstevel@tonic-gate  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
58*0Sstevel@tonic-gate  * Redistribution of source code of any substantial portion of the Covered
59*0Sstevel@tonic-gate  * Code or modification without rights to further distribute source must
60*0Sstevel@tonic-gate  * include the following Disclaimer and Export Compliance provision in the
61*0Sstevel@tonic-gate  * documentation and/or other materials provided with distribution.  In
62*0Sstevel@tonic-gate  * addition, Licensee may not authorize further sublicense of source of any
63*0Sstevel@tonic-gate  * portion of the Covered Code, and must include terms to the effect that the
64*0Sstevel@tonic-gate  * license from Licensee to its licensee is limited to the intellectual
65*0Sstevel@tonic-gate  * property embodied in the software Licensee provides to its licensee, and
66*0Sstevel@tonic-gate  * not to intellectual property embodied in modifications its licensee may
67*0Sstevel@tonic-gate  * make.
68*0Sstevel@tonic-gate  *
69*0Sstevel@tonic-gate  * 3.3. Redistribution of Executable. Redistribution in executable form of any
70*0Sstevel@tonic-gate  * substantial portion of the Covered Code or modification must reproduce the
71*0Sstevel@tonic-gate  * above Copyright Notice, and the following Disclaimer and Export Compliance
72*0Sstevel@tonic-gate  * provision in the documentation and/or other materials provided with the
73*0Sstevel@tonic-gate  * distribution.
74*0Sstevel@tonic-gate  *
75*0Sstevel@tonic-gate  * 3.4. Intel retains all right, title, and interest in and to the Original
76*0Sstevel@tonic-gate  * Intel Code.
77*0Sstevel@tonic-gate  *
78*0Sstevel@tonic-gate  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
79*0Sstevel@tonic-gate  * Intel shall be used in advertising or otherwise to promote the sale, use or
80*0Sstevel@tonic-gate  * other dealings in products derived from or relating to the Covered Code
81*0Sstevel@tonic-gate  * without prior written authorization from Intel.
82*0Sstevel@tonic-gate  *
83*0Sstevel@tonic-gate  * 4. Disclaimer and Export Compliance
84*0Sstevel@tonic-gate  *
85*0Sstevel@tonic-gate  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
86*0Sstevel@tonic-gate  * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
87*0Sstevel@tonic-gate  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
88*0Sstevel@tonic-gate  * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
89*0Sstevel@tonic-gate  * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
90*0Sstevel@tonic-gate  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
91*0Sstevel@tonic-gate  * PARTICULAR PURPOSE.
92*0Sstevel@tonic-gate  *
93*0Sstevel@tonic-gate  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
94*0Sstevel@tonic-gate  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
95*0Sstevel@tonic-gate  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
96*0Sstevel@tonic-gate  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
97*0Sstevel@tonic-gate  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
98*0Sstevel@tonic-gate  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
99*0Sstevel@tonic-gate  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
100*0Sstevel@tonic-gate  * LIMITED REMEDY.
101*0Sstevel@tonic-gate  *
102*0Sstevel@tonic-gate  * 4.3. Licensee shall not export, either directly or indirectly, any of this
103*0Sstevel@tonic-gate  * software or system incorporating such software without first obtaining any
104*0Sstevel@tonic-gate  * required license or other approval from the U. S. Department of Commerce or
105*0Sstevel@tonic-gate  * any other agency or department of the United States Government.  In the
106*0Sstevel@tonic-gate  * event Licensee exports any such software from the United States or
107*0Sstevel@tonic-gate  * re-exports any such software from a foreign destination, Licensee shall
108*0Sstevel@tonic-gate  * ensure that the distribution and export/re-export of the software is in
109*0Sstevel@tonic-gate  * compliance with all laws, regulations, orders, or other restrictions of the
110*0Sstevel@tonic-gate  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
111*0Sstevel@tonic-gate  * any of its subsidiaries will export/re-export any technical data, process,
112*0Sstevel@tonic-gate  * software, or service, directly or indirectly, to any country for which the
113*0Sstevel@tonic-gate  * United States government or any agency thereof requires an export license,
114*0Sstevel@tonic-gate  * other governmental approval, or letter of assurance, without first obtaining
115*0Sstevel@tonic-gate  * such license, approval or letter.
116*0Sstevel@tonic-gate  *
117*0Sstevel@tonic-gate  *****************************************************************************/
118*0Sstevel@tonic-gate 
119*0Sstevel@tonic-gate #ifndef __AMLCODE_H__
120*0Sstevel@tonic-gate #define __AMLCODE_H__
121*0Sstevel@tonic-gate 
122*0Sstevel@tonic-gate /* primary opcodes */
123*0Sstevel@tonic-gate 
124*0Sstevel@tonic-gate #define AML_NULL_CHAR               (UINT16) 0x00
125*0Sstevel@tonic-gate 
126*0Sstevel@tonic-gate #define AML_ZERO_OP                 (UINT16) 0x00
127*0Sstevel@tonic-gate #define AML_ONE_OP                  (UINT16) 0x01
128*0Sstevel@tonic-gate #define AML_UNASSIGNED              (UINT16) 0x02
129*0Sstevel@tonic-gate #define AML_ALIAS_OP                (UINT16) 0x06
130*0Sstevel@tonic-gate #define AML_NAME_OP                 (UINT16) 0x08
131*0Sstevel@tonic-gate #define AML_BYTE_OP                 (UINT16) 0x0a
132*0Sstevel@tonic-gate #define AML_WORD_OP                 (UINT16) 0x0b
133*0Sstevel@tonic-gate #define AML_DWORD_OP                (UINT16) 0x0c
134*0Sstevel@tonic-gate #define AML_STRING_OP               (UINT16) 0x0d
135*0Sstevel@tonic-gate #define AML_QWORD_OP                (UINT16) 0x0e     /* ACPI 2.0 */
136*0Sstevel@tonic-gate #define AML_SCOPE_OP                (UINT16) 0x10
137*0Sstevel@tonic-gate #define AML_BUFFER_OP               (UINT16) 0x11
138*0Sstevel@tonic-gate #define AML_PACKAGE_OP              (UINT16) 0x12
139*0Sstevel@tonic-gate #define AML_VAR_PACKAGE_OP          (UINT16) 0x13     /* ACPI 2.0 */
140*0Sstevel@tonic-gate #define AML_METHOD_OP               (UINT16) 0x14
141*0Sstevel@tonic-gate #define AML_DUAL_NAME_PREFIX        (UINT16) 0x2e
142*0Sstevel@tonic-gate #define AML_MULTI_NAME_PREFIX_OP    (UINT16) 0x2f
143*0Sstevel@tonic-gate #define AML_NAME_CHAR_SUBSEQ        (UINT16) 0x30
144*0Sstevel@tonic-gate #define AML_NAME_CHAR_FIRST         (UINT16) 0x41
145*0Sstevel@tonic-gate #define AML_OP_PREFIX               (UINT16) 0x5b
146*0Sstevel@tonic-gate #define AML_ROOT_PREFIX             (UINT16) 0x5c
147*0Sstevel@tonic-gate #define AML_PARENT_PREFIX           (UINT16) 0x5e
148*0Sstevel@tonic-gate #define AML_LOCAL_OP                (UINT16) 0x60
149*0Sstevel@tonic-gate #define AML_LOCAL0                  (UINT16) 0x60
150*0Sstevel@tonic-gate #define AML_LOCAL1                  (UINT16) 0x61
151*0Sstevel@tonic-gate #define AML_LOCAL2                  (UINT16) 0x62
152*0Sstevel@tonic-gate #define AML_LOCAL3                  (UINT16) 0x63
153*0Sstevel@tonic-gate #define AML_LOCAL4                  (UINT16) 0x64
154*0Sstevel@tonic-gate #define AML_LOCAL5                  (UINT16) 0x65
155*0Sstevel@tonic-gate #define AML_LOCAL6                  (UINT16) 0x66
156*0Sstevel@tonic-gate #define AML_LOCAL7                  (UINT16) 0x67
157*0Sstevel@tonic-gate #define AML_ARG_OP                  (UINT16) 0x68
158*0Sstevel@tonic-gate #define AML_ARG0                    (UINT16) 0x68
159*0Sstevel@tonic-gate #define AML_ARG1                    (UINT16) 0x69
160*0Sstevel@tonic-gate #define AML_ARG2                    (UINT16) 0x6a
161*0Sstevel@tonic-gate #define AML_ARG3                    (UINT16) 0x6b
162*0Sstevel@tonic-gate #define AML_ARG4                    (UINT16) 0x6c
163*0Sstevel@tonic-gate #define AML_ARG5                    (UINT16) 0x6d
164*0Sstevel@tonic-gate #define AML_ARG6                    (UINT16) 0x6e
165*0Sstevel@tonic-gate #define AML_STORE_OP                (UINT16) 0x70
166*0Sstevel@tonic-gate #define AML_REF_OF_OP               (UINT16) 0x71
167*0Sstevel@tonic-gate #define AML_ADD_OP                  (UINT16) 0x72
168*0Sstevel@tonic-gate #define AML_CONCAT_OP               (UINT16) 0x73
169*0Sstevel@tonic-gate #define AML_SUBTRACT_OP             (UINT16) 0x74
170*0Sstevel@tonic-gate #define AML_INCREMENT_OP            (UINT16) 0x75
171*0Sstevel@tonic-gate #define AML_DECREMENT_OP            (UINT16) 0x76
172*0Sstevel@tonic-gate #define AML_MULTIPLY_OP             (UINT16) 0x77
173*0Sstevel@tonic-gate #define AML_DIVIDE_OP               (UINT16) 0x78
174*0Sstevel@tonic-gate #define AML_SHIFT_LEFT_OP           (UINT16) 0x79
175*0Sstevel@tonic-gate #define AML_SHIFT_RIGHT_OP          (UINT16) 0x7a
176*0Sstevel@tonic-gate #define AML_BIT_AND_OP              (UINT16) 0x7b
177*0Sstevel@tonic-gate #define AML_BIT_NAND_OP             (UINT16) 0x7c
178*0Sstevel@tonic-gate #define AML_BIT_OR_OP               (UINT16) 0x7d
179*0Sstevel@tonic-gate #define AML_BIT_NOR_OP              (UINT16) 0x7e
180*0Sstevel@tonic-gate #define AML_BIT_XOR_OP              (UINT16) 0x7f
181*0Sstevel@tonic-gate #define AML_BIT_NOT_OP              (UINT16) 0x80
182*0Sstevel@tonic-gate #define AML_FIND_SET_LEFT_BIT_OP    (UINT16) 0x81
183*0Sstevel@tonic-gate #define AML_FIND_SET_RIGHT_BIT_OP   (UINT16) 0x82
184*0Sstevel@tonic-gate #define AML_DEREF_OF_OP             (UINT16) 0x83
185*0Sstevel@tonic-gate #define AML_CONCAT_RES_OP           (UINT16) 0x84     /* ACPI 2.0 */
186*0Sstevel@tonic-gate #define AML_MOD_OP                  (UINT16) 0x85     /* ACPI 2.0 */
187*0Sstevel@tonic-gate #define AML_NOTIFY_OP               (UINT16) 0x86
188*0Sstevel@tonic-gate #define AML_SIZE_OF_OP              (UINT16) 0x87
189*0Sstevel@tonic-gate #define AML_INDEX_OP                (UINT16) 0x88
190*0Sstevel@tonic-gate #define AML_MATCH_OP                (UINT16) 0x89
191*0Sstevel@tonic-gate #define AML_CREATE_DWORD_FIELD_OP   (UINT16) 0x8a
192*0Sstevel@tonic-gate #define AML_CREATE_WORD_FIELD_OP    (UINT16) 0x8b
193*0Sstevel@tonic-gate #define AML_CREATE_BYTE_FIELD_OP    (UINT16) 0x8c
194*0Sstevel@tonic-gate #define AML_CREATE_BIT_FIELD_OP     (UINT16) 0x8d
195*0Sstevel@tonic-gate #define AML_TYPE_OP                 (UINT16) 0x8e
196*0Sstevel@tonic-gate #define AML_CREATE_QWORD_FIELD_OP   (UINT16) 0x8f     /* ACPI 2.0 */
197*0Sstevel@tonic-gate #define AML_LAND_OP                 (UINT16) 0x90
198*0Sstevel@tonic-gate #define AML_LOR_OP                  (UINT16) 0x91
199*0Sstevel@tonic-gate #define AML_LNOT_OP                 (UINT16) 0x92
200*0Sstevel@tonic-gate #define AML_LEQUAL_OP               (UINT16) 0x93
201*0Sstevel@tonic-gate #define AML_LGREATER_OP             (UINT16) 0x94
202*0Sstevel@tonic-gate #define AML_LLESS_OP                (UINT16) 0x95
203*0Sstevel@tonic-gate #define AML_TO_BUFFER_OP            (UINT16) 0x96     /* ACPI 2.0 */
204*0Sstevel@tonic-gate #define AML_TO_DECSTRING_OP         (UINT16) 0x97     /* ACPI 2.0 */
205*0Sstevel@tonic-gate #define AML_TO_HEXSTRING_OP         (UINT16) 0x98     /* ACPI 2.0 */
206*0Sstevel@tonic-gate #define AML_TO_INTEGER_OP           (UINT16) 0x99     /* ACPI 2.0 */
207*0Sstevel@tonic-gate #define AML_TO_STRING_OP            (UINT16) 0x9c     /* ACPI 2.0 */
208*0Sstevel@tonic-gate #define AML_COPY_OP                 (UINT16) 0x9d     /* ACPI 2.0 */
209*0Sstevel@tonic-gate #define AML_MID_OP                  (UINT16) 0x9e     /* ACPI 2.0 */
210*0Sstevel@tonic-gate #define AML_CONTINUE_OP             (UINT16) 0x9f     /* ACPI 2.0 */
211*0Sstevel@tonic-gate #define AML_IF_OP                   (UINT16) 0xa0
212*0Sstevel@tonic-gate #define AML_ELSE_OP                 (UINT16) 0xa1
213*0Sstevel@tonic-gate #define AML_WHILE_OP                (UINT16) 0xa2
214*0Sstevel@tonic-gate #define AML_NOOP_OP                 (UINT16) 0xa3
215*0Sstevel@tonic-gate #define AML_RETURN_OP               (UINT16) 0xa4
216*0Sstevel@tonic-gate #define AML_BREAK_OP                (UINT16) 0xa5
217*0Sstevel@tonic-gate #define AML_BREAK_POINT_OP          (UINT16) 0xcc
218*0Sstevel@tonic-gate #define AML_ONES_OP                 (UINT16) 0xff
219*0Sstevel@tonic-gate 
220*0Sstevel@tonic-gate /* prefixed opcodes */
221*0Sstevel@tonic-gate 
222*0Sstevel@tonic-gate #define AML_EXTOP                   (UINT16) 0x005b     /* prefix for 2-byte opcodes */
223*0Sstevel@tonic-gate 
224*0Sstevel@tonic-gate #define AML_MUTEX_OP                (UINT16) 0x5b01
225*0Sstevel@tonic-gate #define AML_EVENT_OP                (UINT16) 0x5b02
226*0Sstevel@tonic-gate #define AML_SHIFT_RIGHT_BIT_OP      (UINT16) 0x5b10
227*0Sstevel@tonic-gate #define AML_SHIFT_LEFT_BIT_OP       (UINT16) 0x5b11
228*0Sstevel@tonic-gate #define AML_COND_REF_OF_OP          (UINT16) 0x5b12
229*0Sstevel@tonic-gate #define AML_CREATE_FIELD_OP         (UINT16) 0x5b13
230*0Sstevel@tonic-gate #define AML_LOAD_TABLE_OP           (UINT16) 0x5b1f     /* ACPI 2.0 */
231*0Sstevel@tonic-gate #define AML_LOAD_OP                 (UINT16) 0x5b20
232*0Sstevel@tonic-gate #define AML_STALL_OP                (UINT16) 0x5b21
233*0Sstevel@tonic-gate #define AML_SLEEP_OP                (UINT16) 0x5b22
234*0Sstevel@tonic-gate #define AML_ACQUIRE_OP              (UINT16) 0x5b23
235*0Sstevel@tonic-gate #define AML_SIGNAL_OP               (UINT16) 0x5b24
236*0Sstevel@tonic-gate #define AML_WAIT_OP                 (UINT16) 0x5b25
237*0Sstevel@tonic-gate #define AML_RESET_OP                (UINT16) 0x5b26
238*0Sstevel@tonic-gate #define AML_RELEASE_OP              (UINT16) 0x5b27
239*0Sstevel@tonic-gate #define AML_FROM_BCD_OP             (UINT16) 0x5b28
240*0Sstevel@tonic-gate #define AML_TO_BCD_OP               (UINT16) 0x5b29
241*0Sstevel@tonic-gate #define AML_UNLOAD_OP               (UINT16) 0x5b2a
242*0Sstevel@tonic-gate #define AML_REVISION_OP             (UINT16) 0x5b30
243*0Sstevel@tonic-gate #define AML_DEBUG_OP                (UINT16) 0x5b31
244*0Sstevel@tonic-gate #define AML_FATAL_OP                (UINT16) 0x5b32
245*0Sstevel@tonic-gate #define AML_TIMER_OP                (UINT16) 0x5b33     /* ACPI 3.0 */
246*0Sstevel@tonic-gate #define AML_REGION_OP               (UINT16) 0x5b80
247*0Sstevel@tonic-gate #define AML_FIELD_OP                (UINT16) 0x5b81
248*0Sstevel@tonic-gate #define AML_DEVICE_OP               (UINT16) 0x5b82
249*0Sstevel@tonic-gate #define AML_PROCESSOR_OP            (UINT16) 0x5b83
250*0Sstevel@tonic-gate #define AML_POWER_RES_OP            (UINT16) 0x5b84
251*0Sstevel@tonic-gate #define AML_THERMAL_ZONE_OP         (UINT16) 0x5b85
252*0Sstevel@tonic-gate #define AML_INDEX_FIELD_OP          (UINT16) 0x5b86
253*0Sstevel@tonic-gate #define AML_BANK_FIELD_OP           (UINT16) 0x5b87
254*0Sstevel@tonic-gate #define AML_DATA_REGION_OP          (UINT16) 0x5b88     /* ACPI 2.0 */
255*0Sstevel@tonic-gate 
256*0Sstevel@tonic-gate 
257*0Sstevel@tonic-gate /* Bogus opcodes (they are actually two separate opcodes) */
258*0Sstevel@tonic-gate 
259*0Sstevel@tonic-gate #define AML_LGREATEREQUAL_OP        (UINT16) 0x9295
260*0Sstevel@tonic-gate #define AML_LLESSEQUAL_OP           (UINT16) 0x9294
261*0Sstevel@tonic-gate #define AML_LNOTEQUAL_OP            (UINT16) 0x9293
262*0Sstevel@tonic-gate 
263*0Sstevel@tonic-gate 
264*0Sstevel@tonic-gate /*
265*0Sstevel@tonic-gate  * Internal opcodes
266*0Sstevel@tonic-gate  * Use only "Unknown" AML opcodes, don't attempt to use
267*0Sstevel@tonic-gate  * any valid ACPI ASCII values (A-Z, 0-9, '-')
268*0Sstevel@tonic-gate  */
269*0Sstevel@tonic-gate #define AML_INT_NAMEPATH_OP         (UINT16) 0x002d
270*0Sstevel@tonic-gate #define AML_INT_NAMEDFIELD_OP       (UINT16) 0x0030
271*0Sstevel@tonic-gate #define AML_INT_RESERVEDFIELD_OP    (UINT16) 0x0031
272*0Sstevel@tonic-gate #define AML_INT_ACCESSFIELD_OP      (UINT16) 0x0032
273*0Sstevel@tonic-gate #define AML_INT_BYTELIST_OP         (UINT16) 0x0033
274*0Sstevel@tonic-gate #define AML_INT_STATICSTRING_OP     (UINT16) 0x0034
275*0Sstevel@tonic-gate #define AML_INT_METHODCALL_OP       (UINT16) 0x0035
276*0Sstevel@tonic-gate #define AML_INT_RETURN_VALUE_OP     (UINT16) 0x0036
277*0Sstevel@tonic-gate #define AML_INT_EVAL_SUBTREE_OP     (UINT16) 0x0037
278*0Sstevel@tonic-gate 
279*0Sstevel@tonic-gate 
280*0Sstevel@tonic-gate #define ARG_NONE                    0x0
281*0Sstevel@tonic-gate 
282*0Sstevel@tonic-gate /*
283*0Sstevel@tonic-gate  * Argument types for the AML Parser
284*0Sstevel@tonic-gate  * Each field in the ArgTypes UINT32 is 5 bits, allowing for a maximum of 6 arguments.
285*0Sstevel@tonic-gate  * There can be up to 31 unique argument types
286*0Sstevel@tonic-gate  * Zero is reserved as end-of-list indicator
287*0Sstevel@tonic-gate  */
288*0Sstevel@tonic-gate #define ARGP_BYTEDATA               0x01
289*0Sstevel@tonic-gate #define ARGP_BYTELIST               0x02
290*0Sstevel@tonic-gate #define ARGP_CHARLIST               0x03
291*0Sstevel@tonic-gate #define ARGP_DATAOBJ                0x04
292*0Sstevel@tonic-gate #define ARGP_DATAOBJLIST            0x05
293*0Sstevel@tonic-gate #define ARGP_DWORDDATA              0x06
294*0Sstevel@tonic-gate #define ARGP_FIELDLIST              0x07
295*0Sstevel@tonic-gate #define ARGP_NAME                   0x08
296*0Sstevel@tonic-gate #define ARGP_NAMESTRING             0x09
297*0Sstevel@tonic-gate #define ARGP_OBJLIST                0x0A
298*0Sstevel@tonic-gate #define ARGP_PKGLENGTH              0x0B
299*0Sstevel@tonic-gate #define ARGP_SUPERNAME              0x0C
300*0Sstevel@tonic-gate #define ARGP_TARGET                 0x0D
301*0Sstevel@tonic-gate #define ARGP_TERMARG                0x0E
302*0Sstevel@tonic-gate #define ARGP_TERMLIST               0x0F
303*0Sstevel@tonic-gate #define ARGP_WORDDATA               0x10
304*0Sstevel@tonic-gate #define ARGP_QWORDDATA              0x11
305*0Sstevel@tonic-gate #define ARGP_SIMPLENAME             0x12
306*0Sstevel@tonic-gate 
307*0Sstevel@tonic-gate /*
308*0Sstevel@tonic-gate  * Resolved argument types for the AML Interpreter
309*0Sstevel@tonic-gate  * Each field in the ArgTypes UINT32 is 5 bits, allowing for a maximum of 6 arguments.
310*0Sstevel@tonic-gate  * There can be up to 31 unique argument types (0 is end-of-arg-list indicator)
311*0Sstevel@tonic-gate  *
312*0Sstevel@tonic-gate  * Note1: These values are completely independent from the ACPI_TYPEs
313*0Sstevel@tonic-gate  *        i.e., ARGI_INTEGER != ACPI_TYPE_INTEGER
314*0Sstevel@tonic-gate  *
315*0Sstevel@tonic-gate  * Note2: If and when 5 bits becomes insufficient, it would probably be best
316*0Sstevel@tonic-gate  * to convert to a 6-byte array of argument types, allowing 8 bits per argument.
317*0Sstevel@tonic-gate  */
318*0Sstevel@tonic-gate 
319*0Sstevel@tonic-gate /* Single, simple types */
320*0Sstevel@tonic-gate 
321*0Sstevel@tonic-gate #define ARGI_ANYTYPE                0x01    /* Don't care */
322*0Sstevel@tonic-gate #define ARGI_PACKAGE                0x02
323*0Sstevel@tonic-gate #define ARGI_EVENT                  0x03
324*0Sstevel@tonic-gate #define ARGI_MUTEX                  0x04
325*0Sstevel@tonic-gate #define ARGI_DDBHANDLE              0x05
326*0Sstevel@tonic-gate 
327*0Sstevel@tonic-gate /* Interchangeable types (via implicit conversion) */
328*0Sstevel@tonic-gate 
329*0Sstevel@tonic-gate #define ARGI_INTEGER                0x06
330*0Sstevel@tonic-gate #define ARGI_STRING                 0x07
331*0Sstevel@tonic-gate #define ARGI_BUFFER                 0x08
332*0Sstevel@tonic-gate #define ARGI_BUFFER_OR_STRING       0x09    /* Used by MID op only */
333*0Sstevel@tonic-gate #define ARGI_COMPUTEDATA            0x0A    /* Buffer, String, or Integer */
334*0Sstevel@tonic-gate 
335*0Sstevel@tonic-gate /* Reference objects */
336*0Sstevel@tonic-gate 
337*0Sstevel@tonic-gate #define ARGI_INTEGER_REF            0x0B
338*0Sstevel@tonic-gate #define ARGI_OBJECT_REF             0x0C
339*0Sstevel@tonic-gate #define ARGI_DEVICE_REF             0x0D
340*0Sstevel@tonic-gate #define ARGI_REFERENCE              0x0E
341*0Sstevel@tonic-gate #define ARGI_TARGETREF              0x0F    /* Target, subject to implicit conversion */
342*0Sstevel@tonic-gate #define ARGI_FIXED_TARGET           0x10    /* Target, no implicit conversion */
343*0Sstevel@tonic-gate #define ARGI_SIMPLE_TARGET          0x11    /* Name, Local, Arg -- no implicit conversion */
344*0Sstevel@tonic-gate 
345*0Sstevel@tonic-gate /* Multiple/complex types */
346*0Sstevel@tonic-gate 
347*0Sstevel@tonic-gate #define ARGI_DATAOBJECT             0x12    /* Buffer, String, package or reference to a Node - Used only by SizeOf operator*/
348*0Sstevel@tonic-gate #define ARGI_COMPLEXOBJ             0x13    /* Buffer, String, or package (Used by INDEX op only) */
349*0Sstevel@tonic-gate #define ARGI_REF_OR_STRING          0x14    /* Reference or String (Used by DEREFOF op only) */
350*0Sstevel@tonic-gate #define ARGI_REGION_OR_FIELD        0x15    /* Used by LOAD op only */
351*0Sstevel@tonic-gate #define ARGI_DATAREFOBJ             0x16
352*0Sstevel@tonic-gate 
353*0Sstevel@tonic-gate /* Note: types above can expand to 0x1F maximum */
354*0Sstevel@tonic-gate 
355*0Sstevel@tonic-gate #define ARGI_INVALID_OPCODE         0xFFFFFFFF
356*0Sstevel@tonic-gate 
357*0Sstevel@tonic-gate 
358*0Sstevel@tonic-gate /*
359*0Sstevel@tonic-gate  * hash offsets
360*0Sstevel@tonic-gate  */
361*0Sstevel@tonic-gate #define AML_EXTOP_HASH_OFFSET       22
362*0Sstevel@tonic-gate #define AML_LNOT_HASH_OFFSET        19
363*0Sstevel@tonic-gate 
364*0Sstevel@tonic-gate 
365*0Sstevel@tonic-gate /*
366*0Sstevel@tonic-gate  * opcode groups and types
367*0Sstevel@tonic-gate  */
368*0Sstevel@tonic-gate #define OPGRP_NAMED                 0x01
369*0Sstevel@tonic-gate #define OPGRP_FIELD                 0x02
370*0Sstevel@tonic-gate #define OPGRP_BYTELIST              0x04
371*0Sstevel@tonic-gate 
372*0Sstevel@tonic-gate 
373*0Sstevel@tonic-gate /*
374*0Sstevel@tonic-gate  * Opcode information
375*0Sstevel@tonic-gate  */
376*0Sstevel@tonic-gate 
377*0Sstevel@tonic-gate /* Opcode flags */
378*0Sstevel@tonic-gate 
379*0Sstevel@tonic-gate #define AML_LOGICAL                 0x0001
380*0Sstevel@tonic-gate #define AML_LOGICAL_NUMERIC         0x0002
381*0Sstevel@tonic-gate #define AML_MATH                    0x0004
382*0Sstevel@tonic-gate #define AML_CREATE                  0x0008
383*0Sstevel@tonic-gate #define AML_FIELD                   0x0010
384*0Sstevel@tonic-gate #define AML_DEFER                   0x0020
385*0Sstevel@tonic-gate #define AML_NAMED                   0x0040
386*0Sstevel@tonic-gate #define AML_NSNODE                  0x0080
387*0Sstevel@tonic-gate #define AML_NSOPCODE                0x0100
388*0Sstevel@tonic-gate #define AML_NSOBJECT                0x0200
389*0Sstevel@tonic-gate #define AML_HAS_RETVAL              0x0400
390*0Sstevel@tonic-gate #define AML_HAS_TARGET              0x0800
391*0Sstevel@tonic-gate #define AML_HAS_ARGS                0x1000
392*0Sstevel@tonic-gate #define AML_CONSTANT                0x2000
393*0Sstevel@tonic-gate #define AML_NO_OPERAND_RESOLVE      0x4000
394*0Sstevel@tonic-gate 
395*0Sstevel@tonic-gate /* Convenient flag groupings */
396*0Sstevel@tonic-gate 
397*0Sstevel@tonic-gate #define AML_FLAGS_EXEC_0A_0T_1R                                     AML_HAS_RETVAL
398*0Sstevel@tonic-gate #define AML_FLAGS_EXEC_1A_0T_0R     AML_HAS_ARGS                                   /* Monadic1  */
399*0Sstevel@tonic-gate #define AML_FLAGS_EXEC_1A_0T_1R     AML_HAS_ARGS |                  AML_HAS_RETVAL /* Monadic2  */
400*0Sstevel@tonic-gate #define AML_FLAGS_EXEC_1A_1T_0R     AML_HAS_ARGS | AML_HAS_TARGET
401*0Sstevel@tonic-gate #define AML_FLAGS_EXEC_1A_1T_1R     AML_HAS_ARGS | AML_HAS_TARGET | AML_HAS_RETVAL /* Monadic2R */
402*0Sstevel@tonic-gate #define AML_FLAGS_EXEC_2A_0T_0R     AML_HAS_ARGS                                   /* Dyadic1   */
403*0Sstevel@tonic-gate #define AML_FLAGS_EXEC_2A_0T_1R     AML_HAS_ARGS |                  AML_HAS_RETVAL /* Dyadic2   */
404*0Sstevel@tonic-gate #define AML_FLAGS_EXEC_2A_1T_1R     AML_HAS_ARGS | AML_HAS_TARGET | AML_HAS_RETVAL /* Dyadic2R  */
405*0Sstevel@tonic-gate #define AML_FLAGS_EXEC_2A_2T_1R     AML_HAS_ARGS | AML_HAS_TARGET | AML_HAS_RETVAL
406*0Sstevel@tonic-gate #define AML_FLAGS_EXEC_3A_0T_0R     AML_HAS_ARGS
407*0Sstevel@tonic-gate #define AML_FLAGS_EXEC_3A_1T_1R     AML_HAS_ARGS | AML_HAS_TARGET | AML_HAS_RETVAL
408*0Sstevel@tonic-gate #define AML_FLAGS_EXEC_6A_0T_1R     AML_HAS_ARGS |                  AML_HAS_RETVAL
409*0Sstevel@tonic-gate 
410*0Sstevel@tonic-gate 
411*0Sstevel@tonic-gate /*
412*0Sstevel@tonic-gate  * The opcode Type is used in a dispatch table, do not change
413*0Sstevel@tonic-gate  * without updating the table.
414*0Sstevel@tonic-gate  */
415*0Sstevel@tonic-gate #define AML_TYPE_EXEC_0A_0T_1R      0x00
416*0Sstevel@tonic-gate #define AML_TYPE_EXEC_1A_0T_0R      0x01 /* Monadic1  */
417*0Sstevel@tonic-gate #define AML_TYPE_EXEC_1A_0T_1R      0x02 /* Monadic2  */
418*0Sstevel@tonic-gate #define AML_TYPE_EXEC_1A_1T_0R      0x03
419*0Sstevel@tonic-gate #define AML_TYPE_EXEC_1A_1T_1R      0x04 /* Monadic2R */
420*0Sstevel@tonic-gate #define AML_TYPE_EXEC_2A_0T_0R      0x05 /* Dyadic1   */
421*0Sstevel@tonic-gate #define AML_TYPE_EXEC_2A_0T_1R      0x06 /* Dyadic2   */
422*0Sstevel@tonic-gate #define AML_TYPE_EXEC_2A_1T_1R      0x07 /* Dyadic2R  */
423*0Sstevel@tonic-gate #define AML_TYPE_EXEC_2A_2T_1R      0x08
424*0Sstevel@tonic-gate #define AML_TYPE_EXEC_3A_0T_0R      0x09
425*0Sstevel@tonic-gate #define AML_TYPE_EXEC_3A_1T_1R      0x0A
426*0Sstevel@tonic-gate #define AML_TYPE_EXEC_6A_0T_1R      0x0B
427*0Sstevel@tonic-gate /* End of types used in dispatch table */
428*0Sstevel@tonic-gate 
429*0Sstevel@tonic-gate #define AML_TYPE_LITERAL            0x0B
430*0Sstevel@tonic-gate #define AML_TYPE_CONSTANT           0x0C
431*0Sstevel@tonic-gate #define AML_TYPE_METHOD_ARGUMENT    0x0D
432*0Sstevel@tonic-gate #define AML_TYPE_LOCAL_VARIABLE     0x0E
433*0Sstevel@tonic-gate #define AML_TYPE_DATA_TERM          0x0F
434*0Sstevel@tonic-gate 
435*0Sstevel@tonic-gate /* Generic for an op that returns a value */
436*0Sstevel@tonic-gate 
437*0Sstevel@tonic-gate #define AML_TYPE_METHOD_CALL        0x10
438*0Sstevel@tonic-gate 
439*0Sstevel@tonic-gate /* Misc */
440*0Sstevel@tonic-gate 
441*0Sstevel@tonic-gate #define AML_TYPE_CREATE_FIELD       0x11
442*0Sstevel@tonic-gate #define AML_TYPE_CREATE_OBJECT      0x12
443*0Sstevel@tonic-gate #define AML_TYPE_CONTROL            0x13
444*0Sstevel@tonic-gate #define AML_TYPE_NAMED_NO_OBJ       0x14
445*0Sstevel@tonic-gate #define AML_TYPE_NAMED_FIELD        0x15
446*0Sstevel@tonic-gate #define AML_TYPE_NAMED_SIMPLE       0x16
447*0Sstevel@tonic-gate #define AML_TYPE_NAMED_COMPLEX      0x17
448*0Sstevel@tonic-gate #define AML_TYPE_RETURN             0x18
449*0Sstevel@tonic-gate 
450*0Sstevel@tonic-gate #define AML_TYPE_UNDEFINED          0x19
451*0Sstevel@tonic-gate #define AML_TYPE_BOGUS              0x1A
452*0Sstevel@tonic-gate 
453*0Sstevel@tonic-gate /* AML Package Length encodings */
454*0Sstevel@tonic-gate 
455*0Sstevel@tonic-gate #define ACPI_AML_PACKAGE_TYPE1      0x40
456*0Sstevel@tonic-gate #define ACPI_AML_PACKAGE_TYPE2      0x4000
457*0Sstevel@tonic-gate #define ACPI_AML_PACKAGE_TYPE3      0x400000
458*0Sstevel@tonic-gate #define ACPI_AML_PACKAGE_TYPE4      0x40000000
459*0Sstevel@tonic-gate 
460*0Sstevel@tonic-gate /*
461*0Sstevel@tonic-gate  * Opcode classes
462*0Sstevel@tonic-gate  */
463*0Sstevel@tonic-gate #define AML_CLASS_EXECUTE           0x00
464*0Sstevel@tonic-gate #define AML_CLASS_CREATE            0x01
465*0Sstevel@tonic-gate #define AML_CLASS_ARGUMENT          0x02
466*0Sstevel@tonic-gate #define AML_CLASS_NAMED_OBJECT      0x03
467*0Sstevel@tonic-gate #define AML_CLASS_CONTROL           0x04
468*0Sstevel@tonic-gate #define AML_CLASS_ASCII             0x05
469*0Sstevel@tonic-gate #define AML_CLASS_PREFIX            0x06
470*0Sstevel@tonic-gate #define AML_CLASS_INTERNAL          0x07
471*0Sstevel@tonic-gate #define AML_CLASS_RETURN_VALUE      0x08
472*0Sstevel@tonic-gate #define AML_CLASS_METHOD_CALL       0x09
473*0Sstevel@tonic-gate #define AML_CLASS_UNKNOWN           0x0A
474*0Sstevel@tonic-gate 
475*0Sstevel@tonic-gate 
476*0Sstevel@tonic-gate /* Predefined Operation Region SpaceIDs */
477*0Sstevel@tonic-gate 
478*0Sstevel@tonic-gate typedef enum
479*0Sstevel@tonic-gate {
480*0Sstevel@tonic-gate     REGION_MEMORY                   = 0,
481*0Sstevel@tonic-gate     REGION_IO,
482*0Sstevel@tonic-gate     REGION_PCI_CONFIG,
483*0Sstevel@tonic-gate     REGION_EC,
484*0Sstevel@tonic-gate     REGION_SMBUS,
485*0Sstevel@tonic-gate     REGION_CMOS,
486*0Sstevel@tonic-gate     REGION_PCI_BAR,
487*0Sstevel@tonic-gate     REGION_DATA_TABLE,              /* Internal use only */
488*0Sstevel@tonic-gate     REGION_FIXED_HW                 = 0x7F
489*0Sstevel@tonic-gate 
490*0Sstevel@tonic-gate } AML_REGION_TYPES;
491*0Sstevel@tonic-gate 
492*0Sstevel@tonic-gate 
493*0Sstevel@tonic-gate /* Comparison operation codes for MatchOp operator */
494*0Sstevel@tonic-gate 
495*0Sstevel@tonic-gate typedef enum
496*0Sstevel@tonic-gate {
497*0Sstevel@tonic-gate     MATCH_MTR                       = 0,
498*0Sstevel@tonic-gate     MATCH_MEQ                       = 1,
499*0Sstevel@tonic-gate     MATCH_MLE                       = 2,
500*0Sstevel@tonic-gate     MATCH_MLT                       = 3,
501*0Sstevel@tonic-gate     MATCH_MGE                       = 4,
502*0Sstevel@tonic-gate     MATCH_MGT                       = 5
503*0Sstevel@tonic-gate 
504*0Sstevel@tonic-gate } AML_MATCH_OPERATOR;
505*0Sstevel@tonic-gate 
506*0Sstevel@tonic-gate #define MAX_MATCH_OPERATOR          5
507*0Sstevel@tonic-gate 
508*0Sstevel@tonic-gate 
509*0Sstevel@tonic-gate /*
510*0Sstevel@tonic-gate  * FieldFlags
511*0Sstevel@tonic-gate  *
512*0Sstevel@tonic-gate  * This byte is extracted from the AML and includes three separate
513*0Sstevel@tonic-gate  * pieces of information about the field:
514*0Sstevel@tonic-gate  * 1) The field access type
515*0Sstevel@tonic-gate  * 2) The field update rule
516*0Sstevel@tonic-gate  * 3) The lock rule for the field
517*0Sstevel@tonic-gate  *
518*0Sstevel@tonic-gate  * Bits 00 - 03 : AccessType (AnyAcc, ByteAcc, etc.)
519*0Sstevel@tonic-gate  *      04      : LockRule (1 == Lock)
520*0Sstevel@tonic-gate  *      05 - 06 : UpdateRule
521*0Sstevel@tonic-gate  */
522*0Sstevel@tonic-gate #define AML_FIELD_ACCESS_TYPE_MASK  0x0F
523*0Sstevel@tonic-gate #define AML_FIELD_LOCK_RULE_MASK    0x10
524*0Sstevel@tonic-gate #define AML_FIELD_UPDATE_RULE_MASK  0x60
525*0Sstevel@tonic-gate 
526*0Sstevel@tonic-gate 
527*0Sstevel@tonic-gate /* 1) Field Access Types */
528*0Sstevel@tonic-gate 
529*0Sstevel@tonic-gate typedef enum
530*0Sstevel@tonic-gate {
531*0Sstevel@tonic-gate     AML_FIELD_ACCESS_ANY            = 0x00,
532*0Sstevel@tonic-gate     AML_FIELD_ACCESS_BYTE           = 0x01,
533*0Sstevel@tonic-gate     AML_FIELD_ACCESS_WORD           = 0x02,
534*0Sstevel@tonic-gate     AML_FIELD_ACCESS_DWORD          = 0x03,
535*0Sstevel@tonic-gate     AML_FIELD_ACCESS_QWORD          = 0x04,    /* ACPI 2.0 */
536*0Sstevel@tonic-gate     AML_FIELD_ACCESS_BUFFER         = 0x05     /* ACPI 2.0 */
537*0Sstevel@tonic-gate 
538*0Sstevel@tonic-gate } AML_ACCESS_TYPE;
539*0Sstevel@tonic-gate 
540*0Sstevel@tonic-gate 
541*0Sstevel@tonic-gate /* 2) Field Lock Rules */
542*0Sstevel@tonic-gate 
543*0Sstevel@tonic-gate typedef enum
544*0Sstevel@tonic-gate {
545*0Sstevel@tonic-gate     AML_FIELD_LOCK_NEVER            = 0x00,
546*0Sstevel@tonic-gate     AML_FIELD_LOCK_ALWAYS           = 0x10
547*0Sstevel@tonic-gate 
548*0Sstevel@tonic-gate } AML_LOCK_RULE;
549*0Sstevel@tonic-gate 
550*0Sstevel@tonic-gate 
551*0Sstevel@tonic-gate /* 3) Field Update Rules */
552*0Sstevel@tonic-gate 
553*0Sstevel@tonic-gate typedef enum
554*0Sstevel@tonic-gate {
555*0Sstevel@tonic-gate     AML_FIELD_UPDATE_PRESERVE       = 0x00,
556*0Sstevel@tonic-gate     AML_FIELD_UPDATE_WRITE_AS_ONES  = 0x20,
557*0Sstevel@tonic-gate     AML_FIELD_UPDATE_WRITE_AS_ZEROS = 0x40
558*0Sstevel@tonic-gate 
559*0Sstevel@tonic-gate } AML_UPDATE_RULE;
560*0Sstevel@tonic-gate 
561*0Sstevel@tonic-gate 
562*0Sstevel@tonic-gate /*
563*0Sstevel@tonic-gate  * Field Access Attributes.
564*0Sstevel@tonic-gate  * This byte is extracted from the AML via the
565*0Sstevel@tonic-gate  * AccessAs keyword
566*0Sstevel@tonic-gate  */
567*0Sstevel@tonic-gate typedef enum
568*0Sstevel@tonic-gate {
569*0Sstevel@tonic-gate     AML_FIELD_ATTRIB_SMB_QUICK      = 0x02,
570*0Sstevel@tonic-gate     AML_FIELD_ATTRIB_SMB_SEND_RCV   = 0x04,
571*0Sstevel@tonic-gate     AML_FIELD_ATTRIB_SMB_BYTE       = 0x06,
572*0Sstevel@tonic-gate     AML_FIELD_ATTRIB_SMB_WORD       = 0x08,
573*0Sstevel@tonic-gate     AML_FIELD_ATTRIB_SMB_BLOCK      = 0x0A,
574*0Sstevel@tonic-gate     AML_FIELD_ATTRIB_SMB_WORD_CALL  = 0x0C,
575*0Sstevel@tonic-gate     AML_FIELD_ATTRIB_SMB_BLOCK_CALL = 0x0D
576*0Sstevel@tonic-gate 
577*0Sstevel@tonic-gate } AML_ACCESS_ATTRIBUTE;
578*0Sstevel@tonic-gate 
579*0Sstevel@tonic-gate 
580*0Sstevel@tonic-gate /* Bit fields in MethodFlags byte */
581*0Sstevel@tonic-gate 
582*0Sstevel@tonic-gate #define AML_METHOD_ARG_COUNT        0x07
583*0Sstevel@tonic-gate #define AML_METHOD_SERIALIZED       0x08
584*0Sstevel@tonic-gate #define AML_METHOD_SYNCH_LEVEL      0xF0
585*0Sstevel@tonic-gate 
586*0Sstevel@tonic-gate /* METHOD_FLAGS_ARG_COUNT is not used internally, define additional flags */
587*0Sstevel@tonic-gate 
588*0Sstevel@tonic-gate #define AML_METHOD_INTERNAL_ONLY    0x01
589*0Sstevel@tonic-gate #define AML_METHOD_RESERVED1        0x02
590*0Sstevel@tonic-gate #define AML_METHOD_RESERVED2        0x04
591*0Sstevel@tonic-gate 
592*0Sstevel@tonic-gate 
593*0Sstevel@tonic-gate #endif /* __AMLCODE_H__ */
594