Fixed compatibility of output.
[AROS.git] / arch / all-pc / acpica / source / compiler / aslcompiler.h
blobb8648a628fa504b156e3ba5c153c612986c91efd
1 /******************************************************************************
3 * Module Name: aslcompiler.h - common include file for iASL
5 *****************************************************************************/
7 /*
8 * Copyright (C) 2000 - 2013, Intel Corp.
9 * All rights reserved.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
45 #ifndef __ASLCOMPILER_H
46 #define __ASLCOMPILER_H
48 #include "acpi.h"
49 #include "accommon.h"
50 #include "amlresrc.h"
51 #include "acdebug.h"
53 /* Microsoft-specific */
55 #if (defined WIN32 || defined WIN64)
57 /* warn : used #pragma pack */
58 #pragma warning(disable:4103)
60 /* warn : named type definition in parentheses */
61 #pragma warning(disable:4115)
62 #endif
64 #include <stdio.h>
65 #include <stdlib.h>
66 #include <stdarg.h>
67 #include <string.h>
68 #include <errno.h>
69 #include <ctype.h>
71 /* Compiler headers */
73 #include "asldefine.h"
74 #include "asltypes.h"
75 #include "aslmessages.h"
76 #include "aslglobal.h"
77 #include "preprocess.h"
80 /*******************************************************************************
82 * Compiler prototypes
84 ******************************************************************************/
87 * Main ASL parser - generated from flex/bison, lex/yacc, etc.
89 ACPI_PARSE_OBJECT *
90 AslDoError (
91 void);
93 int
94 AslCompilerlex(
95 void);
97 void
98 AslResetCurrentLineBuffer (
99 void);
101 void
102 AslInsertLineBuffer (
103 int SourceChar);
106 AslPopInputFileStack (
107 void);
109 void
110 AslPushInputFileStack (
111 FILE *InputFile,
112 char *Filename);
115 * aslstartup - entered from main()
117 void
118 AslInitializeGlobals (
119 void);
121 typedef
122 ACPI_STATUS (*ASL_PATHNAME_CALLBACK) (
123 char *);
125 ACPI_STATUS
126 AslDoOneFile (
127 char *Filename);
129 ACPI_STATUS
130 AslCheckForErrorExit (
131 void);
135 * aslcompile - compile mainline
137 void
138 AslCompilerSignon (
139 UINT32 FileId);
141 void
142 AslCompilerFileHeader (
143 UINT32 FileId);
146 CmDoCompile (
147 void);
149 void
150 CmDoOutputFiles (
151 void);
153 void
154 CmCleanupAndExit (
155 void);
157 ACPI_STATUS
158 FlCheckForAcpiTable (
159 FILE *Handle);
161 ACPI_STATUS
162 FlCheckForAscii (
163 FILE *Handle,
164 char *Filename,
165 BOOLEAN DisplayErrors);
169 * aslwalks - semantic analysis and parse tree walks
171 ACPI_STATUS
172 AnOtherSemanticAnalysisWalkBegin (
173 ACPI_PARSE_OBJECT *Op,
174 UINT32 Level,
175 void *Context);
177 ACPI_STATUS
178 AnOtherSemanticAnalysisWalkEnd (
179 ACPI_PARSE_OBJECT *Op,
180 UINT32 Level,
181 void *Context);
183 ACPI_STATUS
184 AnOperandTypecheckWalkEnd (
185 ACPI_PARSE_OBJECT *Op,
186 UINT32 Level,
187 void *Context);
189 ACPI_STATUS
190 AnMethodTypingWalkEnd (
191 ACPI_PARSE_OBJECT *Op,
192 UINT32 Level,
193 void *Context);
197 * aslmethod - Control method analysis walk
199 ACPI_STATUS
200 MtMethodAnalysisWalkBegin (
201 ACPI_PARSE_OBJECT *Op,
202 UINT32 Level,
203 void *Context);
205 ACPI_STATUS
206 MtMethodAnalysisWalkEnd (
207 ACPI_PARSE_OBJECT *Op,
208 UINT32 Level,
209 void *Context);
213 * aslbtypes - bitfield data types
215 UINT32
216 AnMapObjTypeToBtype (
217 ACPI_PARSE_OBJECT *Op);
219 UINT32
220 AnMapArgTypeToBtype (
221 UINT32 ArgType);
223 UINT32
224 AnGetBtype (
225 ACPI_PARSE_OBJECT *Op);
227 void
228 AnFormatBtype (
229 char *Buffer,
230 UINT32 Btype);
234 * aslanalyze - Support functions for parse tree walks
236 void
237 AnCheckId (
238 ACPI_PARSE_OBJECT *Op,
239 ACPI_NAME Type);
241 /* Values for Type argument above */
243 #define ASL_TYPE_HID 0
244 #define ASL_TYPE_CID 1
246 BOOLEAN
247 AnIsInternalMethod (
248 ACPI_PARSE_OBJECT *Op);
250 UINT32
251 AnGetInternalMethodReturnType (
252 ACPI_PARSE_OBJECT *Op);
254 BOOLEAN
255 AnLastStatementIsReturn (
256 ACPI_PARSE_OBJECT *Op);
258 void
259 AnCheckMethodReturnValue (
260 ACPI_PARSE_OBJECT *Op,
261 const ACPI_OPCODE_INFO *OpInfo,
262 ACPI_PARSE_OBJECT *ArgOp,
263 UINT32 RequiredBtypes,
264 UINT32 ThisNodeBtype);
266 BOOLEAN
267 AnIsResultUsed (
268 ACPI_PARSE_OBJECT *Op);
270 void
271 ApCheckForGpeNameConflict (
272 ACPI_PARSE_OBJECT *Op);
274 void
275 ApCheckRegMethod (
276 ACPI_PARSE_OBJECT *Op);
280 * aslerror - error handling/reporting
282 void
283 AslError (
284 UINT8 Level,
285 UINT8 MessageId,
286 ACPI_PARSE_OBJECT *Op,
287 char *ExtraMessage);
289 ACPI_STATUS
290 AslDisableException (
291 char *MessageIdString);
293 BOOLEAN
294 AslIsExceptionDisabled (
295 UINT8 Level,
296 UINT8 MessageId);
298 void
299 AslCoreSubsystemError (
300 ACPI_PARSE_OBJECT *Op,
301 ACPI_STATUS Status,
302 char *ExtraMessage,
303 BOOLEAN Abort);
306 AslCompilererror(
307 const char *s);
309 void
310 AslCommonError (
311 UINT8 Level,
312 UINT8 MessageId,
313 UINT32 CurrentLineNumber,
314 UINT32 LogicalLineNumber,
315 UINT32 LogicalByteOffset,
316 UINT32 Column,
317 char *Filename,
318 char *ExtraMessage);
320 void
321 AslCommonError2 (
322 UINT8 Level,
323 UINT8 MessageId,
324 UINT32 LineNumber,
325 UINT32 Column,
326 char *SourceLine,
327 char *Filename,
328 char *ExtraMessage);
330 void
331 AePrintException (
332 UINT32 FileId,
333 ASL_ERROR_MSG *Enode,
334 char *Header);
336 void
337 AePrintErrorLog (
338 UINT32 FileId);
340 void
341 AeClearErrorLog (
342 void);
344 ACPI_PHYSICAL_ADDRESS
345 AeLocalGetRootPointer (
346 void);
350 * asllisting - generate all "listing" type files
352 void
353 LsDoListings (
354 void);
356 void
357 LsWriteNodeToAsmListing (
358 ACPI_PARSE_OBJECT *Op);
360 void
361 LsWriteNode (
362 ACPI_PARSE_OBJECT *Op,
363 UINT32 FileId);
365 void
366 LsDumpParseTree (
367 void);
371 * asllistsup - Listing file support utilities
373 void
374 LsDumpAscii (
375 UINT32 FileId,
376 UINT32 Count,
377 UINT8 *Buffer);
379 void
380 LsDumpAsciiInComment (
381 UINT32 FileId,
382 UINT32 Count,
383 UINT8 *Buffer);
385 void
386 LsCheckException (
387 UINT32 LineNumber,
388 UINT32 FileId);
390 void
391 LsFlushListingBuffer (
392 UINT32 FileId);
394 void
395 LsWriteListingHexBytes (
396 UINT8 *Buffer,
397 UINT32 Length,
398 UINT32 FileId);
400 void
401 LsWriteSourceLines (
402 UINT32 ToLineNumber,
403 UINT32 ToLogicalLineNumber,
404 UINT32 FileId);
406 UINT32
407 LsWriteOneSourceLine (
408 UINT32 FileId);
410 void
411 LsPushNode (
412 char *Filename);
414 ASL_LISTING_NODE *
415 LsPopNode (
416 void);
420 * aslhex - generate all "hex" output files (C, ASM, ASL)
422 void
423 HxDoHexOutput (
424 void);
428 * aslfold - constant folding
430 ACPI_STATUS
431 OpcAmlConstantWalk (
432 ACPI_PARSE_OBJECT *Op,
433 UINT32 Level,
434 void *Context);
438 * asloffset - generate C offset file for BIOS support
440 ACPI_STATUS
441 LsAmlOffsetWalk (
442 ACPI_PARSE_OBJECT *Op,
443 UINT32 Level,
444 void *Context);
446 void
447 LsDoOffsetTableHeader (
448 UINT32 FileId);
450 void
451 LsDoOffsetTableFooter (
452 UINT32 FileId);
456 * aslopcodes - generate AML opcodes
458 ACPI_STATUS
459 OpcAmlOpcodeWalk (
460 ACPI_PARSE_OBJECT *Op,
461 UINT32 Level,
462 void *Context);
464 ACPI_STATUS
465 OpcAmlOpcodeUpdateWalk (
466 ACPI_PARSE_OBJECT *Op,
467 UINT32 Level,
468 void *Context);
470 void
471 OpcGenerateAmlOpcode (
472 ACPI_PARSE_OBJECT *Op);
474 UINT32
475 OpcSetOptimalIntegerSize (
476 ACPI_PARSE_OBJECT *Op);
478 void
479 OpcGetIntegerWidth (
480 ACPI_PARSE_OBJECT *Op);
484 * asloperands - generate AML operands for the AML opcodes
486 ACPI_PARSE_OBJECT *
487 UtGetArg (
488 ACPI_PARSE_OBJECT *Op,
489 UINT32 Argn);
491 void
492 OpnGenerateAmlOperands (
493 ACPI_PARSE_OBJECT *Op);
495 void
496 OpnDoPackage (
497 ACPI_PARSE_OBJECT *Op);
501 * aslopt - optmization
503 void
504 OptOptimizeNamePath (
505 ACPI_PARSE_OBJECT *Op,
506 UINT32 Flags,
507 ACPI_WALK_STATE *WalkState,
508 char *AmlNameString,
509 ACPI_NAMESPACE_NODE *TargetNode);
513 * aslcodegen - code generation
515 void
516 CgGenerateAmlOutput (
517 void);
521 * aslfile
523 void
524 FlOpenFile (
525 UINT32 FileId,
526 char *Filename,
527 char *Mode);
531 * asllength - calculate/adjust AML package lengths
533 ACPI_STATUS
534 LnPackageLengthWalk (
535 ACPI_PARSE_OBJECT *Op,
536 UINT32 Level,
537 void *Context);
539 ACPI_STATUS
540 LnInitLengthsWalk (
541 ACPI_PARSE_OBJECT *Op,
542 UINT32 Level,
543 void *Context);
545 void
546 CgGenerateAmlLengths (
547 ACPI_PARSE_OBJECT *Op);
551 * aslmap - opcode mappings and reserved method names
553 ACPI_OBJECT_TYPE
554 AslMapNamedOpcodeToDataType (
555 UINT16 Opcode);
559 * aslpredef - ACPI predefined names support
561 BOOLEAN
562 ApCheckForPredefinedMethod (
563 ACPI_PARSE_OBJECT *Op,
564 ASL_METHOD_INFO *MethodInfo);
566 void
567 ApCheckPredefinedReturnValue (
568 ACPI_PARSE_OBJECT *Op,
569 ASL_METHOD_INFO *MethodInfo);
571 UINT32
572 ApCheckForPredefinedName (
573 ACPI_PARSE_OBJECT *Op,
574 char *Name);
576 void
577 ApCheckForPredefinedObject (
578 ACPI_PARSE_OBJECT *Op,
579 char *Name);
581 ACPI_STATUS
582 ApCheckObjectType (
583 const char *PredefinedName,
584 ACPI_PARSE_OBJECT *Op,
585 UINT32 ExpectedBtypes,
586 UINT32 PackageIndex);
588 void
589 ApDisplayReservedNames (
590 void);
594 * aslprepkg - ACPI predefined names support for packages
596 void
597 ApCheckPackage (
598 ACPI_PARSE_OBJECT *ParentOp,
599 const ACPI_PREDEFINED_INFO *Predefined);
603 * asltransform - parse tree transformations
605 ACPI_STATUS
606 TrAmlTransformWalk (
607 ACPI_PARSE_OBJECT *Op,
608 UINT32 Level,
609 void *Context);
613 * asltree - parse tree support
615 ACPI_STATUS
616 TrWalkParseTree (
617 ACPI_PARSE_OBJECT *Op,
618 UINT32 Visitation,
619 ASL_WALK_CALLBACK DescendingCallback,
620 ASL_WALK_CALLBACK AscendingCallback,
621 void *Context);
623 /* Values for "Visitation" parameter above */
625 #define ASL_WALK_VISIT_DOWNWARD 0x01
626 #define ASL_WALK_VISIT_UPWARD 0x02
627 #define ASL_WALK_VISIT_TWICE (ASL_WALK_VISIT_DOWNWARD | ASL_WALK_VISIT_UPWARD)
630 ACPI_PARSE_OBJECT *
631 TrAllocateNode (
632 UINT32 ParseOpcode);
634 void
635 TrReleaseNode (
636 ACPI_PARSE_OBJECT *Op);
638 ACPI_PARSE_OBJECT *
639 TrUpdateNode (
640 UINT32 ParseOpcode,
641 ACPI_PARSE_OBJECT *Op);
643 ACPI_PARSE_OBJECT *
644 TrCreateNode (
645 UINT32 ParseOpcode,
646 UINT32 NumChildren,
647 ...);
649 ACPI_PARSE_OBJECT *
650 TrCreateLeafNode (
651 UINT32 ParseOpcode);
653 ACPI_PARSE_OBJECT *
654 TrCreateValuedLeafNode (
655 UINT32 ParseOpcode,
656 UINT64 Value);
658 ACPI_PARSE_OBJECT *
659 TrCreateConstantLeafNode (
660 UINT32 ParseOpcode);
662 ACPI_PARSE_OBJECT *
663 TrLinkChildren (
664 ACPI_PARSE_OBJECT *Op,
665 UINT32 NumChildren,
666 ...);
668 void
669 TrSetEndLineNumber (
670 ACPI_PARSE_OBJECT *Op);
672 void
673 TrWalkTree (
674 void);
676 ACPI_PARSE_OBJECT *
677 TrLinkPeerNode (
678 ACPI_PARSE_OBJECT *Op1,
679 ACPI_PARSE_OBJECT *Op2);
681 ACPI_PARSE_OBJECT *
682 TrLinkChildNode (
683 ACPI_PARSE_OBJECT *Op1,
684 ACPI_PARSE_OBJECT *Op2);
686 ACPI_PARSE_OBJECT *
687 TrSetNodeFlags (
688 ACPI_PARSE_OBJECT *Op,
689 UINT32 Flags);
691 ACPI_PARSE_OBJECT *
692 TrSetNodeAmlLength (
693 ACPI_PARSE_OBJECT *Op,
694 UINT32 Length);
696 ACPI_PARSE_OBJECT *
697 TrLinkPeerNodes (
698 UINT32 NumPeers,
699 ...);
703 * aslfiles - File I/O support
705 void
706 AslAbort (
707 void);
709 void
710 FlAddIncludeDirectory (
711 char *Dir);
713 char *
714 FlMergePathnames (
715 char *PrefixDir,
716 char *FilePathname);
718 void
719 FlOpenIncludeFile (
720 ACPI_PARSE_OBJECT *Op);
722 void
723 FlFileError (
724 UINT32 FileId,
725 UINT8 ErrorId);
727 UINT32
728 FlGetFileSize (
729 UINT32 FileId);
731 ACPI_STATUS
732 FlReadFile (
733 UINT32 FileId,
734 void *Buffer,
735 UINT32 Length);
737 void
738 FlWriteFile (
739 UINT32 FileId,
740 void *Buffer,
741 UINT32 Length);
743 void
744 FlSeekFile (
745 UINT32 FileId,
746 long Offset);
748 void
749 FlCloseFile (
750 UINT32 FileId);
752 void
753 FlPrintFile (
754 UINT32 FileId,
755 char *Format,
756 ...);
758 void
759 FlDeleteFile (
760 UINT32 FileId);
762 void
763 FlSetLineNumber (
764 UINT32 LineNumber);
766 void
767 FlSetFilename (
768 char *Filename);
770 ACPI_STATUS
771 FlOpenInputFile (
772 char *InputFilename);
774 ACPI_STATUS
775 FlOpenAmlOutputFile (
776 char *InputFilename);
778 ACPI_STATUS
779 FlOpenMiscOutputFiles (
780 char *InputFilename);
784 * asload - load namespace in prep for cross reference
786 ACPI_STATUS
787 LdLoadNamespace (
788 ACPI_PARSE_OBJECT *RootOp);
792 * asllookup - namespace lookup functions
794 void
795 LkFindUnreferencedObjects (
796 void);
799 * aslmain - startup
801 void
802 Usage (
803 void);
805 void
806 AslFilenameHelp (
807 void);
811 * aslnamesp - namespace output file generation
813 ACPI_STATUS
814 NsDisplayNamespace (
815 void);
817 void
818 NsSetupNamespaceListing (
819 void *Handle);
822 * asloptions - command line processing
825 AslCommandLine (
826 int argc,
827 char **argv);
830 * aslxref - namespace cross reference
832 ACPI_STATUS
833 XfCrossReferenceNamespace (
834 void);
838 * aslutils - common compiler utilites
840 void
841 DbgPrint (
842 UINT32 Type,
843 char *Format,
844 ...);
846 /* Type values for above */
848 #define ASL_DEBUG_OUTPUT 0
849 #define ASL_PARSE_OUTPUT 1
850 #define ASL_TREE_OUTPUT 2
852 void
853 UtDisplaySupportedTables (
854 void);
856 void
857 UtDisplayConstantOpcodes (
858 void);
860 UINT8
861 UtBeginEvent (
862 char *Name);
864 void
865 UtEndEvent (
866 UINT8 Event);
868 void *
869 UtLocalCalloc (
870 UINT32 Size);
872 void
873 UtPrintFormattedName (
874 UINT16 ParseOpcode,
875 UINT32 Level);
877 void
878 UtDisplaySummary (
879 UINT32 FileId);
881 UINT8
882 UtHexCharToValue (
883 int HexChar);
885 void
886 UtConvertByteToHex (
887 UINT8 RawByte,
888 UINT8 *Buffer);
890 void
891 UtConvertByteToAsmHex (
892 UINT8 RawByte,
893 UINT8 *Buffer);
895 char *
896 UtGetOpName (
897 UINT32 ParseOpcode);
899 void
900 UtSetParseOpName (
901 ACPI_PARSE_OBJECT *Op);
903 char *
904 UtGetStringBuffer (
905 UINT32 Length);
907 void
908 UtExpandLineBuffers (
909 void);
911 ACPI_STATUS
912 UtInternalizeName (
913 char *ExternalName,
914 char **ConvertedName);
916 void
917 UtAttachNamepathToOwner (
918 ACPI_PARSE_OBJECT *Op,
919 ACPI_PARSE_OBJECT *NameNode);
921 ACPI_PARSE_OBJECT *
922 UtCheckIntegerRange (
923 ACPI_PARSE_OBJECT *Op,
924 UINT32 LowValue,
925 UINT32 HighValue);
927 UINT64
928 UtDoConstant (
929 char *String);
931 ACPI_STATUS
932 UtStrtoul64 (
933 char *String,
934 UINT32 Base,
935 UINT64 *RetInteger);
939 * asluuid - UUID support
941 ACPI_STATUS
942 AuValidateUuid (
943 char *InString);
945 ACPI_STATUS
946 AuConvertStringToUuid (
947 char *InString,
948 char *UuIdBuffer);
950 ACPI_STATUS
951 AuConvertUuidToString (
952 char *UuIdBuffer,
953 char *OutString);
956 * aslresource - Resource template generation utilities
958 void
959 RsSmallAddressCheck (
960 UINT8 Type,
961 UINT32 Minimum,
962 UINT32 Maximum,
963 UINT32 Length,
964 UINT32 Alignment,
965 ACPI_PARSE_OBJECT *MinOp,
966 ACPI_PARSE_OBJECT *MaxOp,
967 ACPI_PARSE_OBJECT *LengthOp,
968 ACPI_PARSE_OBJECT *AlignOp,
969 ACPI_PARSE_OBJECT *Op);
971 void
972 RsLargeAddressCheck (
973 UINT64 Minimum,
974 UINT64 Maximum,
975 UINT64 Length,
976 UINT64 Granularity,
977 UINT8 Flags,
978 ACPI_PARSE_OBJECT *MinOp,
979 ACPI_PARSE_OBJECT *MaxOp,
980 ACPI_PARSE_OBJECT *LengthOp,
981 ACPI_PARSE_OBJECT *GranOp,
982 ACPI_PARSE_OBJECT *Op);
984 UINT16
985 RsGetStringDataLength (
986 ACPI_PARSE_OBJECT *InitializerOp);
988 ASL_RESOURCE_NODE *
989 RsAllocateResourceNode (
990 UINT32 Size);
992 void
993 RsCreateResourceField (
994 ACPI_PARSE_OBJECT *Op,
995 char *Name,
996 UINT32 ByteOffset,
997 UINT32 BitOffset,
998 UINT32 BitLength);
1000 void
1001 RsSetFlagBits (
1002 UINT8 *Flags,
1003 ACPI_PARSE_OBJECT *Op,
1004 UINT8 Position,
1005 UINT8 DefaultBit);
1007 void
1008 RsSetFlagBits16 (
1009 UINT16 *Flags,
1010 ACPI_PARSE_OBJECT *Op,
1011 UINT8 Position,
1012 UINT8 DefaultBit);
1014 ACPI_PARSE_OBJECT *
1015 RsCompleteNodeAndGetNext (
1016 ACPI_PARSE_OBJECT *Op);
1018 void
1019 RsCheckListForDuplicates (
1020 ACPI_PARSE_OBJECT *Op);
1022 ASL_RESOURCE_NODE *
1023 RsDoOneResourceDescriptor (
1024 ACPI_PARSE_OBJECT *DescriptorTypeOp,
1025 UINT32 CurrentByteOffset,
1026 UINT8 *State);
1028 /* Values for State above */
1030 #define ACPI_RSTATE_NORMAL 0
1031 #define ACPI_RSTATE_START_DEPENDENT 1
1032 #define ACPI_RSTATE_DEPENDENT_LIST 2
1034 UINT32
1035 RsLinkDescriptorChain (
1036 ASL_RESOURCE_NODE **PreviousRnode,
1037 ASL_RESOURCE_NODE *Rnode);
1039 void
1040 RsDoResourceTemplate (
1041 ACPI_PARSE_OBJECT *Op);
1045 * aslrestype1 - Miscellaneous Small descriptors
1047 ASL_RESOURCE_NODE *
1048 RsDoEndTagDescriptor (
1049 ACPI_PARSE_OBJECT *Op,
1050 UINT32 CurrentByteOffset);
1052 ASL_RESOURCE_NODE *
1053 RsDoEndDependentDescriptor (
1054 ACPI_PARSE_OBJECT *Op,
1055 UINT32 CurrentByteOffset);
1057 ASL_RESOURCE_NODE *
1058 RsDoMemory24Descriptor (
1059 ACPI_PARSE_OBJECT *Op,
1060 UINT32 CurrentByteOffset);
1062 ASL_RESOURCE_NODE *
1063 RsDoMemory32Descriptor (
1064 ACPI_PARSE_OBJECT *Op,
1065 UINT32 CurrentByteOffset);
1067 ASL_RESOURCE_NODE *
1068 RsDoMemory32FixedDescriptor (
1069 ACPI_PARSE_OBJECT *Op,
1070 UINT32 CurrentByteOffset);
1072 ASL_RESOURCE_NODE *
1073 RsDoStartDependentDescriptor (
1074 ACPI_PARSE_OBJECT *Op,
1075 UINT32 CurrentByteOffset);
1077 ASL_RESOURCE_NODE *
1078 RsDoStartDependentNoPriDescriptor (
1079 ACPI_PARSE_OBJECT *Op,
1080 UINT32 CurrentByteOffset);
1082 ASL_RESOURCE_NODE *
1083 RsDoVendorSmallDescriptor (
1084 ACPI_PARSE_OBJECT *Op,
1085 UINT32 CurrentByteOffset);
1089 * aslrestype1i - I/O-related Small descriptors
1091 ASL_RESOURCE_NODE *
1092 RsDoDmaDescriptor (
1093 ACPI_PARSE_OBJECT *Op,
1094 UINT32 CurrentByteOffset);
1096 ASL_RESOURCE_NODE *
1097 RsDoFixedDmaDescriptor (
1098 ACPI_PARSE_OBJECT *Op,
1099 UINT32 CurrentByteOffset);
1101 ASL_RESOURCE_NODE *
1102 RsDoFixedIoDescriptor (
1103 ACPI_PARSE_OBJECT *Op,
1104 UINT32 CurrentByteOffset);
1106 ASL_RESOURCE_NODE *
1107 RsDoIoDescriptor (
1108 ACPI_PARSE_OBJECT *Op,
1109 UINT32 CurrentByteOffset);
1111 ASL_RESOURCE_NODE *
1112 RsDoIrqDescriptor (
1113 ACPI_PARSE_OBJECT *Op,
1114 UINT32 CurrentByteOffset);
1116 ASL_RESOURCE_NODE *
1117 RsDoIrqNoFlagsDescriptor (
1118 ACPI_PARSE_OBJECT *Op,
1119 UINT32 CurrentByteOffset);
1123 * aslrestype2 - Large resource descriptors
1125 ASL_RESOURCE_NODE *
1126 RsDoInterruptDescriptor (
1127 ACPI_PARSE_OBJECT *Op,
1128 UINT32 CurrentByteOffset);
1130 ASL_RESOURCE_NODE *
1131 RsDoVendorLargeDescriptor (
1132 ACPI_PARSE_OBJECT *Op,
1133 UINT32 CurrentByteOffset);
1135 ASL_RESOURCE_NODE *
1136 RsDoGeneralRegisterDescriptor (
1137 ACPI_PARSE_OBJECT *Op,
1138 UINT32 CurrentByteOffset);
1140 ASL_RESOURCE_NODE *
1141 RsDoGpioIntDescriptor (
1142 ACPI_PARSE_OBJECT *Op,
1143 UINT32 CurrentByteOffset);
1145 ASL_RESOURCE_NODE *
1146 RsDoGpioIoDescriptor (
1147 ACPI_PARSE_OBJECT *Op,
1148 UINT32 CurrentByteOffset);
1150 ASL_RESOURCE_NODE *
1151 RsDoI2cSerialBusDescriptor (
1152 ACPI_PARSE_OBJECT *Op,
1153 UINT32 CurrentByteOffset);
1155 ASL_RESOURCE_NODE *
1156 RsDoSpiSerialBusDescriptor (
1157 ACPI_PARSE_OBJECT *Op,
1158 UINT32 CurrentByteOffset);
1160 ASL_RESOURCE_NODE *
1161 RsDoUartSerialBusDescriptor (
1162 ACPI_PARSE_OBJECT *Op,
1163 UINT32 CurrentByteOffset);
1166 * aslrestype2d - DWord address descriptors
1168 ASL_RESOURCE_NODE *
1169 RsDoDwordIoDescriptor (
1170 ACPI_PARSE_OBJECT *Op,
1171 UINT32 CurrentByteOffset);
1173 ASL_RESOURCE_NODE *
1174 RsDoDwordMemoryDescriptor (
1175 ACPI_PARSE_OBJECT *Op,
1176 UINT32 CurrentByteOffset);
1178 ASL_RESOURCE_NODE *
1179 RsDoDwordSpaceDescriptor (
1180 ACPI_PARSE_OBJECT *Op,
1181 UINT32 CurrentByteOffset);
1185 * aslrestype2e - Extended address descriptors
1187 ASL_RESOURCE_NODE *
1188 RsDoExtendedIoDescriptor (
1189 ACPI_PARSE_OBJECT *Op,
1190 UINT32 CurrentByteOffset);
1192 ASL_RESOURCE_NODE *
1193 RsDoExtendedMemoryDescriptor (
1194 ACPI_PARSE_OBJECT *Op,
1195 UINT32 CurrentByteOffset);
1197 ASL_RESOURCE_NODE *
1198 RsDoExtendedSpaceDescriptor (
1199 ACPI_PARSE_OBJECT *Op,
1200 UINT32 CurrentByteOffset);
1204 * aslrestype2q - QWord address descriptors
1206 ASL_RESOURCE_NODE *
1207 RsDoQwordIoDescriptor (
1208 ACPI_PARSE_OBJECT *Op,
1209 UINT32 CurrentByteOffset);
1211 ASL_RESOURCE_NODE *
1212 RsDoQwordMemoryDescriptor (
1213 ACPI_PARSE_OBJECT *Op,
1214 UINT32 CurrentByteOffset);
1216 ASL_RESOURCE_NODE *
1217 RsDoQwordSpaceDescriptor (
1218 ACPI_PARSE_OBJECT *Op,
1219 UINT32 CurrentByteOffset);
1223 * aslrestype2w - Word address descriptors
1225 ASL_RESOURCE_NODE *
1226 RsDoWordIoDescriptor (
1227 ACPI_PARSE_OBJECT *Op,
1228 UINT32 CurrentByteOffset);
1230 ASL_RESOURCE_NODE *
1231 RsDoWordSpaceDescriptor (
1232 ACPI_PARSE_OBJECT *Op,
1233 UINT32 CurrentByteOffset);
1235 ASL_RESOURCE_NODE *
1236 RsDoWordBusNumberDescriptor (
1237 ACPI_PARSE_OBJECT *Op,
1238 UINT32 CurrentByteOffset);
1241 * Entry to data table compiler subsystem
1243 ACPI_STATUS
1244 DtDoCompile(
1245 void);
1247 ACPI_STATUS
1248 DtCreateTemplates (
1249 char *Signature);
1251 #endif /* __ASLCOMPILER_H */