Rev 1498 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1498 | serge | 1 | |
2 | * |
||
3 | * Module Name: aslcompiler.h - common include file for iASL |
||
4 | * |
||
5 | *****************************************************************************/ |
||
6 | |||
7 | |||
8 | * |
||
9 | * 1. Copyright Notice |
||
10 | * |
||
11 | * Some or all of this work - Copyright (c) 1999 - 2011, Intel Corp. |
||
2216 | Serge | 12 | * All rights reserved. |
1498 | serge | 13 | * |
14 | * 2. License |
||
15 | * |
||
16 | * 2.1. This is your license from Intel Corp. under its intellectual property |
||
17 | * rights. You may have additional license terms from the party that provided |
||
18 | * you this software, covering your right to use that party's intellectual |
||
19 | * property rights. |
||
20 | * |
||
21 | * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a |
||
22 | * copy of the source code appearing in this file ("Covered Code") an |
||
23 | * irrevocable, perpetual, worldwide license under Intel's copyrights in the |
||
24 | * base code distributed originally by Intel ("Original Intel Code") to copy, |
||
25 | * make derivatives, distribute, use and display any portion of the Covered |
||
26 | * Code in any form, with the right to sublicense such rights; and |
||
27 | * |
||
28 | * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent |
||
29 | * license (with the right to sublicense), under only those claims of Intel |
||
30 | * patents that are infringed by the Original Intel Code, to make, use, sell, |
||
31 | * offer to sell, and import the Covered Code and derivative works thereof |
||
32 | * solely to the minimum extent necessary to exercise the above copyright |
||
33 | * license, and in no event shall the patent license extend to any additions |
||
34 | * to or modifications of the Original Intel Code. No other license or right |
||
35 | * is granted directly or by implication, estoppel or otherwise; |
||
36 | * |
||
37 | * The above copyright and patent license is granted only if the following |
||
38 | * conditions are met: |
||
39 | * |
||
40 | * 3. Conditions |
||
41 | * |
||
42 | * 3.1. Redistribution of Source with Rights to Further Distribute Source. |
||
43 | * Redistribution of source code of any substantial portion of the Covered |
||
44 | * Code or modification with rights to further distribute source must include |
||
45 | * the above Copyright Notice, the above License, this list of Conditions, |
||
46 | * and the following Disclaimer and Export Compliance provision. In addition, |
||
47 | * Licensee must cause all Covered Code to which Licensee contributes to |
||
48 | * contain a file documenting the changes Licensee made to create that Covered |
||
49 | * Code and the date of any change. Licensee must include in that file the |
||
50 | * documentation of any changes made by any predecessor Licensee. Licensee |
||
51 | * must include a prominent statement that the modification is derived, |
||
52 | * directly or indirectly, from Original Intel Code. |
||
53 | * |
||
54 | * 3.2. Redistribution of Source with no Rights to Further Distribute Source. |
||
55 | * Redistribution of source code of any substantial portion of the Covered |
||
56 | * Code or modification without rights to further distribute source must |
||
57 | * include the following Disclaimer and Export Compliance provision in the |
||
58 | * documentation and/or other materials provided with distribution. In |
||
59 | * addition, Licensee may not authorize further sublicense of source of any |
||
60 | * portion of the Covered Code, and must include terms to the effect that the |
||
61 | * license from Licensee to its licensee is limited to the intellectual |
||
62 | * property embodied in the software Licensee provides to its licensee, and |
||
63 | * not to intellectual property embodied in modifications its licensee may |
||
64 | * make. |
||
65 | * |
||
66 | * 3.3. Redistribution of Executable. Redistribution in executable form of any |
||
67 | * substantial portion of the Covered Code or modification must reproduce the |
||
68 | * above Copyright Notice, and the following Disclaimer and Export Compliance |
||
69 | * provision in the documentation and/or other materials provided with the |
||
70 | * distribution. |
||
71 | * |
||
72 | * 3.4. Intel retains all right, title, and interest in and to the Original |
||
73 | * Intel Code. |
||
74 | * |
||
75 | * 3.5. Neither the name Intel nor any other trademark owned or controlled by |
||
76 | * Intel shall be used in advertising or otherwise to promote the sale, use or |
||
77 | * other dealings in products derived from or relating to the Covered Code |
||
78 | * without prior written authorization from Intel. |
||
79 | * |
||
80 | * 4. Disclaimer and Export Compliance |
||
81 | * |
||
82 | * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED |
||
83 | * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE |
||
84 | * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, |
||
85 | * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY |
||
86 | * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY |
||
87 | * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A |
||
88 | * PARTICULAR PURPOSE. |
||
89 | * |
||
90 | * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES |
||
91 | * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR |
||
92 | * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, |
||
93 | * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY |
||
94 | * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL |
||
95 | * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS |
||
96 | * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY |
||
97 | * LIMITED REMEDY. |
||
98 | * |
||
99 | * 4.3. Licensee shall not export, either directly or indirectly, any of this |
||
100 | * software or system incorporating such software without first obtaining any |
||
101 | * required license or other approval from the U. S. Department of Commerce or |
||
102 | * any other agency or department of the United States Government. In the |
||
103 | * event Licensee exports any such software from the United States or |
||
104 | * re-exports any such software from a foreign destination, Licensee shall |
||
105 | * ensure that the distribution and export/re-export of the software is in |
||
106 | * compliance with all laws, regulations, orders, or other restrictions of the |
||
107 | * U.S. Export Administration Regulations. Licensee agrees that neither it nor |
||
108 | * any of its subsidiaries will export/re-export any technical data, process, |
||
109 | * software, or service, directly or indirectly, to any country for which the |
||
110 | * United States government or any agency thereof requires an export license, |
||
111 | * other governmental approval, or letter of assurance, without first obtaining |
||
112 | * such license, approval or letter. |
||
113 | * |
||
114 | *****************************************************************************/ |
||
115 | |||
116 | |||
117 | |||
118 | #define __ASLCOMPILER_H |
||
119 | |||
120 | |||
2216 | Serge | 121 | #include "accommon.h" |
122 | #include "amlresrc.h" |
||
123 | #include "acdebug.h" |
||
124 | |||
1498 | serge | 125 | |
126 | |||
127 | |||
128 | |||
129 | |||
130 | #pragma warning(disable:4103) |
||
131 | |||
132 | |||
133 | #pragma warning(disable:4115) |
||
134 | #endif |
||
135 | |||
136 | |||
137 | #include |
||
138 | #include |
||
139 | #include |
||
140 | #include |
||
141 | #include |
||
142 | |||
143 | |||
144 | |||
145 | |||
146 | #include "asltypes.h" |
||
147 | #include "aslmessages.h" |
||
2216 | Serge | 148 | #include "aslglobal.h" |
1498 | serge | 149 | |
150 | |||
151 | |||
152 | * |
||
153 | * Compiler prototypes |
||
154 | * |
||
155 | ******************************************************************************/ |
||
156 | |||
157 | |||
158 | * parser - generated from flex/bison, lex/yacc, etc. |
||
159 | */ |
||
160 | int |
||
161 | AslCompilerparse( |
||
162 | void); |
||
163 | |||
164 | |||
165 | AslDoError ( |
||
166 | void); |
||
167 | |||
168 | |||
169 | AslCompilerlex( |
||
170 | void); |
||
171 | |||
172 | |||
173 | ResetCurrentLineBuffer ( |
||
174 | void); |
||
175 | |||
176 | |||
177 | InsertLineBuffer ( |
||
178 | int SourceChar); |
||
179 | |||
180 | |||
181 | AslPopInputFileStack ( |
||
182 | void); |
||
183 | |||
184 | |||
185 | AslPushInputFileStack ( |
||
186 | FILE *InputFile, |
||
187 | char *Filename); |
||
188 | |||
189 | |||
190 | * aslstartup - entered from main() |
||
2216 | Serge | 191 | */ |
1498 | serge | 192 | void |
2216 | Serge | 193 | AslInitializeGlobals ( |
194 | void); |
||
195 | |||
196 | |||
197 | ACPI_STATUS (*ASL_PATHNAME_CALLBACK) ( |
||
198 | char *); |
||
199 | |||
200 | |||
1498 | serge | 201 | AslDoOnePathname ( |
202 | char *Pathname, |
||
2216 | Serge | 203 | ASL_PATHNAME_CALLBACK Callback); |
204 | |||
1498 | serge | 205 | |
206 | AslDoOneFile ( |
||
207 | char *Filename); |
||
208 | |||
209 | |||
210 | * aslcompile - compile mainline |
||
211 | */ |
||
212 | void |
||
213 | AslCompilerSignon ( |
||
214 | UINT32 FileId); |
||
215 | |||
216 | |||
217 | AslCompilerFileHeader ( |
||
218 | UINT32 FileId); |
||
219 | |||
220 | |||
221 | CmDoCompile ( |
||
222 | void); |
||
223 | |||
224 | |||
225 | CmDoOutputFiles ( |
||
226 | void); |
||
227 | |||
228 | |||
229 | CmCleanupAndExit ( |
||
230 | void); |
||
231 | |||
232 | |||
233 | FlCheckForAscii ( |
||
234 | ASL_FILE_INFO *FileInfo); |
||
235 | |||
236 | |||
237 | |||
238 | * aslwalks - semantic analysis and parse tree walks |
||
2216 | Serge | 239 | */ |
1498 | serge | 240 | ACPI_STATUS |
241 | AnOtherSemanticAnalysisWalkBegin ( |
||
242 | ACPI_PARSE_OBJECT *Op, |
||
243 | UINT32 Level, |
||
244 | void *Context); |
||
245 | |||
246 | |||
247 | AnOtherSemanticAnalysisWalkEnd ( |
||
248 | ACPI_PARSE_OBJECT *Op, |
||
249 | UINT32 Level, |
||
250 | void *Context); |
||
251 | |||
252 | |||
253 | AnOperandTypecheckWalkEnd ( |
||
254 | ACPI_PARSE_OBJECT *Op, |
||
255 | UINT32 Level, |
||
256 | void *Context); |
||
257 | |||
258 | |||
259 | AnMethodAnalysisWalkBegin ( |
||
260 | ACPI_PARSE_OBJECT *Op, |
||
261 | UINT32 Level, |
||
262 | void *Context); |
||
263 | |||
264 | |||
265 | AnMethodAnalysisWalkEnd ( |
||
266 | ACPI_PARSE_OBJECT *Op, |
||
267 | UINT32 Level, |
||
268 | void *Context); |
||
269 | |||
270 | |||
271 | AnMethodTypingWalkEnd ( |
||
2216 | Serge | 272 | ACPI_PARSE_OBJECT *Op, |
1498 | serge | 273 | UINT32 Level, |
274 | void *Context); |
||
275 | |||
276 | |||
2216 | Serge | 277 | |
278 | * aslbtypes - bitfield data types |
||
279 | */ |
||
280 | UINT32 |
||
281 | AnMapObjTypeToBtype ( |
||
282 | ACPI_PARSE_OBJECT *Op); |
||
283 | |||
284 | |||
285 | AnMapArgTypeToBtype ( |
||
286 | UINT32 ArgType); |
||
287 | |||
288 | |||
289 | AnGetBtype ( |
||
290 | ACPI_PARSE_OBJECT *Op); |
||
291 | |||
292 | |||
293 | AnFormatBtype ( |
||
294 | char *Buffer, |
||
295 | UINT32 Btype); |
||
296 | |||
297 | |||
298 | |||
299 | * aslanalyze - Support functions for parse tree walks |
||
300 | */ |
||
301 | void |
||
302 | AnCheckId ( |
||
303 | ACPI_PARSE_OBJECT *Op, |
||
1498 | serge | 304 | ACPI_NAME Type); |
2216 | Serge | 305 | |
1498 | serge | 306 | |
2216 | Serge | 307 | |
1498 | serge | 308 | |
2216 | Serge | 309 | #define ASL_TYPE_CID 1 |
310 | |||
311 | |||
312 | AnIsInternalMethod ( |
||
313 | ACPI_PARSE_OBJECT *Op); |
||
314 | |||
315 | |||
316 | AnGetInternalMethodReturnType ( |
||
317 | ACPI_PARSE_OBJECT *Op); |
||
318 | |||
319 | |||
320 | AnLastStatementIsReturn ( |
||
321 | ACPI_PARSE_OBJECT *Op); |
||
322 | |||
323 | |||
324 | AnCheckMethodReturnValue ( |
||
325 | ACPI_PARSE_OBJECT *Op, |
||
326 | const ACPI_OPCODE_INFO *OpInfo, |
||
327 | ACPI_PARSE_OBJECT *ArgOp, |
||
328 | UINT32 RequiredBtypes, |
||
329 | UINT32 ThisNodeBtype); |
||
330 | |||
331 | |||
332 | AnIsResultUsed ( |
||
333 | ACPI_PARSE_OBJECT *Op); |
||
334 | |||
335 | |||
336 | ApCheckForGpeNameConflict ( |
||
337 | ACPI_PARSE_OBJECT *Op); |
||
338 | |||
339 | |||
340 | ApCheckRegMethod ( |
||
341 | ACPI_PARSE_OBJECT *Op); |
||
342 | |||
343 | |||
344 | |||
1498 | serge | 345 | * aslerror - error handling/reporting |
346 | */ |
||
347 | void |
||
348 | AslError ( |
||
349 | UINT8 Level, |
||
350 | UINT8 MessageId, |
||
351 | ACPI_PARSE_OBJECT *Op, |
||
352 | char *ExtraMessage); |
||
353 | |||
354 | |||
355 | AslCoreSubsystemError ( |
||
356 | ACPI_PARSE_OBJECT *Op, |
||
357 | ACPI_STATUS Status, |
||
358 | char *ExtraMessage, |
||
359 | BOOLEAN Abort); |
||
360 | |||
361 | |||
362 | AslCompilererror( |
||
363 | const char *s); |
||
2216 | Serge | 364 | |
1498 | serge | 365 | |
366 | AslCommonError ( |
||
367 | UINT8 Level, |
||
368 | UINT8 MessageId, |
||
369 | UINT32 CurrentLineNumber, |
||
370 | UINT32 LogicalLineNumber, |
||
371 | UINT32 LogicalByteOffset, |
||
372 | UINT32 Column, |
||
373 | char *Filename, |
||
374 | char *ExtraMessage); |
||
375 | |||
376 | |||
377 | AePrintException ( |
||
378 | UINT32 FileId, |
||
379 | ASL_ERROR_MSG *Enode, |
||
380 | char *Header); |
||
381 | |||
382 | |||
383 | AePrintErrorLog ( |
||
384 | UINT32 FileId); |
||
385 | |||
386 | |||
387 | AeClearErrorLog ( |
||
388 | void); |
||
389 | |||
390 | |||
391 | AeLocalGetRootPointer ( |
||
392 | void); |
||
393 | |||
394 | |||
395 | |||
396 | * asllisting - generate all "listing" type files |
||
397 | */ |
||
398 | void |
||
399 | LsDoListings ( |
||
400 | void); |
||
401 | |||
402 | |||
403 | LsWriteNodeToAsmListing ( |
||
404 | ACPI_PARSE_OBJECT *Op); |
||
405 | |||
406 | |||
407 | LsWriteNode ( |
||
408 | ACPI_PARSE_OBJECT *Op, |
||
409 | UINT32 FileId); |
||
410 | |||
411 | |||
412 | LsDoHexOutput ( |
||
413 | void); |
||
414 | |||
415 | |||
416 | LsDumpParseTree ( |
||
417 | void); |
||
418 | |||
419 | |||
420 | * aslfold - constant folding |
||
421 | */ |
||
422 | ACPI_STATUS |
||
423 | OpcAmlConstantWalk ( |
||
424 | ACPI_PARSE_OBJECT *Op, |
||
425 | UINT32 Level, |
||
426 | void *Context); |
||
427 | |||
428 | |||
429 | |||
430 | * aslopcodes - generate AML opcodes |
||
431 | */ |
||
432 | ACPI_STATUS |
||
433 | OpcAmlOpcodeWalk ( |
||
434 | ACPI_PARSE_OBJECT *Op, |
||
435 | UINT32 Level, |
||
436 | void *Context); |
||
437 | |||
438 | |||
439 | OpcAmlOpcodeUpdateWalk ( |
||
440 | ACPI_PARSE_OBJECT *Op, |
||
441 | UINT32 Level, |
||
442 | void *Context); |
||
443 | |||
444 | |||
445 | OpcGenerateAmlOpcode ( |
||
446 | ACPI_PARSE_OBJECT *Op); |
||
447 | |||
448 | |||
449 | OpcSetOptimalIntegerSize ( |
||
450 | ACPI_PARSE_OBJECT *Op); |
||
451 | |||
452 | |||
453 | OpcGetIntegerWidth ( |
||
454 | ACPI_PARSE_OBJECT *Op); |
||
455 | |||
456 | |||
457 | |||
458 | * asloperands - generate AML operands for the AML opcodes |
||
459 | */ |
||
460 | ACPI_PARSE_OBJECT * |
||
461 | UtGetArg ( |
||
462 | ACPI_PARSE_OBJECT *Op, |
||
463 | UINT32 Argn); |
||
464 | |||
465 | |||
466 | OpnGenerateAmlOperands ( |
||
467 | ACPI_PARSE_OBJECT *Op); |
||
468 | |||
469 | |||
470 | OpnDoPackage ( |
||
471 | ACPI_PARSE_OBJECT *Op); |
||
472 | |||
473 | |||
474 | |||
475 | * aslopt - optmization |
||
476 | */ |
||
477 | void |
||
478 | OptOptimizeNamePath ( |
||
479 | ACPI_PARSE_OBJECT *Op, |
||
480 | UINT32 Flags, |
||
481 | ACPI_WALK_STATE *WalkState, |
||
482 | char *AmlNameString, |
||
483 | ACPI_NAMESPACE_NODE *TargetNode); |
||
484 | |||
485 | |||
486 | |||
487 | * aslcodegen - code generation |
||
488 | */ |
||
489 | void |
||
490 | CgGenerateAmlOutput ( |
||
491 | void); |
||
492 | |||
493 | |||
494 | |||
495 | * aslfile |
||
496 | */ |
||
497 | void |
||
498 | FlOpenFile ( |
||
499 | UINT32 FileId, |
||
500 | char *Filename, |
||
501 | char *Mode); |
||
502 | |||
503 | |||
504 | |||
505 | * asllength - calculate/adjust AML package lengths |
||
506 | */ |
||
507 | ACPI_STATUS |
||
508 | LnPackageLengthWalk ( |
||
509 | ACPI_PARSE_OBJECT *Op, |
||
510 | UINT32 Level, |
||
511 | void *Context); |
||
512 | |||
513 | |||
514 | LnInitLengthsWalk ( |
||
515 | ACPI_PARSE_OBJECT *Op, |
||
516 | UINT32 Level, |
||
517 | void *Context); |
||
518 | |||
519 | |||
520 | CgGenerateAmlLengths ( |
||
521 | ACPI_PARSE_OBJECT *Op); |
||
522 | |||
523 | |||
524 | |||
525 | * aslmap - opcode mappings and reserved method names |
||
526 | */ |
||
527 | ACPI_OBJECT_TYPE |
||
528 | AslMapNamedOpcodeToDataType ( |
||
529 | UINT16 Opcode); |
||
530 | |||
531 | |||
532 | |||
533 | * aslpredef - ACPI predefined names support |
||
534 | */ |
||
535 | BOOLEAN |
||
2216 | Serge | 536 | ApCheckForPredefinedMethod ( |
1498 | serge | 537 | ACPI_PARSE_OBJECT *Op, |
538 | ASL_METHOD_INFO *MethodInfo); |
||
539 | |||
540 | |||
541 | ApCheckPredefinedReturnValue ( |
||
542 | ACPI_PARSE_OBJECT *Op, |
||
543 | ASL_METHOD_INFO *MethodInfo); |
||
544 | |||
545 | |||
546 | ApCheckForPredefinedName ( |
||
547 | ACPI_PARSE_OBJECT *Op, |
||
548 | char *Name); |
||
549 | |||
550 | |||
551 | ApCheckForPredefinedObject ( |
||
552 | ACPI_PARSE_OBJECT *Op, |
||
553 | char *Name); |
||
554 | |||
555 | |||
556 | ApDisplayReservedNames ( |
||
557 | void); |
||
558 | |||
559 | |||
560 | |||
561 | * asltransform - parse tree transformations |
||
562 | */ |
||
563 | ACPI_STATUS |
||
564 | TrAmlTransformWalk ( |
||
565 | ACPI_PARSE_OBJECT *Op, |
||
566 | UINT32 Level, |
||
567 | void *Context); |
||
568 | |||
569 | |||
570 | |||
571 | * asltree - parse tree support |
||
572 | */ |
||
573 | ACPI_STATUS |
||
574 | TrWalkParseTree ( |
||
575 | ACPI_PARSE_OBJECT *Op, |
||
576 | UINT32 Visitation, |
||
577 | ASL_WALK_CALLBACK DescendingCallback, |
||
578 | ASL_WALK_CALLBACK AscendingCallback, |
||
579 | void *Context); |
||
580 | |||
581 | |||
582 | |||
583 | |||
584 | #define ASL_WALK_VISIT_UPWARD 0x02 |
||
585 | #define ASL_WALK_VISIT_TWICE (ASL_WALK_VISIT_DOWNWARD | ASL_WALK_VISIT_UPWARD) |
||
586 | |||
587 | |||
588 | |||
589 | TrAllocateNode ( |
||
590 | UINT32 ParseOpcode); |
||
591 | |||
592 | |||
593 | TrReleaseNode ( |
||
594 | ACPI_PARSE_OBJECT *Op); |
||
595 | |||
596 | |||
597 | TrUpdateNode ( |
||
598 | UINT32 ParseOpcode, |
||
599 | ACPI_PARSE_OBJECT *Op); |
||
600 | |||
601 | |||
602 | TrCreateNode ( |
||
603 | UINT32 ParseOpcode, |
||
604 | UINT32 NumChildren, |
||
605 | ...); |
||
606 | |||
607 | |||
608 | TrCreateLeafNode ( |
||
609 | UINT32 ParseOpcode); |
||
610 | |||
611 | |||
612 | TrCreateValuedLeafNode ( |
||
613 | UINT32 ParseOpcode, |
||
614 | UINT64 Value); |
||
615 | |||
616 | |||
617 | TrCreateConstantLeafNode ( |
||
2216 | Serge | 618 | UINT32 ParseOpcode); |
619 | |||
620 | |||
621 | TrLinkChildren ( |
||
1498 | serge | 622 | ACPI_PARSE_OBJECT *Op, |
623 | UINT32 NumChildren, |
||
624 | ...); |
||
625 | |||
626 | |||
627 | TrSetEndLineNumber ( |
||
628 | ACPI_PARSE_OBJECT *Op); |
||
629 | |||
630 | |||
631 | TrWalkTree ( |
||
632 | void); |
||
633 | |||
634 | |||
635 | TrLinkPeerNode ( |
||
636 | ACPI_PARSE_OBJECT *Op1, |
||
637 | ACPI_PARSE_OBJECT *Op2); |
||
638 | |||
639 | |||
640 | TrLinkChildNode ( |
||
641 | ACPI_PARSE_OBJECT *Op1, |
||
642 | ACPI_PARSE_OBJECT *Op2); |
||
643 | |||
644 | |||
645 | TrSetNodeFlags ( |
||
646 | ACPI_PARSE_OBJECT *Op, |
||
647 | UINT32 Flags); |
||
648 | |||
649 | |||
650 | TrLinkPeerNodes ( |
||
651 | UINT32 NumPeers, |
||
652 | ...); |
||
653 | |||
654 | |||
655 | |||
656 | * aslfiles - File I/O support |
||
657 | */ |
||
658 | void |
||
659 | AslAbort ( |
||
660 | void); |
||
661 | |||
662 | |||
663 | FlAddIncludeDirectory ( |
||
664 | char *Dir); |
||
665 | |||
666 | |||
667 | FlOpenIncludeFile ( |
||
668 | ACPI_PARSE_OBJECT *Op); |
||
669 | |||
670 | |||
671 | FlFileError ( |
||
672 | UINT32 FileId, |
||
673 | UINT8 ErrorId); |
||
674 | |||
675 | |||
676 | FlGetFileSize ( |
||
677 | UINT32 FileId); |
||
678 | |||
679 | |||
680 | FlReadFile ( |
||
681 | UINT32 FileId, |
||
682 | void *Buffer, |
||
683 | UINT32 Length); |
||
684 | |||
685 | |||
686 | FlWriteFile ( |
||
687 | UINT32 FileId, |
||
688 | void *Buffer, |
||
689 | UINT32 Length); |
||
690 | |||
691 | |||
692 | FlSeekFile ( |
||
693 | UINT32 FileId, |
||
694 | long Offset); |
||
695 | |||
696 | |||
697 | FlCloseFile ( |
||
698 | UINT32 FileId); |
||
699 | |||
700 | |||
701 | FlPrintFile ( |
||
702 | UINT32 FileId, |
||
703 | char *Format, |
||
704 | ...); |
||
705 | |||
706 | |||
707 | FlSetLineNumber ( |
||
708 | ACPI_PARSE_OBJECT *Op); |
||
709 | |||
710 | |||
711 | FlOpenInputFile ( |
||
712 | char *InputFilename); |
||
713 | |||
714 | |||
715 | FlOpenAmlOutputFile ( |
||
716 | char *InputFilename); |
||
717 | |||
718 | |||
719 | FlOpenMiscOutputFiles ( |
||
720 | char *InputFilename); |
||
721 | |||
722 | |||
723 | |||
724 | * asload - load namespace in prep for cross reference |
||
725 | */ |
||
726 | ACPI_STATUS |
||
727 | LdLoadNamespace ( |
||
728 | ACPI_PARSE_OBJECT *RootOp); |
||
729 | |||
730 | |||
731 | |||
732 | * asllookup - namespace cross reference |
||
733 | */ |
||
734 | ACPI_STATUS |
||
735 | LkCrossReferenceNamespace ( |
||
736 | void); |
||
737 | |||
738 | |||
739 | LkFindUnreferencedObjects ( |
||
740 | void); |
||
741 | |||
742 | |||
743 | LsDisplayNamespace ( |
||
744 | void); |
||
745 | |||
746 | |||
2216 | Serge | 747 | LsSetupNsList ( |
748 | void *Handle); |
||
749 | |||
1498 | serge | 750 | |
2216 | Serge | 751 | |
1498 | serge | 752 | * aslutils - common compiler utilites |
753 | */ |
||
754 | void |
||
755 | DbgPrint ( |
||
756 | UINT32 Type, |
||
757 | char *Format, |
||
758 | ...); |
||
759 | |||
760 | |||
761 | |||
762 | |||
763 | #define ASL_PARSE_OUTPUT 1 |
||
764 | #define ASL_TREE_OUTPUT 2 |
||
765 | |||
766 | |||
767 | UtDisplaySupportedTables ( |
||
2216 | Serge | 768 | void); |
769 | |||
770 | |||
771 | UtDisplayConstantOpcodes ( |
||
1498 | serge | 772 | void); |
773 | |||
774 | |||
775 | UtBeginEvent ( |
||
776 | char *Name); |
||
777 | |||
778 | |||
779 | UtEndEvent ( |
||
780 | UINT8 Event); |
||
781 | |||
782 | |||
783 | UtLocalCalloc ( |
||
784 | UINT32 Size); |
||
785 | |||
786 | |||
787 | UtPrintFormattedName ( |
||
788 | UINT16 ParseOpcode, |
||
789 | UINT32 Level); |
||
790 | |||
791 | |||
792 | UtDisplaySummary ( |
||
793 | UINT32 FileId); |
||
794 | |||
795 | |||
796 | UtHexCharToValue ( |
||
797 | int HexChar); |
||
798 | |||
799 | |||
800 | UtConvertByteToHex ( |
||
801 | UINT8 RawByte, |
||
802 | UINT8 *Buffer); |
||
803 | |||
804 | |||
805 | UtConvertByteToAsmHex ( |
||
806 | UINT8 RawByte, |
||
807 | UINT8 *Buffer); |
||
808 | |||
809 | |||
810 | UtGetOpName ( |
||
811 | UINT32 ParseOpcode); |
||
812 | |||
813 | |||
814 | UtSetParseOpName ( |
||
815 | ACPI_PARSE_OBJECT *Op); |
||
816 | |||
817 | |||
818 | UtGetStringBuffer ( |
||
819 | UINT32 Length); |
||
820 | |||
821 | |||
822 | UtInternalizeName ( |
||
823 | char *ExternalName, |
||
824 | char **ConvertedName); |
||
825 | |||
826 | |||
827 | UtAttachNamepathToOwner ( |
||
828 | ACPI_PARSE_OBJECT *Op, |
||
829 | ACPI_PARSE_OBJECT *NameNode); |
||
830 | |||
831 | |||
832 | UtCheckIntegerRange ( |
||
833 | ACPI_PARSE_OBJECT *Op, |
||
834 | UINT32 LowValue, |
||
835 | UINT32 HighValue); |
||
836 | |||
837 | |||
838 | UtDoConstant ( |
||
839 | char *String); |
||
840 | |||
841 | |||
2216 | Serge | 842 | UtStrtoul64 ( |
843 | char *String, |
||
844 | UINT32 Base, |
||
845 | UINT64 *RetInteger); |
||
846 | |||
1498 | serge | 847 | |
2216 | Serge | 848 | |
1498 | serge | 849 | * asluuid - UUID support |
2216 | Serge | 850 | */ |
851 | ACPI_STATUS |
||
852 | AuValidateUuid ( |
||
853 | char *InString); |
||
854 | |||
855 | |||
856 | AuConvertStringToUuid ( |
||
857 | char *InString, |
||
858 | char *UuIdBuffer); |
||
859 | |||
860 | |||
861 | AuConvertUuidToString ( |
||
862 | char *UuIdBuffer, |
||
863 | char *OutString); |
||
864 | |||
865 | |||
866 | * aslresource - Resource template generation utilities |
||
1498 | serge | 867 | */ |
868 | void |
||
869 | RsSmallAddressCheck ( |
||
870 | UINT8 Type, |
||
871 | UINT32 Minimum, |
||
872 | UINT32 Maximum, |
||
873 | UINT32 Length, |
||
874 | UINT32 Alignment, |
||
875 | ACPI_PARSE_OBJECT *MinOp, |
||
876 | ACPI_PARSE_OBJECT *MaxOp, |
||
877 | ACPI_PARSE_OBJECT *LengthOp, |
||
878 | ACPI_PARSE_OBJECT *AlignOp, |
||
2216 | Serge | 879 | ACPI_PARSE_OBJECT *Op); |
880 | |||
1498 | serge | 881 | |
882 | RsLargeAddressCheck ( |
||
883 | UINT64 Minimum, |
||
884 | UINT64 Maximum, |
||
885 | UINT64 Length, |
||
886 | UINT64 Granularity, |
||
887 | UINT8 Flags, |
||
888 | ACPI_PARSE_OBJECT *MinOp, |
||
889 | ACPI_PARSE_OBJECT *MaxOp, |
||
890 | ACPI_PARSE_OBJECT *LengthOp, |
||
891 | ACPI_PARSE_OBJECT *GranOp, |
||
2216 | Serge | 892 | ACPI_PARSE_OBJECT *Op); |
893 | |||
1498 | serge | 894 | |
895 | RsGetStringDataLength ( |
||
896 | ACPI_PARSE_OBJECT *InitializerOp); |
||
897 | |||
898 | |||
899 | RsAllocateResourceNode ( |
||
900 | UINT32 Size); |
||
901 | |||
902 | |||
903 | RsCreateBitField ( |
||
904 | ACPI_PARSE_OBJECT *Op, |
||
905 | char *Name, |
||
906 | UINT32 ByteOffset, |
||
907 | UINT32 BitOffset); |
||
908 | |||
909 | |||
910 | RsCreateByteField ( |
||
911 | ACPI_PARSE_OBJECT *Op, |
||
912 | char *Name, |
||
913 | UINT32 ByteOffset); |
||
914 | |||
915 | |||
916 | RsSetFlagBits ( |
||
917 | UINT8 *Flags, |
||
918 | ACPI_PARSE_OBJECT *Op, |
||
919 | UINT8 Position, |
||
920 | UINT8 DefaultBit); |
||
921 | |||
922 | |||
923 | RsCompleteNodeAndGetNext ( |
||
924 | ACPI_PARSE_OBJECT *Op); |
||
925 | |||
926 | |||
927 | RsCheckListForDuplicates ( |
||
928 | ACPI_PARSE_OBJECT *Op); |
||
929 | |||
930 | |||
931 | RsDoOneResourceDescriptor ( |
||
932 | ACPI_PARSE_OBJECT *DescriptorTypeOp, |
||
933 | UINT32 CurrentByteOffset, |
||
934 | UINT8 *State); |
||
935 | |||
936 | |||
937 | |||
938 | |||
939 | #define ACPI_RSTATE_START_DEPENDENT 1 |
||
940 | #define ACPI_RSTATE_DEPENDENT_LIST 2 |
||
941 | |||
942 | |||
943 | RsLinkDescriptorChain ( |
||
944 | ASL_RESOURCE_NODE **PreviousRnode, |
||
945 | ASL_RESOURCE_NODE *Rnode); |
||
946 | |||
947 | |||
948 | RsDoResourceTemplate ( |
||
949 | ACPI_PARSE_OBJECT *Op); |
||
950 | |||
951 | |||
952 | |||
953 | * aslrestype1 - Miscellaneous Small descriptors |
||
954 | */ |
||
955 | ASL_RESOURCE_NODE * |
||
956 | RsDoEndTagDescriptor ( |
||
957 | ACPI_PARSE_OBJECT *Op, |
||
958 | UINT32 CurrentByteOffset); |
||
959 | |||
960 | |||
961 | RsDoEndDependentDescriptor ( |
||
962 | ACPI_PARSE_OBJECT *Op, |
||
963 | UINT32 CurrentByteOffset); |
||
964 | |||
965 | |||
966 | RsDoMemory24Descriptor ( |
||
967 | ACPI_PARSE_OBJECT *Op, |
||
968 | UINT32 CurrentByteOffset); |
||
969 | |||
970 | |||
971 | RsDoMemory32Descriptor ( |
||
972 | ACPI_PARSE_OBJECT *Op, |
||
973 | UINT32 CurrentByteOffset); |
||
974 | |||
975 | |||
976 | RsDoMemory32FixedDescriptor ( |
||
977 | ACPI_PARSE_OBJECT *Op, |
||
978 | UINT32 CurrentByteOffset); |
||
979 | |||
980 | |||
981 | RsDoStartDependentDescriptor ( |
||
982 | ACPI_PARSE_OBJECT *Op, |
||
983 | UINT32 CurrentByteOffset); |
||
984 | |||
985 | |||
986 | RsDoStartDependentNoPriDescriptor ( |
||
987 | ACPI_PARSE_OBJECT *Op, |
||
988 | UINT32 CurrentByteOffset); |
||
989 | |||
990 | |||
991 | RsDoVendorSmallDescriptor ( |
||
992 | ACPI_PARSE_OBJECT *Op, |
||
993 | UINT32 CurrentByteOffset); |
||
994 | |||
995 | |||
996 | |||
997 | * aslrestype1i - I/O-related Small descriptors |
||
998 | */ |
||
999 | ASL_RESOURCE_NODE * |
||
1000 | RsDoDmaDescriptor ( |
||
1001 | ACPI_PARSE_OBJECT *Op, |
||
1002 | UINT32 CurrentByteOffset); |
||
1003 | |||
1004 | |||
1005 | RsDoFixedIoDescriptor ( |
||
1006 | ACPI_PARSE_OBJECT *Op, |
||
1007 | UINT32 CurrentByteOffset); |
||
1008 | |||
1009 | |||
1010 | RsDoIoDescriptor ( |
||
1011 | ACPI_PARSE_OBJECT *Op, |
||
1012 | UINT32 CurrentByteOffset); |
||
1013 | |||
1014 | |||
1015 | RsDoIrqDescriptor ( |
||
1016 | ACPI_PARSE_OBJECT *Op, |
||
1017 | UINT32 CurrentByteOffset); |
||
1018 | |||
1019 | |||
1020 | RsDoIrqNoFlagsDescriptor ( |
||
1021 | ACPI_PARSE_OBJECT *Op, |
||
1022 | UINT32 CurrentByteOffset); |
||
1023 | |||
1024 | |||
1025 | |||
1026 | * aslrestype2 - Large resource descriptors |
||
1027 | */ |
||
1028 | ASL_RESOURCE_NODE * |
||
1029 | RsDoInterruptDescriptor ( |
||
1030 | ACPI_PARSE_OBJECT *Op, |
||
1031 | UINT32 CurrentByteOffset); |
||
1032 | |||
1033 | |||
1034 | RsDoVendorLargeDescriptor ( |
||
1035 | ACPI_PARSE_OBJECT *Op, |
||
1036 | UINT32 CurrentByteOffset); |
||
1037 | |||
1038 | |||
1039 | RsDoGeneralRegisterDescriptor ( |
||
1040 | ACPI_PARSE_OBJECT *Op, |
||
1041 | UINT32 CurrentByteOffset); |
||
1042 | |||
1043 | |||
1044 | |||
1045 | * aslrestype2d - DWord address descriptors |
||
1046 | */ |
||
1047 | ASL_RESOURCE_NODE * |
||
1048 | RsDoDwordIoDescriptor ( |
||
1049 | ACPI_PARSE_OBJECT *Op, |
||
1050 | UINT32 CurrentByteOffset); |
||
1051 | |||
1052 | |||
1053 | RsDoDwordMemoryDescriptor ( |
||
1054 | ACPI_PARSE_OBJECT *Op, |
||
1055 | UINT32 CurrentByteOffset); |
||
1056 | |||
1057 | |||
1058 | RsDoDwordSpaceDescriptor ( |
||
1059 | ACPI_PARSE_OBJECT *Op, |
||
1060 | UINT32 CurrentByteOffset); |
||
1061 | |||
1062 | |||
1063 | |||
1064 | * aslrestype2e - Extended address descriptors |
||
1065 | */ |
||
1066 | ASL_RESOURCE_NODE * |
||
1067 | RsDoExtendedIoDescriptor ( |
||
1068 | ACPI_PARSE_OBJECT *Op, |
||
1069 | UINT32 CurrentByteOffset); |
||
1070 | |||
1071 | |||
1072 | RsDoExtendedMemoryDescriptor ( |
||
1073 | ACPI_PARSE_OBJECT *Op, |
||
1074 | UINT32 CurrentByteOffset); |
||
1075 | |||
1076 | |||
1077 | RsDoExtendedSpaceDescriptor ( |
||
1078 | ACPI_PARSE_OBJECT *Op, |
||
1079 | UINT32 CurrentByteOffset); |
||
1080 | |||
1081 | |||
1082 | |||
1083 | * aslrestype2q - QWord address descriptors |
||
1084 | */ |
||
1085 | ASL_RESOURCE_NODE * |
||
1086 | RsDoQwordIoDescriptor ( |
||
1087 | ACPI_PARSE_OBJECT *Op, |
||
1088 | UINT32 CurrentByteOffset); |
||
1089 | |||
1090 | |||
1091 | RsDoQwordMemoryDescriptor ( |
||
1092 | ACPI_PARSE_OBJECT *Op, |
||
1093 | UINT32 CurrentByteOffset); |
||
1094 | |||
1095 | |||
1096 | RsDoQwordSpaceDescriptor ( |
||
1097 | ACPI_PARSE_OBJECT *Op, |
||
1098 | UINT32 CurrentByteOffset); |
||
1099 | |||
1100 | |||
1101 | |||
1102 | * aslrestype2w - Word address descriptors |
||
1103 | */ |
||
1104 | ASL_RESOURCE_NODE * |
||
1105 | RsDoWordIoDescriptor ( |
||
1106 | ACPI_PARSE_OBJECT *Op, |
||
1107 | UINT32 CurrentByteOffset); |
||
1108 | |||
1109 | |||
1110 | RsDoWordSpaceDescriptor ( |
||
1111 | ACPI_PARSE_OBJECT *Op, |
||
1112 | UINT32 CurrentByteOffset); |
||
1113 | |||
1114 | |||
1115 | RsDoWordBusNumberDescriptor ( |
||
1116 | ACPI_PARSE_OBJECT *Op, |
||
1117 | UINT32 CurrentByteOffset); |
||
1118 | |||
1119 | |||
1120 | * Entry to data table compiler subsystem |
||
1121 | */ |
||
1122 | ACPI_STATUS |
||
1123 | DtDoCompile( |
||
1124 | void); |
||
1125 | |||
1126 | |||
2216 | Serge | 1127 | DtCreateTemplates ( |
1128 | char *Signature); |
||
1129 | |||
1130 | |||
1498 | serge | 1131 |