acpixf.h revision 193341
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
123193267Sjkim#define ACPI_CA_VERSION                 0x20090521
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,
27077424Smsmith    ACPI_WALK_CALLBACK      UserFunction,
27167754Smsmith    void                    *Context,
272114237Snjl    void                    **ReturnValue);
27367754Smsmith
27467754SmsmithACPI_STATUS
27567754SmsmithAcpiGetDevices (
276114237Snjl    char                    *HID,
27777424Smsmith    ACPI_WALK_CALLBACK      UserFunction,
27867754Smsmith    void                    *Context,
27967754Smsmith    void                    **ReturnValue);
28067754Smsmith
28167754SmsmithACPI_STATUS
28267754SmsmithAcpiGetName (
28367754Smsmith    ACPI_HANDLE             Handle,
28467754Smsmith    UINT32                  NameType,
28567754Smsmith    ACPI_BUFFER             *RetPathPtr);
28667754Smsmith
28767754SmsmithACPI_STATUS
28867754SmsmithAcpiGetHandle (
28967754Smsmith    ACPI_HANDLE             Parent,
29067754Smsmith    ACPI_STRING             Pathname,
29167754Smsmith    ACPI_HANDLE             *RetHandle);
29267754Smsmith
29387031SmsmithACPI_STATUS
29487031SmsmithAcpiAttachData (
29587031Smsmith    ACPI_HANDLE             ObjHandle,
29687031Smsmith    ACPI_OBJECT_HANDLER     Handler,
29787031Smsmith    void                    *Data);
29867754Smsmith
29987031SmsmithACPI_STATUS
30087031SmsmithAcpiDetachData (
30187031Smsmith    ACPI_HANDLE             ObjHandle,
30287031Smsmith    ACPI_OBJECT_HANDLER     Handler);
30387031Smsmith
30487031SmsmithACPI_STATUS
30587031SmsmithAcpiGetData (
30687031Smsmith    ACPI_HANDLE             ObjHandle,
30787031Smsmith    ACPI_OBJECT_HANDLER     Handler,
30887031Smsmith    void                    **Data);
30987031Smsmith
310151937SjkimACPI_STATUS
311151937SjkimAcpiDebugTrace (
312151937Sjkim    char                    *Name,
313151937Sjkim    UINT32                  DebugLevel,
314151937Sjkim    UINT32                  DebugLayer,
315151937Sjkim    UINT32                  Flags);
31687031Smsmith
317151937Sjkim
31867754Smsmith/*
31967754Smsmith * Object manipulation and enumeration
32067754Smsmith */
32167754SmsmithACPI_STATUS
32267754SmsmithAcpiEvaluateObject (
32367754Smsmith    ACPI_HANDLE             Object,
32467754Smsmith    ACPI_STRING             Pathname,
32567754Smsmith    ACPI_OBJECT_LIST        *ParameterObjects,
32667754Smsmith    ACPI_BUFFER             *ReturnObjectBuffer);
32767754Smsmith
32867754SmsmithACPI_STATUS
32999679SiwasakiAcpiEvaluateObjectTyped (
33099679Siwasaki    ACPI_HANDLE             Object,
33199679Siwasaki    ACPI_STRING             Pathname,
33299679Siwasaki    ACPI_OBJECT_LIST        *ExternalParams,
33399679Siwasaki    ACPI_BUFFER             *ReturnBuffer,
33499679Siwasaki    ACPI_OBJECT_TYPE        ReturnType);
33599679Siwasaki
33699679SiwasakiACPI_STATUS
33767754SmsmithAcpiGetObjectInfo (
338117521Snjl    ACPI_HANDLE             Handle,
339117521Snjl    ACPI_BUFFER             *ReturnBuffer);
34067754Smsmith
34167754SmsmithACPI_STATUS
342193267SjkimAcpiInstallMethod (
343193267Sjkim    UINT8                   *Buffer);
344193267Sjkim
345193267SjkimACPI_STATUS
34667754SmsmithAcpiGetNextObject (
34767754Smsmith    ACPI_OBJECT_TYPE        Type,
34867754Smsmith    ACPI_HANDLE             Parent,
34967754Smsmith    ACPI_HANDLE             Child,
35067754Smsmith    ACPI_HANDLE             *OutHandle);
35167754Smsmith
35267754SmsmithACPI_STATUS
35367754SmsmithAcpiGetType (
35467754Smsmith    ACPI_HANDLE             Object,
35567754Smsmith    ACPI_OBJECT_TYPE        *OutType);
35667754Smsmith
35767754SmsmithACPI_STATUS
35867754SmsmithAcpiGetParent (
35967754Smsmith    ACPI_HANDLE             Object,
36067754Smsmith    ACPI_HANDLE             *OutHandle);
36167754Smsmith
36267754Smsmith
36367754Smsmith/*
364193267Sjkim * Handler interfaces
36567754Smsmith */
36667754SmsmithACPI_STATUS
367193267SjkimAcpiInstallInitializationHandler (
368193267Sjkim    ACPI_INIT_HANDLER       Handler,
369193267Sjkim    UINT32                  Function);
370193267Sjkim
371193267SjkimACPI_STATUS
37267754SmsmithAcpiInstallFixedEventHandler (
37367754Smsmith    UINT32                  AcpiEvent,
37477424Smsmith    ACPI_EVENT_HANDLER      Handler,
37567754Smsmith    void                    *Context);
37667754Smsmith
37767754SmsmithACPI_STATUS
37867754SmsmithAcpiRemoveFixedEventHandler (
37967754Smsmith    UINT32                  AcpiEvent,
38077424Smsmith    ACPI_EVENT_HANDLER      Handler);
38167754Smsmith
38267754SmsmithACPI_STATUS
38367754SmsmithAcpiInstallNotifyHandler (
38467754Smsmith    ACPI_HANDLE             Device,
38567754Smsmith    UINT32                  HandlerType,
38677424Smsmith    ACPI_NOTIFY_HANDLER     Handler,
38767754Smsmith    void                    *Context);
38867754Smsmith
38967754SmsmithACPI_STATUS
39067754SmsmithAcpiRemoveNotifyHandler (
39167754Smsmith    ACPI_HANDLE             Device,
39267754Smsmith    UINT32                  HandlerType,
39377424Smsmith    ACPI_NOTIFY_HANDLER     Handler);
39467754Smsmith
39567754SmsmithACPI_STATUS
39667754SmsmithAcpiInstallAddressSpaceHandler (
39767754Smsmith    ACPI_HANDLE             Device,
39877424Smsmith    ACPI_ADR_SPACE_TYPE     SpaceId,
39977424Smsmith    ACPI_ADR_SPACE_HANDLER  Handler,
40077424Smsmith    ACPI_ADR_SPACE_SETUP    Setup,
40167754Smsmith    void                    *Context);
40267754Smsmith
40367754SmsmithACPI_STATUS
40467754SmsmithAcpiRemoveAddressSpaceHandler (
40567754Smsmith    ACPI_HANDLE             Device,
40677424Smsmith    ACPI_ADR_SPACE_TYPE     SpaceId,
40777424Smsmith    ACPI_ADR_SPACE_HANDLER  Handler);
40867754Smsmith
40967754SmsmithACPI_STATUS
41067754SmsmithAcpiInstallGpeHandler (
411117521Snjl    ACPI_HANDLE             GpeDevice,
41267754Smsmith    UINT32                  GpeNumber,
41367754Smsmith    UINT32                  Type,
414129684Snjl    ACPI_EVENT_HANDLER      Address,
41567754Smsmith    void                    *Context);
41667754Smsmith
41767754SmsmithACPI_STATUS
418193267SjkimAcpiRemoveGpeHandler (
419193267Sjkim    ACPI_HANDLE             GpeDevice,
420193267Sjkim    UINT32                  GpeNumber,
421193267Sjkim    ACPI_EVENT_HANDLER      Address);
422193267Sjkim
423193267SjkimACPI_STATUS
424138287SmarksAcpiInstallExceptionHandler (
425138287Smarks    ACPI_EXCEPTION_HANDLER  Handler);
426138287Smarks
427138287Smarks
428138287Smarks/*
429138287Smarks * Event interfaces
430138287Smarks */
431138287SmarksACPI_STATUS
43267754SmsmithAcpiAcquireGlobalLock (
433107325Siwasaki    UINT16                  Timeout,
43491116Smsmith    UINT32                  *Handle);
43567754Smsmith
43667754SmsmithACPI_STATUS
43767754SmsmithAcpiReleaseGlobalLock (
43891116Smsmith    UINT32                  Handle);
43967754Smsmith
44067754SmsmithACPI_STATUS
44167754SmsmithAcpiEnableEvent (
442117521Snjl    UINT32                  Event,
44384491Smsmith    UINT32                  Flags);
44467754Smsmith
44567754SmsmithACPI_STATUS
44667754SmsmithAcpiDisableEvent (
447117521Snjl    UINT32                  Event,
44884491Smsmith    UINT32                  Flags);
44967754Smsmith
45067754SmsmithACPI_STATUS
45167754SmsmithAcpiClearEvent (
452117521Snjl    UINT32                  Event);
45367754Smsmith
45467754SmsmithACPI_STATUS
45567754SmsmithAcpiGetEventStatus (
456117521Snjl    UINT32                  Event,
45767754Smsmith    ACPI_EVENT_STATUS       *EventStatus);
45867754Smsmith
459193267Sjkim
460193267Sjkim/*
461193267Sjkim * GPE Interfaces
462193267Sjkim */
463117521SnjlACPI_STATUS
464129684SnjlAcpiSetGpeType (
465129684Snjl    ACPI_HANDLE             GpeDevice,
466129684Snjl    UINT32                  GpeNumber,
467129684Snjl    UINT8                   Type);
468129684Snjl
469129684SnjlACPI_STATUS
470117521SnjlAcpiEnableGpe (
471117521Snjl    ACPI_HANDLE             GpeDevice,
472117521Snjl    UINT32                  GpeNumber,
473117521Snjl    UINT32                  Flags);
474117521Snjl
475117521SnjlACPI_STATUS
476117521SnjlAcpiDisableGpe (
477117521Snjl    ACPI_HANDLE             GpeDevice,
478117521Snjl    UINT32                  GpeNumber,
479117521Snjl    UINT32                  Flags);
480117521Snjl
481117521SnjlACPI_STATUS
482117521SnjlAcpiClearGpe (
483117521Snjl    ACPI_HANDLE             GpeDevice,
484117521Snjl    UINT32                  GpeNumber,
485117521Snjl    UINT32                  Flags);
486117521Snjl
487117521SnjlACPI_STATUS
488117521SnjlAcpiGetGpeStatus (
489117521Snjl    ACPI_HANDLE             GpeDevice,
490117521Snjl    UINT32                  GpeNumber,
491117521Snjl    UINT32                  Flags,
492117521Snjl    ACPI_EVENT_STATUS       *EventStatus);
493117521Snjl
494117521SnjlACPI_STATUS
495193267SjkimAcpiDisableAllGpes (
496193267Sjkim    void);
497193267Sjkim
498193267SjkimACPI_STATUS
499193267SjkimAcpiEnableAllRuntimeGpes (
500193267Sjkim    void);
501193267Sjkim
502193267SjkimACPI_STATUS
503193267SjkimAcpiGetGpeDevice (
504193267Sjkim    UINT32                  GpeIndex,
505193267Sjkim    ACPI_HANDLE             *GpeDevice);
506193267Sjkim
507193267SjkimACPI_STATUS
508117521SnjlAcpiInstallGpeBlock (
509117521Snjl    ACPI_HANDLE             GpeDevice,
510117521Snjl    ACPI_GENERIC_ADDRESS    *GpeBlockAddress,
511117521Snjl    UINT32                  RegisterCount,
512151937Sjkim    UINT32                  InterruptNumber);
513117521Snjl
514117521SnjlACPI_STATUS
515117521SnjlAcpiRemoveGpeBlock (
516117521Snjl    ACPI_HANDLE             GpeDevice);
517117521Snjl
518117521Snjl
51967754Smsmith/*
52067754Smsmith * Resource interfaces
52167754Smsmith */
522114237Snjltypedef
523114237SnjlACPI_STATUS (*ACPI_WALK_RESOURCE_CALLBACK) (
524114237Snjl    ACPI_RESOURCE           *Resource,
525114237Snjl    void                    *Context);
526114237Snjl
527167802SjkimACPI_STATUS
528167802SjkimAcpiGetVendorResource (
529167802Sjkim    ACPI_HANDLE             DeviceHandle,
530167802Sjkim    char                    *Name,
531167802Sjkim    ACPI_VENDOR_UUID        *Uuid,
532167802Sjkim    ACPI_BUFFER             *RetBuffer);
533114237Snjl
53467754SmsmithACPI_STATUS
53567754SmsmithAcpiGetCurrentResources(
53667754Smsmith    ACPI_HANDLE             DeviceHandle,
53767754Smsmith    ACPI_BUFFER             *RetBuffer);
53867754Smsmith
53967754SmsmithACPI_STATUS
54067754SmsmithAcpiGetPossibleResources(
54167754Smsmith    ACPI_HANDLE             DeviceHandle,
54267754Smsmith    ACPI_BUFFER             *RetBuffer);
54367754Smsmith
54467754SmsmithACPI_STATUS
545114237SnjlAcpiWalkResources (
546167802Sjkim    ACPI_HANDLE                 DeviceHandle,
547167802Sjkim    char                        *Name,
548167802Sjkim    ACPI_WALK_RESOURCE_CALLBACK UserFunction,
549167802Sjkim    void                        *Context);
550114237Snjl
551114237SnjlACPI_STATUS
55267754SmsmithAcpiSetCurrentResources (
55367754Smsmith    ACPI_HANDLE             DeviceHandle,
55467754Smsmith    ACPI_BUFFER             *InBuffer);
55567754Smsmith
55667754SmsmithACPI_STATUS
55767754SmsmithAcpiGetIrqRoutingTable  (
55867754Smsmith    ACPI_HANDLE             BusDeviceHandle,
55967754Smsmith    ACPI_BUFFER             *RetBuffer);
56067754Smsmith
561114237SnjlACPI_STATUS
562114237SnjlAcpiResourceToAddress64 (
563114237Snjl    ACPI_RESOURCE           *Resource,
564114237Snjl    ACPI_RESOURCE_ADDRESS64 *Out);
56567754Smsmith
566193267Sjkim
56767754Smsmith/*
56867754Smsmith * Hardware (ACPI device) interfaces
56967754Smsmith */
57067754SmsmithACPI_STATUS
571193267SjkimAcpiReset (
572193267Sjkim    void);
573193267Sjkim
574193267SjkimACPI_STATUS
575193267SjkimAcpiRead (
576193267Sjkim    UINT32                  *Value,
577193267Sjkim    ACPI_GENERIC_ADDRESS    *Reg);
578193267Sjkim
579193267SjkimACPI_STATUS
580193267SjkimAcpiWrite (
581193267Sjkim    UINT32                  Value,
582193267Sjkim    ACPI_GENERIC_ADDRESS    *Reg);
583193267Sjkim
584193267SjkimACPI_STATUS
585193267SjkimAcpiReadBitRegister (
58699679Siwasaki    UINT32                  RegisterId,
587167802Sjkim    UINT32                  *ReturnValue);
58899679Siwasaki
58999679SiwasakiACPI_STATUS
590193267SjkimAcpiWriteBitRegister (
59199679Siwasaki    UINT32                  RegisterId,
592167802Sjkim    UINT32                  Value);
59399679Siwasaki
59499679SiwasakiACPI_STATUS
59599679SiwasakiAcpiGetSleepTypeData (
59699679Siwasaki    UINT8                   SleepState,
59799679Siwasaki    UINT8                   *Slp_TypA,
59899679Siwasaki    UINT8                   *Slp_TypB);
59987031Smsmith
60067754SmsmithACPI_STATUS
60187031SmsmithAcpiEnterSleepStatePrep (
60299679Siwasaki    UINT8                   SleepState);
60387031Smsmith
60487031SmsmithACPI_STATUS
60571867SmsmithAcpiEnterSleepState (
60699679Siwasaki    UINT8                   SleepState);
60771867Smsmith
60871867SmsmithACPI_STATUS
609114237SnjlAcpiEnterSleepStateS4bios (
610114237Snjl    void);
611114237Snjl
612114237SnjlACPI_STATUS
61382367SmsmithAcpiLeaveSleepState (
614193267Sjkim    UINT8                   SleepState)
615193267Sjkim    ;
616193267SjkimACPI_STATUS
617193267SjkimAcpiSetFirmwareWakingVector (
618193267Sjkim    UINT32                  PhysicalAddress);
61967754Smsmith
620193267Sjkim#if ACPI_MACHINE_WIDTH == 64
621193267SjkimACPI_STATUS
622193267SjkimAcpiSetFirmwareWakingVector64 (
623193267Sjkim    UINT64                  PhysicalAddress);
624193267Sjkim#endif
62599679Siwasaki
626193267Sjkim
627193267Sjkim/*
628193267Sjkim * Error/Warning output
629193267Sjkim */
630193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE
631193267SjkimAcpiError (
632193267Sjkim    const char              *ModuleName,
633193267Sjkim    UINT32                  LineNumber,
634193267Sjkim    const char              *Format,
635193267Sjkim    ...) ACPI_PRINTF_LIKE(3);
636193267Sjkim
637193267Sjkimvoid  ACPI_INTERNAL_VAR_XFACE
638193267SjkimAcpiException (
639193267Sjkim    const char              *ModuleName,
640193267Sjkim    UINT32                  LineNumber,
641193267Sjkim    ACPI_STATUS             Status,
642193267Sjkim    const char              *Format,
643193267Sjkim    ...) ACPI_PRINTF_LIKE(4);
644193267Sjkim
645193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE
646193267SjkimAcpiWarning (
647193267Sjkim    const char              *ModuleName,
648193267Sjkim    UINT32                  LineNumber,
649193267Sjkim    const char              *Format,
650193267Sjkim    ...) ACPI_PRINTF_LIKE(3);
651193267Sjkim
652193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE
653193267SjkimAcpiInfo (
654193267Sjkim    const char              *ModuleName,
655193267Sjkim    UINT32                  LineNumber,
656193267Sjkim    const char              *Format,
657193267Sjkim    ...) ACPI_PRINTF_LIKE(3);
658193267Sjkim
659193267Sjkim
660193267Sjkim/*
661193267Sjkim * Debug output
662193267Sjkim */
663193267Sjkim#ifdef ACPI_DEBUG_OUTPUT
664193267Sjkim
665193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE
666193267SjkimAcpiDebugPrint (
667193267Sjkim    UINT32                  RequestedDebugLevel,
668193267Sjkim    UINT32                  LineNumber,
669193267Sjkim    const char              *FunctionName,
670193267Sjkim    const char              *ModuleName,
671193267Sjkim    UINT32                  ComponentId,
672193267Sjkim    const char              *Format,
673193267Sjkim    ...) ACPI_PRINTF_LIKE(6);
674193267Sjkim
675193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE
676193267SjkimAcpiDebugPrintRaw (
677193267Sjkim    UINT32                  RequestedDebugLevel,
678193267Sjkim    UINT32                  LineNumber,
679193267Sjkim    const char              *FunctionName,
680193267Sjkim    const char              *ModuleName,
681193267Sjkim    UINT32                  ComponentId,
682193267Sjkim    const char              *Format,
683193267Sjkim    ...) ACPI_PRINTF_LIKE(6);
684193267Sjkim#endif
685193267Sjkim
68667754Smsmith#endif /* __ACXFACE_H__ */
687