acpixf.h revision 207344
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 123207344Sjkim#define ACPI_CA_VERSION 0x20100428 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; 150193267Sjkim 151193267Sjkim 152151937Sjkim/* 15367754Smsmith * Global interfaces 15467754Smsmith */ 15567754SmsmithACPI_STATUS 156167802SjkimAcpiInitializeTables ( 157167802Sjkim ACPI_TABLE_DESC *InitialStorage, 158167802Sjkim UINT32 InitialTableCount, 159167802Sjkim BOOLEAN AllowResize); 160167802Sjkim 161167802SjkimACPI_STATUS 16267754SmsmithAcpiInitializeSubsystem ( 16367754Smsmith void); 16467754Smsmith 16567754SmsmithACPI_STATUS 16667754SmsmithAcpiEnableSubsystem ( 16767754Smsmith UINT32 Flags); 16867754Smsmith 16967754SmsmithACPI_STATUS 170100966SiwasakiAcpiInitializeObjects ( 171100966Siwasaki UINT32 Flags); 172100966Siwasaki 173100966SiwasakiACPI_STATUS 17467754SmsmithAcpiTerminate ( 17567754Smsmith void); 17667754Smsmith 17767754SmsmithACPI_STATUS 17880062SmsmithAcpiSubsystemStatus ( 17980062Smsmith void); 18080062Smsmith 18180062SmsmithACPI_STATUS 18267754SmsmithAcpiEnable ( 18367754Smsmith void); 18467754Smsmith 18567754SmsmithACPI_STATUS 18667754SmsmithAcpiDisable ( 18767754Smsmith void); 18867754Smsmith 18967754SmsmithACPI_STATUS 19080062SmsmithAcpiGetSystemInfo ( 19167754Smsmith ACPI_BUFFER *RetBuffer); 19267754Smsmith 193193267SjkimACPI_STATUS 194193267SjkimAcpiGetStatistics ( 195193267Sjkim ACPI_STATISTICS *Stats); 196193267Sjkim 19780062Smsmithconst char * 19867754SmsmithAcpiFormatException ( 19980062Smsmith ACPI_STATUS Exception); 20067754Smsmith 20187031SmsmithACPI_STATUS 20287031SmsmithAcpiPurgeCachedObjects ( 20387031Smsmith void); 20467754Smsmith 20587031Smsmith 20667754Smsmith/* 207151937Sjkim * ACPI Memory managment 20877424Smsmith */ 20977424Smsmithvoid * 21077424SmsmithAcpiAllocate ( 21177424Smsmith UINT32 Size); 21277424Smsmith 21377424Smsmithvoid * 21477424SmsmithAcpiCallocate ( 21577424Smsmith UINT32 Size); 21677424Smsmith 21777424Smsmithvoid 21877424SmsmithAcpiFree ( 21977424Smsmith void *Address); 22077424Smsmith 22177424Smsmith 22277424Smsmith/* 22367754Smsmith * ACPI table manipulation interfaces 22467754Smsmith */ 22567754SmsmithACPI_STATUS 226167802SjkimAcpiReallocateRootTable ( 227167802Sjkim void); 228167802Sjkim 229167802SjkimACPI_STATUS 23067754SmsmithAcpiFindRootPointer ( 231193267Sjkim ACPI_SIZE *RsdpAddress); 23267754Smsmith 23367754SmsmithACPI_STATUS 23467754SmsmithAcpiLoadTables ( 23580062Smsmith void); 23667754Smsmith 23767754SmsmithACPI_STATUS 23867754SmsmithAcpiGetTableHeader ( 239167802Sjkim ACPI_STRING Signature, 240193267Sjkim UINT32 Instance, 24167754Smsmith ACPI_TABLE_HEADER *OutTableHeader); 24267754Smsmith 24367754SmsmithACPI_STATUS 24467754SmsmithAcpiGetTable ( 245167802Sjkim ACPI_STRING Signature, 246193267Sjkim UINT32 Instance, 247167802Sjkim ACPI_TABLE_HEADER **OutTable); 24867754Smsmith 24978986SmsmithACPI_STATUS 250167802SjkimAcpiGetTableByIndex ( 251193267Sjkim UINT32 TableIndex, 252167802Sjkim ACPI_TABLE_HEADER **OutTable); 25367754Smsmith 254193267SjkimACPI_STATUS 255193267SjkimAcpiInstallTableHandler ( 256193267Sjkim ACPI_TABLE_HANDLER Handler, 257193267Sjkim void *Context); 25878986Smsmith 259193267SjkimACPI_STATUS 260193267SjkimAcpiRemoveTableHandler ( 261193267Sjkim ACPI_TABLE_HANDLER Handler); 262193267Sjkim 263193267Sjkim 26467754Smsmith/* 26567754Smsmith * Namespace and name interfaces 26667754Smsmith */ 26767754SmsmithACPI_STATUS 26867754SmsmithAcpiWalkNamespace ( 26967754Smsmith ACPI_OBJECT_TYPE Type, 27067754Smsmith ACPI_HANDLE StartObject, 27167754Smsmith UINT32 MaxDepth, 272199337Sjkim ACPI_WALK_CALLBACK PreOrderVisit, 273199337Sjkim ACPI_WALK_CALLBACK PostOrderVisit, 27467754Smsmith void *Context, 275114237Snjl void **ReturnValue); 27667754Smsmith 27767754SmsmithACPI_STATUS 27867754SmsmithAcpiGetDevices ( 279114237Snjl char *HID, 28077424Smsmith ACPI_WALK_CALLBACK UserFunction, 28167754Smsmith void *Context, 28267754Smsmith void **ReturnValue); 28367754Smsmith 28467754SmsmithACPI_STATUS 28567754SmsmithAcpiGetName ( 286207344Sjkim ACPI_HANDLE Object, 28767754Smsmith UINT32 NameType, 28867754Smsmith ACPI_BUFFER *RetPathPtr); 28967754Smsmith 29067754SmsmithACPI_STATUS 29167754SmsmithAcpiGetHandle ( 29267754Smsmith ACPI_HANDLE Parent, 29367754Smsmith ACPI_STRING Pathname, 29467754Smsmith ACPI_HANDLE *RetHandle); 29567754Smsmith 29687031SmsmithACPI_STATUS 29787031SmsmithAcpiAttachData ( 298207344Sjkim ACPI_HANDLE Object, 29987031Smsmith ACPI_OBJECT_HANDLER Handler, 30087031Smsmith void *Data); 30167754Smsmith 30287031SmsmithACPI_STATUS 30387031SmsmithAcpiDetachData ( 304207344Sjkim ACPI_HANDLE Object, 30587031Smsmith ACPI_OBJECT_HANDLER Handler); 30687031Smsmith 30787031SmsmithACPI_STATUS 30887031SmsmithAcpiGetData ( 309207344Sjkim ACPI_HANDLE Object, 31087031Smsmith ACPI_OBJECT_HANDLER Handler, 31187031Smsmith void **Data); 31287031Smsmith 313151937SjkimACPI_STATUS 314151937SjkimAcpiDebugTrace ( 315151937Sjkim char *Name, 316151937Sjkim UINT32 DebugLevel, 317151937Sjkim UINT32 DebugLayer, 318151937Sjkim UINT32 Flags); 31987031Smsmith 320151937Sjkim 32167754Smsmith/* 32267754Smsmith * Object manipulation and enumeration 32367754Smsmith */ 32467754SmsmithACPI_STATUS 32567754SmsmithAcpiEvaluateObject ( 32667754Smsmith ACPI_HANDLE Object, 32767754Smsmith ACPI_STRING Pathname, 32867754Smsmith ACPI_OBJECT_LIST *ParameterObjects, 32967754Smsmith ACPI_BUFFER *ReturnObjectBuffer); 33067754Smsmith 33167754SmsmithACPI_STATUS 33299679SiwasakiAcpiEvaluateObjectTyped ( 33399679Siwasaki ACPI_HANDLE Object, 33499679Siwasaki ACPI_STRING Pathname, 33599679Siwasaki ACPI_OBJECT_LIST *ExternalParams, 33699679Siwasaki ACPI_BUFFER *ReturnBuffer, 33799679Siwasaki ACPI_OBJECT_TYPE ReturnType); 33899679Siwasaki 33999679SiwasakiACPI_STATUS 34067754SmsmithAcpiGetObjectInfo ( 341207344Sjkim ACPI_HANDLE Object, 342197104Sjkim ACPI_DEVICE_INFO **ReturnBuffer); 34367754Smsmith 34467754SmsmithACPI_STATUS 345193267SjkimAcpiInstallMethod ( 346193267Sjkim UINT8 *Buffer); 347193267Sjkim 348193267SjkimACPI_STATUS 34967754SmsmithAcpiGetNextObject ( 35067754Smsmith ACPI_OBJECT_TYPE Type, 35167754Smsmith ACPI_HANDLE Parent, 35267754Smsmith ACPI_HANDLE Child, 35367754Smsmith ACPI_HANDLE *OutHandle); 35467754Smsmith 35567754SmsmithACPI_STATUS 35667754SmsmithAcpiGetType ( 35767754Smsmith ACPI_HANDLE Object, 35867754Smsmith ACPI_OBJECT_TYPE *OutType); 35967754Smsmith 36067754SmsmithACPI_STATUS 36167754SmsmithAcpiGetParent ( 36267754Smsmith ACPI_HANDLE Object, 36367754Smsmith ACPI_HANDLE *OutHandle); 36467754Smsmith 36567754Smsmith 36667754Smsmith/* 367193267Sjkim * Handler interfaces 36867754Smsmith */ 36967754SmsmithACPI_STATUS 370193267SjkimAcpiInstallInitializationHandler ( 371193267Sjkim ACPI_INIT_HANDLER Handler, 372193267Sjkim UINT32 Function); 373193267Sjkim 374193267SjkimACPI_STATUS 37567754SmsmithAcpiInstallFixedEventHandler ( 37667754Smsmith UINT32 AcpiEvent, 37777424Smsmith ACPI_EVENT_HANDLER Handler, 37867754Smsmith void *Context); 37967754Smsmith 38067754SmsmithACPI_STATUS 38167754SmsmithAcpiRemoveFixedEventHandler ( 38267754Smsmith UINT32 AcpiEvent, 38377424Smsmith ACPI_EVENT_HANDLER Handler); 38467754Smsmith 38567754SmsmithACPI_STATUS 38667754SmsmithAcpiInstallNotifyHandler ( 38767754Smsmith ACPI_HANDLE Device, 38867754Smsmith UINT32 HandlerType, 38977424Smsmith ACPI_NOTIFY_HANDLER Handler, 39067754Smsmith void *Context); 39167754Smsmith 39267754SmsmithACPI_STATUS 39367754SmsmithAcpiRemoveNotifyHandler ( 39467754Smsmith ACPI_HANDLE Device, 39567754Smsmith UINT32 HandlerType, 39677424Smsmith ACPI_NOTIFY_HANDLER Handler); 39767754Smsmith 39867754SmsmithACPI_STATUS 39967754SmsmithAcpiInstallAddressSpaceHandler ( 40067754Smsmith ACPI_HANDLE Device, 40177424Smsmith ACPI_ADR_SPACE_TYPE SpaceId, 40277424Smsmith ACPI_ADR_SPACE_HANDLER Handler, 40377424Smsmith ACPI_ADR_SPACE_SETUP Setup, 40467754Smsmith void *Context); 40567754Smsmith 40667754SmsmithACPI_STATUS 40767754SmsmithAcpiRemoveAddressSpaceHandler ( 40867754Smsmith ACPI_HANDLE Device, 40977424Smsmith ACPI_ADR_SPACE_TYPE SpaceId, 41077424Smsmith ACPI_ADR_SPACE_HANDLER Handler); 41167754Smsmith 41267754SmsmithACPI_STATUS 41367754SmsmithAcpiInstallGpeHandler ( 414117521Snjl ACPI_HANDLE GpeDevice, 41567754Smsmith UINT32 GpeNumber, 41667754Smsmith UINT32 Type, 417129684Snjl ACPI_EVENT_HANDLER Address, 41867754Smsmith void *Context); 41967754Smsmith 42067754SmsmithACPI_STATUS 421193267SjkimAcpiRemoveGpeHandler ( 422193267Sjkim ACPI_HANDLE GpeDevice, 423193267Sjkim UINT32 GpeNumber, 424193267Sjkim ACPI_EVENT_HANDLER Address); 425193267Sjkim 426193267SjkimACPI_STATUS 427138287SmarksAcpiInstallExceptionHandler ( 428138287Smarks ACPI_EXCEPTION_HANDLER Handler); 429138287Smarks 430138287Smarks 431138287Smarks/* 432138287Smarks * Event interfaces 433138287Smarks */ 434138287SmarksACPI_STATUS 43567754SmsmithAcpiAcquireGlobalLock ( 436107325Siwasaki UINT16 Timeout, 43791116Smsmith UINT32 *Handle); 43867754Smsmith 43967754SmsmithACPI_STATUS 44067754SmsmithAcpiReleaseGlobalLock ( 44191116Smsmith UINT32 Handle); 44267754Smsmith 44367754SmsmithACPI_STATUS 44467754SmsmithAcpiEnableEvent ( 445117521Snjl UINT32 Event, 44684491Smsmith UINT32 Flags); 44767754Smsmith 44867754SmsmithACPI_STATUS 44967754SmsmithAcpiDisableEvent ( 450117521Snjl UINT32 Event, 45184491Smsmith UINT32 Flags); 45267754Smsmith 45367754SmsmithACPI_STATUS 45467754SmsmithAcpiClearEvent ( 455117521Snjl UINT32 Event); 45667754Smsmith 45767754SmsmithACPI_STATUS 45867754SmsmithAcpiGetEventStatus ( 459117521Snjl UINT32 Event, 46067754Smsmith ACPI_EVENT_STATUS *EventStatus); 46167754Smsmith 462193267Sjkim 463193267Sjkim/* 464193267Sjkim * GPE Interfaces 465193267Sjkim */ 466117521SnjlACPI_STATUS 467206117SjkimAcpiSetGpe ( 468129684Snjl ACPI_HANDLE GpeDevice, 469129684Snjl UINT32 GpeNumber, 470206117Sjkim UINT8 Action); 471129684Snjl 472129684SnjlACPI_STATUS 473117521SnjlAcpiEnableGpe ( 474117521Snjl ACPI_HANDLE GpeDevice, 475117521Snjl UINT32 GpeNumber, 476206117Sjkim UINT8 GpeType); 477117521Snjl 478117521SnjlACPI_STATUS 479117521SnjlAcpiDisableGpe ( 480117521Snjl ACPI_HANDLE GpeDevice, 481117521Snjl UINT32 GpeNumber, 482206117Sjkim UINT8 GpeType); 483117521Snjl 484117521SnjlACPI_STATUS 485117521SnjlAcpiClearGpe ( 486117521Snjl ACPI_HANDLE GpeDevice, 487206117Sjkim UINT32 GpeNumber); 488117521Snjl 489117521SnjlACPI_STATUS 490117521SnjlAcpiGetGpeStatus ( 491117521Snjl ACPI_HANDLE GpeDevice, 492117521Snjl UINT32 GpeNumber, 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 ( 530207344Sjkim ACPI_HANDLE Device, 531167802Sjkim char *Name, 532167802Sjkim ACPI_VENDOR_UUID *Uuid, 533167802Sjkim ACPI_BUFFER *RetBuffer); 534114237Snjl 53567754SmsmithACPI_STATUS 536207344SjkimAcpiGetCurrentResources ( 537207344Sjkim ACPI_HANDLE Device, 53867754Smsmith ACPI_BUFFER *RetBuffer); 53967754Smsmith 54067754SmsmithACPI_STATUS 541207344SjkimAcpiGetPossibleResources ( 542207344Sjkim ACPI_HANDLE Device, 54367754Smsmith ACPI_BUFFER *RetBuffer); 54467754Smsmith 54567754SmsmithACPI_STATUS 546114237SnjlAcpiWalkResources ( 547207344Sjkim ACPI_HANDLE Device, 548167802Sjkim char *Name, 549167802Sjkim ACPI_WALK_RESOURCE_CALLBACK UserFunction, 550167802Sjkim void *Context); 551114237Snjl 552114237SnjlACPI_STATUS 55367754SmsmithAcpiSetCurrentResources ( 554207344Sjkim ACPI_HANDLE Device, 55567754Smsmith ACPI_BUFFER *InBuffer); 55667754Smsmith 55767754SmsmithACPI_STATUS 558207344SjkimAcpiGetIrqRoutingTable ( 559207344Sjkim ACPI_HANDLE Device, 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