17c478bd9Sstevel@tonic-gate /****************************************************************************** 27c478bd9Sstevel@tonic-gate * 37c478bd9Sstevel@tonic-gate * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures 4*db2bae30SDana Myers * $Revision: 1.204 $ 57c478bd9Sstevel@tonic-gate * 67c478bd9Sstevel@tonic-gate *****************************************************************************/ 77c478bd9Sstevel@tonic-gate 87c478bd9Sstevel@tonic-gate /****************************************************************************** 97c478bd9Sstevel@tonic-gate * 107c478bd9Sstevel@tonic-gate * 1. Copyright Notice 117c478bd9Sstevel@tonic-gate * 12*db2bae30SDana Myers * Some or all of this work - Copyright (c) 1999 - 2008, 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 12727f7c583Smyers extern const char *AcpiGbl_BmDecode[]; 12827f7c583Smyers extern const char *AcpiGbl_ConfigDecode[]; 12927f7c583Smyers extern const char *AcpiGbl_ConsumeDecode[]; 13027f7c583Smyers extern const char *AcpiGbl_DecDecode[]; 13127f7c583Smyers extern const char *AcpiGbl_HeDecode[]; 13227f7c583Smyers extern const char *AcpiGbl_IoDecode[]; 13327f7c583Smyers extern const char *AcpiGbl_LlDecode[]; 13427f7c583Smyers extern const char *AcpiGbl_MaxDecode[]; 13527f7c583Smyers extern const char *AcpiGbl_MemDecode[]; 13627f7c583Smyers extern const char *AcpiGbl_MinDecode[]; 13727f7c583Smyers extern const char *AcpiGbl_MtpDecode[]; 13827f7c583Smyers extern const char *AcpiGbl_RngDecode[]; 13927f7c583Smyers extern const char *AcpiGbl_RwDecode[]; 14027f7c583Smyers extern const char *AcpiGbl_ShrDecode[]; 14127f7c583Smyers extern const char *AcpiGbl_SizDecode[]; 14227f7c583Smyers extern const char *AcpiGbl_TrsDecode[]; 14327f7c583Smyers extern const char *AcpiGbl_TtpDecode[]; 14427f7c583Smyers 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 15427f7c583Smyers typedef 15527f7c583Smyers ACPI_STATUS (*ACPI_WALK_AML_CALLBACK) ( 15627f7c583Smyers UINT8 *Aml, 15727f7c583Smyers UINT32 Length, 15827f7c583Smyers UINT32 Offset, 15927f7c583Smyers UINT8 ResourceIndex, 16027f7c583Smyers void *Context); 16127f7c583Smyers 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 */ 193*db2bae30SDana Myers ACPI_STATUS 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 203*db2bae30SDana Myers const char * 204*db2bae30SDana Myers AcpiUtGetNotifyName ( 205*db2bae30SDana Myers UINT32 NotifyValue); 206*db2bae30SDana Myers 2077c478bd9Sstevel@tonic-gate #endif 2087c478bd9Sstevel@tonic-gate 2097c478bd9Sstevel@tonic-gate char * 2107c478bd9Sstevel@tonic-gate AcpiUtGetTypeName ( 2117c478bd9Sstevel@tonic-gate ACPI_OBJECT_TYPE Type); 2127c478bd9Sstevel@tonic-gate 2137c478bd9Sstevel@tonic-gate char * 2147c478bd9Sstevel@tonic-gate AcpiUtGetNodeName ( 2157c478bd9Sstevel@tonic-gate void *Object); 2167c478bd9Sstevel@tonic-gate 2177c478bd9Sstevel@tonic-gate char * 2187c478bd9Sstevel@tonic-gate AcpiUtGetDescriptorName ( 2197c478bd9Sstevel@tonic-gate void *Object); 2207c478bd9Sstevel@tonic-gate 221*db2bae30SDana Myers const char * 222*db2bae30SDana Myers AcpiUtGetReferenceName ( 223*db2bae30SDana Myers ACPI_OPERAND_OBJECT *Object); 224*db2bae30SDana Myers 2257c478bd9Sstevel@tonic-gate char * 2267c478bd9Sstevel@tonic-gate AcpiUtGetObjectTypeName ( 2277c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *ObjDesc); 2287c478bd9Sstevel@tonic-gate 2297c478bd9Sstevel@tonic-gate char * 2307c478bd9Sstevel@tonic-gate AcpiUtGetRegionName ( 2317c478bd9Sstevel@tonic-gate UINT8 SpaceId); 2327c478bd9Sstevel@tonic-gate 2337c478bd9Sstevel@tonic-gate char * 2347c478bd9Sstevel@tonic-gate AcpiUtGetEventName ( 2357c478bd9Sstevel@tonic-gate UINT32 EventId); 2367c478bd9Sstevel@tonic-gate 2377c478bd9Sstevel@tonic-gate char 2387c478bd9Sstevel@tonic-gate AcpiUtHexToAsciiChar ( 2397c478bd9Sstevel@tonic-gate ACPI_INTEGER Integer, 2407c478bd9Sstevel@tonic-gate UINT32 Position); 2417c478bd9Sstevel@tonic-gate 2427c478bd9Sstevel@tonic-gate BOOLEAN 2437c478bd9Sstevel@tonic-gate AcpiUtValidObjectType ( 2447c478bd9Sstevel@tonic-gate ACPI_OBJECT_TYPE Type); 2457c478bd9Sstevel@tonic-gate 2467c478bd9Sstevel@tonic-gate 2477c478bd9Sstevel@tonic-gate /* 2487c478bd9Sstevel@tonic-gate * utinit - miscellaneous initialization and shutdown 2497c478bd9Sstevel@tonic-gate */ 2507c478bd9Sstevel@tonic-gate ACPI_STATUS 2517c478bd9Sstevel@tonic-gate AcpiUtHardwareInitialize ( 2527c478bd9Sstevel@tonic-gate void); 2537c478bd9Sstevel@tonic-gate 2547c478bd9Sstevel@tonic-gate void 2557c478bd9Sstevel@tonic-gate AcpiUtSubsystemShutdown ( 2567c478bd9Sstevel@tonic-gate void); 2577c478bd9Sstevel@tonic-gate 2587c478bd9Sstevel@tonic-gate 2597c478bd9Sstevel@tonic-gate /* 2607c478bd9Sstevel@tonic-gate * utclib - Local implementations of C library functions 2617c478bd9Sstevel@tonic-gate */ 2627c478bd9Sstevel@tonic-gate #ifndef ACPI_USE_SYSTEM_CLIBRARY 2637c478bd9Sstevel@tonic-gate 2647c478bd9Sstevel@tonic-gate ACPI_SIZE 2657c478bd9Sstevel@tonic-gate AcpiUtStrlen ( 2667c478bd9Sstevel@tonic-gate const char *String); 2677c478bd9Sstevel@tonic-gate 2687c478bd9Sstevel@tonic-gate char * 2697c478bd9Sstevel@tonic-gate AcpiUtStrcpy ( 2707c478bd9Sstevel@tonic-gate char *DstString, 2717c478bd9Sstevel@tonic-gate const char *SrcString); 2727c478bd9Sstevel@tonic-gate 2737c478bd9Sstevel@tonic-gate char * 2747c478bd9Sstevel@tonic-gate AcpiUtStrncpy ( 2757c478bd9Sstevel@tonic-gate char *DstString, 2767c478bd9Sstevel@tonic-gate const char *SrcString, 2777c478bd9Sstevel@tonic-gate ACPI_SIZE Count); 2787c478bd9Sstevel@tonic-gate 2797c478bd9Sstevel@tonic-gate int 2807c478bd9Sstevel@tonic-gate AcpiUtMemcmp ( 2817c478bd9Sstevel@tonic-gate const char *Buffer1, 2827c478bd9Sstevel@tonic-gate const char *Buffer2, 2837c478bd9Sstevel@tonic-gate ACPI_SIZE Count); 2847c478bd9Sstevel@tonic-gate 2857c478bd9Sstevel@tonic-gate int 2867c478bd9Sstevel@tonic-gate AcpiUtStrncmp ( 2877c478bd9Sstevel@tonic-gate const char *String1, 2887c478bd9Sstevel@tonic-gate const char *String2, 2897c478bd9Sstevel@tonic-gate ACPI_SIZE Count); 2907c478bd9Sstevel@tonic-gate 2917c478bd9Sstevel@tonic-gate int 2927c478bd9Sstevel@tonic-gate AcpiUtStrcmp ( 2937c478bd9Sstevel@tonic-gate const char *String1, 2947c478bd9Sstevel@tonic-gate const char *String2); 2957c478bd9Sstevel@tonic-gate 2967c478bd9Sstevel@tonic-gate char * 2977c478bd9Sstevel@tonic-gate AcpiUtStrcat ( 2987c478bd9Sstevel@tonic-gate char *DstString, 2997c478bd9Sstevel@tonic-gate const char *SrcString); 3007c478bd9Sstevel@tonic-gate 3017c478bd9Sstevel@tonic-gate char * 3027c478bd9Sstevel@tonic-gate AcpiUtStrncat ( 3037c478bd9Sstevel@tonic-gate char *DstString, 3047c478bd9Sstevel@tonic-gate const char *SrcString, 3057c478bd9Sstevel@tonic-gate ACPI_SIZE Count); 3067c478bd9Sstevel@tonic-gate 3077c478bd9Sstevel@tonic-gate UINT32 3087c478bd9Sstevel@tonic-gate AcpiUtStrtoul ( 3097c478bd9Sstevel@tonic-gate const char *String, 3107c478bd9Sstevel@tonic-gate char **Terminator, 3117c478bd9Sstevel@tonic-gate UINT32 Base); 3127c478bd9Sstevel@tonic-gate 3137c478bd9Sstevel@tonic-gate char * 3147c478bd9Sstevel@tonic-gate AcpiUtStrstr ( 3157c478bd9Sstevel@tonic-gate char *String1, 3167c478bd9Sstevel@tonic-gate char *String2); 3177c478bd9Sstevel@tonic-gate 3187c478bd9Sstevel@tonic-gate void * 3197c478bd9Sstevel@tonic-gate AcpiUtMemcpy ( 3207c478bd9Sstevel@tonic-gate void *Dest, 3217c478bd9Sstevel@tonic-gate const void *Src, 3227c478bd9Sstevel@tonic-gate ACPI_SIZE Count); 3237c478bd9Sstevel@tonic-gate 3247c478bd9Sstevel@tonic-gate void * 3257c478bd9Sstevel@tonic-gate AcpiUtMemset ( 3267c478bd9Sstevel@tonic-gate void *Dest, 327*db2bae30SDana Myers UINT8 Value, 3287c478bd9Sstevel@tonic-gate ACPI_SIZE Count); 3297c478bd9Sstevel@tonic-gate 3307c478bd9Sstevel@tonic-gate int 3317c478bd9Sstevel@tonic-gate AcpiUtToUpper ( 3327c478bd9Sstevel@tonic-gate int c); 3337c478bd9Sstevel@tonic-gate 3347c478bd9Sstevel@tonic-gate int 3357c478bd9Sstevel@tonic-gate AcpiUtToLower ( 3367c478bd9Sstevel@tonic-gate int c); 3377c478bd9Sstevel@tonic-gate 3387c478bd9Sstevel@tonic-gate extern const UINT8 _acpi_ctype[]; 3397c478bd9Sstevel@tonic-gate 3407c478bd9Sstevel@tonic-gate #define _ACPI_XA 0x00 /* extra alphabetic - not supported */ 3417c478bd9Sstevel@tonic-gate #define _ACPI_XS 0x40 /* extra space */ 3427c478bd9Sstevel@tonic-gate #define _ACPI_BB 0x00 /* BEL, BS, etc. - not supported */ 3437c478bd9Sstevel@tonic-gate #define _ACPI_CN 0x20 /* CR, FF, HT, NL, VT */ 3447c478bd9Sstevel@tonic-gate #define _ACPI_DI 0x04 /* '0'-'9' */ 3457c478bd9Sstevel@tonic-gate #define _ACPI_LO 0x02 /* 'a'-'z' */ 3467c478bd9Sstevel@tonic-gate #define _ACPI_PU 0x10 /* punctuation */ 3477c478bd9Sstevel@tonic-gate #define _ACPI_SP 0x08 /* space */ 3487c478bd9Sstevel@tonic-gate #define _ACPI_UP 0x01 /* 'A'-'Z' */ 3497c478bd9Sstevel@tonic-gate #define _ACPI_XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */ 3507c478bd9Sstevel@tonic-gate 3517c478bd9Sstevel@tonic-gate #define ACPI_IS_DIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI)) 3527c478bd9Sstevel@tonic-gate #define ACPI_IS_SPACE(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP)) 3537c478bd9Sstevel@tonic-gate #define ACPI_IS_XDIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_XD)) 3547c478bd9Sstevel@tonic-gate #define ACPI_IS_UPPER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_UP)) 3557c478bd9Sstevel@tonic-gate #define ACPI_IS_LOWER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO)) 3567c478bd9Sstevel@tonic-gate #define ACPI_IS_PRINT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_SP | _ACPI_PU)) 3577c478bd9Sstevel@tonic-gate #define ACPI_IS_ALPHA(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP)) 3587c478bd9Sstevel@tonic-gate 3597c478bd9Sstevel@tonic-gate #endif /* ACPI_USE_SYSTEM_CLIBRARY */ 3607c478bd9Sstevel@tonic-gate 3617c478bd9Sstevel@tonic-gate 3627c478bd9Sstevel@tonic-gate /* 3637c478bd9Sstevel@tonic-gate * utcopy - Object construction and conversion interfaces 3647c478bd9Sstevel@tonic-gate */ 3657c478bd9Sstevel@tonic-gate ACPI_STATUS 3667c478bd9Sstevel@tonic-gate AcpiUtBuildSimpleObject( 3677c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Obj, 3687c478bd9Sstevel@tonic-gate ACPI_OBJECT *UserObj, 3697c478bd9Sstevel@tonic-gate UINT8 *DataSpace, 3707c478bd9Sstevel@tonic-gate UINT32 *BufferSpaceUsed); 3717c478bd9Sstevel@tonic-gate 3727c478bd9Sstevel@tonic-gate ACPI_STATUS 3737c478bd9Sstevel@tonic-gate AcpiUtBuildPackageObject ( 3747c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Obj, 3757c478bd9Sstevel@tonic-gate UINT8 *Buffer, 3767c478bd9Sstevel@tonic-gate UINT32 *SpaceUsed); 3777c478bd9Sstevel@tonic-gate 3787c478bd9Sstevel@tonic-gate ACPI_STATUS 3797c478bd9Sstevel@tonic-gate AcpiUtCopyIobjectToEobject ( 3807c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Obj, 3817c478bd9Sstevel@tonic-gate ACPI_BUFFER *RetBuffer); 3827c478bd9Sstevel@tonic-gate 3837c478bd9Sstevel@tonic-gate ACPI_STATUS 3847c478bd9Sstevel@tonic-gate AcpiUtCopyEobjectToIobject ( 3857c478bd9Sstevel@tonic-gate ACPI_OBJECT *Obj, 3867c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT **InternalObj); 3877c478bd9Sstevel@tonic-gate 3887c478bd9Sstevel@tonic-gate ACPI_STATUS 3897c478bd9Sstevel@tonic-gate AcpiUtCopyISimpleToIsimple ( 3907c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *SourceObj, 3917c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *DestObj); 3927c478bd9Sstevel@tonic-gate 3937c478bd9Sstevel@tonic-gate ACPI_STATUS 3947c478bd9Sstevel@tonic-gate AcpiUtCopyIobjectToIobject ( 3957c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *SourceDesc, 3967c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT **DestDesc, 3977c478bd9Sstevel@tonic-gate ACPI_WALK_STATE *WalkState); 3987c478bd9Sstevel@tonic-gate 3997c478bd9Sstevel@tonic-gate 4007c478bd9Sstevel@tonic-gate /* 4017c478bd9Sstevel@tonic-gate * utcreate - Object creation 4027c478bd9Sstevel@tonic-gate */ 4037c478bd9Sstevel@tonic-gate ACPI_STATUS 4047c478bd9Sstevel@tonic-gate AcpiUtUpdateObjectReference ( 4057c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object, 4067c478bd9Sstevel@tonic-gate UINT16 Action); 4077c478bd9Sstevel@tonic-gate 4087c478bd9Sstevel@tonic-gate 4097c478bd9Sstevel@tonic-gate /* 4107c478bd9Sstevel@tonic-gate * utdebug - Debug interfaces 4117c478bd9Sstevel@tonic-gate */ 4127c478bd9Sstevel@tonic-gate void 4137c478bd9Sstevel@tonic-gate AcpiUtInitStackPtrTrace ( 4147c478bd9Sstevel@tonic-gate void); 4157c478bd9Sstevel@tonic-gate 4167c478bd9Sstevel@tonic-gate void 4177c478bd9Sstevel@tonic-gate AcpiUtTrackStackPtr ( 4187c478bd9Sstevel@tonic-gate void); 4197c478bd9Sstevel@tonic-gate 4207c478bd9Sstevel@tonic-gate void 4217c478bd9Sstevel@tonic-gate AcpiUtTrace ( 4227c478bd9Sstevel@tonic-gate UINT32 LineNumber, 423186507a7Smyers const char *FunctionName, 424*db2bae30SDana Myers const char *ModuleName, 425450d6964Smyers UINT32 ComponentId); 4267c478bd9Sstevel@tonic-gate 4277c478bd9Sstevel@tonic-gate void 4287c478bd9Sstevel@tonic-gate AcpiUtTracePtr ( 4297c478bd9Sstevel@tonic-gate UINT32 LineNumber, 430186507a7Smyers const char *FunctionName, 431*db2bae30SDana Myers const char *ModuleName, 432450d6964Smyers UINT32 ComponentId, 4337c478bd9Sstevel@tonic-gate void *Pointer); 4347c478bd9Sstevel@tonic-gate 4357c478bd9Sstevel@tonic-gate void 4367c478bd9Sstevel@tonic-gate AcpiUtTraceU32 ( 4377c478bd9Sstevel@tonic-gate UINT32 LineNumber, 438186507a7Smyers const char *FunctionName, 439*db2bae30SDana Myers const char *ModuleName, 440450d6964Smyers UINT32 ComponentId, 4417c478bd9Sstevel@tonic-gate UINT32 Integer); 4427c478bd9Sstevel@tonic-gate 4437c478bd9Sstevel@tonic-gate void 4447c478bd9Sstevel@tonic-gate AcpiUtTraceStr ( 4457c478bd9Sstevel@tonic-gate UINT32 LineNumber, 446186507a7Smyers const char *FunctionName, 447*db2bae30SDana Myers const char *ModuleName, 448450d6964Smyers UINT32 ComponentId, 4497c478bd9Sstevel@tonic-gate char *String); 4507c478bd9Sstevel@tonic-gate 4517c478bd9Sstevel@tonic-gate void 4527c478bd9Sstevel@tonic-gate AcpiUtExit ( 4537c478bd9Sstevel@tonic-gate UINT32 LineNumber, 454186507a7Smyers const char *FunctionName, 455*db2bae30SDana Myers const char *ModuleName, 456450d6964Smyers UINT32 ComponentId); 4577c478bd9Sstevel@tonic-gate 4587c478bd9Sstevel@tonic-gate void 4597c478bd9Sstevel@tonic-gate AcpiUtStatusExit ( 4607c478bd9Sstevel@tonic-gate UINT32 LineNumber, 461186507a7Smyers const char *FunctionName, 462*db2bae30SDana Myers const char *ModuleName, 463450d6964Smyers UINT32 ComponentId, 4647c478bd9Sstevel@tonic-gate ACPI_STATUS Status); 4657c478bd9Sstevel@tonic-gate 4667c478bd9Sstevel@tonic-gate void 4677c478bd9Sstevel@tonic-gate AcpiUtValueExit ( 4687c478bd9Sstevel@tonic-gate UINT32 LineNumber, 469186507a7Smyers const char *FunctionName, 470*db2bae30SDana Myers const char *ModuleName, 471450d6964Smyers UINT32 ComponentId, 4727c478bd9Sstevel@tonic-gate ACPI_INTEGER Value); 4737c478bd9Sstevel@tonic-gate 4747c478bd9Sstevel@tonic-gate void 4757c478bd9Sstevel@tonic-gate AcpiUtPtrExit ( 4767c478bd9Sstevel@tonic-gate UINT32 LineNumber, 477186507a7Smyers const char *FunctionName, 478*db2bae30SDana Myers const char *ModuleName, 479450d6964Smyers UINT32 ComponentId, 4807c478bd9Sstevel@tonic-gate UINT8 *Ptr); 4817c478bd9Sstevel@tonic-gate 4827c478bd9Sstevel@tonic-gate void 48330082d0cSmyers AcpiUtDumpBuffer ( 48430082d0cSmyers UINT8 *Buffer, 48530082d0cSmyers UINT32 Count, 48630082d0cSmyers UINT32 Display, 48730082d0cSmyers UINT32 componentId); 4887c478bd9Sstevel@tonic-gate 48927f7c583Smyers void 49027f7c583Smyers AcpiUtDumpBuffer2 ( 49127f7c583Smyers UINT8 *Buffer, 49227f7c583Smyers UINT32 Count, 49327f7c583Smyers UINT32 Display); 49427f7c583Smyers 4957c478bd9Sstevel@tonic-gate void 4967c478bd9Sstevel@tonic-gate AcpiUtReportError ( 4977c478bd9Sstevel@tonic-gate char *ModuleName, 49830082d0cSmyers UINT32 LineNumber); 4997c478bd9Sstevel@tonic-gate 5007c478bd9Sstevel@tonic-gate void 50130082d0cSmyers AcpiUtReportInfo ( 5027c478bd9Sstevel@tonic-gate char *ModuleName, 50330082d0cSmyers UINT32 LineNumber); 5047c478bd9Sstevel@tonic-gate 5057c478bd9Sstevel@tonic-gate void 50630082d0cSmyers AcpiUtReportWarning ( 50730082d0cSmyers char *ModuleName, 50830082d0cSmyers UINT32 LineNumber); 50930082d0cSmyers 51030082d0cSmyers /* Error and message reporting interfaces */ 5117c478bd9Sstevel@tonic-gate 5127c478bd9Sstevel@tonic-gate void ACPI_INTERNAL_VAR_XFACE 5137c478bd9Sstevel@tonic-gate AcpiUtDebugPrint ( 5147c478bd9Sstevel@tonic-gate UINT32 RequestedDebugLevel, 5157c478bd9Sstevel@tonic-gate UINT32 LineNumber, 516186507a7Smyers const char *FunctionName, 517*db2bae30SDana Myers const char *ModuleName, 518450d6964Smyers UINT32 ComponentId, 519*db2bae30SDana Myers const char *Format, 52030082d0cSmyers ...) ACPI_PRINTF_LIKE(6); 5217c478bd9Sstevel@tonic-gate 5227c478bd9Sstevel@tonic-gate void ACPI_INTERNAL_VAR_XFACE 5237c478bd9Sstevel@tonic-gate AcpiUtDebugPrintRaw ( 5247c478bd9Sstevel@tonic-gate UINT32 RequestedDebugLevel, 5257c478bd9Sstevel@tonic-gate UINT32 LineNumber, 526186507a7Smyers const char *FunctionName, 527*db2bae30SDana Myers const char *ModuleName, 528450d6964Smyers UINT32 ComponentId, 529*db2bae30SDana Myers const char *Format, 53030082d0cSmyers ...) ACPI_PRINTF_LIKE(6); 53130082d0cSmyers 53230082d0cSmyers void ACPI_INTERNAL_VAR_XFACE 53330082d0cSmyers AcpiUtError ( 534*db2bae30SDana Myers const char *ModuleName, 53530082d0cSmyers UINT32 LineNumber, 536*db2bae30SDana Myers const char *Format, 53730082d0cSmyers ...) ACPI_PRINTF_LIKE(3); 53830082d0cSmyers 53930082d0cSmyers void ACPI_INTERNAL_VAR_XFACE 54030082d0cSmyers AcpiUtException ( 541*db2bae30SDana Myers const char *ModuleName, 54230082d0cSmyers UINT32 LineNumber, 54330082d0cSmyers ACPI_STATUS Status, 544*db2bae30SDana Myers const char *Format, 54530082d0cSmyers ...) ACPI_PRINTF_LIKE(4); 54630082d0cSmyers 54730082d0cSmyers void ACPI_INTERNAL_VAR_XFACE 54830082d0cSmyers AcpiUtWarning ( 549*db2bae30SDana Myers const char *ModuleName, 55030082d0cSmyers UINT32 LineNumber, 551*db2bae30SDana Myers const char *Format, 55230082d0cSmyers ...) ACPI_PRINTF_LIKE(3); 55330082d0cSmyers 55430082d0cSmyers void ACPI_INTERNAL_VAR_XFACE 55530082d0cSmyers AcpiUtInfo ( 556*db2bae30SDana Myers const char *ModuleName, 55730082d0cSmyers UINT32 LineNumber, 558*db2bae30SDana Myers const char *Format, 55930082d0cSmyers ...) ACPI_PRINTF_LIKE(3); 5607c478bd9Sstevel@tonic-gate 5617c478bd9Sstevel@tonic-gate 5627c478bd9Sstevel@tonic-gate /* 5637c478bd9Sstevel@tonic-gate * utdelete - Object deletion and reference counts 5647c478bd9Sstevel@tonic-gate */ 5657c478bd9Sstevel@tonic-gate void 5667c478bd9Sstevel@tonic-gate AcpiUtAddReference ( 5677c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object); 5687c478bd9Sstevel@tonic-gate 5697c478bd9Sstevel@tonic-gate void 5707c478bd9Sstevel@tonic-gate AcpiUtRemoveReference ( 5717c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object); 5727c478bd9Sstevel@tonic-gate 5737c478bd9Sstevel@tonic-gate void 5747c478bd9Sstevel@tonic-gate AcpiUtDeleteInternalPackageObject ( 5757c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object); 5767c478bd9Sstevel@tonic-gate 5777c478bd9Sstevel@tonic-gate void 5787c478bd9Sstevel@tonic-gate AcpiUtDeleteInternalSimpleObject ( 5797c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object); 5807c478bd9Sstevel@tonic-gate 5817c478bd9Sstevel@tonic-gate void 5827c478bd9Sstevel@tonic-gate AcpiUtDeleteInternalObjectList ( 5837c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT **ObjList); 5847c478bd9Sstevel@tonic-gate 5857c478bd9Sstevel@tonic-gate 5867c478bd9Sstevel@tonic-gate /* 5877c478bd9Sstevel@tonic-gate * uteval - object evaluation 5887c478bd9Sstevel@tonic-gate */ 5897c478bd9Sstevel@tonic-gate ACPI_STATUS 5907c478bd9Sstevel@tonic-gate AcpiUtOsiImplementation ( 5917c478bd9Sstevel@tonic-gate ACPI_WALK_STATE *WalkState); 5927c478bd9Sstevel@tonic-gate 5937c478bd9Sstevel@tonic-gate ACPI_STATUS 5947c478bd9Sstevel@tonic-gate AcpiUtEvaluateObject ( 5957c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *PrefixNode, 5967c478bd9Sstevel@tonic-gate char *Path, 5977c478bd9Sstevel@tonic-gate UINT32 ExpectedReturnBtypes, 5987c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT **ReturnDesc); 5997c478bd9Sstevel@tonic-gate 6007c478bd9Sstevel@tonic-gate ACPI_STATUS 6017c478bd9Sstevel@tonic-gate AcpiUtEvaluateNumericObject ( 6027c478bd9Sstevel@tonic-gate char *ObjectName, 6037c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *DeviceNode, 6047c478bd9Sstevel@tonic-gate ACPI_INTEGER *Address); 6057c478bd9Sstevel@tonic-gate 6067c478bd9Sstevel@tonic-gate ACPI_STATUS 6077c478bd9Sstevel@tonic-gate AcpiUtExecute_HID ( 6087c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *DeviceNode, 6097c478bd9Sstevel@tonic-gate ACPI_DEVICE_ID *Hid); 6107c478bd9Sstevel@tonic-gate 6117c478bd9Sstevel@tonic-gate ACPI_STATUS 6127c478bd9Sstevel@tonic-gate AcpiUtExecute_CID ( 6137c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *DeviceNode, 6147c478bd9Sstevel@tonic-gate ACPI_COMPATIBLE_ID_LIST **ReturnCidList); 6157c478bd9Sstevel@tonic-gate 6167c478bd9Sstevel@tonic-gate ACPI_STATUS 6177c478bd9Sstevel@tonic-gate AcpiUtExecute_STA ( 6187c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *DeviceNode, 6197c478bd9Sstevel@tonic-gate UINT32 *StatusFlags); 6207c478bd9Sstevel@tonic-gate 6217c478bd9Sstevel@tonic-gate ACPI_STATUS 6227c478bd9Sstevel@tonic-gate AcpiUtExecute_UID ( 6237c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *DeviceNode, 6247c478bd9Sstevel@tonic-gate ACPI_DEVICE_ID *Uid); 6257c478bd9Sstevel@tonic-gate 6267c478bd9Sstevel@tonic-gate ACPI_STATUS 6277c478bd9Sstevel@tonic-gate AcpiUtExecute_Sxds ( 6287c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *DeviceNode, 6297c478bd9Sstevel@tonic-gate UINT8 *Highest); 6307c478bd9Sstevel@tonic-gate 6317c478bd9Sstevel@tonic-gate 6327c478bd9Sstevel@tonic-gate /* 6337c478bd9Sstevel@tonic-gate * utobject - internal object create/delete/cache routines 6347c478bd9Sstevel@tonic-gate */ 6357c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT * 6367c478bd9Sstevel@tonic-gate AcpiUtCreateInternalObjectDbg ( 637*db2bae30SDana Myers const char *ModuleName, 6387c478bd9Sstevel@tonic-gate UINT32 LineNumber, 6397c478bd9Sstevel@tonic-gate UINT32 ComponentId, 6407c478bd9Sstevel@tonic-gate ACPI_OBJECT_TYPE Type); 6417c478bd9Sstevel@tonic-gate 6427c478bd9Sstevel@tonic-gate void * 6437c478bd9Sstevel@tonic-gate AcpiUtAllocateObjectDescDbg ( 644*db2bae30SDana Myers const char *ModuleName, 6457c478bd9Sstevel@tonic-gate UINT32 LineNumber, 6467c478bd9Sstevel@tonic-gate UINT32 ComponentId); 6477c478bd9Sstevel@tonic-gate 648450d6964Smyers #define AcpiUtCreateInternalObject(t) AcpiUtCreateInternalObjectDbg (_AcpiModuleName,__LINE__,_COMPONENT,t) 649450d6964Smyers #define AcpiUtAllocateObjectDesc() AcpiUtAllocateObjectDescDbg (_AcpiModuleName,__LINE__,_COMPONENT) 6507c478bd9Sstevel@tonic-gate 6517c478bd9Sstevel@tonic-gate void 6527c478bd9Sstevel@tonic-gate AcpiUtDeleteObjectDesc ( 6537c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object); 6547c478bd9Sstevel@tonic-gate 6557c478bd9Sstevel@tonic-gate BOOLEAN 6567c478bd9Sstevel@tonic-gate AcpiUtValidInternalObject ( 6577c478bd9Sstevel@tonic-gate void *Object); 6587c478bd9Sstevel@tonic-gate 659*db2bae30SDana Myers ACPI_OPERAND_OBJECT * 660*db2bae30SDana Myers AcpiUtCreatePackageObject ( 661*db2bae30SDana Myers UINT32 Count); 662*db2bae30SDana Myers 6637c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT * 6647c478bd9Sstevel@tonic-gate AcpiUtCreateBufferObject ( 6657c478bd9Sstevel@tonic-gate ACPI_SIZE BufferSize); 6667c478bd9Sstevel@tonic-gate 6677c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT * 6687c478bd9Sstevel@tonic-gate AcpiUtCreateStringObject ( 6697c478bd9Sstevel@tonic-gate ACPI_SIZE StringSize); 6707c478bd9Sstevel@tonic-gate 6717c478bd9Sstevel@tonic-gate ACPI_STATUS 6727c478bd9Sstevel@tonic-gate AcpiUtGetObjectSize( 6737c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Obj, 6747c478bd9Sstevel@tonic-gate ACPI_SIZE *ObjLength); 6757c478bd9Sstevel@tonic-gate 6767c478bd9Sstevel@tonic-gate 6777c478bd9Sstevel@tonic-gate /* 6787c478bd9Sstevel@tonic-gate * utstate - Generic state creation/cache routines 6797c478bd9Sstevel@tonic-gate */ 6807c478bd9Sstevel@tonic-gate void 6817c478bd9Sstevel@tonic-gate AcpiUtPushGenericState ( 6827c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE **ListHead, 6837c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE *State); 6847c478bd9Sstevel@tonic-gate 6857c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE * 6867c478bd9Sstevel@tonic-gate AcpiUtPopGenericState ( 6877c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE **ListHead); 6887c478bd9Sstevel@tonic-gate 6897c478bd9Sstevel@tonic-gate 6907c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE * 6917c478bd9Sstevel@tonic-gate AcpiUtCreateGenericState ( 6927c478bd9Sstevel@tonic-gate void); 6937c478bd9Sstevel@tonic-gate 6947c478bd9Sstevel@tonic-gate ACPI_THREAD_STATE * 6957c478bd9Sstevel@tonic-gate AcpiUtCreateThreadState ( 6967c478bd9Sstevel@tonic-gate void); 6977c478bd9Sstevel@tonic-gate 6987c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE * 6997c478bd9Sstevel@tonic-gate AcpiUtCreateUpdateState ( 7007c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object, 7017c478bd9Sstevel@tonic-gate UINT16 Action); 7027c478bd9Sstevel@tonic-gate 7037c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE * 7047c478bd9Sstevel@tonic-gate AcpiUtCreatePkgState ( 7057c478bd9Sstevel@tonic-gate void *InternalObject, 7067c478bd9Sstevel@tonic-gate void *ExternalObject, 7077c478bd9Sstevel@tonic-gate UINT16 Index); 7087c478bd9Sstevel@tonic-gate 7097c478bd9Sstevel@tonic-gate ACPI_STATUS 7107c478bd9Sstevel@tonic-gate AcpiUtCreateUpdateStateAndPush ( 7117c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *Object, 7127c478bd9Sstevel@tonic-gate UINT16 Action, 7137c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE **StateList); 7147c478bd9Sstevel@tonic-gate 7157c478bd9Sstevel@tonic-gate ACPI_STATUS 7167c478bd9Sstevel@tonic-gate AcpiUtCreatePkgStateAndPush ( 7177c478bd9Sstevel@tonic-gate void *InternalObject, 7187c478bd9Sstevel@tonic-gate void *ExternalObject, 7197c478bd9Sstevel@tonic-gate UINT16 Index, 7207c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE **StateList); 7217c478bd9Sstevel@tonic-gate 7227c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE * 7237c478bd9Sstevel@tonic-gate AcpiUtCreateControlState ( 7247c478bd9Sstevel@tonic-gate void); 7257c478bd9Sstevel@tonic-gate 7267c478bd9Sstevel@tonic-gate void 7277c478bd9Sstevel@tonic-gate AcpiUtDeleteGenericState ( 7287c478bd9Sstevel@tonic-gate ACPI_GENERIC_STATE *State); 7297c478bd9Sstevel@tonic-gate 7307c478bd9Sstevel@tonic-gate 7317c478bd9Sstevel@tonic-gate /* 7327c478bd9Sstevel@tonic-gate * utmath 7337c478bd9Sstevel@tonic-gate */ 7347c478bd9Sstevel@tonic-gate ACPI_STATUS 7357c478bd9Sstevel@tonic-gate AcpiUtDivide ( 7367c478bd9Sstevel@tonic-gate ACPI_INTEGER InDividend, 7377c478bd9Sstevel@tonic-gate ACPI_INTEGER InDivisor, 7387c478bd9Sstevel@tonic-gate ACPI_INTEGER *OutQuotient, 7397c478bd9Sstevel@tonic-gate ACPI_INTEGER *OutRemainder); 7407c478bd9Sstevel@tonic-gate 7417c478bd9Sstevel@tonic-gate ACPI_STATUS 7427c478bd9Sstevel@tonic-gate AcpiUtShortDivide ( 7437c478bd9Sstevel@tonic-gate ACPI_INTEGER InDividend, 7447c478bd9Sstevel@tonic-gate UINT32 Divisor, 7457c478bd9Sstevel@tonic-gate ACPI_INTEGER *OutQuotient, 7467c478bd9Sstevel@tonic-gate UINT32 *OutRemainder); 7477c478bd9Sstevel@tonic-gate 7487c478bd9Sstevel@tonic-gate /* 7497c478bd9Sstevel@tonic-gate * utmisc 7507c478bd9Sstevel@tonic-gate */ 751*db2bae30SDana Myers const char * 752*db2bae30SDana Myers AcpiUtValidateException ( 753*db2bae30SDana Myers ACPI_STATUS Status); 754*db2bae30SDana Myers 75527f7c583Smyers BOOLEAN 75627f7c583Smyers AcpiUtIsAmlTable ( 75727f7c583Smyers ACPI_TABLE_HEADER *Table); 75827f7c583Smyers 7597c478bd9Sstevel@tonic-gate ACPI_STATUS 760450d6964Smyers AcpiUtAllocateOwnerId ( 761450d6964Smyers ACPI_OWNER_ID *OwnerId); 762450d6964Smyers 763186507a7Smyers void 764450d6964Smyers AcpiUtReleaseOwnerId ( 765186507a7Smyers ACPI_OWNER_ID *OwnerId); 766450d6964Smyers 767450d6964Smyers ACPI_STATUS 7687c478bd9Sstevel@tonic-gate AcpiUtWalkPackageTree ( 7697c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT *SourceObject, 7707c478bd9Sstevel@tonic-gate void *TargetObject, 7717c478bd9Sstevel@tonic-gate ACPI_PKG_CALLBACK WalkCallback, 7727c478bd9Sstevel@tonic-gate void *Context); 7737c478bd9Sstevel@tonic-gate 774186507a7Smyers void 7757c478bd9Sstevel@tonic-gate AcpiUtStrupr ( 7767c478bd9Sstevel@tonic-gate char *SrcString); 7777c478bd9Sstevel@tonic-gate 7787c478bd9Sstevel@tonic-gate void 7797c478bd9Sstevel@tonic-gate AcpiUtPrintString ( 7807c478bd9Sstevel@tonic-gate char *String, 7817c478bd9Sstevel@tonic-gate UINT8 MaxLength); 7827c478bd9Sstevel@tonic-gate 7837c478bd9Sstevel@tonic-gate BOOLEAN 7847c478bd9Sstevel@tonic-gate AcpiUtValidAcpiName ( 7857c478bd9Sstevel@tonic-gate UINT32 Name); 7867c478bd9Sstevel@tonic-gate 787*db2bae30SDana Myers void 78827f7c583Smyers AcpiUtRepairName ( 789*db2bae30SDana Myers char *Name); 79027f7c583Smyers 7917c478bd9Sstevel@tonic-gate BOOLEAN 79227f7c583Smyers AcpiUtValidAcpiChar ( 79327f7c583Smyers char Character, 794*db2bae30SDana Myers UINT32 Position); 7957c478bd9Sstevel@tonic-gate 7967c478bd9Sstevel@tonic-gate ACPI_STATUS 7977c478bd9Sstevel@tonic-gate AcpiUtStrtoul64 ( 7987c478bd9Sstevel@tonic-gate char *String, 7997c478bd9Sstevel@tonic-gate UINT32 Base, 8007c478bd9Sstevel@tonic-gate ACPI_INTEGER *RetInteger); 8017c478bd9Sstevel@tonic-gate 8027c478bd9Sstevel@tonic-gate /* Values for Base above (16=Hex, 10=Decimal) */ 8037c478bd9Sstevel@tonic-gate 8047c478bd9Sstevel@tonic-gate #define ACPI_ANY_BASE 0 8057c478bd9Sstevel@tonic-gate 80627f7c583Smyers UINT32 80727f7c583Smyers AcpiUtDwordByteSwap ( 80827f7c583Smyers UINT32 Value); 80927f7c583Smyers 81027f7c583Smyers void 81127f7c583Smyers AcpiUtSetIntegerWidth ( 81227f7c583Smyers UINT8 Revision); 81327f7c583Smyers 81427f7c583Smyers #ifdef ACPI_DEBUG_OUTPUT 81527f7c583Smyers void 81627f7c583Smyers AcpiUtDisplayInitPathname ( 81727f7c583Smyers UINT8 Type, 81827f7c583Smyers ACPI_NAMESPACE_NODE *ObjHandle, 81927f7c583Smyers char *Path); 82027f7c583Smyers #endif 82127f7c583Smyers 82227f7c583Smyers 82327f7c583Smyers /* 82427f7c583Smyers * utresrc 82527f7c583Smyers */ 82627f7c583Smyers ACPI_STATUS 82727f7c583Smyers AcpiUtWalkAmlResources ( 82827f7c583Smyers UINT8 *Aml, 82927f7c583Smyers ACPI_SIZE AmlLength, 83027f7c583Smyers ACPI_WALK_AML_CALLBACK UserFunction, 83127f7c583Smyers void *Context); 83227f7c583Smyers 83330082d0cSmyers ACPI_STATUS 83430082d0cSmyers AcpiUtValidateResource ( 83530082d0cSmyers void *Aml, 83630082d0cSmyers UINT8 *ReturnIndex); 83730082d0cSmyers 83830082d0cSmyers UINT32 83930082d0cSmyers AcpiUtGetDescriptorLength ( 84030082d0cSmyers void *Aml); 84130082d0cSmyers 84230082d0cSmyers UINT16 84330082d0cSmyers AcpiUtGetResourceLength ( 84430082d0cSmyers void *Aml); 8457c478bd9Sstevel@tonic-gate 8467c478bd9Sstevel@tonic-gate UINT8 84730082d0cSmyers AcpiUtGetResourceHeaderLength ( 84830082d0cSmyers void *Aml); 84930082d0cSmyers 85030082d0cSmyers UINT8 85130082d0cSmyers AcpiUtGetResourceType ( 85230082d0cSmyers void *Aml); 85330082d0cSmyers 85430082d0cSmyers ACPI_STATUS 85530082d0cSmyers AcpiUtGetResourceEndTag ( 85630082d0cSmyers ACPI_OPERAND_OBJECT *ObjDesc, 85730082d0cSmyers UINT8 **EndTag); 8587c478bd9Sstevel@tonic-gate 8597c478bd9Sstevel@tonic-gate 8607c478bd9Sstevel@tonic-gate /* 861450d6964Smyers * utmutex - mutex support 8627c478bd9Sstevel@tonic-gate */ 863450d6964Smyers ACPI_STATUS 864450d6964Smyers AcpiUtMutexInitialize ( 865450d6964Smyers void); 8667c478bd9Sstevel@tonic-gate 8677c478bd9Sstevel@tonic-gate void 868450d6964Smyers AcpiUtMutexTerminate ( 869450d6964Smyers void); 8707c478bd9Sstevel@tonic-gate 871450d6964Smyers ACPI_STATUS 872450d6964Smyers AcpiUtAcquireMutex ( 873450d6964Smyers ACPI_MUTEX_HANDLE MutexId); 874450d6964Smyers 875450d6964Smyers ACPI_STATUS 876450d6964Smyers AcpiUtReleaseMutex ( 877450d6964Smyers ACPI_MUTEX_HANDLE MutexId); 878450d6964Smyers 879450d6964Smyers 880450d6964Smyers /* 881450d6964Smyers * utalloc - memory allocation and object caching 882450d6964Smyers */ 883450d6964Smyers ACPI_STATUS 884450d6964Smyers AcpiUtCreateCaches ( 885450d6964Smyers void); 886450d6964Smyers 887450d6964Smyers ACPI_STATUS 888450d6964Smyers AcpiUtDeleteCaches ( 889450d6964Smyers void); 8907c478bd9Sstevel@tonic-gate 8917c478bd9Sstevel@tonic-gate ACPI_STATUS 8927c478bd9Sstevel@tonic-gate AcpiUtValidateBuffer ( 8937c478bd9Sstevel@tonic-gate ACPI_BUFFER *Buffer); 8947c478bd9Sstevel@tonic-gate 8957c478bd9Sstevel@tonic-gate ACPI_STATUS 8967c478bd9Sstevel@tonic-gate AcpiUtInitializeBuffer ( 8977c478bd9Sstevel@tonic-gate ACPI_BUFFER *Buffer, 8987c478bd9Sstevel@tonic-gate ACPI_SIZE RequiredLength); 8997c478bd9Sstevel@tonic-gate 9007c478bd9Sstevel@tonic-gate void * 9017c478bd9Sstevel@tonic-gate AcpiUtAllocate ( 9027c478bd9Sstevel@tonic-gate ACPI_SIZE Size, 9037c478bd9Sstevel@tonic-gate UINT32 Component, 904*db2bae30SDana Myers const char *Module, 9057c478bd9Sstevel@tonic-gate UINT32 Line); 9067c478bd9Sstevel@tonic-gate 9077c478bd9Sstevel@tonic-gate void * 90827f7c583Smyers AcpiUtAllocateZeroed ( 9097c478bd9Sstevel@tonic-gate ACPI_SIZE Size, 9107c478bd9Sstevel@tonic-gate UINT32 Component, 911*db2bae30SDana Myers const char *Module, 9127c478bd9Sstevel@tonic-gate UINT32 Line); 9137c478bd9Sstevel@tonic-gate 9147c478bd9Sstevel@tonic-gate #ifdef ACPI_DBG_TRACK_ALLOCATIONS 9157c478bd9Sstevel@tonic-gate void * 9167c478bd9Sstevel@tonic-gate AcpiUtAllocateAndTrack ( 9177c478bd9Sstevel@tonic-gate ACPI_SIZE Size, 9187c478bd9Sstevel@tonic-gate UINT32 Component, 919*db2bae30SDana Myers const char *Module, 9207c478bd9Sstevel@tonic-gate UINT32 Line); 9217c478bd9Sstevel@tonic-gate 9227c478bd9Sstevel@tonic-gate void * 92327f7c583Smyers AcpiUtAllocateZeroedAndTrack ( 9247c478bd9Sstevel@tonic-gate ACPI_SIZE Size, 9257c478bd9Sstevel@tonic-gate UINT32 Component, 926*db2bae30SDana Myers const char *Module, 9277c478bd9Sstevel@tonic-gate UINT32 Line); 9287c478bd9Sstevel@tonic-gate 9297c478bd9Sstevel@tonic-gate void 9307c478bd9Sstevel@tonic-gate AcpiUtFreeAndTrack ( 9317c478bd9Sstevel@tonic-gate void *Address, 9327c478bd9Sstevel@tonic-gate UINT32 Component, 933*db2bae30SDana Myers const char *Module, 9347c478bd9Sstevel@tonic-gate UINT32 Line); 9357c478bd9Sstevel@tonic-gate 9367c478bd9Sstevel@tonic-gate void 9377c478bd9Sstevel@tonic-gate AcpiUtDumpAllocationInfo ( 9387c478bd9Sstevel@tonic-gate void); 9397c478bd9Sstevel@tonic-gate 9407c478bd9Sstevel@tonic-gate void 9417c478bd9Sstevel@tonic-gate AcpiUtDumpAllocations ( 9427c478bd9Sstevel@tonic-gate UINT32 Component, 943*db2bae30SDana Myers const char *Module); 94427f7c583Smyers 94527f7c583Smyers ACPI_STATUS 94627f7c583Smyers AcpiUtCreateList ( 94727f7c583Smyers char *ListName, 94827f7c583Smyers UINT16 ObjectSize, 94927f7c583Smyers ACPI_MEMORY_LIST **ReturnCache); 95027f7c583Smyers 95127f7c583Smyers 9527c478bd9Sstevel@tonic-gate #endif 9537c478bd9Sstevel@tonic-gate 9547c478bd9Sstevel@tonic-gate #endif /* _ACUTILS_H */ 955