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