acpixf.h revision 204773
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 123204773Sjkim#define ACPI_CA_VERSION 0x20100304 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; 149193267Sjkim 150193267Sjkim 151151937Sjkim/* 15267754Smsmith * Global interfaces 15367754Smsmith */ 15467754SmsmithACPI_STATUS 155167802SjkimAcpiInitializeTables ( 156167802Sjkim ACPI_TABLE_DESC *InitialStorage, 157167802Sjkim UINT32 InitialTableCount, 158167802Sjkim BOOLEAN AllowResize); 159167802Sjkim 160167802SjkimACPI_STATUS 16167754SmsmithAcpiInitializeSubsystem ( 16267754Smsmith void); 16367754Smsmith 16467754SmsmithACPI_STATUS 16567754SmsmithAcpiEnableSubsystem ( 16667754Smsmith UINT32 Flags); 16767754Smsmith 16867754SmsmithACPI_STATUS 169100966SiwasakiAcpiInitializeObjects ( 170100966Siwasaki UINT32 Flags); 171100966Siwasaki 172100966SiwasakiACPI_STATUS 17367754SmsmithAcpiTerminate ( 17467754Smsmith void); 17567754Smsmith 17667754SmsmithACPI_STATUS 17780062SmsmithAcpiSubsystemStatus ( 17880062Smsmith void); 17980062Smsmith 18080062SmsmithACPI_STATUS 18167754SmsmithAcpiEnable ( 18267754Smsmith void); 18367754Smsmith 18467754SmsmithACPI_STATUS 18567754SmsmithAcpiDisable ( 18667754Smsmith void); 18767754Smsmith 18867754SmsmithACPI_STATUS 18980062SmsmithAcpiGetSystemInfo ( 19067754Smsmith ACPI_BUFFER *RetBuffer); 19167754Smsmith 192193267SjkimACPI_STATUS 193193267SjkimAcpiGetStatistics ( 194193267Sjkim ACPI_STATISTICS *Stats); 195193267Sjkim 19680062Smsmithconst char * 19767754SmsmithAcpiFormatException ( 19880062Smsmith ACPI_STATUS Exception); 19967754Smsmith 20087031SmsmithACPI_STATUS 20187031SmsmithAcpiPurgeCachedObjects ( 20287031Smsmith void); 20367754Smsmith 20487031Smsmith 20567754Smsmith/* 206151937Sjkim * ACPI Memory managment 20777424Smsmith */ 20877424Smsmithvoid * 20977424SmsmithAcpiAllocate ( 21077424Smsmith UINT32 Size); 21177424Smsmith 21277424Smsmithvoid * 21377424SmsmithAcpiCallocate ( 21477424Smsmith UINT32 Size); 21577424Smsmith 21677424Smsmithvoid 21777424SmsmithAcpiFree ( 21877424Smsmith void *Address); 21977424Smsmith 22077424Smsmith 22177424Smsmith/* 22267754Smsmith * ACPI table manipulation interfaces 22367754Smsmith */ 22467754SmsmithACPI_STATUS 225167802SjkimAcpiReallocateRootTable ( 226167802Sjkim void); 227167802Sjkim 228167802SjkimACPI_STATUS 22967754SmsmithAcpiFindRootPointer ( 230193267Sjkim ACPI_SIZE *RsdpAddress); 23167754Smsmith 23267754SmsmithACPI_STATUS 23367754SmsmithAcpiLoadTables ( 23480062Smsmith void); 23567754Smsmith 23667754SmsmithACPI_STATUS 23767754SmsmithAcpiGetTableHeader ( 238167802Sjkim ACPI_STRING Signature, 239193267Sjkim UINT32 Instance, 24067754Smsmith ACPI_TABLE_HEADER *OutTableHeader); 24167754Smsmith 24267754SmsmithACPI_STATUS 24367754SmsmithAcpiGetTable ( 244167802Sjkim ACPI_STRING Signature, 245193267Sjkim UINT32 Instance, 246167802Sjkim ACPI_TABLE_HEADER **OutTable); 24767754Smsmith 24878986SmsmithACPI_STATUS 249167802SjkimAcpiGetTableByIndex ( 250193267Sjkim UINT32 TableIndex, 251167802Sjkim ACPI_TABLE_HEADER **OutTable); 25267754Smsmith 253193267SjkimACPI_STATUS 254193267SjkimAcpiInstallTableHandler ( 255193267Sjkim ACPI_TABLE_HANDLER Handler, 256193267Sjkim void *Context); 25778986Smsmith 258193267SjkimACPI_STATUS 259193267SjkimAcpiRemoveTableHandler ( 260193267Sjkim ACPI_TABLE_HANDLER Handler); 261193267Sjkim 262193267Sjkim 26367754Smsmith/* 26467754Smsmith * Namespace and name interfaces 26567754Smsmith */ 26667754SmsmithACPI_STATUS 26767754SmsmithAcpiWalkNamespace ( 26867754Smsmith ACPI_OBJECT_TYPE Type, 26967754Smsmith ACPI_HANDLE StartObject, 27067754Smsmith UINT32 MaxDepth, 271199337Sjkim ACPI_WALK_CALLBACK PreOrderVisit, 272199337Sjkim ACPI_WALK_CALLBACK PostOrderVisit, 27367754Smsmith void *Context, 274114237Snjl void **ReturnValue); 27567754Smsmith 27667754SmsmithACPI_STATUS 27767754SmsmithAcpiGetDevices ( 278114237Snjl char *HID, 27977424Smsmith ACPI_WALK_CALLBACK UserFunction, 28067754Smsmith void *Context, 28167754Smsmith void **ReturnValue); 28267754Smsmith 28367754SmsmithACPI_STATUS 28467754SmsmithAcpiGetName ( 28567754Smsmith ACPI_HANDLE Handle, 28667754Smsmith UINT32 NameType, 28767754Smsmith ACPI_BUFFER *RetPathPtr); 28867754Smsmith 28967754SmsmithACPI_STATUS 29067754SmsmithAcpiGetHandle ( 29167754Smsmith ACPI_HANDLE Parent, 29267754Smsmith ACPI_STRING Pathname, 29367754Smsmith ACPI_HANDLE *RetHandle); 29467754Smsmith 29587031SmsmithACPI_STATUS 29687031SmsmithAcpiAttachData ( 29787031Smsmith ACPI_HANDLE ObjHandle, 29887031Smsmith ACPI_OBJECT_HANDLER Handler, 29987031Smsmith void *Data); 30067754Smsmith 30187031SmsmithACPI_STATUS 30287031SmsmithAcpiDetachData ( 30387031Smsmith ACPI_HANDLE ObjHandle, 30487031Smsmith ACPI_OBJECT_HANDLER Handler); 30587031Smsmith 30687031SmsmithACPI_STATUS 30787031SmsmithAcpiGetData ( 30887031Smsmith ACPI_HANDLE ObjHandle, 30987031Smsmith ACPI_OBJECT_HANDLER Handler, 31087031Smsmith void **Data); 31187031Smsmith 312151937SjkimACPI_STATUS 313151937SjkimAcpiDebugTrace ( 314151937Sjkim char *Name, 315151937Sjkim UINT32 DebugLevel, 316151937Sjkim UINT32 DebugLayer, 317151937Sjkim UINT32 Flags); 31887031Smsmith 319151937Sjkim 32067754Smsmith/* 32167754Smsmith * Object manipulation and enumeration 32267754Smsmith */ 32367754SmsmithACPI_STATUS 32467754SmsmithAcpiEvaluateObject ( 32567754Smsmith ACPI_HANDLE Object, 32667754Smsmith ACPI_STRING Pathname, 32767754Smsmith ACPI_OBJECT_LIST *ParameterObjects, 32867754Smsmith ACPI_BUFFER *ReturnObjectBuffer); 32967754Smsmith 33067754SmsmithACPI_STATUS 33199679SiwasakiAcpiEvaluateObjectTyped ( 33299679Siwasaki ACPI_HANDLE Object, 33399679Siwasaki ACPI_STRING Pathname, 33499679Siwasaki ACPI_OBJECT_LIST *ExternalParams, 33599679Siwasaki ACPI_BUFFER *ReturnBuffer, 33699679Siwasaki ACPI_OBJECT_TYPE ReturnType); 33799679Siwasaki 33899679SiwasakiACPI_STATUS 33967754SmsmithAcpiGetObjectInfo ( 340117521Snjl ACPI_HANDLE Handle, 341197104Sjkim ACPI_DEVICE_INFO **ReturnBuffer); 34267754Smsmith 34367754SmsmithACPI_STATUS 344193267SjkimAcpiInstallMethod ( 345193267Sjkim UINT8 *Buffer); 346193267Sjkim 347193267SjkimACPI_STATUS 34867754SmsmithAcpiGetNextObject ( 34967754Smsmith ACPI_OBJECT_TYPE Type, 35067754Smsmith ACPI_HANDLE Parent, 35167754Smsmith ACPI_HANDLE Child, 35267754Smsmith ACPI_HANDLE *OutHandle); 35367754Smsmith 35467754SmsmithACPI_STATUS 35567754SmsmithAcpiGetType ( 35667754Smsmith ACPI_HANDLE Object, 35767754Smsmith ACPI_OBJECT_TYPE *OutType); 35867754Smsmith 35967754SmsmithACPI_STATUS 36067754SmsmithAcpiGetParent ( 36167754Smsmith ACPI_HANDLE Object, 36267754Smsmith ACPI_HANDLE *OutHandle); 36367754Smsmith 36467754Smsmith 36567754Smsmith/* 366193267Sjkim * Handler interfaces 36767754Smsmith */ 36867754SmsmithACPI_STATUS 369193267SjkimAcpiInstallInitializationHandler ( 370193267Sjkim ACPI_INIT_HANDLER Handler, 371193267Sjkim UINT32 Function); 372193267Sjkim 373193267SjkimACPI_STATUS 37467754SmsmithAcpiInstallFixedEventHandler ( 37567754Smsmith UINT32 AcpiEvent, 37677424Smsmith ACPI_EVENT_HANDLER Handler, 37767754Smsmith void *Context); 37867754Smsmith 37967754SmsmithACPI_STATUS 38067754SmsmithAcpiRemoveFixedEventHandler ( 38167754Smsmith UINT32 AcpiEvent, 38277424Smsmith ACPI_EVENT_HANDLER Handler); 38367754Smsmith 38467754SmsmithACPI_STATUS 38567754SmsmithAcpiInstallNotifyHandler ( 38667754Smsmith ACPI_HANDLE Device, 38767754Smsmith UINT32 HandlerType, 38877424Smsmith ACPI_NOTIFY_HANDLER Handler, 38967754Smsmith void *Context); 39067754Smsmith 39167754SmsmithACPI_STATUS 39267754SmsmithAcpiRemoveNotifyHandler ( 39367754Smsmith ACPI_HANDLE Device, 39467754Smsmith UINT32 HandlerType, 39577424Smsmith ACPI_NOTIFY_HANDLER Handler); 39667754Smsmith 39767754SmsmithACPI_STATUS 39867754SmsmithAcpiInstallAddressSpaceHandler ( 39967754Smsmith ACPI_HANDLE Device, 40077424Smsmith ACPI_ADR_SPACE_TYPE SpaceId, 40177424Smsmith ACPI_ADR_SPACE_HANDLER Handler, 40277424Smsmith ACPI_ADR_SPACE_SETUP Setup, 40367754Smsmith void *Context); 40467754Smsmith 40567754SmsmithACPI_STATUS 40667754SmsmithAcpiRemoveAddressSpaceHandler ( 40767754Smsmith ACPI_HANDLE Device, 40877424Smsmith ACPI_ADR_SPACE_TYPE SpaceId, 40977424Smsmith ACPI_ADR_SPACE_HANDLER Handler); 41067754Smsmith 41167754SmsmithACPI_STATUS 41267754SmsmithAcpiInstallGpeHandler ( 413117521Snjl ACPI_HANDLE GpeDevice, 41467754Smsmith UINT32 GpeNumber, 41567754Smsmith UINT32 Type, 416129684Snjl ACPI_EVENT_HANDLER Address, 41767754Smsmith void *Context); 41867754Smsmith 41967754SmsmithACPI_STATUS 420193267SjkimAcpiRemoveGpeHandler ( 421193267Sjkim ACPI_HANDLE GpeDevice, 422193267Sjkim UINT32 GpeNumber, 423193267Sjkim ACPI_EVENT_HANDLER Address); 424193267Sjkim 425193267SjkimACPI_STATUS 426138287SmarksAcpiInstallExceptionHandler ( 427138287Smarks ACPI_EXCEPTION_HANDLER Handler); 428138287Smarks 429138287Smarks 430138287Smarks/* 431138287Smarks * Event interfaces 432138287Smarks */ 433138287SmarksACPI_STATUS 43467754SmsmithAcpiAcquireGlobalLock ( 435107325Siwasaki UINT16 Timeout, 43691116Smsmith UINT32 *Handle); 43767754Smsmith 43867754SmsmithACPI_STATUS 43967754SmsmithAcpiReleaseGlobalLock ( 44091116Smsmith UINT32 Handle); 44167754Smsmith 44267754SmsmithACPI_STATUS 44367754SmsmithAcpiEnableEvent ( 444117521Snjl UINT32 Event, 44584491Smsmith UINT32 Flags); 44667754Smsmith 44767754SmsmithACPI_STATUS 44867754SmsmithAcpiDisableEvent ( 449117521Snjl UINT32 Event, 45084491Smsmith UINT32 Flags); 45167754Smsmith 45267754SmsmithACPI_STATUS 45367754SmsmithAcpiClearEvent ( 454117521Snjl UINT32 Event); 45567754Smsmith 45667754SmsmithACPI_STATUS 45767754SmsmithAcpiGetEventStatus ( 458117521Snjl UINT32 Event, 45967754Smsmith ACPI_EVENT_STATUS *EventStatus); 46067754Smsmith 461193267Sjkim 462193267Sjkim/* 463193267Sjkim * GPE Interfaces 464193267Sjkim */ 465117521SnjlACPI_STATUS 466129684SnjlAcpiSetGpeType ( 467129684Snjl ACPI_HANDLE GpeDevice, 468129684Snjl UINT32 GpeNumber, 469129684Snjl UINT8 Type); 470129684Snjl 471129684SnjlACPI_STATUS 472117521SnjlAcpiEnableGpe ( 473117521Snjl ACPI_HANDLE GpeDevice, 474117521Snjl UINT32 GpeNumber, 475117521Snjl UINT32 Flags); 476117521Snjl 477117521SnjlACPI_STATUS 478117521SnjlAcpiDisableGpe ( 479117521Snjl ACPI_HANDLE GpeDevice, 480117521Snjl UINT32 GpeNumber, 481117521Snjl UINT32 Flags); 482117521Snjl 483117521SnjlACPI_STATUS 484117521SnjlAcpiClearGpe ( 485117521Snjl ACPI_HANDLE GpeDevice, 486117521Snjl UINT32 GpeNumber, 487117521Snjl UINT32 Flags); 488117521Snjl 489117521SnjlACPI_STATUS 490117521SnjlAcpiGetGpeStatus ( 491117521Snjl ACPI_HANDLE GpeDevice, 492117521Snjl UINT32 GpeNumber, 493117521Snjl UINT32 Flags, 494117521Snjl ACPI_EVENT_STATUS *EventStatus); 495117521Snjl 496117521SnjlACPI_STATUS 497193267SjkimAcpiDisableAllGpes ( 498193267Sjkim void); 499193267Sjkim 500193267SjkimACPI_STATUS 501193267SjkimAcpiEnableAllRuntimeGpes ( 502193267Sjkim void); 503193267Sjkim 504193267SjkimACPI_STATUS 505193267SjkimAcpiGetGpeDevice ( 506193267Sjkim UINT32 GpeIndex, 507193267Sjkim ACPI_HANDLE *GpeDevice); 508193267Sjkim 509193267SjkimACPI_STATUS 510117521SnjlAcpiInstallGpeBlock ( 511117521Snjl ACPI_HANDLE GpeDevice, 512117521Snjl ACPI_GENERIC_ADDRESS *GpeBlockAddress, 513117521Snjl UINT32 RegisterCount, 514151937Sjkim UINT32 InterruptNumber); 515117521Snjl 516117521SnjlACPI_STATUS 517117521SnjlAcpiRemoveGpeBlock ( 518117521Snjl ACPI_HANDLE GpeDevice); 519117521Snjl 520117521Snjl 52167754Smsmith/* 52267754Smsmith * Resource interfaces 52367754Smsmith */ 524114237Snjltypedef 525114237SnjlACPI_STATUS (*ACPI_WALK_RESOURCE_CALLBACK) ( 526114237Snjl ACPI_RESOURCE *Resource, 527114237Snjl void *Context); 528114237Snjl 529167802SjkimACPI_STATUS 530167802SjkimAcpiGetVendorResource ( 531167802Sjkim ACPI_HANDLE DeviceHandle, 532167802Sjkim char *Name, 533167802Sjkim ACPI_VENDOR_UUID *Uuid, 534167802Sjkim ACPI_BUFFER *RetBuffer); 535114237Snjl 53667754SmsmithACPI_STATUS 53767754SmsmithAcpiGetCurrentResources( 53867754Smsmith ACPI_HANDLE DeviceHandle, 53967754Smsmith ACPI_BUFFER *RetBuffer); 54067754Smsmith 54167754SmsmithACPI_STATUS 54267754SmsmithAcpiGetPossibleResources( 54367754Smsmith ACPI_HANDLE DeviceHandle, 54467754Smsmith ACPI_BUFFER *RetBuffer); 54567754Smsmith 54667754SmsmithACPI_STATUS 547114237SnjlAcpiWalkResources ( 548167802Sjkim ACPI_HANDLE DeviceHandle, 549167802Sjkim char *Name, 550167802Sjkim ACPI_WALK_RESOURCE_CALLBACK UserFunction, 551167802Sjkim void *Context); 552114237Snjl 553114237SnjlACPI_STATUS 55467754SmsmithAcpiSetCurrentResources ( 55567754Smsmith ACPI_HANDLE DeviceHandle, 55667754Smsmith ACPI_BUFFER *InBuffer); 55767754Smsmith 55867754SmsmithACPI_STATUS 55967754SmsmithAcpiGetIrqRoutingTable ( 56067754Smsmith ACPI_HANDLE BusDeviceHandle, 56167754Smsmith ACPI_BUFFER *RetBuffer); 56267754Smsmith 563114237SnjlACPI_STATUS 564114237SnjlAcpiResourceToAddress64 ( 565114237Snjl ACPI_RESOURCE *Resource, 566114237Snjl ACPI_RESOURCE_ADDRESS64 *Out); 56767754Smsmith 568193267Sjkim 56967754Smsmith/* 57067754Smsmith * Hardware (ACPI device) interfaces 57167754Smsmith */ 57267754SmsmithACPI_STATUS 573193267SjkimAcpiReset ( 574193267Sjkim void); 575193267Sjkim 576193267SjkimACPI_STATUS 577193267SjkimAcpiRead ( 578197104Sjkim UINT64 *Value, 579193267Sjkim ACPI_GENERIC_ADDRESS *Reg); 580193267Sjkim 581193267SjkimACPI_STATUS 582193267SjkimAcpiWrite ( 583197104Sjkim UINT64 Value, 584193267Sjkim ACPI_GENERIC_ADDRESS *Reg); 585193267Sjkim 586193267SjkimACPI_STATUS 587193267SjkimAcpiReadBitRegister ( 58899679Siwasaki UINT32 RegisterId, 589167802Sjkim UINT32 *ReturnValue); 59099679Siwasaki 59199679SiwasakiACPI_STATUS 592193267SjkimAcpiWriteBitRegister ( 59399679Siwasaki UINT32 RegisterId, 594167802Sjkim UINT32 Value); 59599679Siwasaki 59699679SiwasakiACPI_STATUS 59799679SiwasakiAcpiGetSleepTypeData ( 59899679Siwasaki UINT8 SleepState, 59999679Siwasaki UINT8 *Slp_TypA, 60099679Siwasaki UINT8 *Slp_TypB); 60187031Smsmith 60267754SmsmithACPI_STATUS 60387031SmsmithAcpiEnterSleepStatePrep ( 60499679Siwasaki UINT8 SleepState); 60587031Smsmith 60687031SmsmithACPI_STATUS 60771867SmsmithAcpiEnterSleepState ( 60899679Siwasaki UINT8 SleepState); 60971867Smsmith 61071867SmsmithACPI_STATUS 611114237SnjlAcpiEnterSleepStateS4bios ( 612114237Snjl void); 613114237Snjl 614114237SnjlACPI_STATUS 61582367SmsmithAcpiLeaveSleepState ( 616193267Sjkim UINT8 SleepState) 617193267Sjkim ; 618193267SjkimACPI_STATUS 619193267SjkimAcpiSetFirmwareWakingVector ( 620193267Sjkim UINT32 PhysicalAddress); 62167754Smsmith 622193267Sjkim#if ACPI_MACHINE_WIDTH == 64 623193267SjkimACPI_STATUS 624193267SjkimAcpiSetFirmwareWakingVector64 ( 625193267Sjkim UINT64 PhysicalAddress); 626193267Sjkim#endif 62799679Siwasaki 628193267Sjkim 629193267Sjkim/* 630193267Sjkim * Error/Warning output 631193267Sjkim */ 632193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE 633193267SjkimAcpiError ( 634193267Sjkim const char *ModuleName, 635193267Sjkim UINT32 LineNumber, 636193267Sjkim const char *Format, 637193267Sjkim ...) ACPI_PRINTF_LIKE(3); 638193267Sjkim 639193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE 640193267SjkimAcpiException ( 641193267Sjkim const char *ModuleName, 642193267Sjkim UINT32 LineNumber, 643193267Sjkim ACPI_STATUS Status, 644193267Sjkim const char *Format, 645193267Sjkim ...) ACPI_PRINTF_LIKE(4); 646193267Sjkim 647193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE 648193267SjkimAcpiWarning ( 649193267Sjkim const char *ModuleName, 650193267Sjkim UINT32 LineNumber, 651193267Sjkim const char *Format, 652193267Sjkim ...) ACPI_PRINTF_LIKE(3); 653193267Sjkim 654193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE 655193267SjkimAcpiInfo ( 656193267Sjkim const char *ModuleName, 657193267Sjkim UINT32 LineNumber, 658193267Sjkim const char *Format, 659193267Sjkim ...) ACPI_PRINTF_LIKE(3); 660193267Sjkim 661193267Sjkim 662193267Sjkim/* 663193267Sjkim * Debug output 664193267Sjkim */ 665193267Sjkim#ifdef ACPI_DEBUG_OUTPUT 666193267Sjkim 667193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE 668193267SjkimAcpiDebugPrint ( 669193267Sjkim UINT32 RequestedDebugLevel, 670193267Sjkim UINT32 LineNumber, 671193267Sjkim const char *FunctionName, 672193267Sjkim const char *ModuleName, 673193267Sjkim UINT32 ComponentId, 674193267Sjkim const char *Format, 675193267Sjkim ...) ACPI_PRINTF_LIKE(6); 676193267Sjkim 677193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE 678193267SjkimAcpiDebugPrintRaw ( 679193267Sjkim UINT32 RequestedDebugLevel, 680193267Sjkim UINT32 LineNumber, 681193267Sjkim const char *FunctionName, 682193267Sjkim const char *ModuleName, 683193267Sjkim UINT32 ComponentId, 684193267Sjkim const char *Format, 685193267Sjkim ...) ACPI_PRINTF_LIKE(6); 686193267Sjkim#endif 687193267Sjkim 68867754Smsmith#endif /* __ACXFACE_H__ */ 689