17c478bd9Sstevel@tonic-gate /****************************************************************************** 27c478bd9Sstevel@tonic-gate * 37c478bd9Sstevel@tonic-gate * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures 4*450d6964Smyers * $Revision: 177 $ 57c478bd9Sstevel@tonic-gate * 67c478bd9Sstevel@tonic-gate *****************************************************************************/ 77c478bd9Sstevel@tonic-gate 87c478bd9Sstevel@tonic-gate /****************************************************************************** 97c478bd9Sstevel@tonic-gate * 107c478bd9Sstevel@tonic-gate * 1. Copyright Notice 117c478bd9Sstevel@tonic-gate * 127c478bd9Sstevel@tonic-gate * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp. 137c478bd9Sstevel@tonic-gate * All rights reserved. 147c478bd9Sstevel@tonic-gate * 157c478bd9Sstevel@tonic-gate * 2. License 167c478bd9Sstevel@tonic-gate * 177c478bd9Sstevel@tonic-gate * 2.1. This is your license from Intel Corp. under its intellectual property 187c478bd9Sstevel@tonic-gate * rights. You may have additional license terms from the party that provided 197c478bd9Sstevel@tonic-gate * you this software, covering your right to use that party's intellectual 207c478bd9Sstevel@tonic-gate * property rights. 217c478bd9Sstevel@tonic-gate * 227c478bd9Sstevel@tonic-gate * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 237c478bd9Sstevel@tonic-gate * copy of the source code appearing in this file ("Covered Code") an 247c478bd9Sstevel@tonic-gate * irrevocable, perpetual, worldwide license under Intel's copyrights in the 257c478bd9Sstevel@tonic-gate * base code distributed originally by Intel ("Original Intel Code") to copy, 267c478bd9Sstevel@tonic-gate * make derivatives, distribute, use and display any portion of the Covered 277c478bd9Sstevel@tonic-gate * Code in any form, with the right to sublicense such rights; and 287c478bd9Sstevel@tonic-gate * 297c478bd9Sstevel@tonic-gate * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 307c478bd9Sstevel@tonic-gate * license (with the right to sublicense), under only those claims of Intel 317c478bd9Sstevel@tonic-gate * patents that are infringed by the Original Intel Code, to make, use, sell, 327c478bd9Sstevel@tonic-gate * offer to sell, and import the Covered Code and derivative works thereof 337c478bd9Sstevel@tonic-gate * solely to the minimum extent necessary to exercise the above copyright 347c478bd9Sstevel@tonic-gate * license, and in no event shall the patent license extend to any additions 357c478bd9Sstevel@tonic-gate * to or modifications of the Original Intel Code. No other license or right 367c478bd9Sstevel@tonic-gate * is granted directly or by implication, estoppel or otherwise; 377c478bd9Sstevel@tonic-gate * 387c478bd9Sstevel@tonic-gate * The above copyright and patent license is granted only if the following 397c478bd9Sstevel@tonic-gate * conditions are met: 407c478bd9Sstevel@tonic-gate * 417c478bd9Sstevel@tonic-gate * 3. Conditions 427c478bd9Sstevel@tonic-gate * 437c478bd9Sstevel@tonic-gate * 3.1. Redistribution of Source with Rights to Further Distribute Source. 447c478bd9Sstevel@tonic-gate * Redistribution of source code of any substantial portion of the Covered 457c478bd9Sstevel@tonic-gate * Code or modification with rights to further distribute source must include 467c478bd9Sstevel@tonic-gate * the above Copyright Notice, the above License, this list of Conditions, 477c478bd9Sstevel@tonic-gate * and the following Disclaimer and Export Compliance provision. In addition, 487c478bd9Sstevel@tonic-gate * Licensee must cause all Covered Code to which Licensee contributes to 497c478bd9Sstevel@tonic-gate * contain a file documenting the changes Licensee made to create that Covered 507c478bd9Sstevel@tonic-gate * Code and the date of any change. Licensee must include in that file the 517c478bd9Sstevel@tonic-gate * documentation of any changes made by any predecessor Licensee. Licensee 527c478bd9Sstevel@tonic-gate * must include a prominent statement that the modification is derived, 537c478bd9Sstevel@tonic-gate * directly or indirectly, from Original Intel Code. 547c478bd9Sstevel@tonic-gate * 557c478bd9Sstevel@tonic-gate * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 567c478bd9Sstevel@tonic-gate * Redistribution of source code of any substantial portion of the Covered 577c478bd9Sstevel@tonic-gate * Code or modification without rights to further distribute source must 587c478bd9Sstevel@tonic-gate * include the following Disclaimer and Export Compliance provision in the 597c478bd9Sstevel@tonic-gate * documentation and/or other materials provided with distribution. In 607c478bd9Sstevel@tonic-gate * addition, Licensee may not authorize further sublicense of source of any 617c478bd9Sstevel@tonic-gate * portion of the Covered Code, and must include terms to the effect that the 627c478bd9Sstevel@tonic-gate * license from Licensee to its licensee is limited to the intellectual 637c478bd9Sstevel@tonic-gate * property embodied in the software Licensee provides to its licensee, and 647c478bd9Sstevel@tonic-gate * not to intellectual property embodied in modifications its licensee may 657c478bd9Sstevel@tonic-gate * make. 667c478bd9Sstevel@tonic-gate * 677c478bd9Sstevel@tonic-gate * 3.3. Redistribution of Executable. Redistribution in executable form of any 687c478bd9Sstevel@tonic-gate * substantial portion of the Covered Code or modification must reproduce the 697c478bd9Sstevel@tonic-gate * above Copyright Notice, and the following Disclaimer and Export Compliance 707c478bd9Sstevel@tonic-gate * provision in the documentation and/or other materials provided with the 717c478bd9Sstevel@tonic-gate * distribution. 727c478bd9Sstevel@tonic-gate * 737c478bd9Sstevel@tonic-gate * 3.4. Intel retains all right, title, and interest in and to the Original 747c478bd9Sstevel@tonic-gate * Intel Code. 757c478bd9Sstevel@tonic-gate * 767c478bd9Sstevel@tonic-gate * 3.5. Neither the name Intel nor any other trademark owned or controlled by 777c478bd9Sstevel@tonic-gate * Intel shall be used in advertising or otherwise to promote the sale, use or 787c478bd9Sstevel@tonic-gate * other dealings in products derived from or relating to the Covered Code 797c478bd9Sstevel@tonic-gate * without prior written authorization from Intel. 807c478bd9Sstevel@tonic-gate * 817c478bd9Sstevel@tonic-gate * 4. Disclaimer and Export Compliance 827c478bd9Sstevel@tonic-gate * 837c478bd9Sstevel@tonic-gate * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 847c478bd9Sstevel@tonic-gate * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 857c478bd9Sstevel@tonic-gate * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 867c478bd9Sstevel@tonic-gate * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 877c478bd9Sstevel@tonic-gate * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 887c478bd9Sstevel@tonic-gate * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 897c478bd9Sstevel@tonic-gate * PARTICULAR PURPOSE. 907c478bd9Sstevel@tonic-gate * 917c478bd9Sstevel@tonic-gate * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 927c478bd9Sstevel@tonic-gate * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 937c478bd9Sstevel@tonic-gate * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 947c478bd9Sstevel@tonic-gate * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 957c478bd9Sstevel@tonic-gate * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 967c478bd9Sstevel@tonic-gate * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 977c478bd9Sstevel@tonic-gate * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 987c478bd9Sstevel@tonic-gate * LIMITED REMEDY. 997c478bd9Sstevel@tonic-gate * 1007c478bd9Sstevel@tonic-gate * 4.3. Licensee shall not export, either directly or indirectly, any of this 1017c478bd9Sstevel@tonic-gate * software or system incorporating such software without first obtaining any 1027c478bd9Sstevel@tonic-gate * required license or other approval from the U. S. Department of Commerce or 1037c478bd9Sstevel@tonic-gate * any other agency or department of the United States Government. In the 1047c478bd9Sstevel@tonic-gate * event Licensee exports any such software from the United States or 1057c478bd9Sstevel@tonic-gate * re-exports any such software from a foreign destination, Licensee shall 1067c478bd9Sstevel@tonic-gate * ensure that the distribution and export/re-export of the software is in 1077c478bd9Sstevel@tonic-gate * compliance with all laws, regulations, orders, or other restrictions of the 1087c478bd9Sstevel@tonic-gate * U.S. Export Administration Regulations. Licensee agrees that neither it nor 1097c478bd9Sstevel@tonic-gate * any of its subsidiaries will export/re-export any technical data, process, 1107c478bd9Sstevel@tonic-gate * software, or service, directly or indirectly, to any country for which the 1117c478bd9Sstevel@tonic-gate * United States government or any agency thereof requires an export license, 1127c478bd9Sstevel@tonic-gate * other governmental approval, or letter of assurance, without first obtaining 1137c478bd9Sstevel@tonic-gate * such license, approval or letter. 1147c478bd9Sstevel@tonic-gate * 1157c478bd9Sstevel@tonic-gate *****************************************************************************/ 1167c478bd9Sstevel@tonic-gate 1177c478bd9Sstevel@tonic-gate #ifndef _ACUTILS_H 1187c478bd9Sstevel@tonic-gate #define _ACUTILS_H 1197c478bd9Sstevel@tonic-gate 1207c478bd9Sstevel@tonic-gate 1217c478bd9Sstevel@tonic-gate typedef 1227c478bd9Sstevel@tonic-gate ACPI_STATUS (*ACPI_PKG_CALLBACK) ( 1237c478bd9Sstevel@tonic-gate UINT8 ObjectType, 1247c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *SourceObject, 1257c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE *State, 1267c478bd9Sstevel@tonic-gate void *Context); 1277c478bd9Sstevel@tonic-gate 1287c478bd9Sstevel@tonic-gate typedef struct acpi_pkg_info 1297c478bd9Sstevel@tonic-gate { 1307c478bd9Sstevel@tonic-gate UINT8 *FreeSpace; 1317c478bd9Sstevel@tonic-gate ACPI_SIZE Length; 1327c478bd9Sstevel@tonic-gate UINT32 ObjectSpace; 1337c478bd9Sstevel@tonic-gate UINT32 NumPackages; 1347c478bd9Sstevel@tonic-gate 1357c478bd9Sstevel@tonic-gate } ACPI_PKG_INFO; 1367c478bd9Sstevel@tonic-gate 1377c478bd9Sstevel@tonic-gate #define REF_INCREMENT (UINT16) 0 1387c478bd9Sstevel@tonic-gate #define REF_DECREMENT (UINT16) 1 1397c478bd9Sstevel@tonic-gate #define REF_FORCE_DELETE (UINT16) 2 1407c478bd9Sstevel@tonic-gate 1417c478bd9Sstevel@tonic-gate /* AcpiUtDumpBuffer */ 1427c478bd9Sstevel@tonic-gate 1437c478bd9Sstevel@tonic-gate #define DB_BYTE_DISPLAY 1 1447c478bd9Sstevel@tonic-gate #define DB_WORD_DISPLAY 2 1457c478bd9Sstevel@tonic-gate #define DB_DWORD_DISPLAY 4 1467c478bd9Sstevel@tonic-gate #define DB_QWORD_DISPLAY 8 1477c478bd9Sstevel@tonic-gate 1487c478bd9Sstevel@tonic-gate 1497c478bd9Sstevel@tonic-gate /* 1507c478bd9Sstevel@tonic-gate * utglobal - Global data structures and procedures 1517c478bd9Sstevel@tonic-gate */ 1527c478bd9Sstevel@tonic-gate void 1537c478bd9Sstevel@tonic-gate AcpiUtInitGlobals ( 1547c478bd9Sstevel@tonic-gate void); 1557c478bd9Sstevel@tonic-gate 1567c478bd9Sstevel@tonic-gate #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 1577c478bd9Sstevel@tonic-gate 1587c478bd9Sstevel@tonic-gate char * 1597c478bd9Sstevel@tonic-gate AcpiUtGetMutexName ( 1607c478bd9Sstevel@tonic-gate UINT32 MutexId); 1617c478bd9Sstevel@tonic-gate 1627c478bd9Sstevel@tonic-gate #endif 1637c478bd9Sstevel@tonic-gate 1647c478bd9Sstevel@tonic-gate char * 1657c478bd9Sstevel@tonic-gate AcpiUtGetTypeName ( 1667c478bd9Sstevel@tonic-gate ACPI_OBJECT_TYPE Type); 1677c478bd9Sstevel@tonic-gate 1687c478bd9Sstevel@tonic-gate char * 1697c478bd9Sstevel@tonic-gate AcpiUtGetNodeName ( 1707c478bd9Sstevel@tonic-gate void *Object); 1717c478bd9Sstevel@tonic-gate 1727c478bd9Sstevel@tonic-gate char * 1737c478bd9Sstevel@tonic-gate AcpiUtGetDescriptorName ( 1747c478bd9Sstevel@tonic-gate void *Object); 1757c478bd9Sstevel@tonic-gate 1767c478bd9Sstevel@tonic-gate char * 1777c478bd9Sstevel@tonic-gate AcpiUtGetObjectTypeName ( 1787c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *ObjDesc); 1797c478bd9Sstevel@tonic-gate 1807c478bd9Sstevel@tonic-gate char * 1817c478bd9Sstevel@tonic-gate AcpiUtGetRegionName ( 1827c478bd9Sstevel@tonic-gate UINT8 SpaceId); 1837c478bd9Sstevel@tonic-gate 1847c478bd9Sstevel@tonic-gate char * 1857c478bd9Sstevel@tonic-gate AcpiUtGetEventName ( 1867c478bd9Sstevel@tonic-gate UINT32 EventId); 1877c478bd9Sstevel@tonic-gate 1887c478bd9Sstevel@tonic-gate char 1897c478bd9Sstevel@tonic-gate AcpiUtHexToAsciiChar ( 1907c478bd9Sstevel@tonic-gate ACPI_INTEGER Integer, 1917c478bd9Sstevel@tonic-gate UINT32 Position); 1927c478bd9Sstevel@tonic-gate 1937c478bd9Sstevel@tonic-gate BOOLEAN 1947c478bd9Sstevel@tonic-gate AcpiUtValidObjectType ( 1957c478bd9Sstevel@tonic-gate ACPI_OBJECT_TYPE Type); 1967c478bd9Sstevel@tonic-gate 1977c478bd9Sstevel@tonic-gate 1987c478bd9Sstevel@tonic-gate /* 1997c478bd9Sstevel@tonic-gate * utinit - miscellaneous initialization and shutdown 2007c478bd9Sstevel@tonic-gate */ 2017c478bd9Sstevel@tonic-gate ACPI_STATUS 2027c478bd9Sstevel@tonic-gate AcpiUtHardwareInitialize ( 2037c478bd9Sstevel@tonic-gate void); 2047c478bd9Sstevel@tonic-gate 2057c478bd9Sstevel@tonic-gate void 2067c478bd9Sstevel@tonic-gate AcpiUtSubsystemShutdown ( 2077c478bd9Sstevel@tonic-gate void); 2087c478bd9Sstevel@tonic-gate 2097c478bd9Sstevel@tonic-gate ACPI_STATUS 2107c478bd9Sstevel@tonic-gate AcpiUtValidateFadt ( 2117c478bd9Sstevel@tonic-gate void); 2127c478bd9Sstevel@tonic-gate 2137c478bd9Sstevel@tonic-gate 2147c478bd9Sstevel@tonic-gate /* 2157c478bd9Sstevel@tonic-gate * utclib - Local implementations of C library functions 2167c478bd9Sstevel@tonic-gate */ 2177c478bd9Sstevel@tonic-gate #ifndef ACPI_USE_SYSTEM_CLIBRARY 2187c478bd9Sstevel@tonic-gate 2197c478bd9Sstevel@tonic-gate ACPI_SIZE 2207c478bd9Sstevel@tonic-gate AcpiUtStrlen ( 2217c478bd9Sstevel@tonic-gate const char *String); 2227c478bd9Sstevel@tonic-gate 2237c478bd9Sstevel@tonic-gate char * 2247c478bd9Sstevel@tonic-gate AcpiUtStrcpy ( 2257c478bd9Sstevel@tonic-gate char *DstString, 2267c478bd9Sstevel@tonic-gate const char *SrcString); 2277c478bd9Sstevel@tonic-gate 2287c478bd9Sstevel@tonic-gate char * 2297c478bd9Sstevel@tonic-gate AcpiUtStrncpy ( 2307c478bd9Sstevel@tonic-gate char *DstString, 2317c478bd9Sstevel@tonic-gate const char *SrcString, 2327c478bd9Sstevel@tonic-gate ACPI_SIZE Count); 2337c478bd9Sstevel@tonic-gate 2347c478bd9Sstevel@tonic-gate int 2357c478bd9Sstevel@tonic-gate AcpiUtMemcmp ( 2367c478bd9Sstevel@tonic-gate const char *Buffer1, 2377c478bd9Sstevel@tonic-gate const char *Buffer2, 2387c478bd9Sstevel@tonic-gate ACPI_SIZE Count); 2397c478bd9Sstevel@tonic-gate 2407c478bd9Sstevel@tonic-gate int 2417c478bd9Sstevel@tonic-gate AcpiUtStrncmp ( 2427c478bd9Sstevel@tonic-gate const char *String1, 2437c478bd9Sstevel@tonic-gate const char *String2, 2447c478bd9Sstevel@tonic-gate ACPI_SIZE Count); 2457c478bd9Sstevel@tonic-gate 2467c478bd9Sstevel@tonic-gate int 2477c478bd9Sstevel@tonic-gate AcpiUtStrcmp ( 2487c478bd9Sstevel@tonic-gate const char *String1, 2497c478bd9Sstevel@tonic-gate const char *String2); 2507c478bd9Sstevel@tonic-gate 2517c478bd9Sstevel@tonic-gate char * 2527c478bd9Sstevel@tonic-gate AcpiUtStrcat ( 2537c478bd9Sstevel@tonic-gate char *DstString, 2547c478bd9Sstevel@tonic-gate const char *SrcString); 2557c478bd9Sstevel@tonic-gate 2567c478bd9Sstevel@tonic-gate char * 2577c478bd9Sstevel@tonic-gate AcpiUtStrncat ( 2587c478bd9Sstevel@tonic-gate char *DstString, 2597c478bd9Sstevel@tonic-gate const char *SrcString, 2607c478bd9Sstevel@tonic-gate ACPI_SIZE Count); 2617c478bd9Sstevel@tonic-gate 2627c478bd9Sstevel@tonic-gate UINT32 2637c478bd9Sstevel@tonic-gate AcpiUtStrtoul ( 2647c478bd9Sstevel@tonic-gate const char *String, 2657c478bd9Sstevel@tonic-gate char **Terminator, 2667c478bd9Sstevel@tonic-gate UINT32 Base); 2677c478bd9Sstevel@tonic-gate 2687c478bd9Sstevel@tonic-gate char * 2697c478bd9Sstevel@tonic-gate AcpiUtStrstr ( 2707c478bd9Sstevel@tonic-gate char *String1, 2717c478bd9Sstevel@tonic-gate char *String2); 2727c478bd9Sstevel@tonic-gate 2737c478bd9Sstevel@tonic-gate void * 2747c478bd9Sstevel@tonic-gate AcpiUtMemcpy ( 2757c478bd9Sstevel@tonic-gate void *Dest, 2767c478bd9Sstevel@tonic-gate const void *Src, 2777c478bd9Sstevel@tonic-gate ACPI_SIZE Count); 2787c478bd9Sstevel@tonic-gate 2797c478bd9Sstevel@tonic-gate void * 2807c478bd9Sstevel@tonic-gate AcpiUtMemset ( 2817c478bd9Sstevel@tonic-gate void *Dest, 2827c478bd9Sstevel@tonic-gate ACPI_NATIVE_UINT Value, 2837c478bd9Sstevel@tonic-gate ACPI_SIZE Count); 2847c478bd9Sstevel@tonic-gate 2857c478bd9Sstevel@tonic-gate int 2867c478bd9Sstevel@tonic-gate AcpiUtToUpper ( 2877c478bd9Sstevel@tonic-gate int c); 2887c478bd9Sstevel@tonic-gate 2897c478bd9Sstevel@tonic-gate int 2907c478bd9Sstevel@tonic-gate AcpiUtToLower ( 2917c478bd9Sstevel@tonic-gate int c); 2927c478bd9Sstevel@tonic-gate 2937c478bd9Sstevel@tonic-gate extern const UINT8 _acpi_ctype[]; 2947c478bd9Sstevel@tonic-gate 2957c478bd9Sstevel@tonic-gate #define _ACPI_XA 0x00 /* extra alphabetic - not supported */ 2967c478bd9Sstevel@tonic-gate #define _ACPI_XS 0x40 /* extra space */ 2977c478bd9Sstevel@tonic-gate #define _ACPI_BB 0x00 /* BEL, BS, etc. - not supported */ 2987c478bd9Sstevel@tonic-gate #define _ACPI_CN 0x20 /* CR, FF, HT, NL, VT */ 2997c478bd9Sstevel@tonic-gate #define _ACPI_DI 0x04 /* '0'-'9' */ 3007c478bd9Sstevel@tonic-gate #define _ACPI_LO 0x02 /* 'a'-'z' */ 3017c478bd9Sstevel@tonic-gate #define _ACPI_PU 0x10 /* punctuation */ 3027c478bd9Sstevel@tonic-gate #define _ACPI_SP 0x08 /* space */ 3037c478bd9Sstevel@tonic-gate #define _ACPI_UP 0x01 /* 'A'-'Z' */ 3047c478bd9Sstevel@tonic-gate #define _ACPI_XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */ 3057c478bd9Sstevel@tonic-gate 3067c478bd9Sstevel@tonic-gate #define ACPI_IS_DIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI)) 3077c478bd9Sstevel@tonic-gate #define ACPI_IS_SPACE(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP)) 3087c478bd9Sstevel@tonic-gate #define ACPI_IS_XDIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_XD)) 3097c478bd9Sstevel@tonic-gate #define ACPI_IS_UPPER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_UP)) 3107c478bd9Sstevel@tonic-gate #define ACPI_IS_LOWER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO)) 3117c478bd9Sstevel@tonic-gate #define ACPI_IS_PRINT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_SP | _ACPI_PU)) 3127c478bd9Sstevel@tonic-gate #define ACPI_IS_ALPHA(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP)) 3137c478bd9Sstevel@tonic-gate #define ACPI_IS_ASCII(c) ((c) < 0x80) 3147c478bd9Sstevel@tonic-gate 3157c478bd9Sstevel@tonic-gate #endif /* ACPI_USE_SYSTEM_CLIBRARY */ 3167c478bd9Sstevel@tonic-gate 3177c478bd9Sstevel@tonic-gate 3187c478bd9Sstevel@tonic-gate /* 3197c478bd9Sstevel@tonic-gate * utcopy - Object construction and conversion interfaces 3207c478bd9Sstevel@tonic-gate */ 3217c478bd9Sstevel@tonic-gate ACPI_STATUS 3227c478bd9Sstevel@tonic-gate AcpiUtBuildSimpleObject( 3237c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Obj, 3247c478bd9Sstevel@tonic-gate ACPI_OBJECT *UserObj, 3257c478bd9Sstevel@tonic-gate UINT8 *DataSpace, 3267c478bd9Sstevel@tonic-gate UINT32 *BufferSpaceUsed); 3277c478bd9Sstevel@tonic-gate 3287c478bd9Sstevel@tonic-gate ACPI_STATUS 3297c478bd9Sstevel@tonic-gate AcpiUtBuildPackageObject ( 3307c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Obj, 3317c478bd9Sstevel@tonic-gate UINT8 *Buffer, 3327c478bd9Sstevel@tonic-gate UINT32 *SpaceUsed); 3337c478bd9Sstevel@tonic-gate 3347c478bd9Sstevel@tonic-gate ACPI_STATUS 3357c478bd9Sstevel@tonic-gate AcpiUtCopyIobjectToEobject ( 3367c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Obj, 3377c478bd9Sstevel@tonic-gate ACPI_BUFFER *RetBuffer); 3387c478bd9Sstevel@tonic-gate 3397c478bd9Sstevel@tonic-gate ACPI_STATUS 3407c478bd9Sstevel@tonic-gate AcpiUtCopyEobjectToIobject ( 3417c478bd9Sstevel@tonic-gate ACPI_OBJECT *Obj, 3427c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT **InternalObj); 3437c478bd9Sstevel@tonic-gate 3447c478bd9Sstevel@tonic-gate ACPI_STATUS 3457c478bd9Sstevel@tonic-gate AcpiUtCopyISimpleToIsimple ( 3467c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *SourceObj, 3477c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *DestObj); 3487c478bd9Sstevel@tonic-gate 3497c478bd9Sstevel@tonic-gate ACPI_STATUS 3507c478bd9Sstevel@tonic-gate AcpiUtCopyIobjectToIobject ( 3517c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *SourceDesc, 3527c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT **DestDesc, 3537c478bd9Sstevel@tonic-gate ACPI_WALK_STATE *WalkState); 3547c478bd9Sstevel@tonic-gate 3557c478bd9Sstevel@tonic-gate 3567c478bd9Sstevel@tonic-gate /* 3577c478bd9Sstevel@tonic-gate * utcreate - Object creation 3587c478bd9Sstevel@tonic-gate */ 3597c478bd9Sstevel@tonic-gate ACPI_STATUS 3607c478bd9Sstevel@tonic-gate AcpiUtUpdateObjectReference ( 3617c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object, 3627c478bd9Sstevel@tonic-gate UINT16 Action); 3637c478bd9Sstevel@tonic-gate 3647c478bd9Sstevel@tonic-gate 3657c478bd9Sstevel@tonic-gate /* 3667c478bd9Sstevel@tonic-gate * utdebug - Debug interfaces 3677c478bd9Sstevel@tonic-gate */ 3687c478bd9Sstevel@tonic-gate void 3697c478bd9Sstevel@tonic-gate AcpiUtInitStackPtrTrace ( 3707c478bd9Sstevel@tonic-gate void); 3717c478bd9Sstevel@tonic-gate 3727c478bd9Sstevel@tonic-gate void 3737c478bd9Sstevel@tonic-gate AcpiUtTrackStackPtr ( 3747c478bd9Sstevel@tonic-gate void); 3757c478bd9Sstevel@tonic-gate 3767c478bd9Sstevel@tonic-gate void 3777c478bd9Sstevel@tonic-gate AcpiUtTrace ( 3787c478bd9Sstevel@tonic-gate UINT32 LineNumber, 379*450d6964Smyers char *FunctionName, 380*450d6964Smyers char *ModuleName, 381*450d6964Smyers UINT32 ComponentId); 3827c478bd9Sstevel@tonic-gate 3837c478bd9Sstevel@tonic-gate void 3847c478bd9Sstevel@tonic-gate AcpiUtTracePtr ( 3857c478bd9Sstevel@tonic-gate UINT32 LineNumber, 386*450d6964Smyers char *FunctionName, 387*450d6964Smyers char *ModuleName, 388*450d6964Smyers UINT32 ComponentId, 3897c478bd9Sstevel@tonic-gate void *Pointer); 3907c478bd9Sstevel@tonic-gate 3917c478bd9Sstevel@tonic-gate void 3927c478bd9Sstevel@tonic-gate AcpiUtTraceU32 ( 3937c478bd9Sstevel@tonic-gate UINT32 LineNumber, 394*450d6964Smyers char *FunctionName, 395*450d6964Smyers char *ModuleName, 396*450d6964Smyers UINT32 ComponentId, 3977c478bd9Sstevel@tonic-gate UINT32 Integer); 3987c478bd9Sstevel@tonic-gate 3997c478bd9Sstevel@tonic-gate void 4007c478bd9Sstevel@tonic-gate AcpiUtTraceStr ( 4017c478bd9Sstevel@tonic-gate UINT32 LineNumber, 402*450d6964Smyers char *FunctionName, 403*450d6964Smyers char *ModuleName, 404*450d6964Smyers UINT32 ComponentId, 4057c478bd9Sstevel@tonic-gate char *String); 4067c478bd9Sstevel@tonic-gate 4077c478bd9Sstevel@tonic-gate void 4087c478bd9Sstevel@tonic-gate AcpiUtExit ( 4097c478bd9Sstevel@tonic-gate UINT32 LineNumber, 410*450d6964Smyers char *FunctionName, 411*450d6964Smyers char *ModuleName, 412*450d6964Smyers UINT32 ComponentId); 4137c478bd9Sstevel@tonic-gate 4147c478bd9Sstevel@tonic-gate void 4157c478bd9Sstevel@tonic-gate AcpiUtStatusExit ( 4167c478bd9Sstevel@tonic-gate UINT32 LineNumber, 417*450d6964Smyers char *FunctionName, 418*450d6964Smyers char *ModuleName, 419*450d6964Smyers UINT32 ComponentId, 4207c478bd9Sstevel@tonic-gate ACPI_STATUS Status); 4217c478bd9Sstevel@tonic-gate 4227c478bd9Sstevel@tonic-gate void 4237c478bd9Sstevel@tonic-gate AcpiUtValueExit ( 4247c478bd9Sstevel@tonic-gate UINT32 LineNumber, 425*450d6964Smyers char *FunctionName, 426*450d6964Smyers char *ModuleName, 427*450d6964Smyers UINT32 ComponentId, 4287c478bd9Sstevel@tonic-gate ACPI_INTEGER Value); 4297c478bd9Sstevel@tonic-gate 4307c478bd9Sstevel@tonic-gate void 4317c478bd9Sstevel@tonic-gate AcpiUtPtrExit ( 4327c478bd9Sstevel@tonic-gate UINT32 LineNumber, 433*450d6964Smyers char *FunctionName, 434*450d6964Smyers char *ModuleName, 435*450d6964Smyers UINT32 ComponentId, 4367c478bd9Sstevel@tonic-gate UINT8 *Ptr); 4377c478bd9Sstevel@tonic-gate 4387c478bd9Sstevel@tonic-gate void 4397c478bd9Sstevel@tonic-gate AcpiUtReportInfo ( 4407c478bd9Sstevel@tonic-gate char *ModuleName, 4417c478bd9Sstevel@tonic-gate UINT32 LineNumber, 4427c478bd9Sstevel@tonic-gate UINT32 ComponentId); 4437c478bd9Sstevel@tonic-gate 4447c478bd9Sstevel@tonic-gate void 4457c478bd9Sstevel@tonic-gate AcpiUtReportError ( 4467c478bd9Sstevel@tonic-gate char *ModuleName, 4477c478bd9Sstevel@tonic-gate UINT32 LineNumber, 4487c478bd9Sstevel@tonic-gate UINT32 ComponentId); 4497c478bd9Sstevel@tonic-gate 4507c478bd9Sstevel@tonic-gate void 4517c478bd9Sstevel@tonic-gate AcpiUtReportWarning ( 4527c478bd9Sstevel@tonic-gate char *ModuleName, 4537c478bd9Sstevel@tonic-gate UINT32 LineNumber, 4547c478bd9Sstevel@tonic-gate UINT32 ComponentId); 4557c478bd9Sstevel@tonic-gate 4567c478bd9Sstevel@tonic-gate void 4577c478bd9Sstevel@tonic-gate AcpiUtDumpBuffer ( 4587c478bd9Sstevel@tonic-gate UINT8 *Buffer, 4597c478bd9Sstevel@tonic-gate UINT32 Count, 4607c478bd9Sstevel@tonic-gate UINT32 Display, 4617c478bd9Sstevel@tonic-gate UINT32 componentId); 4627c478bd9Sstevel@tonic-gate 4637c478bd9Sstevel@tonic-gate void ACPI_INTERNAL_VAR_XFACE 4647c478bd9Sstevel@tonic-gate AcpiUtDebugPrint ( 4657c478bd9Sstevel@tonic-gate UINT32 RequestedDebugLevel, 4667c478bd9Sstevel@tonic-gate UINT32 LineNumber, 467*450d6964Smyers char *FunctionName, 468*450d6964Smyers char *ModuleName, 469*450d6964Smyers UINT32 ComponentId, 4707c478bd9Sstevel@tonic-gate char *Format, 4717c478bd9Sstevel@tonic-gate ...) ACPI_PRINTF_LIKE_FUNC; 4727c478bd9Sstevel@tonic-gate 4737c478bd9Sstevel@tonic-gate void ACPI_INTERNAL_VAR_XFACE 4747c478bd9Sstevel@tonic-gate AcpiUtDebugPrintRaw ( 4757c478bd9Sstevel@tonic-gate UINT32 RequestedDebugLevel, 4767c478bd9Sstevel@tonic-gate UINT32 LineNumber, 477*450d6964Smyers char *FunctionName, 478*450d6964Smyers char *ModuleName, 479*450d6964Smyers UINT32 ComponentId, 4807c478bd9Sstevel@tonic-gate char *Format, 4817c478bd9Sstevel@tonic-gate ...) ACPI_PRINTF_LIKE_FUNC; 4827c478bd9Sstevel@tonic-gate 4837c478bd9Sstevel@tonic-gate 4847c478bd9Sstevel@tonic-gate /* 4857c478bd9Sstevel@tonic-gate * utdelete - Object deletion and reference counts 4867c478bd9Sstevel@tonic-gate */ 4877c478bd9Sstevel@tonic-gate void 4887c478bd9Sstevel@tonic-gate AcpiUtAddReference ( 4897c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object); 4907c478bd9Sstevel@tonic-gate 4917c478bd9Sstevel@tonic-gate void 4927c478bd9Sstevel@tonic-gate AcpiUtRemoveReference ( 4937c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object); 4947c478bd9Sstevel@tonic-gate 4957c478bd9Sstevel@tonic-gate void 4967c478bd9Sstevel@tonic-gate AcpiUtDeleteInternalPackageObject ( 4977c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object); 4987c478bd9Sstevel@tonic-gate 4997c478bd9Sstevel@tonic-gate void 5007c478bd9Sstevel@tonic-gate AcpiUtDeleteInternalSimpleObject ( 5017c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object); 5027c478bd9Sstevel@tonic-gate 5037c478bd9Sstevel@tonic-gate void 5047c478bd9Sstevel@tonic-gate AcpiUtDeleteInternalObjectList ( 5057c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT **ObjList); 5067c478bd9Sstevel@tonic-gate 5077c478bd9Sstevel@tonic-gate 5087c478bd9Sstevel@tonic-gate /* 5097c478bd9Sstevel@tonic-gate * uteval - object evaluation 5107c478bd9Sstevel@tonic-gate */ 5117c478bd9Sstevel@tonic-gate ACPI_STATUS 5127c478bd9Sstevel@tonic-gate AcpiUtOsiImplementation ( 5137c478bd9Sstevel@tonic-gate ACPI_WALK_STATE *WalkState); 5147c478bd9Sstevel@tonic-gate 5157c478bd9Sstevel@tonic-gate ACPI_STATUS 5167c478bd9Sstevel@tonic-gate AcpiUtEvaluateObject ( 5177c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *PrefixNode, 5187c478bd9Sstevel@tonic-gate char *Path, 5197c478bd9Sstevel@tonic-gate UINT32 ExpectedReturnBtypes, 5207c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT **ReturnDesc); 5217c478bd9Sstevel@tonic-gate 5227c478bd9Sstevel@tonic-gate ACPI_STATUS 5237c478bd9Sstevel@tonic-gate AcpiUtEvaluateNumericObject ( 5247c478bd9Sstevel@tonic-gate char *ObjectName, 5257c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *DeviceNode, 5267c478bd9Sstevel@tonic-gate ACPI_INTEGER *Address); 5277c478bd9Sstevel@tonic-gate 5287c478bd9Sstevel@tonic-gate ACPI_STATUS 5297c478bd9Sstevel@tonic-gate AcpiUtExecute_HID ( 5307c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *DeviceNode, 5317c478bd9Sstevel@tonic-gate ACPI_DEVICE_ID *Hid); 5327c478bd9Sstevel@tonic-gate 5337c478bd9Sstevel@tonic-gate ACPI_STATUS 5347c478bd9Sstevel@tonic-gate AcpiUtExecute_CID ( 5357c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *DeviceNode, 5367c478bd9Sstevel@tonic-gate ACPI_COMPATIBLE_ID_LIST **ReturnCidList); 5377c478bd9Sstevel@tonic-gate 5387c478bd9Sstevel@tonic-gate ACPI_STATUS 5397c478bd9Sstevel@tonic-gate AcpiUtExecute_STA ( 5407c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *DeviceNode, 5417c478bd9Sstevel@tonic-gate UINT32 *StatusFlags); 5427c478bd9Sstevel@tonic-gate 5437c478bd9Sstevel@tonic-gate ACPI_STATUS 5447c478bd9Sstevel@tonic-gate AcpiUtExecute_UID ( 5457c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *DeviceNode, 5467c478bd9Sstevel@tonic-gate ACPI_DEVICE_ID *Uid); 5477c478bd9Sstevel@tonic-gate 5487c478bd9Sstevel@tonic-gate ACPI_STATUS 5497c478bd9Sstevel@tonic-gate AcpiUtExecute_Sxds ( 5507c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *DeviceNode, 5517c478bd9Sstevel@tonic-gate UINT8 *Highest); 5527c478bd9Sstevel@tonic-gate 5537c478bd9Sstevel@tonic-gate 5547c478bd9Sstevel@tonic-gate /* 5557c478bd9Sstevel@tonic-gate * utobject - internal object create/delete/cache routines 5567c478bd9Sstevel@tonic-gate */ 5577c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT * 5587c478bd9Sstevel@tonic-gate AcpiUtCreateInternalObjectDbg ( 5597c478bd9Sstevel@tonic-gate char *ModuleName, 5607c478bd9Sstevel@tonic-gate UINT32 LineNumber, 5617c478bd9Sstevel@tonic-gate UINT32 ComponentId, 5627c478bd9Sstevel@tonic-gate ACPI_OBJECT_TYPE Type); 5637c478bd9Sstevel@tonic-gate 5647c478bd9Sstevel@tonic-gate void * 5657c478bd9Sstevel@tonic-gate AcpiUtAllocateObjectDescDbg ( 5667c478bd9Sstevel@tonic-gate char *ModuleName, 5677c478bd9Sstevel@tonic-gate UINT32 LineNumber, 5687c478bd9Sstevel@tonic-gate UINT32 ComponentId); 5697c478bd9Sstevel@tonic-gate 570*450d6964Smyers #define AcpiUtCreateInternalObject(t) AcpiUtCreateInternalObjectDbg (_AcpiModuleName,__LINE__,_COMPONENT,t) 571*450d6964Smyers #define AcpiUtAllocateObjectDesc() AcpiUtAllocateObjectDescDbg (_AcpiModuleName,__LINE__,_COMPONENT) 5727c478bd9Sstevel@tonic-gate 5737c478bd9Sstevel@tonic-gate void 5747c478bd9Sstevel@tonic-gate AcpiUtDeleteObjectDesc ( 5757c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object); 5767c478bd9Sstevel@tonic-gate 5777c478bd9Sstevel@tonic-gate BOOLEAN 5787c478bd9Sstevel@tonic-gate AcpiUtValidInternalObject ( 5797c478bd9Sstevel@tonic-gate void *Object); 5807c478bd9Sstevel@tonic-gate 5817c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT * 5827c478bd9Sstevel@tonic-gate AcpiUtCreateBufferObject ( 5837c478bd9Sstevel@tonic-gate ACPI_SIZE BufferSize); 5847c478bd9Sstevel@tonic-gate 5857c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT * 5867c478bd9Sstevel@tonic-gate AcpiUtCreateStringObject ( 5877c478bd9Sstevel@tonic-gate ACPI_SIZE StringSize); 5887c478bd9Sstevel@tonic-gate 5897c478bd9Sstevel@tonic-gate ACPI_STATUS 5907c478bd9Sstevel@tonic-gate AcpiUtGetObjectSize( 5917c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Obj, 5927c478bd9Sstevel@tonic-gate ACPI_SIZE *ObjLength); 5937c478bd9Sstevel@tonic-gate 5947c478bd9Sstevel@tonic-gate 5957c478bd9Sstevel@tonic-gate /* 5967c478bd9Sstevel@tonic-gate * utstate - Generic state creation/cache routines 5977c478bd9Sstevel@tonic-gate */ 5987c478bd9Sstevel@tonic-gate void 5997c478bd9Sstevel@tonic-gate AcpiUtPushGenericState ( 6007c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE **ListHead, 6017c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE *State); 6027c478bd9Sstevel@tonic-gate 6037c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE * 6047c478bd9Sstevel@tonic-gate AcpiUtPopGenericState ( 6057c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE **ListHead); 6067c478bd9Sstevel@tonic-gate 6077c478bd9Sstevel@tonic-gate 6087c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE * 6097c478bd9Sstevel@tonic-gate AcpiUtCreateGenericState ( 6107c478bd9Sstevel@tonic-gate void); 6117c478bd9Sstevel@tonic-gate 6127c478bd9Sstevel@tonic-gate ACPI_THREAD_STATE * 6137c478bd9Sstevel@tonic-gate AcpiUtCreateThreadState ( 6147c478bd9Sstevel@tonic-gate void); 6157c478bd9Sstevel@tonic-gate 6167c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE * 6177c478bd9Sstevel@tonic-gate AcpiUtCreateUpdateState ( 6187c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object, 6197c478bd9Sstevel@tonic-gate UINT16 Action); 6207c478bd9Sstevel@tonic-gate 6217c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE * 6227c478bd9Sstevel@tonic-gate AcpiUtCreatePkgState ( 6237c478bd9Sstevel@tonic-gate void *InternalObject, 6247c478bd9Sstevel@tonic-gate void *ExternalObject, 6257c478bd9Sstevel@tonic-gate UINT16 Index); 6267c478bd9Sstevel@tonic-gate 6277c478bd9Sstevel@tonic-gate ACPI_STATUS 6287c478bd9Sstevel@tonic-gate AcpiUtCreateUpdateStateAndPush ( 6297c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object, 6307c478bd9Sstevel@tonic-gate UINT16 Action, 6317c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE **StateList); 6327c478bd9Sstevel@tonic-gate 6337c478bd9Sstevel@tonic-gate ACPI_STATUS 6347c478bd9Sstevel@tonic-gate AcpiUtCreatePkgStateAndPush ( 6357c478bd9Sstevel@tonic-gate void *InternalObject, 6367c478bd9Sstevel@tonic-gate void *ExternalObject, 6377c478bd9Sstevel@tonic-gate UINT16 Index, 6387c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE **StateList); 6397c478bd9Sstevel@tonic-gate 6407c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE * 6417c478bd9Sstevel@tonic-gate AcpiUtCreateControlState ( 6427c478bd9Sstevel@tonic-gate void); 6437c478bd9Sstevel@tonic-gate 6447c478bd9Sstevel@tonic-gate void 6457c478bd9Sstevel@tonic-gate AcpiUtDeleteGenericState ( 6467c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE *State); 6477c478bd9Sstevel@tonic-gate 6487c478bd9Sstevel@tonic-gate 6497c478bd9Sstevel@tonic-gate /* 6507c478bd9Sstevel@tonic-gate * utmath 6517c478bd9Sstevel@tonic-gate */ 6527c478bd9Sstevel@tonic-gate ACPI_STATUS 6537c478bd9Sstevel@tonic-gate AcpiUtDivide ( 6547c478bd9Sstevel@tonic-gate ACPI_INTEGER InDividend, 6557c478bd9Sstevel@tonic-gate ACPI_INTEGER InDivisor, 6567c478bd9Sstevel@tonic-gate ACPI_INTEGER *OutQuotient, 6577c478bd9Sstevel@tonic-gate ACPI_INTEGER *OutRemainder); 6587c478bd9Sstevel@tonic-gate 6597c478bd9Sstevel@tonic-gate ACPI_STATUS 6607c478bd9Sstevel@tonic-gate AcpiUtShortDivide ( 6617c478bd9Sstevel@tonic-gate ACPI_INTEGER InDividend, 6627c478bd9Sstevel@tonic-gate UINT32 Divisor, 6637c478bd9Sstevel@tonic-gate ACPI_INTEGER *OutQuotient, 6647c478bd9Sstevel@tonic-gate UINT32 *OutRemainder); 6657c478bd9Sstevel@tonic-gate 6667c478bd9Sstevel@tonic-gate /* 6677c478bd9Sstevel@tonic-gate * utmisc 6687c478bd9Sstevel@tonic-gate */ 6697c478bd9Sstevel@tonic-gate ACPI_STATUS 670*450d6964Smyers AcpiUtAllocateOwnerId ( 671*450d6964Smyers ACPI_OWNER_ID *OwnerId); 672*450d6964Smyers 673*450d6964Smyers ACPI_STATUS 674*450d6964Smyers AcpiUtReleaseOwnerId ( 675*450d6964Smyers ACPI_OWNER_ID OwnerId); 676*450d6964Smyers 677*450d6964Smyers ACPI_STATUS 6787c478bd9Sstevel@tonic-gate AcpiUtWalkPackageTree ( 6797c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *SourceObject, 6807c478bd9Sstevel@tonic-gate void *TargetObject, 6817c478bd9Sstevel@tonic-gate ACPI_PKG_CALLBACK WalkCallback, 6827c478bd9Sstevel@tonic-gate void *Context); 6837c478bd9Sstevel@tonic-gate 6847c478bd9Sstevel@tonic-gate char * 6857c478bd9Sstevel@tonic-gate AcpiUtStrupr ( 6867c478bd9Sstevel@tonic-gate char *SrcString); 6877c478bd9Sstevel@tonic-gate 6887c478bd9Sstevel@tonic-gate void 6897c478bd9Sstevel@tonic-gate AcpiUtPrintString ( 6907c478bd9Sstevel@tonic-gate char *String, 6917c478bd9Sstevel@tonic-gate UINT8 MaxLength); 6927c478bd9Sstevel@tonic-gate 6937c478bd9Sstevel@tonic-gate BOOLEAN 6947c478bd9Sstevel@tonic-gate AcpiUtValidAcpiName ( 6957c478bd9Sstevel@tonic-gate UINT32 Name); 6967c478bd9Sstevel@tonic-gate 6977c478bd9Sstevel@tonic-gate BOOLEAN 6987c478bd9Sstevel@tonic-gate AcpiUtValidAcpiCharacter ( 6997c478bd9Sstevel@tonic-gate char Character); 7007c478bd9Sstevel@tonic-gate 7017c478bd9Sstevel@tonic-gate ACPI_STATUS 7027c478bd9Sstevel@tonic-gate AcpiUtStrtoul64 ( 7037c478bd9Sstevel@tonic-gate char *String, 7047c478bd9Sstevel@tonic-gate UINT32 Base, 7057c478bd9Sstevel@tonic-gate ACPI_INTEGER *RetInteger); 7067c478bd9Sstevel@tonic-gate 7077c478bd9Sstevel@tonic-gate /* Values for Base above (16=Hex, 10=Decimal) */ 7087c478bd9Sstevel@tonic-gate 7097c478bd9Sstevel@tonic-gate #define ACPI_ANY_BASE 0 7107c478bd9Sstevel@tonic-gate 7117c478bd9Sstevel@tonic-gate UINT8 * 7127c478bd9Sstevel@tonic-gate AcpiUtGetResourceEndTag ( 7137c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *ObjDesc); 7147c478bd9Sstevel@tonic-gate 7157c478bd9Sstevel@tonic-gate UINT8 7167c478bd9Sstevel@tonic-gate AcpiUtGenerateChecksum ( 7177c478bd9Sstevel@tonic-gate UINT8 *Buffer, 7187c478bd9Sstevel@tonic-gate UINT32 Length); 7197c478bd9Sstevel@tonic-gate 7207c478bd9Sstevel@tonic-gate UINT32 7217c478bd9Sstevel@tonic-gate AcpiUtDwordByteSwap ( 7227c478bd9Sstevel@tonic-gate UINT32 Value); 7237c478bd9Sstevel@tonic-gate 7247c478bd9Sstevel@tonic-gate void 7257c478bd9Sstevel@tonic-gate AcpiUtSetIntegerWidth ( 7267c478bd9Sstevel@tonic-gate UINT8 Revision); 7277c478bd9Sstevel@tonic-gate 7287c478bd9Sstevel@tonic-gate #ifdef ACPI_DEBUG_OUTPUT 7297c478bd9Sstevel@tonic-gate void 7307c478bd9Sstevel@tonic-gate AcpiUtDisplayInitPathname ( 7317c478bd9Sstevel@tonic-gate UINT8 Type, 7327c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *ObjHandle, 7337c478bd9Sstevel@tonic-gate char *Path); 7347c478bd9Sstevel@tonic-gate 7357c478bd9Sstevel@tonic-gate #endif 7367c478bd9Sstevel@tonic-gate 7377c478bd9Sstevel@tonic-gate 7387c478bd9Sstevel@tonic-gate /* 739*450d6964Smyers * utmutex - mutex support 740*450d6964Smyers */ 741*450d6964Smyers ACPI_STATUS 742*450d6964Smyers AcpiUtMutexInitialize ( 743*450d6964Smyers void); 744*450d6964Smyers 745*450d6964Smyers void 746*450d6964Smyers AcpiUtMutexTerminate ( 747*450d6964Smyers void); 748*450d6964Smyers 749*450d6964Smyers ACPI_STATUS 750*450d6964Smyers AcpiUtAcquireMutex ( 751*450d6964Smyers ACPI_MUTEX_HANDLE MutexId); 752*450d6964Smyers 753*450d6964Smyers ACPI_STATUS 754*450d6964Smyers AcpiUtReleaseMutex ( 755*450d6964Smyers ACPI_MUTEX_HANDLE MutexId); 756*450d6964Smyers 757*450d6964Smyers 758*450d6964Smyers 759*450d6964Smyers /* 7607c478bd9Sstevel@tonic-gate * utalloc - memory allocation and object caching 7617c478bd9Sstevel@tonic-gate */ 762*450d6964Smyers ACPI_STATUS 763*450d6964Smyers AcpiUtCreateCaches ( 764*450d6964Smyers void); 7657c478bd9Sstevel@tonic-gate 766*450d6964Smyers ACPI_STATUS 767*450d6964Smyers AcpiUtDeleteCaches ( 768*450d6964Smyers void); 7697c478bd9Sstevel@tonic-gate 7707c478bd9Sstevel@tonic-gate ACPI_STATUS 7717c478bd9Sstevel@tonic-gate AcpiUtValidateBuffer ( 7727c478bd9Sstevel@tonic-gate ACPI_BUFFER *Buffer); 7737c478bd9Sstevel@tonic-gate 7747c478bd9Sstevel@tonic-gate ACPI_STATUS 7757c478bd9Sstevel@tonic-gate AcpiUtInitializeBuffer ( 7767c478bd9Sstevel@tonic-gate ACPI_BUFFER *Buffer, 7777c478bd9Sstevel@tonic-gate ACPI_SIZE RequiredLength); 7787c478bd9Sstevel@tonic-gate 7797c478bd9Sstevel@tonic-gate void * 7807c478bd9Sstevel@tonic-gate AcpiUtAllocate ( 7817c478bd9Sstevel@tonic-gate ACPI_SIZE Size, 7827c478bd9Sstevel@tonic-gate UINT32 Component, 7837c478bd9Sstevel@tonic-gate char *Module, 7847c478bd9Sstevel@tonic-gate UINT32 Line); 7857c478bd9Sstevel@tonic-gate 7867c478bd9Sstevel@tonic-gate void * 7877c478bd9Sstevel@tonic-gate AcpiUtCallocate ( 7887c478bd9Sstevel@tonic-gate ACPI_SIZE Size, 7897c478bd9Sstevel@tonic-gate UINT32 Component, 7907c478bd9Sstevel@tonic-gate char *Module, 7917c478bd9Sstevel@tonic-gate UINT32 Line); 7927c478bd9Sstevel@tonic-gate 7937c478bd9Sstevel@tonic-gate #ifdef ACPI_DBG_TRACK_ALLOCATIONS 7947c478bd9Sstevel@tonic-gate void * 7957c478bd9Sstevel@tonic-gate AcpiUtAllocateAndTrack ( 7967c478bd9Sstevel@tonic-gate ACPI_SIZE Size, 7977c478bd9Sstevel@tonic-gate UINT32 Component, 7987c478bd9Sstevel@tonic-gate char *Module, 7997c478bd9Sstevel@tonic-gate UINT32 Line); 8007c478bd9Sstevel@tonic-gate 8017c478bd9Sstevel@tonic-gate void * 8027c478bd9Sstevel@tonic-gate AcpiUtCallocateAndTrack ( 8037c478bd9Sstevel@tonic-gate ACPI_SIZE Size, 8047c478bd9Sstevel@tonic-gate UINT32 Component, 8057c478bd9Sstevel@tonic-gate char *Module, 8067c478bd9Sstevel@tonic-gate UINT32 Line); 8077c478bd9Sstevel@tonic-gate 8087c478bd9Sstevel@tonic-gate void 8097c478bd9Sstevel@tonic-gate AcpiUtFreeAndTrack ( 8107c478bd9Sstevel@tonic-gate void *Address, 8117c478bd9Sstevel@tonic-gate UINT32 Component, 8127c478bd9Sstevel@tonic-gate char *Module, 8137c478bd9Sstevel@tonic-gate UINT32 Line); 8147c478bd9Sstevel@tonic-gate 8157c478bd9Sstevel@tonic-gate void 8167c478bd9Sstevel@tonic-gate AcpiUtDumpAllocationInfo ( 8177c478bd9Sstevel@tonic-gate void); 8187c478bd9Sstevel@tonic-gate 8197c478bd9Sstevel@tonic-gate void 8207c478bd9Sstevel@tonic-gate AcpiUtDumpAllocations ( 8217c478bd9Sstevel@tonic-gate UINT32 Component, 8227c478bd9Sstevel@tonic-gate char *Module); 8237c478bd9Sstevel@tonic-gate #endif 8247c478bd9Sstevel@tonic-gate 8257c478bd9Sstevel@tonic-gate #endif /* _ACUTILS_H */ 826