acutils.h revision 87031
167754Smsmith/****************************************************************************** 267754Smsmith * 377424Smsmith * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures 487031Smsmith * $Revision: 119 $ 567754Smsmith * 667754Smsmith *****************************************************************************/ 767754Smsmith 867754Smsmith/****************************************************************************** 967754Smsmith * 1067754Smsmith * 1. Copyright Notice 1167754Smsmith * 1271867Smsmith * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp. 1370243Smsmith * All rights reserved. 1467754Smsmith * 1567754Smsmith * 2. License 1667754Smsmith * 1767754Smsmith * 2.1. This is your license from Intel Corp. under its intellectual property 1867754Smsmith * rights. You may have additional license terms from the party that provided 1967754Smsmith * you this software, covering your right to use that party's intellectual 2067754Smsmith * property rights. 2167754Smsmith * 2267754Smsmith * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 2367754Smsmith * copy of the source code appearing in this file ("Covered Code") an 2467754Smsmith * irrevocable, perpetual, worldwide license under Intel's copyrights in the 2567754Smsmith * base code distributed originally by Intel ("Original Intel Code") to copy, 2667754Smsmith * make derivatives, distribute, use and display any portion of the Covered 2767754Smsmith * Code in any form, with the right to sublicense such rights; and 2867754Smsmith * 2967754Smsmith * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 3067754Smsmith * license (with the right to sublicense), under only those claims of Intel 3167754Smsmith * patents that are infringed by the Original Intel Code, to make, use, sell, 3267754Smsmith * offer to sell, and import the Covered Code and derivative works thereof 3367754Smsmith * solely to the minimum extent necessary to exercise the above copyright 3467754Smsmith * license, and in no event shall the patent license extend to any additions 3567754Smsmith * to or modifications of the Original Intel Code. No other license or right 3667754Smsmith * is granted directly or by implication, estoppel or otherwise; 3767754Smsmith * 3867754Smsmith * The above copyright and patent license is granted only if the following 3967754Smsmith * conditions are met: 4067754Smsmith * 4167754Smsmith * 3. Conditions 4267754Smsmith * 4367754Smsmith * 3.1. Redistribution of Source with Rights to Further Distribute Source. 4467754Smsmith * Redistribution of source code of any substantial portion of the Covered 4567754Smsmith * Code or modification with rights to further distribute source must include 4667754Smsmith * the above Copyright Notice, the above License, this list of Conditions, 4767754Smsmith * and the following Disclaimer and Export Compliance provision. In addition, 4867754Smsmith * Licensee must cause all Covered Code to which Licensee contributes to 4967754Smsmith * contain a file documenting the changes Licensee made to create that Covered 5067754Smsmith * Code and the date of any change. Licensee must include in that file the 5167754Smsmith * documentation of any changes made by any predecessor Licensee. Licensee 5267754Smsmith * must include a prominent statement that the modification is derived, 5367754Smsmith * directly or indirectly, from Original Intel Code. 5467754Smsmith * 5567754Smsmith * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 5667754Smsmith * Redistribution of source code of any substantial portion of the Covered 5767754Smsmith * Code or modification without rights to further distribute source must 5867754Smsmith * include the following Disclaimer and Export Compliance provision in the 5967754Smsmith * documentation and/or other materials provided with distribution. In 6067754Smsmith * addition, Licensee may not authorize further sublicense of source of any 6167754Smsmith * portion of the Covered Code, and must include terms to the effect that the 6267754Smsmith * license from Licensee to its licensee is limited to the intellectual 6367754Smsmith * property embodied in the software Licensee provides to its licensee, and 6467754Smsmith * not to intellectual property embodied in modifications its licensee may 6567754Smsmith * make. 6667754Smsmith * 6767754Smsmith * 3.3. Redistribution of Executable. Redistribution in executable form of any 6867754Smsmith * substantial portion of the Covered Code or modification must reproduce the 6967754Smsmith * above Copyright Notice, and the following Disclaimer and Export Compliance 7067754Smsmith * provision in the documentation and/or other materials provided with the 7167754Smsmith * distribution. 7267754Smsmith * 7367754Smsmith * 3.4. Intel retains all right, title, and interest in and to the Original 7467754Smsmith * Intel Code. 7567754Smsmith * 7667754Smsmith * 3.5. Neither the name Intel nor any other trademark owned or controlled by 7767754Smsmith * Intel shall be used in advertising or otherwise to promote the sale, use or 7867754Smsmith * other dealings in products derived from or relating to the Covered Code 7967754Smsmith * without prior written authorization from Intel. 8067754Smsmith * 8167754Smsmith * 4. Disclaimer and Export Compliance 8267754Smsmith * 8367754Smsmith * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 8467754Smsmith * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 8567754Smsmith * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 8667754Smsmith * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 8767754Smsmith * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 8867754Smsmith * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 8967754Smsmith * PARTICULAR PURPOSE. 9067754Smsmith * 9167754Smsmith * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 9267754Smsmith * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 9367754Smsmith * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 9467754Smsmith * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 9567754Smsmith * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 9667754Smsmith * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 9767754Smsmith * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 9867754Smsmith * LIMITED REMEDY. 9967754Smsmith * 10067754Smsmith * 4.3. Licensee shall not export, either directly or indirectly, any of this 10167754Smsmith * software or system incorporating such software without first obtaining any 10267754Smsmith * required license or other approval from the U. S. Department of Commerce or 10367754Smsmith * any other agency or department of the United States Government. In the 10467754Smsmith * event Licensee exports any such software from the United States or 10567754Smsmith * re-exports any such software from a foreign destination, Licensee shall 10667754Smsmith * ensure that the distribution and export/re-export of the software is in 10767754Smsmith * compliance with all laws, regulations, orders, or other restrictions of the 10867754Smsmith * U.S. Export Administration Regulations. Licensee agrees that neither it nor 10967754Smsmith * any of its subsidiaries will export/re-export any technical data, process, 11067754Smsmith * software, or service, directly or indirectly, to any country for which the 11167754Smsmith * United States government or any agency thereof requires an export license, 11267754Smsmith * other governmental approval, or letter of assurance, without first obtaining 11367754Smsmith * such license, approval or letter. 11467754Smsmith * 11567754Smsmith *****************************************************************************/ 11667754Smsmith 11777424Smsmith#ifndef _ACUTILS_H 11877424Smsmith#define _ACUTILS_H 11967754Smsmith 12067754Smsmith 12173561Smsmithtypedef 12273561SmsmithACPI_STATUS (*ACPI_PKG_CALLBACK) ( 12373561Smsmith UINT8 ObjectType, 12473561Smsmith ACPI_OPERAND_OBJECT *SourceObject, 12573561Smsmith ACPI_GENERIC_STATE *State, 12673561Smsmith void *Context); 12773561Smsmith 12873561Smsmith 12973561SmsmithACPI_STATUS 13077424SmsmithAcpiUtWalkPackageTree ( 13173561Smsmith ACPI_OPERAND_OBJECT *SourceObject, 13273561Smsmith void *TargetObject, 13373561Smsmith ACPI_PKG_CALLBACK WalkCallback, 13473561Smsmith void *Context); 13573561Smsmith 13673561Smsmith 13773561Smsmithtypedef struct acpi_pkg_info 13873561Smsmith{ 13973561Smsmith UINT8 *FreeSpace; 14073561Smsmith UINT32 Length; 14173561Smsmith UINT32 ObjectSpace; 14273561Smsmith UINT32 NumPackages; 14373561Smsmith} ACPI_PKG_INFO; 14473561Smsmith 14567754Smsmith#define REF_INCREMENT (UINT16) 0 14667754Smsmith#define REF_DECREMENT (UINT16) 1 14767754Smsmith#define REF_FORCE_DELETE (UINT16) 2 14867754Smsmith 14977424Smsmith/* AcpiUtDumpBuffer */ 15067754Smsmith 15167754Smsmith#define DB_BYTE_DISPLAY 1 15267754Smsmith#define DB_WORD_DISPLAY 2 15367754Smsmith#define DB_DWORD_DISPLAY 4 15467754Smsmith#define DB_QWORD_DISPLAY 8 15567754Smsmith 15667754Smsmith 15767754Smsmith/* Global initialization interfaces */ 15867754Smsmith 15967754Smsmithvoid 16077424SmsmithAcpiUtInitGlobals ( 16167754Smsmith void); 16267754Smsmith 16367754Smsmithvoid 16477424SmsmithAcpiUtTerminate ( 16567754Smsmith void); 16667754Smsmith 16767754Smsmith 16867754Smsmith/* 16977424Smsmith * UtInit - miscellaneous initialization and shutdown 17067754Smsmith */ 17167754Smsmith 17267754SmsmithACPI_STATUS 17377424SmsmithAcpiUtHardwareInitialize ( 17467754Smsmith void); 17567754Smsmith 17667754SmsmithACPI_STATUS 17777424SmsmithAcpiUtSubsystemShutdown ( 17867754Smsmith void); 17967754Smsmith 18067754SmsmithACPI_STATUS 18177424SmsmithAcpiUtValidateFadt ( 18267754Smsmith void); 18367754Smsmith 18467754Smsmith/* 18577424Smsmith * UtGlobal - Global data structures and procedures 18667754Smsmith */ 18767754Smsmith 18869746Smsmith#ifdef ACPI_DEBUG 18969746Smsmith 19067754SmsmithNATIVE_CHAR * 19177424SmsmithAcpiUtGetMutexName ( 19267754Smsmith UINT32 MutexId); 19367754Smsmith 19467754SmsmithNATIVE_CHAR * 19577424SmsmithAcpiUtGetTypeName ( 19667754Smsmith UINT32 Type); 19767754Smsmith 19869746SmsmithNATIVE_CHAR * 19977424SmsmithAcpiUtGetRegionName ( 20069746Smsmith UINT8 SpaceId); 20169746Smsmith 20269746Smsmith#endif 20369746Smsmith 20469746Smsmith 20582367SmsmithUINT8 20682367SmsmithAcpiUtHexToAsciiChar ( 20782367Smsmith ACPI_INTEGER Integer, 20882367Smsmith UINT32 Position); 20982367Smsmith 21067754SmsmithBOOLEAN 21177424SmsmithAcpiUtValidObjectType ( 21267754Smsmith UINT32 Type); 21367754Smsmith 21467754SmsmithACPI_OWNER_ID 21577424SmsmithAcpiUtAllocateOwnerId ( 21667754Smsmith UINT32 IdType); 21767754Smsmith 21867754Smsmith 21967754Smsmith/* 22077424Smsmith * UtClib - Local implementations of C library functions 22167754Smsmith */ 22267754Smsmith 22371867Smsmith#ifndef ACPI_USE_SYSTEM_CLIBRARY 22471867Smsmith 22577424SmsmithUINT32 22677424SmsmithAcpiUtStrlen ( 22767754Smsmith const NATIVE_CHAR *String); 22867754Smsmith 22967754SmsmithNATIVE_CHAR * 23077424SmsmithAcpiUtStrcpy ( 23167754Smsmith NATIVE_CHAR *DstString, 23267754Smsmith const NATIVE_CHAR *SrcString); 23367754Smsmith 23467754SmsmithNATIVE_CHAR * 23577424SmsmithAcpiUtStrncpy ( 23667754Smsmith NATIVE_CHAR *DstString, 23767754Smsmith const NATIVE_CHAR *SrcString, 23867754Smsmith NATIVE_UINT Count); 23967754Smsmith 24067754SmsmithUINT32 24177424SmsmithAcpiUtStrncmp ( 24267754Smsmith const NATIVE_CHAR *String1, 24367754Smsmith const NATIVE_CHAR *String2, 24467754Smsmith NATIVE_UINT Count); 24567754Smsmith 24667754SmsmithUINT32 24777424SmsmithAcpiUtStrcmp ( 24867754Smsmith const NATIVE_CHAR *String1, 24967754Smsmith const NATIVE_CHAR *String2); 25067754Smsmith 25167754SmsmithNATIVE_CHAR * 25277424SmsmithAcpiUtStrcat ( 25367754Smsmith NATIVE_CHAR *DstString, 25467754Smsmith const NATIVE_CHAR *SrcString); 25567754Smsmith 25667754SmsmithNATIVE_CHAR * 25777424SmsmithAcpiUtStrncat ( 25867754Smsmith NATIVE_CHAR *DstString, 25967754Smsmith const NATIVE_CHAR *SrcString, 26067754Smsmith NATIVE_UINT Count); 26167754Smsmith 26267754SmsmithUINT32 26377424SmsmithAcpiUtStrtoul ( 26467754Smsmith const NATIVE_CHAR *String, 26567754Smsmith NATIVE_CHAR **Terminator, 26677424Smsmith UINT32 Base); 26767754Smsmith 26867754SmsmithNATIVE_CHAR * 26977424SmsmithAcpiUtStrstr ( 27067754Smsmith NATIVE_CHAR *String1, 27167754Smsmith NATIVE_CHAR *String2); 27267754Smsmith 27367754Smsmithvoid * 27477424SmsmithAcpiUtMemcpy ( 27567754Smsmith void *Dest, 27667754Smsmith const void *Src, 27767754Smsmith NATIVE_UINT Count); 27867754Smsmith 27967754Smsmithvoid * 28077424SmsmithAcpiUtMemset ( 28167754Smsmith void *Dest, 28271867Smsmith NATIVE_UINT Value, 28367754Smsmith NATIVE_UINT Count); 28467754Smsmith 28567754SmsmithUINT32 28677424SmsmithAcpiUtToUpper ( 28767754Smsmith UINT32 c); 28867754Smsmith 28967754SmsmithUINT32 29077424SmsmithAcpiUtToLower ( 29167754Smsmith UINT32 c); 29267754Smsmith 29371867Smsmith#endif /* ACPI_USE_SYSTEM_CLIBRARY */ 29467754Smsmith 29567754Smsmith/* 29677424Smsmith * UtCopy - Object construction and conversion interfaces 29767754Smsmith */ 29867754Smsmith 29967754SmsmithACPI_STATUS 30077424SmsmithAcpiUtBuildSimpleObject( 30167754Smsmith ACPI_OPERAND_OBJECT *Obj, 30267754Smsmith ACPI_OBJECT *UserObj, 30367754Smsmith UINT8 *DataSpace, 30467754Smsmith UINT32 *BufferSpaceUsed); 30567754Smsmith 30667754SmsmithACPI_STATUS 30777424SmsmithAcpiUtBuildPackageObject ( 30867754Smsmith ACPI_OPERAND_OBJECT *Obj, 30967754Smsmith UINT8 *Buffer, 31067754Smsmith UINT32 *SpaceUsed); 31167754Smsmith 31267754SmsmithACPI_STATUS 31377424SmsmithAcpiUtCopyIobjectToEobject ( 31467754Smsmith ACPI_OPERAND_OBJECT *Obj, 31567754Smsmith ACPI_BUFFER *RetBuffer); 31667754Smsmith 31767754SmsmithACPI_STATUS 31877424SmsmithAcpiUtCopyEsimpleToIsimple( 31967754Smsmith ACPI_OBJECT *UserObj, 32084491Smsmith ACPI_OPERAND_OBJECT **ReturnObj); 32167754Smsmith 32267754SmsmithACPI_STATUS 32377424SmsmithAcpiUtCopyEobjectToIobject ( 32467754Smsmith ACPI_OBJECT *Obj, 32584491Smsmith ACPI_OPERAND_OBJECT **InternalObj); 32667754Smsmith 32767754SmsmithACPI_STATUS 32877424SmsmithAcpiUtCopyISimpleToIsimple ( 32967754Smsmith ACPI_OPERAND_OBJECT *SourceObj, 33067754Smsmith ACPI_OPERAND_OBJECT *DestObj); 33167754Smsmith 33267754SmsmithACPI_STATUS 33377424SmsmithAcpiUtCopyIpackageToIpackage ( 33467754Smsmith ACPI_OPERAND_OBJECT *SourceObj, 33573561Smsmith ACPI_OPERAND_OBJECT *DestObj, 33673561Smsmith ACPI_WALK_STATE *WalkState); 33767754Smsmith 33867754Smsmith 33967754Smsmith/* 34077424Smsmith * UtCreate - Object creation 34167754Smsmith */ 34267754Smsmith 34367754SmsmithACPI_STATUS 34477424SmsmithAcpiUtUpdateObjectReference ( 34567754Smsmith ACPI_OPERAND_OBJECT *Object, 34667754Smsmith UINT16 Action); 34767754Smsmith 34867754Smsmith 34967754Smsmith/* 35077424Smsmith * UtDebug - Debug interfaces 35167754Smsmith */ 35267754Smsmith 35383174Smsmithvoid 35483174SmsmithAcpiUtInitStackPtrTrace ( 35567754Smsmith void); 35667754Smsmith 35767754Smsmithvoid 35883174SmsmithAcpiUtTrackStackPtr ( 35983174Smsmith void); 36067754Smsmith 36167754Smsmithvoid 36283174SmsmithAcpiUtTrace ( 36367754Smsmith UINT32 LineNumber, 36483174Smsmith ACPI_DEBUG_PRINT_INFO *DbgInfo); 36567754Smsmith 36667754Smsmithvoid 36783174SmsmithAcpiUtTracePtr ( 36867754Smsmith UINT32 LineNumber, 36983174Smsmith ACPI_DEBUG_PRINT_INFO *DbgInfo, 37067754Smsmith void *Pointer); 37167754Smsmith 37267754Smsmithvoid 37383174SmsmithAcpiUtTraceU32 ( 37467754Smsmith UINT32 LineNumber, 37583174Smsmith ACPI_DEBUG_PRINT_INFO *DbgInfo, 37667754Smsmith UINT32 Integer); 37767754Smsmith 37867754Smsmithvoid 37983174SmsmithAcpiUtTraceStr ( 38067754Smsmith UINT32 LineNumber, 38183174Smsmith ACPI_DEBUG_PRINT_INFO *DbgInfo, 38267754Smsmith NATIVE_CHAR *String); 38367754Smsmith 38467754Smsmithvoid 38583174SmsmithAcpiUtExit ( 38667754Smsmith UINT32 LineNumber, 38783174Smsmith ACPI_DEBUG_PRINT_INFO *DbgInfo); 38867754Smsmith 38967754Smsmithvoid 39083174SmsmithAcpiUtStatusExit ( 39167754Smsmith UINT32 LineNumber, 39283174Smsmith ACPI_DEBUG_PRINT_INFO *DbgInfo, 39367754Smsmith ACPI_STATUS Status); 39467754Smsmith 39567754Smsmithvoid 39683174SmsmithAcpiUtValueExit ( 39767754Smsmith UINT32 LineNumber, 39883174Smsmith ACPI_DEBUG_PRINT_INFO *DbgInfo, 39971867Smsmith ACPI_INTEGER Value); 40067754Smsmith 40167754Smsmithvoid 40283174SmsmithAcpiUtPtrExit ( 40367754Smsmith UINT32 LineNumber, 40483174Smsmith ACPI_DEBUG_PRINT_INFO *DbgInfo, 40567754Smsmith UINT8 *Ptr); 40667754Smsmith 40767754Smsmithvoid 40883174SmsmithAcpiUtReportInfo ( 40967754Smsmith NATIVE_CHAR *ModuleName, 41067754Smsmith UINT32 LineNumber, 41167754Smsmith UINT32 ComponentId); 41267754Smsmith 41367754Smsmithvoid 41483174SmsmithAcpiUtReportError ( 41567754Smsmith NATIVE_CHAR *ModuleName, 41667754Smsmith UINT32 LineNumber, 41767754Smsmith UINT32 ComponentId); 41867754Smsmith 41967754Smsmithvoid 42083174SmsmithAcpiUtReportWarning ( 42167754Smsmith NATIVE_CHAR *ModuleName, 42267754Smsmith UINT32 LineNumber, 42367754Smsmith UINT32 ComponentId); 42467754Smsmith 42567754Smsmithvoid 42677424SmsmithAcpiUtDumpBuffer ( 42767754Smsmith UINT8 *Buffer, 42867754Smsmith UINT32 Count, 42967754Smsmith UINT32 Display, 43067754Smsmith UINT32 componentId); 43167754Smsmith 43282367Smsmithvoid 43382367SmsmithAcpiUtDebugPrint ( 43482367Smsmith UINT32 RequestedDebugLevel, 43582367Smsmith UINT32 LineNumber, 43683174Smsmith ACPI_DEBUG_PRINT_INFO *DbgInfo, 43782367Smsmith char *Format, 43885756Smsmith ...) ACPI_PRINTF_LIKE_FUNC; 43967754Smsmith 44082367Smsmithvoid 44182367SmsmithAcpiUtDebugPrintRaw ( 44282367Smsmith UINT32 RequestedDebugLevel, 44382367Smsmith UINT32 LineNumber, 44483174Smsmith ACPI_DEBUG_PRINT_INFO *DbgInfo, 44582367Smsmith char *Format, 44685756Smsmith ...) ACPI_PRINTF_LIKE_FUNC; 44782367Smsmith 44883174Smsmith 44967754Smsmith/* 45077424Smsmith * UtDelete - Object deletion 45167754Smsmith */ 45267754Smsmith 45367754Smsmithvoid 45477424SmsmithAcpiUtDeleteInternalObj ( 45567754Smsmith ACPI_OPERAND_OBJECT *Object); 45667754Smsmith 45767754Smsmithvoid 45877424SmsmithAcpiUtDeleteInternalPackageObject ( 45967754Smsmith ACPI_OPERAND_OBJECT *Object); 46067754Smsmith 46167754Smsmithvoid 46277424SmsmithAcpiUtDeleteInternalSimpleObject ( 46367754Smsmith ACPI_OPERAND_OBJECT *Object); 46467754Smsmith 46567754SmsmithACPI_STATUS 46677424SmsmithAcpiUtDeleteInternalObjectList ( 46767754Smsmith ACPI_OPERAND_OBJECT **ObjList); 46867754Smsmith 46967754Smsmith 47067754Smsmith/* 47177424Smsmith * UtEval - object evaluation 47267754Smsmith */ 47367754Smsmith 47467754Smsmith/* Method name strings */ 47567754Smsmith 47667754Smsmith#define METHOD_NAME__HID "_HID" 47787031Smsmith#define METHOD_NAME__CID "_CID" 47867754Smsmith#define METHOD_NAME__UID "_UID" 47967754Smsmith#define METHOD_NAME__ADR "_ADR" 48067754Smsmith#define METHOD_NAME__STA "_STA" 48167754Smsmith#define METHOD_NAME__REG "_REG" 48267754Smsmith#define METHOD_NAME__SEG "_SEG" 48367754Smsmith#define METHOD_NAME__BBN "_BBN" 48485756Smsmith#define METHOD_NAME__PRT "_PRT" 48567754Smsmith 48667754Smsmith 48767754SmsmithACPI_STATUS 48877424SmsmithAcpiUtEvaluateNumericObject ( 48967754Smsmith NATIVE_CHAR *ObjectName, 49067754Smsmith ACPI_NAMESPACE_NODE *DeviceNode, 49167754Smsmith ACPI_INTEGER *Address); 49267754Smsmith 49367754SmsmithACPI_STATUS 49477424SmsmithAcpiUtExecute_HID ( 49567754Smsmith ACPI_NAMESPACE_NODE *DeviceNode, 49677424Smsmith ACPI_DEVICE_ID *Hid); 49767754Smsmith 49867754SmsmithACPI_STATUS 49987031SmsmithAcpiUtExecute_CID ( 50087031Smsmith ACPI_NAMESPACE_NODE *DeviceNode, 50187031Smsmith ACPI_DEVICE_ID *Cid); 50287031Smsmith 50387031SmsmithACPI_STATUS 50477424SmsmithAcpiUtExecute_STA ( 50567754Smsmith ACPI_NAMESPACE_NODE *DeviceNode, 50667754Smsmith UINT32 *StatusFlags); 50767754Smsmith 50867754SmsmithACPI_STATUS 50977424SmsmithAcpiUtExecute_UID ( 51067754Smsmith ACPI_NAMESPACE_NODE *DeviceNode, 51177424Smsmith ACPI_DEVICE_ID *Uid); 51267754Smsmith 51367754Smsmith 51467754Smsmith/* 51577424Smsmith * UtMutex - mutual exclusion interfaces 51667754Smsmith */ 51767754Smsmith 51867754SmsmithACPI_STATUS 51977424SmsmithAcpiUtMutexInitialize ( 52067754Smsmith void); 52167754Smsmith 52267754Smsmithvoid 52377424SmsmithAcpiUtMutexTerminate ( 52467754Smsmith void); 52567754Smsmith 52667754SmsmithACPI_STATUS 52777424SmsmithAcpiUtCreateMutex ( 52867754Smsmith ACPI_MUTEX_HANDLE MutexId); 52967754Smsmith 53067754SmsmithACPI_STATUS 53177424SmsmithAcpiUtDeleteMutex ( 53267754Smsmith ACPI_MUTEX_HANDLE MutexId); 53367754Smsmith 53467754SmsmithACPI_STATUS 53577424SmsmithAcpiUtAcquireMutex ( 53667754Smsmith ACPI_MUTEX_HANDLE MutexId); 53767754Smsmith 53867754SmsmithACPI_STATUS 53977424SmsmithAcpiUtReleaseMutex ( 54067754Smsmith ACPI_MUTEX_HANDLE MutexId); 54167754Smsmith 54267754Smsmith 54367754Smsmith/* 54477424Smsmith * UtObject - internal object create/delete/cache routines 54567754Smsmith */ 54667754Smsmith 54783174SmsmithACPI_OPERAND_OBJECT * 54883174SmsmithAcpiUtCreateInternalObjectDbg ( 54983174Smsmith NATIVE_CHAR *ModuleName, 55083174Smsmith UINT32 LineNumber, 55183174Smsmith UINT32 ComponentId, 55283174Smsmith ACPI_OBJECT_TYPE8 Type); 55383174Smsmith 55467754Smsmithvoid * 55583174SmsmithAcpiUtAllocateObjectDescDbg ( 55667754Smsmith NATIVE_CHAR *ModuleName, 55767754Smsmith UINT32 LineNumber, 55867754Smsmith UINT32 ComponentId); 55967754Smsmith 56083174Smsmith#define AcpiUtCreateInternalObject(t) AcpiUtCreateInternalObjectDbg (_THIS_MODULE,__LINE__,_COMPONENT,t) 56183174Smsmith#define AcpiUtAllocateObjectDesc() AcpiUtAllocateObjectDescDbg (_THIS_MODULE,__LINE__,_COMPONENT) 56267754Smsmith 56367754Smsmithvoid 56477424SmsmithAcpiUtDeleteObjectDesc ( 56567754Smsmith ACPI_OPERAND_OBJECT *Object); 56667754Smsmith 56767754SmsmithBOOLEAN 56877424SmsmithAcpiUtValidInternalObject ( 56967754Smsmith void *Object); 57067754Smsmith 57167754Smsmith 57267754Smsmith/* 57377424Smsmith * UtRefCnt - Object reference count management 57467754Smsmith */ 57567754Smsmith 57667754Smsmithvoid 57777424SmsmithAcpiUtAddReference ( 57867754Smsmith ACPI_OPERAND_OBJECT *Object); 57967754Smsmith 58067754Smsmithvoid 58177424SmsmithAcpiUtRemoveReference ( 58267754Smsmith ACPI_OPERAND_OBJECT *Object); 58367754Smsmith 58467754Smsmith/* 58577424Smsmith * UtSize - Object size routines 58667754Smsmith */ 58767754Smsmith 58867754SmsmithACPI_STATUS 58977424SmsmithAcpiUtGetSimpleObjectSize ( 59067754Smsmith ACPI_OPERAND_OBJECT *Obj, 59167754Smsmith UINT32 *ObjLength); 59267754Smsmith 59367754SmsmithACPI_STATUS 59477424SmsmithAcpiUtGetPackageObjectSize ( 59567754Smsmith ACPI_OPERAND_OBJECT *Obj, 59667754Smsmith UINT32 *ObjLength); 59767754Smsmith 59867754SmsmithACPI_STATUS 59977424SmsmithAcpiUtGetObjectSize( 60067754Smsmith ACPI_OPERAND_OBJECT *Obj, 60167754Smsmith UINT32 *ObjLength); 60267754Smsmith 60367754Smsmith 60467754Smsmith/* 60577424Smsmith * UtState - Generic state creation/cache routines 60667754Smsmith */ 60767754Smsmith 60867754Smsmithvoid 60977424SmsmithAcpiUtPushGenericState ( 61067754Smsmith ACPI_GENERIC_STATE **ListHead, 61167754Smsmith ACPI_GENERIC_STATE *State); 61267754Smsmith 61367754SmsmithACPI_GENERIC_STATE * 61477424SmsmithAcpiUtPopGenericState ( 61567754Smsmith ACPI_GENERIC_STATE **ListHead); 61667754Smsmith 61767754Smsmith 61867754SmsmithACPI_GENERIC_STATE * 61977424SmsmithAcpiUtCreateGenericState ( 62067754Smsmith void); 62167754Smsmith 62287031SmsmithACPI_THREAD_STATE * 62387031SmsmithAcpiUtCreateThreadState ( 62487031Smsmith void); 62587031Smsmith 62667754SmsmithACPI_GENERIC_STATE * 62777424SmsmithAcpiUtCreateUpdateState ( 62867754Smsmith ACPI_OPERAND_OBJECT *Object, 62967754Smsmith UINT16 Action); 63067754Smsmith 63173561SmsmithACPI_GENERIC_STATE * 63277424SmsmithAcpiUtCreatePkgState ( 63373561Smsmith void *InternalObject, 63473561Smsmith void *ExternalObject, 63573561Smsmith UINT16 Index); 63673561Smsmith 63767754SmsmithACPI_STATUS 63877424SmsmithAcpiUtCreateUpdateStateAndPush ( 63967754Smsmith ACPI_OPERAND_OBJECT *Object, 64067754Smsmith UINT16 Action, 64167754Smsmith ACPI_GENERIC_STATE **StateList); 64267754Smsmith 64373561SmsmithACPI_STATUS 64477424SmsmithAcpiUtCreatePkgStateAndPush ( 64573561Smsmith void *InternalObject, 64673561Smsmith void *ExternalObject, 64773561Smsmith UINT16 Index, 64873561Smsmith ACPI_GENERIC_STATE **StateList); 64973561Smsmith 65067754SmsmithACPI_GENERIC_STATE * 65177424SmsmithAcpiUtCreateControlState ( 65267754Smsmith void); 65367754Smsmith 65467754Smsmithvoid 65577424SmsmithAcpiUtDeleteGenericState ( 65667754Smsmith ACPI_GENERIC_STATE *State); 65767754Smsmith 65867754Smsmithvoid 65977424SmsmithAcpiUtDeleteGenericStateCache ( 66067754Smsmith void); 66167754Smsmith 66267754Smsmithvoid 66377424SmsmithAcpiUtDeleteObjectCache ( 66467754Smsmith void); 66567754Smsmith 66667754Smsmith/* 66784491Smsmith * utmisc 66867754Smsmith */ 66967754Smsmith 67084491SmsmithACPI_STATUS 67184491SmsmithAcpiUtDivide ( 67284491Smsmith ACPI_INTEGER *InDividend, 67384491Smsmith ACPI_INTEGER *InDivisor, 67484491Smsmith ACPI_INTEGER *OutQuotient, 67584491Smsmith ACPI_INTEGER *OutRemainder); 67684491Smsmith 67784491SmsmithACPI_STATUS 67884491SmsmithAcpiUtShortDivide ( 67984491Smsmith ACPI_INTEGER *InDividend, 68084491Smsmith UINT32 Divisor, 68184491Smsmith ACPI_INTEGER *OutQuotient, 68284491Smsmith UINT32 *OutRemainder); 68384491Smsmith 68467754SmsmithBOOLEAN 68577424SmsmithAcpiUtValidAcpiName ( 68667754Smsmith UINT32 Name); 68767754Smsmith 68867754SmsmithBOOLEAN 68977424SmsmithAcpiUtValidAcpiCharacter ( 69067754Smsmith NATIVE_CHAR Character); 69167754Smsmith 69277424SmsmithNATIVE_CHAR * 69377424SmsmithAcpiUtStrupr ( 69477424Smsmith NATIVE_CHAR *SrcString); 69577424Smsmith 69667754SmsmithACPI_STATUS 69777424SmsmithAcpiUtResolvePackageReferences ( 69867754Smsmith ACPI_OPERAND_OBJECT *ObjDesc); 69967754Smsmith 70077424Smsmith 70173561Smsmith#ifdef ACPI_DEBUG 70273561Smsmithvoid 70377424SmsmithAcpiUtDisplayInitPathname ( 70473561Smsmith ACPI_HANDLE ObjHandle, 70573561Smsmith char *Path); 70673561Smsmith 70773561Smsmith#endif 70873561Smsmith 70973561Smsmith 71067754Smsmith/* 71182367Smsmith * Utalloc - memory allocation and object caching 71267754Smsmith */ 71367754Smsmith 71467754Smsmithvoid * 71582367SmsmithAcpiUtAcquireFromCache ( 71682367Smsmith UINT32 ListId); 71782367Smsmith 71882367Smsmithvoid 71982367SmsmithAcpiUtReleaseToCache ( 72082367Smsmith UINT32 ListId, 72182367Smsmith void *Object); 72282367Smsmith 72382367Smsmithvoid 72482367SmsmithAcpiUtDeleteGenericCache ( 72582367Smsmith UINT32 ListId); 72682367Smsmith 72782367Smsmith 72882367Smsmith/* Debug Memory allocation functions */ 72982367Smsmith 73082367Smsmithvoid * 73180062SmsmithAcpiUtAllocate ( 73267754Smsmith UINT32 Size, 73367754Smsmith UINT32 Component, 73467754Smsmith NATIVE_CHAR *Module, 73567754Smsmith UINT32 Line); 73667754Smsmith 73767754Smsmithvoid * 73880062SmsmithAcpiUtCallocate ( 73967754Smsmith UINT32 Size, 74067754Smsmith UINT32 Component, 74167754Smsmith NATIVE_CHAR *Module, 74267754Smsmith UINT32 Line); 74367754Smsmith 74467754Smsmithvoid 74580062SmsmithAcpiUtFree ( 74667754Smsmith void *Address, 74767754Smsmith UINT32 Component, 74867754Smsmith NATIVE_CHAR *Module, 74967754Smsmith UINT32 Line); 75067754Smsmith 75180062Smsmith#ifdef ACPI_DBG_TRACK_ALLOCATIONS 75267754Smsmithvoid 75377424SmsmithAcpiUtDumpAllocationInfo ( 75467754Smsmith void); 75567754Smsmith 75667754Smsmithvoid 75784491SmsmithAcpiUtDumpAllocations ( 75867754Smsmith UINT32 Component, 75967754Smsmith NATIVE_CHAR *Module); 76067754Smsmith#endif 76167754Smsmith 76267754Smsmith 76377424Smsmith#endif /* _ACUTILS_H */ 764