1 /******************************************************************************
3 * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
5 *****************************************************************************/
7 /******************************************************************************
11 * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp.
12 * All rights reserved.
16 * 2.1. This is your license from Intel Corp. under its intellectual property
17 * rights. You may have additional license terms from the party that provided
18 * you this software, covering your right to use that party's intellectual
21 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
22 * copy of the source code appearing in this file ("Covered Code") an
23 * irrevocable, perpetual, worldwide license under Intel's copyrights in the
24 * base code distributed originally by Intel ("Original Intel Code") to copy,
25 * make derivatives, distribute, use and display any portion of the Covered
26 * Code in any form, with the right to sublicense such rights; and
28 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
29 * license (with the right to sublicense), under only those claims of Intel
30 * patents that are infringed by the Original Intel Code, to make, use, sell,
31 * offer to sell, and import the Covered Code and derivative works thereof
32 * solely to the minimum extent necessary to exercise the above copyright
33 * license, and in no event shall the patent license extend to any additions
34 * to or modifications of the Original Intel Code. No other license or right
35 * is granted directly or by implication, estoppel or otherwise;
37 * The above copyright and patent license is granted only if the following
42 * 3.1. Redistribution of Source with Rights to Further Distribute Source.
43 * Redistribution of source code of any substantial portion of the Covered
44 * Code or modification with rights to further distribute source must include
45 * the above Copyright Notice, the above License, this list of Conditions,
46 * and the following Disclaimer and Export Compliance provision. In addition,
47 * Licensee must cause all Covered Code to which Licensee contributes to
48 * contain a file documenting the changes Licensee made to create that Covered
49 * Code and the date of any change. Licensee must include in that file the
50 * documentation of any changes made by any predecessor Licensee. Licensee
51 * must include a prominent statement that the modification is derived,
52 * directly or indirectly, from Original Intel Code.
54 * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
55 * Redistribution of source code of any substantial portion of the Covered
56 * Code or modification without rights to further distribute source must
57 * include the following Disclaimer and Export Compliance provision in the
58 * documentation and/or other materials provided with distribution. In
59 * addition, Licensee may not authorize further sublicense of source of any
60 * portion of the Covered Code, and must include terms to the effect that the
61 * license from Licensee to its licensee is limited to the intellectual
62 * property embodied in the software Licensee provides to its licensee, and
63 * not to intellectual property embodied in modifications its licensee may
66 * 3.3. Redistribution of Executable. Redistribution in executable form of any
67 * substantial portion of the Covered Code or modification must reproduce the
68 * above Copyright Notice, and the following Disclaimer and Export Compliance
69 * provision in the documentation and/or other materials provided with the
72 * 3.4. Intel retains all right, title, and interest in and to the Original
75 * 3.5. Neither the name Intel nor any other trademark owned or controlled by
76 * Intel shall be used in advertising or otherwise to promote the sale, use or
77 * other dealings in products derived from or relating to the Covered Code
78 * without prior written authorization from Intel.
80 * 4. Disclaimer and Export Compliance
82 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
83 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
84 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
85 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
86 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
87 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
90 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
91 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
92 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
93 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
94 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
95 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
96 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
99 * 4.3. Licensee shall not export, either directly or indirectly, any of this
100 * software or system incorporating such software without first obtaining any
101 * required license or other approval from the U. S. Department of Commerce or
102 * any other agency or department of the United States Government. In the
103 * event Licensee exports any such software from the United States or
104 * re-exports any such software from a foreign destination, Licensee shall
105 * ensure that the distribution and export/re-export of the software is in
106 * compliance with all laws, regulations, orders, or other restrictions of the
107 * U.S. Export Administration Regulations. Licensee agrees that neither it nor
108 * any of its subsidiaries will export/re-export any technical data, process,
109 * software, or service, directly or indirectly, to any country for which the
110 * United States government or any agency thereof requires an export license,
111 * other governmental approval, or letter of assurance, without first obtaining
112 * such license, approval or letter.
114 *****************************************************************************
116 * Alternatively, you may choose to be licensed under the terms of the
119 * Redistribution and use in source and binary forms, with or without
120 * modification, are permitted provided that the following conditions
122 * 1. Redistributions of source code must retain the above copyright
123 * notice, this list of conditions, and the following disclaimer,
124 * without modification.
125 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
126 * substantially similar to the "NO WARRANTY" disclaimer below
127 * ("Disclaimer") and any redistribution must be conditioned upon
128 * including a substantially similar Disclaimer requirement for further
129 * binary redistribution.
130 * 3. Neither the names of the above-listed copyright holders nor the names
131 * of any contributors may be used to endorse or promote products derived
132 * from this software without specific prior written permission.
134 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
135 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
136 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
137 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
138 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
139 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
140 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
141 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
142 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
143 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
144 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
146 * Alternatively, you may choose to be licensed under the terms of the
147 * GNU General Public License ("GPL") version 2 as published by the Free
148 * Software Foundation.
150 *****************************************************************************/
156 extern const UINT8 AcpiGbl_ResourceAmlSizes
[];
157 extern const UINT8 AcpiGbl_ResourceAmlSerialBusSizes
[];
159 /* Strings used by the disassembler and debugger resource dump routines */
161 #if defined(ACPI_DEBUG_OUTPUT) || defined (ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER)
163 extern const char *AcpiGbl_BmDecode
[];
164 extern const char *AcpiGbl_ConfigDecode
[];
165 extern const char *AcpiGbl_ConsumeDecode
[];
166 extern const char *AcpiGbl_DecDecode
[];
167 extern const char *AcpiGbl_HeDecode
[];
168 extern const char *AcpiGbl_IoDecode
[];
169 extern const char *AcpiGbl_LlDecode
[];
170 extern const char *AcpiGbl_MaxDecode
[];
171 extern const char *AcpiGbl_MemDecode
[];
172 extern const char *AcpiGbl_MinDecode
[];
173 extern const char *AcpiGbl_MtpDecode
[];
174 extern const char *AcpiGbl_RngDecode
[];
175 extern const char *AcpiGbl_RwDecode
[];
176 extern const char *AcpiGbl_ShrDecode
[];
177 extern const char *AcpiGbl_SizDecode
[];
178 extern const char *AcpiGbl_TrsDecode
[];
179 extern const char *AcpiGbl_TtpDecode
[];
180 extern const char *AcpiGbl_TypDecode
[];
181 extern const char *AcpiGbl_PpcDecode
[];
182 extern const char *AcpiGbl_IorDecode
[];
183 extern const char *AcpiGbl_DtsDecode
[];
184 extern const char *AcpiGbl_CtDecode
[];
185 extern const char *AcpiGbl_SbtDecode
[];
186 extern const char *AcpiGbl_AmDecode
[];
187 extern const char *AcpiGbl_SmDecode
[];
188 extern const char *AcpiGbl_WmDecode
[];
189 extern const char *AcpiGbl_CphDecode
[];
190 extern const char *AcpiGbl_CpoDecode
[];
191 extern const char *AcpiGbl_DpDecode
[];
192 extern const char *AcpiGbl_EdDecode
[];
193 extern const char *AcpiGbl_BpbDecode
[];
194 extern const char *AcpiGbl_SbDecode
[];
195 extern const char *AcpiGbl_FcDecode
[];
196 extern const char *AcpiGbl_PtDecode
[];
197 extern const char *AcpiGbl_PtypDecode
[];
201 * For the iASL compiler case, the output is redirected to stderr so that
202 * any of the various ACPI errors and warnings do not appear in the output
203 * files, for either the compiler or disassembler portions of the tool.
205 #ifdef ACPI_ASL_COMPILER
209 #define ACPI_MSG_REDIRECT_BEGIN \
210 FILE *OutputFile = AcpiGbl_OutputFile; \
211 AcpiOsRedirectOutput (stderr);
213 #define ACPI_MSG_REDIRECT_END \
214 AcpiOsRedirectOutput (OutputFile);
218 * non-iASL case - no redirection, nothing to do
220 #define ACPI_MSG_REDIRECT_BEGIN
221 #define ACPI_MSG_REDIRECT_END
225 * Common error message prefixes
227 #ifndef ACPI_MSG_ERROR
228 #define ACPI_MSG_ERROR "ACPI Error: "
230 #ifndef ACPI_MSG_WARNING
231 #define ACPI_MSG_WARNING "ACPI Warning: "
233 #ifndef ACPI_MSG_INFO
234 #define ACPI_MSG_INFO "ACPI: "
237 #ifndef ACPI_MSG_BIOS_ERROR
238 #define ACPI_MSG_BIOS_ERROR "Firmware Error (ACPI): "
240 #ifndef ACPI_MSG_BIOS_WARNING
241 #define ACPI_MSG_BIOS_WARNING "Firmware Warning (ACPI): "
245 * Common message suffix
247 #define ACPI_MSG_SUFFIX \
248 AcpiOsPrintf (" (%8.8X/%s-%u)\n", ACPI_CA_VERSION, ModuleName, LineNumber)
250 /* Flags to indicate implicit or explicit string-to-integer conversion */
252 #define ACPI_IMPLICIT_CONVERSION TRUE
253 #define ACPI_NO_IMPLICIT_CONVERSION FALSE
255 /* Types for Resource descriptor entries */
257 #define ACPI_INVALID_RESOURCE 0
258 #define ACPI_FIXED_LENGTH 1
259 #define ACPI_VARIABLE_LENGTH 2
260 #define ACPI_SMALL_VARIABLE_LENGTH 3
263 ACPI_STATUS (*ACPI_WALK_AML_CALLBACK
) (
271 ACPI_STATUS (*ACPI_PKG_CALLBACK
) (
273 ACPI_OPERAND_OBJECT
*SourceObject
,
274 ACPI_GENERIC_STATE
*State
,
277 typedef struct acpi_pkg_info
286 /* Object reference counts */
288 #define REF_INCREMENT (UINT16) 0
289 #define REF_DECREMENT (UINT16) 1
291 /* AcpiUtDumpBuffer */
293 #define DB_BYTE_DISPLAY 1
294 #define DB_WORD_DISPLAY 2
295 #define DB_DWORD_DISPLAY 4
296 #define DB_QWORD_DISPLAY 8
300 * utascii - ASCII utilities
307 AcpiUtValidNameChar (
312 AcpiUtCheckAndRepairAscii (
319 * utnonansi - Non-ANSI C library functions
336 * utstrsuppt - string-to-integer conversion support functions
339 AcpiUtConvertOctalString (
341 UINT64
*ReturnValue
);
344 AcpiUtConvertDecimalString (
346 UINT64
*ReturnValuePtr
);
349 AcpiUtConvertHexString (
351 UINT64
*ReturnValuePtr
);
354 AcpiUtRemoveWhitespace (
358 AcpiUtRemoveLeadingZeros (
362 AcpiUtDetectHexPrefix (
366 AcpiUtDetectOctalPrefix (
371 * utstrtoul64 - string-to-integer conversion functions
379 AcpiUtExplicitStrtoul64 (
383 AcpiUtImplicitStrtoul64 (
388 * utglobal - Global data structures and procedures
398 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
401 AcpiUtGetNotifyName (
403 ACPI_OBJECT_TYPE Type
);
408 ACPI_OBJECT_TYPE Type
);
415 AcpiUtGetDescriptorName (
419 AcpiUtGetReferenceName (
420 ACPI_OPERAND_OBJECT
*Object
);
423 AcpiUtGetObjectTypeName (
424 ACPI_OPERAND_OBJECT
*ObjDesc
);
427 AcpiUtGetRegionName (
435 AcpiUtGetArgumentTypeName (
439 AcpiUtHexToAsciiChar (
444 AcpiUtAsciiToHexByte (
449 AcpiUtAsciiCharToHex (
453 AcpiUtValidObjectType (
454 ACPI_OBJECT_TYPE Type
);
458 * utinit - miscellaneous initialization and shutdown
461 AcpiUtHardwareInitialize (
465 AcpiUtSubsystemShutdown (
470 * utcopy - Object construction and conversion interfaces
473 AcpiUtBuildSimpleObject(
474 ACPI_OPERAND_OBJECT
*Obj
,
475 ACPI_OBJECT
*UserObj
,
477 UINT32
*BufferSpaceUsed
);
480 AcpiUtBuildPackageObject (
481 ACPI_OPERAND_OBJECT
*Obj
,
486 AcpiUtCopyIobjectToEobject (
487 ACPI_OPERAND_OBJECT
*Obj
,
488 ACPI_BUFFER
*RetBuffer
);
491 AcpiUtCopyEobjectToIobject (
493 ACPI_OPERAND_OBJECT
**InternalObj
);
496 AcpiUtCopyISimpleToIsimple (
497 ACPI_OPERAND_OBJECT
*SourceObj
,
498 ACPI_OPERAND_OBJECT
*DestObj
);
501 AcpiUtCopyIobjectToIobject (
502 ACPI_OPERAND_OBJECT
*SourceDesc
,
503 ACPI_OPERAND_OBJECT
**DestDesc
,
504 ACPI_WALK_STATE
*WalkState
);
508 * utcreate - Object creation
511 AcpiUtUpdateObjectReference (
512 ACPI_OPERAND_OBJECT
*Object
,
517 * utdebug - Debug interfaces
520 AcpiUtInitStackPtrTrace (
524 AcpiUtTrackStackPtr (
530 const char *FunctionName
,
531 const char *ModuleName
,
537 const char *FunctionName
,
538 const char *ModuleName
,
540 const void *Pointer
);
545 const char *FunctionName
,
546 const char *ModuleName
,
553 const char *FunctionName
,
554 const char *ModuleName
,
561 const char *FunctionName
,
562 const char *ModuleName
,
568 const char *FunctionName
,
569 const char *ModuleName
,
576 const char *FunctionName
,
577 const char *ModuleName
,
584 const char *FunctionName
,
585 const char *ModuleName
,
592 const char *FunctionName
,
593 const char *ModuleName
,
598 AcpiUtDebugDumpBuffer (
611 #ifdef ACPI_APPLICATION
613 AcpiUtDumpBufferToFile (
632 AcpiUtReportWarning (
638 * utdelete - Object deletion and reference counts
642 ACPI_OPERAND_OBJECT
*Object
);
645 AcpiUtRemoveReference (
646 ACPI_OPERAND_OBJECT
*Object
);
649 AcpiUtDeleteInternalPackageObject (
650 ACPI_OPERAND_OBJECT
*Object
);
653 AcpiUtDeleteInternalSimpleObject (
654 ACPI_OPERAND_OBJECT
*Object
);
657 AcpiUtDeleteInternalObjectList (
658 ACPI_OPERAND_OBJECT
**ObjList
);
662 * uteval - object evaluation
665 AcpiUtEvaluateObject (
666 ACPI_NAMESPACE_NODE
*PrefixNode
,
668 UINT32 ExpectedReturnBtypes
,
669 ACPI_OPERAND_OBJECT
**ReturnDesc
);
672 AcpiUtEvaluateNumericObject (
673 const char *ObjectName
,
674 ACPI_NAMESPACE_NODE
*DeviceNode
,
679 ACPI_NAMESPACE_NODE
*DeviceNode
,
680 UINT32
*StatusFlags
);
683 AcpiUtExecutePowerMethods (
684 ACPI_NAMESPACE_NODE
*DeviceNode
,
685 const char **MethodNames
,
691 * utids - device ID support
695 ACPI_NAMESPACE_NODE
*DeviceNode
,
696 ACPI_PNP_DEVICE_ID
**ReturnId
);
700 ACPI_NAMESPACE_NODE
*DeviceNode
,
701 ACPI_PNP_DEVICE_ID
**ReturnId
);
705 ACPI_NAMESPACE_NODE
*DeviceNode
,
706 ACPI_PNP_DEVICE_ID_LIST
**ReturnCidList
);
710 ACPI_NAMESPACE_NODE
*DeviceNode
,
711 ACPI_PNP_DEVICE_ID
**ReturnId
);
715 * utlock - reader/writer locks
726 AcpiUtAcquireReadLock (
730 AcpiUtReleaseReadLock (
734 AcpiUtAcquireWriteLock (
738 AcpiUtReleaseWriteLock (
743 * utobject - internal object create/delete/cache routines
745 ACPI_OPERAND_OBJECT
*
746 AcpiUtCreateInternalObjectDbg (
747 const char *ModuleName
,
750 ACPI_OBJECT_TYPE Type
);
753 AcpiUtAllocateObjectDescDbg (
754 const char *ModuleName
,
758 #define AcpiUtCreateInternalObject(t) AcpiUtCreateInternalObjectDbg (_AcpiModuleName,__LINE__,_COMPONENT,t)
759 #define AcpiUtAllocateObjectDesc() AcpiUtAllocateObjectDescDbg (_AcpiModuleName,__LINE__,_COMPONENT)
762 AcpiUtDeleteObjectDesc (
763 ACPI_OPERAND_OBJECT
*Object
);
766 AcpiUtValidInternalObject (
769 ACPI_OPERAND_OBJECT
*
770 AcpiUtCreatePackageObject (
773 ACPI_OPERAND_OBJECT
*
774 AcpiUtCreateIntegerObject (
777 ACPI_OPERAND_OBJECT
*
778 AcpiUtCreateBufferObject (
779 ACPI_SIZE BufferSize
);
781 ACPI_OPERAND_OBJECT
*
782 AcpiUtCreateStringObject (
783 ACPI_SIZE StringSize
);
787 ACPI_OPERAND_OBJECT
*Obj
,
788 ACPI_SIZE
*ObjLength
);
792 * utosi - Support for the _OSI predefined control method
795 AcpiUtInitializeInterfaces (
799 AcpiUtInterfaceTerminate (
803 AcpiUtInstallInterface (
804 ACPI_STRING InterfaceName
);
807 AcpiUtRemoveInterface (
808 ACPI_STRING InterfaceName
);
811 AcpiUtUpdateInterfaces (
814 ACPI_INTERFACE_INFO
*
816 ACPI_STRING InterfaceName
);
819 AcpiUtOsiImplementation (
820 ACPI_WALK_STATE
*WalkState
);
824 * utpredef - support for predefined names
826 const ACPI_PREDEFINED_INFO
*
827 AcpiUtGetNextPredefinedMethod (
828 const ACPI_PREDEFINED_INFO
*ThisName
);
830 const ACPI_PREDEFINED_INFO
*
831 AcpiUtMatchPredefinedMethod (
835 AcpiUtGetExpectedReturnTypes (
837 UINT32 ExpectedBtypes
);
839 #if (defined ACPI_ASL_COMPILER || defined ACPI_HELP_APP)
840 const ACPI_PREDEFINED_INFO
*
841 AcpiUtMatchResourceName (
845 AcpiUtDisplayPredefinedMethod (
847 const ACPI_PREDEFINED_INFO
*ThisName
,
851 AcpiUtGetResourceBitWidth (
858 * utstate - Generic state creation/cache routines
861 AcpiUtPushGenericState (
862 ACPI_GENERIC_STATE
**ListHead
,
863 ACPI_GENERIC_STATE
*State
);
866 AcpiUtPopGenericState (
867 ACPI_GENERIC_STATE
**ListHead
);
871 AcpiUtCreateGenericState (
875 AcpiUtCreateThreadState (
879 AcpiUtCreateUpdateState (
880 ACPI_OPERAND_OBJECT
*Object
,
884 AcpiUtCreatePkgState (
885 void *InternalObject
,
886 void *ExternalObject
,
890 AcpiUtCreateUpdateStateAndPush (
891 ACPI_OPERAND_OBJECT
*Object
,
893 ACPI_GENERIC_STATE
**StateList
);
896 AcpiUtCreateControlState (
900 AcpiUtDeleteGenericState (
901 ACPI_GENERIC_STATE
*State
);
912 UINT64
*OutRemainder
);
919 UINT32
*OutRemainder
);
922 AcpiUtShortMultiply (
923 UINT64 InMultiplicand
,
928 AcpiUtShortShiftLeft (
934 AcpiUtShortShiftRight (
943 const ACPI_EXCEPTION_INFO
*
944 AcpiUtValidateException (
948 AcpiUtIsPciRootBridge (
951 #if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP || defined ACPI_NAMES_APP)
954 ACPI_TABLE_HEADER
*Table
);
958 AcpiUtWalkPackageTree (
959 ACPI_OPERAND_OBJECT
*SourceObject
,
961 ACPI_PKG_CALLBACK WalkCallback
,
964 /* Values for Base above (16=Hex, 10=Decimal) */
966 #define ACPI_ANY_BASE 0
970 AcpiUtDwordByteSwap (
974 AcpiUtSetIntegerWidth (
977 #ifdef ACPI_DEBUG_OUTPUT
979 AcpiUtDisplayInitPathname (
981 ACPI_NAMESPACE_NODE
*ObjHandle
,
987 * utownerid - Support for Table/Method Owner IDs
990 AcpiUtAllocateOwnerId (
991 ACPI_OWNER_ID
*OwnerId
);
994 AcpiUtReleaseOwnerId (
995 ACPI_OWNER_ID
*OwnerId
);
1002 AcpiUtWalkAmlResources (
1003 ACPI_WALK_STATE
*WalkState
,
1005 ACPI_SIZE AmlLength
,
1006 ACPI_WALK_AML_CALLBACK UserFunction
,
1010 AcpiUtValidateResource (
1011 ACPI_WALK_STATE
*WalkState
,
1013 UINT8
*ReturnIndex
);
1016 AcpiUtGetDescriptorLength (
1020 AcpiUtGetResourceLength (
1024 AcpiUtGetResourceHeaderLength (
1028 AcpiUtGetResourceType (
1032 AcpiUtGetResourceEndTag (
1033 ACPI_OPERAND_OBJECT
*ObjDesc
,
1038 * utstring - String and character utilities
1045 #if defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP
1047 UtConvertBackslashes (
1055 #if defined (ACPI_DEBUGGER) || defined (ACPI_APPLICATION) || defined (ACPI_DEBUG_OUTPUT)
1066 ACPI_SIZE DestSize
);
1079 ACPI_SIZE MaxTransferLength
);
1084 * utmutex - mutex support
1087 AcpiUtMutexInitialize (
1091 AcpiUtMutexTerminate (
1095 AcpiUtAcquireMutex (
1096 ACPI_MUTEX_HANDLE MutexId
);
1099 AcpiUtReleaseMutex (
1100 ACPI_MUTEX_HANDLE MutexId
);
1104 * utalloc - memory allocation and object caching
1107 AcpiUtCreateCaches (
1111 AcpiUtDeleteCaches (
1115 AcpiUtValidateBuffer (
1116 ACPI_BUFFER
*Buffer
);
1119 AcpiUtInitializeBuffer (
1120 ACPI_BUFFER
*Buffer
,
1121 ACPI_SIZE RequiredLength
);
1123 #ifdef ACPI_DBG_TRACK_ALLOCATIONS
1125 AcpiUtAllocateAndTrack (
1132 AcpiUtAllocateZeroedAndTrack (
1139 AcpiUtFreeAndTrack (
1146 AcpiUtDumpAllocationInfo (
1150 AcpiUtDumpAllocations (
1152 const char *Module
);
1156 const char *ListName
,
1158 ACPI_MEMORY_LIST
**ReturnCache
);
1160 #endif /* ACPI_DBG_TRACK_ALLOCATIONS */
1164 * utaddress - address range check
1167 AcpiUtAddAddressRange (
1168 ACPI_ADR_SPACE_TYPE SpaceId
,
1169 ACPI_PHYSICAL_ADDRESS Address
,
1171 ACPI_NAMESPACE_NODE
*RegionNode
);
1174 AcpiUtRemoveAddressRange (
1175 ACPI_ADR_SPACE_TYPE SpaceId
,
1176 ACPI_NAMESPACE_NODE
*RegionNode
);
1179 AcpiUtCheckAddressRange (
1180 ACPI_ADR_SPACE_TYPE SpaceId
,
1181 ACPI_PHYSICAL_ADDRESS Address
,
1186 AcpiUtDeleteAddressLists (
1191 * utxferror - various error/warning output functions
1193 void ACPI_INTERNAL_VAR_XFACE
1194 AcpiUtPredefinedWarning (
1195 const char *ModuleName
,
1202 void ACPI_INTERNAL_VAR_XFACE
1203 AcpiUtPredefinedInfo (
1204 const char *ModuleName
,
1211 void ACPI_INTERNAL_VAR_XFACE
1212 AcpiUtPredefinedBiosError (
1213 const char *ModuleName
,
1221 AcpiUtPrefixedNamespaceError (
1222 const char *ModuleName
,
1224 ACPI_GENERIC_STATE
*PrefixScope
,
1225 const char *InternalName
,
1226 ACPI_STATUS LookupStatus
);
1230 const char *ModuleName
,
1232 const char *Message
,
1233 ACPI_NAMESPACE_NODE
*Node
,
1235 ACPI_STATUS LookupStatus
);
1239 * Utility functions for ACPI names and IDs
1241 const AH_PREDEFINED_NAME
*
1242 AcpiAhMatchPredefinedName (
1245 const AH_DEVICE_ID
*
1246 AcpiAhMatchHardwareId (
1255 * utuuid -- UUID support functions
1257 #if (defined ACPI_ASL_COMPILER || defined ACPI_DISASSEMBLER || defined ACPI_EXEC_APP || defined ACPI_HELP_APP || defined KLD_MODULE)
1259 AcpiUtConvertStringToUuid (
1264 #endif /* _ACUTILS_H */