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