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