10Sstevel@tonic-gate /******************************************************************************
20Sstevel@tonic-gate  *
30Sstevel@tonic-gate  * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
4*1560Smyers  *       $Revision: 1.189 $
50Sstevel@tonic-gate  *
60Sstevel@tonic-gate  *****************************************************************************/
70Sstevel@tonic-gate 
80Sstevel@tonic-gate /******************************************************************************
90Sstevel@tonic-gate  *
100Sstevel@tonic-gate  * 1. Copyright Notice
110Sstevel@tonic-gate  *
12*1560Smyers  * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
130Sstevel@tonic-gate  * All rights reserved.
140Sstevel@tonic-gate  *
150Sstevel@tonic-gate  * 2. License
160Sstevel@tonic-gate  *
170Sstevel@tonic-gate  * 2.1. This is your license from Intel Corp. under its intellectual property
180Sstevel@tonic-gate  * rights.  You may have additional license terms from the party that provided
190Sstevel@tonic-gate  * you this software, covering your right to use that party's intellectual
200Sstevel@tonic-gate  * property rights.
210Sstevel@tonic-gate  *
220Sstevel@tonic-gate  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
230Sstevel@tonic-gate  * copy of the source code appearing in this file ("Covered Code") an
240Sstevel@tonic-gate  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
250Sstevel@tonic-gate  * base code distributed originally by Intel ("Original Intel Code") to copy,
260Sstevel@tonic-gate  * make derivatives, distribute, use and display any portion of the Covered
270Sstevel@tonic-gate  * Code in any form, with the right to sublicense such rights; and
280Sstevel@tonic-gate  *
290Sstevel@tonic-gate  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
300Sstevel@tonic-gate  * license (with the right to sublicense), under only those claims of Intel
310Sstevel@tonic-gate  * patents that are infringed by the Original Intel Code, to make, use, sell,
320Sstevel@tonic-gate  * offer to sell, and import the Covered Code and derivative works thereof
330Sstevel@tonic-gate  * solely to the minimum extent necessary to exercise the above copyright
340Sstevel@tonic-gate  * license, and in no event shall the patent license extend to any additions
350Sstevel@tonic-gate  * to or modifications of the Original Intel Code.  No other license or right
360Sstevel@tonic-gate  * is granted directly or by implication, estoppel or otherwise;
370Sstevel@tonic-gate  *
380Sstevel@tonic-gate  * The above copyright and patent license is granted only if the following
390Sstevel@tonic-gate  * conditions are met:
400Sstevel@tonic-gate  *
410Sstevel@tonic-gate  * 3. Conditions
420Sstevel@tonic-gate  *
430Sstevel@tonic-gate  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
440Sstevel@tonic-gate  * Redistribution of source code of any substantial portion of the Covered
450Sstevel@tonic-gate  * Code or modification with rights to further distribute source must include
460Sstevel@tonic-gate  * the above Copyright Notice, the above License, this list of Conditions,
470Sstevel@tonic-gate  * and the following Disclaimer and Export Compliance provision.  In addition,
480Sstevel@tonic-gate  * Licensee must cause all Covered Code to which Licensee contributes to
490Sstevel@tonic-gate  * contain a file documenting the changes Licensee made to create that Covered
500Sstevel@tonic-gate  * Code and the date of any change.  Licensee must include in that file the
510Sstevel@tonic-gate  * documentation of any changes made by any predecessor Licensee.  Licensee
520Sstevel@tonic-gate  * must include a prominent statement that the modification is derived,
530Sstevel@tonic-gate  * directly or indirectly, from Original Intel Code.
540Sstevel@tonic-gate  *
550Sstevel@tonic-gate  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
560Sstevel@tonic-gate  * Redistribution of source code of any substantial portion of the Covered
570Sstevel@tonic-gate  * Code or modification without rights to further distribute source must
580Sstevel@tonic-gate  * include the following Disclaimer and Export Compliance provision in the
590Sstevel@tonic-gate  * documentation and/or other materials provided with distribution.  In
600Sstevel@tonic-gate  * addition, Licensee may not authorize further sublicense of source of any
610Sstevel@tonic-gate  * portion of the Covered Code, and must include terms to the effect that the
620Sstevel@tonic-gate  * license from Licensee to its licensee is limited to the intellectual
630Sstevel@tonic-gate  * property embodied in the software Licensee provides to its licensee, and
640Sstevel@tonic-gate  * not to intellectual property embodied in modifications its licensee may
650Sstevel@tonic-gate  * make.
660Sstevel@tonic-gate  *
670Sstevel@tonic-gate  * 3.3. Redistribution of Executable. Redistribution in executable form of any
680Sstevel@tonic-gate  * substantial portion of the Covered Code or modification must reproduce the
690Sstevel@tonic-gate  * above Copyright Notice, and the following Disclaimer and Export Compliance
700Sstevel@tonic-gate  * provision in the documentation and/or other materials provided with the
710Sstevel@tonic-gate  * distribution.
720Sstevel@tonic-gate  *
730Sstevel@tonic-gate  * 3.4. Intel retains all right, title, and interest in and to the Original
740Sstevel@tonic-gate  * Intel Code.
750Sstevel@tonic-gate  *
760Sstevel@tonic-gate  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
770Sstevel@tonic-gate  * Intel shall be used in advertising or otherwise to promote the sale, use or
780Sstevel@tonic-gate  * other dealings in products derived from or relating to the Covered Code
790Sstevel@tonic-gate  * without prior written authorization from Intel.
800Sstevel@tonic-gate  *
810Sstevel@tonic-gate  * 4. Disclaimer and Export Compliance
820Sstevel@tonic-gate  *
830Sstevel@tonic-gate  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
840Sstevel@tonic-gate  * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
850Sstevel@tonic-gate  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
860Sstevel@tonic-gate  * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
870Sstevel@tonic-gate  * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
880Sstevel@tonic-gate  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
890Sstevel@tonic-gate  * PARTICULAR PURPOSE.
900Sstevel@tonic-gate  *
910Sstevel@tonic-gate  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
920Sstevel@tonic-gate  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
930Sstevel@tonic-gate  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
940Sstevel@tonic-gate  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
950Sstevel@tonic-gate  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
960Sstevel@tonic-gate  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
970Sstevel@tonic-gate  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
980Sstevel@tonic-gate  * LIMITED REMEDY.
990Sstevel@tonic-gate  *
1000Sstevel@tonic-gate  * 4.3. Licensee shall not export, either directly or indirectly, any of this
1010Sstevel@tonic-gate  * software or system incorporating such software without first obtaining any
1020Sstevel@tonic-gate  * required license or other approval from the U. S. Department of Commerce or
1030Sstevel@tonic-gate  * any other agency or department of the United States Government.  In the
1040Sstevel@tonic-gate  * event Licensee exports any such software from the United States or
1050Sstevel@tonic-gate  * re-exports any such software from a foreign destination, Licensee shall
1060Sstevel@tonic-gate  * ensure that the distribution and export/re-export of the software is in
1070Sstevel@tonic-gate  * compliance with all laws, regulations, orders, or other restrictions of the
1080Sstevel@tonic-gate  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
1090Sstevel@tonic-gate  * any of its subsidiaries will export/re-export any technical data, process,
1100Sstevel@tonic-gate  * software, or service, directly or indirectly, to any country for which the
1110Sstevel@tonic-gate  * United States government or any agency thereof requires an export license,
1120Sstevel@tonic-gate  * other governmental approval, or letter of assurance, without first obtaining
1130Sstevel@tonic-gate  * such license, approval or letter.
1140Sstevel@tonic-gate  *
1150Sstevel@tonic-gate  *****************************************************************************/
1160Sstevel@tonic-gate 
1170Sstevel@tonic-gate #ifndef _ACUTILS_H
1180Sstevel@tonic-gate #define _ACUTILS_H
1190Sstevel@tonic-gate 
1200Sstevel@tonic-gate 
121*1560Smyers extern const UINT8                      AcpiGbl_ResourceAmlSizes[];
122*1560Smyers 
123*1560Smyers /* Strings used by the disassembler and debugger resource dump routines */
124*1560Smyers 
125*1560Smyers #if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER)
126*1560Smyers 
127*1560Smyers extern const char                       *AcpiGbl_BMDecode[2];
128*1560Smyers extern const char                       *AcpiGbl_ConfigDecode[4];
129*1560Smyers extern const char                       *AcpiGbl_ConsumeDecode[2];
130*1560Smyers extern const char                       *AcpiGbl_DECDecode[2];
131*1560Smyers extern const char                       *AcpiGbl_HEDecode[2];
132*1560Smyers extern const char                       *AcpiGbl_IoDecode[2];
133*1560Smyers extern const char                       *AcpiGbl_LLDecode[2];
134*1560Smyers extern const char                       *AcpiGbl_MaxDecode[2];
135*1560Smyers extern const char                       *AcpiGbl_MEMDecode[4];
136*1560Smyers extern const char                       *AcpiGbl_MinDecode[2];
137*1560Smyers extern const char                       *AcpiGbl_MTPDecode[4];
138*1560Smyers extern const char                       *AcpiGbl_RNGDecode[4];
139*1560Smyers extern const char                       *AcpiGbl_RWDecode[2];
140*1560Smyers extern const char                       *AcpiGbl_SHRDecode[2];
141*1560Smyers extern const char                       *AcpiGbl_SIZDecode[4];
142*1560Smyers extern const char                       *AcpiGbl_TRSDecode[2];
143*1560Smyers extern const char                       *AcpiGbl_TTPDecode[2];
144*1560Smyers extern const char                       *AcpiGbl_TYPDecode[4];
145*1560Smyers #endif
146*1560Smyers 
147*1560Smyers /* Types for Resource descriptor entries */
148*1560Smyers 
149*1560Smyers #define ACPI_INVALID_RESOURCE           0
150*1560Smyers #define ACPI_FIXED_LENGTH               1
151*1560Smyers #define ACPI_VARIABLE_LENGTH            2
152*1560Smyers #define ACPI_SMALL_VARIABLE_LENGTH      3
153*1560Smyers 
1540Sstevel@tonic-gate typedef
1550Sstevel@tonic-gate ACPI_STATUS (*ACPI_PKG_CALLBACK) (
1560Sstevel@tonic-gate     UINT8                   ObjectType,
1570Sstevel@tonic-gate     ACPI_OPERAND_OBJECT     *SourceObject,
1580Sstevel@tonic-gate     ACPI_GENERIC_STATE      *State,
1590Sstevel@tonic-gate     void                    *Context);
1600Sstevel@tonic-gate 
1610Sstevel@tonic-gate typedef struct acpi_pkg_info
1620Sstevel@tonic-gate {
1630Sstevel@tonic-gate     UINT8                   *FreeSpace;
1640Sstevel@tonic-gate     ACPI_SIZE               Length;
1650Sstevel@tonic-gate     UINT32                  ObjectSpace;
1660Sstevel@tonic-gate     UINT32                  NumPackages;
1670Sstevel@tonic-gate 
1680Sstevel@tonic-gate } ACPI_PKG_INFO;
1690Sstevel@tonic-gate 
1700Sstevel@tonic-gate #define REF_INCREMENT       (UINT16) 0
1710Sstevel@tonic-gate #define REF_DECREMENT       (UINT16) 1
1720Sstevel@tonic-gate #define REF_FORCE_DELETE    (UINT16) 2
1730Sstevel@tonic-gate 
1740Sstevel@tonic-gate /* AcpiUtDumpBuffer */
1750Sstevel@tonic-gate 
1760Sstevel@tonic-gate #define DB_BYTE_DISPLAY     1
1770Sstevel@tonic-gate #define DB_WORD_DISPLAY     2
1780Sstevel@tonic-gate #define DB_DWORD_DISPLAY    4
1790Sstevel@tonic-gate #define DB_QWORD_DISPLAY    8
1800Sstevel@tonic-gate 
1810Sstevel@tonic-gate 
1820Sstevel@tonic-gate /*
1830Sstevel@tonic-gate  * utglobal - Global data structures and procedures
1840Sstevel@tonic-gate  */
1850Sstevel@tonic-gate void
1860Sstevel@tonic-gate AcpiUtInitGlobals (
1870Sstevel@tonic-gate     void);
1880Sstevel@tonic-gate 
1890Sstevel@tonic-gate #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
1900Sstevel@tonic-gate 
1910Sstevel@tonic-gate char *
1920Sstevel@tonic-gate AcpiUtGetMutexName (
1930Sstevel@tonic-gate     UINT32                  MutexId);
1940Sstevel@tonic-gate 
1950Sstevel@tonic-gate #endif
1960Sstevel@tonic-gate 
1970Sstevel@tonic-gate char *
1980Sstevel@tonic-gate AcpiUtGetTypeName (
1990Sstevel@tonic-gate     ACPI_OBJECT_TYPE        Type);
2000Sstevel@tonic-gate 
2010Sstevel@tonic-gate char *
2020Sstevel@tonic-gate AcpiUtGetNodeName (
2030Sstevel@tonic-gate     void                    *Object);
2040Sstevel@tonic-gate 
2050Sstevel@tonic-gate char *
2060Sstevel@tonic-gate AcpiUtGetDescriptorName (
2070Sstevel@tonic-gate     void                    *Object);
2080Sstevel@tonic-gate 
2090Sstevel@tonic-gate char *
2100Sstevel@tonic-gate AcpiUtGetObjectTypeName (
2110Sstevel@tonic-gate     ACPI_OPERAND_OBJECT     *ObjDesc);
2120Sstevel@tonic-gate 
2130Sstevel@tonic-gate char *
2140Sstevel@tonic-gate AcpiUtGetRegionName (
2150Sstevel@tonic-gate     UINT8                   SpaceId);
2160Sstevel@tonic-gate 
2170Sstevel@tonic-gate char *
2180Sstevel@tonic-gate AcpiUtGetEventName (
2190Sstevel@tonic-gate     UINT32                  EventId);
2200Sstevel@tonic-gate 
2210Sstevel@tonic-gate char
2220Sstevel@tonic-gate AcpiUtHexToAsciiChar (
2230Sstevel@tonic-gate     ACPI_INTEGER            Integer,
2240Sstevel@tonic-gate     UINT32                  Position);
2250Sstevel@tonic-gate 
2260Sstevel@tonic-gate BOOLEAN
2270Sstevel@tonic-gate AcpiUtValidObjectType (
2280Sstevel@tonic-gate     ACPI_OBJECT_TYPE        Type);
2290Sstevel@tonic-gate 
2300Sstevel@tonic-gate 
2310Sstevel@tonic-gate /*
2320Sstevel@tonic-gate  * utinit - miscellaneous initialization and shutdown
2330Sstevel@tonic-gate  */
2340Sstevel@tonic-gate ACPI_STATUS
2350Sstevel@tonic-gate AcpiUtHardwareInitialize (
2360Sstevel@tonic-gate     void);
2370Sstevel@tonic-gate 
2380Sstevel@tonic-gate void
2390Sstevel@tonic-gate AcpiUtSubsystemShutdown (
2400Sstevel@tonic-gate     void);
2410Sstevel@tonic-gate 
2420Sstevel@tonic-gate ACPI_STATUS
2430Sstevel@tonic-gate AcpiUtValidateFadt (
2440Sstevel@tonic-gate     void);
2450Sstevel@tonic-gate 
2460Sstevel@tonic-gate 
2470Sstevel@tonic-gate /*
2480Sstevel@tonic-gate  * utclib - Local implementations of C library functions
2490Sstevel@tonic-gate  */
2500Sstevel@tonic-gate #ifndef ACPI_USE_SYSTEM_CLIBRARY
2510Sstevel@tonic-gate 
2520Sstevel@tonic-gate ACPI_SIZE
2530Sstevel@tonic-gate AcpiUtStrlen (
2540Sstevel@tonic-gate     const char              *String);
2550Sstevel@tonic-gate 
2560Sstevel@tonic-gate char *
2570Sstevel@tonic-gate AcpiUtStrcpy (
2580Sstevel@tonic-gate     char                    *DstString,
2590Sstevel@tonic-gate     const char              *SrcString);
2600Sstevel@tonic-gate 
2610Sstevel@tonic-gate char *
2620Sstevel@tonic-gate AcpiUtStrncpy (
2630Sstevel@tonic-gate     char                    *DstString,
2640Sstevel@tonic-gate     const char              *SrcString,
2650Sstevel@tonic-gate     ACPI_SIZE               Count);
2660Sstevel@tonic-gate 
2670Sstevel@tonic-gate int
2680Sstevel@tonic-gate AcpiUtMemcmp (
2690Sstevel@tonic-gate     const char              *Buffer1,
2700Sstevel@tonic-gate     const char              *Buffer2,
2710Sstevel@tonic-gate     ACPI_SIZE               Count);
2720Sstevel@tonic-gate 
2730Sstevel@tonic-gate int
2740Sstevel@tonic-gate AcpiUtStrncmp (
2750Sstevel@tonic-gate     const char              *String1,
2760Sstevel@tonic-gate     const char              *String2,
2770Sstevel@tonic-gate     ACPI_SIZE               Count);
2780Sstevel@tonic-gate 
2790Sstevel@tonic-gate int
2800Sstevel@tonic-gate AcpiUtStrcmp (
2810Sstevel@tonic-gate     const char              *String1,
2820Sstevel@tonic-gate     const char              *String2);
2830Sstevel@tonic-gate 
2840Sstevel@tonic-gate char *
2850Sstevel@tonic-gate AcpiUtStrcat (
2860Sstevel@tonic-gate     char                    *DstString,
2870Sstevel@tonic-gate     const char              *SrcString);
2880Sstevel@tonic-gate 
2890Sstevel@tonic-gate char *
2900Sstevel@tonic-gate AcpiUtStrncat (
2910Sstevel@tonic-gate     char                    *DstString,
2920Sstevel@tonic-gate     const char              *SrcString,
2930Sstevel@tonic-gate     ACPI_SIZE               Count);
2940Sstevel@tonic-gate 
2950Sstevel@tonic-gate UINT32
2960Sstevel@tonic-gate AcpiUtStrtoul (
2970Sstevel@tonic-gate     const char              *String,
2980Sstevel@tonic-gate     char                    **Terminator,
2990Sstevel@tonic-gate     UINT32                  Base);
3000Sstevel@tonic-gate 
3010Sstevel@tonic-gate char *
3020Sstevel@tonic-gate AcpiUtStrstr (
3030Sstevel@tonic-gate     char                    *String1,
3040Sstevel@tonic-gate     char                    *String2);
3050Sstevel@tonic-gate 
3060Sstevel@tonic-gate void *
3070Sstevel@tonic-gate AcpiUtMemcpy (
3080Sstevel@tonic-gate     void                    *Dest,
3090Sstevel@tonic-gate     const void              *Src,
3100Sstevel@tonic-gate     ACPI_SIZE               Count);
3110Sstevel@tonic-gate 
3120Sstevel@tonic-gate void *
3130Sstevel@tonic-gate AcpiUtMemset (
3140Sstevel@tonic-gate     void                    *Dest,
3150Sstevel@tonic-gate     ACPI_NATIVE_UINT        Value,
3160Sstevel@tonic-gate     ACPI_SIZE               Count);
3170Sstevel@tonic-gate 
3180Sstevel@tonic-gate int
3190Sstevel@tonic-gate AcpiUtToUpper (
3200Sstevel@tonic-gate     int                     c);
3210Sstevel@tonic-gate 
3220Sstevel@tonic-gate int
3230Sstevel@tonic-gate AcpiUtToLower (
3240Sstevel@tonic-gate     int                     c);
3250Sstevel@tonic-gate 
3260Sstevel@tonic-gate extern const UINT8 _acpi_ctype[];
3270Sstevel@tonic-gate 
3280Sstevel@tonic-gate #define _ACPI_XA     0x00    /* extra alphabetic - not supported */
3290Sstevel@tonic-gate #define _ACPI_XS     0x40    /* extra space */
3300Sstevel@tonic-gate #define _ACPI_BB     0x00    /* BEL, BS, etc. - not supported */
3310Sstevel@tonic-gate #define _ACPI_CN     0x20    /* CR, FF, HT, NL, VT */
3320Sstevel@tonic-gate #define _ACPI_DI     0x04    /* '0'-'9' */
3330Sstevel@tonic-gate #define _ACPI_LO     0x02    /* 'a'-'z' */
3340Sstevel@tonic-gate #define _ACPI_PU     0x10    /* punctuation */
3350Sstevel@tonic-gate #define _ACPI_SP     0x08    /* space */
3360Sstevel@tonic-gate #define _ACPI_UP     0x01    /* 'A'-'Z' */
3370Sstevel@tonic-gate #define _ACPI_XD     0x80    /* '0'-'9', 'A'-'F', 'a'-'f' */
3380Sstevel@tonic-gate 
3390Sstevel@tonic-gate #define ACPI_IS_DIGIT(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI))
3400Sstevel@tonic-gate #define ACPI_IS_SPACE(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP))
3410Sstevel@tonic-gate #define ACPI_IS_XDIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_XD))
3420Sstevel@tonic-gate #define ACPI_IS_UPPER(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_UP))
3430Sstevel@tonic-gate #define ACPI_IS_LOWER(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO))
3440Sstevel@tonic-gate #define ACPI_IS_PRINT(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_SP | _ACPI_PU))
3450Sstevel@tonic-gate #define ACPI_IS_ALPHA(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP))
3460Sstevel@tonic-gate 
3470Sstevel@tonic-gate #endif /* ACPI_USE_SYSTEM_CLIBRARY */
3480Sstevel@tonic-gate 
3490Sstevel@tonic-gate 
3500Sstevel@tonic-gate /*
3510Sstevel@tonic-gate  * utcopy - Object construction and conversion interfaces
3520Sstevel@tonic-gate  */
3530Sstevel@tonic-gate ACPI_STATUS
3540Sstevel@tonic-gate AcpiUtBuildSimpleObject(
3550Sstevel@tonic-gate     ACPI_OPERAND_OBJECT     *Obj,
3560Sstevel@tonic-gate     ACPI_OBJECT             *UserObj,
3570Sstevel@tonic-gate     UINT8                   *DataSpace,
3580Sstevel@tonic-gate     UINT32                  *BufferSpaceUsed);
3590Sstevel@tonic-gate 
3600Sstevel@tonic-gate ACPI_STATUS
3610Sstevel@tonic-gate AcpiUtBuildPackageObject (
3620Sstevel@tonic-gate     ACPI_OPERAND_OBJECT     *Obj,
3630Sstevel@tonic-gate     UINT8                   *Buffer,
3640Sstevel@tonic-gate     UINT32                  *SpaceUsed);
3650Sstevel@tonic-gate 
3660Sstevel@tonic-gate ACPI_STATUS
3670Sstevel@tonic-gate AcpiUtCopyIobjectToEobject (
3680Sstevel@tonic-gate     ACPI_OPERAND_OBJECT     *Obj,
3690Sstevel@tonic-gate     ACPI_BUFFER             *RetBuffer);
3700Sstevel@tonic-gate 
3710Sstevel@tonic-gate ACPI_STATUS
3720Sstevel@tonic-gate AcpiUtCopyEobjectToIobject (
3730Sstevel@tonic-gate     ACPI_OBJECT             *Obj,
3740Sstevel@tonic-gate     ACPI_OPERAND_OBJECT     **InternalObj);
3750Sstevel@tonic-gate 
3760Sstevel@tonic-gate ACPI_STATUS
3770Sstevel@tonic-gate AcpiUtCopyISimpleToIsimple (
3780Sstevel@tonic-gate     ACPI_OPERAND_OBJECT     *SourceObj,
3790Sstevel@tonic-gate     ACPI_OPERAND_OBJECT     *DestObj);
3800Sstevel@tonic-gate 
3810Sstevel@tonic-gate ACPI_STATUS
3820Sstevel@tonic-gate AcpiUtCopyIobjectToIobject (
3830Sstevel@tonic-gate     ACPI_OPERAND_OBJECT     *SourceDesc,
3840Sstevel@tonic-gate     ACPI_OPERAND_OBJECT     **DestDesc,
3850Sstevel@tonic-gate     ACPI_WALK_STATE         *WalkState);
3860Sstevel@tonic-gate 
3870Sstevel@tonic-gate 
3880Sstevel@tonic-gate /*
3890Sstevel@tonic-gate  * utcreate - Object creation
3900Sstevel@tonic-gate  */
3910Sstevel@tonic-gate ACPI_STATUS
3920Sstevel@tonic-gate AcpiUtUpdateObjectReference (
3930Sstevel@tonic-gate     ACPI_OPERAND_OBJECT     *Object,
3940Sstevel@tonic-gate     UINT16                  Action);
3950Sstevel@tonic-gate 
3960Sstevel@tonic-gate 
3970Sstevel@tonic-gate /*
3980Sstevel@tonic-gate  * utdebug - Debug interfaces
3990Sstevel@tonic-gate  */
4000Sstevel@tonic-gate void
4010Sstevel@tonic-gate AcpiUtInitStackPtrTrace (
4020Sstevel@tonic-gate     void);
4030Sstevel@tonic-gate 
4040Sstevel@tonic-gate void
4050Sstevel@tonic-gate AcpiUtTrackStackPtr (
4060Sstevel@tonic-gate     void);
4070Sstevel@tonic-gate 
4080Sstevel@tonic-gate void
4090Sstevel@tonic-gate AcpiUtTrace (
4100Sstevel@tonic-gate     UINT32                  LineNumber,
411941Smyers     const char              *FunctionName,
412347Smyers     char                    *ModuleName,
413347Smyers     UINT32                  ComponentId);
4140Sstevel@tonic-gate 
4150Sstevel@tonic-gate void
4160Sstevel@tonic-gate AcpiUtTracePtr (
4170Sstevel@tonic-gate     UINT32                  LineNumber,
418941Smyers     const char              *FunctionName,
419347Smyers     char                    *ModuleName,
420347Smyers     UINT32                  ComponentId,
4210Sstevel@tonic-gate     void                    *Pointer);
4220Sstevel@tonic-gate 
4230Sstevel@tonic-gate void
4240Sstevel@tonic-gate AcpiUtTraceU32 (
4250Sstevel@tonic-gate     UINT32                  LineNumber,
426941Smyers     const char              *FunctionName,
427347Smyers     char                    *ModuleName,
428347Smyers     UINT32                  ComponentId,
4290Sstevel@tonic-gate     UINT32                  Integer);
4300Sstevel@tonic-gate 
4310Sstevel@tonic-gate void
4320Sstevel@tonic-gate AcpiUtTraceStr (
4330Sstevel@tonic-gate     UINT32                  LineNumber,
434941Smyers     const char              *FunctionName,
435347Smyers     char                    *ModuleName,
436347Smyers     UINT32                  ComponentId,
4370Sstevel@tonic-gate     char                    *String);
4380Sstevel@tonic-gate 
4390Sstevel@tonic-gate void
4400Sstevel@tonic-gate AcpiUtExit (
4410Sstevel@tonic-gate     UINT32                  LineNumber,
442941Smyers     const char              *FunctionName,
443347Smyers     char                    *ModuleName,
444347Smyers     UINT32                  ComponentId);
4450Sstevel@tonic-gate 
4460Sstevel@tonic-gate void
4470Sstevel@tonic-gate AcpiUtStatusExit (
4480Sstevel@tonic-gate     UINT32                  LineNumber,
449941Smyers     const char              *FunctionName,
450347Smyers     char                    *ModuleName,
451347Smyers     UINT32                  ComponentId,
4520Sstevel@tonic-gate     ACPI_STATUS             Status);
4530Sstevel@tonic-gate 
4540Sstevel@tonic-gate void
4550Sstevel@tonic-gate AcpiUtValueExit (
4560Sstevel@tonic-gate     UINT32                  LineNumber,
457941Smyers     const char              *FunctionName,
458347Smyers     char                    *ModuleName,
459347Smyers     UINT32                  ComponentId,
4600Sstevel@tonic-gate     ACPI_INTEGER            Value);
4610Sstevel@tonic-gate 
4620Sstevel@tonic-gate void
4630Sstevel@tonic-gate AcpiUtPtrExit (
4640Sstevel@tonic-gate     UINT32                  LineNumber,
465941Smyers     const char              *FunctionName,
466347Smyers     char                    *ModuleName,
467347Smyers     UINT32                  ComponentId,
4680Sstevel@tonic-gate     UINT8                   *Ptr);
4690Sstevel@tonic-gate 
4700Sstevel@tonic-gate void
4710Sstevel@tonic-gate AcpiUtDumpBuffer (
4720Sstevel@tonic-gate     UINT8                   *Buffer,
4730Sstevel@tonic-gate     UINT32                  Count,
4740Sstevel@tonic-gate     UINT32                  Display,
4750Sstevel@tonic-gate     UINT32                  componentId);
4760Sstevel@tonic-gate 
477*1560Smyers void
478*1560Smyers AcpiUtReportError (
479*1560Smyers     char                    *ModuleName,
480*1560Smyers     UINT32                  LineNumber);
481*1560Smyers 
482*1560Smyers void
483*1560Smyers AcpiUtReportInfo (
484*1560Smyers     char                    *ModuleName,
485*1560Smyers     UINT32                  LineNumber);
486*1560Smyers 
487*1560Smyers void
488*1560Smyers AcpiUtReportWarning (
489*1560Smyers     char                    *ModuleName,
490*1560Smyers     UINT32                  LineNumber);
491*1560Smyers 
492*1560Smyers /* Error and message reporting interfaces */
493*1560Smyers 
4940Sstevel@tonic-gate void ACPI_INTERNAL_VAR_XFACE
4950Sstevel@tonic-gate AcpiUtDebugPrint (
4960Sstevel@tonic-gate     UINT32                  RequestedDebugLevel,
4970Sstevel@tonic-gate     UINT32                  LineNumber,
498941Smyers     const char              *FunctionName,
499347Smyers     char                    *ModuleName,
500347Smyers     UINT32                  ComponentId,
5010Sstevel@tonic-gate     char                    *Format,
502*1560Smyers     ...) ACPI_PRINTF_LIKE(6);
5030Sstevel@tonic-gate 
5040Sstevel@tonic-gate void ACPI_INTERNAL_VAR_XFACE
5050Sstevel@tonic-gate AcpiUtDebugPrintRaw (
5060Sstevel@tonic-gate     UINT32                  RequestedDebugLevel,
5070Sstevel@tonic-gate     UINT32                  LineNumber,
508941Smyers     const char              *FunctionName,
509347Smyers     char                    *ModuleName,
510347Smyers     UINT32                  ComponentId,
5110Sstevel@tonic-gate     char                    *Format,
512*1560Smyers     ...) ACPI_PRINTF_LIKE(6);
513*1560Smyers 
514*1560Smyers void ACPI_INTERNAL_VAR_XFACE
515*1560Smyers AcpiUtError (
516*1560Smyers     char                    *ModuleName,
517*1560Smyers     UINT32                  LineNumber,
518*1560Smyers     char                    *Format,
519*1560Smyers     ...) ACPI_PRINTF_LIKE(3);
520*1560Smyers 
521*1560Smyers void  ACPI_INTERNAL_VAR_XFACE
522*1560Smyers AcpiUtException (
523*1560Smyers     char                    *ModuleName,
524*1560Smyers     UINT32                  LineNumber,
525*1560Smyers     ACPI_STATUS             Status,
526*1560Smyers     char                    *Format,
527*1560Smyers     ...) ACPI_PRINTF_LIKE(4);
528*1560Smyers 
529*1560Smyers void ACPI_INTERNAL_VAR_XFACE
530*1560Smyers AcpiUtWarning (
531*1560Smyers     char                    *ModuleName,
532*1560Smyers     UINT32                  LineNumber,
533*1560Smyers     char                    *Format,
534*1560Smyers     ...) ACPI_PRINTF_LIKE(3);
535*1560Smyers 
536*1560Smyers void ACPI_INTERNAL_VAR_XFACE
537*1560Smyers AcpiUtInfo (
538*1560Smyers     char                    *ModuleName,
539*1560Smyers     UINT32                  LineNumber,
540*1560Smyers     char                    *Format,
541*1560Smyers     ...) ACPI_PRINTF_LIKE(3);
5420Sstevel@tonic-gate 
5430Sstevel@tonic-gate 
5440Sstevel@tonic-gate /*
5450Sstevel@tonic-gate  * utdelete - Object deletion and reference counts
5460Sstevel@tonic-gate  */
5470Sstevel@tonic-gate void
5480Sstevel@tonic-gate AcpiUtAddReference (
5490Sstevel@tonic-gate     ACPI_OPERAND_OBJECT     *Object);
5500Sstevel@tonic-gate 
5510Sstevel@tonic-gate void
5520Sstevel@tonic-gate AcpiUtRemoveReference (
5530Sstevel@tonic-gate     ACPI_OPERAND_OBJECT     *Object);
5540Sstevel@tonic-gate 
5550Sstevel@tonic-gate void
5560Sstevel@tonic-gate AcpiUtDeleteInternalPackageObject (
5570Sstevel@tonic-gate     ACPI_OPERAND_OBJECT     *Object);
5580Sstevel@tonic-gate 
5590Sstevel@tonic-gate void
5600Sstevel@tonic-gate AcpiUtDeleteInternalSimpleObject (
5610Sstevel@tonic-gate     ACPI_OPERAND_OBJECT     *Object);
5620Sstevel@tonic-gate 
5630Sstevel@tonic-gate void
5640Sstevel@tonic-gate AcpiUtDeleteInternalObjectList (
5650Sstevel@tonic-gate     ACPI_OPERAND_OBJECT     **ObjList);
5660Sstevel@tonic-gate 
5670Sstevel@tonic-gate 
5680Sstevel@tonic-gate /*
5690Sstevel@tonic-gate  * uteval - object evaluation
5700Sstevel@tonic-gate  */
5710Sstevel@tonic-gate ACPI_STATUS
5720Sstevel@tonic-gate AcpiUtOsiImplementation (
5730Sstevel@tonic-gate     ACPI_WALK_STATE         *WalkState);
5740Sstevel@tonic-gate 
5750Sstevel@tonic-gate ACPI_STATUS
5760Sstevel@tonic-gate AcpiUtEvaluateObject (
5770Sstevel@tonic-gate     ACPI_NAMESPACE_NODE     *PrefixNode,
5780Sstevel@tonic-gate     char                    *Path,
5790Sstevel@tonic-gate     UINT32                  ExpectedReturnBtypes,
5800Sstevel@tonic-gate     ACPI_OPERAND_OBJECT     **ReturnDesc);
5810Sstevel@tonic-gate 
5820Sstevel@tonic-gate ACPI_STATUS
5830Sstevel@tonic-gate AcpiUtEvaluateNumericObject (
5840Sstevel@tonic-gate     char                    *ObjectName,
5850Sstevel@tonic-gate     ACPI_NAMESPACE_NODE     *DeviceNode,
5860Sstevel@tonic-gate     ACPI_INTEGER            *Address);
5870Sstevel@tonic-gate 
5880Sstevel@tonic-gate ACPI_STATUS
5890Sstevel@tonic-gate AcpiUtExecute_HID (
5900Sstevel@tonic-gate     ACPI_NAMESPACE_NODE     *DeviceNode,
5910Sstevel@tonic-gate     ACPI_DEVICE_ID          *Hid);
5920Sstevel@tonic-gate 
5930Sstevel@tonic-gate ACPI_STATUS
5940Sstevel@tonic-gate AcpiUtExecute_CID (
5950Sstevel@tonic-gate     ACPI_NAMESPACE_NODE     *DeviceNode,
5960Sstevel@tonic-gate     ACPI_COMPATIBLE_ID_LIST **ReturnCidList);
5970Sstevel@tonic-gate 
5980Sstevel@tonic-gate ACPI_STATUS
5990Sstevel@tonic-gate AcpiUtExecute_STA (
6000Sstevel@tonic-gate     ACPI_NAMESPACE_NODE     *DeviceNode,
6010Sstevel@tonic-gate     UINT32                  *StatusFlags);
6020Sstevel@tonic-gate 
6030Sstevel@tonic-gate ACPI_STATUS
6040Sstevel@tonic-gate AcpiUtExecute_UID (
6050Sstevel@tonic-gate     ACPI_NAMESPACE_NODE     *DeviceNode,
6060Sstevel@tonic-gate     ACPI_DEVICE_ID          *Uid);
6070Sstevel@tonic-gate 
6080Sstevel@tonic-gate ACPI_STATUS
6090Sstevel@tonic-gate AcpiUtExecute_Sxds (
6100Sstevel@tonic-gate     ACPI_NAMESPACE_NODE     *DeviceNode,
6110Sstevel@tonic-gate     UINT8                   *Highest);
6120Sstevel@tonic-gate 
6130Sstevel@tonic-gate 
6140Sstevel@tonic-gate /*
6150Sstevel@tonic-gate  * utobject - internal object create/delete/cache routines
6160Sstevel@tonic-gate  */
6170Sstevel@tonic-gate ACPI_OPERAND_OBJECT  *
6180Sstevel@tonic-gate AcpiUtCreateInternalObjectDbg (
6190Sstevel@tonic-gate     char                    *ModuleName,
6200Sstevel@tonic-gate     UINT32                  LineNumber,
6210Sstevel@tonic-gate     UINT32                  ComponentId,
6220Sstevel@tonic-gate     ACPI_OBJECT_TYPE        Type);
6230Sstevel@tonic-gate 
6240Sstevel@tonic-gate void *
6250Sstevel@tonic-gate AcpiUtAllocateObjectDescDbg (
6260Sstevel@tonic-gate     char                    *ModuleName,
6270Sstevel@tonic-gate     UINT32                  LineNumber,
6280Sstevel@tonic-gate     UINT32                  ComponentId);
6290Sstevel@tonic-gate 
630347Smyers #define AcpiUtCreateInternalObject(t)   AcpiUtCreateInternalObjectDbg (_AcpiModuleName,__LINE__,_COMPONENT,t)
631347Smyers #define AcpiUtAllocateObjectDesc()      AcpiUtAllocateObjectDescDbg (_AcpiModuleName,__LINE__,_COMPONENT)
6320Sstevel@tonic-gate 
6330Sstevel@tonic-gate void
6340Sstevel@tonic-gate AcpiUtDeleteObjectDesc (
6350Sstevel@tonic-gate     ACPI_OPERAND_OBJECT     *Object);
6360Sstevel@tonic-gate 
6370Sstevel@tonic-gate BOOLEAN
6380Sstevel@tonic-gate AcpiUtValidInternalObject (
6390Sstevel@tonic-gate     void                    *Object);
6400Sstevel@tonic-gate 
6410Sstevel@tonic-gate ACPI_OPERAND_OBJECT *
6420Sstevel@tonic-gate AcpiUtCreateBufferObject (
6430Sstevel@tonic-gate     ACPI_SIZE               BufferSize);
6440Sstevel@tonic-gate 
6450Sstevel@tonic-gate ACPI_OPERAND_OBJECT *
6460Sstevel@tonic-gate AcpiUtCreateStringObject (
6470Sstevel@tonic-gate     ACPI_SIZE               StringSize);
6480Sstevel@tonic-gate 
6490Sstevel@tonic-gate ACPI_STATUS
6500Sstevel@tonic-gate AcpiUtGetObjectSize(
6510Sstevel@tonic-gate     ACPI_OPERAND_OBJECT     *Obj,
6520Sstevel@tonic-gate     ACPI_SIZE               *ObjLength);
6530Sstevel@tonic-gate 
6540Sstevel@tonic-gate 
6550Sstevel@tonic-gate /*
6560Sstevel@tonic-gate  * utstate - Generic state creation/cache routines
6570Sstevel@tonic-gate  */
6580Sstevel@tonic-gate void
6590Sstevel@tonic-gate AcpiUtPushGenericState (
6600Sstevel@tonic-gate     ACPI_GENERIC_STATE      **ListHead,
6610Sstevel@tonic-gate     ACPI_GENERIC_STATE      *State);
6620Sstevel@tonic-gate 
6630Sstevel@tonic-gate ACPI_GENERIC_STATE *
6640Sstevel@tonic-gate AcpiUtPopGenericState (
6650Sstevel@tonic-gate     ACPI_GENERIC_STATE      **ListHead);
6660Sstevel@tonic-gate 
6670Sstevel@tonic-gate 
6680Sstevel@tonic-gate ACPI_GENERIC_STATE *
6690Sstevel@tonic-gate AcpiUtCreateGenericState (
6700Sstevel@tonic-gate     void);
6710Sstevel@tonic-gate 
6720Sstevel@tonic-gate ACPI_THREAD_STATE *
6730Sstevel@tonic-gate AcpiUtCreateThreadState (
6740Sstevel@tonic-gate     void);
6750Sstevel@tonic-gate 
6760Sstevel@tonic-gate ACPI_GENERIC_STATE *
6770Sstevel@tonic-gate AcpiUtCreateUpdateState (
6780Sstevel@tonic-gate     ACPI_OPERAND_OBJECT     *Object,
6790Sstevel@tonic-gate     UINT16                  Action);
6800Sstevel@tonic-gate 
6810Sstevel@tonic-gate ACPI_GENERIC_STATE *
6820Sstevel@tonic-gate AcpiUtCreatePkgState (
6830Sstevel@tonic-gate     void                    *InternalObject,
6840Sstevel@tonic-gate     void                    *ExternalObject,
6850Sstevel@tonic-gate     UINT16                  Index);
6860Sstevel@tonic-gate 
6870Sstevel@tonic-gate ACPI_STATUS
6880Sstevel@tonic-gate AcpiUtCreateUpdateStateAndPush (
6890Sstevel@tonic-gate     ACPI_OPERAND_OBJECT     *Object,
6900Sstevel@tonic-gate     UINT16                  Action,
6910Sstevel@tonic-gate     ACPI_GENERIC_STATE      **StateList);
6920Sstevel@tonic-gate 
6930Sstevel@tonic-gate ACPI_STATUS
6940Sstevel@tonic-gate AcpiUtCreatePkgStateAndPush (
6950Sstevel@tonic-gate     void                    *InternalObject,
6960Sstevel@tonic-gate     void                    *ExternalObject,
6970Sstevel@tonic-gate     UINT16                  Index,
6980Sstevel@tonic-gate     ACPI_GENERIC_STATE      **StateList);
6990Sstevel@tonic-gate 
7000Sstevel@tonic-gate ACPI_GENERIC_STATE *
7010Sstevel@tonic-gate AcpiUtCreateControlState (
7020Sstevel@tonic-gate     void);
7030Sstevel@tonic-gate 
7040Sstevel@tonic-gate void
7050Sstevel@tonic-gate AcpiUtDeleteGenericState (
7060Sstevel@tonic-gate     ACPI_GENERIC_STATE      *State);
7070Sstevel@tonic-gate 
7080Sstevel@tonic-gate 
7090Sstevel@tonic-gate /*
7100Sstevel@tonic-gate  * utmath
7110Sstevel@tonic-gate  */
7120Sstevel@tonic-gate ACPI_STATUS
7130Sstevel@tonic-gate AcpiUtDivide (
7140Sstevel@tonic-gate     ACPI_INTEGER            InDividend,
7150Sstevel@tonic-gate     ACPI_INTEGER            InDivisor,
7160Sstevel@tonic-gate     ACPI_INTEGER            *OutQuotient,
7170Sstevel@tonic-gate     ACPI_INTEGER            *OutRemainder);
7180Sstevel@tonic-gate 
7190Sstevel@tonic-gate ACPI_STATUS
7200Sstevel@tonic-gate AcpiUtShortDivide (
7210Sstevel@tonic-gate     ACPI_INTEGER            InDividend,
7220Sstevel@tonic-gate     UINT32                  Divisor,
7230Sstevel@tonic-gate     ACPI_INTEGER            *OutQuotient,
7240Sstevel@tonic-gate     UINT32                  *OutRemainder);
7250Sstevel@tonic-gate 
7260Sstevel@tonic-gate /*
7270Sstevel@tonic-gate  * utmisc
7280Sstevel@tonic-gate  */
7290Sstevel@tonic-gate ACPI_STATUS
730347Smyers AcpiUtAllocateOwnerId (
731347Smyers     ACPI_OWNER_ID           *OwnerId);
732347Smyers 
733941Smyers void
734347Smyers AcpiUtReleaseOwnerId (
735941Smyers     ACPI_OWNER_ID           *OwnerId);
736347Smyers 
737347Smyers ACPI_STATUS
7380Sstevel@tonic-gate AcpiUtWalkPackageTree (
7390Sstevel@tonic-gate     ACPI_OPERAND_OBJECT     *SourceObject,
7400Sstevel@tonic-gate     void                    *TargetObject,
7410Sstevel@tonic-gate     ACPI_PKG_CALLBACK       WalkCallback,
7420Sstevel@tonic-gate     void                    *Context);
7430Sstevel@tonic-gate 
744941Smyers void
7450Sstevel@tonic-gate AcpiUtStrupr (
7460Sstevel@tonic-gate     char                    *SrcString);
7470Sstevel@tonic-gate 
7480Sstevel@tonic-gate void
7490Sstevel@tonic-gate AcpiUtPrintString (
7500Sstevel@tonic-gate     char                    *String,
7510Sstevel@tonic-gate     UINT8                   MaxLength);
7520Sstevel@tonic-gate 
7530Sstevel@tonic-gate BOOLEAN
7540Sstevel@tonic-gate AcpiUtValidAcpiName (
7550Sstevel@tonic-gate     UINT32                  Name);
7560Sstevel@tonic-gate 
7570Sstevel@tonic-gate BOOLEAN
7580Sstevel@tonic-gate AcpiUtValidAcpiCharacter (
7590Sstevel@tonic-gate     char                    Character);
7600Sstevel@tonic-gate 
7610Sstevel@tonic-gate ACPI_STATUS
7620Sstevel@tonic-gate AcpiUtStrtoul64 (
7630Sstevel@tonic-gate     char                    *String,
7640Sstevel@tonic-gate     UINT32                  Base,
7650Sstevel@tonic-gate     ACPI_INTEGER            *RetInteger);
7660Sstevel@tonic-gate 
7670Sstevel@tonic-gate /* Values for Base above (16=Hex, 10=Decimal) */
7680Sstevel@tonic-gate 
7690Sstevel@tonic-gate #define ACPI_ANY_BASE        0
7700Sstevel@tonic-gate 
771*1560Smyers ACPI_STATUS
772*1560Smyers AcpiUtValidateResource (
773*1560Smyers     void                    *Aml,
774*1560Smyers     UINT8                   *ReturnIndex);
775*1560Smyers 
776*1560Smyers UINT32
777*1560Smyers AcpiUtGetDescriptorLength (
778*1560Smyers     void                    *Aml);
779*1560Smyers 
780*1560Smyers UINT16
781*1560Smyers AcpiUtGetResourceLength (
782*1560Smyers     void                    *Aml);
7830Sstevel@tonic-gate 
7840Sstevel@tonic-gate UINT8
785*1560Smyers AcpiUtGetResourceHeaderLength (
786*1560Smyers     void                    *Aml);
787*1560Smyers 
788*1560Smyers UINT8
789*1560Smyers AcpiUtGetResourceType (
790*1560Smyers     void                    *Aml);
791*1560Smyers 
792*1560Smyers ACPI_STATUS
793*1560Smyers AcpiUtGetResourceEndTag (
794*1560Smyers     ACPI_OPERAND_OBJECT     *ObjDesc,
795*1560Smyers     UINT8                   **EndTag);
7960Sstevel@tonic-gate 
7970Sstevel@tonic-gate UINT32
7980Sstevel@tonic-gate AcpiUtDwordByteSwap (
7990Sstevel@tonic-gate     UINT32                  Value);
8000Sstevel@tonic-gate 
8010Sstevel@tonic-gate void
8020Sstevel@tonic-gate AcpiUtSetIntegerWidth (
8030Sstevel@tonic-gate     UINT8                   Revision);
8040Sstevel@tonic-gate 
8050Sstevel@tonic-gate #ifdef ACPI_DEBUG_OUTPUT
8060Sstevel@tonic-gate void
8070Sstevel@tonic-gate AcpiUtDisplayInitPathname (
8080Sstevel@tonic-gate     UINT8                   Type,
8090Sstevel@tonic-gate     ACPI_NAMESPACE_NODE     *ObjHandle,
8100Sstevel@tonic-gate     char                    *Path);
8110Sstevel@tonic-gate 
8120Sstevel@tonic-gate #endif
8130Sstevel@tonic-gate 
8140Sstevel@tonic-gate 
8150Sstevel@tonic-gate /*
816347Smyers  * utmutex - mutex support
8170Sstevel@tonic-gate  */
818347Smyers ACPI_STATUS
819347Smyers AcpiUtMutexInitialize (
820347Smyers     void);
8210Sstevel@tonic-gate 
8220Sstevel@tonic-gate void
823347Smyers AcpiUtMutexTerminate (
824347Smyers     void);
825347Smyers 
826347Smyers ACPI_STATUS
827347Smyers AcpiUtAcquireMutex (
828347Smyers     ACPI_MUTEX_HANDLE       MutexId);
829347Smyers 
830347Smyers ACPI_STATUS
831347Smyers AcpiUtReleaseMutex (
832347Smyers     ACPI_MUTEX_HANDLE       MutexId);
833347Smyers 
8340Sstevel@tonic-gate 
835347Smyers /*
836347Smyers  * utalloc - memory allocation and object caching
837347Smyers  */
838347Smyers ACPI_STATUS
839347Smyers AcpiUtCreateCaches (
840347Smyers     void);
841347Smyers 
842347Smyers ACPI_STATUS
843347Smyers AcpiUtDeleteCaches (
844347Smyers     void);
8450Sstevel@tonic-gate 
8460Sstevel@tonic-gate ACPI_STATUS
8470Sstevel@tonic-gate AcpiUtValidateBuffer (
8480Sstevel@tonic-gate     ACPI_BUFFER             *Buffer);
8490Sstevel@tonic-gate 
8500Sstevel@tonic-gate ACPI_STATUS
8510Sstevel@tonic-gate AcpiUtInitializeBuffer (
8520Sstevel@tonic-gate     ACPI_BUFFER             *Buffer,
8530Sstevel@tonic-gate     ACPI_SIZE               RequiredLength);
8540Sstevel@tonic-gate 
8550Sstevel@tonic-gate void *
8560Sstevel@tonic-gate AcpiUtAllocate (
8570Sstevel@tonic-gate     ACPI_SIZE               Size,
8580Sstevel@tonic-gate     UINT32                  Component,
8590Sstevel@tonic-gate     char                    *Module,
8600Sstevel@tonic-gate     UINT32                  Line);
8610Sstevel@tonic-gate 
8620Sstevel@tonic-gate void *
8630Sstevel@tonic-gate AcpiUtCallocate (
8640Sstevel@tonic-gate     ACPI_SIZE               Size,
8650Sstevel@tonic-gate     UINT32                  Component,
8660Sstevel@tonic-gate     char                    *Module,
8670Sstevel@tonic-gate     UINT32                  Line);
8680Sstevel@tonic-gate 
8690Sstevel@tonic-gate #ifdef ACPI_DBG_TRACK_ALLOCATIONS
8700Sstevel@tonic-gate void *
8710Sstevel@tonic-gate AcpiUtAllocateAndTrack (
8720Sstevel@tonic-gate     ACPI_SIZE               Size,
8730Sstevel@tonic-gate     UINT32                  Component,
8740Sstevel@tonic-gate     char                    *Module,
8750Sstevel@tonic-gate     UINT32                  Line);
8760Sstevel@tonic-gate 
8770Sstevel@tonic-gate void *
8780Sstevel@tonic-gate AcpiUtCallocateAndTrack (
8790Sstevel@tonic-gate     ACPI_SIZE               Size,
8800Sstevel@tonic-gate     UINT32                  Component,
8810Sstevel@tonic-gate     char                    *Module,
8820Sstevel@tonic-gate     UINT32                  Line);
8830Sstevel@tonic-gate 
8840Sstevel@tonic-gate void
8850Sstevel@tonic-gate AcpiUtFreeAndTrack (
8860Sstevel@tonic-gate     void                    *Address,
8870Sstevel@tonic-gate     UINT32                  Component,
8880Sstevel@tonic-gate     char                    *Module,
8890Sstevel@tonic-gate     UINT32                  Line);
8900Sstevel@tonic-gate 
8910Sstevel@tonic-gate void
8920Sstevel@tonic-gate AcpiUtDumpAllocationInfo (
8930Sstevel@tonic-gate     void);
8940Sstevel@tonic-gate 
8950Sstevel@tonic-gate void
8960Sstevel@tonic-gate AcpiUtDumpAllocations (
8970Sstevel@tonic-gate     UINT32                  Component,
8980Sstevel@tonic-gate     char                    *Module);
8990Sstevel@tonic-gate #endif
9000Sstevel@tonic-gate 
9010Sstevel@tonic-gate #endif /* _ACUTILS_H */
902