ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

acparser.h
Go to the documentation of this file.
00001 /******************************************************************************
00002  *
00003  * Module Name: acparser.h - AML Parser subcomponent prototypes and defines
00004  *
00005  *****************************************************************************/
00006 
00007 /******************************************************************************
00008  *
00009  * 1. Copyright Notice
00010  *
00011  * Some or all of this work - Copyright (c) 1999 - 2011, Intel Corp.
00012  * All rights reserved.
00013  *
00014  * 2. License
00015  *
00016  * 2.1. This is your license from Intel Corp. under its intellectual property
00017  * rights.  You may have additional license terms from the party that provided
00018  * you this software, covering your right to use that party's intellectual
00019  * property rights.
00020  *
00021  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
00022  * copy of the source code appearing in this file ("Covered Code") an
00023  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
00024  * base code distributed originally by Intel ("Original Intel Code") to copy,
00025  * make derivatives, distribute, use and display any portion of the Covered
00026  * Code in any form, with the right to sublicense such rights; and
00027  *
00028  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
00029  * license (with the right to sublicense), under only those claims of Intel
00030  * patents that are infringed by the Original Intel Code, to make, use, sell,
00031  * offer to sell, and import the Covered Code and derivative works thereof
00032  * solely to the minimum extent necessary to exercise the above copyright
00033  * license, and in no event shall the patent license extend to any additions
00034  * to or modifications of the Original Intel Code.  No other license or right
00035  * is granted directly or by implication, estoppel or otherwise;
00036  *
00037  * The above copyright and patent license is granted only if the following
00038  * conditions are met:
00039  *
00040  * 3. Conditions
00041  *
00042  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
00043  * Redistribution of source code of any substantial portion of the Covered
00044  * Code or modification with rights to further distribute source must include
00045  * the above Copyright Notice, the above License, this list of Conditions,
00046  * and the following Disclaimer and Export Compliance provision.  In addition,
00047  * Licensee must cause all Covered Code to which Licensee contributes to
00048  * contain a file documenting the changes Licensee made to create that Covered
00049  * Code and the date of any change.  Licensee must include in that file the
00050  * documentation of any changes made by any predecessor Licensee.  Licensee
00051  * must include a prominent statement that the modification is derived,
00052  * directly or indirectly, from Original Intel Code.
00053  *
00054  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
00055  * Redistribution of source code of any substantial portion of the Covered
00056  * Code or modification without rights to further distribute source must
00057  * include the following Disclaimer and Export Compliance provision in the
00058  * documentation and/or other materials provided with distribution.  In
00059  * addition, Licensee may not authorize further sublicense of source of any
00060  * portion of the Covered Code, and must include terms to the effect that the
00061  * license from Licensee to its licensee is limited to the intellectual
00062  * property embodied in the software Licensee provides to its licensee, and
00063  * not to intellectual property embodied in modifications its licensee may
00064  * make.
00065  *
00066  * 3.3. Redistribution of Executable. Redistribution in executable form of any
00067  * substantial portion of the Covered Code or modification must reproduce the
00068  * above Copyright Notice, and the following Disclaimer and Export Compliance
00069  * provision in the documentation and/or other materials provided with the
00070  * distribution.
00071  *
00072  * 3.4. Intel retains all right, title, and interest in and to the Original
00073  * Intel Code.
00074  *
00075  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
00076  * Intel shall be used in advertising or otherwise to promote the sale, use or
00077  * other dealings in products derived from or relating to the Covered Code
00078  * without prior written authorization from Intel.
00079  *
00080  * 4. Disclaimer and Export Compliance
00081  *
00082  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
00083  * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
00084  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
00085  * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
00086  * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
00087  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
00088  * PARTICULAR PURPOSE.
00089  *
00090  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
00091  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
00092  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
00093  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
00094  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
00095  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
00096  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
00097  * LIMITED REMEDY.
00098  *
00099  * 4.3. Licensee shall not export, either directly or indirectly, any of this
00100  * software or system incorporating such software without first obtaining any
00101  * required license or other approval from the U. S. Department of Commerce or
00102  * any other agency or department of the United States Government.  In the
00103  * event Licensee exports any such software from the United States or
00104  * re-exports any such software from a foreign destination, Licensee shall
00105  * ensure that the distribution and export/re-export of the software is in
00106  * compliance with all laws, regulations, orders, or other restrictions of the
00107  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
00108  * any of its subsidiaries will export/re-export any technical data, process,
00109  * software, or service, directly or indirectly, to any country for which the
00110  * United States government or any agency thereof requires an export license,
00111  * other governmental approval, or letter of assurance, without first obtaining
00112  * such license, approval or letter.
00113  *
00114  *****************************************************************************/
00115 
00116 
00117 #ifndef __ACPARSER_H__
00118 #define __ACPARSER_H__
00119 
00120 
00121 #define OP_HAS_RETURN_VALUE             1
00122 
00123 /* Variable number of arguments. This field must be 32 bits */
00124 
00125 #define ACPI_VAR_ARGS                   ACPI_UINT32_MAX
00126 
00127 
00128 #define ACPI_PARSE_DELETE_TREE          0x0001
00129 #define ACPI_PARSE_NO_TREE_DELETE       0x0000
00130 #define ACPI_PARSE_TREE_MASK            0x0001
00131 
00132 #define ACPI_PARSE_LOAD_PASS1           0x0010
00133 #define ACPI_PARSE_LOAD_PASS2           0x0020
00134 #define ACPI_PARSE_EXECUTE              0x0030
00135 #define ACPI_PARSE_MODE_MASK            0x0030
00136 
00137 #define ACPI_PARSE_DEFERRED_OP          0x0100
00138 #define ACPI_PARSE_DISASSEMBLE          0x0200
00139 
00140 #define ACPI_PARSE_MODULE_LEVEL         0x0400
00141 
00142 /******************************************************************************
00143  *
00144  * Parser interfaces
00145  *
00146  *****************************************************************************/
00147 
00148 
00149 /*
00150  * psxface - Parser external interfaces
00151  */
00152 ACPI_STATUS
00153 AcpiPsExecuteMethod (
00154     ACPI_EVALUATE_INFO      *Info);
00155 
00156 
00157 /*
00158  * psargs - Parse AML opcode arguments
00159  */
00160 UINT8 *
00161 AcpiPsGetNextPackageEnd (
00162     ACPI_PARSE_STATE        *ParserState);
00163 
00164 char *
00165 AcpiPsGetNextNamestring (
00166     ACPI_PARSE_STATE        *ParserState);
00167 
00168 void
00169 AcpiPsGetNextSimpleArg (
00170     ACPI_PARSE_STATE        *ParserState,
00171     UINT32                  ArgType,
00172     ACPI_PARSE_OBJECT       *Arg);
00173 
00174 ACPI_STATUS
00175 AcpiPsGetNextNamepath (
00176     ACPI_WALK_STATE         *WalkState,
00177     ACPI_PARSE_STATE        *ParserState,
00178     ACPI_PARSE_OBJECT       *Arg,
00179     BOOLEAN                 MethodCall);
00180 
00181 ACPI_STATUS
00182 AcpiPsGetNextArg (
00183     ACPI_WALK_STATE         *WalkState,
00184     ACPI_PARSE_STATE        *ParserState,
00185     UINT32                  ArgType,
00186     ACPI_PARSE_OBJECT       **ReturnArg);
00187 
00188 
00189 /*
00190  * psfind
00191  */
00192 ACPI_PARSE_OBJECT *
00193 AcpiPsFindName (
00194     ACPI_PARSE_OBJECT       *Scope,
00195     UINT32                  Name,
00196     UINT32                  Opcode);
00197 
00198 ACPI_PARSE_OBJECT*
00199 AcpiPsGetParent (
00200     ACPI_PARSE_OBJECT       *Op);
00201 
00202 
00203 /*
00204  * psopcode - AML Opcode information
00205  */
00206 const ACPI_OPCODE_INFO *
00207 AcpiPsGetOpcodeInfo (
00208     UINT16                  Opcode);
00209 
00210 char *
00211 AcpiPsGetOpcodeName (
00212     UINT16                  Opcode);
00213 
00214 UINT8
00215 AcpiPsGetArgumentCount (
00216     UINT32                  OpType);
00217 
00218 
00219 /*
00220  * psparse - top level parsing routines
00221  */
00222 ACPI_STATUS
00223 AcpiPsParseAml (
00224     ACPI_WALK_STATE         *WalkState);
00225 
00226 UINT32
00227 AcpiPsGetOpcodeSize (
00228     UINT32                  Opcode);
00229 
00230 UINT16
00231 AcpiPsPeekOpcode (
00232     ACPI_PARSE_STATE        *state);
00233 
00234 ACPI_STATUS
00235 AcpiPsCompleteThisOp (
00236     ACPI_WALK_STATE         *WalkState,
00237     ACPI_PARSE_OBJECT       *Op);
00238 
00239 ACPI_STATUS
00240 AcpiPsNextParseState (
00241     ACPI_WALK_STATE         *WalkState,
00242     ACPI_PARSE_OBJECT       *Op,
00243     ACPI_STATUS             CallbackStatus);
00244 
00245 
00246 /*
00247  * psloop - main parse loop
00248  */
00249 ACPI_STATUS
00250 AcpiPsParseLoop (
00251     ACPI_WALK_STATE         *WalkState);
00252 
00253 
00254 /*
00255  * psscope - Scope stack management routines
00256  */
00257 ACPI_STATUS
00258 AcpiPsInitScope (
00259     ACPI_PARSE_STATE        *ParserState,
00260     ACPI_PARSE_OBJECT       *Root);
00261 
00262 ACPI_PARSE_OBJECT *
00263 AcpiPsGetParentScope (
00264     ACPI_PARSE_STATE        *state);
00265 
00266 BOOLEAN
00267 AcpiPsHasCompletedScope (
00268     ACPI_PARSE_STATE        *ParserState);
00269 
00270 void
00271 AcpiPsPopScope (
00272     ACPI_PARSE_STATE        *ParserState,
00273     ACPI_PARSE_OBJECT       **Op,
00274     UINT32                  *ArgList,
00275     UINT32                  *ArgCount);
00276 
00277 ACPI_STATUS
00278 AcpiPsPushScope (
00279     ACPI_PARSE_STATE        *ParserState,
00280     ACPI_PARSE_OBJECT       *Op,
00281     UINT32                  RemainingArgs,
00282     UINT32                  ArgCount);
00283 
00284 void
00285 AcpiPsCleanupScope (
00286     ACPI_PARSE_STATE        *state);
00287 
00288 
00289 /*
00290  * pstree - parse tree manipulation routines
00291  */
00292 void
00293 AcpiPsAppendArg(
00294     ACPI_PARSE_OBJECT       *op,
00295     ACPI_PARSE_OBJECT       *arg);
00296 
00297 ACPI_PARSE_OBJECT*
00298 AcpiPsFind (
00299     ACPI_PARSE_OBJECT       *Scope,
00300     char                    *Path,
00301     UINT16                  Opcode,
00302     UINT32                  Create);
00303 
00304 ACPI_PARSE_OBJECT *
00305 AcpiPsGetArg(
00306     ACPI_PARSE_OBJECT       *op,
00307     UINT32                   argn);
00308 
00309 ACPI_PARSE_OBJECT *
00310 AcpiPsGetDepthNext (
00311     ACPI_PARSE_OBJECT       *Origin,
00312     ACPI_PARSE_OBJECT       *Op);
00313 
00314 
00315 /*
00316  * pswalk - parse tree walk routines
00317  */
00318 ACPI_STATUS
00319 AcpiPsWalkParsedAml (
00320     ACPI_PARSE_OBJECT       *StartOp,
00321     ACPI_PARSE_OBJECT       *EndOp,
00322     ACPI_OPERAND_OBJECT     *MthDesc,
00323     ACPI_NAMESPACE_NODE     *StartNode,
00324     ACPI_OPERAND_OBJECT     **Params,
00325     ACPI_OPERAND_OBJECT     **CallerReturnDesc,
00326     ACPI_OWNER_ID           OwnerId,
00327     ACPI_PARSE_DOWNWARDS    DescendingCallback,
00328     ACPI_PARSE_UPWARDS      AscendingCallback);
00329 
00330 ACPI_STATUS
00331 AcpiPsGetNextWalkOp (
00332     ACPI_WALK_STATE         *WalkState,
00333     ACPI_PARSE_OBJECT       *Op,
00334     ACPI_PARSE_UPWARDS      AscendingCallback);
00335 
00336 ACPI_STATUS
00337 AcpiPsDeleteCompletedOp (
00338     ACPI_WALK_STATE         *WalkState);
00339 
00340 void
00341 AcpiPsDeleteParseTree (
00342     ACPI_PARSE_OBJECT       *root);
00343 
00344 
00345 /*
00346  * psutils - parser utilities
00347  */
00348 ACPI_PARSE_OBJECT *
00349 AcpiPsCreateScopeOp (
00350     void);
00351 
00352 void
00353 AcpiPsInitOp (
00354     ACPI_PARSE_OBJECT       *op,
00355     UINT16                  opcode);
00356 
00357 ACPI_PARSE_OBJECT *
00358 AcpiPsAllocOp (
00359     UINT16                  opcode);
00360 
00361 void
00362 AcpiPsFreeOp (
00363     ACPI_PARSE_OBJECT       *Op);
00364 
00365 BOOLEAN
00366 AcpiPsIsLeadingChar (
00367     UINT32                  c);
00368 
00369 BOOLEAN
00370 AcpiPsIsPrefixChar (
00371     UINT32                  c);
00372 
00373 UINT32
00374 AcpiPsGetName(
00375     ACPI_PARSE_OBJECT       *op);
00376 
00377 void
00378 AcpiPsSetName(
00379     ACPI_PARSE_OBJECT       *op,
00380     UINT32                  name);
00381 
00382 
00383 /*
00384  * psdump - display parser tree
00385  */
00386 UINT32
00387 AcpiPsSprintPath (
00388     char                    *BufferStart,
00389     UINT32                  BufferSize,
00390     ACPI_PARSE_OBJECT       *Op);
00391 
00392 UINT32
00393 AcpiPsSprintOp (
00394     char                    *BufferStart,
00395     UINT32                  BufferSize,
00396     ACPI_PARSE_OBJECT       *Op);
00397 
00398 void
00399 AcpiPsShow (
00400     ACPI_PARSE_OBJECT       *op);
00401 
00402 
00403 #endif /* __ACPARSER_H__ */

Generated on Sun May 27 2012 04:27:18 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.