17c478bd9Sstevel@tonic-gate /****************************************************************************** 27c478bd9Sstevel@tonic-gate * 37c478bd9Sstevel@tonic-gate * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures 4*27f7c583Smyers * $Revision: 1.196 $ 57c478bd9Sstevel@tonic-gate * 67c478bd9Sstevel@tonic-gate *****************************************************************************/ 77c478bd9Sstevel@tonic-gate 87c478bd9Sstevel@tonic-gate /****************************************************************************** 97c478bd9Sstevel@tonic-gate * 107c478bd9Sstevel@tonic-gate * 1. Copyright Notice 117c478bd9Sstevel@tonic-gate * 1230082d0cSmyers * Some or all of this work - Copyright (c) 1999 - 2006, 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 12130082d0cSmyers extern const UINT8 AcpiGbl_ResourceAmlSizes[]; 12230082d0cSmyers 12330082d0cSmyers /* Strings used by the disassembler and debugger resource dump routines */ 12430082d0cSmyers 12530082d0cSmyers #if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER) 12630082d0cSmyers 127*27f7c583Smyers extern const char *AcpiGbl_BmDecode[]; 128*27f7c583Smyers extern const char *AcpiGbl_ConfigDecode[]; 129*27f7c583Smyers extern const char *AcpiGbl_ConsumeDecode[]; 130*27f7c583Smyers extern const char *AcpiGbl_DecDecode[]; 131*27f7c583Smyers extern const char *AcpiGbl_HeDecode[]; 132*27f7c583Smyers extern const char *AcpiGbl_IoDecode[]; 133*27f7c583Smyers extern const char *AcpiGbl_LlDecode[]; 134*27f7c583Smyers extern const char *AcpiGbl_MaxDecode[]; 135*27f7c583Smyers extern const char *AcpiGbl_MemDecode[]; 136*27f7c583Smyers extern const char *AcpiGbl_MinDecode[]; 137*27f7c583Smyers extern const char *AcpiGbl_MtpDecode[]; 138*27f7c583Smyers extern const char *AcpiGbl_RngDecode[]; 139*27f7c583Smyers extern const char *AcpiGbl_RwDecode[]; 140*27f7c583Smyers extern const char *AcpiGbl_ShrDecode[]; 141*27f7c583Smyers extern const char *AcpiGbl_SizDecode[]; 142*27f7c583Smyers extern const char *AcpiGbl_TrsDecode[]; 143*27f7c583Smyers extern const char *AcpiGbl_TtpDecode[]; 144*27f7c583Smyers extern const char *AcpiGbl_TypDecode[]; 14530082d0cSmyers #endif 14630082d0cSmyers 14730082d0cSmyers /* Types for Resource descriptor entries */ 14830082d0cSmyers 14930082d0cSmyers #define ACPI_INVALID_RESOURCE 0 15030082d0cSmyers #define ACPI_FIXED_LENGTH 1 15130082d0cSmyers #define ACPI_VARIABLE_LENGTH 2 15230082d0cSmyers #define ACPI_SMALL_VARIABLE_LENGTH 3 15330082d0cSmyers 154*27f7c583Smyers typedef 155*27f7c583Smyers ACPI_STATUS (*ACPI_WALK_AML_CALLBACK) ( 156*27f7c583Smyers UINT8 *Aml, 157*27f7c583Smyers UINT32 Length, 158*27f7c583Smyers UINT32 Offset, 159*27f7c583Smyers UINT8 ResourceIndex, 160*27f7c583Smyers void *Context); 161*27f7c583Smyers 1627c478bd9Sstevel@tonic-gate typedef 1637c478bd9Sstevel@tonic-gate ACPI_STATUS (*ACPI_PKG_CALLBACK) ( 1647c478bd9Sstevel@tonic-gate UINT8 ObjectType, 1657c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *SourceObject, 1667c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE *State, 1677c478bd9Sstevel@tonic-gate void *Context); 1687c478bd9Sstevel@tonic-gate 1697c478bd9Sstevel@tonic-gate typedef struct acpi_pkg_info 1707c478bd9Sstevel@tonic-gate { 1717c478bd9Sstevel@tonic-gate UINT8 *FreeSpace; 1727c478bd9Sstevel@tonic-gate ACPI_SIZE Length; 1737c478bd9Sstevel@tonic-gate UINT32 ObjectSpace; 1747c478bd9Sstevel@tonic-gate UINT32 NumPackages; 1757c478bd9Sstevel@tonic-gate 1767c478bd9Sstevel@tonic-gate } ACPI_PKG_INFO; 1777c478bd9Sstevel@tonic-gate 1787c478bd9Sstevel@tonic-gate #define REF_INCREMENT (UINT16) 0 1797c478bd9Sstevel@tonic-gate #define REF_DECREMENT (UINT16) 1 1807c478bd9Sstevel@tonic-gate #define REF_FORCE_DELETE (UINT16) 2 1817c478bd9Sstevel@tonic-gate 1827c478bd9Sstevel@tonic-gate /* AcpiUtDumpBuffer */ 1837c478bd9Sstevel@tonic-gate 1847c478bd9Sstevel@tonic-gate #define DB_BYTE_DISPLAY 1 1857c478bd9Sstevel@tonic-gate #define DB_WORD_DISPLAY 2 1867c478bd9Sstevel@tonic-gate #define DB_DWORD_DISPLAY 4 1877c478bd9Sstevel@tonic-gate #define DB_QWORD_DISPLAY 8 1887c478bd9Sstevel@tonic-gate 1897c478bd9Sstevel@tonic-gate 1907c478bd9Sstevel@tonic-gate /* 1917c478bd9Sstevel@tonic-gate * utglobal - Global data structures and procedures 1927c478bd9Sstevel@tonic-gate */ 1937c478bd9Sstevel@tonic-gate void 1947c478bd9Sstevel@tonic-gate AcpiUtInitGlobals ( 1957c478bd9Sstevel@tonic-gate void); 1967c478bd9Sstevel@tonic-gate 1977c478bd9Sstevel@tonic-gate #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 1987c478bd9Sstevel@tonic-gate 1997c478bd9Sstevel@tonic-gate char * 2007c478bd9Sstevel@tonic-gate AcpiUtGetMutexName ( 2017c478bd9Sstevel@tonic-gate UINT32 MutexId); 2027c478bd9Sstevel@tonic-gate 2037c478bd9Sstevel@tonic-gate #endif 2047c478bd9Sstevel@tonic-gate 2057c478bd9Sstevel@tonic-gate char * 2067c478bd9Sstevel@tonic-gate AcpiUtGetTypeName ( 2077c478bd9Sstevel@tonic-gate ACPI_OBJECT_TYPE Type); 2087c478bd9Sstevel@tonic-gate 2097c478bd9Sstevel@tonic-gate char * 2107c478bd9Sstevel@tonic-gate AcpiUtGetNodeName ( 2117c478bd9Sstevel@tonic-gate void *Object); 2127c478bd9Sstevel@tonic-gate 2137c478bd9Sstevel@tonic-gate char * 2147c478bd9Sstevel@tonic-gate AcpiUtGetDescriptorName ( 2157c478bd9Sstevel@tonic-gate void *Object); 2167c478bd9Sstevel@tonic-gate 2177c478bd9Sstevel@tonic-gate char * 2187c478bd9Sstevel@tonic-gate AcpiUtGetObjectTypeName ( 2197c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *ObjDesc); 2207c478bd9Sstevel@tonic-gate 2217c478bd9Sstevel@tonic-gate char * 2227c478bd9Sstevel@tonic-gate AcpiUtGetRegionName ( 2237c478bd9Sstevel@tonic-gate UINT8 SpaceId); 2247c478bd9Sstevel@tonic-gate 2257c478bd9Sstevel@tonic-gate char * 2267c478bd9Sstevel@tonic-gate AcpiUtGetEventName ( 2277c478bd9Sstevel@tonic-gate UINT32 EventId); 2287c478bd9Sstevel@tonic-gate 2297c478bd9Sstevel@tonic-gate char 2307c478bd9Sstevel@tonic-gate AcpiUtHexToAsciiChar ( 2317c478bd9Sstevel@tonic-gate ACPI_INTEGER Integer, 2327c478bd9Sstevel@tonic-gate UINT32 Position); 2337c478bd9Sstevel@tonic-gate 2347c478bd9Sstevel@tonic-gate BOOLEAN 2357c478bd9Sstevel@tonic-gate AcpiUtValidObjectType ( 2367c478bd9Sstevel@tonic-gate ACPI_OBJECT_TYPE Type); 2377c478bd9Sstevel@tonic-gate 2387c478bd9Sstevel@tonic-gate 2397c478bd9Sstevel@tonic-gate /* 2407c478bd9Sstevel@tonic-gate * utinit - miscellaneous initialization and shutdown 2417c478bd9Sstevel@tonic-gate */ 2427c478bd9Sstevel@tonic-gate ACPI_STATUS 2437c478bd9Sstevel@tonic-gate AcpiUtHardwareInitialize ( 2447c478bd9Sstevel@tonic-gate void); 2457c478bd9Sstevel@tonic-gate 2467c478bd9Sstevel@tonic-gate void 2477c478bd9Sstevel@tonic-gate AcpiUtSubsystemShutdown ( 2487c478bd9Sstevel@tonic-gate void); 2497c478bd9Sstevel@tonic-gate 2507c478bd9Sstevel@tonic-gate ACPI_STATUS 2517c478bd9Sstevel@tonic-gate AcpiUtValidateFadt ( 2527c478bd9Sstevel@tonic-gate void); 2537c478bd9Sstevel@tonic-gate 2547c478bd9Sstevel@tonic-gate 2557c478bd9Sstevel@tonic-gate /* 2567c478bd9Sstevel@tonic-gate * utclib - Local implementations of C library functions 2577c478bd9Sstevel@tonic-gate */ 2587c478bd9Sstevel@tonic-gate #ifndef ACPI_USE_SYSTEM_CLIBRARY 2597c478bd9Sstevel@tonic-gate 2607c478bd9Sstevel@tonic-gate ACPI_SIZE 2617c478bd9Sstevel@tonic-gate AcpiUtStrlen ( 2627c478bd9Sstevel@tonic-gate const char *String); 2637c478bd9Sstevel@tonic-gate 2647c478bd9Sstevel@tonic-gate char * 2657c478bd9Sstevel@tonic-gate AcpiUtStrcpy ( 2667c478bd9Sstevel@tonic-gate char *DstString, 2677c478bd9Sstevel@tonic-gate const char *SrcString); 2687c478bd9Sstevel@tonic-gate 2697c478bd9Sstevel@tonic-gate char * 2707c478bd9Sstevel@tonic-gate AcpiUtStrncpy ( 2717c478bd9Sstevel@tonic-gate char *DstString, 2727c478bd9Sstevel@tonic-gate const char *SrcString, 2737c478bd9Sstevel@tonic-gate ACPI_SIZE Count); 2747c478bd9Sstevel@tonic-gate 2757c478bd9Sstevel@tonic-gate int 2767c478bd9Sstevel@tonic-gate AcpiUtMemcmp ( 2777c478bd9Sstevel@tonic-gate const char *Buffer1, 2787c478bd9Sstevel@tonic-gate const char *Buffer2, 2797c478bd9Sstevel@tonic-gate ACPI_SIZE Count); 2807c478bd9Sstevel@tonic-gate 2817c478bd9Sstevel@tonic-gate int 2827c478bd9Sstevel@tonic-gate AcpiUtStrncmp ( 2837c478bd9Sstevel@tonic-gate const char *String1, 2847c478bd9Sstevel@tonic-gate const char *String2, 2857c478bd9Sstevel@tonic-gate ACPI_SIZE Count); 2867c478bd9Sstevel@tonic-gate 2877c478bd9Sstevel@tonic-gate int 2887c478bd9Sstevel@tonic-gate AcpiUtStrcmp ( 2897c478bd9Sstevel@tonic-gate const char *String1, 2907c478bd9Sstevel@tonic-gate const char *String2); 2917c478bd9Sstevel@tonic-gate 2927c478bd9Sstevel@tonic-gate char * 2937c478bd9Sstevel@tonic-gate AcpiUtStrcat ( 2947c478bd9Sstevel@tonic-gate char *DstString, 2957c478bd9Sstevel@tonic-gate const char *SrcString); 2967c478bd9Sstevel@tonic-gate 2977c478bd9Sstevel@tonic-gate char * 2987c478bd9Sstevel@tonic-gate AcpiUtStrncat ( 2997c478bd9Sstevel@tonic-gate char *DstString, 3007c478bd9Sstevel@tonic-gate const char *SrcString, 3017c478bd9Sstevel@tonic-gate ACPI_SIZE Count); 3027c478bd9Sstevel@tonic-gate 3037c478bd9Sstevel@tonic-gate UINT32 3047c478bd9Sstevel@tonic-gate AcpiUtStrtoul ( 3057c478bd9Sstevel@tonic-gate const char *String, 3067c478bd9Sstevel@tonic-gate char **Terminator, 3077c478bd9Sstevel@tonic-gate UINT32 Base); 3087c478bd9Sstevel@tonic-gate 3097c478bd9Sstevel@tonic-gate char * 3107c478bd9Sstevel@tonic-gate AcpiUtStrstr ( 3117c478bd9Sstevel@tonic-gate char *String1, 3127c478bd9Sstevel@tonic-gate char *String2); 3137c478bd9Sstevel@tonic-gate 3147c478bd9Sstevel@tonic-gate void * 3157c478bd9Sstevel@tonic-gate AcpiUtMemcpy ( 3167c478bd9Sstevel@tonic-gate void *Dest, 3177c478bd9Sstevel@tonic-gate const void *Src, 3187c478bd9Sstevel@tonic-gate ACPI_SIZE Count); 3197c478bd9Sstevel@tonic-gate 3207c478bd9Sstevel@tonic-gate void * 3217c478bd9Sstevel@tonic-gate AcpiUtMemset ( 3227c478bd9Sstevel@tonic-gate void *Dest, 3237c478bd9Sstevel@tonic-gate ACPI_NATIVE_UINT Value, 3247c478bd9Sstevel@tonic-gate ACPI_SIZE Count); 3257c478bd9Sstevel@tonic-gate 3267c478bd9Sstevel@tonic-gate int 3277c478bd9Sstevel@tonic-gate AcpiUtToUpper ( 3287c478bd9Sstevel@tonic-gate int c); 3297c478bd9Sstevel@tonic-gate 3307c478bd9Sstevel@tonic-gate int 3317c478bd9Sstevel@tonic-gate AcpiUtToLower ( 3327c478bd9Sstevel@tonic-gate int c); 3337c478bd9Sstevel@tonic-gate 3347c478bd9Sstevel@tonic-gate extern const UINT8 _acpi_ctype[]; 3357c478bd9Sstevel@tonic-gate 3367c478bd9Sstevel@tonic-gate #define _ACPI_XA 0x00 /* extra alphabetic - not supported */ 3377c478bd9Sstevel@tonic-gate #define _ACPI_XS 0x40 /* extra space */ 3387c478bd9Sstevel@tonic-gate #define _ACPI_BB 0x00 /* BEL, BS, etc. - not supported */ 3397c478bd9Sstevel@tonic-gate #define _ACPI_CN 0x20 /* CR, FF, HT, NL, VT */ 3407c478bd9Sstevel@tonic-gate #define _ACPI_DI 0x04 /* '0'-'9' */ 3417c478bd9Sstevel@tonic-gate #define _ACPI_LO 0x02 /* 'a'-'z' */ 3427c478bd9Sstevel@tonic-gate #define _ACPI_PU 0x10 /* punctuation */ 3437c478bd9Sstevel@tonic-gate #define _ACPI_SP 0x08 /* space */ 3447c478bd9Sstevel@tonic-gate #define _ACPI_UP 0x01 /* 'A'-'Z' */ 3457c478bd9Sstevel@tonic-gate #define _ACPI_XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */ 3467c478bd9Sstevel@tonic-gate 3477c478bd9Sstevel@tonic-gate #define ACPI_IS_DIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI)) 3487c478bd9Sstevel@tonic-gate #define ACPI_IS_SPACE(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP)) 3497c478bd9Sstevel@tonic-gate #define ACPI_IS_XDIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_XD)) 3507c478bd9Sstevel@tonic-gate #define ACPI_IS_UPPER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_UP)) 3517c478bd9Sstevel@tonic-gate #define ACPI_IS_LOWER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO)) 3527c478bd9Sstevel@tonic-gate #define ACPI_IS_PRINT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_SP | _ACPI_PU)) 3537c478bd9Sstevel@tonic-gate #define ACPI_IS_ALPHA(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP)) 3547c478bd9Sstevel@tonic-gate 3557c478bd9Sstevel@tonic-gate #endif /* ACPI_USE_SYSTEM_CLIBRARY */ 3567c478bd9Sstevel@tonic-gate 3577c478bd9Sstevel@tonic-gate 3587c478bd9Sstevel@tonic-gate /* 3597c478bd9Sstevel@tonic-gate * utcopy - Object construction and conversion interfaces 3607c478bd9Sstevel@tonic-gate */ 3617c478bd9Sstevel@tonic-gate ACPI_STATUS 3627c478bd9Sstevel@tonic-gate AcpiUtBuildSimpleObject( 3637c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Obj, 3647c478bd9Sstevel@tonic-gate ACPI_OBJECT *UserObj, 3657c478bd9Sstevel@tonic-gate UINT8 *DataSpace, 3667c478bd9Sstevel@tonic-gate UINT32 *BufferSpaceUsed); 3677c478bd9Sstevel@tonic-gate 3687c478bd9Sstevel@tonic-gate ACPI_STATUS 3697c478bd9Sstevel@tonic-gate AcpiUtBuildPackageObject ( 3707c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Obj, 3717c478bd9Sstevel@tonic-gate UINT8 *Buffer, 3727c478bd9Sstevel@tonic-gate UINT32 *SpaceUsed); 3737c478bd9Sstevel@tonic-gate 3747c478bd9Sstevel@tonic-gate ACPI_STATUS 3757c478bd9Sstevel@tonic-gate AcpiUtCopyIobjectToEobject ( 3767c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Obj, 3777c478bd9Sstevel@tonic-gate ACPI_BUFFER *RetBuffer); 3787c478bd9Sstevel@tonic-gate 3797c478bd9Sstevel@tonic-gate ACPI_STATUS 3807c478bd9Sstevel@tonic-gate AcpiUtCopyEobjectToIobject ( 3817c478bd9Sstevel@tonic-gate ACPI_OBJECT *Obj, 3827c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT **InternalObj); 3837c478bd9Sstevel@tonic-gate 3847c478bd9Sstevel@tonic-gate ACPI_STATUS 3857c478bd9Sstevel@tonic-gate AcpiUtCopyISimpleToIsimple ( 3867c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *SourceObj, 3877c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *DestObj); 3887c478bd9Sstevel@tonic-gate 3897c478bd9Sstevel@tonic-gate ACPI_STATUS 3907c478bd9Sstevel@tonic-gate AcpiUtCopyIobjectToIobject ( 3917c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *SourceDesc, 3927c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT **DestDesc, 3937c478bd9Sstevel@tonic-gate ACPI_WALK_STATE *WalkState); 3947c478bd9Sstevel@tonic-gate 3957c478bd9Sstevel@tonic-gate 3967c478bd9Sstevel@tonic-gate /* 3977c478bd9Sstevel@tonic-gate * utcreate - Object creation 3987c478bd9Sstevel@tonic-gate */ 3997c478bd9Sstevel@tonic-gate ACPI_STATUS 4007c478bd9Sstevel@tonic-gate AcpiUtUpdateObjectReference ( 4017c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object, 4027c478bd9Sstevel@tonic-gate UINT16 Action); 4037c478bd9Sstevel@tonic-gate 4047c478bd9Sstevel@tonic-gate 4057c478bd9Sstevel@tonic-gate /* 4067c478bd9Sstevel@tonic-gate * utdebug - Debug interfaces 4077c478bd9Sstevel@tonic-gate */ 4087c478bd9Sstevel@tonic-gate void 4097c478bd9Sstevel@tonic-gate AcpiUtInitStackPtrTrace ( 4107c478bd9Sstevel@tonic-gate void); 4117c478bd9Sstevel@tonic-gate 4127c478bd9Sstevel@tonic-gate void 4137c478bd9Sstevel@tonic-gate AcpiUtTrackStackPtr ( 4147c478bd9Sstevel@tonic-gate void); 4157c478bd9Sstevel@tonic-gate 4167c478bd9Sstevel@tonic-gate void 4177c478bd9Sstevel@tonic-gate AcpiUtTrace ( 4187c478bd9Sstevel@tonic-gate UINT32 LineNumber, 419186507a7Smyers const char *FunctionName, 420450d6964Smyers char *ModuleName, 421450d6964Smyers UINT32 ComponentId); 4227c478bd9Sstevel@tonic-gate 4237c478bd9Sstevel@tonic-gate void 4247c478bd9Sstevel@tonic-gate AcpiUtTracePtr ( 4257c478bd9Sstevel@tonic-gate UINT32 LineNumber, 426186507a7Smyers const char *FunctionName, 427450d6964Smyers char *ModuleName, 428450d6964Smyers UINT32 ComponentId, 4297c478bd9Sstevel@tonic-gate void *Pointer); 4307c478bd9Sstevel@tonic-gate 4317c478bd9Sstevel@tonic-gate void 4327c478bd9Sstevel@tonic-gate AcpiUtTraceU32 ( 4337c478bd9Sstevel@tonic-gate UINT32 LineNumber, 434186507a7Smyers const char *FunctionName, 435450d6964Smyers char *ModuleName, 436450d6964Smyers UINT32 ComponentId, 4377c478bd9Sstevel@tonic-gate UINT32 Integer); 4387c478bd9Sstevel@tonic-gate 4397c478bd9Sstevel@tonic-gate void 4407c478bd9Sstevel@tonic-gate AcpiUtTraceStr ( 4417c478bd9Sstevel@tonic-gate UINT32 LineNumber, 442186507a7Smyers const char *FunctionName, 443450d6964Smyers char *ModuleName, 444450d6964Smyers UINT32 ComponentId, 4457c478bd9Sstevel@tonic-gate char *String); 4467c478bd9Sstevel@tonic-gate 4477c478bd9Sstevel@tonic-gate void 4487c478bd9Sstevel@tonic-gate AcpiUtExit ( 4497c478bd9Sstevel@tonic-gate UINT32 LineNumber, 450186507a7Smyers const char *FunctionName, 451450d6964Smyers char *ModuleName, 452450d6964Smyers UINT32 ComponentId); 4537c478bd9Sstevel@tonic-gate 4547c478bd9Sstevel@tonic-gate void 4557c478bd9Sstevel@tonic-gate AcpiUtStatusExit ( 4567c478bd9Sstevel@tonic-gate UINT32 LineNumber, 457186507a7Smyers const char *FunctionName, 458450d6964Smyers char *ModuleName, 459450d6964Smyers UINT32 ComponentId, 4607c478bd9Sstevel@tonic-gate ACPI_STATUS Status); 4617c478bd9Sstevel@tonic-gate 4627c478bd9Sstevel@tonic-gate void 4637c478bd9Sstevel@tonic-gate AcpiUtValueExit ( 4647c478bd9Sstevel@tonic-gate UINT32 LineNumber, 465186507a7Smyers const char *FunctionName, 466450d6964Smyers char *ModuleName, 467450d6964Smyers UINT32 ComponentId, 4687c478bd9Sstevel@tonic-gate ACPI_INTEGER Value); 4697c478bd9Sstevel@tonic-gate 4707c478bd9Sstevel@tonic-gate void 4717c478bd9Sstevel@tonic-gate AcpiUtPtrExit ( 4727c478bd9Sstevel@tonic-gate UINT32 LineNumber, 473186507a7Smyers const char *FunctionName, 474450d6964Smyers char *ModuleName, 475450d6964Smyers UINT32 ComponentId, 4767c478bd9Sstevel@tonic-gate UINT8 *Ptr); 4777c478bd9Sstevel@tonic-gate 4787c478bd9Sstevel@tonic-gate void 47930082d0cSmyers AcpiUtDumpBuffer ( 48030082d0cSmyers UINT8 *Buffer, 48130082d0cSmyers UINT32 Count, 48230082d0cSmyers UINT32 Display, 48330082d0cSmyers UINT32 componentId); 4847c478bd9Sstevel@tonic-gate 485*27f7c583Smyers void 486*27f7c583Smyers AcpiUtDumpBuffer2 ( 487*27f7c583Smyers UINT8 *Buffer, 488*27f7c583Smyers UINT32 Count, 489*27f7c583Smyers UINT32 Display); 490*27f7c583Smyers 4917c478bd9Sstevel@tonic-gate void 4927c478bd9Sstevel@tonic-gate AcpiUtReportError ( 4937c478bd9Sstevel@tonic-gate char *ModuleName, 49430082d0cSmyers UINT32 LineNumber); 4957c478bd9Sstevel@tonic-gate 4967c478bd9Sstevel@tonic-gate void 49730082d0cSmyers AcpiUtReportInfo ( 4987c478bd9Sstevel@tonic-gate char *ModuleName, 49930082d0cSmyers UINT32 LineNumber); 5007c478bd9Sstevel@tonic-gate 5017c478bd9Sstevel@tonic-gate void 50230082d0cSmyers AcpiUtReportWarning ( 50330082d0cSmyers char *ModuleName, 50430082d0cSmyers UINT32 LineNumber); 50530082d0cSmyers 50630082d0cSmyers /* Error and message reporting interfaces */ 5077c478bd9Sstevel@tonic-gate 5087c478bd9Sstevel@tonic-gate void ACPI_INTERNAL_VAR_XFACE 5097c478bd9Sstevel@tonic-gate AcpiUtDebugPrint ( 5107c478bd9Sstevel@tonic-gate UINT32 RequestedDebugLevel, 5117c478bd9Sstevel@tonic-gate UINT32 LineNumber, 512186507a7Smyers const char *FunctionName, 513450d6964Smyers char *ModuleName, 514450d6964Smyers UINT32 ComponentId, 5157c478bd9Sstevel@tonic-gate char *Format, 51630082d0cSmyers ...) ACPI_PRINTF_LIKE(6); 5177c478bd9Sstevel@tonic-gate 5187c478bd9Sstevel@tonic-gate void ACPI_INTERNAL_VAR_XFACE 5197c478bd9Sstevel@tonic-gate AcpiUtDebugPrintRaw ( 5207c478bd9Sstevel@tonic-gate UINT32 RequestedDebugLevel, 5217c478bd9Sstevel@tonic-gate UINT32 LineNumber, 522186507a7Smyers const char *FunctionName, 523450d6964Smyers char *ModuleName, 524450d6964Smyers UINT32 ComponentId, 5257c478bd9Sstevel@tonic-gate char *Format, 52630082d0cSmyers ...) ACPI_PRINTF_LIKE(6); 52730082d0cSmyers 52830082d0cSmyers void ACPI_INTERNAL_VAR_XFACE 52930082d0cSmyers AcpiUtError ( 53030082d0cSmyers char *ModuleName, 53130082d0cSmyers UINT32 LineNumber, 53230082d0cSmyers char *Format, 53330082d0cSmyers ...) ACPI_PRINTF_LIKE(3); 53430082d0cSmyers 53530082d0cSmyers void ACPI_INTERNAL_VAR_XFACE 53630082d0cSmyers AcpiUtException ( 53730082d0cSmyers char *ModuleName, 53830082d0cSmyers UINT32 LineNumber, 53930082d0cSmyers ACPI_STATUS Status, 54030082d0cSmyers char *Format, 54130082d0cSmyers ...) ACPI_PRINTF_LIKE(4); 54230082d0cSmyers 54330082d0cSmyers void ACPI_INTERNAL_VAR_XFACE 54430082d0cSmyers AcpiUtWarning ( 54530082d0cSmyers char *ModuleName, 54630082d0cSmyers UINT32 LineNumber, 54730082d0cSmyers char *Format, 54830082d0cSmyers ...) ACPI_PRINTF_LIKE(3); 54930082d0cSmyers 55030082d0cSmyers void ACPI_INTERNAL_VAR_XFACE 55130082d0cSmyers AcpiUtInfo ( 55230082d0cSmyers char *ModuleName, 55330082d0cSmyers UINT32 LineNumber, 55430082d0cSmyers char *Format, 55530082d0cSmyers ...) ACPI_PRINTF_LIKE(3); 5567c478bd9Sstevel@tonic-gate 5577c478bd9Sstevel@tonic-gate 5587c478bd9Sstevel@tonic-gate /* 5597c478bd9Sstevel@tonic-gate * utdelete - Object deletion and reference counts 5607c478bd9Sstevel@tonic-gate */ 5617c478bd9Sstevel@tonic-gate void 5627c478bd9Sstevel@tonic-gate AcpiUtAddReference ( 5637c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object); 5647c478bd9Sstevel@tonic-gate 5657c478bd9Sstevel@tonic-gate void 5667c478bd9Sstevel@tonic-gate AcpiUtRemoveReference ( 5677c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object); 5687c478bd9Sstevel@tonic-gate 5697c478bd9Sstevel@tonic-gate void 5707c478bd9Sstevel@tonic-gate AcpiUtDeleteInternalPackageObject ( 5717c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object); 5727c478bd9Sstevel@tonic-gate 5737c478bd9Sstevel@tonic-gate void 5747c478bd9Sstevel@tonic-gate AcpiUtDeleteInternalSimpleObject ( 5757c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object); 5767c478bd9Sstevel@tonic-gate 5777c478bd9Sstevel@tonic-gate void 5787c478bd9Sstevel@tonic-gate AcpiUtDeleteInternalObjectList ( 5797c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT **ObjList); 5807c478bd9Sstevel@tonic-gate 5817c478bd9Sstevel@tonic-gate 5827c478bd9Sstevel@tonic-gate /* 5837c478bd9Sstevel@tonic-gate * uteval - object evaluation 5847c478bd9Sstevel@tonic-gate */ 5857c478bd9Sstevel@tonic-gate ACPI_STATUS 5867c478bd9Sstevel@tonic-gate AcpiUtOsiImplementation ( 5877c478bd9Sstevel@tonic-gate ACPI_WALK_STATE *WalkState); 5887c478bd9Sstevel@tonic-gate 5897c478bd9Sstevel@tonic-gate ACPI_STATUS 5907c478bd9Sstevel@tonic-gate AcpiUtEvaluateObject ( 5917c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *PrefixNode, 5927c478bd9Sstevel@tonic-gate char *Path, 5937c478bd9Sstevel@tonic-gate UINT32 ExpectedReturnBtypes, 5947c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT **ReturnDesc); 5957c478bd9Sstevel@tonic-gate 5967c478bd9Sstevel@tonic-gate ACPI_STATUS 5977c478bd9Sstevel@tonic-gate AcpiUtEvaluateNumericObject ( 5987c478bd9Sstevel@tonic-gate char *ObjectName, 5997c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *DeviceNode, 6007c478bd9Sstevel@tonic-gate ACPI_INTEGER *Address); 6017c478bd9Sstevel@tonic-gate 6027c478bd9Sstevel@tonic-gate ACPI_STATUS 6037c478bd9Sstevel@tonic-gate AcpiUtExecute_HID ( 6047c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *DeviceNode, 6057c478bd9Sstevel@tonic-gate ACPI_DEVICE_ID *Hid); 6067c478bd9Sstevel@tonic-gate 6077c478bd9Sstevel@tonic-gate ACPI_STATUS 6087c478bd9Sstevel@tonic-gate AcpiUtExecute_CID ( 6097c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *DeviceNode, 6107c478bd9Sstevel@tonic-gate ACPI_COMPATIBLE_ID_LIST **ReturnCidList); 6117c478bd9Sstevel@tonic-gate 6127c478bd9Sstevel@tonic-gate ACPI_STATUS 6137c478bd9Sstevel@tonic-gate AcpiUtExecute_STA ( 6147c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *DeviceNode, 6157c478bd9Sstevel@tonic-gate UINT32 *StatusFlags); 6167c478bd9Sstevel@tonic-gate 6177c478bd9Sstevel@tonic-gate ACPI_STATUS 6187c478bd9Sstevel@tonic-gate AcpiUtExecute_UID ( 6197c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *DeviceNode, 6207c478bd9Sstevel@tonic-gate ACPI_DEVICE_ID *Uid); 6217c478bd9Sstevel@tonic-gate 6227c478bd9Sstevel@tonic-gate ACPI_STATUS 6237c478bd9Sstevel@tonic-gate AcpiUtExecute_Sxds ( 6247c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *DeviceNode, 6257c478bd9Sstevel@tonic-gate UINT8 *Highest); 6267c478bd9Sstevel@tonic-gate 6277c478bd9Sstevel@tonic-gate 6287c478bd9Sstevel@tonic-gate /* 6297c478bd9Sstevel@tonic-gate * utobject - internal object create/delete/cache routines 6307c478bd9Sstevel@tonic-gate */ 6317c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT * 6327c478bd9Sstevel@tonic-gate AcpiUtCreateInternalObjectDbg ( 6337c478bd9Sstevel@tonic-gate char *ModuleName, 6347c478bd9Sstevel@tonic-gate UINT32 LineNumber, 6357c478bd9Sstevel@tonic-gate UINT32 ComponentId, 6367c478bd9Sstevel@tonic-gate ACPI_OBJECT_TYPE Type); 6377c478bd9Sstevel@tonic-gate 6387c478bd9Sstevel@tonic-gate void * 6397c478bd9Sstevel@tonic-gate AcpiUtAllocateObjectDescDbg ( 6407c478bd9Sstevel@tonic-gate char *ModuleName, 6417c478bd9Sstevel@tonic-gate UINT32 LineNumber, 6427c478bd9Sstevel@tonic-gate UINT32 ComponentId); 6437c478bd9Sstevel@tonic-gate 644450d6964Smyers #define AcpiUtCreateInternalObject(t) AcpiUtCreateInternalObjectDbg (_AcpiModuleName,__LINE__,_COMPONENT,t) 645450d6964Smyers #define AcpiUtAllocateObjectDesc() AcpiUtAllocateObjectDescDbg (_AcpiModuleName,__LINE__,_COMPONENT) 6467c478bd9Sstevel@tonic-gate 6477c478bd9Sstevel@tonic-gate void 6487c478bd9Sstevel@tonic-gate AcpiUtDeleteObjectDesc ( 6497c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object); 6507c478bd9Sstevel@tonic-gate 6517c478bd9Sstevel@tonic-gate BOOLEAN 6527c478bd9Sstevel@tonic-gate AcpiUtValidInternalObject ( 6537c478bd9Sstevel@tonic-gate void *Object); 6547c478bd9Sstevel@tonic-gate 6557c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT * 6567c478bd9Sstevel@tonic-gate AcpiUtCreateBufferObject ( 6577c478bd9Sstevel@tonic-gate ACPI_SIZE BufferSize); 6587c478bd9Sstevel@tonic-gate 6597c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT * 6607c478bd9Sstevel@tonic-gate AcpiUtCreateStringObject ( 6617c478bd9Sstevel@tonic-gate ACPI_SIZE StringSize); 6627c478bd9Sstevel@tonic-gate 6637c478bd9Sstevel@tonic-gate ACPI_STATUS 6647c478bd9Sstevel@tonic-gate AcpiUtGetObjectSize( 6657c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Obj, 6667c478bd9Sstevel@tonic-gate ACPI_SIZE *ObjLength); 6677c478bd9Sstevel@tonic-gate 6687c478bd9Sstevel@tonic-gate 6697c478bd9Sstevel@tonic-gate /* 6707c478bd9Sstevel@tonic-gate * utstate - Generic state creation/cache routines 6717c478bd9Sstevel@tonic-gate */ 6727c478bd9Sstevel@tonic-gate void 6737c478bd9Sstevel@tonic-gate AcpiUtPushGenericState ( 6747c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE **ListHead, 6757c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE *State); 6767c478bd9Sstevel@tonic-gate 6777c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE * 6787c478bd9Sstevel@tonic-gate AcpiUtPopGenericState ( 6797c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE **ListHead); 6807c478bd9Sstevel@tonic-gate 6817c478bd9Sstevel@tonic-gate 6827c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE * 6837c478bd9Sstevel@tonic-gate AcpiUtCreateGenericState ( 6847c478bd9Sstevel@tonic-gate void); 6857c478bd9Sstevel@tonic-gate 6867c478bd9Sstevel@tonic-gate ACPI_THREAD_STATE * 6877c478bd9Sstevel@tonic-gate AcpiUtCreateThreadState ( 6887c478bd9Sstevel@tonic-gate void); 6897c478bd9Sstevel@tonic-gate 6907c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE * 6917c478bd9Sstevel@tonic-gate AcpiUtCreateUpdateState ( 6927c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object, 6937c478bd9Sstevel@tonic-gate UINT16 Action); 6947c478bd9Sstevel@tonic-gate 6957c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE * 6967c478bd9Sstevel@tonic-gate AcpiUtCreatePkgState ( 6977c478bd9Sstevel@tonic-gate void *InternalObject, 6987c478bd9Sstevel@tonic-gate void *ExternalObject, 6997c478bd9Sstevel@tonic-gate UINT16 Index); 7007c478bd9Sstevel@tonic-gate 7017c478bd9Sstevel@tonic-gate ACPI_STATUS 7027c478bd9Sstevel@tonic-gate AcpiUtCreateUpdateStateAndPush ( 7037c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object, 7047c478bd9Sstevel@tonic-gate UINT16 Action, 7057c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE **StateList); 7067c478bd9Sstevel@tonic-gate 7077c478bd9Sstevel@tonic-gate ACPI_STATUS 7087c478bd9Sstevel@tonic-gate AcpiUtCreatePkgStateAndPush ( 7097c478bd9Sstevel@tonic-gate void *InternalObject, 7107c478bd9Sstevel@tonic-gate void *ExternalObject, 7117c478bd9Sstevel@tonic-gate UINT16 Index, 7127c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE **StateList); 7137c478bd9Sstevel@tonic-gate 7147c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE * 7157c478bd9Sstevel@tonic-gate AcpiUtCreateControlState ( 7167c478bd9Sstevel@tonic-gate void); 7177c478bd9Sstevel@tonic-gate 7187c478bd9Sstevel@tonic-gate void 7197c478bd9Sstevel@tonic-gate AcpiUtDeleteGenericState ( 7207c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE *State); 7217c478bd9Sstevel@tonic-gate 7227c478bd9Sstevel@tonic-gate 7237c478bd9Sstevel@tonic-gate /* 7247c478bd9Sstevel@tonic-gate * utmath 7257c478bd9Sstevel@tonic-gate */ 7267c478bd9Sstevel@tonic-gate ACPI_STATUS 7277c478bd9Sstevel@tonic-gate AcpiUtDivide ( 7287c478bd9Sstevel@tonic-gate ACPI_INTEGER InDividend, 7297c478bd9Sstevel@tonic-gate ACPI_INTEGER InDivisor, 7307c478bd9Sstevel@tonic-gate ACPI_INTEGER *OutQuotient, 7317c478bd9Sstevel@tonic-gate ACPI_INTEGER *OutRemainder); 7327c478bd9Sstevel@tonic-gate 7337c478bd9Sstevel@tonic-gate ACPI_STATUS 7347c478bd9Sstevel@tonic-gate AcpiUtShortDivide ( 7357c478bd9Sstevel@tonic-gate ACPI_INTEGER InDividend, 7367c478bd9Sstevel@tonic-gate UINT32 Divisor, 7377c478bd9Sstevel@tonic-gate ACPI_INTEGER *OutQuotient, 7387c478bd9Sstevel@tonic-gate UINT32 *OutRemainder); 7397c478bd9Sstevel@tonic-gate 7407c478bd9Sstevel@tonic-gate /* 7417c478bd9Sstevel@tonic-gate * utmisc 7427c478bd9Sstevel@tonic-gate */ 743*27f7c583Smyers BOOLEAN 744*27f7c583Smyers AcpiUtIsAmlTable ( 745*27f7c583Smyers ACPI_TABLE_HEADER *Table); 746*27f7c583Smyers 7477c478bd9Sstevel@tonic-gate ACPI_STATUS 748450d6964Smyers AcpiUtAllocateOwnerId ( 749450d6964Smyers ACPI_OWNER_ID *OwnerId); 750450d6964Smyers 751186507a7Smyers void 752450d6964Smyers AcpiUtReleaseOwnerId ( 753186507a7Smyers ACPI_OWNER_ID *OwnerId); 754450d6964Smyers 755450d6964Smyers ACPI_STATUS 7567c478bd9Sstevel@tonic-gate AcpiUtWalkPackageTree ( 7577c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *SourceObject, 7587c478bd9Sstevel@tonic-gate void *TargetObject, 7597c478bd9Sstevel@tonic-gate ACPI_PKG_CALLBACK WalkCallback, 7607c478bd9Sstevel@tonic-gate void *Context); 7617c478bd9Sstevel@tonic-gate 762186507a7Smyers void 7637c478bd9Sstevel@tonic-gate AcpiUtStrupr ( 7647c478bd9Sstevel@tonic-gate char *SrcString); 7657c478bd9Sstevel@tonic-gate 7667c478bd9Sstevel@tonic-gate void 7677c478bd9Sstevel@tonic-gate AcpiUtPrintString ( 7687c478bd9Sstevel@tonic-gate char *String, 7697c478bd9Sstevel@tonic-gate UINT8 MaxLength); 7707c478bd9Sstevel@tonic-gate 7717c478bd9Sstevel@tonic-gate BOOLEAN 7727c478bd9Sstevel@tonic-gate AcpiUtValidAcpiName ( 7737c478bd9Sstevel@tonic-gate UINT32 Name); 7747c478bd9Sstevel@tonic-gate 775*27f7c583Smyers ACPI_NAME 776*27f7c583Smyers AcpiUtRepairName ( 777*27f7c583Smyers ACPI_NAME Name); 778*27f7c583Smyers 7797c478bd9Sstevel@tonic-gate BOOLEAN 780*27f7c583Smyers AcpiUtValidAcpiChar ( 781*27f7c583Smyers char Character, 782*27f7c583Smyers ACPI_NATIVE_UINT Position); 7837c478bd9Sstevel@tonic-gate 7847c478bd9Sstevel@tonic-gate ACPI_STATUS 7857c478bd9Sstevel@tonic-gate AcpiUtStrtoul64 ( 7867c478bd9Sstevel@tonic-gate char *String, 7877c478bd9Sstevel@tonic-gate UINT32 Base, 7887c478bd9Sstevel@tonic-gate ACPI_INTEGER *RetInteger); 7897c478bd9Sstevel@tonic-gate 7907c478bd9Sstevel@tonic-gate /* Values for Base above (16=Hex, 10=Decimal) */ 7917c478bd9Sstevel@tonic-gate 7927c478bd9Sstevel@tonic-gate #define ACPI_ANY_BASE 0 7937c478bd9Sstevel@tonic-gate 794*27f7c583Smyers UINT32 795*27f7c583Smyers AcpiUtDwordByteSwap ( 796*27f7c583Smyers UINT32 Value); 797*27f7c583Smyers 798*27f7c583Smyers void 799*27f7c583Smyers AcpiUtSetIntegerWidth ( 800*27f7c583Smyers UINT8 Revision); 801*27f7c583Smyers 802*27f7c583Smyers #ifdef ACPI_DEBUG_OUTPUT 803*27f7c583Smyers void 804*27f7c583Smyers AcpiUtDisplayInitPathname ( 805*27f7c583Smyers UINT8 Type, 806*27f7c583Smyers ACPI_NAMESPACE_NODE *ObjHandle, 807*27f7c583Smyers char *Path); 808*27f7c583Smyers #endif 809*27f7c583Smyers 810*27f7c583Smyers 811*27f7c583Smyers /* 812*27f7c583Smyers * utresrc 813*27f7c583Smyers */ 814*27f7c583Smyers ACPI_STATUS 815*27f7c583Smyers AcpiUtWalkAmlResources ( 816*27f7c583Smyers UINT8 *Aml, 817*27f7c583Smyers ACPI_SIZE AmlLength, 818*27f7c583Smyers ACPI_WALK_AML_CALLBACK UserFunction, 819*27f7c583Smyers void *Context); 820*27f7c583Smyers 82130082d0cSmyers ACPI_STATUS 82230082d0cSmyers AcpiUtValidateResource ( 82330082d0cSmyers void *Aml, 82430082d0cSmyers UINT8 *ReturnIndex); 82530082d0cSmyers 82630082d0cSmyers UINT32 82730082d0cSmyers AcpiUtGetDescriptorLength ( 82830082d0cSmyers void *Aml); 82930082d0cSmyers 83030082d0cSmyers UINT16 83130082d0cSmyers AcpiUtGetResourceLength ( 83230082d0cSmyers void *Aml); 8337c478bd9Sstevel@tonic-gate 8347c478bd9Sstevel@tonic-gate UINT8 83530082d0cSmyers AcpiUtGetResourceHeaderLength ( 83630082d0cSmyers void *Aml); 83730082d0cSmyers 83830082d0cSmyers UINT8 83930082d0cSmyers AcpiUtGetResourceType ( 84030082d0cSmyers void *Aml); 84130082d0cSmyers 84230082d0cSmyers ACPI_STATUS 84330082d0cSmyers AcpiUtGetResourceEndTag ( 84430082d0cSmyers ACPI_OPERAND_OBJECT *ObjDesc, 84530082d0cSmyers UINT8 **EndTag); 8467c478bd9Sstevel@tonic-gate 8477c478bd9Sstevel@tonic-gate 8487c478bd9Sstevel@tonic-gate /* 849450d6964Smyers * utmutex - mutex support 8507c478bd9Sstevel@tonic-gate */ 851450d6964Smyers ACPI_STATUS 852450d6964Smyers AcpiUtMutexInitialize ( 853450d6964Smyers void); 8547c478bd9Sstevel@tonic-gate 8557c478bd9Sstevel@tonic-gate void 856450d6964Smyers AcpiUtMutexTerminate ( 857450d6964Smyers void); 8587c478bd9Sstevel@tonic-gate 859450d6964Smyers ACPI_STATUS 860450d6964Smyers AcpiUtAcquireMutex ( 861450d6964Smyers ACPI_MUTEX_HANDLE MutexId); 862450d6964Smyers 863450d6964Smyers ACPI_STATUS 864450d6964Smyers AcpiUtReleaseMutex ( 865450d6964Smyers ACPI_MUTEX_HANDLE MutexId); 866450d6964Smyers 867450d6964Smyers 868450d6964Smyers /* 869450d6964Smyers * utalloc - memory allocation and object caching 870450d6964Smyers */ 871450d6964Smyers ACPI_STATUS 872450d6964Smyers AcpiUtCreateCaches ( 873450d6964Smyers void); 874450d6964Smyers 875450d6964Smyers ACPI_STATUS 876450d6964Smyers AcpiUtDeleteCaches ( 877450d6964Smyers void); 8787c478bd9Sstevel@tonic-gate 8797c478bd9Sstevel@tonic-gate ACPI_STATUS 8807c478bd9Sstevel@tonic-gate AcpiUtValidateBuffer ( 8817c478bd9Sstevel@tonic-gate ACPI_BUFFER *Buffer); 8827c478bd9Sstevel@tonic-gate 8837c478bd9Sstevel@tonic-gate ACPI_STATUS 8847c478bd9Sstevel@tonic-gate AcpiUtInitializeBuffer ( 8857c478bd9Sstevel@tonic-gate ACPI_BUFFER *Buffer, 8867c478bd9Sstevel@tonic-gate ACPI_SIZE RequiredLength); 8877c478bd9Sstevel@tonic-gate 8887c478bd9Sstevel@tonic-gate void * 8897c478bd9Sstevel@tonic-gate AcpiUtAllocate ( 8907c478bd9Sstevel@tonic-gate ACPI_SIZE Size, 8917c478bd9Sstevel@tonic-gate UINT32 Component, 8927c478bd9Sstevel@tonic-gate char *Module, 8937c478bd9Sstevel@tonic-gate UINT32 Line); 8947c478bd9Sstevel@tonic-gate 8957c478bd9Sstevel@tonic-gate void * 896*27f7c583Smyers AcpiUtAllocateZeroed ( 8977c478bd9Sstevel@tonic-gate ACPI_SIZE Size, 8987c478bd9Sstevel@tonic-gate UINT32 Component, 8997c478bd9Sstevel@tonic-gate char *Module, 9007c478bd9Sstevel@tonic-gate UINT32 Line); 9017c478bd9Sstevel@tonic-gate 9027c478bd9Sstevel@tonic-gate #ifdef ACPI_DBG_TRACK_ALLOCATIONS 9037c478bd9Sstevel@tonic-gate void * 9047c478bd9Sstevel@tonic-gate AcpiUtAllocateAndTrack ( 9057c478bd9Sstevel@tonic-gate ACPI_SIZE Size, 9067c478bd9Sstevel@tonic-gate UINT32 Component, 9077c478bd9Sstevel@tonic-gate char *Module, 9087c478bd9Sstevel@tonic-gate UINT32 Line); 9097c478bd9Sstevel@tonic-gate 9107c478bd9Sstevel@tonic-gate void * 911*27f7c583Smyers AcpiUtAllocateZeroedAndTrack ( 9127c478bd9Sstevel@tonic-gate ACPI_SIZE Size, 9137c478bd9Sstevel@tonic-gate UINT32 Component, 9147c478bd9Sstevel@tonic-gate char *Module, 9157c478bd9Sstevel@tonic-gate UINT32 Line); 9167c478bd9Sstevel@tonic-gate 9177c478bd9Sstevel@tonic-gate void 9187c478bd9Sstevel@tonic-gate AcpiUtFreeAndTrack ( 9197c478bd9Sstevel@tonic-gate void *Address, 9207c478bd9Sstevel@tonic-gate UINT32 Component, 9217c478bd9Sstevel@tonic-gate char *Module, 9227c478bd9Sstevel@tonic-gate UINT32 Line); 9237c478bd9Sstevel@tonic-gate 9247c478bd9Sstevel@tonic-gate void 9257c478bd9Sstevel@tonic-gate AcpiUtDumpAllocationInfo ( 9267c478bd9Sstevel@tonic-gate void); 9277c478bd9Sstevel@tonic-gate 9287c478bd9Sstevel@tonic-gate void 9297c478bd9Sstevel@tonic-gate AcpiUtDumpAllocations ( 9307c478bd9Sstevel@tonic-gate UINT32 Component, 9317c478bd9Sstevel@tonic-gate char *Module); 932*27f7c583Smyers 933*27f7c583Smyers ACPI_STATUS 934*27f7c583Smyers AcpiUtCreateList ( 935*27f7c583Smyers char *ListName, 936*27f7c583Smyers UINT16 ObjectSize, 937*27f7c583Smyers ACPI_MEMORY_LIST **ReturnCache); 938*27f7c583Smyers 939*27f7c583Smyers 9407c478bd9Sstevel@tonic-gate #endif 9417c478bd9Sstevel@tonic-gate 9427c478bd9Sstevel@tonic-gate #endif /* _ACUTILS_H */ 943