sd: remove 'ssd' driver support
[unleashed/tickless.git] / arch / x86 / include / sys / acpi / acutils.h
blob7e53961e5b55005a6f0a170eec7090728df09114
1 /******************************************************************************
3 * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
5 *****************************************************************************/
7 /*
8 * Copyright (C) 2000 - 2016, Intel Corp.
9 * All rights reserved.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
44 #ifndef _ACUTILS_H
45 #define _ACUTILS_H
48 extern const UINT8 AcpiGbl_ResourceAmlSizes[];
49 extern const UINT8 AcpiGbl_ResourceAmlSerialBusSizes[];
51 /* Strings used by the disassembler and debugger resource dump routines */
53 #if defined(ACPI_DEBUG_OUTPUT) || defined (ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER)
55 extern const char *AcpiGbl_BmDecode[];
56 extern const char *AcpiGbl_ConfigDecode[];
57 extern const char *AcpiGbl_ConsumeDecode[];
58 extern const char *AcpiGbl_DecDecode[];
59 extern const char *AcpiGbl_HeDecode[];
60 extern const char *AcpiGbl_IoDecode[];
61 extern const char *AcpiGbl_LlDecode[];
62 extern const char *AcpiGbl_MaxDecode[];
63 extern const char *AcpiGbl_MemDecode[];
64 extern const char *AcpiGbl_MinDecode[];
65 extern const char *AcpiGbl_MtpDecode[];
66 extern const char *AcpiGbl_RngDecode[];
67 extern const char *AcpiGbl_RwDecode[];
68 extern const char *AcpiGbl_ShrDecode[];
69 extern const char *AcpiGbl_SizDecode[];
70 extern const char *AcpiGbl_TrsDecode[];
71 extern const char *AcpiGbl_TtpDecode[];
72 extern const char *AcpiGbl_TypDecode[];
73 extern const char *AcpiGbl_PpcDecode[];
74 extern const char *AcpiGbl_IorDecode[];
75 extern const char *AcpiGbl_DtsDecode[];
76 extern const char *AcpiGbl_CtDecode[];
77 extern const char *AcpiGbl_SbtDecode[];
78 extern const char *AcpiGbl_AmDecode[];
79 extern const char *AcpiGbl_SmDecode[];
80 extern const char *AcpiGbl_WmDecode[];
81 extern const char *AcpiGbl_CphDecode[];
82 extern const char *AcpiGbl_CpoDecode[];
83 extern const char *AcpiGbl_DpDecode[];
84 extern const char *AcpiGbl_EdDecode[];
85 extern const char *AcpiGbl_BpbDecode[];
86 extern const char *AcpiGbl_SbDecode[];
87 extern const char *AcpiGbl_FcDecode[];
88 extern const char *AcpiGbl_PtDecode[];
89 #endif
92 * For the iASL compiler case, the output is redirected to stderr so that
93 * any of the various ACPI errors and warnings do not appear in the output
94 * files, for either the compiler or disassembler portions of the tool.
96 #ifdef ACPI_ASL_COMPILER
98 #include <stdio.h>
100 #define ACPI_MSG_REDIRECT_BEGIN \
101 FILE *OutputFile = AcpiGbl_OutputFile; \
102 AcpiOsRedirectOutput (stderr);
104 #define ACPI_MSG_REDIRECT_END \
105 AcpiOsRedirectOutput (OutputFile);
107 #else
109 * non-iASL case - no redirection, nothing to do
111 #define ACPI_MSG_REDIRECT_BEGIN
112 #define ACPI_MSG_REDIRECT_END
113 #endif
116 * Common error message prefixes
118 #ifndef ACPI_MSG_ERROR
119 #define ACPI_MSG_ERROR "ACPI Error: "
120 #endif
121 #ifndef ACPI_MSG_EXCEPTION
122 #define ACPI_MSG_EXCEPTION "ACPI Exception: "
123 #endif
124 #ifndef ACPI_MSG_WARNING
125 #define ACPI_MSG_WARNING "ACPI Warning: "
126 #endif
127 #ifndef ACPI_MSG_INFO
128 #define ACPI_MSG_INFO "ACPI: "
129 #endif
131 #ifndef ACPI_MSG_BIOS_ERROR
132 #define ACPI_MSG_BIOS_ERROR "ACPI BIOS Error (bug): "
133 #endif
134 #ifndef ACPI_MSG_BIOS_WARNING
135 #define ACPI_MSG_BIOS_WARNING "ACPI BIOS Warning (bug): "
136 #endif
139 * Common message suffix
141 #define ACPI_MSG_SUFFIX \
142 AcpiOsPrintf (" (%8.8X/%s-%u)\n", ACPI_CA_VERSION, ModuleName, LineNumber)
145 /* Types for Resource descriptor entries */
147 #define ACPI_INVALID_RESOURCE 0
148 #define ACPI_FIXED_LENGTH 1
149 #define ACPI_VARIABLE_LENGTH 2
150 #define ACPI_SMALL_VARIABLE_LENGTH 3
152 typedef
153 ACPI_STATUS (*ACPI_WALK_AML_CALLBACK) (
154 UINT8 *Aml,
155 UINT32 Length,
156 UINT32 Offset,
157 UINT8 ResourceIndex,
158 void **Context);
160 typedef
161 ACPI_STATUS (*ACPI_PKG_CALLBACK) (
162 UINT8 ObjectType,
163 ACPI_OPERAND_OBJECT *SourceObject,
164 ACPI_GENERIC_STATE *State,
165 void *Context);
167 typedef struct acpi_pkg_info
169 UINT8 *FreeSpace;
170 ACPI_SIZE Length;
171 UINT32 ObjectSpace;
172 UINT32 NumPackages;
174 } ACPI_PKG_INFO;
176 /* Object reference counts */
178 #define REF_INCREMENT (UINT16) 0
179 #define REF_DECREMENT (UINT16) 1
181 /* AcpiUtDumpBuffer */
183 #define DB_BYTE_DISPLAY 1
184 #define DB_WORD_DISPLAY 2
185 #define DB_DWORD_DISPLAY 4
186 #define DB_QWORD_DISPLAY 8
190 * utascii - ASCII utilities
192 BOOLEAN
193 AcpiUtValidNameseg (
194 char *Signature);
196 BOOLEAN
197 AcpiUtValidNameChar (
198 char Character,
199 UINT32 Position);
201 void
202 AcpiUtCheckAndRepairAscii (
203 UINT8 *Name,
204 char *RepairedName,
205 UINT32 Count);
209 * utnonansi - Non-ANSI C library functions
211 void
212 AcpiUtStrupr (
213 char *SrcString);
215 void
216 AcpiUtStrlwr (
217 char *SrcString);
220 AcpiUtStricmp (
221 char *String1,
222 char *String2);
224 ACPI_STATUS
225 AcpiUtStrtoul64 (
226 char *String,
227 UINT32 Base,
228 UINT32 MaxIntegerByteWidth,
229 UINT64 *RetInteger);
231 /* Values for MaxIntegerByteWidth above */
233 #define ACPI_MAX32_BYTE_WIDTH 4
234 #define ACPI_MAX64_BYTE_WIDTH 8
238 * utglobal - Global data structures and procedures
240 ACPI_STATUS
241 AcpiUtInitGlobals (
242 void);
244 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
246 const char *
247 AcpiUtGetMutexName (
248 UINT32 MutexId);
250 const char *
251 AcpiUtGetNotifyName (
252 UINT32 NotifyValue,
253 ACPI_OBJECT_TYPE Type);
254 #endif
256 const char *
257 AcpiUtGetTypeName (
258 ACPI_OBJECT_TYPE Type);
260 const char *
261 AcpiUtGetNodeName (
262 void *Object);
264 const char *
265 AcpiUtGetDescriptorName (
266 void *Object);
268 const char *
269 AcpiUtGetReferenceName (
270 ACPI_OPERAND_OBJECT *Object);
272 const char *
273 AcpiUtGetObjectTypeName (
274 ACPI_OPERAND_OBJECT *ObjDesc);
276 const char *
277 AcpiUtGetRegionName (
278 UINT8 SpaceId);
280 const char *
281 AcpiUtGetEventName (
282 UINT32 EventId);
284 char
285 AcpiUtHexToAsciiChar (
286 UINT64 Integer,
287 UINT32 Position);
289 UINT8
290 AcpiUtAsciiCharToHex (
291 int HexChar);
293 BOOLEAN
294 AcpiUtValidObjectType (
295 ACPI_OBJECT_TYPE Type);
299 * utinit - miscellaneous initialization and shutdown
301 ACPI_STATUS
302 AcpiUtHardwareInitialize (
303 void);
305 void
306 AcpiUtSubsystemShutdown (
307 void);
311 * utcopy - Object construction and conversion interfaces
313 ACPI_STATUS
314 AcpiUtBuildSimpleObject(
315 ACPI_OPERAND_OBJECT *Obj,
316 ACPI_OBJECT *UserObj,
317 UINT8 *DataSpace,
318 UINT32 *BufferSpaceUsed);
320 ACPI_STATUS
321 AcpiUtBuildPackageObject (
322 ACPI_OPERAND_OBJECT *Obj,
323 UINT8 *Buffer,
324 UINT32 *SpaceUsed);
326 ACPI_STATUS
327 AcpiUtCopyIobjectToEobject (
328 ACPI_OPERAND_OBJECT *Obj,
329 ACPI_BUFFER *RetBuffer);
331 ACPI_STATUS
332 AcpiUtCopyEobjectToIobject (
333 ACPI_OBJECT *Obj,
334 ACPI_OPERAND_OBJECT **InternalObj);
336 ACPI_STATUS
337 AcpiUtCopyISimpleToIsimple (
338 ACPI_OPERAND_OBJECT *SourceObj,
339 ACPI_OPERAND_OBJECT *DestObj);
341 ACPI_STATUS
342 AcpiUtCopyIobjectToIobject (
343 ACPI_OPERAND_OBJECT *SourceDesc,
344 ACPI_OPERAND_OBJECT **DestDesc,
345 ACPI_WALK_STATE *WalkState);
349 * utcreate - Object creation
351 ACPI_STATUS
352 AcpiUtUpdateObjectReference (
353 ACPI_OPERAND_OBJECT *Object,
354 UINT16 Action);
358 * utdebug - Debug interfaces
360 void
361 AcpiUtInitStackPtrTrace (
362 void);
364 void
365 AcpiUtTrackStackPtr (
366 void);
368 void
369 AcpiUtTrace (
370 UINT32 LineNumber,
371 const char *FunctionName,
372 const char *ModuleName,
373 UINT32 ComponentId);
375 void
376 AcpiUtTracePtr (
377 UINT32 LineNumber,
378 const char *FunctionName,
379 const char *ModuleName,
380 UINT32 ComponentId,
381 const void *Pointer);
383 void
384 AcpiUtTraceU32 (
385 UINT32 LineNumber,
386 const char *FunctionName,
387 const char *ModuleName,
388 UINT32 ComponentId,
389 UINT32 Integer);
391 void
392 AcpiUtTraceStr (
393 UINT32 LineNumber,
394 const char *FunctionName,
395 const char *ModuleName,
396 UINT32 ComponentId,
397 const char *String);
399 void
400 AcpiUtExit (
401 UINT32 LineNumber,
402 const char *FunctionName,
403 const char *ModuleName,
404 UINT32 ComponentId);
406 void
407 AcpiUtStatusExit (
408 UINT32 LineNumber,
409 const char *FunctionName,
410 const char *ModuleName,
411 UINT32 ComponentId,
412 ACPI_STATUS Status);
414 void
415 AcpiUtValueExit (
416 UINT32 LineNumber,
417 const char *FunctionName,
418 const char *ModuleName,
419 UINT32 ComponentId,
420 UINT64 Value);
422 void
423 AcpiUtPtrExit (
424 UINT32 LineNumber,
425 const char *FunctionName,
426 const char *ModuleName,
427 UINT32 ComponentId,
428 UINT8 *Ptr);
430 void
431 AcpiUtStrExit (
432 UINT32 LineNumber,
433 const char *FunctionName,
434 const char *ModuleName,
435 UINT32 ComponentId,
436 const char *String);
438 void
439 AcpiUtDebugDumpBuffer (
440 UINT8 *Buffer,
441 UINT32 Count,
442 UINT32 Display,
443 UINT32 ComponentId);
445 void
446 AcpiUtDumpBuffer (
447 UINT8 *Buffer,
448 UINT32 Count,
449 UINT32 Display,
450 UINT32 Offset);
452 #ifdef ACPI_APPLICATION
453 void
454 AcpiUtDumpBufferToFile (
455 ACPI_FILE File,
456 UINT8 *Buffer,
457 UINT32 Count,
458 UINT32 Display,
459 UINT32 BaseOffset);
460 #endif
462 void
463 AcpiUtReportError (
464 char *ModuleName,
465 UINT32 LineNumber);
467 void
468 AcpiUtReportInfo (
469 char *ModuleName,
470 UINT32 LineNumber);
472 void
473 AcpiUtReportWarning (
474 char *ModuleName,
475 UINT32 LineNumber);
479 * utdelete - Object deletion and reference counts
481 void
482 AcpiUtAddReference (
483 ACPI_OPERAND_OBJECT *Object);
485 void
486 AcpiUtRemoveReference (
487 ACPI_OPERAND_OBJECT *Object);
489 void
490 AcpiUtDeleteInternalPackageObject (
491 ACPI_OPERAND_OBJECT *Object);
493 void
494 AcpiUtDeleteInternalSimpleObject (
495 ACPI_OPERAND_OBJECT *Object);
497 void
498 AcpiUtDeleteInternalObjectList (
499 ACPI_OPERAND_OBJECT **ObjList);
503 * uteval - object evaluation
505 ACPI_STATUS
506 AcpiUtEvaluateObject (
507 ACPI_NAMESPACE_NODE *PrefixNode,
508 const char *Path,
509 UINT32 ExpectedReturnBtypes,
510 ACPI_OPERAND_OBJECT **ReturnDesc);
512 ACPI_STATUS
513 AcpiUtEvaluateNumericObject (
514 const char *ObjectName,
515 ACPI_NAMESPACE_NODE *DeviceNode,
516 UINT64 *Value);
518 ACPI_STATUS
519 AcpiUtExecute_STA (
520 ACPI_NAMESPACE_NODE *DeviceNode,
521 UINT32 *StatusFlags);
523 ACPI_STATUS
524 AcpiUtExecutePowerMethods (
525 ACPI_NAMESPACE_NODE *DeviceNode,
526 const char **MethodNames,
527 UINT8 MethodCount,
528 UINT8 *OutValues);
532 * utids - device ID support
534 ACPI_STATUS
535 AcpiUtExecute_HID (
536 ACPI_NAMESPACE_NODE *DeviceNode,
537 ACPI_PNP_DEVICE_ID **ReturnId);
539 ACPI_STATUS
540 AcpiUtExecute_UID (
541 ACPI_NAMESPACE_NODE *DeviceNode,
542 ACPI_PNP_DEVICE_ID **ReturnId);
544 ACPI_STATUS
545 AcpiUtExecute_CID (
546 ACPI_NAMESPACE_NODE *DeviceNode,
547 ACPI_PNP_DEVICE_ID_LIST **ReturnCidList);
549 ACPI_STATUS
550 AcpiUtExecute_CLS (
551 ACPI_NAMESPACE_NODE *DeviceNode,
552 ACPI_PNP_DEVICE_ID **ReturnId);
556 * utlock - reader/writer locks
558 ACPI_STATUS
559 AcpiUtCreateRwLock (
560 ACPI_RW_LOCK *Lock);
562 void
563 AcpiUtDeleteRwLock (
564 ACPI_RW_LOCK *Lock);
566 ACPI_STATUS
567 AcpiUtAcquireReadLock (
568 ACPI_RW_LOCK *Lock);
570 ACPI_STATUS
571 AcpiUtReleaseReadLock (
572 ACPI_RW_LOCK *Lock);
574 ACPI_STATUS
575 AcpiUtAcquireWriteLock (
576 ACPI_RW_LOCK *Lock);
578 void
579 AcpiUtReleaseWriteLock (
580 ACPI_RW_LOCK *Lock);
584 * utobject - internal object create/delete/cache routines
586 ACPI_OPERAND_OBJECT *
587 AcpiUtCreateInternalObjectDbg (
588 const char *ModuleName,
589 UINT32 LineNumber,
590 UINT32 ComponentId,
591 ACPI_OBJECT_TYPE Type);
593 void *
594 AcpiUtAllocateObjectDescDbg (
595 const char *ModuleName,
596 UINT32 LineNumber,
597 UINT32 ComponentId);
599 #define AcpiUtCreateInternalObject(t) AcpiUtCreateInternalObjectDbg (_AcpiModuleName,__LINE__,_COMPONENT,t)
600 #define AcpiUtAllocateObjectDesc() AcpiUtAllocateObjectDescDbg (_AcpiModuleName,__LINE__,_COMPONENT)
602 void
603 AcpiUtDeleteObjectDesc (
604 ACPI_OPERAND_OBJECT *Object);
606 BOOLEAN
607 AcpiUtValidInternalObject (
608 void *Object);
610 ACPI_OPERAND_OBJECT *
611 AcpiUtCreatePackageObject (
612 UINT32 Count);
614 ACPI_OPERAND_OBJECT *
615 AcpiUtCreateIntegerObject (
616 UINT64 Value);
618 ACPI_OPERAND_OBJECT *
619 AcpiUtCreateBufferObject (
620 ACPI_SIZE BufferSize);
622 ACPI_OPERAND_OBJECT *
623 AcpiUtCreateStringObject (
624 ACPI_SIZE StringSize);
626 ACPI_STATUS
627 AcpiUtGetObjectSize(
628 ACPI_OPERAND_OBJECT *Obj,
629 ACPI_SIZE *ObjLength);
633 * utosi - Support for the _OSI predefined control method
635 ACPI_STATUS
636 AcpiUtInitializeInterfaces (
637 void);
639 ACPI_STATUS
640 AcpiUtInterfaceTerminate (
641 void);
643 ACPI_STATUS
644 AcpiUtInstallInterface (
645 ACPI_STRING InterfaceName);
647 ACPI_STATUS
648 AcpiUtRemoveInterface (
649 ACPI_STRING InterfaceName);
651 ACPI_STATUS
652 AcpiUtUpdateInterfaces (
653 UINT8 Action);
655 ACPI_INTERFACE_INFO *
656 AcpiUtGetInterface (
657 ACPI_STRING InterfaceName);
659 ACPI_STATUS
660 AcpiUtOsiImplementation (
661 ACPI_WALK_STATE *WalkState);
665 * utpredef - support for predefined names
667 const ACPI_PREDEFINED_INFO *
668 AcpiUtGetNextPredefinedMethod (
669 const ACPI_PREDEFINED_INFO *ThisName);
671 const ACPI_PREDEFINED_INFO *
672 AcpiUtMatchPredefinedMethod (
673 char *Name);
675 void
676 AcpiUtGetExpectedReturnTypes (
677 char *Buffer,
678 UINT32 ExpectedBtypes);
680 #if (defined ACPI_ASL_COMPILER || defined ACPI_HELP_APP)
681 const ACPI_PREDEFINED_INFO *
682 AcpiUtMatchResourceName (
683 char *Name);
685 void
686 AcpiUtDisplayPredefinedMethod (
687 char *Buffer,
688 const ACPI_PREDEFINED_INFO *ThisName,
689 BOOLEAN MultiLine);
691 UINT32
692 AcpiUtGetResourceBitWidth (
693 char *Buffer,
694 UINT16 Types);
695 #endif
699 * utstate - Generic state creation/cache routines
701 void
702 AcpiUtPushGenericState (
703 ACPI_GENERIC_STATE **ListHead,
704 ACPI_GENERIC_STATE *State);
706 ACPI_GENERIC_STATE *
707 AcpiUtPopGenericState (
708 ACPI_GENERIC_STATE **ListHead);
711 ACPI_GENERIC_STATE *
712 AcpiUtCreateGenericState (
713 void);
715 ACPI_THREAD_STATE *
716 AcpiUtCreateThreadState (
717 void);
719 ACPI_GENERIC_STATE *
720 AcpiUtCreateUpdateState (
721 ACPI_OPERAND_OBJECT *Object,
722 UINT16 Action);
724 ACPI_GENERIC_STATE *
725 AcpiUtCreatePkgState (
726 void *InternalObject,
727 void *ExternalObject,
728 UINT16 Index);
730 ACPI_STATUS
731 AcpiUtCreateUpdateStateAndPush (
732 ACPI_OPERAND_OBJECT *Object,
733 UINT16 Action,
734 ACPI_GENERIC_STATE **StateList);
736 ACPI_GENERIC_STATE *
737 AcpiUtCreateControlState (
738 void);
740 void
741 AcpiUtDeleteGenericState (
742 ACPI_GENERIC_STATE *State);
746 * utmath
748 ACPI_STATUS
749 AcpiUtDivide (
750 UINT64 InDividend,
751 UINT64 InDivisor,
752 UINT64 *OutQuotient,
753 UINT64 *OutRemainder);
755 ACPI_STATUS
756 AcpiUtShortDivide (
757 UINT64 InDividend,
758 UINT32 Divisor,
759 UINT64 *OutQuotient,
760 UINT32 *OutRemainder);
764 * utmisc
766 const ACPI_EXCEPTION_INFO *
767 AcpiUtValidateException (
768 ACPI_STATUS Status);
770 BOOLEAN
771 AcpiUtIsPciRootBridge (
772 char *Id);
774 #if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP || defined ACPI_NAMES_APP)
775 BOOLEAN
776 AcpiUtIsAmlTable (
777 ACPI_TABLE_HEADER *Table);
778 #endif
780 ACPI_STATUS
781 AcpiUtWalkPackageTree (
782 ACPI_OPERAND_OBJECT *SourceObject,
783 void *TargetObject,
784 ACPI_PKG_CALLBACK WalkCallback,
785 void *Context);
787 /* Values for Base above (16=Hex, 10=Decimal) */
789 #define ACPI_ANY_BASE 0
792 UINT32
793 AcpiUtDwordByteSwap (
794 UINT32 Value);
796 void
797 AcpiUtSetIntegerWidth (
798 UINT8 Revision);
800 #ifdef ACPI_DEBUG_OUTPUT
801 void
802 AcpiUtDisplayInitPathname (
803 UINT8 Type,
804 ACPI_NAMESPACE_NODE *ObjHandle,
805 const char *Path);
806 #endif
810 * utownerid - Support for Table/Method Owner IDs
812 ACPI_STATUS
813 AcpiUtAllocateOwnerId (
814 ACPI_OWNER_ID *OwnerId);
816 void
817 AcpiUtReleaseOwnerId (
818 ACPI_OWNER_ID *OwnerId);
822 * utresrc
824 ACPI_STATUS
825 AcpiUtWalkAmlResources (
826 ACPI_WALK_STATE *WalkState,
827 UINT8 *Aml,
828 ACPI_SIZE AmlLength,
829 ACPI_WALK_AML_CALLBACK UserFunction,
830 void **Context);
832 ACPI_STATUS
833 AcpiUtValidateResource (
834 ACPI_WALK_STATE *WalkState,
835 void *Aml,
836 UINT8 *ReturnIndex);
838 UINT32
839 AcpiUtGetDescriptorLength (
840 void *Aml);
842 UINT16
843 AcpiUtGetResourceLength (
844 void *Aml);
846 UINT8
847 AcpiUtGetResourceHeaderLength (
848 void *Aml);
850 UINT8
851 AcpiUtGetResourceType (
852 void *Aml);
854 ACPI_STATUS
855 AcpiUtGetResourceEndTag (
856 ACPI_OPERAND_OBJECT *ObjDesc,
857 UINT8 **EndTag);
861 * utstring - String and character utilities
863 void
864 AcpiUtPrintString (
865 char *String,
866 UINT16 MaxLength);
868 #if defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP
869 void
870 UtConvertBackslashes (
871 char *Pathname);
872 #endif
874 void
875 AcpiUtRepairName (
876 char *Name);
878 #if defined (ACPI_DEBUGGER) || defined (ACPI_APPLICATION)
879 BOOLEAN
880 AcpiUtSafeStrcpy (
881 char *Dest,
882 ACPI_SIZE DestSize,
883 char *Source);
885 BOOLEAN
886 AcpiUtSafeStrcat (
887 char *Dest,
888 ACPI_SIZE DestSize,
889 char *Source);
891 BOOLEAN
892 AcpiUtSafeStrncat (
893 char *Dest,
894 ACPI_SIZE DestSize,
895 char *Source,
896 ACPI_SIZE MaxTransferLength);
897 #endif
901 * utmutex - mutex support
903 ACPI_STATUS
904 AcpiUtMutexInitialize (
905 void);
907 void
908 AcpiUtMutexTerminate (
909 void);
911 ACPI_STATUS
912 AcpiUtAcquireMutex (
913 ACPI_MUTEX_HANDLE MutexId);
915 ACPI_STATUS
916 AcpiUtReleaseMutex (
917 ACPI_MUTEX_HANDLE MutexId);
921 * utalloc - memory allocation and object caching
923 ACPI_STATUS
924 AcpiUtCreateCaches (
925 void);
927 ACPI_STATUS
928 AcpiUtDeleteCaches (
929 void);
931 ACPI_STATUS
932 AcpiUtValidateBuffer (
933 ACPI_BUFFER *Buffer);
935 ACPI_STATUS
936 AcpiUtInitializeBuffer (
937 ACPI_BUFFER *Buffer,
938 ACPI_SIZE RequiredLength);
940 #ifdef ACPI_DBG_TRACK_ALLOCATIONS
941 void *
942 AcpiUtAllocateAndTrack (
943 ACPI_SIZE Size,
944 UINT32 Component,
945 const char *Module,
946 UINT32 Line);
948 void *
949 AcpiUtAllocateZeroedAndTrack (
950 ACPI_SIZE Size,
951 UINT32 Component,
952 const char *Module,
953 UINT32 Line);
955 void
956 AcpiUtFreeAndTrack (
957 void *Address,
958 UINT32 Component,
959 const char *Module,
960 UINT32 Line);
962 void
963 AcpiUtDumpAllocationInfo (
964 void);
966 void
967 AcpiUtDumpAllocations (
968 UINT32 Component,
969 const char *Module);
971 ACPI_STATUS
972 AcpiUtCreateList (
973 const char *ListName,
974 UINT16 ObjectSize,
975 ACPI_MEMORY_LIST **ReturnCache);
977 #endif /* ACPI_DBG_TRACK_ALLOCATIONS */
981 * utaddress - address range check
983 ACPI_STATUS
984 AcpiUtAddAddressRange (
985 ACPI_ADR_SPACE_TYPE SpaceId,
986 ACPI_PHYSICAL_ADDRESS Address,
987 UINT32 Length,
988 ACPI_NAMESPACE_NODE *RegionNode);
990 void
991 AcpiUtRemoveAddressRange (
992 ACPI_ADR_SPACE_TYPE SpaceId,
993 ACPI_NAMESPACE_NODE *RegionNode);
995 UINT32
996 AcpiUtCheckAddressRange (
997 ACPI_ADR_SPACE_TYPE SpaceId,
998 ACPI_PHYSICAL_ADDRESS Address,
999 UINT32 Length,
1000 BOOLEAN Warn);
1002 void
1003 AcpiUtDeleteAddressLists (
1004 void);
1008 * utxferror - various error/warning output functions
1010 void ACPI_INTERNAL_VAR_XFACE
1011 AcpiUtPredefinedWarning (
1012 const char *ModuleName,
1013 UINT32 LineNumber,
1014 char *Pathname,
1015 UINT8 NodeFlags,
1016 const char *Format,
1017 ...);
1019 void ACPI_INTERNAL_VAR_XFACE
1020 AcpiUtPredefinedInfo (
1021 const char *ModuleName,
1022 UINT32 LineNumber,
1023 char *Pathname,
1024 UINT8 NodeFlags,
1025 const char *Format,
1026 ...);
1028 void ACPI_INTERNAL_VAR_XFACE
1029 AcpiUtPredefinedBiosError (
1030 const char *ModuleName,
1031 UINT32 LineNumber,
1032 char *Pathname,
1033 UINT8 NodeFlags,
1034 const char *Format,
1035 ...);
1037 void
1038 AcpiUtNamespaceError (
1039 const char *ModuleName,
1040 UINT32 LineNumber,
1041 const char *InternalName,
1042 ACPI_STATUS LookupStatus);
1044 void
1045 AcpiUtMethodError (
1046 const char *ModuleName,
1047 UINT32 LineNumber,
1048 const char *Message,
1049 ACPI_NAMESPACE_NODE *Node,
1050 const char *Path,
1051 ACPI_STATUS LookupStatus);
1055 * Utility functions for ACPI names and IDs
1057 const AH_PREDEFINED_NAME *
1058 AcpiAhMatchPredefinedName (
1059 char *Nameseg);
1061 const AH_DEVICE_ID *
1062 AcpiAhMatchHardwareId (
1063 char *Hid);
1065 const char *
1066 AcpiAhMatchUuid (
1067 UINT8 *Data);
1071 * utprint - printf/vprintf output functions
1073 const char *
1074 AcpiUtScanNumber (
1075 const char *String,
1076 UINT64 *NumberPtr);
1078 const char *
1079 AcpiUtPrintNumber (
1080 char *String,
1081 UINT64 Number);
1084 AcpiUtVsnprintf (
1085 char *String,
1086 ACPI_SIZE Size,
1087 const char *Format,
1088 va_list Args);
1091 AcpiUtSnprintf (
1092 char *String,
1093 ACPI_SIZE Size,
1094 const char *Format,
1095 ...);
1097 #ifdef ACPI_APPLICATION
1099 AcpiUtFileVprintf (
1100 ACPI_FILE File,
1101 const char *Format,
1102 va_list Args);
1105 AcpiUtFilePrintf (
1106 ACPI_FILE File,
1107 const char *Format,
1108 ...);
1109 #endif
1113 * utuuid -- UUID support functions
1115 #if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP || defined ACPI_HELP_APP)
1116 void
1117 AcpiUtConvertStringToUuid (
1118 char *InString,
1119 UINT8 *UuidBuffer);
1120 #endif
1122 #endif /* _ACUTILS_H */