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