Home | History | Annotate | Line # | Download | only in compiler
aslcompiler.h revision 1.1
      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 "acpi.h"
    142 #include "accommon.h"
    143 #include "amlresrc.h"
    144 #include "acdebug.h"
    145 
    146 /* Compiler headers */
    147 
    148 #include "asldefine.h"
    149 #include "asltypes.h"
    150 #include "aslglobal.h"
    151 
    152 
    153 /*******************************************************************************
    154  *
    155  * Compiler prototypes
    156  *
    157  ******************************************************************************/
    158 
    159 /*
    160  * parser - generated from flex/bison, lex/yacc, etc.
    161  */
    162 int
    163 AslCompilerparse(
    164     void);
    165 
    166 ACPI_PARSE_OBJECT *
    167 AslDoError (
    168     void);
    169 
    170 int
    171 AslCompilerlex(
    172     void);
    173 
    174 void
    175 ResetCurrentLineBuffer (
    176     void);
    177 
    178 void
    179 InsertLineBuffer (
    180     int                     SourceChar);
    181 
    182 int
    183 AslPopInputFileStack (
    184     void);
    185 
    186 void
    187 AslPushInputFileStack (
    188     FILE                    *InputFile,
    189     char                    *Filename);
    190 
    191 /*
    192  * aslstartup - called from main
    193  */
    194 ACPI_STATUS
    195 AslDoOnePathname (
    196     char                    *Pathname);
    197 
    198 ACPI_STATUS
    199 AslDoOneFile (
    200     char                    *Filename);
    201 
    202 /*
    203  * aslcompile - compile mainline
    204  */
    205 void
    206 AslCompilerSignon (
    207     UINT32                  FileId);
    208 
    209 void
    210 AslCompilerFileHeader (
    211     UINT32                  FileId);
    212 
    213 int
    214 CmDoCompile (
    215     void);
    216 
    217 void
    218 CmDoOutputFiles (
    219     void);
    220 
    221 void
    222 CmCleanupAndExit (
    223     void);
    224 
    225 ACPI_STATUS
    226 FlCheckForAscii (
    227     ASL_FILE_INFO           *FileInfo);
    228 
    229 
    230 /*
    231  * aslanalyze - semantic analysis
    232  */
    233 ACPI_STATUS
    234 AnOtherSemanticAnalysisWalkBegin (
    235     ACPI_PARSE_OBJECT       *Op,
    236     UINT32                  Level,
    237     void                    *Context);
    238 
    239 ACPI_STATUS
    240 AnOtherSemanticAnalysisWalkEnd (
    241     ACPI_PARSE_OBJECT       *Op,
    242     UINT32                  Level,
    243     void                    *Context);
    244 
    245 ACPI_STATUS
    246 AnOperandTypecheckWalkBegin (
    247     ACPI_PARSE_OBJECT       *Op,
    248     UINT32                  Level,
    249     void                    *Context);
    250 
    251 ACPI_STATUS
    252 AnOperandTypecheckWalkEnd (
    253     ACPI_PARSE_OBJECT       *Op,
    254     UINT32                  Level,
    255     void                    *Context);
    256 
    257 ACPI_STATUS
    258 AnMethodAnalysisWalkBegin (
    259     ACPI_PARSE_OBJECT       *Op,
    260     UINT32                  Level,
    261     void                    *Context);
    262 
    263 ACPI_STATUS
    264 AnMethodAnalysisWalkEnd (
    265     ACPI_PARSE_OBJECT       *Op,
    266     UINT32                  Level,
    267     void                    *Context);
    268 
    269 ACPI_STATUS
    270 AnMethodTypingWalkBegin (
    271     ACPI_PARSE_OBJECT       *Op,
    272     UINT32                  Level,
    273     void                    *Context);
    274 
    275 ACPI_STATUS
    276 AnMethodTypingWalkEnd (
    277     ACPI_PARSE_OBJECT       *Op,
    278     UINT32                  Level,
    279     void                    *Context);
    280 
    281 
    282 /*
    283  * aslerror - error handling/reporting
    284  */
    285 void
    286 AslError (
    287     UINT8                   Level,
    288     UINT8                   MessageId,
    289     ACPI_PARSE_OBJECT       *Op,
    290     char                    *ExtraMessage);
    291 
    292 void
    293 AslCoreSubsystemError (
    294     ACPI_PARSE_OBJECT       *Op,
    295     ACPI_STATUS             Status,
    296     char                    *ExtraMessage,
    297     BOOLEAN                 Abort);
    298 
    299 int
    300 AslCompilererror(
    301     char                    *s);
    302 
    303 void
    304 AslCommonError (
    305     UINT8                   Level,
    306     UINT8                   MessageId,
    307     UINT32                  CurrentLineNumber,
    308     UINT32                  LogicalLineNumber,
    309     UINT32                  LogicalByteOffset,
    310     UINT32                  Column,
    311     char                    *Filename,
    312     char                    *ExtraMessage);
    313 
    314 void
    315 AePrintException (
    316     UINT32                  FileId,
    317     ASL_ERROR_MSG           *Enode,
    318     char                    *Header);
    319 
    320 void
    321 AePrintErrorLog (
    322     UINT32                  FileId);
    323 
    324 void
    325 AeClearErrorLog (
    326     void);
    327 
    328 ACPI_PHYSICAL_ADDRESS
    329 AeLocalGetRootPointer (
    330     void);
    331 
    332 
    333 /*
    334  * asllisting - generate all "listing" type files
    335  */
    336 void
    337 LsDoListings (
    338     void);
    339 
    340 void
    341 LsWriteNodeToAsmListing (
    342     ACPI_PARSE_OBJECT       *Op);
    343 
    344 void
    345 LsWriteNode (
    346     ACPI_PARSE_OBJECT       *Op,
    347     UINT32                  FileId);
    348 
    349 void
    350 LsDoHexOutput (
    351     void);
    352 
    353 void
    354 LsDumpParseTree (
    355     void);
    356 
    357 /*
    358  * aslfold - constant folding
    359  */
    360 ACPI_STATUS
    361 OpcAmlConstantWalk (
    362     ACPI_PARSE_OBJECT       *Op,
    363     UINT32                  Level,
    364     void                    *Context);
    365 
    366 
    367 /*
    368  * aslopcodes - generate AML opcodes
    369  */
    370 ACPI_STATUS
    371 OpcAmlOpcodeWalk (
    372     ACPI_PARSE_OBJECT       *Op,
    373     UINT32                  Level,
    374     void                    *Context);
    375 
    376 ACPI_STATUS
    377 OpcAmlOpcodeUpdateWalk (
    378     ACPI_PARSE_OBJECT       *Op,
    379     UINT32                  Level,
    380     void                    *Context);
    381 
    382 void
    383 OpcGenerateAmlOpcode (
    384     ACPI_PARSE_OBJECT       *Op);
    385 
    386 UINT32
    387 OpcSetOptimalIntegerSize (
    388     ACPI_PARSE_OBJECT       *Op);
    389 
    390 void
    391 OpcGetIntegerWidth (
    392     ACPI_PARSE_OBJECT       *Op);
    393 
    394 
    395 /*
    396  * asloperands - generate AML operands for the AML opcodes
    397  */
    398 ACPI_PARSE_OBJECT  *
    399 UtGetArg (
    400     ACPI_PARSE_OBJECT       *Op,
    401     UINT32                  Argn);
    402 
    403 void
    404 OpnGenerateAmlOperands (
    405     ACPI_PARSE_OBJECT       *Op);
    406 
    407 void
    408 OpnDoPackage (
    409     ACPI_PARSE_OBJECT       *Op);
    410 
    411 
    412 /*
    413  * aslopt - optmization
    414  */
    415 void
    416 OptOptimizeNamePath (
    417     ACPI_PARSE_OBJECT       *Op,
    418     UINT32                  Flags,
    419     ACPI_WALK_STATE         *WalkState,
    420     char                    *AmlNameString,
    421     ACPI_NAMESPACE_NODE     *TargetNode);
    422 
    423 
    424 /*
    425  * aslcodegen - code generation
    426  */
    427 void
    428 CgGenerateAmlOutput (
    429     void);
    430 
    431 
    432 /*
    433  * aslfile
    434  */
    435 void
    436 FlOpenFile (
    437     UINT32                  FileId,
    438     char                    *Filename,
    439     char                    *Mode);
    440 
    441 
    442 /*
    443  * asllength - calculate/adjust AML package lengths
    444  */
    445 ACPI_STATUS
    446 LnPackageLengthWalk (
    447     ACPI_PARSE_OBJECT       *Op,
    448     UINT32                  Level,
    449     void                    *Context);
    450 
    451 ACPI_STATUS
    452 LnInitLengthsWalk (
    453     ACPI_PARSE_OBJECT       *Op,
    454     UINT32                  Level,
    455     void                    *Context);
    456 
    457 void
    458 CgGenerateAmlLengths (
    459     ACPI_PARSE_OBJECT       *Op);
    460 
    461 
    462 /*
    463  * aslmap - opcode mappings and reserved method names
    464  */
    465 ACPI_OBJECT_TYPE
    466 AslMapNamedOpcodeToDataType (
    467     UINT16                  Opcode);
    468 
    469 
    470 /*
    471  * aslpredef - ACPI predefined names support
    472  */
    473 void
    474 ApCheckForPredefinedMethod (
    475     ACPI_PARSE_OBJECT       *Op,
    476     ASL_METHOD_INFO         *MethodInfo);
    477 
    478 void
    479 ApCheckPredefinedReturnValue (
    480     ACPI_PARSE_OBJECT       *Op,
    481     ASL_METHOD_INFO         *MethodInfo);
    482 
    483 UINT32
    484 ApCheckForPredefinedName (
    485     ACPI_PARSE_OBJECT       *Op,
    486     char                    *Name);
    487 
    488 void
    489 ApCheckForPredefinedObject (
    490     ACPI_PARSE_OBJECT       *Op,
    491     char                    *Name);
    492 
    493 void
    494 ApDisplayReservedNames (
    495     void);
    496 
    497 
    498 /*
    499  * asltransform - parse tree transformations
    500  */
    501 ACPI_STATUS
    502 TrAmlTransformWalk (
    503     ACPI_PARSE_OBJECT       *Op,
    504     UINT32                  Level,
    505     void                    *Context);
    506 
    507 
    508 /*
    509  * asltree - parse tree support
    510  */
    511 ACPI_STATUS
    512 TrWalkParseTree (
    513     ACPI_PARSE_OBJECT       *Op,
    514     UINT32                  Visitation,
    515     ASL_WALK_CALLBACK       DescendingCallback,
    516     ASL_WALK_CALLBACK       AscendingCallback,
    517     void                    *Context);
    518 
    519 /* Values for "Visitation" parameter above */
    520 
    521 #define ASL_WALK_VISIT_DOWNWARD     0x01
    522 #define ASL_WALK_VISIT_UPWARD       0x02
    523 #define ASL_WALK_VISIT_TWICE        (ASL_WALK_VISIT_DOWNWARD | ASL_WALK_VISIT_UPWARD)
    524 
    525 
    526 ACPI_PARSE_OBJECT *
    527 TrAllocateNode (
    528     UINT32                  ParseOpcode);
    529 
    530 void
    531 TrReleaseNode (
    532     ACPI_PARSE_OBJECT       *Op);
    533 
    534 ACPI_PARSE_OBJECT *
    535 TrUpdateNode (
    536     UINT32                  ParseOpcode,
    537     ACPI_PARSE_OBJECT       *Op);
    538 
    539 ACPI_PARSE_OBJECT *
    540 TrCreateNode (
    541     UINT32                  ParseOpcode,
    542     UINT32                  NumChildren,
    543     ...);
    544 
    545 ACPI_PARSE_OBJECT *
    546 TrCreateLeafNode (
    547     UINT32                  ParseOpcode);
    548 
    549 ACPI_PARSE_OBJECT *
    550 TrCreateValuedLeafNode (
    551     UINT32                  ParseOpcode,
    552     UINT64                  Value);
    553 
    554 ACPI_PARSE_OBJECT *
    555 TrLinkChildren (
    556     ACPI_PARSE_OBJECT       *Op,
    557     UINT32                  NumChildren,
    558     ...);
    559 
    560 void
    561 TrSetEndLineNumber (
    562     ACPI_PARSE_OBJECT       *Op);
    563 
    564 void
    565 TrWalkTree (
    566     void);
    567 
    568 ACPI_PARSE_OBJECT *
    569 TrLinkPeerNode (
    570     ACPI_PARSE_OBJECT       *Op1,
    571     ACPI_PARSE_OBJECT       *Op2);
    572 
    573 ACPI_PARSE_OBJECT *
    574 TrLinkChildNode (
    575     ACPI_PARSE_OBJECT       *Op1,
    576     ACPI_PARSE_OBJECT       *Op2);
    577 
    578 ACPI_PARSE_OBJECT *
    579 TrSetNodeFlags (
    580     ACPI_PARSE_OBJECT       *Op,
    581     UINT32                  Flags);
    582 
    583 ACPI_PARSE_OBJECT *
    584 TrLinkPeerNodes (
    585     UINT32                  NumPeers,
    586     ...);
    587 
    588 
    589 /*
    590  * aslfiles - File I/O support
    591  */
    592 void
    593 AslAbort (
    594     void);
    595 
    596 void
    597 FlAddIncludeDirectory (
    598     char                    *Dir);
    599 
    600 void
    601 FlOpenIncludeFile (
    602     ACPI_PARSE_OBJECT       *Op);
    603 
    604 void
    605 FlFileError (
    606     UINT32                  FileId,
    607     UINT8                   ErrorId);
    608 
    609 UINT32
    610 FlGetFileSize (
    611     UINT32                  FileId);
    612 
    613 ACPI_STATUS
    614 FlReadFile (
    615     UINT32                  FileId,
    616     void                    *Buffer,
    617     UINT32                  Length);
    618 
    619 void
    620 FlWriteFile (
    621     UINT32                  FileId,
    622     void                    *Buffer,
    623     UINT32                  Length);
    624 
    625 void
    626 FlSeekFile (
    627     UINT32                  FileId,
    628     long                    Offset);
    629 
    630 void
    631 FlCloseFile (
    632     UINT32                  FileId);
    633 
    634 void
    635 FlPrintFile (
    636     UINT32                  FileId,
    637     char                    *Format,
    638     ...);
    639 
    640 void
    641 FlSetLineNumber (
    642     ACPI_PARSE_OBJECT       *Op);
    643 
    644 ACPI_STATUS
    645 FlOpenInputFile (
    646     char                    *InputFilename);
    647 
    648 ACPI_STATUS
    649 FlOpenAmlOutputFile (
    650     char                    *InputFilename);
    651 
    652 ACPI_STATUS
    653 FlOpenMiscOutputFiles (
    654     char                    *InputFilename);
    655 
    656 
    657 /*
    658  * asload - load namespace in prep for cross reference
    659  */
    660 ACPI_STATUS
    661 LdLoadNamespace (
    662     ACPI_PARSE_OBJECT       *RootOp);
    663 
    664 
    665 /*
    666  * asllookup - namespace cross reference
    667  */
    668 ACPI_STATUS
    669 LkCrossReferenceNamespace (
    670     void);
    671 
    672 void
    673 LkFindUnreferencedObjects (
    674     void);
    675 
    676 ACPI_STATUS
    677 LsDisplayNamespace (
    678     void);
    679 
    680 
    681 /*
    682  * aslutils - common compiler utilites
    683  */
    684 void
    685 DbgPrint (
    686     UINT32                  Type,
    687     char                    *Format,
    688     ...);
    689 
    690 /* Type values for above */
    691 
    692 #define ASL_DEBUG_OUTPUT    0
    693 #define ASL_PARSE_OUTPUT    1
    694 #define ASL_TREE_OUTPUT     2
    695 
    696 void
    697 UtDisplayConstantOpcodes (
    698     void);
    699 
    700 UINT8
    701 UtBeginEvent (
    702     char                    *Name);
    703 
    704 void
    705 UtEndEvent (
    706     UINT8                   Event);
    707 
    708 void *
    709 UtLocalCalloc (
    710     UINT32                  Size);
    711 
    712 void
    713 UtPrintFormattedName (
    714     UINT16                  ParseOpcode,
    715     UINT32                  Level);
    716 
    717 void
    718 UtDisplaySummary (
    719     UINT32                  FileId);
    720 
    721 UINT8
    722 UtHexCharToValue (
    723     int                     HexChar);
    724 
    725 void
    726 UtConvertByteToHex (
    727     UINT8                   RawByte,
    728     UINT8                   *Buffer);
    729 
    730 void
    731 UtConvertByteToAsmHex (
    732     UINT8                   RawByte,
    733     UINT8                   *Buffer);
    734 
    735 char *
    736 UtGetOpName (
    737     UINT32                  ParseOpcode);
    738 
    739 void
    740 UtSetParseOpName (
    741     ACPI_PARSE_OBJECT       *Op);
    742 
    743 char *
    744 UtGetStringBuffer (
    745     UINT32                  Length);
    746 
    747 ACPI_STATUS
    748 UtInternalizeName (
    749     char                    *ExternalName,
    750     char                    **ConvertedName);
    751 
    752 void
    753 UtAttachNamepathToOwner (
    754     ACPI_PARSE_OBJECT       *Op,
    755     ACPI_PARSE_OBJECT       *NameNode);
    756 
    757 ACPI_PARSE_OBJECT *
    758 UtCheckIntegerRange (
    759     ACPI_PARSE_OBJECT       *Op,
    760     UINT32                  LowValue,
    761     UINT32                  HighValue);
    762 
    763 UINT64
    764 UtDoConstant (
    765     char                    *String);
    766 
    767 
    768 /*
    769  * aslresource - Resource template generation utilities
    770  */
    771 void
    772 RsSmallAddressCheck (
    773     UINT8                   Type,
    774     UINT32                  Minimum,
    775     UINT32                  Maximum,
    776     UINT32                  Length,
    777     UINT32                  Alignment,
    778     ACPI_PARSE_OBJECT       *MinOp,
    779     ACPI_PARSE_OBJECT       *MaxOp,
    780     ACPI_PARSE_OBJECT       *LengthOp,
    781     ACPI_PARSE_OBJECT       *AlignOp);
    782 
    783 void
    784 RsLargeAddressCheck (
    785     UINT64                  Minimum,
    786     UINT64                  Maximum,
    787     UINT64                  Length,
    788     UINT64                  Granularity,
    789     UINT8                   Flags,
    790     ACPI_PARSE_OBJECT       *MinOp,
    791     ACPI_PARSE_OBJECT       *MaxOp,
    792     ACPI_PARSE_OBJECT       *LengthOp,
    793     ACPI_PARSE_OBJECT       *GranOp);
    794 
    795 UINT16
    796 RsGetStringDataLength (
    797     ACPI_PARSE_OBJECT       *InitializerOp);
    798 
    799 ASL_RESOURCE_NODE *
    800 RsAllocateResourceNode (
    801     UINT32                  Size);
    802 
    803 void
    804 RsCreateBitField (
    805     ACPI_PARSE_OBJECT       *Op,
    806     char                    *Name,
    807     UINT32                  ByteOffset,
    808     UINT32                  BitOffset);
    809 
    810 void
    811 RsCreateByteField (
    812     ACPI_PARSE_OBJECT       *Op,
    813     char                    *Name,
    814     UINT32                  ByteOffset);
    815 
    816 void
    817 RsSetFlagBits (
    818     UINT8                   *Flags,
    819     ACPI_PARSE_OBJECT       *Op,
    820     UINT8                   Position,
    821     UINT8                   DefaultBit);
    822 
    823 ACPI_PARSE_OBJECT *
    824 RsCompleteNodeAndGetNext (
    825     ACPI_PARSE_OBJECT       *Op);
    826 
    827 void
    828 RsCheckListForDuplicates (
    829     ACPI_PARSE_OBJECT       *Op);
    830 
    831 ASL_RESOURCE_NODE *
    832 RsDoOneResourceDescriptor (
    833     ACPI_PARSE_OBJECT       *DescriptorTypeOp,
    834     UINT32                  CurrentByteOffset,
    835     UINT8                   *State);
    836 
    837 /* Values for State above */
    838 
    839 #define ACPI_RSTATE_NORMAL              0
    840 #define ACPI_RSTATE_START_DEPENDENT     1
    841 #define ACPI_RSTATE_DEPENDENT_LIST      2
    842 
    843 UINT32
    844 RsLinkDescriptorChain (
    845     ASL_RESOURCE_NODE       **PreviousRnode,
    846     ASL_RESOURCE_NODE       *Rnode);
    847 
    848 void
    849 RsDoResourceTemplate (
    850     ACPI_PARSE_OBJECT       *Op);
    851 
    852 
    853 /*
    854  * aslrestype1 - Miscellaneous Small descriptors
    855  */
    856 ASL_RESOURCE_NODE *
    857 RsDoEndTagDescriptor (
    858     ACPI_PARSE_OBJECT       *Op,
    859     UINT32                  CurrentByteOffset);
    860 
    861 ASL_RESOURCE_NODE *
    862 RsDoEndDependentDescriptor (
    863     ACPI_PARSE_OBJECT       *Op,
    864     UINT32                  CurrentByteOffset);
    865 
    866 ASL_RESOURCE_NODE *
    867 RsDoMemory24Descriptor (
    868     ACPI_PARSE_OBJECT       *Op,
    869     UINT32                  CurrentByteOffset);
    870 
    871 ASL_RESOURCE_NODE *
    872 RsDoMemory32Descriptor (
    873     ACPI_PARSE_OBJECT       *Op,
    874     UINT32                  CurrentByteOffset);
    875 
    876 ASL_RESOURCE_NODE *
    877 RsDoMemory32FixedDescriptor (
    878     ACPI_PARSE_OBJECT       *Op,
    879     UINT32                  CurrentByteOffset);
    880 
    881 ASL_RESOURCE_NODE *
    882 RsDoStartDependentDescriptor (
    883     ACPI_PARSE_OBJECT       *Op,
    884     UINT32                  CurrentByteOffset);
    885 
    886 ASL_RESOURCE_NODE *
    887 RsDoStartDependentNoPriDescriptor (
    888     ACPI_PARSE_OBJECT       *Op,
    889     UINT32                  CurrentByteOffset);
    890 
    891 ASL_RESOURCE_NODE *
    892 RsDoVendorSmallDescriptor (
    893     ACPI_PARSE_OBJECT       *Op,
    894     UINT32                  CurrentByteOffset);
    895 
    896 
    897 /*
    898  * aslrestype1i - I/O-related Small descriptors
    899  */
    900 ASL_RESOURCE_NODE *
    901 RsDoDmaDescriptor (
    902     ACPI_PARSE_OBJECT       *Op,
    903     UINT32                  CurrentByteOffset);
    904 
    905 ASL_RESOURCE_NODE *
    906 RsDoFixedIoDescriptor (
    907     ACPI_PARSE_OBJECT       *Op,
    908     UINT32                  CurrentByteOffset);
    909 
    910 ASL_RESOURCE_NODE *
    911 RsDoIoDescriptor (
    912     ACPI_PARSE_OBJECT       *Op,
    913     UINT32                  CurrentByteOffset);
    914 
    915 ASL_RESOURCE_NODE *
    916 RsDoIrqDescriptor (
    917     ACPI_PARSE_OBJECT       *Op,
    918     UINT32                  CurrentByteOffset);
    919 
    920 ASL_RESOURCE_NODE *
    921 RsDoIrqNoFlagsDescriptor (
    922     ACPI_PARSE_OBJECT       *Op,
    923     UINT32                  CurrentByteOffset);
    924 
    925 
    926 /*
    927  * aslrestype2 - Large resource descriptors
    928  */
    929 ASL_RESOURCE_NODE *
    930 RsDoInterruptDescriptor (
    931     ACPI_PARSE_OBJECT       *Op,
    932     UINT32                  CurrentByteOffset);
    933 
    934 ASL_RESOURCE_NODE *
    935 RsDoVendorLargeDescriptor (
    936     ACPI_PARSE_OBJECT       *Op,
    937     UINT32                  CurrentByteOffset);
    938 
    939 ASL_RESOURCE_NODE *
    940 RsDoGeneralRegisterDescriptor (
    941     ACPI_PARSE_OBJECT       *Op,
    942     UINT32                  CurrentByteOffset);
    943 
    944 
    945 /*
    946  * aslrestype2d - DWord address descriptors
    947  */
    948 ASL_RESOURCE_NODE *
    949 RsDoDwordIoDescriptor (
    950     ACPI_PARSE_OBJECT       *Op,
    951     UINT32                  CurrentByteOffset);
    952 
    953 ASL_RESOURCE_NODE *
    954 RsDoDwordMemoryDescriptor (
    955     ACPI_PARSE_OBJECT       *Op,
    956     UINT32                  CurrentByteOffset);
    957 
    958 ASL_RESOURCE_NODE *
    959 RsDoDwordSpaceDescriptor (
    960     ACPI_PARSE_OBJECT       *Op,
    961     UINT32                  CurrentByteOffset);
    962 
    963 
    964 /*
    965  * aslrestype2e - Extended address descriptors
    966  */
    967 ASL_RESOURCE_NODE *
    968 RsDoExtendedIoDescriptor (
    969     ACPI_PARSE_OBJECT       *Op,
    970     UINT32                  CurrentByteOffset);
    971 
    972 ASL_RESOURCE_NODE *
    973 RsDoExtendedMemoryDescriptor (
    974     ACPI_PARSE_OBJECT       *Op,
    975     UINT32                  CurrentByteOffset);
    976 
    977 ASL_RESOURCE_NODE *
    978 RsDoExtendedSpaceDescriptor (
    979     ACPI_PARSE_OBJECT       *Op,
    980     UINT32                  CurrentByteOffset);
    981 
    982 
    983 /*
    984  * aslrestype2q - QWord address descriptors
    985  */
    986 ASL_RESOURCE_NODE *
    987 RsDoQwordIoDescriptor (
    988     ACPI_PARSE_OBJECT       *Op,
    989     UINT32                  CurrentByteOffset);
    990 
    991 ASL_RESOURCE_NODE *
    992 RsDoQwordMemoryDescriptor (
    993     ACPI_PARSE_OBJECT       *Op,
    994     UINT32                  CurrentByteOffset);
    995 
    996 ASL_RESOURCE_NODE *
    997 RsDoQwordSpaceDescriptor (
    998     ACPI_PARSE_OBJECT       *Op,
    999     UINT32                  CurrentByteOffset);
   1000 
   1001 
   1002 /*
   1003  * aslrestype2w - Word address descriptors
   1004  */
   1005 ASL_RESOURCE_NODE *
   1006 RsDoWordIoDescriptor (
   1007     ACPI_PARSE_OBJECT       *Op,
   1008     UINT32                  CurrentByteOffset);
   1009 
   1010 ASL_RESOURCE_NODE *
   1011 RsDoWordSpaceDescriptor (
   1012     ACPI_PARSE_OBJECT       *Op,
   1013     UINT32                  CurrentByteOffset);
   1014 
   1015 ASL_RESOURCE_NODE *
   1016 RsDoWordBusNumberDescriptor (
   1017     ACPI_PARSE_OBJECT       *Op,
   1018     UINT32                  CurrentByteOffset);
   1019 
   1020 /*
   1021  * Entry to data table compiler subsystem
   1022  */
   1023 ACPI_STATUS
   1024 DtDoCompile(
   1025     void);
   1026 
   1027 #endif /*  __ASLCOMPILER_H */
   1028 
   1029