acpixf.h revision 210976
167754Smsmith 267754Smsmith/****************************************************************************** 367754Smsmith * 470243Smsmith * Name: acpixf.h - External interfaces to the ACPI subsystem 567754Smsmith * 667754Smsmith *****************************************************************************/ 767754Smsmith 867754Smsmith/****************************************************************************** 967754Smsmith * 1067754Smsmith * 1. Copyright Notice 1167754Smsmith * 12202771Sjkim * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. 1370243Smsmith * All rights reserved. 1467754Smsmith * 1567754Smsmith * 2. License 1667754Smsmith * 1767754Smsmith * 2.1. This is your license from Intel Corp. under its intellectual property 1867754Smsmith * rights. You may have additional license terms from the party that provided 1967754Smsmith * you this software, covering your right to use that party's intellectual 2067754Smsmith * property rights. 2167754Smsmith * 2267754Smsmith * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 2367754Smsmith * copy of the source code appearing in this file ("Covered Code") an 2467754Smsmith * irrevocable, perpetual, worldwide license under Intel's copyrights in the 2567754Smsmith * base code distributed originally by Intel ("Original Intel Code") to copy, 2667754Smsmith * make derivatives, distribute, use and display any portion of the Covered 2767754Smsmith * Code in any form, with the right to sublicense such rights; and 2867754Smsmith * 2967754Smsmith * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 3067754Smsmith * license (with the right to sublicense), under only those claims of Intel 3167754Smsmith * patents that are infringed by the Original Intel Code, to make, use, sell, 3267754Smsmith * offer to sell, and import the Covered Code and derivative works thereof 3367754Smsmith * solely to the minimum extent necessary to exercise the above copyright 3467754Smsmith * license, and in no event shall the patent license extend to any additions 3567754Smsmith * to or modifications of the Original Intel Code. No other license or right 3667754Smsmith * is granted directly or by implication, estoppel or otherwise; 3767754Smsmith * 3867754Smsmith * The above copyright and patent license is granted only if the following 3967754Smsmith * conditions are met: 4067754Smsmith * 4167754Smsmith * 3. Conditions 4267754Smsmith * 4367754Smsmith * 3.1. Redistribution of Source with Rights to Further Distribute Source. 4467754Smsmith * Redistribution of source code of any substantial portion of the Covered 4567754Smsmith * Code or modification with rights to further distribute source must include 4667754Smsmith * the above Copyright Notice, the above License, this list of Conditions, 4767754Smsmith * and the following Disclaimer and Export Compliance provision. In addition, 4867754Smsmith * Licensee must cause all Covered Code to which Licensee contributes to 4967754Smsmith * contain a file documenting the changes Licensee made to create that Covered 5067754Smsmith * Code and the date of any change. Licensee must include in that file the 5167754Smsmith * documentation of any changes made by any predecessor Licensee. Licensee 5267754Smsmith * must include a prominent statement that the modification is derived, 5367754Smsmith * directly or indirectly, from Original Intel Code. 5467754Smsmith * 5567754Smsmith * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 5667754Smsmith * Redistribution of source code of any substantial portion of the Covered 5767754Smsmith * Code or modification without rights to further distribute source must 5867754Smsmith * include the following Disclaimer and Export Compliance provision in the 5967754Smsmith * documentation and/or other materials provided with distribution. In 6067754Smsmith * addition, Licensee may not authorize further sublicense of source of any 6167754Smsmith * portion of the Covered Code, and must include terms to the effect that the 6267754Smsmith * license from Licensee to its licensee is limited to the intellectual 6367754Smsmith * property embodied in the software Licensee provides to its licensee, and 6467754Smsmith * not to intellectual property embodied in modifications its licensee may 6567754Smsmith * make. 6667754Smsmith * 6767754Smsmith * 3.3. Redistribution of Executable. Redistribution in executable form of any 6867754Smsmith * substantial portion of the Covered Code or modification must reproduce the 6967754Smsmith * above Copyright Notice, and the following Disclaimer and Export Compliance 7067754Smsmith * provision in the documentation and/or other materials provided with the 7167754Smsmith * distribution. 7267754Smsmith * 7367754Smsmith * 3.4. Intel retains all right, title, and interest in and to the Original 7467754Smsmith * Intel Code. 7567754Smsmith * 7667754Smsmith * 3.5. Neither the name Intel nor any other trademark owned or controlled by 7767754Smsmith * Intel shall be used in advertising or otherwise to promote the sale, use or 7867754Smsmith * other dealings in products derived from or relating to the Covered Code 7967754Smsmith * without prior written authorization from Intel. 8067754Smsmith * 8167754Smsmith * 4. Disclaimer and Export Compliance 8267754Smsmith * 8367754Smsmith * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 8467754Smsmith * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 8567754Smsmith * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 8667754Smsmith * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 8767754Smsmith * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 8867754Smsmith * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 8967754Smsmith * PARTICULAR PURPOSE. 9067754Smsmith * 9167754Smsmith * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 9267754Smsmith * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 9367754Smsmith * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 9467754Smsmith * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 9567754Smsmith * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 9667754Smsmith * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 9767754Smsmith * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 9867754Smsmith * LIMITED REMEDY. 9967754Smsmith * 10067754Smsmith * 4.3. Licensee shall not export, either directly or indirectly, any of this 10167754Smsmith * software or system incorporating such software without first obtaining any 10267754Smsmith * required license or other approval from the U. S. Department of Commerce or 10367754Smsmith * any other agency or department of the United States Government. In the 10467754Smsmith * event Licensee exports any such software from the United States or 10567754Smsmith * re-exports any such software from a foreign destination, Licensee shall 10667754Smsmith * ensure that the distribution and export/re-export of the software is in 10767754Smsmith * compliance with all laws, regulations, orders, or other restrictions of the 10867754Smsmith * U.S. Export Administration Regulations. Licensee agrees that neither it nor 10967754Smsmith * any of its subsidiaries will export/re-export any technical data, process, 11067754Smsmith * software, or service, directly or indirectly, to any country for which the 11167754Smsmith * United States government or any agency thereof requires an export license, 11267754Smsmith * other governmental approval, or letter of assurance, without first obtaining 11367754Smsmith * such license, approval or letter. 11467754Smsmith * 11567754Smsmith *****************************************************************************/ 11667754Smsmith 11767754Smsmith 11867754Smsmith#ifndef __ACXFACE_H__ 11967754Smsmith#define __ACXFACE_H__ 12067754Smsmith 121193267Sjkim/* Current ACPICA subsystem version in YYYYMMDD format */ 122193267Sjkim 123210976Sjkim#define ACPI_CA_VERSION 0x20100806 124193267Sjkim 125193341Sjkim#include <contrib/dev/acpica/include/actypes.h> 126193341Sjkim#include <contrib/dev/acpica/include/actbl.h> 12767754Smsmith 128193267Sjkim/* 129193267Sjkim * Globals that are publically available 130193267Sjkim */ 131193267Sjkimextern UINT32 AcpiCurrentGpeCount; 132193267Sjkimextern ACPI_TABLE_FADT AcpiGbl_FADT; 13377424Smsmith 134193267Sjkim/* Runtime configuration of debug print levels */ 135193267Sjkim 136193267Sjkimextern UINT32 AcpiDbgLevel; 137193267Sjkimextern UINT32 AcpiDbgLayer; 138193267Sjkim 139193267Sjkim/* ACPICA runtime options */ 140193267Sjkim 141193267Sjkimextern UINT8 AcpiGbl_EnableInterpreterSlack; 142193267Sjkimextern UINT8 AcpiGbl_AllMethodsSerialized; 143193267Sjkimextern UINT8 AcpiGbl_CreateOsiMethod; 144193267Sjkimextern UINT8 AcpiGbl_LeaveWakeGpesDisabled; 145193267Sjkimextern UINT8 AcpiGbl_UseDefaultRegisterWidths; 146193267Sjkimextern ACPI_NAME AcpiGbl_TraceMethodName; 147193267Sjkimextern UINT32 AcpiGbl_TraceFlags; 148204773Sjkimextern UINT8 AcpiGbl_EnableAmlDebugObject; 149206117Sjkimextern UINT8 AcpiGbl_CopyDsdtLocally; 150209746Sjkimextern UINT8 AcpiGbl_TruncateIoAddresses; 151193267Sjkim 152193267Sjkim 153151937Sjkim/* 15467754Smsmith * Global interfaces 15567754Smsmith */ 15667754SmsmithACPI_STATUS 157167802SjkimAcpiInitializeTables ( 158167802Sjkim ACPI_TABLE_DESC *InitialStorage, 159167802Sjkim UINT32 InitialTableCount, 160167802Sjkim BOOLEAN AllowResize); 161167802Sjkim 162167802SjkimACPI_STATUS 16367754SmsmithAcpiInitializeSubsystem ( 16467754Smsmith void); 16567754Smsmith 16667754SmsmithACPI_STATUS 16767754SmsmithAcpiEnableSubsystem ( 16867754Smsmith UINT32 Flags); 16967754Smsmith 17067754SmsmithACPI_STATUS 171100966SiwasakiAcpiInitializeObjects ( 172100966Siwasaki UINT32 Flags); 173100966Siwasaki 174100966SiwasakiACPI_STATUS 17567754SmsmithAcpiTerminate ( 17667754Smsmith void); 17767754Smsmith 17867754SmsmithACPI_STATUS 17980062SmsmithAcpiSubsystemStatus ( 18080062Smsmith void); 18180062Smsmith 18280062SmsmithACPI_STATUS 18367754SmsmithAcpiEnable ( 18467754Smsmith void); 18567754Smsmith 18667754SmsmithACPI_STATUS 18767754SmsmithAcpiDisable ( 18867754Smsmith void); 18967754Smsmith 19067754SmsmithACPI_STATUS 19180062SmsmithAcpiGetSystemInfo ( 19267754Smsmith ACPI_BUFFER *RetBuffer); 19367754Smsmith 194193267SjkimACPI_STATUS 195193267SjkimAcpiGetStatistics ( 196193267Sjkim ACPI_STATISTICS *Stats); 197193267Sjkim 19880062Smsmithconst char * 19967754SmsmithAcpiFormatException ( 20080062Smsmith ACPI_STATUS Exception); 20167754Smsmith 20287031SmsmithACPI_STATUS 20387031SmsmithAcpiPurgeCachedObjects ( 20487031Smsmith void); 20567754Smsmith 206210976SjkimACPI_STATUS 207210976SjkimAcpiInstallInterface ( 208210976Sjkim ACPI_STRING InterfaceName); 20987031Smsmith 210210976SjkimACPI_STATUS 211210976SjkimAcpiRemoveInterface ( 212210976Sjkim ACPI_STRING InterfaceName); 213210976Sjkim 21467754Smsmith/* 215210976Sjkim * ACPI Memory management 21677424Smsmith */ 21777424Smsmithvoid * 21877424SmsmithAcpiAllocate ( 21977424Smsmith UINT32 Size); 22077424Smsmith 22177424Smsmithvoid * 22277424SmsmithAcpiCallocate ( 22377424Smsmith UINT32 Size); 22477424Smsmith 22577424Smsmithvoid 22677424SmsmithAcpiFree ( 22777424Smsmith void *Address); 22877424Smsmith 22977424Smsmith 23077424Smsmith/* 23167754Smsmith * ACPI table manipulation interfaces 23267754Smsmith */ 23367754SmsmithACPI_STATUS 234167802SjkimAcpiReallocateRootTable ( 235167802Sjkim void); 236167802Sjkim 237167802SjkimACPI_STATUS 23867754SmsmithAcpiFindRootPointer ( 239193267Sjkim ACPI_SIZE *RsdpAddress); 24067754Smsmith 24167754SmsmithACPI_STATUS 24267754SmsmithAcpiLoadTables ( 24380062Smsmith void); 24467754Smsmith 24567754SmsmithACPI_STATUS 24667754SmsmithAcpiGetTableHeader ( 247167802Sjkim ACPI_STRING Signature, 248193267Sjkim UINT32 Instance, 24967754Smsmith ACPI_TABLE_HEADER *OutTableHeader); 25067754Smsmith 25167754SmsmithACPI_STATUS 25267754SmsmithAcpiGetTable ( 253167802Sjkim ACPI_STRING Signature, 254193267Sjkim UINT32 Instance, 255167802Sjkim ACPI_TABLE_HEADER **OutTable); 25667754Smsmith 25778986SmsmithACPI_STATUS 258167802SjkimAcpiGetTableByIndex ( 259193267Sjkim UINT32 TableIndex, 260167802Sjkim ACPI_TABLE_HEADER **OutTable); 26167754Smsmith 262193267SjkimACPI_STATUS 263193267SjkimAcpiInstallTableHandler ( 264193267Sjkim ACPI_TABLE_HANDLER Handler, 265193267Sjkim void *Context); 26678986Smsmith 267193267SjkimACPI_STATUS 268193267SjkimAcpiRemoveTableHandler ( 269193267Sjkim ACPI_TABLE_HANDLER Handler); 270193267Sjkim 271193267Sjkim 27267754Smsmith/* 27367754Smsmith * Namespace and name interfaces 27467754Smsmith */ 27567754SmsmithACPI_STATUS 27667754SmsmithAcpiWalkNamespace ( 27767754Smsmith ACPI_OBJECT_TYPE Type, 27867754Smsmith ACPI_HANDLE StartObject, 27967754Smsmith UINT32 MaxDepth, 280199337Sjkim ACPI_WALK_CALLBACK PreOrderVisit, 281199337Sjkim ACPI_WALK_CALLBACK PostOrderVisit, 28267754Smsmith void *Context, 283114237Snjl void **ReturnValue); 28467754Smsmith 28567754SmsmithACPI_STATUS 28667754SmsmithAcpiGetDevices ( 287114237Snjl char *HID, 28877424Smsmith ACPI_WALK_CALLBACK UserFunction, 28967754Smsmith void *Context, 29067754Smsmith void **ReturnValue); 29167754Smsmith 29267754SmsmithACPI_STATUS 29367754SmsmithAcpiGetName ( 294207344Sjkim ACPI_HANDLE Object, 29567754Smsmith UINT32 NameType, 29667754Smsmith ACPI_BUFFER *RetPathPtr); 29767754Smsmith 29867754SmsmithACPI_STATUS 29967754SmsmithAcpiGetHandle ( 30067754Smsmith ACPI_HANDLE Parent, 30167754Smsmith ACPI_STRING Pathname, 30267754Smsmith ACPI_HANDLE *RetHandle); 30367754Smsmith 30487031SmsmithACPI_STATUS 30587031SmsmithAcpiAttachData ( 306207344Sjkim ACPI_HANDLE Object, 30787031Smsmith ACPI_OBJECT_HANDLER Handler, 30887031Smsmith void *Data); 30967754Smsmith 31087031SmsmithACPI_STATUS 31187031SmsmithAcpiDetachData ( 312207344Sjkim ACPI_HANDLE Object, 31387031Smsmith ACPI_OBJECT_HANDLER Handler); 31487031Smsmith 31587031SmsmithACPI_STATUS 31687031SmsmithAcpiGetData ( 317207344Sjkim ACPI_HANDLE Object, 31887031Smsmith ACPI_OBJECT_HANDLER Handler, 31987031Smsmith void **Data); 32087031Smsmith 321151937SjkimACPI_STATUS 322151937SjkimAcpiDebugTrace ( 323151937Sjkim char *Name, 324151937Sjkim UINT32 DebugLevel, 325151937Sjkim UINT32 DebugLayer, 326151937Sjkim UINT32 Flags); 32787031Smsmith 328151937Sjkim 32967754Smsmith/* 33067754Smsmith * Object manipulation and enumeration 33167754Smsmith */ 33267754SmsmithACPI_STATUS 33367754SmsmithAcpiEvaluateObject ( 33467754Smsmith ACPI_HANDLE Object, 33567754Smsmith ACPI_STRING Pathname, 33667754Smsmith ACPI_OBJECT_LIST *ParameterObjects, 33767754Smsmith ACPI_BUFFER *ReturnObjectBuffer); 33867754Smsmith 33967754SmsmithACPI_STATUS 34099679SiwasakiAcpiEvaluateObjectTyped ( 34199679Siwasaki ACPI_HANDLE Object, 34299679Siwasaki ACPI_STRING Pathname, 34399679Siwasaki ACPI_OBJECT_LIST *ExternalParams, 34499679Siwasaki ACPI_BUFFER *ReturnBuffer, 34599679Siwasaki ACPI_OBJECT_TYPE ReturnType); 34699679Siwasaki 34799679SiwasakiACPI_STATUS 34867754SmsmithAcpiGetObjectInfo ( 349207344Sjkim ACPI_HANDLE Object, 350197104Sjkim ACPI_DEVICE_INFO **ReturnBuffer); 35167754Smsmith 35267754SmsmithACPI_STATUS 353193267SjkimAcpiInstallMethod ( 354193267Sjkim UINT8 *Buffer); 355193267Sjkim 356193267SjkimACPI_STATUS 35767754SmsmithAcpiGetNextObject ( 35867754Smsmith ACPI_OBJECT_TYPE Type, 35967754Smsmith ACPI_HANDLE Parent, 36067754Smsmith ACPI_HANDLE Child, 36167754Smsmith ACPI_HANDLE *OutHandle); 36267754Smsmith 36367754SmsmithACPI_STATUS 36467754SmsmithAcpiGetType ( 36567754Smsmith ACPI_HANDLE Object, 36667754Smsmith ACPI_OBJECT_TYPE *OutType); 36767754Smsmith 36867754SmsmithACPI_STATUS 36967754SmsmithAcpiGetParent ( 37067754Smsmith ACPI_HANDLE Object, 37167754Smsmith ACPI_HANDLE *OutHandle); 37267754Smsmith 37367754Smsmith 37467754Smsmith/* 375193267Sjkim * Handler interfaces 37667754Smsmith */ 37767754SmsmithACPI_STATUS 378193267SjkimAcpiInstallInitializationHandler ( 379193267Sjkim ACPI_INIT_HANDLER Handler, 380193267Sjkim UINT32 Function); 381193267Sjkim 382193267SjkimACPI_STATUS 38367754SmsmithAcpiInstallFixedEventHandler ( 38467754Smsmith UINT32 AcpiEvent, 38577424Smsmith ACPI_EVENT_HANDLER Handler, 38667754Smsmith void *Context); 38767754Smsmith 38867754SmsmithACPI_STATUS 38967754SmsmithAcpiRemoveFixedEventHandler ( 39067754Smsmith UINT32 AcpiEvent, 39177424Smsmith ACPI_EVENT_HANDLER Handler); 39267754Smsmith 39367754SmsmithACPI_STATUS 39467754SmsmithAcpiInstallNotifyHandler ( 39567754Smsmith ACPI_HANDLE Device, 39667754Smsmith UINT32 HandlerType, 39777424Smsmith ACPI_NOTIFY_HANDLER Handler, 39867754Smsmith void *Context); 39967754Smsmith 40067754SmsmithACPI_STATUS 40167754SmsmithAcpiRemoveNotifyHandler ( 40267754Smsmith ACPI_HANDLE Device, 40367754Smsmith UINT32 HandlerType, 40477424Smsmith ACPI_NOTIFY_HANDLER Handler); 40567754Smsmith 40667754SmsmithACPI_STATUS 40767754SmsmithAcpiInstallAddressSpaceHandler ( 40867754Smsmith ACPI_HANDLE Device, 40977424Smsmith ACPI_ADR_SPACE_TYPE SpaceId, 41077424Smsmith ACPI_ADR_SPACE_HANDLER Handler, 41177424Smsmith ACPI_ADR_SPACE_SETUP Setup, 41267754Smsmith void *Context); 41367754Smsmith 41467754SmsmithACPI_STATUS 41567754SmsmithAcpiRemoveAddressSpaceHandler ( 41667754Smsmith ACPI_HANDLE Device, 41777424Smsmith ACPI_ADR_SPACE_TYPE SpaceId, 41877424Smsmith ACPI_ADR_SPACE_HANDLER Handler); 41967754Smsmith 42067754SmsmithACPI_STATUS 42167754SmsmithAcpiInstallGpeHandler ( 422117521Snjl ACPI_HANDLE GpeDevice, 42367754Smsmith UINT32 GpeNumber, 42467754Smsmith UINT32 Type, 425129684Snjl ACPI_EVENT_HANDLER Address, 42667754Smsmith void *Context); 42767754Smsmith 42867754SmsmithACPI_STATUS 429193267SjkimAcpiRemoveGpeHandler ( 430193267Sjkim ACPI_HANDLE GpeDevice, 431193267Sjkim UINT32 GpeNumber, 432193267Sjkim ACPI_EVENT_HANDLER Address); 433193267Sjkim 434193267SjkimACPI_STATUS 435138287SmarksAcpiInstallExceptionHandler ( 436138287Smarks ACPI_EXCEPTION_HANDLER Handler); 437138287Smarks 438210976SjkimACPI_STATUS 439210976SjkimAcpiInstallInterfaceHandler ( 440210976Sjkim ACPI_INTERFACE_HANDLER Handler); 441138287Smarks 442210976Sjkim 443138287Smarks/* 444138287Smarks * Event interfaces 445138287Smarks */ 446138287SmarksACPI_STATUS 44767754SmsmithAcpiAcquireGlobalLock ( 448107325Siwasaki UINT16 Timeout, 44991116Smsmith UINT32 *Handle); 45067754Smsmith 45167754SmsmithACPI_STATUS 45267754SmsmithAcpiReleaseGlobalLock ( 45391116Smsmith UINT32 Handle); 45467754Smsmith 45567754SmsmithACPI_STATUS 45667754SmsmithAcpiEnableEvent ( 457117521Snjl UINT32 Event, 45884491Smsmith UINT32 Flags); 45967754Smsmith 46067754SmsmithACPI_STATUS 46167754SmsmithAcpiDisableEvent ( 462117521Snjl UINT32 Event, 46384491Smsmith UINT32 Flags); 46467754Smsmith 46567754SmsmithACPI_STATUS 46667754SmsmithAcpiClearEvent ( 467117521Snjl UINT32 Event); 46867754Smsmith 46967754SmsmithACPI_STATUS 47067754SmsmithAcpiGetEventStatus ( 471117521Snjl UINT32 Event, 47267754Smsmith ACPI_EVENT_STATUS *EventStatus); 47367754Smsmith 474193267Sjkim 475193267Sjkim/* 476193267Sjkim * GPE Interfaces 477193267Sjkim */ 478117521SnjlACPI_STATUS 479206117SjkimAcpiSetGpe ( 480129684Snjl ACPI_HANDLE GpeDevice, 481129684Snjl UINT32 GpeNumber, 482206117Sjkim UINT8 Action); 483129684Snjl 484129684SnjlACPI_STATUS 485117521SnjlAcpiEnableGpe ( 486117521Snjl ACPI_HANDLE GpeDevice, 487209746Sjkim UINT32 GpeNumber); 488117521Snjl 489117521SnjlACPI_STATUS 490117521SnjlAcpiDisableGpe ( 491117521Snjl ACPI_HANDLE GpeDevice, 492209746Sjkim UINT32 GpeNumber); 493117521Snjl 494117521SnjlACPI_STATUS 495117521SnjlAcpiClearGpe ( 496117521Snjl ACPI_HANDLE GpeDevice, 497206117Sjkim UINT32 GpeNumber); 498117521Snjl 499117521SnjlACPI_STATUS 500209746SjkimAcpiGpeWakeup ( 501209746Sjkim ACPI_HANDLE GpeDevice, 502209746Sjkim UINT32 GpeNumber, 503209746Sjkim UINT8 Action); 504209746Sjkim 505209746SjkimACPI_STATUS 506117521SnjlAcpiGetGpeStatus ( 507117521Snjl ACPI_HANDLE GpeDevice, 508117521Snjl UINT32 GpeNumber, 509117521Snjl ACPI_EVENT_STATUS *EventStatus); 510117521Snjl 511117521SnjlACPI_STATUS 512193267SjkimAcpiDisableAllGpes ( 513193267Sjkim void); 514193267Sjkim 515193267SjkimACPI_STATUS 516193267SjkimAcpiEnableAllRuntimeGpes ( 517193267Sjkim void); 518193267Sjkim 519193267SjkimACPI_STATUS 520193267SjkimAcpiGetGpeDevice ( 521193267Sjkim UINT32 GpeIndex, 522193267Sjkim ACPI_HANDLE *GpeDevice); 523193267Sjkim 524193267SjkimACPI_STATUS 525117521SnjlAcpiInstallGpeBlock ( 526117521Snjl ACPI_HANDLE GpeDevice, 527117521Snjl ACPI_GENERIC_ADDRESS *GpeBlockAddress, 528117521Snjl UINT32 RegisterCount, 529151937Sjkim UINT32 InterruptNumber); 530117521Snjl 531117521SnjlACPI_STATUS 532117521SnjlAcpiRemoveGpeBlock ( 533117521Snjl ACPI_HANDLE GpeDevice); 534117521Snjl 535117521Snjl 53667754Smsmith/* 53767754Smsmith * Resource interfaces 53867754Smsmith */ 539114237Snjltypedef 540114237SnjlACPI_STATUS (*ACPI_WALK_RESOURCE_CALLBACK) ( 541114237Snjl ACPI_RESOURCE *Resource, 542114237Snjl void *Context); 543114237Snjl 544167802SjkimACPI_STATUS 545167802SjkimAcpiGetVendorResource ( 546207344Sjkim ACPI_HANDLE Device, 547167802Sjkim char *Name, 548167802Sjkim ACPI_VENDOR_UUID *Uuid, 549167802Sjkim ACPI_BUFFER *RetBuffer); 550114237Snjl 55167754SmsmithACPI_STATUS 552207344SjkimAcpiGetCurrentResources ( 553207344Sjkim ACPI_HANDLE Device, 55467754Smsmith ACPI_BUFFER *RetBuffer); 55567754Smsmith 55667754SmsmithACPI_STATUS 557207344SjkimAcpiGetPossibleResources ( 558207344Sjkim ACPI_HANDLE Device, 55967754Smsmith ACPI_BUFFER *RetBuffer); 56067754Smsmith 56167754SmsmithACPI_STATUS 562114237SnjlAcpiWalkResources ( 563207344Sjkim ACPI_HANDLE Device, 564167802Sjkim char *Name, 565167802Sjkim ACPI_WALK_RESOURCE_CALLBACK UserFunction, 566167802Sjkim void *Context); 567114237Snjl 568114237SnjlACPI_STATUS 56967754SmsmithAcpiSetCurrentResources ( 570207344Sjkim ACPI_HANDLE Device, 57167754Smsmith ACPI_BUFFER *InBuffer); 57267754Smsmith 57367754SmsmithACPI_STATUS 574207344SjkimAcpiGetIrqRoutingTable ( 575207344Sjkim ACPI_HANDLE Device, 57667754Smsmith ACPI_BUFFER *RetBuffer); 57767754Smsmith 578114237SnjlACPI_STATUS 579114237SnjlAcpiResourceToAddress64 ( 580114237Snjl ACPI_RESOURCE *Resource, 581114237Snjl ACPI_RESOURCE_ADDRESS64 *Out); 58267754Smsmith 583193267Sjkim 58467754Smsmith/* 58567754Smsmith * Hardware (ACPI device) interfaces 58667754Smsmith */ 58767754SmsmithACPI_STATUS 588193267SjkimAcpiReset ( 589193267Sjkim void); 590193267Sjkim 591193267SjkimACPI_STATUS 592193267SjkimAcpiRead ( 593197104Sjkim UINT64 *Value, 594193267Sjkim ACPI_GENERIC_ADDRESS *Reg); 595193267Sjkim 596193267SjkimACPI_STATUS 597193267SjkimAcpiWrite ( 598197104Sjkim UINT64 Value, 599193267Sjkim ACPI_GENERIC_ADDRESS *Reg); 600193267Sjkim 601193267SjkimACPI_STATUS 602193267SjkimAcpiReadBitRegister ( 60399679Siwasaki UINT32 RegisterId, 604167802Sjkim UINT32 *ReturnValue); 60599679Siwasaki 60699679SiwasakiACPI_STATUS 607193267SjkimAcpiWriteBitRegister ( 60899679Siwasaki UINT32 RegisterId, 609167802Sjkim UINT32 Value); 61099679Siwasaki 61199679SiwasakiACPI_STATUS 61299679SiwasakiAcpiGetSleepTypeData ( 61399679Siwasaki UINT8 SleepState, 61499679Siwasaki UINT8 *Slp_TypA, 61599679Siwasaki UINT8 *Slp_TypB); 61687031Smsmith 61767754SmsmithACPI_STATUS 61887031SmsmithAcpiEnterSleepStatePrep ( 61999679Siwasaki UINT8 SleepState); 62087031Smsmith 62187031SmsmithACPI_STATUS 62271867SmsmithAcpiEnterSleepState ( 62399679Siwasaki UINT8 SleepState); 62471867Smsmith 62571867SmsmithACPI_STATUS 626114237SnjlAcpiEnterSleepStateS4bios ( 627114237Snjl void); 628114237Snjl 629114237SnjlACPI_STATUS 63082367SmsmithAcpiLeaveSleepState ( 631193267Sjkim UINT8 SleepState) 632193267Sjkim ; 633193267SjkimACPI_STATUS 634193267SjkimAcpiSetFirmwareWakingVector ( 635193267Sjkim UINT32 PhysicalAddress); 63667754Smsmith 637193267Sjkim#if ACPI_MACHINE_WIDTH == 64 638193267SjkimACPI_STATUS 639193267SjkimAcpiSetFirmwareWakingVector64 ( 640193267Sjkim UINT64 PhysicalAddress); 641193267Sjkim#endif 64299679Siwasaki 643193267Sjkim 644193267Sjkim/* 645193267Sjkim * Error/Warning output 646193267Sjkim */ 647193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE 648193267SjkimAcpiError ( 649193267Sjkim const char *ModuleName, 650193267Sjkim UINT32 LineNumber, 651193267Sjkim const char *Format, 652193267Sjkim ...) ACPI_PRINTF_LIKE(3); 653193267Sjkim 654193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE 655193267SjkimAcpiException ( 656193267Sjkim const char *ModuleName, 657193267Sjkim UINT32 LineNumber, 658193267Sjkim ACPI_STATUS Status, 659193267Sjkim const char *Format, 660193267Sjkim ...) ACPI_PRINTF_LIKE(4); 661193267Sjkim 662193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE 663193267SjkimAcpiWarning ( 664193267Sjkim const char *ModuleName, 665193267Sjkim UINT32 LineNumber, 666193267Sjkim const char *Format, 667193267Sjkim ...) ACPI_PRINTF_LIKE(3); 668193267Sjkim 669193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE 670193267SjkimAcpiInfo ( 671193267Sjkim const char *ModuleName, 672193267Sjkim UINT32 LineNumber, 673193267Sjkim const char *Format, 674193267Sjkim ...) ACPI_PRINTF_LIKE(3); 675193267Sjkim 676193267Sjkim 677193267Sjkim/* 678193267Sjkim * Debug output 679193267Sjkim */ 680193267Sjkim#ifdef ACPI_DEBUG_OUTPUT 681193267Sjkim 682193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE 683193267SjkimAcpiDebugPrint ( 684193267Sjkim UINT32 RequestedDebugLevel, 685193267Sjkim UINT32 LineNumber, 686193267Sjkim const char *FunctionName, 687193267Sjkim const char *ModuleName, 688193267Sjkim UINT32 ComponentId, 689193267Sjkim const char *Format, 690193267Sjkim ...) ACPI_PRINTF_LIKE(6); 691193267Sjkim 692193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE 693193267SjkimAcpiDebugPrintRaw ( 694193267Sjkim UINT32 RequestedDebugLevel, 695193267Sjkim UINT32 LineNumber, 696193267Sjkim const char *FunctionName, 697193267Sjkim const char *ModuleName, 698193267Sjkim UINT32 ComponentId, 699193267Sjkim const char *Format, 700193267Sjkim ...) ACPI_PRINTF_LIKE(6); 701193267Sjkim#endif 702193267Sjkim 70367754Smsmith#endif /* __ACXFACE_H__ */ 704