xref: /illumos-gate/usr/src/uts/intel/sys/acpi/acutils.h (revision 7c478bd9)
1 /******************************************************************************
2  *
3  * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
4  *       $Revision: 172 $
5  *
6  *****************************************************************************/
7 
8 /******************************************************************************
9  *
10  * 1. Copyright Notice
11  *
12  * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp.
13  * All rights reserved.
14  *
15  * 2. License
16  *
17  * 2.1. This is your license from Intel Corp. under its intellectual property
18  * rights.  You may have additional license terms from the party that provided
19  * you this software, covering your right to use that party's intellectual
20  * property rights.
21  *
22  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
23  * copy of the source code appearing in this file ("Covered Code") an
24  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
25  * base code distributed originally by Intel ("Original Intel Code") to copy,
26  * make derivatives, distribute, use and display any portion of the Covered
27  * Code in any form, with the right to sublicense such rights; and
28  *
29  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
30  * license (with the right to sublicense), under only those claims of Intel
31  * patents that are infringed by the Original Intel Code, to make, use, sell,
32  * offer to sell, and import the Covered Code and derivative works thereof
33  * solely to the minimum extent necessary to exercise the above copyright
34  * license, and in no event shall the patent license extend to any additions
35  * to or modifications of the Original Intel Code.  No other license or right
36  * is granted directly or by implication, estoppel or otherwise;
37  *
38  * The above copyright and patent license is granted only if the following
39  * conditions are met:
40  *
41  * 3. Conditions
42  *
43  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
44  * Redistribution of source code of any substantial portion of the Covered
45  * Code or modification with rights to further distribute source must include
46  * the above Copyright Notice, the above License, this list of Conditions,
47  * and the following Disclaimer and Export Compliance provision.  In addition,
48  * Licensee must cause all Covered Code to which Licensee contributes to
49  * contain a file documenting the changes Licensee made to create that Covered
50  * Code and the date of any change.  Licensee must include in that file the
51  * documentation of any changes made by any predecessor Licensee.  Licensee
52  * must include a prominent statement that the modification is derived,
53  * directly or indirectly, from Original Intel Code.
54  *
55  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
56  * Redistribution of source code of any substantial portion of the Covered
57  * Code or modification without rights to further distribute source must
58  * include the following Disclaimer and Export Compliance provision in the
59  * documentation and/or other materials provided with distribution.  In
60  * addition, Licensee may not authorize further sublicense of source of any
61  * portion of the Covered Code, and must include terms to the effect that the
62  * license from Licensee to its licensee is limited to the intellectual
63  * property embodied in the software Licensee provides to its licensee, and
64  * not to intellectual property embodied in modifications its licensee may
65  * make.
66  *
67  * 3.3. Redistribution of Executable. Redistribution in executable form of any
68  * substantial portion of the Covered Code or modification must reproduce the
69  * above Copyright Notice, and the following Disclaimer and Export Compliance
70  * provision in the documentation and/or other materials provided with the
71  * distribution.
72  *
73  * 3.4. Intel retains all right, title, and interest in and to the Original
74  * Intel Code.
75  *
76  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
77  * Intel shall be used in advertising or otherwise to promote the sale, use or
78  * other dealings in products derived from or relating to the Covered Code
79  * without prior written authorization from Intel.
80  *
81  * 4. Disclaimer and Export Compliance
82  *
83  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
84  * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
85  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
86  * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
87  * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
88  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
89  * PARTICULAR PURPOSE.
90  *
91  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
92  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
93  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
94  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
95  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
96  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
97  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
98  * LIMITED REMEDY.
99  *
100  * 4.3. Licensee shall not export, either directly or indirectly, any of this
101  * software or system incorporating such software without first obtaining any
102  * required license or other approval from the U. S. Department of Commerce or
103  * any other agency or department of the United States Government.  In the
104  * event Licensee exports any such software from the United States or
105  * re-exports any such software from a foreign destination, Licensee shall
106  * ensure that the distribution and export/re-export of the software is in
107  * compliance with all laws, regulations, orders, or other restrictions of the
108  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
109  * any of its subsidiaries will export/re-export any technical data, process,
110  * software, or service, directly or indirectly, to any country for which the
111  * United States government or any agency thereof requires an export license,
112  * other governmental approval, or letter of assurance, without first obtaining
113  * such license, approval or letter.
114  *
115  *****************************************************************************/
116 
117 #ifndef _ACUTILS_H
118 #define _ACUTILS_H
119 
120 
121 typedef
122 ACPI_STATUS (*ACPI_PKG_CALLBACK) (
123     UINT8                   ObjectType,
124     ACPI_OPERAND_OBJECT     *SourceObject,
125     ACPI_GENERIC_STATE      *State,
126     void                    *Context);
127 
128 typedef struct acpi_pkg_info
129 {
130     UINT8                   *FreeSpace;
131     ACPI_SIZE               Length;
132     UINT32                  ObjectSpace;
133     UINT32                  NumPackages;
134 
135 } ACPI_PKG_INFO;
136 
137 #define REF_INCREMENT       (UINT16) 0
138 #define REF_DECREMENT       (UINT16) 1
139 #define REF_FORCE_DELETE    (UINT16) 2
140 
141 /* AcpiUtDumpBuffer */
142 
143 #define DB_BYTE_DISPLAY     1
144 #define DB_WORD_DISPLAY     2
145 #define DB_DWORD_DISPLAY    4
146 #define DB_QWORD_DISPLAY    8
147 
148 
149 /*
150  * utglobal - Global data structures and procedures
151  */
152 void
153 AcpiUtInitGlobals (
154     void);
155 
156 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
157 
158 char *
159 AcpiUtGetMutexName (
160     UINT32                  MutexId);
161 
162 #endif
163 
164 char *
165 AcpiUtGetTypeName (
166     ACPI_OBJECT_TYPE        Type);
167 
168 char *
169 AcpiUtGetNodeName (
170     void                    *Object);
171 
172 char *
173 AcpiUtGetDescriptorName (
174     void                    *Object);
175 
176 char *
177 AcpiUtGetObjectTypeName (
178     ACPI_OPERAND_OBJECT     *ObjDesc);
179 
180 char *
181 AcpiUtGetRegionName (
182     UINT8                   SpaceId);
183 
184 char *
185 AcpiUtGetEventName (
186     UINT32                  EventId);
187 
188 char
189 AcpiUtHexToAsciiChar (
190     ACPI_INTEGER            Integer,
191     UINT32                  Position);
192 
193 BOOLEAN
194 AcpiUtValidObjectType (
195     ACPI_OBJECT_TYPE        Type);
196 
197 ACPI_OWNER_ID
198 AcpiUtAllocateOwnerId (
199     UINT32                  IdType);
200 
201 
202 /*
203  * utinit - miscellaneous initialization and shutdown
204  */
205 ACPI_STATUS
206 AcpiUtHardwareInitialize (
207     void);
208 
209 void
210 AcpiUtSubsystemShutdown (
211     void);
212 
213 ACPI_STATUS
214 AcpiUtValidateFadt (
215     void);
216 
217 
218 /*
219  * utclib - Local implementations of C library functions
220  */
221 #ifndef ACPI_USE_SYSTEM_CLIBRARY
222 
223 ACPI_SIZE
224 AcpiUtStrlen (
225     const char              *String);
226 
227 char *
228 AcpiUtStrcpy (
229     char                    *DstString,
230     const char              *SrcString);
231 
232 char *
233 AcpiUtStrncpy (
234     char                    *DstString,
235     const char              *SrcString,
236     ACPI_SIZE               Count);
237 
238 int
239 AcpiUtMemcmp (
240     const char              *Buffer1,
241     const char              *Buffer2,
242     ACPI_SIZE               Count);
243 
244 int
245 AcpiUtStrncmp (
246     const char              *String1,
247     const char              *String2,
248     ACPI_SIZE               Count);
249 
250 int
251 AcpiUtStrcmp (
252     const char              *String1,
253     const char              *String2);
254 
255 char *
256 AcpiUtStrcat (
257     char                    *DstString,
258     const char              *SrcString);
259 
260 char *
261 AcpiUtStrncat (
262     char                    *DstString,
263     const char              *SrcString,
264     ACPI_SIZE               Count);
265 
266 UINT32
267 AcpiUtStrtoul (
268     const char              *String,
269     char                    **Terminator,
270     UINT32                  Base);
271 
272 char *
273 AcpiUtStrstr (
274     char                    *String1,
275     char                    *String2);
276 
277 void *
278 AcpiUtMemcpy (
279     void                    *Dest,
280     const void              *Src,
281     ACPI_SIZE               Count);
282 
283 void *
284 AcpiUtMemset (
285     void                    *Dest,
286     ACPI_NATIVE_UINT        Value,
287     ACPI_SIZE               Count);
288 
289 int
290 AcpiUtToUpper (
291     int                     c);
292 
293 int
294 AcpiUtToLower (
295     int                     c);
296 
297 extern const UINT8 _acpi_ctype[];
298 
299 #define _ACPI_XA     0x00    /* extra alphabetic - not supported */
300 #define _ACPI_XS     0x40    /* extra space */
301 #define _ACPI_BB     0x00    /* BEL, BS, etc. - not supported */
302 #define _ACPI_CN     0x20    /* CR, FF, HT, NL, VT */
303 #define _ACPI_DI     0x04    /* '0'-'9' */
304 #define _ACPI_LO     0x02    /* 'a'-'z' */
305 #define _ACPI_PU     0x10    /* punctuation */
306 #define _ACPI_SP     0x08    /* space */
307 #define _ACPI_UP     0x01    /* 'A'-'Z' */
308 #define _ACPI_XD     0x80    /* '0'-'9', 'A'-'F', 'a'-'f' */
309 
310 #define ACPI_IS_DIGIT(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI))
311 #define ACPI_IS_SPACE(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP))
312 #define ACPI_IS_XDIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_XD))
313 #define ACPI_IS_UPPER(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_UP))
314 #define ACPI_IS_LOWER(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO))
315 #define ACPI_IS_PRINT(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_SP | _ACPI_PU))
316 #define ACPI_IS_ALPHA(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP))
317 #define ACPI_IS_ASCII(c)  ((c) < 0x80)
318 
319 #endif /* ACPI_USE_SYSTEM_CLIBRARY */
320 
321 
322 /*
323  * utcopy - Object construction and conversion interfaces
324  */
325 ACPI_STATUS
326 AcpiUtBuildSimpleObject(
327     ACPI_OPERAND_OBJECT     *Obj,
328     ACPI_OBJECT             *UserObj,
329     UINT8                   *DataSpace,
330     UINT32                  *BufferSpaceUsed);
331 
332 ACPI_STATUS
333 AcpiUtBuildPackageObject (
334     ACPI_OPERAND_OBJECT     *Obj,
335     UINT8                   *Buffer,
336     UINT32                  *SpaceUsed);
337 
338 ACPI_STATUS
339 AcpiUtCopyIobjectToEobject (
340     ACPI_OPERAND_OBJECT     *Obj,
341     ACPI_BUFFER             *RetBuffer);
342 
343 ACPI_STATUS
344 AcpiUtCopyEobjectToIobject (
345     ACPI_OBJECT             *Obj,
346     ACPI_OPERAND_OBJECT     **InternalObj);
347 
348 ACPI_STATUS
349 AcpiUtCopyISimpleToIsimple (
350     ACPI_OPERAND_OBJECT     *SourceObj,
351     ACPI_OPERAND_OBJECT     *DestObj);
352 
353 ACPI_STATUS
354 AcpiUtCopyIobjectToIobject (
355     ACPI_OPERAND_OBJECT     *SourceDesc,
356     ACPI_OPERAND_OBJECT     **DestDesc,
357     ACPI_WALK_STATE         *WalkState);
358 
359 
360 /*
361  * utcreate - Object creation
362  */
363 ACPI_STATUS
364 AcpiUtUpdateObjectReference (
365     ACPI_OPERAND_OBJECT     *Object,
366     UINT16                  Action);
367 
368 
369 /*
370  * utdebug - Debug interfaces
371  */
372 void
373 AcpiUtInitStackPtrTrace (
374     void);
375 
376 void
377 AcpiUtTrackStackPtr (
378     void);
379 
380 void
381 AcpiUtTrace (
382     UINT32                  LineNumber,
383     ACPI_DEBUG_PRINT_INFO   *DbgInfo);
384 
385 void
386 AcpiUtTracePtr (
387     UINT32                  LineNumber,
388     ACPI_DEBUG_PRINT_INFO   *DbgInfo,
389     void                    *Pointer);
390 
391 void
392 AcpiUtTraceU32 (
393     UINT32                  LineNumber,
394     ACPI_DEBUG_PRINT_INFO   *DbgInfo,
395     UINT32                  Integer);
396 
397 void
398 AcpiUtTraceStr (
399     UINT32                  LineNumber,
400     ACPI_DEBUG_PRINT_INFO   *DbgInfo,
401     char                    *String);
402 
403 void
404 AcpiUtExit (
405     UINT32                  LineNumber,
406     ACPI_DEBUG_PRINT_INFO   *DbgInfo);
407 
408 void
409 AcpiUtStatusExit (
410     UINT32                  LineNumber,
411     ACPI_DEBUG_PRINT_INFO   *DbgInfo,
412     ACPI_STATUS             Status);
413 
414 void
415 AcpiUtValueExit (
416     UINT32                  LineNumber,
417     ACPI_DEBUG_PRINT_INFO   *DbgInfo,
418     ACPI_INTEGER            Value);
419 
420 void
421 AcpiUtPtrExit (
422     UINT32                  LineNumber,
423     ACPI_DEBUG_PRINT_INFO   *DbgInfo,
424     UINT8                   *Ptr);
425 
426 void
427 AcpiUtReportInfo (
428     char                    *ModuleName,
429     UINT32                  LineNumber,
430     UINT32                  ComponentId);
431 
432 void
433 AcpiUtReportError (
434     char                    *ModuleName,
435     UINT32                  LineNumber,
436     UINT32                  ComponentId);
437 
438 void
439 AcpiUtReportWarning (
440     char                    *ModuleName,
441     UINT32                  LineNumber,
442     UINT32                  ComponentId);
443 
444 void
445 AcpiUtDumpBuffer (
446     UINT8                   *Buffer,
447     UINT32                  Count,
448     UINT32                  Display,
449     UINT32                  componentId);
450 
451 void ACPI_INTERNAL_VAR_XFACE
452 AcpiUtDebugPrint (
453     UINT32                  RequestedDebugLevel,
454     UINT32                  LineNumber,
455     ACPI_DEBUG_PRINT_INFO   *DbgInfo,
456     char                    *Format,
457     ...) ACPI_PRINTF_LIKE_FUNC;
458 
459 void ACPI_INTERNAL_VAR_XFACE
460 AcpiUtDebugPrintRaw (
461     UINT32                  RequestedDebugLevel,
462     UINT32                  LineNumber,
463     ACPI_DEBUG_PRINT_INFO   *DbgInfo,
464     char                    *Format,
465     ...) ACPI_PRINTF_LIKE_FUNC;
466 
467 
468 /*
469  * utdelete - Object deletion and reference counts
470  */
471 void
472 AcpiUtAddReference (
473     ACPI_OPERAND_OBJECT     *Object);
474 
475 void
476 AcpiUtRemoveReference (
477     ACPI_OPERAND_OBJECT     *Object);
478 
479 void
480 AcpiUtDeleteInternalPackageObject (
481     ACPI_OPERAND_OBJECT     *Object);
482 
483 void
484 AcpiUtDeleteInternalSimpleObject (
485     ACPI_OPERAND_OBJECT     *Object);
486 
487 void
488 AcpiUtDeleteInternalObjectList (
489     ACPI_OPERAND_OBJECT     **ObjList);
490 
491 
492 /*
493  * uteval - object evaluation
494  */
495 ACPI_STATUS
496 AcpiUtOsiImplementation (
497     ACPI_WALK_STATE         *WalkState);
498 
499 ACPI_STATUS
500 AcpiUtEvaluateObject (
501     ACPI_NAMESPACE_NODE     *PrefixNode,
502     char                    *Path,
503     UINT32                  ExpectedReturnBtypes,
504     ACPI_OPERAND_OBJECT     **ReturnDesc);
505 
506 ACPI_STATUS
507 AcpiUtEvaluateNumericObject (
508     char                    *ObjectName,
509     ACPI_NAMESPACE_NODE     *DeviceNode,
510     ACPI_INTEGER            *Address);
511 
512 ACPI_STATUS
513 AcpiUtExecute_HID (
514     ACPI_NAMESPACE_NODE     *DeviceNode,
515     ACPI_DEVICE_ID          *Hid);
516 
517 ACPI_STATUS
518 AcpiUtExecute_CID (
519     ACPI_NAMESPACE_NODE     *DeviceNode,
520     ACPI_COMPATIBLE_ID_LIST **ReturnCidList);
521 
522 ACPI_STATUS
523 AcpiUtExecute_STA (
524     ACPI_NAMESPACE_NODE     *DeviceNode,
525     UINT32                  *StatusFlags);
526 
527 ACPI_STATUS
528 AcpiUtExecute_UID (
529     ACPI_NAMESPACE_NODE     *DeviceNode,
530     ACPI_DEVICE_ID          *Uid);
531 
532 ACPI_STATUS
533 AcpiUtExecute_Sxds (
534     ACPI_NAMESPACE_NODE     *DeviceNode,
535     UINT8                   *Highest);
536 
537 
538 /*
539  * utobject - internal object create/delete/cache routines
540  */
541 ACPI_OPERAND_OBJECT  *
542 AcpiUtCreateInternalObjectDbg (
543     char                    *ModuleName,
544     UINT32                  LineNumber,
545     UINT32                  ComponentId,
546     ACPI_OBJECT_TYPE        Type);
547 
548 void *
549 AcpiUtAllocateObjectDescDbg (
550     char                    *ModuleName,
551     UINT32                  LineNumber,
552     UINT32                  ComponentId);
553 
554 #define AcpiUtCreateInternalObject(t)   AcpiUtCreateInternalObjectDbg (_THIS_MODULE,__LINE__,_COMPONENT,t)
555 #define AcpiUtAllocateObjectDesc()      AcpiUtAllocateObjectDescDbg (_THIS_MODULE,__LINE__,_COMPONENT)
556 
557 void
558 AcpiUtDeleteObjectDesc (
559     ACPI_OPERAND_OBJECT     *Object);
560 
561 BOOLEAN
562 AcpiUtValidInternalObject (
563     void                    *Object);
564 
565 ACPI_OPERAND_OBJECT *
566 AcpiUtCreateBufferObject (
567     ACPI_SIZE               BufferSize);
568 
569 ACPI_OPERAND_OBJECT *
570 AcpiUtCreateStringObject (
571     ACPI_SIZE               StringSize);
572 
573 ACPI_STATUS
574 AcpiUtGetObjectSize(
575     ACPI_OPERAND_OBJECT     *Obj,
576     ACPI_SIZE               *ObjLength);
577 
578 
579 /*
580  * utstate - Generic state creation/cache routines
581  */
582 void
583 AcpiUtPushGenericState (
584     ACPI_GENERIC_STATE      **ListHead,
585     ACPI_GENERIC_STATE      *State);
586 
587 ACPI_GENERIC_STATE *
588 AcpiUtPopGenericState (
589     ACPI_GENERIC_STATE      **ListHead);
590 
591 
592 ACPI_GENERIC_STATE *
593 AcpiUtCreateGenericState (
594     void);
595 
596 ACPI_THREAD_STATE *
597 AcpiUtCreateThreadState (
598     void);
599 
600 ACPI_GENERIC_STATE *
601 AcpiUtCreateUpdateState (
602     ACPI_OPERAND_OBJECT     *Object,
603     UINT16                  Action);
604 
605 ACPI_GENERIC_STATE *
606 AcpiUtCreatePkgState (
607     void                    *InternalObject,
608     void                    *ExternalObject,
609     UINT16                  Index);
610 
611 ACPI_STATUS
612 AcpiUtCreateUpdateStateAndPush (
613     ACPI_OPERAND_OBJECT     *Object,
614     UINT16                  Action,
615     ACPI_GENERIC_STATE      **StateList);
616 
617 ACPI_STATUS
618 AcpiUtCreatePkgStateAndPush (
619     void                    *InternalObject,
620     void                    *ExternalObject,
621     UINT16                  Index,
622     ACPI_GENERIC_STATE      **StateList);
623 
624 ACPI_GENERIC_STATE *
625 AcpiUtCreateControlState (
626     void);
627 
628 void
629 AcpiUtDeleteGenericState (
630     ACPI_GENERIC_STATE      *State);
631 
632 #ifdef ACPI_ENABLE_OBJECT_CACHE
633 void
634 AcpiUtDeleteGenericStateCache (
635     void);
636 
637 void
638 AcpiUtDeleteObjectCache (
639     void);
640 #endif
641 
642 
643 /*
644  * utmath
645  */
646 ACPI_STATUS
647 AcpiUtDivide (
648     ACPI_INTEGER            InDividend,
649     ACPI_INTEGER            InDivisor,
650     ACPI_INTEGER            *OutQuotient,
651     ACPI_INTEGER            *OutRemainder);
652 
653 ACPI_STATUS
654 AcpiUtShortDivide (
655     ACPI_INTEGER            InDividend,
656     UINT32                  Divisor,
657     ACPI_INTEGER            *OutQuotient,
658     UINT32                  *OutRemainder);
659 
660 /*
661  * utmisc
662  */
663 ACPI_STATUS
664 AcpiUtWalkPackageTree (
665     ACPI_OPERAND_OBJECT     *SourceObject,
666     void                    *TargetObject,
667     ACPI_PKG_CALLBACK       WalkCallback,
668     void                    *Context);
669 
670 char *
671 AcpiUtStrupr (
672     char                    *SrcString);
673 
674 void
675 AcpiUtPrintString (
676     char                    *String,
677     UINT8                   MaxLength);
678 
679 BOOLEAN
680 AcpiUtValidAcpiName (
681     UINT32                  Name);
682 
683 BOOLEAN
684 AcpiUtValidAcpiCharacter (
685     char                    Character);
686 
687 ACPI_STATUS
688 AcpiUtStrtoul64 (
689     char                    *String,
690     UINT32                  Base,
691     ACPI_INTEGER            *RetInteger);
692 
693 /* Values for Base above (16=Hex, 10=Decimal) */
694 
695 #define ACPI_ANY_BASE        0
696 
697 ACPI_STATUS
698 AcpiUtMutexInitialize (
699     void);
700 
701 void
702 AcpiUtMutexTerminate (
703     void);
704 
705 ACPI_STATUS
706 AcpiUtAcquireMutex (
707     ACPI_MUTEX_HANDLE       MutexId);
708 
709 ACPI_STATUS
710 AcpiUtReleaseMutex (
711     ACPI_MUTEX_HANDLE       MutexId);
712 
713 UINT8 *
714 AcpiUtGetResourceEndTag (
715     ACPI_OPERAND_OBJECT     *ObjDesc);
716 
717 UINT8
718 AcpiUtGenerateChecksum (
719     UINT8                   *Buffer,
720     UINT32                  Length);
721 
722 UINT32
723 AcpiUtDwordByteSwap (
724     UINT32                  Value);
725 
726 void
727 AcpiUtSetIntegerWidth (
728     UINT8                   Revision);
729 
730 #ifdef ACPI_DEBUG_OUTPUT
731 void
732 AcpiUtDisplayInitPathname (
733     UINT8                   Type,
734     ACPI_NAMESPACE_NODE     *ObjHandle,
735     char                    *Path);
736 
737 #endif
738 
739 
740 /*
741  * utalloc - memory allocation and object caching
742  */
743 void *
744 AcpiUtAcquireFromCache (
745     UINT32                  ListId);
746 
747 void
748 AcpiUtReleaseToCache (
749     UINT32                  ListId,
750     void                    *Object);
751 
752 #ifdef ACPI_ENABLE_OBJECT_CACHE
753 void
754 AcpiUtDeleteGenericCache (
755     UINT32                  ListId);
756 #endif
757 
758 ACPI_STATUS
759 AcpiUtValidateBuffer (
760     ACPI_BUFFER             *Buffer);
761 
762 ACPI_STATUS
763 AcpiUtInitializeBuffer (
764     ACPI_BUFFER             *Buffer,
765     ACPI_SIZE               RequiredLength);
766 
767 void *
768 AcpiUtAllocate (
769     ACPI_SIZE               Size,
770     UINT32                  Component,
771     char                    *Module,
772     UINT32                  Line);
773 
774 void *
775 AcpiUtCallocate (
776     ACPI_SIZE               Size,
777     UINT32                  Component,
778     char                    *Module,
779     UINT32                  Line);
780 
781 #ifdef ACPI_DBG_TRACK_ALLOCATIONS
782 void *
783 AcpiUtAllocateAndTrack (
784     ACPI_SIZE               Size,
785     UINT32                  Component,
786     char                    *Module,
787     UINT32                  Line);
788 
789 void *
790 AcpiUtCallocateAndTrack (
791     ACPI_SIZE               Size,
792     UINT32                  Component,
793     char                    *Module,
794     UINT32                  Line);
795 
796 void
797 AcpiUtFreeAndTrack (
798     void                    *Address,
799     UINT32                  Component,
800     char                    *Module,
801     UINT32                  Line);
802 
803 void
804 AcpiUtDumpAllocationInfo (
805     void);
806 
807 void
808 AcpiUtDumpAllocations (
809     UINT32                  Component,
810     char                    *Module);
811 #endif
812 
813 #endif /* _ACUTILS_H */
814