10Sstevel@tonic-gate /****************************************************************************** 20Sstevel@tonic-gate * 30Sstevel@tonic-gate * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures 4*7851SDana.Myers@Sun.COM * $Revision: 1.204 $ 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*7851SDana.Myers@Sun.COM * Some or all of this work - Copyright (c) 1999 - 2008, 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 1211560Smyers extern const UINT8 AcpiGbl_ResourceAmlSizes[]; 1221560Smyers 1231560Smyers /* Strings used by the disassembler and debugger resource dump routines */ 1241560Smyers 1251560Smyers #if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER) 1261560Smyers 1272623Smyers extern const char *AcpiGbl_BmDecode[]; 1282623Smyers extern const char *AcpiGbl_ConfigDecode[]; 1292623Smyers extern const char *AcpiGbl_ConsumeDecode[]; 1302623Smyers extern const char *AcpiGbl_DecDecode[]; 1312623Smyers extern const char *AcpiGbl_HeDecode[]; 1322623Smyers extern const char *AcpiGbl_IoDecode[]; 1332623Smyers extern const char *AcpiGbl_LlDecode[]; 1342623Smyers extern const char *AcpiGbl_MaxDecode[]; 1352623Smyers extern const char *AcpiGbl_MemDecode[]; 1362623Smyers extern const char *AcpiGbl_MinDecode[]; 1372623Smyers extern const char *AcpiGbl_MtpDecode[]; 1382623Smyers extern const char *AcpiGbl_RngDecode[]; 1392623Smyers extern const char *AcpiGbl_RwDecode[]; 1402623Smyers extern const char *AcpiGbl_ShrDecode[]; 1412623Smyers extern const char *AcpiGbl_SizDecode[]; 1422623Smyers extern const char *AcpiGbl_TrsDecode[]; 1432623Smyers extern const char *AcpiGbl_TtpDecode[]; 1442623Smyers extern const char *AcpiGbl_TypDecode[]; 1451560Smyers #endif 1461560Smyers 1471560Smyers /* Types for Resource descriptor entries */ 1481560Smyers 1491560Smyers #define ACPI_INVALID_RESOURCE 0 1501560Smyers #define ACPI_FIXED_LENGTH 1 1511560Smyers #define ACPI_VARIABLE_LENGTH 2 1521560Smyers #define ACPI_SMALL_VARIABLE_LENGTH 3 1531560Smyers 1540Sstevel@tonic-gate typedef 1552623Smyers ACPI_STATUS (*ACPI_WALK_AML_CALLBACK) ( 1562623Smyers UINT8 *Aml, 1572623Smyers UINT32 Length, 1582623Smyers UINT32 Offset, 1592623Smyers UINT8 ResourceIndex, 1602623Smyers void *Context); 1612623Smyers 1622623Smyers typedef 1630Sstevel@tonic-gate ACPI_STATUS (*ACPI_PKG_CALLBACK) ( 1640Sstevel@tonic-gate UINT8 ObjectType, 1650Sstevel@tonic-gate ACPI_OPERAND_OBJECT *SourceObject, 1660Sstevel@tonic-gate ACPI_GENERIC_STATE *State, 1670Sstevel@tonic-gate void *Context); 1680Sstevel@tonic-gate 1690Sstevel@tonic-gate typedef struct acpi_pkg_info 1700Sstevel@tonic-gate { 1710Sstevel@tonic-gate UINT8 *FreeSpace; 1720Sstevel@tonic-gate ACPI_SIZE Length; 1730Sstevel@tonic-gate UINT32 ObjectSpace; 1740Sstevel@tonic-gate UINT32 NumPackages; 1750Sstevel@tonic-gate 1760Sstevel@tonic-gate } ACPI_PKG_INFO; 1770Sstevel@tonic-gate 1780Sstevel@tonic-gate #define REF_INCREMENT (UINT16) 0 1790Sstevel@tonic-gate #define REF_DECREMENT (UINT16) 1 1800Sstevel@tonic-gate #define REF_FORCE_DELETE (UINT16) 2 1810Sstevel@tonic-gate 1820Sstevel@tonic-gate /* AcpiUtDumpBuffer */ 1830Sstevel@tonic-gate 1840Sstevel@tonic-gate #define DB_BYTE_DISPLAY 1 1850Sstevel@tonic-gate #define DB_WORD_DISPLAY 2 1860Sstevel@tonic-gate #define DB_DWORD_DISPLAY 4 1870Sstevel@tonic-gate #define DB_QWORD_DISPLAY 8 1880Sstevel@tonic-gate 1890Sstevel@tonic-gate 1900Sstevel@tonic-gate /* 1910Sstevel@tonic-gate * utglobal - Global data structures and procedures 1920Sstevel@tonic-gate */ 193*7851SDana.Myers@Sun.COM ACPI_STATUS 1940Sstevel@tonic-gate AcpiUtInitGlobals ( 1950Sstevel@tonic-gate void); 1960Sstevel@tonic-gate 1970Sstevel@tonic-gate #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 1980Sstevel@tonic-gate 1990Sstevel@tonic-gate char * 2000Sstevel@tonic-gate AcpiUtGetMutexName ( 2010Sstevel@tonic-gate UINT32 MutexId); 2020Sstevel@tonic-gate 203*7851SDana.Myers@Sun.COM const char * 204*7851SDana.Myers@Sun.COM AcpiUtGetNotifyName ( 205*7851SDana.Myers@Sun.COM UINT32 NotifyValue); 206*7851SDana.Myers@Sun.COM 2070Sstevel@tonic-gate #endif 2080Sstevel@tonic-gate 2090Sstevel@tonic-gate char * 2100Sstevel@tonic-gate AcpiUtGetTypeName ( 2110Sstevel@tonic-gate ACPI_OBJECT_TYPE Type); 2120Sstevel@tonic-gate 2130Sstevel@tonic-gate char * 2140Sstevel@tonic-gate AcpiUtGetNodeName ( 2150Sstevel@tonic-gate void *Object); 2160Sstevel@tonic-gate 2170Sstevel@tonic-gate char * 2180Sstevel@tonic-gate AcpiUtGetDescriptorName ( 2190Sstevel@tonic-gate void *Object); 2200Sstevel@tonic-gate 221*7851SDana.Myers@Sun.COM const char * 222*7851SDana.Myers@Sun.COM AcpiUtGetReferenceName ( 223*7851SDana.Myers@Sun.COM ACPI_OPERAND_OBJECT *Object); 224*7851SDana.Myers@Sun.COM 2250Sstevel@tonic-gate char * 2260Sstevel@tonic-gate AcpiUtGetObjectTypeName ( 2270Sstevel@tonic-gate ACPI_OPERAND_OBJECT *ObjDesc); 2280Sstevel@tonic-gate 2290Sstevel@tonic-gate char * 2300Sstevel@tonic-gate AcpiUtGetRegionName ( 2310Sstevel@tonic-gate UINT8 SpaceId); 2320Sstevel@tonic-gate 2330Sstevel@tonic-gate char * 2340Sstevel@tonic-gate AcpiUtGetEventName ( 2350Sstevel@tonic-gate UINT32 EventId); 2360Sstevel@tonic-gate 2370Sstevel@tonic-gate char 2380Sstevel@tonic-gate AcpiUtHexToAsciiChar ( 2390Sstevel@tonic-gate ACPI_INTEGER Integer, 2400Sstevel@tonic-gate UINT32 Position); 2410Sstevel@tonic-gate 2420Sstevel@tonic-gate BOOLEAN 2430Sstevel@tonic-gate AcpiUtValidObjectType ( 2440Sstevel@tonic-gate ACPI_OBJECT_TYPE Type); 2450Sstevel@tonic-gate 2460Sstevel@tonic-gate 2470Sstevel@tonic-gate /* 2480Sstevel@tonic-gate * utinit - miscellaneous initialization and shutdown 2490Sstevel@tonic-gate */ 2500Sstevel@tonic-gate ACPI_STATUS 2510Sstevel@tonic-gate AcpiUtHardwareInitialize ( 2520Sstevel@tonic-gate void); 2530Sstevel@tonic-gate 2540Sstevel@tonic-gate void 2550Sstevel@tonic-gate AcpiUtSubsystemShutdown ( 2560Sstevel@tonic-gate void); 2570Sstevel@tonic-gate 2580Sstevel@tonic-gate 2590Sstevel@tonic-gate /* 2600Sstevel@tonic-gate * utclib - Local implementations of C library functions 2610Sstevel@tonic-gate */ 2620Sstevel@tonic-gate #ifndef ACPI_USE_SYSTEM_CLIBRARY 2630Sstevel@tonic-gate 2640Sstevel@tonic-gate ACPI_SIZE 2650Sstevel@tonic-gate AcpiUtStrlen ( 2660Sstevel@tonic-gate const char *String); 2670Sstevel@tonic-gate 2680Sstevel@tonic-gate char * 2690Sstevel@tonic-gate AcpiUtStrcpy ( 2700Sstevel@tonic-gate char *DstString, 2710Sstevel@tonic-gate const char *SrcString); 2720Sstevel@tonic-gate 2730Sstevel@tonic-gate char * 2740Sstevel@tonic-gate AcpiUtStrncpy ( 2750Sstevel@tonic-gate char *DstString, 2760Sstevel@tonic-gate const char *SrcString, 2770Sstevel@tonic-gate ACPI_SIZE Count); 2780Sstevel@tonic-gate 2790Sstevel@tonic-gate int 2800Sstevel@tonic-gate AcpiUtMemcmp ( 2810Sstevel@tonic-gate const char *Buffer1, 2820Sstevel@tonic-gate const char *Buffer2, 2830Sstevel@tonic-gate ACPI_SIZE Count); 2840Sstevel@tonic-gate 2850Sstevel@tonic-gate int 2860Sstevel@tonic-gate AcpiUtStrncmp ( 2870Sstevel@tonic-gate const char *String1, 2880Sstevel@tonic-gate const char *String2, 2890Sstevel@tonic-gate ACPI_SIZE Count); 2900Sstevel@tonic-gate 2910Sstevel@tonic-gate int 2920Sstevel@tonic-gate AcpiUtStrcmp ( 2930Sstevel@tonic-gate const char *String1, 2940Sstevel@tonic-gate const char *String2); 2950Sstevel@tonic-gate 2960Sstevel@tonic-gate char * 2970Sstevel@tonic-gate AcpiUtStrcat ( 2980Sstevel@tonic-gate char *DstString, 2990Sstevel@tonic-gate const char *SrcString); 3000Sstevel@tonic-gate 3010Sstevel@tonic-gate char * 3020Sstevel@tonic-gate AcpiUtStrncat ( 3030Sstevel@tonic-gate char *DstString, 3040Sstevel@tonic-gate const char *SrcString, 3050Sstevel@tonic-gate ACPI_SIZE Count); 3060Sstevel@tonic-gate 3070Sstevel@tonic-gate UINT32 3080Sstevel@tonic-gate AcpiUtStrtoul ( 3090Sstevel@tonic-gate const char *String, 3100Sstevel@tonic-gate char **Terminator, 3110Sstevel@tonic-gate UINT32 Base); 3120Sstevel@tonic-gate 3130Sstevel@tonic-gate char * 3140Sstevel@tonic-gate AcpiUtStrstr ( 3150Sstevel@tonic-gate char *String1, 3160Sstevel@tonic-gate char *String2); 3170Sstevel@tonic-gate 3180Sstevel@tonic-gate void * 3190Sstevel@tonic-gate AcpiUtMemcpy ( 3200Sstevel@tonic-gate void *Dest, 3210Sstevel@tonic-gate const void *Src, 3220Sstevel@tonic-gate ACPI_SIZE Count); 3230Sstevel@tonic-gate 3240Sstevel@tonic-gate void * 3250Sstevel@tonic-gate AcpiUtMemset ( 3260Sstevel@tonic-gate void *Dest, 327*7851SDana.Myers@Sun.COM UINT8 Value, 3280Sstevel@tonic-gate ACPI_SIZE Count); 3290Sstevel@tonic-gate 3300Sstevel@tonic-gate int 3310Sstevel@tonic-gate AcpiUtToUpper ( 3320Sstevel@tonic-gate int c); 3330Sstevel@tonic-gate 3340Sstevel@tonic-gate int 3350Sstevel@tonic-gate AcpiUtToLower ( 3360Sstevel@tonic-gate int c); 3370Sstevel@tonic-gate 3380Sstevel@tonic-gate extern const UINT8 _acpi_ctype[]; 3390Sstevel@tonic-gate 3400Sstevel@tonic-gate #define _ACPI_XA 0x00 /* extra alphabetic - not supported */ 3410Sstevel@tonic-gate #define _ACPI_XS 0x40 /* extra space */ 3420Sstevel@tonic-gate #define _ACPI_BB 0x00 /* BEL, BS, etc. - not supported */ 3430Sstevel@tonic-gate #define _ACPI_CN 0x20 /* CR, FF, HT, NL, VT */ 3440Sstevel@tonic-gate #define _ACPI_DI 0x04 /* '0'-'9' */ 3450Sstevel@tonic-gate #define _ACPI_LO 0x02 /* 'a'-'z' */ 3460Sstevel@tonic-gate #define _ACPI_PU 0x10 /* punctuation */ 3470Sstevel@tonic-gate #define _ACPI_SP 0x08 /* space */ 3480Sstevel@tonic-gate #define _ACPI_UP 0x01 /* 'A'-'Z' */ 3490Sstevel@tonic-gate #define _ACPI_XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */ 3500Sstevel@tonic-gate 3510Sstevel@tonic-gate #define ACPI_IS_DIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI)) 3520Sstevel@tonic-gate #define ACPI_IS_SPACE(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP)) 3530Sstevel@tonic-gate #define ACPI_IS_XDIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_XD)) 3540Sstevel@tonic-gate #define ACPI_IS_UPPER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_UP)) 3550Sstevel@tonic-gate #define ACPI_IS_LOWER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO)) 3560Sstevel@tonic-gate #define ACPI_IS_PRINT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_SP | _ACPI_PU)) 3570Sstevel@tonic-gate #define ACPI_IS_ALPHA(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP)) 3580Sstevel@tonic-gate 3590Sstevel@tonic-gate #endif /* ACPI_USE_SYSTEM_CLIBRARY */ 3600Sstevel@tonic-gate 3610Sstevel@tonic-gate 3620Sstevel@tonic-gate /* 3630Sstevel@tonic-gate * utcopy - Object construction and conversion interfaces 3640Sstevel@tonic-gate */ 3650Sstevel@tonic-gate ACPI_STATUS 3660Sstevel@tonic-gate AcpiUtBuildSimpleObject( 3670Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Obj, 3680Sstevel@tonic-gate ACPI_OBJECT *UserObj, 3690Sstevel@tonic-gate UINT8 *DataSpace, 3700Sstevel@tonic-gate UINT32 *BufferSpaceUsed); 3710Sstevel@tonic-gate 3720Sstevel@tonic-gate ACPI_STATUS 3730Sstevel@tonic-gate AcpiUtBuildPackageObject ( 3740Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Obj, 3750Sstevel@tonic-gate UINT8 *Buffer, 3760Sstevel@tonic-gate UINT32 *SpaceUsed); 3770Sstevel@tonic-gate 3780Sstevel@tonic-gate ACPI_STATUS 3790Sstevel@tonic-gate AcpiUtCopyIobjectToEobject ( 3800Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Obj, 3810Sstevel@tonic-gate ACPI_BUFFER *RetBuffer); 3820Sstevel@tonic-gate 3830Sstevel@tonic-gate ACPI_STATUS 3840Sstevel@tonic-gate AcpiUtCopyEobjectToIobject ( 3850Sstevel@tonic-gate ACPI_OBJECT *Obj, 3860Sstevel@tonic-gate ACPI_OPERAND_OBJECT **InternalObj); 3870Sstevel@tonic-gate 3880Sstevel@tonic-gate ACPI_STATUS 3890Sstevel@tonic-gate AcpiUtCopyISimpleToIsimple ( 3900Sstevel@tonic-gate ACPI_OPERAND_OBJECT *SourceObj, 3910Sstevel@tonic-gate ACPI_OPERAND_OBJECT *DestObj); 3920Sstevel@tonic-gate 3930Sstevel@tonic-gate ACPI_STATUS 3940Sstevel@tonic-gate AcpiUtCopyIobjectToIobject ( 3950Sstevel@tonic-gate ACPI_OPERAND_OBJECT *SourceDesc, 3960Sstevel@tonic-gate ACPI_OPERAND_OBJECT **DestDesc, 3970Sstevel@tonic-gate ACPI_WALK_STATE *WalkState); 3980Sstevel@tonic-gate 3990Sstevel@tonic-gate 4000Sstevel@tonic-gate /* 4010Sstevel@tonic-gate * utcreate - Object creation 4020Sstevel@tonic-gate */ 4030Sstevel@tonic-gate ACPI_STATUS 4040Sstevel@tonic-gate AcpiUtUpdateObjectReference ( 4050Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object, 4060Sstevel@tonic-gate UINT16 Action); 4070Sstevel@tonic-gate 4080Sstevel@tonic-gate 4090Sstevel@tonic-gate /* 4100Sstevel@tonic-gate * utdebug - Debug interfaces 4110Sstevel@tonic-gate */ 4120Sstevel@tonic-gate void 4130Sstevel@tonic-gate AcpiUtInitStackPtrTrace ( 4140Sstevel@tonic-gate void); 4150Sstevel@tonic-gate 4160Sstevel@tonic-gate void 4170Sstevel@tonic-gate AcpiUtTrackStackPtr ( 4180Sstevel@tonic-gate void); 4190Sstevel@tonic-gate 4200Sstevel@tonic-gate void 4210Sstevel@tonic-gate AcpiUtTrace ( 4220Sstevel@tonic-gate UINT32 LineNumber, 423941Smyers const char *FunctionName, 424*7851SDana.Myers@Sun.COM const char *ModuleName, 425347Smyers UINT32 ComponentId); 4260Sstevel@tonic-gate 4270Sstevel@tonic-gate void 4280Sstevel@tonic-gate AcpiUtTracePtr ( 4290Sstevel@tonic-gate UINT32 LineNumber, 430941Smyers const char *FunctionName, 431*7851SDana.Myers@Sun.COM const char *ModuleName, 432347Smyers UINT32 ComponentId, 4330Sstevel@tonic-gate void *Pointer); 4340Sstevel@tonic-gate 4350Sstevel@tonic-gate void 4360Sstevel@tonic-gate AcpiUtTraceU32 ( 4370Sstevel@tonic-gate UINT32 LineNumber, 438941Smyers const char *FunctionName, 439*7851SDana.Myers@Sun.COM const char *ModuleName, 440347Smyers UINT32 ComponentId, 4410Sstevel@tonic-gate UINT32 Integer); 4420Sstevel@tonic-gate 4430Sstevel@tonic-gate void 4440Sstevel@tonic-gate AcpiUtTraceStr ( 4450Sstevel@tonic-gate UINT32 LineNumber, 446941Smyers const char *FunctionName, 447*7851SDana.Myers@Sun.COM const char *ModuleName, 448347Smyers UINT32 ComponentId, 4490Sstevel@tonic-gate char *String); 4500Sstevel@tonic-gate 4510Sstevel@tonic-gate void 4520Sstevel@tonic-gate AcpiUtExit ( 4530Sstevel@tonic-gate UINT32 LineNumber, 454941Smyers const char *FunctionName, 455*7851SDana.Myers@Sun.COM const char *ModuleName, 456347Smyers UINT32 ComponentId); 4570Sstevel@tonic-gate 4580Sstevel@tonic-gate void 4590Sstevel@tonic-gate AcpiUtStatusExit ( 4600Sstevel@tonic-gate UINT32 LineNumber, 461941Smyers const char *FunctionName, 462*7851SDana.Myers@Sun.COM const char *ModuleName, 463347Smyers UINT32 ComponentId, 4640Sstevel@tonic-gate ACPI_STATUS Status); 4650Sstevel@tonic-gate 4660Sstevel@tonic-gate void 4670Sstevel@tonic-gate AcpiUtValueExit ( 4680Sstevel@tonic-gate UINT32 LineNumber, 469941Smyers const char *FunctionName, 470*7851SDana.Myers@Sun.COM const char *ModuleName, 471347Smyers UINT32 ComponentId, 4720Sstevel@tonic-gate ACPI_INTEGER Value); 4730Sstevel@tonic-gate 4740Sstevel@tonic-gate void 4750Sstevel@tonic-gate AcpiUtPtrExit ( 4760Sstevel@tonic-gate UINT32 LineNumber, 477941Smyers const char *FunctionName, 478*7851SDana.Myers@Sun.COM const char *ModuleName, 479347Smyers UINT32 ComponentId, 4800Sstevel@tonic-gate UINT8 *Ptr); 4810Sstevel@tonic-gate 4820Sstevel@tonic-gate void 4830Sstevel@tonic-gate AcpiUtDumpBuffer ( 4840Sstevel@tonic-gate UINT8 *Buffer, 4850Sstevel@tonic-gate UINT32 Count, 4860Sstevel@tonic-gate UINT32 Display, 4870Sstevel@tonic-gate UINT32 componentId); 4880Sstevel@tonic-gate 4891560Smyers void 4902623Smyers AcpiUtDumpBuffer2 ( 4912623Smyers UINT8 *Buffer, 4922623Smyers UINT32 Count, 4932623Smyers UINT32 Display); 4942623Smyers 4952623Smyers void 4961560Smyers AcpiUtReportError ( 4971560Smyers char *ModuleName, 4981560Smyers UINT32 LineNumber); 4991560Smyers 5001560Smyers void 5011560Smyers AcpiUtReportInfo ( 5021560Smyers char *ModuleName, 5031560Smyers UINT32 LineNumber); 5041560Smyers 5051560Smyers void 5061560Smyers AcpiUtReportWarning ( 5071560Smyers char *ModuleName, 5081560Smyers UINT32 LineNumber); 5091560Smyers 5101560Smyers /* Error and message reporting interfaces */ 5111560Smyers 5120Sstevel@tonic-gate void ACPI_INTERNAL_VAR_XFACE 5130Sstevel@tonic-gate AcpiUtDebugPrint ( 5140Sstevel@tonic-gate UINT32 RequestedDebugLevel, 5150Sstevel@tonic-gate UINT32 LineNumber, 516941Smyers const char *FunctionName, 517*7851SDana.Myers@Sun.COM const char *ModuleName, 518347Smyers UINT32 ComponentId, 519*7851SDana.Myers@Sun.COM const char *Format, 5201560Smyers ...) ACPI_PRINTF_LIKE(6); 5210Sstevel@tonic-gate 5220Sstevel@tonic-gate void ACPI_INTERNAL_VAR_XFACE 5230Sstevel@tonic-gate AcpiUtDebugPrintRaw ( 5240Sstevel@tonic-gate UINT32 RequestedDebugLevel, 5250Sstevel@tonic-gate UINT32 LineNumber, 526941Smyers const char *FunctionName, 527*7851SDana.Myers@Sun.COM const char *ModuleName, 528347Smyers UINT32 ComponentId, 529*7851SDana.Myers@Sun.COM const char *Format, 5301560Smyers ...) ACPI_PRINTF_LIKE(6); 5311560Smyers 5321560Smyers void ACPI_INTERNAL_VAR_XFACE 5331560Smyers AcpiUtError ( 534*7851SDana.Myers@Sun.COM const char *ModuleName, 5351560Smyers UINT32 LineNumber, 536*7851SDana.Myers@Sun.COM const char *Format, 5371560Smyers ...) ACPI_PRINTF_LIKE(3); 5381560Smyers 5391560Smyers void ACPI_INTERNAL_VAR_XFACE 5401560Smyers AcpiUtException ( 541*7851SDana.Myers@Sun.COM const char *ModuleName, 5421560Smyers UINT32 LineNumber, 5431560Smyers ACPI_STATUS Status, 544*7851SDana.Myers@Sun.COM const char *Format, 5451560Smyers ...) ACPI_PRINTF_LIKE(4); 5461560Smyers 5471560Smyers void ACPI_INTERNAL_VAR_XFACE 5481560Smyers AcpiUtWarning ( 549*7851SDana.Myers@Sun.COM const char *ModuleName, 5501560Smyers UINT32 LineNumber, 551*7851SDana.Myers@Sun.COM const char *Format, 5521560Smyers ...) ACPI_PRINTF_LIKE(3); 5531560Smyers 5541560Smyers void ACPI_INTERNAL_VAR_XFACE 5551560Smyers AcpiUtInfo ( 556*7851SDana.Myers@Sun.COM const char *ModuleName, 5571560Smyers UINT32 LineNumber, 558*7851SDana.Myers@Sun.COM const char *Format, 5591560Smyers ...) ACPI_PRINTF_LIKE(3); 5600Sstevel@tonic-gate 5610Sstevel@tonic-gate 5620Sstevel@tonic-gate /* 5630Sstevel@tonic-gate * utdelete - Object deletion and reference counts 5640Sstevel@tonic-gate */ 5650Sstevel@tonic-gate void 5660Sstevel@tonic-gate AcpiUtAddReference ( 5670Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object); 5680Sstevel@tonic-gate 5690Sstevel@tonic-gate void 5700Sstevel@tonic-gate AcpiUtRemoveReference ( 5710Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object); 5720Sstevel@tonic-gate 5730Sstevel@tonic-gate void 5740Sstevel@tonic-gate AcpiUtDeleteInternalPackageObject ( 5750Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object); 5760Sstevel@tonic-gate 5770Sstevel@tonic-gate void 5780Sstevel@tonic-gate AcpiUtDeleteInternalSimpleObject ( 5790Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object); 5800Sstevel@tonic-gate 5810Sstevel@tonic-gate void 5820Sstevel@tonic-gate AcpiUtDeleteInternalObjectList ( 5830Sstevel@tonic-gate ACPI_OPERAND_OBJECT **ObjList); 5840Sstevel@tonic-gate 5850Sstevel@tonic-gate 5860Sstevel@tonic-gate /* 5870Sstevel@tonic-gate * uteval - object evaluation 5880Sstevel@tonic-gate */ 5890Sstevel@tonic-gate ACPI_STATUS 5900Sstevel@tonic-gate AcpiUtOsiImplementation ( 5910Sstevel@tonic-gate ACPI_WALK_STATE *WalkState); 5920Sstevel@tonic-gate 5930Sstevel@tonic-gate ACPI_STATUS 5940Sstevel@tonic-gate AcpiUtEvaluateObject ( 5950Sstevel@tonic-gate ACPI_NAMESPACE_NODE *PrefixNode, 5960Sstevel@tonic-gate char *Path, 5970Sstevel@tonic-gate UINT32 ExpectedReturnBtypes, 5980Sstevel@tonic-gate ACPI_OPERAND_OBJECT **ReturnDesc); 5990Sstevel@tonic-gate 6000Sstevel@tonic-gate ACPI_STATUS 6010Sstevel@tonic-gate AcpiUtEvaluateNumericObject ( 6020Sstevel@tonic-gate char *ObjectName, 6030Sstevel@tonic-gate ACPI_NAMESPACE_NODE *DeviceNode, 6040Sstevel@tonic-gate ACPI_INTEGER *Address); 6050Sstevel@tonic-gate 6060Sstevel@tonic-gate ACPI_STATUS 6070Sstevel@tonic-gate AcpiUtExecute_HID ( 6080Sstevel@tonic-gate ACPI_NAMESPACE_NODE *DeviceNode, 6090Sstevel@tonic-gate ACPI_DEVICE_ID *Hid); 6100Sstevel@tonic-gate 6110Sstevel@tonic-gate ACPI_STATUS 6120Sstevel@tonic-gate AcpiUtExecute_CID ( 6130Sstevel@tonic-gate ACPI_NAMESPACE_NODE *DeviceNode, 6140Sstevel@tonic-gate ACPI_COMPATIBLE_ID_LIST **ReturnCidList); 6150Sstevel@tonic-gate 6160Sstevel@tonic-gate ACPI_STATUS 6170Sstevel@tonic-gate AcpiUtExecute_STA ( 6180Sstevel@tonic-gate ACPI_NAMESPACE_NODE *DeviceNode, 6190Sstevel@tonic-gate UINT32 *StatusFlags); 6200Sstevel@tonic-gate 6210Sstevel@tonic-gate ACPI_STATUS 6220Sstevel@tonic-gate AcpiUtExecute_UID ( 6230Sstevel@tonic-gate ACPI_NAMESPACE_NODE *DeviceNode, 6240Sstevel@tonic-gate ACPI_DEVICE_ID *Uid); 6250Sstevel@tonic-gate 6260Sstevel@tonic-gate ACPI_STATUS 6270Sstevel@tonic-gate AcpiUtExecute_Sxds ( 6280Sstevel@tonic-gate ACPI_NAMESPACE_NODE *DeviceNode, 6290Sstevel@tonic-gate UINT8 *Highest); 6300Sstevel@tonic-gate 6310Sstevel@tonic-gate 6320Sstevel@tonic-gate /* 6330Sstevel@tonic-gate * utobject - internal object create/delete/cache routines 6340Sstevel@tonic-gate */ 6350Sstevel@tonic-gate ACPI_OPERAND_OBJECT * 6360Sstevel@tonic-gate AcpiUtCreateInternalObjectDbg ( 637*7851SDana.Myers@Sun.COM const char *ModuleName, 6380Sstevel@tonic-gate UINT32 LineNumber, 6390Sstevel@tonic-gate UINT32 ComponentId, 6400Sstevel@tonic-gate ACPI_OBJECT_TYPE Type); 6410Sstevel@tonic-gate 6420Sstevel@tonic-gate void * 6430Sstevel@tonic-gate AcpiUtAllocateObjectDescDbg ( 644*7851SDana.Myers@Sun.COM const char *ModuleName, 6450Sstevel@tonic-gate UINT32 LineNumber, 6460Sstevel@tonic-gate UINT32 ComponentId); 6470Sstevel@tonic-gate 648347Smyers #define AcpiUtCreateInternalObject(t) AcpiUtCreateInternalObjectDbg (_AcpiModuleName,__LINE__,_COMPONENT,t) 649347Smyers #define AcpiUtAllocateObjectDesc() AcpiUtAllocateObjectDescDbg (_AcpiModuleName,__LINE__,_COMPONENT) 6500Sstevel@tonic-gate 6510Sstevel@tonic-gate void 6520Sstevel@tonic-gate AcpiUtDeleteObjectDesc ( 6530Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object); 6540Sstevel@tonic-gate 6550Sstevel@tonic-gate BOOLEAN 6560Sstevel@tonic-gate AcpiUtValidInternalObject ( 6570Sstevel@tonic-gate void *Object); 6580Sstevel@tonic-gate 6590Sstevel@tonic-gate ACPI_OPERAND_OBJECT * 660*7851SDana.Myers@Sun.COM AcpiUtCreatePackageObject ( 661*7851SDana.Myers@Sun.COM UINT32 Count); 662*7851SDana.Myers@Sun.COM 663*7851SDana.Myers@Sun.COM ACPI_OPERAND_OBJECT * 6640Sstevel@tonic-gate AcpiUtCreateBufferObject ( 6650Sstevel@tonic-gate ACPI_SIZE BufferSize); 6660Sstevel@tonic-gate 6670Sstevel@tonic-gate ACPI_OPERAND_OBJECT * 6680Sstevel@tonic-gate AcpiUtCreateStringObject ( 6690Sstevel@tonic-gate ACPI_SIZE StringSize); 6700Sstevel@tonic-gate 6710Sstevel@tonic-gate ACPI_STATUS 6720Sstevel@tonic-gate AcpiUtGetObjectSize( 6730Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Obj, 6740Sstevel@tonic-gate ACPI_SIZE *ObjLength); 6750Sstevel@tonic-gate 6760Sstevel@tonic-gate 6770Sstevel@tonic-gate /* 6780Sstevel@tonic-gate * utstate - Generic state creation/cache routines 6790Sstevel@tonic-gate */ 6800Sstevel@tonic-gate void 6810Sstevel@tonic-gate AcpiUtPushGenericState ( 6820Sstevel@tonic-gate ACPI_GENERIC_STATE **ListHead, 6830Sstevel@tonic-gate ACPI_GENERIC_STATE *State); 6840Sstevel@tonic-gate 6850Sstevel@tonic-gate ACPI_GENERIC_STATE * 6860Sstevel@tonic-gate AcpiUtPopGenericState ( 6870Sstevel@tonic-gate ACPI_GENERIC_STATE **ListHead); 6880Sstevel@tonic-gate 6890Sstevel@tonic-gate 6900Sstevel@tonic-gate ACPI_GENERIC_STATE * 6910Sstevel@tonic-gate AcpiUtCreateGenericState ( 6920Sstevel@tonic-gate void); 6930Sstevel@tonic-gate 6940Sstevel@tonic-gate ACPI_THREAD_STATE * 6950Sstevel@tonic-gate AcpiUtCreateThreadState ( 6960Sstevel@tonic-gate void); 6970Sstevel@tonic-gate 6980Sstevel@tonic-gate ACPI_GENERIC_STATE * 6990Sstevel@tonic-gate AcpiUtCreateUpdateState ( 7000Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object, 7010Sstevel@tonic-gate UINT16 Action); 7020Sstevel@tonic-gate 7030Sstevel@tonic-gate ACPI_GENERIC_STATE * 7040Sstevel@tonic-gate AcpiUtCreatePkgState ( 7050Sstevel@tonic-gate void *InternalObject, 7060Sstevel@tonic-gate void *ExternalObject, 7070Sstevel@tonic-gate UINT16 Index); 7080Sstevel@tonic-gate 7090Sstevel@tonic-gate ACPI_STATUS 7100Sstevel@tonic-gate AcpiUtCreateUpdateStateAndPush ( 7110Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object, 7120Sstevel@tonic-gate UINT16 Action, 7130Sstevel@tonic-gate ACPI_GENERIC_STATE **StateList); 7140Sstevel@tonic-gate 7150Sstevel@tonic-gate ACPI_STATUS 7160Sstevel@tonic-gate AcpiUtCreatePkgStateAndPush ( 7170Sstevel@tonic-gate void *InternalObject, 7180Sstevel@tonic-gate void *ExternalObject, 7190Sstevel@tonic-gate UINT16 Index, 7200Sstevel@tonic-gate ACPI_GENERIC_STATE **StateList); 7210Sstevel@tonic-gate 7220Sstevel@tonic-gate ACPI_GENERIC_STATE * 7230Sstevel@tonic-gate AcpiUtCreateControlState ( 7240Sstevel@tonic-gate void); 7250Sstevel@tonic-gate 7260Sstevel@tonic-gate void 7270Sstevel@tonic-gate AcpiUtDeleteGenericState ( 7280Sstevel@tonic-gate ACPI_GENERIC_STATE *State); 7290Sstevel@tonic-gate 7300Sstevel@tonic-gate 7310Sstevel@tonic-gate /* 7320Sstevel@tonic-gate * utmath 7330Sstevel@tonic-gate */ 7340Sstevel@tonic-gate ACPI_STATUS 7350Sstevel@tonic-gate AcpiUtDivide ( 7360Sstevel@tonic-gate ACPI_INTEGER InDividend, 7370Sstevel@tonic-gate ACPI_INTEGER InDivisor, 7380Sstevel@tonic-gate ACPI_INTEGER *OutQuotient, 7390Sstevel@tonic-gate ACPI_INTEGER *OutRemainder); 7400Sstevel@tonic-gate 7410Sstevel@tonic-gate ACPI_STATUS 7420Sstevel@tonic-gate AcpiUtShortDivide ( 7430Sstevel@tonic-gate ACPI_INTEGER InDividend, 7440Sstevel@tonic-gate UINT32 Divisor, 7450Sstevel@tonic-gate ACPI_INTEGER *OutQuotient, 7460Sstevel@tonic-gate UINT32 *OutRemainder); 7470Sstevel@tonic-gate 7480Sstevel@tonic-gate /* 7490Sstevel@tonic-gate * utmisc 7500Sstevel@tonic-gate */ 751*7851SDana.Myers@Sun.COM const char * 752*7851SDana.Myers@Sun.COM AcpiUtValidateException ( 753*7851SDana.Myers@Sun.COM ACPI_STATUS Status); 754*7851SDana.Myers@Sun.COM 7552623Smyers BOOLEAN 7562623Smyers AcpiUtIsAmlTable ( 7572623Smyers ACPI_TABLE_HEADER *Table); 7582623Smyers 7590Sstevel@tonic-gate ACPI_STATUS 760347Smyers AcpiUtAllocateOwnerId ( 761347Smyers ACPI_OWNER_ID *OwnerId); 762347Smyers 763941Smyers void 764347Smyers AcpiUtReleaseOwnerId ( 765941Smyers ACPI_OWNER_ID *OwnerId); 766347Smyers 767347Smyers ACPI_STATUS 7680Sstevel@tonic-gate AcpiUtWalkPackageTree ( 7690Sstevel@tonic-gate ACPI_OPERAND_OBJECT *SourceObject, 7700Sstevel@tonic-gate void *TargetObject, 7710Sstevel@tonic-gate ACPI_PKG_CALLBACK WalkCallback, 7720Sstevel@tonic-gate void *Context); 7730Sstevel@tonic-gate 774941Smyers void 7750Sstevel@tonic-gate AcpiUtStrupr ( 7760Sstevel@tonic-gate char *SrcString); 7770Sstevel@tonic-gate 7780Sstevel@tonic-gate void 7790Sstevel@tonic-gate AcpiUtPrintString ( 7800Sstevel@tonic-gate char *String, 7810Sstevel@tonic-gate UINT8 MaxLength); 7820Sstevel@tonic-gate 7830Sstevel@tonic-gate BOOLEAN 7840Sstevel@tonic-gate AcpiUtValidAcpiName ( 7850Sstevel@tonic-gate UINT32 Name); 7860Sstevel@tonic-gate 787*7851SDana.Myers@Sun.COM void 7882623Smyers AcpiUtRepairName ( 789*7851SDana.Myers@Sun.COM char *Name); 7902623Smyers 7910Sstevel@tonic-gate BOOLEAN 7922623Smyers AcpiUtValidAcpiChar ( 7932623Smyers char Character, 794*7851SDana.Myers@Sun.COM UINT32 Position); 7950Sstevel@tonic-gate 7960Sstevel@tonic-gate ACPI_STATUS 7970Sstevel@tonic-gate AcpiUtStrtoul64 ( 7980Sstevel@tonic-gate char *String, 7990Sstevel@tonic-gate UINT32 Base, 8000Sstevel@tonic-gate ACPI_INTEGER *RetInteger); 8010Sstevel@tonic-gate 8020Sstevel@tonic-gate /* Values for Base above (16=Hex, 10=Decimal) */ 8030Sstevel@tonic-gate 8040Sstevel@tonic-gate #define ACPI_ANY_BASE 0 8050Sstevel@tonic-gate 8062623Smyers UINT32 8072623Smyers AcpiUtDwordByteSwap ( 8082623Smyers UINT32 Value); 8092623Smyers 8102623Smyers void 8112623Smyers AcpiUtSetIntegerWidth ( 8122623Smyers UINT8 Revision); 8132623Smyers 8142623Smyers #ifdef ACPI_DEBUG_OUTPUT 8152623Smyers void 8162623Smyers AcpiUtDisplayInitPathname ( 8172623Smyers UINT8 Type, 8182623Smyers ACPI_NAMESPACE_NODE *ObjHandle, 8192623Smyers char *Path); 8202623Smyers #endif 8212623Smyers 8222623Smyers 8232623Smyers /* 8242623Smyers * utresrc 8252623Smyers */ 8262623Smyers ACPI_STATUS 8272623Smyers AcpiUtWalkAmlResources ( 8282623Smyers UINT8 *Aml, 8292623Smyers ACPI_SIZE AmlLength, 8302623Smyers ACPI_WALK_AML_CALLBACK UserFunction, 8312623Smyers void *Context); 8322623Smyers 8331560Smyers ACPI_STATUS 8341560Smyers AcpiUtValidateResource ( 8351560Smyers void *Aml, 8361560Smyers UINT8 *ReturnIndex); 8371560Smyers 8381560Smyers UINT32 8391560Smyers AcpiUtGetDescriptorLength ( 8401560Smyers void *Aml); 8411560Smyers 8421560Smyers UINT16 8431560Smyers AcpiUtGetResourceLength ( 8441560Smyers void *Aml); 8450Sstevel@tonic-gate 8460Sstevel@tonic-gate UINT8 8471560Smyers AcpiUtGetResourceHeaderLength ( 8481560Smyers void *Aml); 8491560Smyers 8501560Smyers UINT8 8511560Smyers AcpiUtGetResourceType ( 8521560Smyers void *Aml); 8531560Smyers 8541560Smyers ACPI_STATUS 8551560Smyers AcpiUtGetResourceEndTag ( 8561560Smyers ACPI_OPERAND_OBJECT *ObjDesc, 8571560Smyers UINT8 **EndTag); 8580Sstevel@tonic-gate 8590Sstevel@tonic-gate 8600Sstevel@tonic-gate /* 861347Smyers * utmutex - mutex support 8620Sstevel@tonic-gate */ 863347Smyers ACPI_STATUS 864347Smyers AcpiUtMutexInitialize ( 865347Smyers void); 8660Sstevel@tonic-gate 8670Sstevel@tonic-gate void 868347Smyers AcpiUtMutexTerminate ( 869347Smyers void); 870347Smyers 871347Smyers ACPI_STATUS 872347Smyers AcpiUtAcquireMutex ( 873347Smyers ACPI_MUTEX_HANDLE MutexId); 874347Smyers 875347Smyers ACPI_STATUS 876347Smyers AcpiUtReleaseMutex ( 877347Smyers ACPI_MUTEX_HANDLE MutexId); 878347Smyers 8790Sstevel@tonic-gate 880347Smyers /* 881347Smyers * utalloc - memory allocation and object caching 882347Smyers */ 883347Smyers ACPI_STATUS 884347Smyers AcpiUtCreateCaches ( 885347Smyers void); 886347Smyers 887347Smyers ACPI_STATUS 888347Smyers AcpiUtDeleteCaches ( 889347Smyers void); 8900Sstevel@tonic-gate 8910Sstevel@tonic-gate ACPI_STATUS 8920Sstevel@tonic-gate AcpiUtValidateBuffer ( 8930Sstevel@tonic-gate ACPI_BUFFER *Buffer); 8940Sstevel@tonic-gate 8950Sstevel@tonic-gate ACPI_STATUS 8960Sstevel@tonic-gate AcpiUtInitializeBuffer ( 8970Sstevel@tonic-gate ACPI_BUFFER *Buffer, 8980Sstevel@tonic-gate ACPI_SIZE RequiredLength); 8990Sstevel@tonic-gate 9000Sstevel@tonic-gate void * 9010Sstevel@tonic-gate AcpiUtAllocate ( 9020Sstevel@tonic-gate ACPI_SIZE Size, 9030Sstevel@tonic-gate UINT32 Component, 904*7851SDana.Myers@Sun.COM const char *Module, 9050Sstevel@tonic-gate UINT32 Line); 9060Sstevel@tonic-gate 9070Sstevel@tonic-gate void * 9082623Smyers AcpiUtAllocateZeroed ( 9090Sstevel@tonic-gate ACPI_SIZE Size, 9100Sstevel@tonic-gate UINT32 Component, 911*7851SDana.Myers@Sun.COM const char *Module, 9120Sstevel@tonic-gate UINT32 Line); 9130Sstevel@tonic-gate 9140Sstevel@tonic-gate #ifdef ACPI_DBG_TRACK_ALLOCATIONS 9150Sstevel@tonic-gate void * 9160Sstevel@tonic-gate AcpiUtAllocateAndTrack ( 9170Sstevel@tonic-gate ACPI_SIZE Size, 9180Sstevel@tonic-gate UINT32 Component, 919*7851SDana.Myers@Sun.COM const char *Module, 9200Sstevel@tonic-gate UINT32 Line); 9210Sstevel@tonic-gate 9220Sstevel@tonic-gate void * 9232623Smyers AcpiUtAllocateZeroedAndTrack ( 9240Sstevel@tonic-gate ACPI_SIZE Size, 9250Sstevel@tonic-gate UINT32 Component, 926*7851SDana.Myers@Sun.COM const char *Module, 9270Sstevel@tonic-gate UINT32 Line); 9280Sstevel@tonic-gate 9290Sstevel@tonic-gate void 9300Sstevel@tonic-gate AcpiUtFreeAndTrack ( 9310Sstevel@tonic-gate void *Address, 9320Sstevel@tonic-gate UINT32 Component, 933*7851SDana.Myers@Sun.COM const char *Module, 9340Sstevel@tonic-gate UINT32 Line); 9350Sstevel@tonic-gate 9360Sstevel@tonic-gate void 9370Sstevel@tonic-gate AcpiUtDumpAllocationInfo ( 9380Sstevel@tonic-gate void); 9390Sstevel@tonic-gate 9400Sstevel@tonic-gate void 9410Sstevel@tonic-gate AcpiUtDumpAllocations ( 9420Sstevel@tonic-gate UINT32 Component, 943*7851SDana.Myers@Sun.COM const char *Module); 9442623Smyers 9452623Smyers ACPI_STATUS 9462623Smyers AcpiUtCreateList ( 9472623Smyers char *ListName, 9482623Smyers UINT16 ObjectSize, 9492623Smyers ACPI_MEMORY_LIST **ReturnCache); 9502623Smyers 9512623Smyers 9520Sstevel@tonic-gate #endif 9530Sstevel@tonic-gate 9540Sstevel@tonic-gate #endif /* _ACUTILS_H */ 955