Back to home page

Quest Cross Reference

 
 

    


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

0001 /******************************************************************************
0002  *
0003  * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
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 _ACUTILS_H
0117 #define _ACUTILS_H
0118 
0119 
0120 extern const UINT8                      AcpiGbl_ResourceAmlSizes[];
0121 
0122 /* Strings used by the disassembler and debugger resource dump routines */
0123 
0124 #if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER)
0125 
0126 extern const char                       *AcpiGbl_BmDecode[];
0127 extern const char                       *AcpiGbl_ConfigDecode[];
0128 extern const char                       *AcpiGbl_ConsumeDecode[];
0129 extern const char                       *AcpiGbl_DecDecode[];
0130 extern const char                       *AcpiGbl_HeDecode[];
0131 extern const char                       *AcpiGbl_IoDecode[];
0132 extern const char                       *AcpiGbl_LlDecode[];
0133 extern const char                       *AcpiGbl_MaxDecode[];
0134 extern const char                       *AcpiGbl_MemDecode[];
0135 extern const char                       *AcpiGbl_MinDecode[];
0136 extern const char                       *AcpiGbl_MtpDecode[];
0137 extern const char                       *AcpiGbl_RngDecode[];
0138 extern const char                       *AcpiGbl_RwDecode[];
0139 extern const char                       *AcpiGbl_ShrDecode[];
0140 extern const char                       *AcpiGbl_SizDecode[];
0141 extern const char                       *AcpiGbl_TrsDecode[];
0142 extern const char                       *AcpiGbl_TtpDecode[];
0143 extern const char                       *AcpiGbl_TypDecode[];
0144 #endif
0145 
0146 /* Types for Resource descriptor entries */
0147 
0148 #define ACPI_INVALID_RESOURCE           0
0149 #define ACPI_FIXED_LENGTH               1
0150 #define ACPI_VARIABLE_LENGTH            2
0151 #define ACPI_SMALL_VARIABLE_LENGTH      3
0152 
0153 typedef
0154 ACPI_STATUS (*ACPI_WALK_AML_CALLBACK) (
0155     UINT8                   *Aml,
0156     UINT32                  Length,
0157     UINT32                  Offset,
0158     UINT8                   ResourceIndex,
0159     void                    *Context);
0160 
0161 typedef
0162 ACPI_STATUS (*ACPI_PKG_CALLBACK) (
0163     UINT8                   ObjectType,
0164     ACPI_OPERAND_OBJECT     *SourceObject,
0165     ACPI_GENERIC_STATE      *State,
0166     void                    *Context);
0167 
0168 typedef struct acpi_pkg_info
0169 {
0170     UINT8                   *FreeSpace;
0171     ACPI_SIZE               Length;
0172     UINT32                  ObjectSpace;
0173     UINT32                  NumPackages;
0174 
0175 } ACPI_PKG_INFO;
0176 
0177 #define REF_INCREMENT       (UINT16) 0
0178 #define REF_DECREMENT       (UINT16) 1
0179 #define REF_FORCE_DELETE    (UINT16) 2
0180 
0181 /* AcpiUtDumpBuffer */
0182 
0183 #define DB_BYTE_DISPLAY     1
0184 #define DB_WORD_DISPLAY     2
0185 #define DB_DWORD_DISPLAY    4
0186 #define DB_QWORD_DISPLAY    8
0187 
0188 
0189 /*
0190  * utglobal - Global data structures and procedures
0191  */
0192 ACPI_STATUS
0193 AcpiUtInitGlobals (
0194     void);
0195 
0196 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
0197 
0198 char *
0199 AcpiUtGetMutexName (
0200     UINT32                  MutexId);
0201 
0202 const char *
0203 AcpiUtGetNotifyName (
0204     UINT32                  NotifyValue);
0205 
0206 #endif
0207 
0208 char *
0209 AcpiUtGetTypeName (
0210     ACPI_OBJECT_TYPE        Type);
0211 
0212 char *
0213 AcpiUtGetNodeName (
0214     void                    *Object);
0215 
0216 char *
0217 AcpiUtGetDescriptorName (
0218     void                    *Object);
0219 
0220 const char *
0221 AcpiUtGetReferenceName (
0222     ACPI_OPERAND_OBJECT     *Object);
0223 
0224 char *
0225 AcpiUtGetObjectTypeName (
0226     ACPI_OPERAND_OBJECT     *ObjDesc);
0227 
0228 char *
0229 AcpiUtGetRegionName (
0230     UINT8                   SpaceId);
0231 
0232 char *
0233 AcpiUtGetEventName (
0234     UINT32                  EventId);
0235 
0236 char
0237 AcpiUtHexToAsciiChar (
0238     ACPI_INTEGER            Integer,
0239     UINT32                  Position);
0240 
0241 BOOLEAN
0242 AcpiUtValidObjectType (
0243     ACPI_OBJECT_TYPE        Type);
0244 
0245 
0246 /*
0247  * utinit - miscellaneous initialization and shutdown
0248  */
0249 ACPI_STATUS
0250 AcpiUtHardwareInitialize (
0251     void);
0252 
0253 void
0254 AcpiUtSubsystemShutdown (
0255     void);
0256 
0257 
0258 /*
0259  * utclib - Local implementations of C library functions
0260  */
0261 #ifndef ACPI_USE_SYSTEM_CLIBRARY
0262 
0263 ACPI_SIZE
0264 AcpiUtStrlen (
0265     const char              *String);
0266 
0267 char *
0268 AcpiUtStrcpy (
0269     char                    *DstString,
0270     const char              *SrcString);
0271 
0272 char *
0273 AcpiUtStrncpy (
0274     char                    *DstString,
0275     const char              *SrcString,
0276     ACPI_SIZE               Count);
0277 
0278 int
0279 AcpiUtMemcmp (
0280     const char              *Buffer1,
0281     const char              *Buffer2,
0282     ACPI_SIZE               Count);
0283 
0284 int
0285 AcpiUtStrncmp (
0286     const char              *String1,
0287     const char              *String2,
0288     ACPI_SIZE               Count);
0289 
0290 int
0291 AcpiUtStrcmp (
0292     const char              *String1,
0293     const char              *String2);
0294 
0295 char *
0296 AcpiUtStrcat (
0297     char                    *DstString,
0298     const char              *SrcString);
0299 
0300 char *
0301 AcpiUtStrncat (
0302     char                    *DstString,
0303     const char              *SrcString,
0304     ACPI_SIZE               Count);
0305 
0306 UINT32
0307 AcpiUtStrtoul (
0308     const char              *String,
0309     char                    **Terminator,
0310     UINT32                  Base);
0311 
0312 char *
0313 AcpiUtStrstr (
0314     char                    *String1,
0315     char                    *String2);
0316 
0317 void *
0318 AcpiUtMemcpy (
0319     void                    *Dest,
0320     const void              *Src,
0321     ACPI_SIZE               Count);
0322 
0323 void *
0324 AcpiUtMemset (
0325     void                    *Dest,
0326     UINT8                   Value,
0327     ACPI_SIZE               Count);
0328 
0329 int
0330 AcpiUtToUpper (
0331     int                     c);
0332 
0333 int
0334 AcpiUtToLower (
0335     int                     c);
0336 
0337 extern const UINT8 _acpi_ctype[];
0338 
0339 #define _ACPI_XA     0x00    /* extra alphabetic - not supported */
0340 #define _ACPI_XS     0x40    /* extra space */
0341 #define _ACPI_BB     0x00    /* BEL, BS, etc. - not supported */
0342 #define _ACPI_CN     0x20    /* CR, FF, HT, NL, VT */
0343 #define _ACPI_DI     0x04    /* '0'-'9' */
0344 #define _ACPI_LO     0x02    /* 'a'-'z' */
0345 #define _ACPI_PU     0x10    /* punctuation */
0346 #define _ACPI_SP     0x08    /* space */
0347 #define _ACPI_UP     0x01    /* 'A'-'Z' */
0348 #define _ACPI_XD     0x80    /* '0'-'9', 'A'-'F', 'a'-'f' */
0349 
0350 #define ACPI_IS_DIGIT(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI))
0351 #define ACPI_IS_SPACE(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP))
0352 #define ACPI_IS_XDIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_XD))
0353 #define ACPI_IS_UPPER(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_UP))
0354 #define ACPI_IS_LOWER(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO))
0355 #define ACPI_IS_PRINT(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_SP | _ACPI_PU))
0356 #define ACPI_IS_ALPHA(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP))
0357 
0358 #endif /* !ACPI_USE_SYSTEM_CLIBRARY */
0359 
0360 #define ACPI_IS_ASCII(c)  ((c) < 0x80)
0361 
0362 
0363 /*
0364  * utcopy - Object construction and conversion interfaces
0365  */
0366 ACPI_STATUS
0367 AcpiUtBuildSimpleObject(
0368     ACPI_OPERAND_OBJECT     *Obj,
0369     ACPI_OBJECT             *UserObj,
0370     UINT8                   *DataSpace,
0371     UINT32                  *BufferSpaceUsed);
0372 
0373 ACPI_STATUS
0374 AcpiUtBuildPackageObject (
0375     ACPI_OPERAND_OBJECT     *Obj,
0376     UINT8                   *Buffer,
0377     UINT32                  *SpaceUsed);
0378 
0379 ACPI_STATUS
0380 AcpiUtCopyIobjectToEobject (
0381     ACPI_OPERAND_OBJECT     *Obj,
0382     ACPI_BUFFER             *RetBuffer);
0383 
0384 ACPI_STATUS
0385 AcpiUtCopyEobjectToIobject (
0386     ACPI_OBJECT             *Obj,
0387     ACPI_OPERAND_OBJECT     **InternalObj);
0388 
0389 ACPI_STATUS
0390 AcpiUtCopyISimpleToIsimple (
0391     ACPI_OPERAND_OBJECT     *SourceObj,
0392     ACPI_OPERAND_OBJECT     *DestObj);
0393 
0394 ACPI_STATUS
0395 AcpiUtCopyIobjectToIobject (
0396     ACPI_OPERAND_OBJECT     *SourceDesc,
0397     ACPI_OPERAND_OBJECT     **DestDesc,
0398     ACPI_WALK_STATE         *WalkState);
0399 
0400 
0401 /*
0402  * utcreate - Object creation
0403  */
0404 ACPI_STATUS
0405 AcpiUtUpdateObjectReference (
0406     ACPI_OPERAND_OBJECT     *Object,
0407     UINT16                  Action);
0408 
0409 
0410 /*
0411  * utdebug - Debug interfaces
0412  */
0413 void
0414 AcpiUtInitStackPtrTrace (
0415     void);
0416 
0417 void
0418 AcpiUtTrackStackPtr (
0419     void);
0420 
0421 void
0422 AcpiUtTrace (
0423     UINT32                  LineNumber,
0424     const char              *FunctionName,
0425     const char              *ModuleName,
0426     UINT32                  ComponentId);
0427 
0428 void
0429 AcpiUtTracePtr (
0430     UINT32                  LineNumber,
0431     const char              *FunctionName,
0432     const char              *ModuleName,
0433     UINT32                  ComponentId,
0434     void                    *Pointer);
0435 
0436 void
0437 AcpiUtTraceU32 (
0438     UINT32                  LineNumber,
0439     const char              *FunctionName,
0440     const char              *ModuleName,
0441     UINT32                  ComponentId,
0442     UINT32                  Integer);
0443 
0444 void
0445 AcpiUtTraceStr (
0446     UINT32                  LineNumber,
0447     const char              *FunctionName,
0448     const char              *ModuleName,
0449     UINT32                  ComponentId,
0450     char                    *String);
0451 
0452 void
0453 AcpiUtExit (
0454     UINT32                  LineNumber,
0455     const char              *FunctionName,
0456     const char              *ModuleName,
0457     UINT32                  ComponentId);
0458 
0459 void
0460 AcpiUtStatusExit (
0461     UINT32                  LineNumber,
0462     const char              *FunctionName,
0463     const char              *ModuleName,
0464     UINT32                  ComponentId,
0465     ACPI_STATUS             Status);
0466 
0467 void
0468 AcpiUtValueExit (
0469     UINT32                  LineNumber,
0470     const char              *FunctionName,
0471     const char              *ModuleName,
0472     UINT32                  ComponentId,
0473     ACPI_INTEGER            Value);
0474 
0475 void
0476 AcpiUtPtrExit (
0477     UINT32                  LineNumber,
0478     const char              *FunctionName,
0479     const char              *ModuleName,
0480     UINT32                  ComponentId,
0481     UINT8                   *Ptr);
0482 
0483 void
0484 AcpiUtDumpBuffer (
0485     UINT8                   *Buffer,
0486     UINT32                  Count,
0487     UINT32                  Display,
0488     UINT32                  componentId);
0489 
0490 void
0491 AcpiUtDumpBuffer2 (
0492     UINT8                   *Buffer,
0493     UINT32                  Count,
0494     UINT32                  Display);
0495 
0496 void
0497 AcpiUtReportError (
0498     char                    *ModuleName,
0499     UINT32                  LineNumber);
0500 
0501 void
0502 AcpiUtReportInfo (
0503     char                    *ModuleName,
0504     UINT32                  LineNumber);
0505 
0506 void
0507 AcpiUtReportWarning (
0508     char                    *ModuleName,
0509     UINT32                  LineNumber);
0510 
0511 /*
0512  * utdelete - Object deletion and reference counts
0513  */
0514 void
0515 AcpiUtAddReference (
0516     ACPI_OPERAND_OBJECT     *Object);
0517 
0518 void
0519 AcpiUtRemoveReference (
0520     ACPI_OPERAND_OBJECT     *Object);
0521 
0522 void
0523 AcpiUtDeleteInternalPackageObject (
0524     ACPI_OPERAND_OBJECT     *Object);
0525 
0526 void
0527 AcpiUtDeleteInternalSimpleObject (
0528     ACPI_OPERAND_OBJECT     *Object);
0529 
0530 void
0531 AcpiUtDeleteInternalObjectList (
0532     ACPI_OPERAND_OBJECT     **ObjList);
0533 
0534 
0535 /*
0536  * uteval - object evaluation
0537  */
0538 ACPI_STATUS
0539 AcpiUtOsiImplementation (
0540     ACPI_WALK_STATE         *WalkState);
0541 
0542 ACPI_STATUS
0543 AcpiUtEvaluateObject (
0544     ACPI_NAMESPACE_NODE     *PrefixNode,
0545     char                    *Path,
0546     UINT32                  ExpectedReturnBtypes,
0547     ACPI_OPERAND_OBJECT     **ReturnDesc);
0548 
0549 ACPI_STATUS
0550 AcpiUtEvaluateNumericObject (
0551     char                    *ObjectName,
0552     ACPI_NAMESPACE_NODE     *DeviceNode,
0553     ACPI_INTEGER            *Value);
0554 
0555 ACPI_STATUS
0556 AcpiUtExecute_STA (
0557     ACPI_NAMESPACE_NODE     *DeviceNode,
0558     UINT32                  *StatusFlags);
0559 
0560 ACPI_STATUS
0561 AcpiUtExecutePowerMethods (
0562     ACPI_NAMESPACE_NODE     *DeviceNode,
0563     const char              **MethodNames,
0564     UINT8                   MethodCount,
0565     UINT8                   *OutValues);
0566 
0567 
0568 /*
0569  * utids - device ID support
0570  */
0571 ACPI_STATUS
0572 AcpiUtExecute_HID (
0573     ACPI_NAMESPACE_NODE     *DeviceNode,
0574     ACPI_DEVICE_ID          **ReturnId);
0575 
0576 ACPI_STATUS
0577 AcpiUtExecute_UID (
0578     ACPI_NAMESPACE_NODE     *DeviceNode,
0579     ACPI_DEVICE_ID          **ReturnId);
0580 
0581 ACPI_STATUS
0582 AcpiUtExecute_CID (
0583     ACPI_NAMESPACE_NODE     *DeviceNode,
0584     ACPI_DEVICE_ID_LIST     **ReturnCidList);
0585 
0586 
0587 /*
0588  * utlock - reader/writer locks
0589  */
0590 ACPI_STATUS
0591 AcpiUtCreateRwLock (
0592     ACPI_RW_LOCK            *Lock);
0593 
0594 void
0595 AcpiUtDeleteRwLock (
0596     ACPI_RW_LOCK            *Lock);
0597 
0598 ACPI_STATUS
0599 AcpiUtAcquireReadLock (
0600     ACPI_RW_LOCK            *Lock);
0601 
0602 ACPI_STATUS
0603 AcpiUtReleaseReadLock (
0604     ACPI_RW_LOCK            *Lock);
0605 
0606 ACPI_STATUS
0607 AcpiUtAcquireWriteLock (
0608     ACPI_RW_LOCK            *Lock);
0609 
0610 void
0611 AcpiUtReleaseWriteLock (
0612     ACPI_RW_LOCK            *Lock);
0613 
0614 
0615 /*
0616  * utobject - internal object create/delete/cache routines
0617  */
0618 ACPI_OPERAND_OBJECT  *
0619 AcpiUtCreateInternalObjectDbg (
0620     const char              *ModuleName,
0621     UINT32                  LineNumber,
0622     UINT32                  ComponentId,
0623     ACPI_OBJECT_TYPE        Type);
0624 
0625 void *
0626 AcpiUtAllocateObjectDescDbg (
0627     const char              *ModuleName,
0628     UINT32                  LineNumber,
0629     UINT32                  ComponentId);
0630 
0631 #define AcpiUtCreateInternalObject(t)   AcpiUtCreateInternalObjectDbg (_AcpiModuleName,__LINE__,_COMPONENT,t)
0632 #define AcpiUtAllocateObjectDesc()      AcpiUtAllocateObjectDescDbg (_AcpiModuleName,__LINE__,_COMPONENT)
0633 
0634 void
0635 AcpiUtDeleteObjectDesc (
0636     ACPI_OPERAND_OBJECT     *Object);
0637 
0638 BOOLEAN
0639 AcpiUtValidInternalObject (
0640     void                    *Object);
0641 
0642 ACPI_OPERAND_OBJECT *
0643 AcpiUtCreatePackageObject (
0644     UINT32                  Count);
0645 
0646 ACPI_OPERAND_OBJECT *
0647 AcpiUtCreateBufferObject (
0648     ACPI_SIZE               BufferSize);
0649 
0650 ACPI_OPERAND_OBJECT *
0651 AcpiUtCreateStringObject (
0652     ACPI_SIZE               StringSize);
0653 
0654 ACPI_STATUS
0655 AcpiUtGetObjectSize(
0656     ACPI_OPERAND_OBJECT     *Obj,
0657     ACPI_SIZE               *ObjLength);
0658 
0659 
0660 /*
0661  * utstate - Generic state creation/cache routines
0662  */
0663 void
0664 AcpiUtPushGenericState (
0665     ACPI_GENERIC_STATE      **ListHead,
0666     ACPI_GENERIC_STATE      *State);
0667 
0668 ACPI_GENERIC_STATE *
0669 AcpiUtPopGenericState (
0670     ACPI_GENERIC_STATE      **ListHead);
0671 
0672 
0673 ACPI_GENERIC_STATE *
0674 AcpiUtCreateGenericState (
0675     void);
0676 
0677 ACPI_THREAD_STATE *
0678 AcpiUtCreateThreadState (
0679     void);
0680 
0681 ACPI_GENERIC_STATE *
0682 AcpiUtCreateUpdateState (
0683     ACPI_OPERAND_OBJECT     *Object,
0684     UINT16                  Action);
0685 
0686 ACPI_GENERIC_STATE *
0687 AcpiUtCreatePkgState (
0688     void                    *InternalObject,
0689     void                    *ExternalObject,
0690     UINT16                  Index);
0691 
0692 ACPI_STATUS
0693 AcpiUtCreateUpdateStateAndPush (
0694     ACPI_OPERAND_OBJECT     *Object,
0695     UINT16                  Action,
0696     ACPI_GENERIC_STATE      **StateList);
0697 
0698 ACPI_STATUS
0699 AcpiUtCreatePkgStateAndPush (
0700     void                    *InternalObject,
0701     void                    *ExternalObject,
0702     UINT16                  Index,
0703     ACPI_GENERIC_STATE      **StateList);
0704 
0705 ACPI_GENERIC_STATE *
0706 AcpiUtCreateControlState (
0707     void);
0708 
0709 void
0710 AcpiUtDeleteGenericState (
0711     ACPI_GENERIC_STATE      *State);
0712 
0713 
0714 /*
0715  * utmath
0716  */
0717 ACPI_STATUS
0718 AcpiUtDivide (
0719     ACPI_INTEGER            InDividend,
0720     ACPI_INTEGER            InDivisor,
0721     ACPI_INTEGER            *OutQuotient,
0722     ACPI_INTEGER            *OutRemainder);
0723 
0724 ACPI_STATUS
0725 AcpiUtShortDivide (
0726     ACPI_INTEGER            InDividend,
0727     UINT32                  Divisor,
0728     ACPI_INTEGER            *OutQuotient,
0729     UINT32                  *OutRemainder);
0730 
0731 /*
0732  * utmisc
0733  */
0734 const char *
0735 AcpiUtValidateException (
0736     ACPI_STATUS             Status);
0737 
0738 BOOLEAN
0739 AcpiUtIsPciRootBridge (
0740     char                    *Id);
0741 
0742 BOOLEAN
0743 AcpiUtIsAmlTable (
0744     ACPI_TABLE_HEADER       *Table);
0745 
0746 ACPI_STATUS
0747 AcpiUtAllocateOwnerId (
0748     ACPI_OWNER_ID           *OwnerId);
0749 
0750 void
0751 AcpiUtReleaseOwnerId (
0752     ACPI_OWNER_ID           *OwnerId);
0753 
0754 ACPI_STATUS
0755 AcpiUtWalkPackageTree (
0756     ACPI_OPERAND_OBJECT     *SourceObject,
0757     void                    *TargetObject,
0758     ACPI_PKG_CALLBACK       WalkCallback,
0759     void                    *Context);
0760 
0761 void
0762 AcpiUtStrupr (
0763     char                    *SrcString);
0764 
0765 void
0766 AcpiUtPrintString (
0767     char                    *String,
0768     UINT8                   MaxLength);
0769 
0770 BOOLEAN
0771 AcpiUtValidAcpiName (
0772     UINT32                  Name);
0773 
0774 void
0775 AcpiUtRepairName (
0776     char                    *Name);
0777 
0778 BOOLEAN
0779 AcpiUtValidAcpiChar (
0780     char                    Character,
0781     UINT32                  Position);
0782 
0783 ACPI_STATUS
0784 AcpiUtStrtoul64 (
0785     char                    *String,
0786     UINT32                  Base,
0787     ACPI_INTEGER            *RetInteger);
0788 
0789 void ACPI_INTERNAL_VAR_XFACE
0790 AcpiUtPredefinedWarning (
0791     const char              *ModuleName,
0792     UINT32                  LineNumber,
0793     char                    *Pathname,
0794     UINT8                   NodeFlags,
0795     const char              *Format,
0796     ...);
0797 
0798 /* Values for Base above (16=Hex, 10=Decimal) */
0799 
0800 #define ACPI_ANY_BASE        0
0801 
0802 UINT32
0803 AcpiUtDwordByteSwap (
0804     UINT32                  Value);
0805 
0806 void
0807 AcpiUtSetIntegerWidth (
0808     UINT8                   Revision);
0809 
0810 #ifdef ACPI_DEBUG_OUTPUT
0811 void
0812 AcpiUtDisplayInitPathname (
0813     UINT8                   Type,
0814     ACPI_NAMESPACE_NODE     *ObjHandle,
0815     char                    *Path);
0816 #endif
0817 
0818 
0819 /*
0820  * utresrc
0821  */
0822 ACPI_STATUS
0823 AcpiUtWalkAmlResources (
0824     UINT8                   *Aml,
0825     ACPI_SIZE               AmlLength,
0826     ACPI_WALK_AML_CALLBACK  UserFunction,
0827     void                    *Context);
0828 
0829 ACPI_STATUS
0830 AcpiUtValidateResource (
0831     void                    *Aml,
0832     UINT8                   *ReturnIndex);
0833 
0834 UINT32
0835 AcpiUtGetDescriptorLength (
0836     void                    *Aml);
0837 
0838 UINT16
0839 AcpiUtGetResourceLength (
0840     void                    *Aml);
0841 
0842 UINT8
0843 AcpiUtGetResourceHeaderLength (
0844     void                    *Aml);
0845 
0846 UINT8
0847 AcpiUtGetResourceType (
0848     void                    *Aml);
0849 
0850 ACPI_STATUS
0851 AcpiUtGetResourceEndTag (
0852     ACPI_OPERAND_OBJECT     *ObjDesc,
0853     UINT8                   **EndTag);
0854 
0855 
0856 /*
0857  * utmutex - mutex support
0858  */
0859 ACPI_STATUS
0860 AcpiUtMutexInitialize (
0861     void);
0862 
0863 void
0864 AcpiUtMutexTerminate (
0865     void);
0866 
0867 ACPI_STATUS
0868 AcpiUtAcquireMutex (
0869     ACPI_MUTEX_HANDLE       MutexId);
0870 
0871 ACPI_STATUS
0872 AcpiUtReleaseMutex (
0873     ACPI_MUTEX_HANDLE       MutexId);
0874 
0875 
0876 /*
0877  * utalloc - memory allocation and object caching
0878  */
0879 ACPI_STATUS
0880 AcpiUtCreateCaches (
0881     void);
0882 
0883 ACPI_STATUS
0884 AcpiUtDeleteCaches (
0885     void);
0886 
0887 ACPI_STATUS
0888 AcpiUtValidateBuffer (
0889     ACPI_BUFFER             *Buffer);
0890 
0891 ACPI_STATUS
0892 AcpiUtInitializeBuffer (
0893     ACPI_BUFFER             *Buffer,
0894     ACPI_SIZE               RequiredLength);
0895 
0896 void *
0897 AcpiUtAllocate (
0898     ACPI_SIZE               Size,
0899     UINT32                  Component,
0900     const char              *Module,
0901     UINT32                  Line);
0902 
0903 void *
0904 AcpiUtAllocateZeroed (
0905     ACPI_SIZE               Size,
0906     UINT32                  Component,
0907     const char              *Module,
0908     UINT32                  Line);
0909 
0910 #ifdef ACPI_DBG_TRACK_ALLOCATIONS
0911 void *
0912 AcpiUtAllocateAndTrack (
0913     ACPI_SIZE               Size,
0914     UINT32                  Component,
0915     const char              *Module,
0916     UINT32                  Line);
0917 
0918 void *
0919 AcpiUtAllocateZeroedAndTrack (
0920     ACPI_SIZE               Size,
0921     UINT32                  Component,
0922     const char              *Module,
0923     UINT32                  Line);
0924 
0925 void
0926 AcpiUtFreeAndTrack (
0927     void                    *Address,
0928     UINT32                  Component,
0929     const char              *Module,
0930     UINT32                  Line);
0931 
0932 void
0933 AcpiUtDumpAllocationInfo (
0934     void);
0935 
0936 void
0937 AcpiUtDumpAllocations (
0938     UINT32                  Component,
0939     const char              *Module);
0940 
0941 ACPI_STATUS
0942 AcpiUtCreateList (
0943     char                    *ListName,
0944     UINT16                  ObjectSize,
0945     ACPI_MEMORY_LIST        **ReturnCache);
0946 
0947 
0948 #endif
0949 
0950 #endif /* _ACUTILS_H */