acpixf.h revision 209746
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 123209746Sjkim#define ACPI_CA_VERSION 0x20100702 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 20687031Smsmith 20767754Smsmith/* 208151937Sjkim * ACPI Memory managment 20977424Smsmith */ 21077424Smsmithvoid * 21177424SmsmithAcpiAllocate ( 21277424Smsmith UINT32 Size); 21377424Smsmith 21477424Smsmithvoid * 21577424SmsmithAcpiCallocate ( 21677424Smsmith UINT32 Size); 21777424Smsmith 21877424Smsmithvoid 21977424SmsmithAcpiFree ( 22077424Smsmith void *Address); 22177424Smsmith 22277424Smsmith 22377424Smsmith/* 22467754Smsmith * ACPI table manipulation interfaces 22567754Smsmith */ 22667754SmsmithACPI_STATUS 227167802SjkimAcpiReallocateRootTable ( 228167802Sjkim void); 229167802Sjkim 230167802SjkimACPI_STATUS 23167754SmsmithAcpiFindRootPointer ( 232193267Sjkim ACPI_SIZE *RsdpAddress); 23367754Smsmith 23467754SmsmithACPI_STATUS 23567754SmsmithAcpiLoadTables ( 23680062Smsmith void); 23767754Smsmith 23867754SmsmithACPI_STATUS 23967754SmsmithAcpiGetTableHeader ( 240167802Sjkim ACPI_STRING Signature, 241193267Sjkim UINT32 Instance, 24267754Smsmith ACPI_TABLE_HEADER *OutTableHeader); 24367754Smsmith 24467754SmsmithACPI_STATUS 24567754SmsmithAcpiGetTable ( 246167802Sjkim ACPI_STRING Signature, 247193267Sjkim UINT32 Instance, 248167802Sjkim ACPI_TABLE_HEADER **OutTable); 24967754Smsmith 25078986SmsmithACPI_STATUS 251167802SjkimAcpiGetTableByIndex ( 252193267Sjkim UINT32 TableIndex, 253167802Sjkim ACPI_TABLE_HEADER **OutTable); 25467754Smsmith 255193267SjkimACPI_STATUS 256193267SjkimAcpiInstallTableHandler ( 257193267Sjkim ACPI_TABLE_HANDLER Handler, 258193267Sjkim void *Context); 25978986Smsmith 260193267SjkimACPI_STATUS 261193267SjkimAcpiRemoveTableHandler ( 262193267Sjkim ACPI_TABLE_HANDLER Handler); 263193267Sjkim 264193267Sjkim 26567754Smsmith/* 26667754Smsmith * Namespace and name interfaces 26767754Smsmith */ 26867754SmsmithACPI_STATUS 26967754SmsmithAcpiWalkNamespace ( 27067754Smsmith ACPI_OBJECT_TYPE Type, 27167754Smsmith ACPI_HANDLE StartObject, 27267754Smsmith UINT32 MaxDepth, 273199337Sjkim ACPI_WALK_CALLBACK PreOrderVisit, 274199337Sjkim ACPI_WALK_CALLBACK PostOrderVisit, 27567754Smsmith void *Context, 276114237Snjl void **ReturnValue); 27767754Smsmith 27867754SmsmithACPI_STATUS 27967754SmsmithAcpiGetDevices ( 280114237Snjl char *HID, 28177424Smsmith ACPI_WALK_CALLBACK UserFunction, 28267754Smsmith void *Context, 28367754Smsmith void **ReturnValue); 28467754Smsmith 28567754SmsmithACPI_STATUS 28667754SmsmithAcpiGetName ( 287207344Sjkim ACPI_HANDLE Object, 28867754Smsmith UINT32 NameType, 28967754Smsmith ACPI_BUFFER *RetPathPtr); 29067754Smsmith 29167754SmsmithACPI_STATUS 29267754SmsmithAcpiGetHandle ( 29367754Smsmith ACPI_HANDLE Parent, 29467754Smsmith ACPI_STRING Pathname, 29567754Smsmith ACPI_HANDLE *RetHandle); 29667754Smsmith 29787031SmsmithACPI_STATUS 29887031SmsmithAcpiAttachData ( 299207344Sjkim ACPI_HANDLE Object, 30087031Smsmith ACPI_OBJECT_HANDLER Handler, 30187031Smsmith void *Data); 30267754Smsmith 30387031SmsmithACPI_STATUS 30487031SmsmithAcpiDetachData ( 305207344Sjkim ACPI_HANDLE Object, 30687031Smsmith ACPI_OBJECT_HANDLER Handler); 30787031Smsmith 30887031SmsmithACPI_STATUS 30987031SmsmithAcpiGetData ( 310207344Sjkim ACPI_HANDLE Object, 31187031Smsmith ACPI_OBJECT_HANDLER Handler, 31287031Smsmith void **Data); 31387031Smsmith 314151937SjkimACPI_STATUS 315151937SjkimAcpiDebugTrace ( 316151937Sjkim char *Name, 317151937Sjkim UINT32 DebugLevel, 318151937Sjkim UINT32 DebugLayer, 319151937Sjkim UINT32 Flags); 32087031Smsmith 321151937Sjkim 32267754Smsmith/* 32367754Smsmith * Object manipulation and enumeration 32467754Smsmith */ 32567754SmsmithACPI_STATUS 32667754SmsmithAcpiEvaluateObject ( 32767754Smsmith ACPI_HANDLE Object, 32867754Smsmith ACPI_STRING Pathname, 32967754Smsmith ACPI_OBJECT_LIST *ParameterObjects, 33067754Smsmith ACPI_BUFFER *ReturnObjectBuffer); 33167754Smsmith 33267754SmsmithACPI_STATUS 33399679SiwasakiAcpiEvaluateObjectTyped ( 33499679Siwasaki ACPI_HANDLE Object, 33599679Siwasaki ACPI_STRING Pathname, 33699679Siwasaki ACPI_OBJECT_LIST *ExternalParams, 33799679Siwasaki ACPI_BUFFER *ReturnBuffer, 33899679Siwasaki ACPI_OBJECT_TYPE ReturnType); 33999679Siwasaki 34099679SiwasakiACPI_STATUS 34167754SmsmithAcpiGetObjectInfo ( 342207344Sjkim ACPI_HANDLE Object, 343197104Sjkim ACPI_DEVICE_INFO **ReturnBuffer); 34467754Smsmith 34567754SmsmithACPI_STATUS 346193267SjkimAcpiInstallMethod ( 347193267Sjkim UINT8 *Buffer); 348193267Sjkim 349193267SjkimACPI_STATUS 35067754SmsmithAcpiGetNextObject ( 35167754Smsmith ACPI_OBJECT_TYPE Type, 35267754Smsmith ACPI_HANDLE Parent, 35367754Smsmith ACPI_HANDLE Child, 35467754Smsmith ACPI_HANDLE *OutHandle); 35567754Smsmith 35667754SmsmithACPI_STATUS 35767754SmsmithAcpiGetType ( 35867754Smsmith ACPI_HANDLE Object, 35967754Smsmith ACPI_OBJECT_TYPE *OutType); 36067754Smsmith 36167754SmsmithACPI_STATUS 36267754SmsmithAcpiGetParent ( 36367754Smsmith ACPI_HANDLE Object, 36467754Smsmith ACPI_HANDLE *OutHandle); 36567754Smsmith 36667754Smsmith 36767754Smsmith/* 368193267Sjkim * Handler interfaces 36967754Smsmith */ 37067754SmsmithACPI_STATUS 371193267SjkimAcpiInstallInitializationHandler ( 372193267Sjkim ACPI_INIT_HANDLER Handler, 373193267Sjkim UINT32 Function); 374193267Sjkim 375193267SjkimACPI_STATUS 37667754SmsmithAcpiInstallFixedEventHandler ( 37767754Smsmith UINT32 AcpiEvent, 37877424Smsmith ACPI_EVENT_HANDLER Handler, 37967754Smsmith void *Context); 38067754Smsmith 38167754SmsmithACPI_STATUS 38267754SmsmithAcpiRemoveFixedEventHandler ( 38367754Smsmith UINT32 AcpiEvent, 38477424Smsmith ACPI_EVENT_HANDLER Handler); 38567754Smsmith 38667754SmsmithACPI_STATUS 38767754SmsmithAcpiInstallNotifyHandler ( 38867754Smsmith ACPI_HANDLE Device, 38967754Smsmith UINT32 HandlerType, 39077424Smsmith ACPI_NOTIFY_HANDLER Handler, 39167754Smsmith void *Context); 39267754Smsmith 39367754SmsmithACPI_STATUS 39467754SmsmithAcpiRemoveNotifyHandler ( 39567754Smsmith ACPI_HANDLE Device, 39667754Smsmith UINT32 HandlerType, 39777424Smsmith ACPI_NOTIFY_HANDLER Handler); 39867754Smsmith 39967754SmsmithACPI_STATUS 40067754SmsmithAcpiInstallAddressSpaceHandler ( 40167754Smsmith ACPI_HANDLE Device, 40277424Smsmith ACPI_ADR_SPACE_TYPE SpaceId, 40377424Smsmith ACPI_ADR_SPACE_HANDLER Handler, 40477424Smsmith ACPI_ADR_SPACE_SETUP Setup, 40567754Smsmith void *Context); 40667754Smsmith 40767754SmsmithACPI_STATUS 40867754SmsmithAcpiRemoveAddressSpaceHandler ( 40967754Smsmith ACPI_HANDLE Device, 41077424Smsmith ACPI_ADR_SPACE_TYPE SpaceId, 41177424Smsmith ACPI_ADR_SPACE_HANDLER Handler); 41267754Smsmith 41367754SmsmithACPI_STATUS 41467754SmsmithAcpiInstallGpeHandler ( 415117521Snjl ACPI_HANDLE GpeDevice, 41667754Smsmith UINT32 GpeNumber, 41767754Smsmith UINT32 Type, 418129684Snjl ACPI_EVENT_HANDLER Address, 41967754Smsmith void *Context); 42067754Smsmith 42167754SmsmithACPI_STATUS 422193267SjkimAcpiRemoveGpeHandler ( 423193267Sjkim ACPI_HANDLE GpeDevice, 424193267Sjkim UINT32 GpeNumber, 425193267Sjkim ACPI_EVENT_HANDLER Address); 426193267Sjkim 427193267SjkimACPI_STATUS 428138287SmarksAcpiInstallExceptionHandler ( 429138287Smarks ACPI_EXCEPTION_HANDLER Handler); 430138287Smarks 431138287Smarks 432138287Smarks/* 433138287Smarks * Event interfaces 434138287Smarks */ 435138287SmarksACPI_STATUS 43667754SmsmithAcpiAcquireGlobalLock ( 437107325Siwasaki UINT16 Timeout, 43891116Smsmith UINT32 *Handle); 43967754Smsmith 44067754SmsmithACPI_STATUS 44167754SmsmithAcpiReleaseGlobalLock ( 44291116Smsmith UINT32 Handle); 44367754Smsmith 44467754SmsmithACPI_STATUS 44567754SmsmithAcpiEnableEvent ( 446117521Snjl UINT32 Event, 44784491Smsmith UINT32 Flags); 44867754Smsmith 44967754SmsmithACPI_STATUS 45067754SmsmithAcpiDisableEvent ( 451117521Snjl UINT32 Event, 45284491Smsmith UINT32 Flags); 45367754Smsmith 45467754SmsmithACPI_STATUS 45567754SmsmithAcpiClearEvent ( 456117521Snjl UINT32 Event); 45767754Smsmith 45867754SmsmithACPI_STATUS 45967754SmsmithAcpiGetEventStatus ( 460117521Snjl UINT32 Event, 46167754Smsmith ACPI_EVENT_STATUS *EventStatus); 46267754Smsmith 463193267Sjkim 464193267Sjkim/* 465193267Sjkim * GPE Interfaces 466193267Sjkim */ 467117521SnjlACPI_STATUS 468206117SjkimAcpiSetGpe ( 469129684Snjl ACPI_HANDLE GpeDevice, 470129684Snjl UINT32 GpeNumber, 471206117Sjkim UINT8 Action); 472129684Snjl 473129684SnjlACPI_STATUS 474117521SnjlAcpiEnableGpe ( 475117521Snjl ACPI_HANDLE GpeDevice, 476209746Sjkim UINT32 GpeNumber); 477117521Snjl 478117521SnjlACPI_STATUS 479117521SnjlAcpiDisableGpe ( 480117521Snjl ACPI_HANDLE GpeDevice, 481209746Sjkim UINT32 GpeNumber); 482117521Snjl 483117521SnjlACPI_STATUS 484117521SnjlAcpiClearGpe ( 485117521Snjl ACPI_HANDLE GpeDevice, 486206117Sjkim UINT32 GpeNumber); 487117521Snjl 488117521SnjlACPI_STATUS 489209746SjkimAcpiGpeWakeup ( 490209746Sjkim ACPI_HANDLE GpeDevice, 491209746Sjkim UINT32 GpeNumber, 492209746Sjkim UINT8 Action); 493209746Sjkim 494209746SjkimACPI_STATUS 495117521SnjlAcpiGetGpeStatus ( 496117521Snjl ACPI_HANDLE GpeDevice, 497117521Snjl UINT32 GpeNumber, 498117521Snjl ACPI_EVENT_STATUS *EventStatus); 499117521Snjl 500117521SnjlACPI_STATUS 501193267SjkimAcpiDisableAllGpes ( 502193267Sjkim void); 503193267Sjkim 504193267SjkimACPI_STATUS 505193267SjkimAcpiEnableAllRuntimeGpes ( 506193267Sjkim void); 507193267Sjkim 508193267SjkimACPI_STATUS 509193267SjkimAcpiGetGpeDevice ( 510193267Sjkim UINT32 GpeIndex, 511193267Sjkim ACPI_HANDLE *GpeDevice); 512193267Sjkim 513193267SjkimACPI_STATUS 514117521SnjlAcpiInstallGpeBlock ( 515117521Snjl ACPI_HANDLE GpeDevice, 516117521Snjl ACPI_GENERIC_ADDRESS *GpeBlockAddress, 517117521Snjl UINT32 RegisterCount, 518151937Sjkim UINT32 InterruptNumber); 519117521Snjl 520117521SnjlACPI_STATUS 521117521SnjlAcpiRemoveGpeBlock ( 522117521Snjl ACPI_HANDLE GpeDevice); 523117521Snjl 524117521Snjl 52567754Smsmith/* 52667754Smsmith * Resource interfaces 52767754Smsmith */ 528114237Snjltypedef 529114237SnjlACPI_STATUS (*ACPI_WALK_RESOURCE_CALLBACK) ( 530114237Snjl ACPI_RESOURCE *Resource, 531114237Snjl void *Context); 532114237Snjl 533167802SjkimACPI_STATUS 534167802SjkimAcpiGetVendorResource ( 535207344Sjkim ACPI_HANDLE Device, 536167802Sjkim char *Name, 537167802Sjkim ACPI_VENDOR_UUID *Uuid, 538167802Sjkim ACPI_BUFFER *RetBuffer); 539114237Snjl 54067754SmsmithACPI_STATUS 541207344SjkimAcpiGetCurrentResources ( 542207344Sjkim ACPI_HANDLE Device, 54367754Smsmith ACPI_BUFFER *RetBuffer); 54467754Smsmith 54567754SmsmithACPI_STATUS 546207344SjkimAcpiGetPossibleResources ( 547207344Sjkim ACPI_HANDLE Device, 54867754Smsmith ACPI_BUFFER *RetBuffer); 54967754Smsmith 55067754SmsmithACPI_STATUS 551114237SnjlAcpiWalkResources ( 552207344Sjkim ACPI_HANDLE Device, 553167802Sjkim char *Name, 554167802Sjkim ACPI_WALK_RESOURCE_CALLBACK UserFunction, 555167802Sjkim void *Context); 556114237Snjl 557114237SnjlACPI_STATUS 55867754SmsmithAcpiSetCurrentResources ( 559207344Sjkim ACPI_HANDLE Device, 56067754Smsmith ACPI_BUFFER *InBuffer); 56167754Smsmith 56267754SmsmithACPI_STATUS 563207344SjkimAcpiGetIrqRoutingTable ( 564207344Sjkim ACPI_HANDLE Device, 56567754Smsmith ACPI_BUFFER *RetBuffer); 56667754Smsmith 567114237SnjlACPI_STATUS 568114237SnjlAcpiResourceToAddress64 ( 569114237Snjl ACPI_RESOURCE *Resource, 570114237Snjl ACPI_RESOURCE_ADDRESS64 *Out); 57167754Smsmith 572193267Sjkim 57367754Smsmith/* 57467754Smsmith * Hardware (ACPI device) interfaces 57567754Smsmith */ 57667754SmsmithACPI_STATUS 577193267SjkimAcpiReset ( 578193267Sjkim void); 579193267Sjkim 580193267SjkimACPI_STATUS 581193267SjkimAcpiRead ( 582197104Sjkim UINT64 *Value, 583193267Sjkim ACPI_GENERIC_ADDRESS *Reg); 584193267Sjkim 585193267SjkimACPI_STATUS 586193267SjkimAcpiWrite ( 587197104Sjkim UINT64 Value, 588193267Sjkim ACPI_GENERIC_ADDRESS *Reg); 589193267Sjkim 590193267SjkimACPI_STATUS 591193267SjkimAcpiReadBitRegister ( 59299679Siwasaki UINT32 RegisterId, 593167802Sjkim UINT32 *ReturnValue); 59499679Siwasaki 59599679SiwasakiACPI_STATUS 596193267SjkimAcpiWriteBitRegister ( 59799679Siwasaki UINT32 RegisterId, 598167802Sjkim UINT32 Value); 59999679Siwasaki 60099679SiwasakiACPI_STATUS 60199679SiwasakiAcpiGetSleepTypeData ( 60299679Siwasaki UINT8 SleepState, 60399679Siwasaki UINT8 *Slp_TypA, 60499679Siwasaki UINT8 *Slp_TypB); 60587031Smsmith 60667754SmsmithACPI_STATUS 60787031SmsmithAcpiEnterSleepStatePrep ( 60899679Siwasaki UINT8 SleepState); 60987031Smsmith 61087031SmsmithACPI_STATUS 61171867SmsmithAcpiEnterSleepState ( 61299679Siwasaki UINT8 SleepState); 61371867Smsmith 61471867SmsmithACPI_STATUS 615114237SnjlAcpiEnterSleepStateS4bios ( 616114237Snjl void); 617114237Snjl 618114237SnjlACPI_STATUS 61982367SmsmithAcpiLeaveSleepState ( 620193267Sjkim UINT8 SleepState) 621193267Sjkim ; 622193267SjkimACPI_STATUS 623193267SjkimAcpiSetFirmwareWakingVector ( 624193267Sjkim UINT32 PhysicalAddress); 62567754Smsmith 626193267Sjkim#if ACPI_MACHINE_WIDTH == 64 627193267SjkimACPI_STATUS 628193267SjkimAcpiSetFirmwareWakingVector64 ( 629193267Sjkim UINT64 PhysicalAddress); 630193267Sjkim#endif 63199679Siwasaki 632193267Sjkim 633193267Sjkim/* 634193267Sjkim * Error/Warning output 635193267Sjkim */ 636193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE 637193267SjkimAcpiError ( 638193267Sjkim const char *ModuleName, 639193267Sjkim UINT32 LineNumber, 640193267Sjkim const char *Format, 641193267Sjkim ...) ACPI_PRINTF_LIKE(3); 642193267Sjkim 643193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE 644193267SjkimAcpiException ( 645193267Sjkim const char *ModuleName, 646193267Sjkim UINT32 LineNumber, 647193267Sjkim ACPI_STATUS Status, 648193267Sjkim const char *Format, 649193267Sjkim ...) ACPI_PRINTF_LIKE(4); 650193267Sjkim 651193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE 652193267SjkimAcpiWarning ( 653193267Sjkim const char *ModuleName, 654193267Sjkim UINT32 LineNumber, 655193267Sjkim const char *Format, 656193267Sjkim ...) ACPI_PRINTF_LIKE(3); 657193267Sjkim 658193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE 659193267SjkimAcpiInfo ( 660193267Sjkim const char *ModuleName, 661193267Sjkim UINT32 LineNumber, 662193267Sjkim const char *Format, 663193267Sjkim ...) ACPI_PRINTF_LIKE(3); 664193267Sjkim 665193267Sjkim 666193267Sjkim/* 667193267Sjkim * Debug output 668193267Sjkim */ 669193267Sjkim#ifdef ACPI_DEBUG_OUTPUT 670193267Sjkim 671193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE 672193267SjkimAcpiDebugPrint ( 673193267Sjkim UINT32 RequestedDebugLevel, 674193267Sjkim UINT32 LineNumber, 675193267Sjkim const char *FunctionName, 676193267Sjkim const char *ModuleName, 677193267Sjkim UINT32 ComponentId, 678193267Sjkim const char *Format, 679193267Sjkim ...) ACPI_PRINTF_LIKE(6); 680193267Sjkim 681193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE 682193267SjkimAcpiDebugPrintRaw ( 683193267Sjkim UINT32 RequestedDebugLevel, 684193267Sjkim UINT32 LineNumber, 685193267Sjkim const char *FunctionName, 686193267Sjkim const char *ModuleName, 687193267Sjkim UINT32 ComponentId, 688193267Sjkim const char *Format, 689193267Sjkim ...) ACPI_PRINTF_LIKE(6); 690193267Sjkim#endif 691193267Sjkim 69267754Smsmith#endif /* __ACXFACE_H__ */ 693