acutils.h revision 107325
1/******************************************************************************
2 *
3 * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
4 *       $Revision: 148 $
5 *
6 *****************************************************************************/
7
8/******************************************************************************
9 *
10 * 1. Copyright Notice
11 *
12 * Some or all of this work - Copyright (c) 1999 - 2002, 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
121typedef
122ACPI_STATUS (*ACPI_PKG_CALLBACK) (
123    UINT8                   ObjectType,
124    ACPI_OPERAND_OBJECT     *SourceObject,
125    ACPI_GENERIC_STATE      *State,
126    void                    *Context);
127
128
129ACPI_STATUS
130AcpiUtWalkPackageTree (
131    ACPI_OPERAND_OBJECT     *SourceObject,
132    void                    *TargetObject,
133    ACPI_PKG_CALLBACK       WalkCallback,
134    void                    *Context);
135
136
137typedef struct acpi_pkg_info
138{
139    UINT8                   *FreeSpace;
140    ACPI_SIZE               Length;
141    UINT32                  ObjectSpace;
142    UINT32                  NumPackages;
143} ACPI_PKG_INFO;
144
145#define REF_INCREMENT       (UINT16) 0
146#define REF_DECREMENT       (UINT16) 1
147#define REF_FORCE_DELETE    (UINT16) 2
148
149/* AcpiUtDumpBuffer */
150
151#define DB_BYTE_DISPLAY     1
152#define DB_WORD_DISPLAY     2
153#define DB_DWORD_DISPLAY    4
154#define DB_QWORD_DISPLAY    8
155
156
157/* Global initialization interfaces */
158
159void
160AcpiUtInitGlobals (
161    void);
162
163void
164AcpiUtTerminate (
165    void);
166
167
168/*
169 * UtInit - miscellaneous initialization and shutdown
170 */
171
172ACPI_STATUS
173AcpiUtHardwareInitialize (
174    void);
175
176void
177AcpiUtSubsystemShutdown (
178    void);
179
180ACPI_STATUS
181AcpiUtValidateFadt (
182    void);
183
184/*
185 * UtGlobal - Global data structures and procedures
186 */
187
188#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
189
190NATIVE_CHAR *
191AcpiUtGetMutexName (
192    UINT32                  MutexId);
193
194#endif
195
196NATIVE_CHAR *
197AcpiUtGetTypeName (
198    ACPI_OBJECT_TYPE        Type);
199
200NATIVE_CHAR *
201AcpiUtGetObjectTypeName (
202    ACPI_OPERAND_OBJECT     *ObjDesc);
203
204NATIVE_CHAR *
205AcpiUtGetRegionName (
206    UINT8                   SpaceId);
207
208NATIVE_CHAR *
209AcpiUtGetEventName (
210    UINT32                  EventId);
211
212char
213AcpiUtHexToAsciiChar (
214    ACPI_INTEGER            Integer,
215    UINT32                  Position);
216
217BOOLEAN
218AcpiUtValidObjectType (
219    ACPI_OBJECT_TYPE        Type);
220
221ACPI_OWNER_ID
222AcpiUtAllocateOwnerId (
223    UINT32                  IdType);
224
225
226/*
227 * UtClib - Local implementations of C library functions
228 */
229
230#ifndef ACPI_USE_SYSTEM_CLIBRARY
231
232ACPI_SIZE
233AcpiUtStrlen (
234    const NATIVE_CHAR       *String);
235
236NATIVE_CHAR *
237AcpiUtStrcpy (
238    NATIVE_CHAR             *DstString,
239    const NATIVE_CHAR       *SrcString);
240
241NATIVE_CHAR *
242AcpiUtStrncpy (
243    NATIVE_CHAR             *DstString,
244    const NATIVE_CHAR       *SrcString,
245    ACPI_SIZE               Count);
246
247int
248AcpiUtStrncmp (
249    const NATIVE_CHAR       *String1,
250    const NATIVE_CHAR       *String2,
251    ACPI_SIZE               Count);
252
253int
254AcpiUtStrcmp (
255    const NATIVE_CHAR       *String1,
256    const NATIVE_CHAR       *String2);
257
258NATIVE_CHAR *
259AcpiUtStrcat (
260    NATIVE_CHAR             *DstString,
261    const NATIVE_CHAR       *SrcString);
262
263NATIVE_CHAR *
264AcpiUtStrncat (
265    NATIVE_CHAR             *DstString,
266    const NATIVE_CHAR       *SrcString,
267    ACPI_SIZE               Count);
268
269UINT32
270AcpiUtStrtoul (
271    const NATIVE_CHAR       *String,
272    NATIVE_CHAR             **Terminator,
273    UINT32                  Base);
274
275NATIVE_CHAR *
276AcpiUtStrstr (
277    NATIVE_CHAR             *String1,
278    NATIVE_CHAR             *String2);
279
280void *
281AcpiUtMemcpy (
282    void                    *Dest,
283    const void              *Src,
284    ACPI_SIZE               Count);
285
286void *
287AcpiUtMemset (
288    void                    *Dest,
289    NATIVE_UINT             Value,
290    ACPI_SIZE               Count);
291
292int
293AcpiUtToUpper (
294    int                     c);
295
296int
297AcpiUtToLower (
298    int                     c);
299
300extern const UINT8 _acpi_ctype[];
301
302#define _ACPI_XA     0x00    /* extra alphabetic - not supported */
303#define _ACPI_XS     0x40    /* extra space */
304#define _ACPI_BB     0x00    /* BEL, BS, etc. - not supported */
305#define _ACPI_CN     0x20    /* CR, FF, HT, NL, VT */
306#define _ACPI_DI     0x04    /* '0'-'9' */
307#define _ACPI_LO     0x02    /* 'a'-'z' */
308#define _ACPI_PU     0x10    /* punctuation */
309#define _ACPI_SP     0x08    /* space */
310#define _ACPI_UP     0x01    /* 'A'-'Z' */
311#define _ACPI_XD     0x80    /* '0'-'9', 'A'-'F', 'a'-'f' */
312
313#define ACPI_IS_DIGIT(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI))
314#define ACPI_IS_SPACE(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP))
315#define ACPI_IS_XDIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_XD))
316#define ACPI_IS_UPPER(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_UP))
317#define ACPI_IS_LOWER(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO))
318#define ACPI_IS_PRINT(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_SP | _ACPI_PU))
319#define ACPI_IS_ALPHA(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP))
320#define ACPI_IS_ASCII(c)  ((c) < 0x80)
321
322#endif /* ACPI_USE_SYSTEM_CLIBRARY */
323
324/*
325 * UtCopy - Object construction and conversion interfaces
326 */
327
328ACPI_STATUS
329AcpiUtBuildSimpleObject(
330    ACPI_OPERAND_OBJECT     *Obj,
331    ACPI_OBJECT             *UserObj,
332    UINT8                   *DataSpace,
333    UINT32                  *BufferSpaceUsed);
334
335ACPI_STATUS
336AcpiUtBuildPackageObject (
337    ACPI_OPERAND_OBJECT     *Obj,
338    UINT8                   *Buffer,
339    UINT32                  *SpaceUsed);
340
341ACPI_STATUS
342AcpiUtCopyIelementToEelement (
343    UINT8                   ObjectType,
344    ACPI_OPERAND_OBJECT     *SourceObject,
345    ACPI_GENERIC_STATE      *State,
346    void                    *Context);
347
348ACPI_STATUS
349AcpiUtCopyIelementToIelement (
350    UINT8                   ObjectType,
351    ACPI_OPERAND_OBJECT     *SourceObject,
352    ACPI_GENERIC_STATE      *State,
353    void                    *Context);
354
355ACPI_STATUS
356AcpiUtCopyIobjectToEobject (
357    ACPI_OPERAND_OBJECT     *Obj,
358    ACPI_BUFFER             *RetBuffer);
359
360ACPI_STATUS
361AcpiUtCopyEsimpleToIsimple(
362    ACPI_OBJECT             *UserObj,
363    ACPI_OPERAND_OBJECT     **ReturnObj);
364
365ACPI_STATUS
366AcpiUtCopyEobjectToIobject (
367    ACPI_OBJECT             *Obj,
368    ACPI_OPERAND_OBJECT     **InternalObj);
369
370ACPI_STATUS
371AcpiUtCopyISimpleToIsimple (
372    ACPI_OPERAND_OBJECT     *SourceObj,
373    ACPI_OPERAND_OBJECT     *DestObj);
374
375ACPI_STATUS
376AcpiUtCopyIpackageToIpackage (
377    ACPI_OPERAND_OBJECT     *SourceObj,
378    ACPI_OPERAND_OBJECT     *DestObj,
379    ACPI_WALK_STATE         *WalkState);
380
381ACPI_STATUS
382AcpiUtCopySimpleObject (
383    ACPI_OPERAND_OBJECT     *SourceDesc,
384    ACPI_OPERAND_OBJECT     *DestDesc);
385
386ACPI_STATUS
387AcpiUtCopyIobjectToIobject (
388    ACPI_OPERAND_OBJECT     *SourceDesc,
389    ACPI_OPERAND_OBJECT     **DestDesc,
390    ACPI_WALK_STATE         *WalkState);
391
392
393/*
394 * UtCreate - Object creation
395 */
396
397ACPI_STATUS
398AcpiUtUpdateObjectReference (
399    ACPI_OPERAND_OBJECT     *Object,
400    UINT16                  Action);
401
402
403/*
404 * UtDebug - Debug interfaces
405 */
406
407void
408AcpiUtInitStackPtrTrace (
409    void);
410
411void
412AcpiUtTrackStackPtr (
413    void);
414
415void
416AcpiUtTrace (
417    UINT32                  LineNumber,
418    ACPI_DEBUG_PRINT_INFO   *DbgInfo);
419
420void
421AcpiUtTracePtr (
422    UINT32                  LineNumber,
423    ACPI_DEBUG_PRINT_INFO   *DbgInfo,
424    void                    *Pointer);
425
426void
427AcpiUtTraceU32 (
428    UINT32                  LineNumber,
429    ACPI_DEBUG_PRINT_INFO   *DbgInfo,
430    UINT32                  Integer);
431
432void
433AcpiUtTraceStr (
434    UINT32                  LineNumber,
435    ACPI_DEBUG_PRINT_INFO   *DbgInfo,
436    NATIVE_CHAR             *String);
437
438void
439AcpiUtExit (
440    UINT32                  LineNumber,
441    ACPI_DEBUG_PRINT_INFO   *DbgInfo);
442
443void
444AcpiUtStatusExit (
445    UINT32                  LineNumber,
446    ACPI_DEBUG_PRINT_INFO   *DbgInfo,
447    ACPI_STATUS             Status);
448
449void
450AcpiUtValueExit (
451    UINT32                  LineNumber,
452    ACPI_DEBUG_PRINT_INFO   *DbgInfo,
453    ACPI_INTEGER            Value);
454
455void
456AcpiUtPtrExit (
457    UINT32                  LineNumber,
458    ACPI_DEBUG_PRINT_INFO   *DbgInfo,
459    UINT8                   *Ptr);
460
461void
462AcpiUtReportInfo (
463    NATIVE_CHAR             *ModuleName,
464    UINT32                  LineNumber,
465    UINT32                  ComponentId);
466
467void
468AcpiUtReportError (
469    NATIVE_CHAR             *ModuleName,
470    UINT32                  LineNumber,
471    UINT32                  ComponentId);
472
473void
474AcpiUtReportWarning (
475    NATIVE_CHAR             *ModuleName,
476    UINT32                  LineNumber,
477    UINT32                  ComponentId);
478
479void
480AcpiUtDumpBuffer (
481    UINT8                   *Buffer,
482    UINT32                  Count,
483    UINT32                  Display,
484    UINT32                  componentId);
485
486void ACPI_INTERNAL_VAR_XFACE
487AcpiUtDebugPrint (
488    UINT32                  RequestedDebugLevel,
489    UINT32                  LineNumber,
490    ACPI_DEBUG_PRINT_INFO   *DbgInfo,
491    char                    *Format,
492    ...) ACPI_PRINTF_LIKE_FUNC;
493
494void ACPI_INTERNAL_VAR_XFACE
495AcpiUtDebugPrintRaw (
496    UINT32                  RequestedDebugLevel,
497    UINT32                  LineNumber,
498    ACPI_DEBUG_PRINT_INFO   *DbgInfo,
499    char                    *Format,
500    ...) ACPI_PRINTF_LIKE_FUNC;
501
502
503/*
504 * UtDelete - Object deletion
505 */
506
507void
508AcpiUtDeleteInternalObj (
509    ACPI_OPERAND_OBJECT     *Object);
510
511void
512AcpiUtDeleteInternalPackageObject (
513    ACPI_OPERAND_OBJECT     *Object);
514
515void
516AcpiUtDeleteInternalSimpleObject (
517    ACPI_OPERAND_OBJECT     *Object);
518
519void
520AcpiUtDeleteInternalObjectList (
521    ACPI_OPERAND_OBJECT     **ObjList);
522
523
524/*
525 * UtEval - object evaluation
526 */
527
528/* Method name strings */
529
530#define METHOD_NAME__HID        "_HID"
531#define METHOD_NAME__CID        "_CID"
532#define METHOD_NAME__UID        "_UID"
533#define METHOD_NAME__ADR        "_ADR"
534#define METHOD_NAME__STA        "_STA"
535#define METHOD_NAME__REG        "_REG"
536#define METHOD_NAME__SEG        "_SEG"
537#define METHOD_NAME__BBN        "_BBN"
538#define METHOD_NAME__PRT        "_PRT"
539
540
541ACPI_STATUS
542AcpiUtEvaluateNumericObject (
543    NATIVE_CHAR             *ObjectName,
544    ACPI_NAMESPACE_NODE     *DeviceNode,
545    ACPI_INTEGER            *Address);
546
547ACPI_STATUS
548AcpiUtExecute_HID (
549    ACPI_NAMESPACE_NODE     *DeviceNode,
550    ACPI_DEVICE_ID          *Hid);
551
552ACPI_STATUS
553AcpiUtExecute_CID (
554    ACPI_NAMESPACE_NODE     *DeviceNode,
555    ACPI_DEVICE_ID          *Cid);
556
557ACPI_STATUS
558AcpiUtExecute_STA (
559    ACPI_NAMESPACE_NODE     *DeviceNode,
560    UINT32                  *StatusFlags);
561
562ACPI_STATUS
563AcpiUtExecute_UID (
564    ACPI_NAMESPACE_NODE     *DeviceNode,
565    ACPI_DEVICE_ID          *Uid);
566
567
568/*
569 * UtMutex - mutual exclusion interfaces
570 */
571
572ACPI_STATUS
573AcpiUtMutexInitialize (
574    void);
575
576void
577AcpiUtMutexTerminate (
578    void);
579
580ACPI_STATUS
581AcpiUtCreateMutex (
582    ACPI_MUTEX_HANDLE       MutexId);
583
584ACPI_STATUS
585AcpiUtDeleteMutex (
586    ACPI_MUTEX_HANDLE       MutexId);
587
588ACPI_STATUS
589AcpiUtAcquireMutex (
590    ACPI_MUTEX_HANDLE       MutexId);
591
592ACPI_STATUS
593AcpiUtReleaseMutex (
594    ACPI_MUTEX_HANDLE       MutexId);
595
596
597/*
598 * UtObject - internal object create/delete/cache routines
599 */
600
601ACPI_OPERAND_OBJECT  *
602AcpiUtCreateInternalObjectDbg (
603    NATIVE_CHAR             *ModuleName,
604    UINT32                  LineNumber,
605    UINT32                  ComponentId,
606    ACPI_OBJECT_TYPE        Type);
607
608void *
609AcpiUtAllocateObjectDescDbg (
610    NATIVE_CHAR             *ModuleName,
611    UINT32                  LineNumber,
612    UINT32                  ComponentId);
613
614#define AcpiUtCreateInternalObject(t)   AcpiUtCreateInternalObjectDbg (_THIS_MODULE,__LINE__,_COMPONENT,t)
615#define AcpiUtAllocateObjectDesc()      AcpiUtAllocateObjectDescDbg (_THIS_MODULE,__LINE__,_COMPONENT)
616
617void
618AcpiUtDeleteObjectDesc (
619    ACPI_OPERAND_OBJECT     *Object);
620
621BOOLEAN
622AcpiUtValidInternalObject (
623    void                    *Object);
624
625ACPI_OPERAND_OBJECT *
626AcpiUtCreateBufferObject (
627    ACPI_SIZE               BufferSize);
628
629
630/*
631 * UtRefCnt - Object reference count management
632 */
633
634void
635AcpiUtAddReference (
636    ACPI_OPERAND_OBJECT     *Object);
637
638void
639AcpiUtRemoveReference (
640    ACPI_OPERAND_OBJECT     *Object);
641
642/*
643 * UtSize - Object size routines
644 */
645
646ACPI_STATUS
647AcpiUtGetSimpleObjectSize (
648    ACPI_OPERAND_OBJECT     *Obj,
649    ACPI_SIZE               *ObjLength);
650
651ACPI_STATUS
652AcpiUtGetPackageObjectSize (
653    ACPI_OPERAND_OBJECT     *Obj,
654    ACPI_SIZE               *ObjLength);
655
656ACPI_STATUS
657AcpiUtGetObjectSize(
658    ACPI_OPERAND_OBJECT     *Obj,
659    ACPI_SIZE               *ObjLength);
660
661ACPI_STATUS
662AcpiUtGetElementLength (
663    UINT8                   ObjectType,
664    ACPI_OPERAND_OBJECT     *SourceObject,
665    ACPI_GENERIC_STATE      *State,
666    void                    *Context);
667
668
669/*
670 * UtState - Generic state creation/cache routines
671 */
672
673void
674AcpiUtPushGenericState (
675    ACPI_GENERIC_STATE      **ListHead,
676    ACPI_GENERIC_STATE      *State);
677
678ACPI_GENERIC_STATE *
679AcpiUtPopGenericState (
680    ACPI_GENERIC_STATE      **ListHead);
681
682
683ACPI_GENERIC_STATE *
684AcpiUtCreateGenericState (
685    void);
686
687ACPI_THREAD_STATE *
688AcpiUtCreateThreadState (
689    void);
690
691ACPI_GENERIC_STATE *
692AcpiUtCreateUpdateState (
693    ACPI_OPERAND_OBJECT     *Object,
694    UINT16                  Action);
695
696ACPI_GENERIC_STATE *
697AcpiUtCreatePkgState (
698    void                    *InternalObject,
699    void                    *ExternalObject,
700    UINT16                  Index);
701
702ACPI_STATUS
703AcpiUtCreateUpdateStateAndPush (
704    ACPI_OPERAND_OBJECT     *Object,
705    UINT16                  Action,
706    ACPI_GENERIC_STATE      **StateList);
707
708ACPI_STATUS
709AcpiUtCreatePkgStateAndPush (
710    void                    *InternalObject,
711    void                    *ExternalObject,
712    UINT16                  Index,
713    ACPI_GENERIC_STATE      **StateList);
714
715ACPI_GENERIC_STATE *
716AcpiUtCreateControlState (
717    void);
718
719void
720AcpiUtDeleteGenericState (
721    ACPI_GENERIC_STATE      *State);
722
723void
724AcpiUtDeleteGenericStateCache (
725    void);
726
727void
728AcpiUtDeleteObjectCache (
729    void);
730
731/*
732 * utmisc
733 */
734
735void
736AcpiUtPrintString (
737    char                    *String,
738    UINT8                   MaxLength);
739
740ACPI_STATUS
741AcpiUtDivide (
742    ACPI_INTEGER            *InDividend,
743    ACPI_INTEGER            *InDivisor,
744    ACPI_INTEGER            *OutQuotient,
745    ACPI_INTEGER            *OutRemainder);
746
747ACPI_STATUS
748AcpiUtShortDivide (
749    ACPI_INTEGER            *InDividend,
750    UINT32                  Divisor,
751    ACPI_INTEGER            *OutQuotient,
752    UINT32                  *OutRemainder);
753
754BOOLEAN
755AcpiUtValidAcpiName (
756    UINT32                  Name);
757
758BOOLEAN
759AcpiUtValidAcpiCharacter (
760    NATIVE_CHAR             Character);
761
762ACPI_STATUS
763AcpiUtStrtoul64 (
764    NATIVE_CHAR             *String,
765    UINT32                  Base,
766    ACPI_INTEGER            *RetInteger);
767
768NATIVE_CHAR *
769AcpiUtStrupr (
770    NATIVE_CHAR             *SrcString);
771
772UINT8 *
773AcpiUtGetResourceEndTag (
774    ACPI_OPERAND_OBJECT     *ObjDesc);
775
776UINT8
777AcpiUtGenerateChecksum (
778    UINT8                   *Buffer,
779    UINT32                  Length);
780
781UINT32
782AcpiUtDwordByteSwap (
783    UINT32                  Value);
784
785void
786AcpiUtSetIntegerWidth (
787    UINT8                   Revision);
788
789#ifdef ACPI_DEBUG_OUTPUT
790void
791AcpiUtDisplayInitPathname (
792    ACPI_HANDLE             ObjHandle,
793    char                    *Path);
794
795#endif
796
797
798/*
799 * Utalloc - memory allocation and object caching
800 */
801
802void *
803AcpiUtAcquireFromCache (
804    UINT32                  ListId);
805
806void
807AcpiUtReleaseToCache (
808    UINT32                  ListId,
809    void                    *Object);
810
811void
812AcpiUtDeleteGenericCache (
813    UINT32                  ListId);
814
815ACPI_STATUS
816AcpiUtValidateBuffer (
817    ACPI_BUFFER             *Buffer);
818
819ACPI_STATUS
820AcpiUtInitializeBuffer (
821    ACPI_BUFFER             *Buffer,
822    ACPI_SIZE               RequiredLength);
823
824
825/* Memory allocation functions */
826
827void *
828AcpiUtAllocate (
829    ACPI_SIZE               Size,
830    UINT32                  Component,
831    NATIVE_CHAR             *Module,
832    UINT32                  Line);
833
834void *
835AcpiUtCallocate (
836    ACPI_SIZE               Size,
837    UINT32                  Component,
838    NATIVE_CHAR             *Module,
839    UINT32                  Line);
840
841
842#ifdef ACPI_DBG_TRACK_ALLOCATIONS
843
844void *
845AcpiUtAllocateAndTrack (
846    ACPI_SIZE               Size,
847    UINT32                  Component,
848    NATIVE_CHAR             *Module,
849    UINT32                  Line);
850
851void *
852AcpiUtCallocateAndTrack (
853    ACPI_SIZE               Size,
854    UINT32                  Component,
855    NATIVE_CHAR             *Module,
856    UINT32                  Line);
857
858void
859AcpiUtFreeAndTrack (
860    void                    *Address,
861    UINT32                  Component,
862    NATIVE_CHAR             *Module,
863    UINT32                  Line);
864
865ACPI_DEBUG_MEM_BLOCK *
866AcpiUtFindAllocation (
867    UINT32                  ListId,
868    void                    *Allocation);
869
870ACPI_STATUS
871AcpiUtTrackAllocation (
872    UINT32                  ListId,
873    ACPI_DEBUG_MEM_BLOCK    *Address,
874    ACPI_SIZE               Size,
875    UINT8                   AllocType,
876    UINT32                  Component,
877    NATIVE_CHAR             *Module,
878    UINT32                  Line);
879
880ACPI_STATUS
881AcpiUtRemoveAllocation (
882    UINT32                  ListId,
883    ACPI_DEBUG_MEM_BLOCK    *Address,
884    UINT32                  Component,
885    NATIVE_CHAR             *Module,
886    UINT32                  Line);
887
888void
889AcpiUtDumpAllocationInfo (
890    void);
891
892void
893AcpiUtDumpAllocations (
894    UINT32                  Component,
895    NATIVE_CHAR             *Module);
896#endif
897
898
899#endif /* _ACUTILS_H */
900