Back to home page

Quest Cross Reference

 
 

    


Warning, cross-references for /kernel/include/drivers/acpi/acdispat.h need to be fixed.

0001 /******************************************************************************
0002  *
0003  * Name: acdispat.h - dispatcher (parser to interpreter interface)
0004  *
0005  *****************************************************************************/
0006 
0007 /******************************************************************************
0008  *
0009  * 1. Copyright Notice
0010  *
0011  * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp.
0012  * All rights reserved.
0013  *
0014  * 2. License
0015  *
0016  * 2.1. This is your license from Intel Corp. under its intellectual property
0017  * rights.  You may have additional license terms from the party that provided
0018  * you this software, covering your right to use that party's intellectual
0019  * property rights.
0020  *
0021  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
0022  * copy of the source code appearing in this file ("Covered Code") an
0023  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
0024  * base code distributed originally by Intel ("Original Intel Code") to copy,
0025  * make derivatives, distribute, use and display any portion of the Covered
0026  * Code in any form, with the right to sublicense such rights; and
0027  *
0028  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
0029  * license (with the right to sublicense), under only those claims of Intel
0030  * patents that are infringed by the Original Intel Code, to make, use, sell,
0031  * offer to sell, and import the Covered Code and derivative works thereof
0032  * solely to the minimum extent necessary to exercise the above copyright
0033  * license, and in no event shall the patent license extend to any additions
0034  * to or modifications of the Original Intel Code.  No other license or right
0035  * is granted directly or by implication, estoppel or otherwise;
0036  *
0037  * The above copyright and patent license is granted only if the following
0038  * conditions are met:
0039  *
0040  * 3. Conditions
0041  *
0042  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
0043  * Redistribution of source code of any substantial portion of the Covered
0044  * Code or modification with rights to further distribute source must include
0045  * the above Copyright Notice, the above License, this list of Conditions,
0046  * and the following Disclaimer and Export Compliance provision.  In addition,
0047  * Licensee must cause all Covered Code to which Licensee contributes to
0048  * contain a file documenting the changes Licensee made to create that Covered
0049  * Code and the date of any change.  Licensee must include in that file the
0050  * documentation of any changes made by any predecessor Licensee.  Licensee
0051  * must include a prominent statement that the modification is derived,
0052  * directly or indirectly, from Original Intel Code.
0053  *
0054  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
0055  * Redistribution of source code of any substantial portion of the Covered
0056  * Code or modification without rights to further distribute source must
0057  * include the following Disclaimer and Export Compliance provision in the
0058  * documentation and/or other materials provided with distribution.  In
0059  * addition, Licensee may not authorize further sublicense of source of any
0060  * portion of the Covered Code, and must include terms to the effect that the
0061  * license from Licensee to its licensee is limited to the intellectual
0062  * property embodied in the software Licensee provides to its licensee, and
0063  * not to intellectual property embodied in modifications its licensee may
0064  * make.
0065  *
0066  * 3.3. Redistribution of Executable. Redistribution in executable form of any
0067  * substantial portion of the Covered Code or modification must reproduce the
0068  * above Copyright Notice, and the following Disclaimer and Export Compliance
0069  * provision in the documentation and/or other materials provided with the
0070  * distribution.
0071  *
0072  * 3.4. Intel retains all right, title, and interest in and to the Original
0073  * Intel Code.
0074  *
0075  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
0076  * Intel shall be used in advertising or otherwise to promote the sale, use or
0077  * other dealings in products derived from or relating to the Covered Code
0078  * without prior written authorization from Intel.
0079  *
0080  * 4. Disclaimer and Export Compliance
0081  *
0082  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
0083  * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
0084  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
0085  * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
0086  * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
0087  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
0088  * PARTICULAR PURPOSE.
0089  *
0090  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
0091  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
0092  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
0093  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
0094  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
0095  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
0096  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
0097  * LIMITED REMEDY.
0098  *
0099  * 4.3. Licensee shall not export, either directly or indirectly, any of this
0100  * software or system incorporating such software without first obtaining any
0101  * required license or other approval from the U. S. Department of Commerce or
0102  * any other agency or department of the United States Government.  In the
0103  * event Licensee exports any such software from the United States or
0104  * re-exports any such software from a foreign destination, Licensee shall
0105  * ensure that the distribution and export/re-export of the software is in
0106  * compliance with all laws, regulations, orders, or other restrictions of the
0107  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
0108  * any of its subsidiaries will export/re-export any technical data, process,
0109  * software, or service, directly or indirectly, to any country for which the
0110  * United States government or any agency thereof requires an export license,
0111  * other governmental approval, or letter of assurance, without first obtaining
0112  * such license, approval or letter.
0113  *
0114  *****************************************************************************/
0115 
0116 
0117 #ifndef _ACDISPAT_H_
0118 #define _ACDISPAT_H_
0119 
0120 
0121 #define NAMEOF_LOCAL_NTE    "__L0"
0122 #define NAMEOF_ARG_NTE      "__A0"
0123 
0124 
0125 /*
0126  * dsopcode - support for late evaluation
0127  */
0128 ACPI_STATUS
0129 AcpiDsGetBufferFieldArguments (
0130     ACPI_OPERAND_OBJECT     *ObjDesc);
0131 
0132 ACPI_STATUS
0133 AcpiDsGetBankFieldArguments (
0134     ACPI_OPERAND_OBJECT     *ObjDesc);
0135 
0136 ACPI_STATUS
0137 AcpiDsGetRegionArguments (
0138     ACPI_OPERAND_OBJECT     *RgnDesc);
0139 
0140 ACPI_STATUS
0141 AcpiDsGetBufferArguments (
0142     ACPI_OPERAND_OBJECT     *ObjDesc);
0143 
0144 ACPI_STATUS
0145 AcpiDsGetPackageArguments (
0146     ACPI_OPERAND_OBJECT     *ObjDesc);
0147 
0148 ACPI_STATUS
0149 AcpiDsEvalBufferFieldOperands (
0150     ACPI_WALK_STATE         *WalkState,
0151     ACPI_PARSE_OBJECT       *Op);
0152 
0153 ACPI_STATUS
0154 AcpiDsEvalRegionOperands (
0155     ACPI_WALK_STATE         *WalkState,
0156     ACPI_PARSE_OBJECT       *Op);
0157 
0158 ACPI_STATUS
0159 AcpiDsEvalTableRegionOperands (
0160     ACPI_WALK_STATE         *WalkState,
0161     ACPI_PARSE_OBJECT       *Op);
0162 
0163 ACPI_STATUS
0164 AcpiDsEvalDataObjectOperands (
0165     ACPI_WALK_STATE         *WalkState,
0166     ACPI_PARSE_OBJECT       *Op,
0167     ACPI_OPERAND_OBJECT     *ObjDesc);
0168 
0169 ACPI_STATUS
0170 AcpiDsEvalBankFieldOperands (
0171     ACPI_WALK_STATE         *WalkState,
0172     ACPI_PARSE_OBJECT       *Op);
0173 
0174 ACPI_STATUS
0175 AcpiDsInitializeRegion (
0176     ACPI_HANDLE             ObjHandle);
0177 
0178 
0179 /*
0180  * dsctrl - Parser/Interpreter interface, control stack routines
0181  */
0182 ACPI_STATUS
0183 AcpiDsExecBeginControlOp (
0184     ACPI_WALK_STATE         *WalkState,
0185     ACPI_PARSE_OBJECT       *Op);
0186 
0187 ACPI_STATUS
0188 AcpiDsExecEndControlOp (
0189     ACPI_WALK_STATE         *WalkState,
0190     ACPI_PARSE_OBJECT       *Op);
0191 
0192 
0193 /*
0194  * dsexec - Parser/Interpreter interface, method execution callbacks
0195  */
0196 ACPI_STATUS
0197 AcpiDsGetPredicateValue (
0198     ACPI_WALK_STATE         *WalkState,
0199     ACPI_OPERAND_OBJECT     *ResultObj);
0200 
0201 ACPI_STATUS
0202 AcpiDsExecBeginOp (
0203     ACPI_WALK_STATE         *WalkState,
0204     ACPI_PARSE_OBJECT       **OutOp);
0205 
0206 ACPI_STATUS
0207 AcpiDsExecEndOp (
0208     ACPI_WALK_STATE         *State);
0209 
0210 
0211 /*
0212  * dsfield - Parser/Interpreter interface for AML fields
0213  */
0214 ACPI_STATUS
0215 AcpiDsCreateField (
0216     ACPI_PARSE_OBJECT       *Op,
0217     ACPI_NAMESPACE_NODE     *RegionNode,
0218     ACPI_WALK_STATE         *WalkState);
0219 
0220 ACPI_STATUS
0221 AcpiDsCreateBankField (
0222     ACPI_PARSE_OBJECT       *Op,
0223     ACPI_NAMESPACE_NODE     *RegionNode,
0224     ACPI_WALK_STATE         *WalkState);
0225 
0226 ACPI_STATUS
0227 AcpiDsCreateIndexField (
0228     ACPI_PARSE_OBJECT       *Op,
0229     ACPI_NAMESPACE_NODE     *RegionNode,
0230     ACPI_WALK_STATE         *WalkState);
0231 
0232 ACPI_STATUS
0233 AcpiDsCreateBufferField (
0234     ACPI_PARSE_OBJECT       *Op,
0235     ACPI_WALK_STATE         *WalkState);
0236 
0237 ACPI_STATUS
0238 AcpiDsInitFieldObjects (
0239     ACPI_PARSE_OBJECT       *Op,
0240     ACPI_WALK_STATE         *WalkState);
0241 
0242 
0243 /*
0244  * dsload - Parser/Interpreter interface, namespace load callbacks
0245  */
0246 ACPI_STATUS
0247 AcpiDsLoad1BeginOp (
0248     ACPI_WALK_STATE         *WalkState,
0249     ACPI_PARSE_OBJECT       **OutOp);
0250 
0251 ACPI_STATUS
0252 AcpiDsLoad1EndOp (
0253     ACPI_WALK_STATE         *WalkState);
0254 
0255 ACPI_STATUS
0256 AcpiDsLoad2BeginOp (
0257     ACPI_WALK_STATE         *WalkState,
0258     ACPI_PARSE_OBJECT       **OutOp);
0259 
0260 ACPI_STATUS
0261 AcpiDsLoad2EndOp (
0262     ACPI_WALK_STATE         *WalkState);
0263 
0264 ACPI_STATUS
0265 AcpiDsInitCallbacks (
0266     ACPI_WALK_STATE         *WalkState,
0267     UINT32                  PassNumber);
0268 
0269 
0270 /*
0271  * dsmthdat - method data (locals/args)
0272  */
0273 ACPI_STATUS
0274 AcpiDsStoreObjectToLocal (
0275     UINT8                   Type,
0276     UINT32                  Index,
0277     ACPI_OPERAND_OBJECT     *SrcDesc,
0278     ACPI_WALK_STATE         *WalkState);
0279 
0280 ACPI_STATUS
0281 AcpiDsMethodDataGetEntry (
0282     UINT16                  Opcode,
0283     UINT32                  Index,
0284     ACPI_WALK_STATE         *WalkState,
0285     ACPI_OPERAND_OBJECT     ***Node);
0286 
0287 void
0288 AcpiDsMethodDataDeleteAll (
0289     ACPI_WALK_STATE         *WalkState);
0290 
0291 BOOLEAN
0292 AcpiDsIsMethodValue (
0293     ACPI_OPERAND_OBJECT     *ObjDesc);
0294 
0295 ACPI_STATUS
0296 AcpiDsMethodDataGetValue (
0297     UINT8                   Type,
0298     UINT32                  Index,
0299     ACPI_WALK_STATE         *WalkState,
0300     ACPI_OPERAND_OBJECT     **DestDesc);
0301 
0302 ACPI_STATUS
0303 AcpiDsMethodDataInitArgs (
0304     ACPI_OPERAND_OBJECT     **Params,
0305     UINT32                  MaxParamCount,
0306     ACPI_WALK_STATE         *WalkState);
0307 
0308 ACPI_STATUS
0309 AcpiDsMethodDataGetNode (
0310     UINT8                   Type,
0311     UINT32                  Index,
0312     ACPI_WALK_STATE         *WalkState,
0313     ACPI_NAMESPACE_NODE     **Node);
0314 
0315 void
0316 AcpiDsMethodDataInit (
0317     ACPI_WALK_STATE         *WalkState);
0318 
0319 
0320 /*
0321  * dsmethod - Parser/Interpreter interface - control method parsing
0322  */
0323 ACPI_STATUS
0324 AcpiDsParseMethod (
0325     ACPI_NAMESPACE_NODE     *Node);
0326 
0327 ACPI_STATUS
0328 AcpiDsCallControlMethod (
0329     ACPI_THREAD_STATE       *Thread,
0330     ACPI_WALK_STATE         *WalkState,
0331     ACPI_PARSE_OBJECT       *Op);
0332 
0333 ACPI_STATUS
0334 AcpiDsRestartControlMethod (
0335     ACPI_WALK_STATE         *WalkState,
0336     ACPI_OPERAND_OBJECT     *ReturnDesc);
0337 
0338 void
0339 AcpiDsTerminateControlMethod (
0340     ACPI_OPERAND_OBJECT     *MethodDesc,
0341     ACPI_WALK_STATE         *WalkState);
0342 
0343 ACPI_STATUS
0344 AcpiDsBeginMethodExecution (
0345     ACPI_NAMESPACE_NODE     *MethodNode,
0346     ACPI_OPERAND_OBJECT     *ObjDesc,
0347     ACPI_WALK_STATE         *WalkState);
0348 
0349 ACPI_STATUS
0350 AcpiDsMethodError (
0351     ACPI_STATUS             Status,
0352     ACPI_WALK_STATE         *WalkState);
0353 
0354 /*
0355  * dsinit
0356  */
0357 ACPI_STATUS
0358 AcpiDsInitializeObjects (
0359     UINT32                  TableIndex,
0360     ACPI_NAMESPACE_NODE     *StartNode);
0361 
0362 
0363 /*
0364  * dsobject - Parser/Interpreter interface - object initialization and conversion
0365  */
0366 ACPI_STATUS
0367 AcpiDsBuildInternalBufferObj (
0368     ACPI_WALK_STATE         *WalkState,
0369     ACPI_PARSE_OBJECT       *Op,
0370     UINT32                  BufferLength,
0371     ACPI_OPERAND_OBJECT     **ObjDescPtr);
0372 
0373 ACPI_STATUS
0374 AcpiDsBuildInternalPackageObj (
0375     ACPI_WALK_STATE         *WalkState,
0376     ACPI_PARSE_OBJECT       *op,
0377     UINT32                  PackageLength,
0378     ACPI_OPERAND_OBJECT     **ObjDesc);
0379 
0380 ACPI_STATUS
0381 AcpiDsInitObjectFromOp (
0382     ACPI_WALK_STATE         *WalkState,
0383     ACPI_PARSE_OBJECT       *Op,
0384     UINT16                  Opcode,
0385     ACPI_OPERAND_OBJECT     **ObjDesc);
0386 
0387 ACPI_STATUS
0388 AcpiDsCreateNode (
0389     ACPI_WALK_STATE         *WalkState,
0390     ACPI_NAMESPACE_NODE     *Node,
0391     ACPI_PARSE_OBJECT       *Op);
0392 
0393 
0394 /*
0395  * dsutils - Parser/Interpreter interface utility routines
0396  */
0397 void
0398 AcpiDsClearImplicitReturn (
0399     ACPI_WALK_STATE         *WalkState);
0400 
0401 BOOLEAN
0402 AcpiDsDoImplicitReturn (
0403     ACPI_OPERAND_OBJECT     *ReturnDesc,
0404     ACPI_WALK_STATE         *WalkState,
0405     BOOLEAN                 AddReference);
0406 
0407 BOOLEAN
0408 AcpiDsIsResultUsed (
0409     ACPI_PARSE_OBJECT       *Op,
0410     ACPI_WALK_STATE         *WalkState);
0411 
0412 void
0413 AcpiDsDeleteResultIfNotUsed (
0414     ACPI_PARSE_OBJECT       *Op,
0415     ACPI_OPERAND_OBJECT     *ResultObj,
0416     ACPI_WALK_STATE         *WalkState);
0417 
0418 ACPI_STATUS
0419 AcpiDsCreateOperand (
0420     ACPI_WALK_STATE         *WalkState,
0421     ACPI_PARSE_OBJECT       *Arg,
0422     UINT32                  ArgsRemaining);
0423 
0424 ACPI_STATUS
0425 AcpiDsCreateOperands (
0426     ACPI_WALK_STATE         *WalkState,
0427     ACPI_PARSE_OBJECT       *FirstArg);
0428 
0429 ACPI_STATUS
0430 AcpiDsResolveOperands (
0431     ACPI_WALK_STATE         *WalkState);
0432 
0433 void
0434 AcpiDsClearOperands (
0435     ACPI_WALK_STATE         *WalkState);
0436 
0437 ACPI_STATUS
0438 AcpiDsEvaluateNamePath (
0439     ACPI_WALK_STATE         *WalkState);
0440 
0441 
0442 /*
0443  * dswscope - Scope Stack manipulation
0444  */
0445 ACPI_STATUS
0446 AcpiDsScopeStackPush (
0447     ACPI_NAMESPACE_NODE     *Node,
0448     ACPI_OBJECT_TYPE        Type,
0449     ACPI_WALK_STATE         *WalkState);
0450 
0451 
0452 ACPI_STATUS
0453 AcpiDsScopeStackPop (
0454     ACPI_WALK_STATE         *WalkState);
0455 
0456 void
0457 AcpiDsScopeStackClear (
0458     ACPI_WALK_STATE         *WalkState);
0459 
0460 
0461 /*
0462  * dswstate - parser WALK_STATE management routines
0463  */
0464 ACPI_STATUS
0465 AcpiDsObjStackPush (
0466     void                    *Object,
0467     ACPI_WALK_STATE         *WalkState);
0468 
0469 ACPI_STATUS
0470 AcpiDsObjStackPop (
0471     UINT32                  PopCount,
0472     ACPI_WALK_STATE         *WalkState);
0473 
0474 ACPI_WALK_STATE *
0475 AcpiDsCreateWalkState (
0476     ACPI_OWNER_ID           OwnerId,
0477     ACPI_PARSE_OBJECT       *Origin,
0478     ACPI_OPERAND_OBJECT     *MthDesc,
0479     ACPI_THREAD_STATE       *Thread);
0480 
0481 ACPI_STATUS
0482 AcpiDsInitAmlWalk (
0483     ACPI_WALK_STATE         *WalkState,
0484     ACPI_PARSE_OBJECT       *Op,
0485     ACPI_NAMESPACE_NODE     *MethodNode,
0486     UINT8                   *AmlStart,
0487     UINT32                  AmlLength,
0488     ACPI_EVALUATE_INFO      *Info,
0489     UINT8                   PassNumber);
0490 
0491 void
0492 AcpiDsObjStackPopAndDelete (
0493     UINT32                  PopCount,
0494     ACPI_WALK_STATE         *WalkState);
0495 
0496 void
0497 AcpiDsDeleteWalkState (
0498     ACPI_WALK_STATE         *WalkState);
0499 
0500 ACPI_WALK_STATE *
0501 AcpiDsPopWalkState (
0502     ACPI_THREAD_STATE       *Thread);
0503 
0504 void
0505 AcpiDsPushWalkState (
0506     ACPI_WALK_STATE         *WalkState,
0507     ACPI_THREAD_STATE       *Thread);
0508 
0509 ACPI_STATUS
0510 AcpiDsResultStackClear (
0511     ACPI_WALK_STATE         *WalkState);
0512 
0513 ACPI_WALK_STATE *
0514 AcpiDsGetCurrentWalkState (
0515     ACPI_THREAD_STATE       *Thread);
0516 
0517 ACPI_STATUS
0518 AcpiDsResultPop (
0519     ACPI_OPERAND_OBJECT     **Object,
0520     ACPI_WALK_STATE         *WalkState);
0521 
0522 ACPI_STATUS
0523 AcpiDsResultPush (
0524     ACPI_OPERAND_OBJECT     *Object,
0525     ACPI_WALK_STATE         *WalkState);
0526 
0527 #endif /* _ACDISPAT_H_ */