Print this page
update to acpica-unix2-20140114
acpica-unix2-20130823
PANKOVs restructure
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/intel/sys/acpi/acparser.h
+++ new/usr/src/common/acpica/include/acparser.h
1 1 /******************************************************************************
2 2 *
3 3 * Module Name: acparser.h - AML Parser subcomponent prototypes and defines
4 4 *
5 5 *****************************************************************************/
6 6
7 7 /*
8 - * Copyright (C) 2000 - 2011, Intel Corp.
8 + * Copyright (C) 2000 - 2014, Intel Corp.
9 9 * All rights reserved.
10 10 *
11 11 * Redistribution and use in source and binary forms, with or without
12 12 * modification, are permitted provided that the following conditions
13 13 * are met:
14 14 * 1. Redistributions of source code must retain the above copyright
15 15 * notice, this list of conditions, and the following disclaimer,
16 16 * without modification.
17 17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 18 * substantially similar to the "NO WARRANTY" disclaimer below
19 19 * ("Disclaimer") and any redistribution must be conditioned upon
20 20 * including a substantially similar Disclaimer requirement for further
21 21 * binary redistribution.
22 22 * 3. Neither the names of the above-listed copyright holders nor the names
23 23 * of any contributors may be used to endorse or promote products derived
24 24 * from this software without specific prior written permission.
25 25 *
26 26 * Alternatively, this software may be distributed under the terms of the
27 27 * GNU General Public License ("GPL") version 2 as published by the Free
28 28 * Software Foundation.
29 29 *
30 30 * NO WARRANTY
31 31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 41 * POSSIBILITY OF SUCH DAMAGES.
42 42 */
43 43
44 44
45 45 #ifndef __ACPARSER_H__
46 46 #define __ACPARSER_H__
47 47
48 48
49 49 #define OP_HAS_RETURN_VALUE 1
50 50
51 51 /* Variable number of arguments. This field must be 32 bits */
52 52
53 53 #define ACPI_VAR_ARGS ACPI_UINT32_MAX
54 54
55 55
56 56 #define ACPI_PARSE_DELETE_TREE 0x0001
57 57 #define ACPI_PARSE_NO_TREE_DELETE 0x0000
58 58 #define ACPI_PARSE_TREE_MASK 0x0001
59 59
60 60 #define ACPI_PARSE_LOAD_PASS1 0x0010
61 61 #define ACPI_PARSE_LOAD_PASS2 0x0020
62 62 #define ACPI_PARSE_EXECUTE 0x0030
63 63 #define ACPI_PARSE_MODE_MASK 0x0030
64 64
65 65 #define ACPI_PARSE_DEFERRED_OP 0x0100
66 66 #define ACPI_PARSE_DISASSEMBLE 0x0200
67 67
68 68 #define ACPI_PARSE_MODULE_LEVEL 0x0400
69 69
70 70 /******************************************************************************
71 71 *
72 72 * Parser interfaces
73 73 *
74 74 *****************************************************************************/
75 75
76 76
77 77 /*
78 78 * psxface - Parser external interfaces
79 79 */
80 80 ACPI_STATUS
81 81 AcpiPsExecuteMethod (
82 82 ACPI_EVALUATE_INFO *Info);
83 83
84 84
85 85 /*
86 86 * psargs - Parse AML opcode arguments
87 87 */
88 88 UINT8 *
89 89 AcpiPsGetNextPackageEnd (
90 90 ACPI_PARSE_STATE *ParserState);
91 91
92 92 char *
93 93 AcpiPsGetNextNamestring (
94 94 ACPI_PARSE_STATE *ParserState);
95 95
96 96 void
97 97 AcpiPsGetNextSimpleArg (
98 98 ACPI_PARSE_STATE *ParserState,
99 99 UINT32 ArgType,
100 100 ACPI_PARSE_OBJECT *Arg);
101 101
102 102 ACPI_STATUS
103 103 AcpiPsGetNextNamepath (
104 104 ACPI_WALK_STATE *WalkState,
105 105 ACPI_PARSE_STATE *ParserState,
106 106 ACPI_PARSE_OBJECT *Arg,
107 107 BOOLEAN MethodCall);
108 108
109 109 ACPI_STATUS
110 110 AcpiPsGetNextArg (
111 111 ACPI_WALK_STATE *WalkState,
112 112 ACPI_PARSE_STATE *ParserState,
113 113 UINT32 ArgType,
114 114 ACPI_PARSE_OBJECT **ReturnArg);
115 115
116 116
117 117 /*
118 118 * psfind
119 119 */
120 120 ACPI_PARSE_OBJECT *
121 121 AcpiPsFindName (
↓ open down ↓ |
103 lines elided |
↑ open up ↑ |
122 122 ACPI_PARSE_OBJECT *Scope,
123 123 UINT32 Name,
124 124 UINT32 Opcode);
125 125
126 126 ACPI_PARSE_OBJECT*
127 127 AcpiPsGetParent (
128 128 ACPI_PARSE_OBJECT *Op);
129 129
130 130
131 131 /*
132 - * psopcode - AML Opcode information
132 + * psobject - support for parse object processing
133 133 */
134 +ACPI_STATUS
135 +AcpiPsBuildNamedOp (
136 + ACPI_WALK_STATE *WalkState,
137 + UINT8 *AmlOpStart,
138 + ACPI_PARSE_OBJECT *UnnamedOp,
139 + ACPI_PARSE_OBJECT **Op);
140 +
141 +ACPI_STATUS
142 +AcpiPsCreateOp (
143 + ACPI_WALK_STATE *WalkState,
144 + UINT8 *AmlOpStart,
145 + ACPI_PARSE_OBJECT **NewOp);
146 +
147 +ACPI_STATUS
148 +AcpiPsCompleteOp (
149 + ACPI_WALK_STATE *WalkState,
150 + ACPI_PARSE_OBJECT **Op,
151 + ACPI_STATUS Status);
152 +
153 +ACPI_STATUS
154 +AcpiPsCompleteFinalOp (
155 + ACPI_WALK_STATE *WalkState,
156 + ACPI_PARSE_OBJECT *Op,
157 + ACPI_STATUS Status);
158 +
159 +
160 +/*
161 + * psopinfo - AML Opcode information
162 + */
134 163 const ACPI_OPCODE_INFO *
135 164 AcpiPsGetOpcodeInfo (
136 165 UINT16 Opcode);
137 166
138 167 char *
139 168 AcpiPsGetOpcodeName (
140 169 UINT16 Opcode);
141 170
142 171 UINT8
143 172 AcpiPsGetArgumentCount (
144 173 UINT32 OpType);
145 174
146 175
147 176 /*
148 177 * psparse - top level parsing routines
149 178 */
150 179 ACPI_STATUS
151 180 AcpiPsParseAml (
152 181 ACPI_WALK_STATE *WalkState);
153 182
154 183 UINT32
155 184 AcpiPsGetOpcodeSize (
156 185 UINT32 Opcode);
157 186
158 187 UINT16
159 188 AcpiPsPeekOpcode (
160 189 ACPI_PARSE_STATE *state);
161 190
162 191 ACPI_STATUS
163 192 AcpiPsCompleteThisOp (
164 193 ACPI_WALK_STATE *WalkState,
165 194 ACPI_PARSE_OBJECT *Op);
166 195
167 196 ACPI_STATUS
168 197 AcpiPsNextParseState (
169 198 ACPI_WALK_STATE *WalkState,
170 199 ACPI_PARSE_OBJECT *Op,
171 200 ACPI_STATUS CallbackStatus);
172 201
173 202
174 203 /*
175 204 * psloop - main parse loop
176 205 */
177 206 ACPI_STATUS
178 207 AcpiPsParseLoop (
179 208 ACPI_WALK_STATE *WalkState);
180 209
181 210
182 211 /*
183 212 * psscope - Scope stack management routines
184 213 */
185 214 ACPI_STATUS
186 215 AcpiPsInitScope (
187 216 ACPI_PARSE_STATE *ParserState,
188 217 ACPI_PARSE_OBJECT *Root);
189 218
190 219 ACPI_PARSE_OBJECT *
191 220 AcpiPsGetParentScope (
192 221 ACPI_PARSE_STATE *state);
193 222
194 223 BOOLEAN
195 224 AcpiPsHasCompletedScope (
196 225 ACPI_PARSE_STATE *ParserState);
197 226
198 227 void
199 228 AcpiPsPopScope (
200 229 ACPI_PARSE_STATE *ParserState,
201 230 ACPI_PARSE_OBJECT **Op,
202 231 UINT32 *ArgList,
203 232 UINT32 *ArgCount);
204 233
205 234 ACPI_STATUS
206 235 AcpiPsPushScope (
207 236 ACPI_PARSE_STATE *ParserState,
208 237 ACPI_PARSE_OBJECT *Op,
209 238 UINT32 RemainingArgs,
210 239 UINT32 ArgCount);
211 240
212 241 void
213 242 AcpiPsCleanupScope (
214 243 ACPI_PARSE_STATE *state);
215 244
216 245
217 246 /*
218 247 * pstree - parse tree manipulation routines
219 248 */
220 249 void
221 250 AcpiPsAppendArg(
222 251 ACPI_PARSE_OBJECT *op,
223 252 ACPI_PARSE_OBJECT *arg);
224 253
225 254 ACPI_PARSE_OBJECT*
226 255 AcpiPsFind (
227 256 ACPI_PARSE_OBJECT *Scope,
228 257 char *Path,
229 258 UINT16 Opcode,
230 259 UINT32 Create);
231 260
232 261 ACPI_PARSE_OBJECT *
233 262 AcpiPsGetArg(
234 263 ACPI_PARSE_OBJECT *op,
235 264 UINT32 argn);
236 265
237 266 ACPI_PARSE_OBJECT *
238 267 AcpiPsGetDepthNext (
239 268 ACPI_PARSE_OBJECT *Origin,
240 269 ACPI_PARSE_OBJECT *Op);
241 270
242 271
243 272 /*
244 273 * pswalk - parse tree walk routines
245 274 */
246 275 ACPI_STATUS
247 276 AcpiPsWalkParsedAml (
248 277 ACPI_PARSE_OBJECT *StartOp,
249 278 ACPI_PARSE_OBJECT *EndOp,
250 279 ACPI_OPERAND_OBJECT *MthDesc,
251 280 ACPI_NAMESPACE_NODE *StartNode,
252 281 ACPI_OPERAND_OBJECT **Params,
253 282 ACPI_OPERAND_OBJECT **CallerReturnDesc,
254 283 ACPI_OWNER_ID OwnerId,
255 284 ACPI_PARSE_DOWNWARDS DescendingCallback,
256 285 ACPI_PARSE_UPWARDS AscendingCallback);
257 286
258 287 ACPI_STATUS
259 288 AcpiPsGetNextWalkOp (
260 289 ACPI_WALK_STATE *WalkState,
261 290 ACPI_PARSE_OBJECT *Op,
262 291 ACPI_PARSE_UPWARDS AscendingCallback);
263 292
264 293 ACPI_STATUS
265 294 AcpiPsDeleteCompletedOp (
266 295 ACPI_WALK_STATE *WalkState);
267 296
268 297 void
269 298 AcpiPsDeleteParseTree (
270 299 ACPI_PARSE_OBJECT *root);
271 300
272 301
273 302 /*
274 303 * psutils - parser utilities
275 304 */
276 305 ACPI_PARSE_OBJECT *
277 306 AcpiPsCreateScopeOp (
278 307 void);
279 308
280 309 void
281 310 AcpiPsInitOp (
282 311 ACPI_PARSE_OBJECT *op,
283 312 UINT16 opcode);
284 313
285 314 ACPI_PARSE_OBJECT *
286 315 AcpiPsAllocOp (
↓ open down ↓ |
143 lines elided |
↑ open up ↑ |
287 316 UINT16 opcode);
288 317
289 318 void
290 319 AcpiPsFreeOp (
291 320 ACPI_PARSE_OBJECT *Op);
292 321
293 322 BOOLEAN
294 323 AcpiPsIsLeadingChar (
295 324 UINT32 c);
296 325
297 -BOOLEAN
298 -AcpiPsIsPrefixChar (
299 - UINT32 c);
300 -
301 326 UINT32
302 327 AcpiPsGetName(
303 328 ACPI_PARSE_OBJECT *op);
304 329
305 330 void
306 331 AcpiPsSetName(
307 332 ACPI_PARSE_OBJECT *op,
308 333 UINT32 name);
309 334
310 335
311 336 /*
312 337 * psdump - display parser tree
313 338 */
314 339 UINT32
315 340 AcpiPsSprintPath (
316 341 char *BufferStart,
317 342 UINT32 BufferSize,
318 343 ACPI_PARSE_OBJECT *Op);
319 344
320 345 UINT32
321 346 AcpiPsSprintOp (
322 347 char *BufferStart,
323 348 UINT32 BufferSize,
324 349 ACPI_PARSE_OBJECT *Op);
325 350
326 351 void
327 352 AcpiPsShow (
328 353 ACPI_PARSE_OBJECT *op);
329 354
330 355
331 356 #endif /* __ACPARSER_H__ */
↓ open down ↓ |
21 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX