1 2 /****************************************************************************** 3 * 4 * Name: acpixf.h - External interfaces to the ACPI subsystem 5 * 6 *****************************************************************************/ 7 8 /****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999 - 2012, 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 118 #ifndef __ACXFACE_H__ 119 #define __ACXFACE_H__ 120 121 /* Current ACPICA subsystem version in YYYYMMDD format */ 122 123 #define ACPI_CA_VERSION 0x20120711 124 125 #include "acconfig.h" 126 #include "actypes.h" 127 #include "actbl.h" 128 129 /* 130 * Globals that are publically available 131 */ 132 extern UINT32 AcpiCurrentGpeCount; 133 extern ACPI_TABLE_FADT AcpiGbl_FADT; 134 extern BOOLEAN AcpiGbl_SystemAwakeAndRunning; 135 extern BOOLEAN AcpiGbl_ReducedHardware; /* ACPI 5.0 */ 136 137 /* Runtime configuration of debug print levels */ 138 139 extern UINT32 AcpiDbgLevel; 140 extern UINT32 AcpiDbgLayer; 141 142 /* ACPICA runtime options */ 143 144 extern UINT8 AcpiGbl_EnableInterpreterSlack; 145 extern UINT8 AcpiGbl_AllMethodsSerialized; 146 extern UINT8 AcpiGbl_CreateOsiMethod; 147 extern UINT8 AcpiGbl_UseDefaultRegisterWidths; 148 extern ACPI_NAME AcpiGbl_TraceMethodName; 149 extern UINT32 AcpiGbl_TraceFlags; 150 extern UINT8 AcpiGbl_EnableAmlDebugObject; 151 extern UINT8 AcpiGbl_CopyDsdtLocally; 152 extern UINT8 AcpiGbl_TruncateIoAddresses; 153 extern UINT8 AcpiGbl_DisableAutoRepair; 154 155 156 /* 157 * Hardware-reduced prototypes. All interfaces that use these macros will 158 * be configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag 159 * is set to TRUE. 160 */ 161 #if (!ACPI_REDUCED_HARDWARE) 162 #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \ 163 Prototype; 164 165 #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \ 166 Prototype; 167 168 #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \ 169 Prototype; 170 171 #else 172 #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \ 173 static ACPI_INLINE Prototype {return(AE_NOT_CONFIGURED);} 174 175 #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \ 176 static ACPI_INLINE Prototype {return(AE_OK);} 177 178 #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \ 179 static ACPI_INLINE Prototype {} 180 181 #endif /* !ACPI_REDUCED_HARDWARE */ 182 183 184 /* 185 * Initialization 186 */ 187 ACPI_STATUS 188 AcpiInitializeTables ( 189 ACPI_TABLE_DESC *InitialStorage, 190 UINT32 InitialTableCount, 191 BOOLEAN AllowResize); 192 193 ACPI_STATUS 194 AcpiInitializeSubsystem ( 195 void); 196 197 ACPI_STATUS 198 AcpiEnableSubsystem ( 199 UINT32 Flags); 200 201 ACPI_STATUS 202 AcpiInitializeObjects ( 203 UINT32 Flags); 204 205 ACPI_STATUS 206 AcpiTerminate ( 207 void); 208 209 210 /* 211 * Miscellaneous global interfaces 212 */ 213 ACPI_HW_DEPENDENT_RETURN_STATUS ( 214 ACPI_STATUS 215 AcpiEnable ( 216 void)) 217 218 ACPI_HW_DEPENDENT_RETURN_STATUS ( 219 ACPI_STATUS 220 AcpiDisable ( 221 void)) 222 223 ACPI_STATUS 224 AcpiSubsystemStatus ( 225 void); 226 227 ACPI_STATUS 228 AcpiGetSystemInfo ( 229 ACPI_BUFFER *RetBuffer); 230 231 ACPI_STATUS 232 AcpiGetStatistics ( 233 ACPI_STATISTICS *Stats); 234 235 const char * 236 AcpiFormatException ( 237 ACPI_STATUS Exception); 238 239 ACPI_STATUS 240 AcpiPurgeCachedObjects ( 241 void); 242 243 ACPI_STATUS 244 AcpiInstallInterface ( 245 ACPI_STRING InterfaceName); 246 247 ACPI_STATUS 248 AcpiRemoveInterface ( 249 ACPI_STRING InterfaceName); 250 251 UINT32 252 AcpiCheckAddressRange ( 253 ACPI_ADR_SPACE_TYPE SpaceId, 254 ACPI_PHYSICAL_ADDRESS Address, 255 ACPI_SIZE Length, 256 BOOLEAN Warn); 257 258 259 /* 260 * ACPI Memory management 261 */ 262 void * 263 AcpiAllocate ( 264 UINT32 Size); 265 266 void * 267 AcpiCallocate ( 268 UINT32 Size); 269 270 void 271 AcpiFree ( 272 void *Address); 273 274 275 /* 276 * ACPI table load/unload interfaces 277 */ 278 ACPI_STATUS 279 AcpiLoadTable ( 280 ACPI_TABLE_HEADER *Table); 281 282 ACPI_STATUS 283 AcpiUnloadParentTable ( 284 ACPI_HANDLE Object); 285 286 ACPI_STATUS 287 AcpiLoadTables ( 288 void); 289 290 291 /* 292 * ACPI table manipulation interfaces 293 */ 294 ACPI_STATUS 295 AcpiReallocateRootTable ( 296 void); 297 298 ACPI_STATUS 299 AcpiFindRootPointer ( 300 ACPI_SIZE *RsdpAddress); 301 302 ACPI_STATUS 303 AcpiGetTableHeader ( 304 ACPI_STRING Signature, 305 UINT32 Instance, 306 ACPI_TABLE_HEADER *OutTableHeader); 307 308 ACPI_STATUS 309 AcpiGetTable ( 310 ACPI_STRING Signature, 311 UINT32 Instance, 312 ACPI_TABLE_HEADER **OutTable); 313 314 ACPI_STATUS 315 AcpiGetTableByIndex ( 316 UINT32 TableIndex, 317 ACPI_TABLE_HEADER **OutTable); 318 319 ACPI_STATUS 320 AcpiInstallTableHandler ( 321 ACPI_TABLE_HANDLER Handler, 322 void *Context); 323 324 ACPI_STATUS 325 AcpiRemoveTableHandler ( 326 ACPI_TABLE_HANDLER Handler); 327 328 329 /* 330 * Namespace and name interfaces 331 */ 332 ACPI_STATUS 333 AcpiWalkNamespace ( 334 ACPI_OBJECT_TYPE Type, 335 ACPI_HANDLE StartObject, 336 UINT32 MaxDepth, 337 ACPI_WALK_CALLBACK PreOrderVisit, 338 ACPI_WALK_CALLBACK PostOrderVisit, 339 void *Context, 340 void **ReturnValue); 341 342 ACPI_STATUS 343 AcpiGetDevices ( 344 char *HID, 345 ACPI_WALK_CALLBACK UserFunction, 346 void *Context, 347 void **ReturnValue); 348 349 ACPI_STATUS 350 AcpiGetName ( 351 ACPI_HANDLE Object, 352 UINT32 NameType, 353 ACPI_BUFFER *RetPathPtr); 354 355 ACPI_STATUS 356 AcpiGetHandle ( 357 ACPI_HANDLE Parent, 358 ACPI_STRING Pathname, 359 ACPI_HANDLE *RetHandle); 360 361 ACPI_STATUS 362 AcpiAttachData ( 363 ACPI_HANDLE Object, 364 ACPI_OBJECT_HANDLER Handler, 365 void *Data); 366 367 ACPI_STATUS 368 AcpiDetachData ( 369 ACPI_HANDLE Object, 370 ACPI_OBJECT_HANDLER Handler); 371 372 ACPI_STATUS 373 AcpiGetData ( 374 ACPI_HANDLE Object, 375 ACPI_OBJECT_HANDLER Handler, 376 void **Data); 377 378 ACPI_STATUS 379 AcpiDebugTrace ( 380 char *Name, 381 UINT32 DebugLevel, 382 UINT32 DebugLayer, 383 UINT32 Flags); 384 385 386 /* 387 * Object manipulation and enumeration 388 */ 389 ACPI_STATUS 390 AcpiEvaluateObject ( 391 ACPI_HANDLE Object, 392 ACPI_STRING Pathname, 393 ACPI_OBJECT_LIST *ParameterObjects, 394 ACPI_BUFFER *ReturnObjectBuffer); 395 396 ACPI_STATUS 397 AcpiEvaluateObjectTyped ( 398 ACPI_HANDLE Object, 399 ACPI_STRING Pathname, 400 ACPI_OBJECT_LIST *ExternalParams, 401 ACPI_BUFFER *ReturnBuffer, 402 ACPI_OBJECT_TYPE ReturnType); 403 404 ACPI_STATUS 405 AcpiGetObjectInfo ( 406 ACPI_HANDLE Object, 407 ACPI_DEVICE_INFO **ReturnBuffer); 408 409 ACPI_STATUS 410 AcpiInstallMethod ( 411 UINT8 *Buffer); 412 413 ACPI_STATUS 414 AcpiGetNextObject ( 415 ACPI_OBJECT_TYPE Type, 416 ACPI_HANDLE Parent, 417 ACPI_HANDLE Child, 418 ACPI_HANDLE *OutHandle); 419 420 ACPI_STATUS 421 AcpiGetType ( 422 ACPI_HANDLE Object, 423 ACPI_OBJECT_TYPE *OutType); 424 425 ACPI_STATUS 426 AcpiGetParent ( 427 ACPI_HANDLE Object, 428 ACPI_HANDLE *OutHandle); 429 430 431 /* 432 * Handler interfaces 433 */ 434 ACPI_STATUS 435 AcpiInstallInitializationHandler ( 436 ACPI_INIT_HANDLER Handler, 437 UINT32 Function); 438 439 ACPI_HW_DEPENDENT_RETURN_STATUS ( 440 ACPI_STATUS 441 AcpiInstallGlobalEventHandler ( 442 ACPI_GBL_EVENT_HANDLER Handler, 443 void *Context)) 444 445 ACPI_HW_DEPENDENT_RETURN_STATUS ( 446 ACPI_STATUS 447 AcpiInstallFixedEventHandler ( 448 UINT32 AcpiEvent, 449 ACPI_EVENT_HANDLER Handler, 450 void *Context)) 451 452 ACPI_HW_DEPENDENT_RETURN_STATUS ( 453 ACPI_STATUS 454 AcpiRemoveFixedEventHandler ( 455 UINT32 AcpiEvent, 456 ACPI_EVENT_HANDLER Handler)) 457 458 ACPI_HW_DEPENDENT_RETURN_STATUS ( 459 ACPI_STATUS 460 AcpiInstallGpeHandler ( 461 ACPI_HANDLE GpeDevice, 462 UINT32 GpeNumber, 463 UINT32 Type, 464 ACPI_GPE_HANDLER Address, 465 void *Context)) 466 467 ACPI_HW_DEPENDENT_RETURN_STATUS ( 468 ACPI_STATUS 469 AcpiRemoveGpeHandler ( 470 ACPI_HANDLE GpeDevice, 471 UINT32 GpeNumber, 472 ACPI_GPE_HANDLER Address)) 473 474 ACPI_STATUS 475 AcpiInstallNotifyHandler ( 476 ACPI_HANDLE Device, 477 UINT32 HandlerType, 478 ACPI_NOTIFY_HANDLER Handler, 479 void *Context); 480 481 ACPI_STATUS 482 AcpiRemoveNotifyHandler ( 483 ACPI_HANDLE Device, 484 UINT32 HandlerType, 485 ACPI_NOTIFY_HANDLER Handler); 486 487 ACPI_STATUS 488 AcpiInstallAddressSpaceHandler ( 489 ACPI_HANDLE Device, 490 ACPI_ADR_SPACE_TYPE SpaceId, 491 ACPI_ADR_SPACE_HANDLER Handler, 492 ACPI_ADR_SPACE_SETUP Setup, 493 void *Context); 494 495 ACPI_STATUS 496 AcpiRemoveAddressSpaceHandler ( 497 ACPI_HANDLE Device, 498 ACPI_ADR_SPACE_TYPE SpaceId, 499 ACPI_ADR_SPACE_HANDLER Handler); 500 501 ACPI_STATUS 502 AcpiInstallExceptionHandler ( 503 ACPI_EXCEPTION_HANDLER Handler); 504 505 ACPI_STATUS 506 AcpiInstallInterfaceHandler ( 507 ACPI_INTERFACE_HANDLER Handler); 508 509 510 /* 511 * Global Lock interfaces 512 */ 513 ACPI_HW_DEPENDENT_RETURN_STATUS ( 514 ACPI_STATUS 515 AcpiAcquireGlobalLock ( 516 UINT16 Timeout, 517 UINT32 *Handle)) 518 519 ACPI_HW_DEPENDENT_RETURN_STATUS ( 520 ACPI_STATUS 521 AcpiReleaseGlobalLock ( 522 UINT32 Handle)) 523 524 525 /* 526 * Interfaces to AML mutex objects 527 */ 528 ACPI_STATUS 529 AcpiAcquireMutex ( 530 ACPI_HANDLE Handle, 531 ACPI_STRING Pathname, 532 UINT16 Timeout); 533 534 ACPI_STATUS 535 AcpiReleaseMutex ( 536 ACPI_HANDLE Handle, 537 ACPI_STRING Pathname); 538 539 540 /* 541 * Fixed Event interfaces 542 */ 543 ACPI_HW_DEPENDENT_RETURN_STATUS ( 544 ACPI_STATUS 545 AcpiEnableEvent ( 546 UINT32 Event, 547 UINT32 Flags)) 548 549 ACPI_HW_DEPENDENT_RETURN_STATUS ( 550 ACPI_STATUS 551 AcpiDisableEvent ( 552 UINT32 Event, 553 UINT32 Flags)) 554 555 ACPI_HW_DEPENDENT_RETURN_STATUS ( 556 ACPI_STATUS 557 AcpiClearEvent ( 558 UINT32 Event)) 559 560 ACPI_HW_DEPENDENT_RETURN_STATUS ( 561 ACPI_STATUS 562 AcpiGetEventStatus ( 563 UINT32 Event, 564 ACPI_EVENT_STATUS *EventStatus)) 565 566 567 /* 568 * General Purpose Event (GPE) Interfaces 569 */ 570 ACPI_HW_DEPENDENT_RETURN_STATUS ( 571 ACPI_STATUS 572 AcpiUpdateAllGpes ( 573 void)) 574 575 ACPI_HW_DEPENDENT_RETURN_STATUS ( 576 ACPI_STATUS 577 AcpiEnableGpe ( 578 ACPI_HANDLE GpeDevice, 579 UINT32 GpeNumber)) 580 581 ACPI_HW_DEPENDENT_RETURN_STATUS ( 582 ACPI_STATUS 583 AcpiDisableGpe ( 584 ACPI_HANDLE GpeDevice, 585 UINT32 GpeNumber)) 586 587 ACPI_HW_DEPENDENT_RETURN_STATUS ( 588 ACPI_STATUS 589 AcpiClearGpe ( 590 ACPI_HANDLE GpeDevice, 591 UINT32 GpeNumber)) 592 593 ACPI_HW_DEPENDENT_RETURN_STATUS ( 594 ACPI_STATUS 595 AcpiSetGpe ( 596 ACPI_HANDLE GpeDevice, 597 UINT32 GpeNumber, 598 UINT8 Action)) 599 600 ACPI_HW_DEPENDENT_RETURN_STATUS ( 601 ACPI_STATUS 602 AcpiFinishGpe ( 603 ACPI_HANDLE GpeDevice, 604 UINT32 GpeNumber)) 605 606 ACPI_HW_DEPENDENT_RETURN_STATUS ( 607 ACPI_STATUS 608 AcpiSetupGpeForWake ( 609 ACPI_HANDLE ParentDevice, 610 ACPI_HANDLE GpeDevice, 611 UINT32 GpeNumber)) 612 613 ACPI_HW_DEPENDENT_RETURN_STATUS ( 614 ACPI_STATUS 615 AcpiSetGpeWakeMask ( 616 ACPI_HANDLE GpeDevice, 617 UINT32 GpeNumber, 618 UINT8 Action)) 619 620 ACPI_HW_DEPENDENT_RETURN_STATUS ( 621 ACPI_STATUS 622 AcpiGetGpeStatus ( 623 ACPI_HANDLE GpeDevice, 624 UINT32 GpeNumber, 625 ACPI_EVENT_STATUS *EventStatus)) 626 627 ACPI_HW_DEPENDENT_RETURN_STATUS ( 628 ACPI_STATUS 629 AcpiDisableAllGpes ( 630 void)) 631 632 ACPI_HW_DEPENDENT_RETURN_STATUS ( 633 ACPI_STATUS 634 AcpiEnableAllRuntimeGpes ( 635 void)) 636 637 ACPI_HW_DEPENDENT_RETURN_STATUS ( 638 ACPI_STATUS 639 AcpiGetGpeDevice ( 640 UINT32 GpeIndex, 641 ACPI_HANDLE *GpeDevice)) 642 643 ACPI_HW_DEPENDENT_RETURN_STATUS ( 644 ACPI_STATUS 645 AcpiInstallGpeBlock ( 646 ACPI_HANDLE GpeDevice, 647 ACPI_GENERIC_ADDRESS *GpeBlockAddress, 648 UINT32 RegisterCount, 649 UINT32 InterruptNumber)) 650 651 ACPI_HW_DEPENDENT_RETURN_STATUS ( 652 ACPI_STATUS 653 AcpiRemoveGpeBlock ( 654 ACPI_HANDLE GpeDevice)) 655 656 657 /* 658 * Resource interfaces 659 */ 660 typedef 661 ACPI_STATUS (*ACPI_WALK_RESOURCE_CALLBACK) ( 662 ACPI_RESOURCE *Resource, 663 void *Context); 664 665 ACPI_STATUS 666 AcpiGetVendorResource ( 667 ACPI_HANDLE Device, 668 char *Name, 669 ACPI_VENDOR_UUID *Uuid, 670 ACPI_BUFFER *RetBuffer); 671 672 ACPI_STATUS 673 AcpiGetCurrentResources ( 674 ACPI_HANDLE Device, 675 ACPI_BUFFER *RetBuffer); 676 677 ACPI_STATUS 678 AcpiGetPossibleResources ( 679 ACPI_HANDLE Device, 680 ACPI_BUFFER *RetBuffer); 681 682 ACPI_STATUS 683 AcpiGetEventResources ( 684 ACPI_HANDLE DeviceHandle, 685 ACPI_BUFFER *RetBuffer); 686 687 ACPI_STATUS 688 AcpiWalkResources ( 689 ACPI_HANDLE Device, 690 char *Name, 691 ACPI_WALK_RESOURCE_CALLBACK UserFunction, 692 void *Context); 693 694 ACPI_STATUS 695 AcpiSetCurrentResources ( 696 ACPI_HANDLE Device, 697 ACPI_BUFFER *InBuffer); 698 699 ACPI_STATUS 700 AcpiGetIrqRoutingTable ( 701 ACPI_HANDLE Device, 702 ACPI_BUFFER *RetBuffer); 703 704 ACPI_STATUS 705 AcpiResourceToAddress64 ( 706 ACPI_RESOURCE *Resource, 707 ACPI_RESOURCE_ADDRESS64 *Out); 708 709 ACPI_STATUS 710 AcpiBufferToResource ( 711 UINT8 *AmlBuffer, 712 UINT16 AmlBufferLength, 713 ACPI_RESOURCE **ResourcePtr); 714 715 716 /* 717 * Hardware (ACPI device) interfaces 718 */ 719 ACPI_STATUS 720 AcpiReset ( 721 void); 722 723 ACPI_STATUS 724 AcpiRead ( 725 UINT64 *Value, 726 ACPI_GENERIC_ADDRESS *Reg); 727 728 ACPI_STATUS 729 AcpiWrite ( 730 UINT64 Value, 731 ACPI_GENERIC_ADDRESS *Reg); 732 733 ACPI_HW_DEPENDENT_RETURN_STATUS ( 734 ACPI_STATUS 735 AcpiReadBitRegister ( 736 UINT32 RegisterId, 737 UINT32 *ReturnValue)) 738 739 ACPI_HW_DEPENDENT_RETURN_STATUS ( 740 ACPI_STATUS 741 AcpiWriteBitRegister ( 742 UINT32 RegisterId, 743 UINT32 Value)) 744 745 746 /* 747 * Sleep/Wake interfaces 748 */ 749 ACPI_STATUS 750 AcpiGetSleepTypeData ( 751 UINT8 SleepState, 752 UINT8 *Slp_TypA, 753 UINT8 *Slp_TypB); 754 755 ACPI_STATUS 756 AcpiEnterSleepStatePrep ( 757 UINT8 SleepState); 758 759 ACPI_STATUS 760 AcpiEnterSleepState ( 761 UINT8 SleepState, 762 UINT8 Flags); 763 764 ACPI_HW_DEPENDENT_RETURN_STATUS ( 765 ACPI_STATUS 766 AcpiEnterSleepStateS4bios ( 767 void)) 768 769 ACPI_STATUS 770 AcpiLeaveSleepStatePrep ( 771 UINT8 SleepState, 772 UINT8 Flags); 773 774 ACPI_STATUS 775 AcpiLeaveSleepState ( 776 UINT8 SleepState); 777 778 ACPI_HW_DEPENDENT_RETURN_STATUS ( 779 ACPI_STATUS 780 AcpiSetFirmwareWakingVector ( 781 UINT32 PhysicalAddress)) 782 783 #if ACPI_MACHINE_WIDTH == 64 784 ACPI_HW_DEPENDENT_RETURN_STATUS ( 785 ACPI_STATUS 786 AcpiSetFirmwareWakingVector64 ( 787 UINT64 PhysicalAddress)) 788 #endif 789 790 791 /* 792 * ACPI Timer interfaces 793 */ 794 ACPI_HW_DEPENDENT_RETURN_STATUS ( 795 ACPI_STATUS 796 AcpiGetTimerResolution ( 797 UINT32 *Resolution)) 798 799 ACPI_HW_DEPENDENT_RETURN_STATUS ( 800 ACPI_STATUS 801 AcpiGetTimer ( 802 UINT32 *Ticks)) 803 804 ACPI_HW_DEPENDENT_RETURN_STATUS ( 805 ACPI_STATUS 806 AcpiGetTimerDuration ( 807 UINT32 StartTicks, 808 UINT32 EndTicks, 809 UINT32 *TimeElapsed)) 810 811 812 /* 813 * Error/Warning output 814 */ 815 void ACPI_INTERNAL_VAR_XFACE 816 AcpiError ( 817 const char *ModuleName, 818 UINT32 LineNumber, 819 const char *Format, 820 ...) ACPI_PRINTF_LIKE(3); 821 822 void ACPI_INTERNAL_VAR_XFACE 823 AcpiException ( 824 const char *ModuleName, 825 UINT32 LineNumber, 826 ACPI_STATUS Status, 827 const char *Format, 828 ...) ACPI_PRINTF_LIKE(4); 829 830 void ACPI_INTERNAL_VAR_XFACE 831 AcpiWarning ( 832 const char *ModuleName, 833 UINT32 LineNumber, 834 const char *Format, 835 ...) ACPI_PRINTF_LIKE(3); 836 837 void ACPI_INTERNAL_VAR_XFACE 838 AcpiInfo ( 839 const char *ModuleName, 840 UINT32 LineNumber, 841 const char *Format, 842 ...) ACPI_PRINTF_LIKE(3); 843 844 void ACPI_INTERNAL_VAR_XFACE 845 AcpiBiosError ( 846 const char *ModuleName, 847 UINT32 LineNumber, 848 const char *Format, 849 ...) ACPI_PRINTF_LIKE(3); 850 851 void ACPI_INTERNAL_VAR_XFACE 852 AcpiBiosWarning ( 853 const char *ModuleName, 854 UINT32 LineNumber, 855 const char *Format, 856 ...) ACPI_PRINTF_LIKE(3); 857 858 859 /* 860 * Debug output 861 */ 862 #ifdef ACPI_DEBUG_OUTPUT 863 864 void ACPI_INTERNAL_VAR_XFACE 865 AcpiDebugPrint ( 866 UINT32 RequestedDebugLevel, 867 UINT32 LineNumber, 868 const char *FunctionName, 869 const char *ModuleName, 870 UINT32 ComponentId, 871 const char *Format, 872 ...) ACPI_PRINTF_LIKE(6); 873 874 void ACPI_INTERNAL_VAR_XFACE 875 AcpiDebugPrintRaw ( 876 UINT32 RequestedDebugLevel, 877 UINT32 LineNumber, 878 const char *FunctionName, 879 const char *ModuleName, 880 UINT32 ComponentId, 881 const char *Format, 882 ...) ACPI_PRINTF_LIKE(6); 883 #endif 884 885 #endif /* __ACXFACE_H__ */ 886