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

acutils.h
Go to the documentation of this file.
00001 /******************************************************************************
00002  *
00003  * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
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 #ifndef _ACUTILS_H
00117 #define _ACUTILS_H
00118 
00119 
00120 extern const UINT8                      AcpiGbl_ResourceAmlSizes[];
00121 
00122 /* Strings used by the disassembler and debugger resource dump routines */
00123 
00124 #if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER)
00125 
00126 extern const char                       *AcpiGbl_BmDecode[];
00127 extern const char                       *AcpiGbl_ConfigDecode[];
00128 extern const char                       *AcpiGbl_ConsumeDecode[];
00129 extern const char                       *AcpiGbl_DecDecode[];
00130 extern const char                       *AcpiGbl_HeDecode[];
00131 extern const char                       *AcpiGbl_IoDecode[];
00132 extern const char                       *AcpiGbl_LlDecode[];
00133 extern const char                       *AcpiGbl_MaxDecode[];
00134 extern const char                       *AcpiGbl_MemDecode[];
00135 extern const char                       *AcpiGbl_MinDecode[];
00136 extern const char                       *AcpiGbl_MtpDecode[];
00137 extern const char                       *AcpiGbl_RngDecode[];
00138 extern const char                       *AcpiGbl_RwDecode[];
00139 extern const char                       *AcpiGbl_ShrDecode[];
00140 extern const char                       *AcpiGbl_SizDecode[];
00141 extern const char                       *AcpiGbl_TrsDecode[];
00142 extern const char                       *AcpiGbl_TtpDecode[];
00143 extern const char                       *AcpiGbl_TypDecode[];
00144 #endif
00145 
00146 /* Types for Resource descriptor entries */
00147 
00148 #define ACPI_INVALID_RESOURCE           0
00149 #define ACPI_FIXED_LENGTH               1
00150 #define ACPI_VARIABLE_LENGTH            2
00151 #define ACPI_SMALL_VARIABLE_LENGTH      3
00152 
00153 typedef
00154 ACPI_STATUS (*ACPI_WALK_AML_CALLBACK) (
00155     UINT8                   *Aml,
00156     UINT32                  Length,
00157     UINT32                  Offset,
00158     UINT8                   ResourceIndex,
00159     void                    *Context);
00160 
00161 typedef
00162 ACPI_STATUS (*ACPI_PKG_CALLBACK) (
00163     UINT8                   ObjectType,
00164     ACPI_OPERAND_OBJECT     *SourceObject,
00165     ACPI_GENERIC_STATE      *State,
00166     void                    *Context);
00167 
00168 typedef struct acpi_pkg_info
00169 {
00170     UINT8                   *FreeSpace;
00171     ACPI_SIZE               Length;
00172     UINT32                  ObjectSpace;
00173     UINT32                  NumPackages;
00174 
00175 } ACPI_PKG_INFO;
00176 
00177 #define REF_INCREMENT       (UINT16) 0
00178 #define REF_DECREMENT       (UINT16) 1
00179 #define REF_FORCE_DELETE    (UINT16) 2
00180 
00181 /* AcpiUtDumpBuffer */
00182 
00183 #define DB_BYTE_DISPLAY     1
00184 #define DB_WORD_DISPLAY     2
00185 #define DB_DWORD_DISPLAY    4
00186 #define DB_QWORD_DISPLAY    8
00187 
00188 
00189 /*
00190  * utglobal - Global data structures and procedures
00191  */
00192 ACPI_STATUS
00193 AcpiUtInitGlobals (
00194     void);
00195 
00196 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
00197 
00198 char *
00199 AcpiUtGetMutexName (
00200     UINT32                  MutexId);
00201 
00202 const char *
00203 AcpiUtGetNotifyName (
00204     UINT32                  NotifyValue);
00205 
00206 #endif
00207 
00208 char *
00209 AcpiUtGetTypeName (
00210     ACPI_OBJECT_TYPE        Type);
00211 
00212 char *
00213 AcpiUtGetNodeName (
00214     void                    *Object);
00215 
00216 char *
00217 AcpiUtGetDescriptorName (
00218     void                    *Object);
00219 
00220 const char *
00221 AcpiUtGetReferenceName (
00222     ACPI_OPERAND_OBJECT     *Object);
00223 
00224 char *
00225 AcpiUtGetObjectTypeName (
00226     ACPI_OPERAND_OBJECT     *ObjDesc);
00227 
00228 char *
00229 AcpiUtGetRegionName (
00230     UINT8                   SpaceId);
00231 
00232 char *
00233 AcpiUtGetEventName (
00234     UINT32                  EventId);
00235 
00236 char
00237 AcpiUtHexToAsciiChar (
00238     UINT64                  Integer,
00239     UINT32                  Position);
00240 
00241 BOOLEAN
00242 AcpiUtValidObjectType (
00243     ACPI_OBJECT_TYPE        Type);
00244 
00245 
00246 /*
00247  * utinit - miscellaneous initialization and shutdown
00248  */
00249 ACPI_STATUS
00250 AcpiUtHardwareInitialize (
00251     void);
00252 
00253 void
00254 AcpiUtSubsystemShutdown (
00255     void);
00256 
00257 
00258 /*
00259  * utclib - Local implementations of C library functions
00260  */
00261 #ifndef ACPI_USE_SYSTEM_CLIBRARY
00262 
00263 ACPI_SIZE
00264 AcpiUtStrlen (
00265     const char              *String);
00266 
00267 char *
00268 AcpiUtStrcpy (
00269     char                    *DstString,
00270     const char              *SrcString);
00271 
00272 char *
00273 AcpiUtStrncpy (
00274     char                    *DstString,
00275     const char              *SrcString,
00276     ACPI_SIZE               Count);
00277 
00278 int
00279 AcpiUtMemcmp (
00280     const char              *Buffer1,
00281     const char              *Buffer2,
00282     ACPI_SIZE               Count);
00283 
00284 int
00285 AcpiUtStrncmp (
00286     const char              *String1,
00287     const char              *String2,
00288     ACPI_SIZE               Count);
00289 
00290 int
00291 AcpiUtStrcmp (
00292     const char              *String1,
00293     const char              *String2);
00294 
00295 char *
00296 AcpiUtStrcat (
00297     char                    *DstString,
00298     const char              *SrcString);
00299 
00300 char *
00301 AcpiUtStrncat (
00302     char                    *DstString,
00303     const char              *SrcString,
00304     ACPI_SIZE               Count);
00305 
00306 UINT32
00307 AcpiUtStrtoul (
00308     const char              *String,
00309     char                    **Terminator,
00310     UINT32                  Base);
00311 
00312 char *
00313 AcpiUtStrstr (
00314     char                    *String1,
00315     char                    *String2);
00316 
00317 void *
00318 AcpiUtMemcpy (
00319     void                    *Dest,
00320     const void              *Src,
00321     ACPI_SIZE               Count);
00322 
00323 void *
00324 AcpiUtMemset (
00325     void                    *Dest,
00326     UINT8                   Value,
00327     ACPI_SIZE               Count);
00328 
00329 int
00330 AcpiUtToUpper (
00331     int                     c);
00332 
00333 int
00334 AcpiUtToLower (
00335     int                     c);
00336 
00337 extern const UINT8 _acpi_ctype[];
00338 
00339 #define _ACPI_XA     0x00    /* extra alphabetic - not supported */
00340 #define _ACPI_XS     0x40    /* extra space */
00341 #define _ACPI_BB     0x00    /* BEL, BS, etc. - not supported */
00342 #define _ACPI_CN     0x20    /* CR, FF, HT, NL, VT */
00343 #define _ACPI_DI     0x04    /* '0'-'9' */
00344 #define _ACPI_LO     0x02    /* 'a'-'z' */
00345 #define _ACPI_PU     0x10    /* punctuation */
00346 #define _ACPI_SP     0x08    /* space */
00347 #define _ACPI_UP     0x01    /* 'A'-'Z' */
00348 #define _ACPI_XD     0x80    /* '0'-'9', 'A'-'F', 'a'-'f' */
00349 
00350 #define ACPI_IS_DIGIT(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI))
00351 #define ACPI_IS_SPACE(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP))
00352 #define ACPI_IS_XDIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_XD))
00353 #define ACPI_IS_UPPER(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_UP))
00354 #define ACPI_IS_LOWER(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO))
00355 #define ACPI_IS_PRINT(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_SP | _ACPI_PU))
00356 #define ACPI_IS_ALPHA(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP))
00357 
00358 #endif /* !ACPI_USE_SYSTEM_CLIBRARY */
00359 
00360 #define ACPI_IS_ASCII(c)  ((c) < 0x80)
00361 
00362 
00363 /*
00364  * utcopy - Object construction and conversion interfaces
00365  */
00366 ACPI_STATUS
00367 AcpiUtBuildSimpleObject(
00368     ACPI_OPERAND_OBJECT     *Obj,
00369     ACPI_OBJECT             *UserObj,
00370     UINT8                   *DataSpace,
00371     UINT32                  *BufferSpaceUsed);
00372 
00373 ACPI_STATUS
00374 AcpiUtBuildPackageObject (
00375     ACPI_OPERAND_OBJECT     *Obj,
00376     UINT8                   *Buffer,
00377     UINT32                  *SpaceUsed);
00378 
00379 ACPI_STATUS
00380 AcpiUtCopyIobjectToEobject (
00381     ACPI_OPERAND_OBJECT     *Obj,
00382     ACPI_BUFFER             *RetBuffer);
00383 
00384 ACPI_STATUS
00385 AcpiUtCopyEobjectToIobject (
00386     ACPI_OBJECT             *Obj,
00387     ACPI_OPERAND_OBJECT     **InternalObj);
00388 
00389 ACPI_STATUS
00390 AcpiUtCopyISimpleToIsimple (
00391     ACPI_OPERAND_OBJECT     *SourceObj,
00392     ACPI_OPERAND_OBJECT     *DestObj);
00393 
00394 ACPI_STATUS
00395 AcpiUtCopyIobjectToIobject (
00396     ACPI_OPERAND_OBJECT     *SourceDesc,
00397     ACPI_OPERAND_OBJECT     **DestDesc,
00398     ACPI_WALK_STATE         *WalkState);
00399 
00400 
00401 /*
00402  * utcreate - Object creation
00403  */
00404 ACPI_STATUS
00405 AcpiUtUpdateObjectReference (
00406     ACPI_OPERAND_OBJECT     *Object,
00407     UINT16                  Action);
00408 
00409 
00410 /*
00411  * utdebug - Debug interfaces
00412  */
00413 void
00414 AcpiUtInitStackPtrTrace (
00415     void);
00416 
00417 void
00418 AcpiUtTrackStackPtr (
00419     void);
00420 
00421 void
00422 AcpiUtTrace (
00423     UINT32                  LineNumber,
00424     const char              *FunctionName,
00425     const char              *ModuleName,
00426     UINT32                  ComponentId);
00427 
00428 void
00429 AcpiUtTracePtr (
00430     UINT32                  LineNumber,
00431     const char              *FunctionName,
00432     const char              *ModuleName,
00433     UINT32                  ComponentId,
00434     void                    *Pointer);
00435 
00436 void
00437 AcpiUtTraceU32 (
00438     UINT32                  LineNumber,
00439     const char              *FunctionName,
00440     const char              *ModuleName,
00441     UINT32                  ComponentId,
00442     UINT32                  Integer);
00443 
00444 void
00445 AcpiUtTraceStr (
00446     UINT32                  LineNumber,
00447     const char              *FunctionName,
00448     const char              *ModuleName,
00449     UINT32                  ComponentId,
00450     char                    *String);
00451 
00452 void
00453 AcpiUtExit (
00454     UINT32                  LineNumber,
00455     const char              *FunctionName,
00456     const char              *ModuleName,
00457     UINT32                  ComponentId);
00458 
00459 void
00460 AcpiUtStatusExit (
00461     UINT32                  LineNumber,
00462     const char              *FunctionName,
00463     const char              *ModuleName,
00464     UINT32                  ComponentId,
00465     ACPI_STATUS             Status);
00466 
00467 void
00468 AcpiUtValueExit (
00469     UINT32                  LineNumber,
00470     const char              *FunctionName,
00471     const char              *ModuleName,
00472     UINT32                  ComponentId,
00473     UINT64                  Value);
00474 
00475 void
00476 AcpiUtPtrExit (
00477     UINT32                  LineNumber,
00478     const char              *FunctionName,
00479     const char              *ModuleName,
00480     UINT32                  ComponentId,
00481     UINT8                   *Ptr);
00482 
00483 void
00484 AcpiUtDumpBuffer (
00485     UINT8                   *Buffer,
00486     UINT32                  Count,
00487     UINT32                  Display,
00488     UINT32                  componentId);
00489 
00490 void
00491 AcpiUtDumpBuffer2 (
00492     UINT8                   *Buffer,
00493     UINT32                  Count,
00494     UINT32                  Display);
00495 
00496 void
00497 AcpiUtReportError (
00498     char                    *ModuleName,
00499     UINT32                  LineNumber);
00500 
00501 void
00502 AcpiUtReportInfo (
00503     char                    *ModuleName,
00504     UINT32                  LineNumber);
00505 
00506 void
00507 AcpiUtReportWarning (
00508     char                    *ModuleName,
00509     UINT32                  LineNumber);
00510 
00511 /*
00512  * utdelete - Object deletion and reference counts
00513  */
00514 void
00515 AcpiUtAddReference (
00516     ACPI_OPERAND_OBJECT     *Object);
00517 
00518 void
00519 AcpiUtRemoveReference (
00520     ACPI_OPERAND_OBJECT     *Object);
00521 
00522 void
00523 AcpiUtDeleteInternalPackageObject (
00524     ACPI_OPERAND_OBJECT     *Object);
00525 
00526 void
00527 AcpiUtDeleteInternalSimpleObject (
00528     ACPI_OPERAND_OBJECT     *Object);
00529 
00530 void
00531 AcpiUtDeleteInternalObjectList (
00532     ACPI_OPERAND_OBJECT     **ObjList);
00533 
00534 
00535 /*
00536  * uteval - object evaluation
00537  */
00538 ACPI_STATUS
00539 AcpiUtEvaluateObject (
00540     ACPI_NAMESPACE_NODE     *PrefixNode,
00541     char                    *Path,
00542     UINT32                  ExpectedReturnBtypes,
00543     ACPI_OPERAND_OBJECT     **ReturnDesc);
00544 
00545 ACPI_STATUS
00546 AcpiUtEvaluateNumericObject (
00547     char                    *ObjectName,
00548     ACPI_NAMESPACE_NODE     *DeviceNode,
00549     UINT64                  *Value);
00550 
00551 ACPI_STATUS
00552 AcpiUtExecute_STA (
00553     ACPI_NAMESPACE_NODE     *DeviceNode,
00554     UINT32                  *StatusFlags);
00555 
00556 ACPI_STATUS
00557 AcpiUtExecutePowerMethods (
00558     ACPI_NAMESPACE_NODE     *DeviceNode,
00559     const char              **MethodNames,
00560     UINT8                   MethodCount,
00561     UINT8                   *OutValues);
00562 
00563 
00564 /*
00565  * utids - device ID support
00566  */
00567 ACPI_STATUS
00568 AcpiUtExecute_HID (
00569     ACPI_NAMESPACE_NODE     *DeviceNode,
00570     ACPI_DEVICE_ID          **ReturnId);
00571 
00572 ACPI_STATUS
00573 AcpiUtExecute_UID (
00574     ACPI_NAMESPACE_NODE     *DeviceNode,
00575     ACPI_DEVICE_ID          **ReturnId);
00576 
00577 ACPI_STATUS
00578 AcpiUtExecute_CID (
00579     ACPI_NAMESPACE_NODE     *DeviceNode,
00580     ACPI_DEVICE_ID_LIST     **ReturnCidList);
00581 
00582 
00583 /*
00584  * utlock - reader/writer locks
00585  */
00586 ACPI_STATUS
00587 AcpiUtCreateRwLock (
00588     ACPI_RW_LOCK            *Lock);
00589 
00590 void
00591 AcpiUtDeleteRwLock (
00592     ACPI_RW_LOCK            *Lock);
00593 
00594 ACPI_STATUS
00595 AcpiUtAcquireReadLock (
00596     ACPI_RW_LOCK            *Lock);
00597 
00598 ACPI_STATUS
00599 AcpiUtReleaseReadLock (
00600     ACPI_RW_LOCK            *Lock);
00601 
00602 ACPI_STATUS
00603 AcpiUtAcquireWriteLock (
00604     ACPI_RW_LOCK            *Lock);
00605 
00606 void
00607 AcpiUtReleaseWriteLock (
00608     ACPI_RW_LOCK            *Lock);
00609 
00610 
00611 /*
00612  * utobject - internal object create/delete/cache routines
00613  */
00614 ACPI_OPERAND_OBJECT  *
00615 AcpiUtCreateInternalObjectDbg (
00616     const char              *ModuleName,
00617     UINT32                  LineNumber,
00618     UINT32                  ComponentId,
00619     ACPI_OBJECT_TYPE        Type);
00620 
00621 void *
00622 AcpiUtAllocateObjectDescDbg (
00623     const char              *ModuleName,
00624     UINT32                  LineNumber,
00625     UINT32                  ComponentId);
00626 
00627 #define AcpiUtCreateInternalObject(t)   AcpiUtCreateInternalObjectDbg (_AcpiModuleName,__LINE__,_COMPONENT,t)
00628 #define AcpiUtAllocateObjectDesc()      AcpiUtAllocateObjectDescDbg (_AcpiModuleName,__LINE__,_COMPONENT)
00629 
00630 void
00631 AcpiUtDeleteObjectDesc (
00632     ACPI_OPERAND_OBJECT     *Object);
00633 
00634 BOOLEAN
00635 AcpiUtValidInternalObject (
00636     void                    *Object);
00637 
00638 ACPI_OPERAND_OBJECT *
00639 AcpiUtCreatePackageObject (
00640     UINT32                  Count);
00641 
00642 ACPI_OPERAND_OBJECT *
00643 AcpiUtCreateIntegerObject (
00644     UINT64                  Value);
00645 
00646 ACPI_OPERAND_OBJECT *
00647 AcpiUtCreateBufferObject (
00648     ACPI_SIZE               BufferSize);
00649 
00650 ACPI_OPERAND_OBJECT *
00651 AcpiUtCreateStringObject (
00652     ACPI_SIZE               StringSize);
00653 
00654 ACPI_STATUS
00655 AcpiUtGetObjectSize(
00656     ACPI_OPERAND_OBJECT     *Obj,
00657     ACPI_SIZE               *ObjLength);
00658 
00659 
00660 /*
00661  * utosi - Support for the _OSI predefined control method
00662  */
00663 ACPI_STATUS
00664 AcpiUtInitializeInterfaces (
00665     void);
00666 
00667 void
00668 AcpiUtInterfaceTerminate (
00669     void);
00670 
00671 ACPI_STATUS
00672 AcpiUtInstallInterface (
00673     ACPI_STRING             InterfaceName);
00674 
00675 ACPI_STATUS
00676 AcpiUtRemoveInterface (
00677     ACPI_STRING             InterfaceName);
00678 
00679 ACPI_INTERFACE_INFO *
00680 AcpiUtGetInterface (
00681     ACPI_STRING             InterfaceName);
00682 
00683 ACPI_STATUS
00684 AcpiUtOsiImplementation (
00685     ACPI_WALK_STATE         *WalkState);
00686 
00687 
00688 /*
00689  * utstate - Generic state creation/cache routines
00690  */
00691 void
00692 AcpiUtPushGenericState (
00693     ACPI_GENERIC_STATE      **ListHead,
00694     ACPI_GENERIC_STATE      *State);
00695 
00696 ACPI_GENERIC_STATE *
00697 AcpiUtPopGenericState (
00698     ACPI_GENERIC_STATE      **ListHead);
00699 
00700 
00701 ACPI_GENERIC_STATE *
00702 AcpiUtCreateGenericState (
00703     void);
00704 
00705 ACPI_THREAD_STATE *
00706 AcpiUtCreateThreadState (
00707     void);
00708 
00709 ACPI_GENERIC_STATE *
00710 AcpiUtCreateUpdateState (
00711     ACPI_OPERAND_OBJECT     *Object,
00712     UINT16                  Action);
00713 
00714 ACPI_GENERIC_STATE *
00715 AcpiUtCreatePkgState (
00716     void                    *InternalObject,
00717     void                    *ExternalObject,
00718     UINT16                  Index);
00719 
00720 ACPI_STATUS
00721 AcpiUtCreateUpdateStateAndPush (
00722     ACPI_OPERAND_OBJECT     *Object,
00723     UINT16                  Action,
00724     ACPI_GENERIC_STATE      **StateList);
00725 
00726 ACPI_STATUS
00727 AcpiUtCreatePkgStateAndPush (
00728     void                    *InternalObject,
00729     void                    *ExternalObject,
00730     UINT16                  Index,
00731     ACPI_GENERIC_STATE      **StateList);
00732 
00733 ACPI_GENERIC_STATE *
00734 AcpiUtCreateControlState (
00735     void);
00736 
00737 void
00738 AcpiUtDeleteGenericState (
00739     ACPI_GENERIC_STATE      *State);
00740 
00741 
00742 /*
00743  * utmath
00744  */
00745 ACPI_STATUS
00746 AcpiUtDivide (
00747     UINT64                  InDividend,
00748     UINT64                  InDivisor,
00749     UINT64                  *OutQuotient,
00750     UINT64                  *OutRemainder);
00751 
00752 ACPI_STATUS
00753 AcpiUtShortDivide (
00754     UINT64                  InDividend,
00755     UINT32                  Divisor,
00756     UINT64                  *OutQuotient,
00757     UINT32                  *OutRemainder);
00758 
00759 /*
00760  * utmisc
00761  */
00762 const char *
00763 AcpiUtValidateException (
00764     ACPI_STATUS             Status);
00765 
00766 BOOLEAN
00767 AcpiUtIsPciRootBridge (
00768     char                    *Id);
00769 
00770 BOOLEAN
00771 AcpiUtIsAmlTable (
00772     ACPI_TABLE_HEADER       *Table);
00773 
00774 ACPI_STATUS
00775 AcpiUtAllocateOwnerId (
00776     ACPI_OWNER_ID           *OwnerId);
00777 
00778 void
00779 AcpiUtReleaseOwnerId (
00780     ACPI_OWNER_ID           *OwnerId);
00781 
00782 ACPI_STATUS
00783 AcpiUtWalkPackageTree (
00784     ACPI_OPERAND_OBJECT     *SourceObject,
00785     void                    *TargetObject,
00786     ACPI_PKG_CALLBACK       WalkCallback,
00787     void                    *Context);
00788 
00789 void
00790 AcpiUtStrupr (
00791     char                    *SrcString);
00792 
00793 void
00794 AcpiUtStrlwr (
00795     char                    *SrcString);
00796 
00797 void
00798 AcpiUtPrintString (
00799     char                    *String,
00800     UINT8                   MaxLength);
00801 
00802 BOOLEAN
00803 AcpiUtValidAcpiName (
00804     UINT32                  Name);
00805 
00806 void
00807 AcpiUtRepairName (
00808     char                    *Name);
00809 
00810 BOOLEAN
00811 AcpiUtValidAcpiChar (
00812     char                    Character,
00813     UINT32                  Position);
00814 
00815 ACPI_STATUS
00816 AcpiUtStrtoul64 (
00817     char                    *String,
00818     UINT32                  Base,
00819     UINT64                  *RetInteger);
00820 
00821 /* Values for Base above (16=Hex, 10=Decimal) */
00822 
00823 #define ACPI_ANY_BASE        0
00824 
00825 UINT32
00826 AcpiUtDwordByteSwap (
00827     UINT32                  Value);
00828 
00829 void
00830 AcpiUtSetIntegerWidth (
00831     UINT8                   Revision);
00832 
00833 #ifdef ACPI_DEBUG_OUTPUT
00834 void
00835 AcpiUtDisplayInitPathname (
00836     UINT8                   Type,
00837     ACPI_NAMESPACE_NODE     *ObjHandle,
00838     char                    *Path);
00839 #endif
00840 
00841 
00842 /*
00843  * utresrc
00844  */
00845 ACPI_STATUS
00846 AcpiUtWalkAmlResources (
00847     UINT8                   *Aml,
00848     ACPI_SIZE               AmlLength,
00849     ACPI_WALK_AML_CALLBACK  UserFunction,
00850     void                    *Context);
00851 
00852 ACPI_STATUS
00853 AcpiUtValidateResource (
00854     void                    *Aml,
00855     UINT8                   *ReturnIndex);
00856 
00857 UINT32
00858 AcpiUtGetDescriptorLength (
00859     void                    *Aml);
00860 
00861 UINT16
00862 AcpiUtGetResourceLength (
00863     void                    *Aml);
00864 
00865 UINT8
00866 AcpiUtGetResourceHeaderLength (
00867     void                    *Aml);
00868 
00869 UINT8
00870 AcpiUtGetResourceType (
00871     void                    *Aml);
00872 
00873 ACPI_STATUS
00874 AcpiUtGetResourceEndTag (
00875     ACPI_OPERAND_OBJECT     *ObjDesc,
00876     UINT8                   **EndTag);
00877 
00878 
00879 /*
00880  * utmutex - mutex support
00881  */
00882 ACPI_STATUS
00883 AcpiUtMutexInitialize (
00884     void);
00885 
00886 void
00887 AcpiUtMutexTerminate (
00888     void);
00889 
00890 ACPI_STATUS
00891 AcpiUtAcquireMutex (
00892     ACPI_MUTEX_HANDLE       MutexId);
00893 
00894 ACPI_STATUS
00895 AcpiUtReleaseMutex (
00896     ACPI_MUTEX_HANDLE       MutexId);
00897 
00898 
00899 /*
00900  * utalloc - memory allocation and object caching
00901  */
00902 ACPI_STATUS
00903 AcpiUtCreateCaches (
00904     void);
00905 
00906 ACPI_STATUS
00907 AcpiUtDeleteCaches (
00908     void);
00909 
00910 ACPI_STATUS
00911 AcpiUtValidateBuffer (
00912     ACPI_BUFFER             *Buffer);
00913 
00914 ACPI_STATUS
00915 AcpiUtInitializeBuffer (
00916     ACPI_BUFFER             *Buffer,
00917     ACPI_SIZE               RequiredLength);
00918 
00919 void *
00920 AcpiUtAllocate (
00921     ACPI_SIZE               Size,
00922     UINT32                  Component,
00923     const char              *Module,
00924     UINT32                  Line);
00925 
00926 void *
00927 AcpiUtAllocateZeroed (
00928     ACPI_SIZE               Size,
00929     UINT32                  Component,
00930     const char              *Module,
00931     UINT32                  Line);
00932 
00933 #ifdef ACPI_DBG_TRACK_ALLOCATIONS
00934 void *
00935 AcpiUtAllocateAndTrack (
00936     ACPI_SIZE               Size,
00937     UINT32                  Component,
00938     const char              *Module,
00939     UINT32                  Line);
00940 
00941 void *
00942 AcpiUtAllocateZeroedAndTrack (
00943     ACPI_SIZE               Size,
00944     UINT32                  Component,
00945     const char              *Module,
00946     UINT32                  Line);
00947 
00948 void
00949 AcpiUtFreeAndTrack (
00950     void                    *Address,
00951     UINT32                  Component,
00952     const char              *Module,
00953     UINT32                  Line);
00954 
00955 void
00956 AcpiUtDumpAllocationInfo (
00957     void);
00958 
00959 void
00960 AcpiUtDumpAllocations (
00961     UINT32                  Component,
00962     const char              *Module);
00963 
00964 ACPI_STATUS
00965 AcpiUtCreateList (
00966     char                    *ListName,
00967     UINT16                  ObjectSize,
00968     ACPI_MEMORY_LIST        **ReturnCache);
00969 
00970 #endif /* ACPI_DBG_TRACK_ALLOCATIONS */
00971 
00972 
00973 /*
00974  * utxferror - various error/warning output functions
00975  */
00976 void ACPI_INTERNAL_VAR_XFACE
00977 AcpiUtPredefinedWarning (
00978     const char              *ModuleName,
00979     UINT32                  LineNumber,
00980     char                    *Pathname,
00981     UINT8                   NodeFlags,
00982     const char              *Format,
00983     ...);
00984 
00985 void ACPI_INTERNAL_VAR_XFACE
00986 AcpiUtPredefinedInfo (
00987     const char              *ModuleName,
00988     UINT32                  LineNumber,
00989     char                    *Pathname,
00990     UINT8                   NodeFlags,
00991     const char              *Format,
00992     ...);
00993 
00994 void
00995 AcpiUtNamespaceError (
00996     const char              *ModuleName,
00997     UINT32                  LineNumber,
00998     const char              *InternalName,
00999     ACPI_STATUS             LookupStatus);
01000 
01001 void
01002 AcpiUtMethodError (
01003     const char              *ModuleName,
01004     UINT32                  LineNumber,
01005     const char              *Message,
01006     ACPI_NAMESPACE_NODE     *Node,
01007     const char              *Path,
01008     ACPI_STATUS             LookupStatus);
01009 
01010 #endif /* _ACUTILS_H */

Generated on Sat May 26 2012 04:25:53 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.