Back to home page

Quest Cross Reference

 
 

    


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

0001 /******************************************************************************
0002  *
0003  * Name: acnamesp.h - Namespace subcomponent prototypes and defines
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 #ifndef __ACNAMESP_H__
0117 #define __ACNAMESP_H__
0118 
0119 
0120 /* To search the entire name space, pass this as SearchBase */
0121 
0122 #define ACPI_NS_ALL                 ((ACPI_HANDLE)0)
0123 
0124 /*
0125  * Elements of AcpiNsProperties are bit significant
0126  * and should be one-to-one with values of ACPI_OBJECT_TYPE
0127  */
0128 #define ACPI_NS_NORMAL              0
0129 #define ACPI_NS_NEWSCOPE            1   /* a definition of this type opens a name scope */
0130 #define ACPI_NS_LOCAL               2   /* suppress search of enclosing scopes */
0131 
0132 /* Flags for AcpiNsLookup, AcpiNsSearchAndEnter */
0133 
0134 #define ACPI_NS_NO_UPSEARCH         0
0135 #define ACPI_NS_SEARCH_PARENT       0x01
0136 #define ACPI_NS_DONT_OPEN_SCOPE     0x02
0137 #define ACPI_NS_NO_PEER_SEARCH      0x04
0138 #define ACPI_NS_ERROR_IF_FOUND      0x08
0139 #define ACPI_NS_PREFIX_IS_SCOPE     0x10
0140 #define ACPI_NS_EXTERNAL            0x20
0141 #define ACPI_NS_TEMPORARY           0x40
0142 
0143 /* Flags for AcpiNsWalkNamespace */
0144 
0145 #define ACPI_NS_WALK_NO_UNLOCK      0
0146 #define ACPI_NS_WALK_UNLOCK         0x01
0147 #define ACPI_NS_WALK_TEMP_NODES     0x02
0148 
0149 
0150 /*
0151  * nsinit - Namespace initialization
0152  */
0153 ACPI_STATUS
0154 AcpiNsInitializeObjects (
0155     void);
0156 
0157 ACPI_STATUS
0158 AcpiNsInitializeDevices (
0159     void);
0160 
0161 
0162 /*
0163  * nsload -  Namespace loading
0164  */
0165 ACPI_STATUS
0166 AcpiNsLoadNamespace (
0167     void);
0168 
0169 ACPI_STATUS
0170 AcpiNsLoadTable (
0171     UINT32                  TableIndex,
0172     ACPI_NAMESPACE_NODE     *Node);
0173 
0174 
0175 /*
0176  * nswalk - walk the namespace
0177  */
0178 ACPI_STATUS
0179 AcpiNsWalkNamespace (
0180     ACPI_OBJECT_TYPE        Type,
0181     ACPI_HANDLE             StartObject,
0182     UINT32                  MaxDepth,
0183     UINT32                  Flags,
0184     ACPI_WALK_CALLBACK      UserFunction,
0185     void                    *Context,
0186     void                    **ReturnValue);
0187 
0188 ACPI_NAMESPACE_NODE *
0189 AcpiNsGetNextNode (
0190     ACPI_NAMESPACE_NODE     *Parent,
0191     ACPI_NAMESPACE_NODE     *Child);
0192 
0193 ACPI_NAMESPACE_NODE *
0194 AcpiNsGetNextNodeTyped (
0195     ACPI_OBJECT_TYPE        Type,
0196     ACPI_NAMESPACE_NODE     *Parent,
0197     ACPI_NAMESPACE_NODE     *Child);
0198 
0199 /*
0200  * nsparse - table parsing
0201  */
0202 ACPI_STATUS
0203 AcpiNsParseTable (
0204     UINT32                  TableIndex,
0205     ACPI_NAMESPACE_NODE     *StartNode);
0206 
0207 ACPI_STATUS
0208 AcpiNsOneCompleteParse (
0209     UINT32                  PassNumber,
0210     UINT32                  TableIndex,
0211     ACPI_NAMESPACE_NODE     *StartNode);
0212 
0213 
0214 /*
0215  * nsaccess - Top-level namespace access
0216  */
0217 ACPI_STATUS
0218 AcpiNsRootInitialize (
0219     void);
0220 
0221 ACPI_STATUS
0222 AcpiNsLookup (
0223     ACPI_GENERIC_STATE      *ScopeInfo,
0224     char                    *Name,
0225     ACPI_OBJECT_TYPE        Type,
0226     ACPI_INTERPRETER_MODE   InterpreterMode,
0227     UINT32                  Flags,
0228     ACPI_WALK_STATE         *WalkState,
0229     ACPI_NAMESPACE_NODE     **RetNode);
0230 
0231 
0232 /*
0233  * nsalloc - Named object allocation/deallocation
0234  */
0235 ACPI_NAMESPACE_NODE *
0236 AcpiNsCreateNode (
0237     UINT32                  Name);
0238 
0239 void
0240 AcpiNsDeleteNode (
0241     ACPI_NAMESPACE_NODE     *Node);
0242 
0243 void
0244 AcpiNsRemoveNode (
0245     ACPI_NAMESPACE_NODE     *Node);
0246 
0247 void
0248 AcpiNsDeleteNamespaceSubtree (
0249     ACPI_NAMESPACE_NODE     *ParentHandle);
0250 
0251 void
0252 AcpiNsDeleteNamespaceByOwner (
0253     ACPI_OWNER_ID           OwnerId);
0254 
0255 void
0256 AcpiNsDetachObject (
0257     ACPI_NAMESPACE_NODE     *Node);
0258 
0259 void
0260 AcpiNsDeleteChildren (
0261     ACPI_NAMESPACE_NODE     *Parent);
0262 
0263 int
0264 AcpiNsCompareNames (
0265     char                    *Name1,
0266     char                    *Name2);
0267 
0268 
0269 /*
0270  * nsdump - Namespace dump/print utilities
0271  */
0272 void
0273 AcpiNsDumpTables (
0274     ACPI_HANDLE             SearchBase,
0275     UINT32                  MaxDepth);
0276 
0277 void
0278 AcpiNsDumpEntry (
0279     ACPI_HANDLE             Handle,
0280     UINT32                  DebugLevel);
0281 
0282 void
0283 AcpiNsDumpPathname (
0284     ACPI_HANDLE             Handle,
0285     char                    *Msg,
0286     UINT32                  Level,
0287     UINT32                  Component);
0288 
0289 void
0290 AcpiNsPrintPathname (
0291     UINT32                  NumSegments,
0292     char                    *Pathname);
0293 
0294 ACPI_STATUS
0295 AcpiNsDumpOneObject (
0296     ACPI_HANDLE             ObjHandle,
0297     UINT32                  Level,
0298     void                    *Context,
0299     void                    **ReturnValue);
0300 
0301 void
0302 AcpiNsDumpObjects (
0303     ACPI_OBJECT_TYPE        Type,
0304     UINT8                   DisplayType,
0305     UINT32                  MaxDepth,
0306     ACPI_OWNER_ID           OwnerId,
0307     ACPI_HANDLE             StartHandle);
0308 
0309 
0310 /*
0311  * nseval - Namespace evaluation functions
0312  */
0313 ACPI_STATUS
0314 AcpiNsEvaluate (
0315     ACPI_EVALUATE_INFO      *Info);
0316 
0317 
0318 /*
0319  * nspredef - Support for predefined/reserved names
0320  */
0321 ACPI_STATUS
0322 AcpiNsCheckPredefinedNames (
0323     ACPI_NAMESPACE_NODE     *Node,
0324     UINT32                  UserParamCount,
0325     ACPI_STATUS             ReturnStatus,
0326     ACPI_OPERAND_OBJECT     **ReturnObject);
0327 
0328 const ACPI_PREDEFINED_INFO *
0329 AcpiNsCheckForPredefinedName (
0330     ACPI_NAMESPACE_NODE     *Node);
0331 
0332 void
0333 AcpiNsCheckParameterCount (
0334     char                        *Pathname,
0335     ACPI_NAMESPACE_NODE         *Node,
0336     UINT32                      UserParamCount,
0337     const ACPI_PREDEFINED_INFO  *Info);
0338 
0339 
0340 /*
0341  * nsnames - Name and Scope manipulation
0342  */
0343 UINT32
0344 AcpiNsOpensScope (
0345     ACPI_OBJECT_TYPE        Type);
0346 
0347 ACPI_STATUS
0348 AcpiNsBuildExternalPath (
0349     ACPI_NAMESPACE_NODE     *Node,
0350     ACPI_SIZE               Size,
0351     char                    *NameBuffer);
0352 
0353 char *
0354 AcpiNsGetExternalPathname (
0355     ACPI_NAMESPACE_NODE     *Node);
0356 
0357 char *
0358 AcpiNsNameOfCurrentScope (
0359     ACPI_WALK_STATE         *WalkState);
0360 
0361 ACPI_STATUS
0362 AcpiNsHandleToPathname (
0363     ACPI_HANDLE             TargetHandle,
0364     ACPI_BUFFER             *Buffer);
0365 
0366 BOOLEAN
0367 AcpiNsPatternMatch (
0368     ACPI_NAMESPACE_NODE     *ObjNode,
0369     char                    *SearchFor);
0370 
0371 ACPI_STATUS
0372 AcpiNsGetNode (
0373     ACPI_NAMESPACE_NODE     *PrefixNode,
0374     const char              *ExternalPathname,
0375     UINT32                  Flags,
0376     ACPI_NAMESPACE_NODE     **OutNode);
0377 
0378 ACPI_SIZE
0379 AcpiNsGetPathnameLength (
0380     ACPI_NAMESPACE_NODE     *Node);
0381 
0382 
0383 /*
0384  * nsobject - Object management for namespace nodes
0385  */
0386 ACPI_STATUS
0387 AcpiNsAttachObject (
0388     ACPI_NAMESPACE_NODE     *Node,
0389     ACPI_OPERAND_OBJECT     *Object,
0390     ACPI_OBJECT_TYPE        Type);
0391 
0392 ACPI_OPERAND_OBJECT *
0393 AcpiNsGetAttachedObject (
0394     ACPI_NAMESPACE_NODE     *Node);
0395 
0396 ACPI_OPERAND_OBJECT *
0397 AcpiNsGetSecondaryObject (
0398     ACPI_OPERAND_OBJECT     *ObjDesc);
0399 
0400 ACPI_STATUS
0401 AcpiNsAttachData (
0402     ACPI_NAMESPACE_NODE     *Node,
0403     ACPI_OBJECT_HANDLER     Handler,
0404     void                    *Data);
0405 
0406 ACPI_STATUS
0407 AcpiNsDetachData (
0408     ACPI_NAMESPACE_NODE     *Node,
0409     ACPI_OBJECT_HANDLER     Handler);
0410 
0411 ACPI_STATUS
0412 AcpiNsGetAttachedData (
0413     ACPI_NAMESPACE_NODE     *Node,
0414     ACPI_OBJECT_HANDLER     Handler,
0415     void                    **Data);
0416 
0417 
0418 /*
0419  * nssearch - Namespace searching and entry
0420  */
0421 ACPI_STATUS
0422 AcpiNsSearchAndEnter (
0423     UINT32                  EntryName,
0424     ACPI_WALK_STATE         *WalkState,
0425     ACPI_NAMESPACE_NODE     *Node,
0426     ACPI_INTERPRETER_MODE   InterpreterMode,
0427     ACPI_OBJECT_TYPE        Type,
0428     UINT32                  Flags,
0429     ACPI_NAMESPACE_NODE     **RetNode);
0430 
0431 ACPI_STATUS
0432 AcpiNsSearchOneScope (
0433     UINT32                  EntryName,
0434     ACPI_NAMESPACE_NODE     *Node,
0435     ACPI_OBJECT_TYPE        Type,
0436     ACPI_NAMESPACE_NODE     **RetNode);
0437 
0438 void
0439 AcpiNsInstallNode (
0440     ACPI_WALK_STATE         *WalkState,
0441     ACPI_NAMESPACE_NODE     *ParentNode,
0442     ACPI_NAMESPACE_NODE     *Node,
0443     ACPI_OBJECT_TYPE        Type);
0444 
0445 
0446 /*
0447  * nsutils - Utility functions
0448  */
0449 BOOLEAN
0450 AcpiNsValidRootPrefix (
0451     char                    Prefix);
0452 
0453 ACPI_OBJECT_TYPE
0454 AcpiNsGetType (
0455     ACPI_NAMESPACE_NODE     *Node);
0456 
0457 UINT32
0458 AcpiNsLocal (
0459     ACPI_OBJECT_TYPE        Type);
0460 
0461 void
0462 AcpiNsReportError (
0463     const char              *ModuleName,
0464     UINT32                  LineNumber,
0465     const char              *InternalName,
0466     ACPI_STATUS             LookupStatus);
0467 
0468 void
0469 AcpiNsReportMethodError (
0470     const char              *ModuleName,
0471     UINT32                  LineNumber,
0472     const char              *Message,
0473     ACPI_NAMESPACE_NODE     *Node,
0474     const char              *Path,
0475     ACPI_STATUS             LookupStatus);
0476 
0477 void
0478 AcpiNsPrintNodePathname (
0479     ACPI_NAMESPACE_NODE     *Node,
0480     const char              *Msg);
0481 
0482 ACPI_STATUS
0483 AcpiNsBuildInternalName (
0484     ACPI_NAMESTRING_INFO    *Info);
0485 
0486 void
0487 AcpiNsGetInternalNameLength (
0488     ACPI_NAMESTRING_INFO    *Info);
0489 
0490 ACPI_STATUS
0491 AcpiNsInternalizeName (
0492     const char              *DottedName,
0493     char                    **ConvertedName);
0494 
0495 ACPI_STATUS
0496 AcpiNsExternalizeName (
0497     UINT32                  InternalNameLength,
0498     const char              *InternalName,
0499     UINT32                  *ConvertedNameLength,
0500     char                    **ConvertedName);
0501 
0502 ACPI_NAMESPACE_NODE *
0503 AcpiNsMapHandleToNode (
0504     ACPI_HANDLE             Handle);
0505 
0506 ACPI_HANDLE
0507 AcpiNsConvertEntryToHandle(
0508     ACPI_NAMESPACE_NODE     *Node);
0509 
0510 void
0511 AcpiNsTerminate (
0512     void);
0513 
0514 ACPI_NAMESPACE_NODE *
0515 AcpiNsGetParentNode (
0516     ACPI_NAMESPACE_NODE     *Node);
0517 
0518 
0519 ACPI_NAMESPACE_NODE *
0520 AcpiNsGetNextValidNode (
0521     ACPI_NAMESPACE_NODE     *Node);
0522 
0523 #endif /* __ACNAMESP_H__ */