acpixf.h revision 199337
167754Smsmith 267754Smsmith/****************************************************************************** 367754Smsmith * 470243Smsmith * Name: acpixf.h - External interfaces to the ACPI subsystem 567754Smsmith * 667754Smsmith *****************************************************************************/ 767754Smsmith 867754Smsmith/****************************************************************************** 967754Smsmith * 1067754Smsmith * 1. Copyright Notice 1167754Smsmith * 12193267Sjkim * Some or all of this work - Copyright (c) 1999 - 2009, 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 123199337Sjkim#define ACPI_CA_VERSION 0x20091112 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; 148193267Sjkim 149193267Sjkim 150151937Sjkim/* 15167754Smsmith * Global interfaces 15267754Smsmith */ 15367754SmsmithACPI_STATUS 154167802SjkimAcpiInitializeTables ( 155167802Sjkim ACPI_TABLE_DESC *InitialStorage, 156167802Sjkim UINT32 InitialTableCount, 157167802Sjkim BOOLEAN AllowResize); 158167802Sjkim 159167802SjkimACPI_STATUS 16067754SmsmithAcpiInitializeSubsystem ( 16167754Smsmith void); 16267754Smsmith 16367754SmsmithACPI_STATUS 16467754SmsmithAcpiEnableSubsystem ( 16567754Smsmith UINT32 Flags); 16667754Smsmith 16767754SmsmithACPI_STATUS 168100966SiwasakiAcpiInitializeObjects ( 169100966Siwasaki UINT32 Flags); 170100966Siwasaki 171100966SiwasakiACPI_STATUS 17267754SmsmithAcpiTerminate ( 17367754Smsmith void); 17467754Smsmith 17567754SmsmithACPI_STATUS 17680062SmsmithAcpiSubsystemStatus ( 17780062Smsmith void); 17880062Smsmith 17980062SmsmithACPI_STATUS 18067754SmsmithAcpiEnable ( 18167754Smsmith void); 18267754Smsmith 18367754SmsmithACPI_STATUS 18467754SmsmithAcpiDisable ( 18567754Smsmith void); 18667754Smsmith 18767754SmsmithACPI_STATUS 18880062SmsmithAcpiGetSystemInfo ( 18967754Smsmith ACPI_BUFFER *RetBuffer); 19067754Smsmith 191193267SjkimACPI_STATUS 192193267SjkimAcpiGetStatistics ( 193193267Sjkim ACPI_STATISTICS *Stats); 194193267Sjkim 19580062Smsmithconst char * 19667754SmsmithAcpiFormatException ( 19780062Smsmith ACPI_STATUS Exception); 19867754Smsmith 19987031SmsmithACPI_STATUS 20087031SmsmithAcpiPurgeCachedObjects ( 20187031Smsmith void); 20267754Smsmith 20387031Smsmith 20467754Smsmith/* 205151937Sjkim * ACPI Memory managment 20677424Smsmith */ 20777424Smsmithvoid * 20877424SmsmithAcpiAllocate ( 20977424Smsmith UINT32 Size); 21077424Smsmith 21177424Smsmithvoid * 21277424SmsmithAcpiCallocate ( 21377424Smsmith UINT32 Size); 21477424Smsmith 21577424Smsmithvoid 21677424SmsmithAcpiFree ( 21777424Smsmith void *Address); 21877424Smsmith 21977424Smsmith 22077424Smsmith/* 22167754Smsmith * ACPI table manipulation interfaces 22267754Smsmith */ 22367754SmsmithACPI_STATUS 224167802SjkimAcpiReallocateRootTable ( 225167802Sjkim void); 226167802Sjkim 227167802SjkimACPI_STATUS 22867754SmsmithAcpiFindRootPointer ( 229193267Sjkim ACPI_SIZE *RsdpAddress); 23067754Smsmith 23167754SmsmithACPI_STATUS 23267754SmsmithAcpiLoadTables ( 23380062Smsmith void); 23467754Smsmith 23567754SmsmithACPI_STATUS 23667754SmsmithAcpiGetTableHeader ( 237167802Sjkim ACPI_STRING Signature, 238193267Sjkim UINT32 Instance, 23967754Smsmith ACPI_TABLE_HEADER *OutTableHeader); 24067754Smsmith 24167754SmsmithACPI_STATUS 24267754SmsmithAcpiGetTable ( 243167802Sjkim ACPI_STRING Signature, 244193267Sjkim UINT32 Instance, 245167802Sjkim ACPI_TABLE_HEADER **OutTable); 24667754Smsmith 24778986SmsmithACPI_STATUS 248167802SjkimAcpiGetTableByIndex ( 249193267Sjkim UINT32 TableIndex, 250167802Sjkim ACPI_TABLE_HEADER **OutTable); 25167754Smsmith 252193267SjkimACPI_STATUS 253193267SjkimAcpiInstallTableHandler ( 254193267Sjkim ACPI_TABLE_HANDLER Handler, 255193267Sjkim void *Context); 25678986Smsmith 257193267SjkimACPI_STATUS 258193267SjkimAcpiRemoveTableHandler ( 259193267Sjkim ACPI_TABLE_HANDLER Handler); 260193267Sjkim 261193267Sjkim 26267754Smsmith/* 26367754Smsmith * Namespace and name interfaces 26467754Smsmith */ 26567754SmsmithACPI_STATUS 26667754SmsmithAcpiWalkNamespace ( 26767754Smsmith ACPI_OBJECT_TYPE Type, 26867754Smsmith ACPI_HANDLE StartObject, 26967754Smsmith UINT32 MaxDepth, 270199337Sjkim ACPI_WALK_CALLBACK PreOrderVisit, 271199337Sjkim ACPI_WALK_CALLBACK PostOrderVisit, 27267754Smsmith void *Context, 273114237Snjl void **ReturnValue); 27467754Smsmith 27567754SmsmithACPI_STATUS 27667754SmsmithAcpiGetDevices ( 277114237Snjl char *HID, 27877424Smsmith ACPI_WALK_CALLBACK UserFunction, 27967754Smsmith void *Context, 28067754Smsmith void **ReturnValue); 28167754Smsmith 28267754SmsmithACPI_STATUS 28367754SmsmithAcpiGetName ( 28467754Smsmith ACPI_HANDLE Handle, 28567754Smsmith UINT32 NameType, 28667754Smsmith ACPI_BUFFER *RetPathPtr); 28767754Smsmith 28867754SmsmithACPI_STATUS 28967754SmsmithAcpiGetHandle ( 29067754Smsmith ACPI_HANDLE Parent, 29167754Smsmith ACPI_STRING Pathname, 29267754Smsmith ACPI_HANDLE *RetHandle); 29367754Smsmith 29487031SmsmithACPI_STATUS 29587031SmsmithAcpiAttachData ( 29687031Smsmith ACPI_HANDLE ObjHandle, 29787031Smsmith ACPI_OBJECT_HANDLER Handler, 29887031Smsmith void *Data); 29967754Smsmith 30087031SmsmithACPI_STATUS 30187031SmsmithAcpiDetachData ( 30287031Smsmith ACPI_HANDLE ObjHandle, 30387031Smsmith ACPI_OBJECT_HANDLER Handler); 30487031Smsmith 30587031SmsmithACPI_STATUS 30687031SmsmithAcpiGetData ( 30787031Smsmith ACPI_HANDLE ObjHandle, 30887031Smsmith ACPI_OBJECT_HANDLER Handler, 30987031Smsmith void **Data); 31087031Smsmith 311151937SjkimACPI_STATUS 312151937SjkimAcpiDebugTrace ( 313151937Sjkim char *Name, 314151937Sjkim UINT32 DebugLevel, 315151937Sjkim UINT32 DebugLayer, 316151937Sjkim UINT32 Flags); 31787031Smsmith 318151937Sjkim 31967754Smsmith/* 32067754Smsmith * Object manipulation and enumeration 32167754Smsmith */ 32267754SmsmithACPI_STATUS 32367754SmsmithAcpiEvaluateObject ( 32467754Smsmith ACPI_HANDLE Object, 32567754Smsmith ACPI_STRING Pathname, 32667754Smsmith ACPI_OBJECT_LIST *ParameterObjects, 32767754Smsmith ACPI_BUFFER *ReturnObjectBuffer); 32867754Smsmith 32967754SmsmithACPI_STATUS 33099679SiwasakiAcpiEvaluateObjectTyped ( 33199679Siwasaki ACPI_HANDLE Object, 33299679Siwasaki ACPI_STRING Pathname, 33399679Siwasaki ACPI_OBJECT_LIST *ExternalParams, 33499679Siwasaki ACPI_BUFFER *ReturnBuffer, 33599679Siwasaki ACPI_OBJECT_TYPE ReturnType); 33699679Siwasaki 33799679SiwasakiACPI_STATUS 33867754SmsmithAcpiGetObjectInfo ( 339117521Snjl ACPI_HANDLE Handle, 340197104Sjkim ACPI_DEVICE_INFO **ReturnBuffer); 34167754Smsmith 34267754SmsmithACPI_STATUS 343193267SjkimAcpiInstallMethod ( 344193267Sjkim UINT8 *Buffer); 345193267Sjkim 346193267SjkimACPI_STATUS 34767754SmsmithAcpiGetNextObject ( 34867754Smsmith ACPI_OBJECT_TYPE Type, 34967754Smsmith ACPI_HANDLE Parent, 35067754Smsmith ACPI_HANDLE Child, 35167754Smsmith ACPI_HANDLE *OutHandle); 35267754Smsmith 35367754SmsmithACPI_STATUS 35467754SmsmithAcpiGetType ( 35567754Smsmith ACPI_HANDLE Object, 35667754Smsmith ACPI_OBJECT_TYPE *OutType); 35767754Smsmith 35867754SmsmithACPI_STATUS 35967754SmsmithAcpiGetParent ( 36067754Smsmith ACPI_HANDLE Object, 36167754Smsmith ACPI_HANDLE *OutHandle); 36267754Smsmith 36367754Smsmith 36467754Smsmith/* 365193267Sjkim * Handler interfaces 36667754Smsmith */ 36767754SmsmithACPI_STATUS 368193267SjkimAcpiInstallInitializationHandler ( 369193267Sjkim ACPI_INIT_HANDLER Handler, 370193267Sjkim UINT32 Function); 371193267Sjkim 372193267SjkimACPI_STATUS 37367754SmsmithAcpiInstallFixedEventHandler ( 37467754Smsmith UINT32 AcpiEvent, 37577424Smsmith ACPI_EVENT_HANDLER Handler, 37667754Smsmith void *Context); 37767754Smsmith 37867754SmsmithACPI_STATUS 37967754SmsmithAcpiRemoveFixedEventHandler ( 38067754Smsmith UINT32 AcpiEvent, 38177424Smsmith ACPI_EVENT_HANDLER Handler); 38267754Smsmith 38367754SmsmithACPI_STATUS 38467754SmsmithAcpiInstallNotifyHandler ( 38567754Smsmith ACPI_HANDLE Device, 38667754Smsmith UINT32 HandlerType, 38777424Smsmith ACPI_NOTIFY_HANDLER Handler, 38867754Smsmith void *Context); 38967754Smsmith 39067754SmsmithACPI_STATUS 39167754SmsmithAcpiRemoveNotifyHandler ( 39267754Smsmith ACPI_HANDLE Device, 39367754Smsmith UINT32 HandlerType, 39477424Smsmith ACPI_NOTIFY_HANDLER Handler); 39567754Smsmith 39667754SmsmithACPI_STATUS 39767754SmsmithAcpiInstallAddressSpaceHandler ( 39867754Smsmith ACPI_HANDLE Device, 39977424Smsmith ACPI_ADR_SPACE_TYPE SpaceId, 40077424Smsmith ACPI_ADR_SPACE_HANDLER Handler, 40177424Smsmith ACPI_ADR_SPACE_SETUP Setup, 40267754Smsmith void *Context); 40367754Smsmith 40467754SmsmithACPI_STATUS 40567754SmsmithAcpiRemoveAddressSpaceHandler ( 40667754Smsmith ACPI_HANDLE Device, 40777424Smsmith ACPI_ADR_SPACE_TYPE SpaceId, 40877424Smsmith ACPI_ADR_SPACE_HANDLER Handler); 40967754Smsmith 41067754SmsmithACPI_STATUS 41167754SmsmithAcpiInstallGpeHandler ( 412117521Snjl ACPI_HANDLE GpeDevice, 41367754Smsmith UINT32 GpeNumber, 41467754Smsmith UINT32 Type, 415129684Snjl ACPI_EVENT_HANDLER Address, 41667754Smsmith void *Context); 41767754Smsmith 41867754SmsmithACPI_STATUS 419193267SjkimAcpiRemoveGpeHandler ( 420193267Sjkim ACPI_HANDLE GpeDevice, 421193267Sjkim UINT32 GpeNumber, 422193267Sjkim ACPI_EVENT_HANDLER Address); 423193267Sjkim 424193267SjkimACPI_STATUS 425138287SmarksAcpiInstallExceptionHandler ( 426138287Smarks ACPI_EXCEPTION_HANDLER Handler); 427138287Smarks 428138287Smarks 429138287Smarks/* 430138287Smarks * Event interfaces 431138287Smarks */ 432138287SmarksACPI_STATUS 43367754SmsmithAcpiAcquireGlobalLock ( 434107325Siwasaki UINT16 Timeout, 43591116Smsmith UINT32 *Handle); 43667754Smsmith 43767754SmsmithACPI_STATUS 43867754SmsmithAcpiReleaseGlobalLock ( 43991116Smsmith UINT32 Handle); 44067754Smsmith 44167754SmsmithACPI_STATUS 44267754SmsmithAcpiEnableEvent ( 443117521Snjl UINT32 Event, 44484491Smsmith UINT32 Flags); 44567754Smsmith 44667754SmsmithACPI_STATUS 44767754SmsmithAcpiDisableEvent ( 448117521Snjl UINT32 Event, 44984491Smsmith UINT32 Flags); 45067754Smsmith 45167754SmsmithACPI_STATUS 45267754SmsmithAcpiClearEvent ( 453117521Snjl UINT32 Event); 45467754Smsmith 45567754SmsmithACPI_STATUS 45667754SmsmithAcpiGetEventStatus ( 457117521Snjl UINT32 Event, 45867754Smsmith ACPI_EVENT_STATUS *EventStatus); 45967754Smsmith 460193267Sjkim 461193267Sjkim/* 462193267Sjkim * GPE Interfaces 463193267Sjkim */ 464117521SnjlACPI_STATUS 465129684SnjlAcpiSetGpeType ( 466129684Snjl ACPI_HANDLE GpeDevice, 467129684Snjl UINT32 GpeNumber, 468129684Snjl UINT8 Type); 469129684Snjl 470129684SnjlACPI_STATUS 471117521SnjlAcpiEnableGpe ( 472117521Snjl ACPI_HANDLE GpeDevice, 473117521Snjl UINT32 GpeNumber, 474117521Snjl UINT32 Flags); 475117521Snjl 476117521SnjlACPI_STATUS 477117521SnjlAcpiDisableGpe ( 478117521Snjl ACPI_HANDLE GpeDevice, 479117521Snjl UINT32 GpeNumber, 480117521Snjl UINT32 Flags); 481117521Snjl 482117521SnjlACPI_STATUS 483117521SnjlAcpiClearGpe ( 484117521Snjl ACPI_HANDLE GpeDevice, 485117521Snjl UINT32 GpeNumber, 486117521Snjl UINT32 Flags); 487117521Snjl 488117521SnjlACPI_STATUS 489117521SnjlAcpiGetGpeStatus ( 490117521Snjl ACPI_HANDLE GpeDevice, 491117521Snjl UINT32 GpeNumber, 492117521Snjl UINT32 Flags, 493117521Snjl ACPI_EVENT_STATUS *EventStatus); 494117521Snjl 495117521SnjlACPI_STATUS 496193267SjkimAcpiDisableAllGpes ( 497193267Sjkim void); 498193267Sjkim 499193267SjkimACPI_STATUS 500193267SjkimAcpiEnableAllRuntimeGpes ( 501193267Sjkim void); 502193267Sjkim 503193267SjkimACPI_STATUS 504193267SjkimAcpiGetGpeDevice ( 505193267Sjkim UINT32 GpeIndex, 506193267Sjkim ACPI_HANDLE *GpeDevice); 507193267Sjkim 508193267SjkimACPI_STATUS 509117521SnjlAcpiInstallGpeBlock ( 510117521Snjl ACPI_HANDLE GpeDevice, 511117521Snjl ACPI_GENERIC_ADDRESS *GpeBlockAddress, 512117521Snjl UINT32 RegisterCount, 513151937Sjkim UINT32 InterruptNumber); 514117521Snjl 515117521SnjlACPI_STATUS 516117521SnjlAcpiRemoveGpeBlock ( 517117521Snjl ACPI_HANDLE GpeDevice); 518117521Snjl 519117521Snjl 52067754Smsmith/* 52167754Smsmith * Resource interfaces 52267754Smsmith */ 523114237Snjltypedef 524114237SnjlACPI_STATUS (*ACPI_WALK_RESOURCE_CALLBACK) ( 525114237Snjl ACPI_RESOURCE *Resource, 526114237Snjl void *Context); 527114237Snjl 528167802SjkimACPI_STATUS 529167802SjkimAcpiGetVendorResource ( 530167802Sjkim ACPI_HANDLE DeviceHandle, 531167802Sjkim char *Name, 532167802Sjkim ACPI_VENDOR_UUID *Uuid, 533167802Sjkim ACPI_BUFFER *RetBuffer); 534114237Snjl 53567754SmsmithACPI_STATUS 53667754SmsmithAcpiGetCurrentResources( 53767754Smsmith ACPI_HANDLE DeviceHandle, 53867754Smsmith ACPI_BUFFER *RetBuffer); 53967754Smsmith 54067754SmsmithACPI_STATUS 54167754SmsmithAcpiGetPossibleResources( 54267754Smsmith ACPI_HANDLE DeviceHandle, 54367754Smsmith ACPI_BUFFER *RetBuffer); 54467754Smsmith 54567754SmsmithACPI_STATUS 546114237SnjlAcpiWalkResources ( 547167802Sjkim ACPI_HANDLE DeviceHandle, 548167802Sjkim char *Name, 549167802Sjkim ACPI_WALK_RESOURCE_CALLBACK UserFunction, 550167802Sjkim void *Context); 551114237Snjl 552114237SnjlACPI_STATUS 55367754SmsmithAcpiSetCurrentResources ( 55467754Smsmith ACPI_HANDLE DeviceHandle, 55567754Smsmith ACPI_BUFFER *InBuffer); 55667754Smsmith 55767754SmsmithACPI_STATUS 55867754SmsmithAcpiGetIrqRoutingTable ( 55967754Smsmith ACPI_HANDLE BusDeviceHandle, 56067754Smsmith ACPI_BUFFER *RetBuffer); 56167754Smsmith 562114237SnjlACPI_STATUS 563114237SnjlAcpiResourceToAddress64 ( 564114237Snjl ACPI_RESOURCE *Resource, 565114237Snjl ACPI_RESOURCE_ADDRESS64 *Out); 56667754Smsmith 567193267Sjkim 56867754Smsmith/* 56967754Smsmith * Hardware (ACPI device) interfaces 57067754Smsmith */ 57167754SmsmithACPI_STATUS 572193267SjkimAcpiReset ( 573193267Sjkim void); 574193267Sjkim 575193267SjkimACPI_STATUS 576193267SjkimAcpiRead ( 577197104Sjkim UINT64 *Value, 578193267Sjkim ACPI_GENERIC_ADDRESS *Reg); 579193267Sjkim 580193267SjkimACPI_STATUS 581193267SjkimAcpiWrite ( 582197104Sjkim UINT64 Value, 583193267Sjkim ACPI_GENERIC_ADDRESS *Reg); 584193267Sjkim 585193267SjkimACPI_STATUS 586193267SjkimAcpiReadBitRegister ( 58799679Siwasaki UINT32 RegisterId, 588167802Sjkim UINT32 *ReturnValue); 58999679Siwasaki 59099679SiwasakiACPI_STATUS 591193267SjkimAcpiWriteBitRegister ( 59299679Siwasaki UINT32 RegisterId, 593167802Sjkim UINT32 Value); 59499679Siwasaki 59599679SiwasakiACPI_STATUS 59699679SiwasakiAcpiGetSleepTypeData ( 59799679Siwasaki UINT8 SleepState, 59899679Siwasaki UINT8 *Slp_TypA, 59999679Siwasaki UINT8 *Slp_TypB); 60087031Smsmith 60167754SmsmithACPI_STATUS 60287031SmsmithAcpiEnterSleepStatePrep ( 60399679Siwasaki UINT8 SleepState); 60487031Smsmith 60587031SmsmithACPI_STATUS 60671867SmsmithAcpiEnterSleepState ( 60799679Siwasaki UINT8 SleepState); 60871867Smsmith 60971867SmsmithACPI_STATUS 610114237SnjlAcpiEnterSleepStateS4bios ( 611114237Snjl void); 612114237Snjl 613114237SnjlACPI_STATUS 61482367SmsmithAcpiLeaveSleepState ( 615193267Sjkim UINT8 SleepState) 616193267Sjkim ; 617193267SjkimACPI_STATUS 618193267SjkimAcpiSetFirmwareWakingVector ( 619193267Sjkim UINT32 PhysicalAddress); 62067754Smsmith 621193267Sjkim#if ACPI_MACHINE_WIDTH == 64 622193267SjkimACPI_STATUS 623193267SjkimAcpiSetFirmwareWakingVector64 ( 624193267Sjkim UINT64 PhysicalAddress); 625193267Sjkim#endif 62699679Siwasaki 627193267Sjkim 628193267Sjkim/* 629193267Sjkim * Error/Warning output 630193267Sjkim */ 631193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE 632193267SjkimAcpiError ( 633193267Sjkim const char *ModuleName, 634193267Sjkim UINT32 LineNumber, 635193267Sjkim const char *Format, 636193267Sjkim ...) ACPI_PRINTF_LIKE(3); 637193267Sjkim 638193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE 639193267SjkimAcpiException ( 640193267Sjkim const char *ModuleName, 641193267Sjkim UINT32 LineNumber, 642193267Sjkim ACPI_STATUS Status, 643193267Sjkim const char *Format, 644193267Sjkim ...) ACPI_PRINTF_LIKE(4); 645193267Sjkim 646193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE 647193267SjkimAcpiWarning ( 648193267Sjkim const char *ModuleName, 649193267Sjkim UINT32 LineNumber, 650193267Sjkim const char *Format, 651193267Sjkim ...) ACPI_PRINTF_LIKE(3); 652193267Sjkim 653193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE 654193267SjkimAcpiInfo ( 655193267Sjkim const char *ModuleName, 656193267Sjkim UINT32 LineNumber, 657193267Sjkim const char *Format, 658193267Sjkim ...) ACPI_PRINTF_LIKE(3); 659193267Sjkim 660193267Sjkim 661193267Sjkim/* 662193267Sjkim * Debug output 663193267Sjkim */ 664193267Sjkim#ifdef ACPI_DEBUG_OUTPUT 665193267Sjkim 666193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE 667193267SjkimAcpiDebugPrint ( 668193267Sjkim UINT32 RequestedDebugLevel, 669193267Sjkim UINT32 LineNumber, 670193267Sjkim const char *FunctionName, 671193267Sjkim const char *ModuleName, 672193267Sjkim UINT32 ComponentId, 673193267Sjkim const char *Format, 674193267Sjkim ...) ACPI_PRINTF_LIKE(6); 675193267Sjkim 676193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE 677193267SjkimAcpiDebugPrintRaw ( 678193267Sjkim UINT32 RequestedDebugLevel, 679193267Sjkim UINT32 LineNumber, 680193267Sjkim const char *FunctionName, 681193267Sjkim const char *ModuleName, 682193267Sjkim UINT32 ComponentId, 683193267Sjkim const char *Format, 684193267Sjkim ...) ACPI_PRINTF_LIKE(6); 685193267Sjkim#endif 686193267Sjkim 68767754Smsmith#endif /* __ACXFACE_H__ */ 688