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