acpixf.h revision 216471
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
123216471Sjkim#define ACPI_CA_VERSION                 0x20101209
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;
133212761Sjkimextern BOOLEAN              AcpiGbl_SystemAwakeAndRunning;
13477424Smsmith
135193267Sjkim/* Runtime configuration of debug print levels */
136193267Sjkim
137193267Sjkimextern UINT32               AcpiDbgLevel;
138193267Sjkimextern UINT32               AcpiDbgLayer;
139193267Sjkim
140193267Sjkim/* ACPICA runtime options */
141193267Sjkim
142193267Sjkimextern UINT8                AcpiGbl_EnableInterpreterSlack;
143193267Sjkimextern UINT8                AcpiGbl_AllMethodsSerialized;
144193267Sjkimextern UINT8                AcpiGbl_CreateOsiMethod;
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/*
154216471Sjkim * Initialization
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
17880062Smsmith
179216471Sjkim/*
180216471Sjkim * Miscellaneous global interfaces
181216471Sjkim */
18280062SmsmithACPI_STATUS
18367754SmsmithAcpiEnable (
18467754Smsmith    void);
18567754Smsmith
18667754SmsmithACPI_STATUS
18767754SmsmithAcpiDisable (
18867754Smsmith    void);
18967754Smsmith
19067754SmsmithACPI_STATUS
191216471SjkimAcpiSubsystemStatus (
192216471Sjkim    void);
193216471Sjkim
194216471SjkimACPI_STATUS
19580062SmsmithAcpiGetSystemInfo (
19667754Smsmith    ACPI_BUFFER             *RetBuffer);
19767754Smsmith
198193267SjkimACPI_STATUS
199193267SjkimAcpiGetStatistics (
200193267Sjkim    ACPI_STATISTICS         *Stats);
201193267Sjkim
20280062Smsmithconst char *
20367754SmsmithAcpiFormatException (
20480062Smsmith    ACPI_STATUS             Exception);
20567754Smsmith
20687031SmsmithACPI_STATUS
20787031SmsmithAcpiPurgeCachedObjects (
20887031Smsmith    void);
20967754Smsmith
210210976SjkimACPI_STATUS
211210976SjkimAcpiInstallInterface (
212210976Sjkim    ACPI_STRING             InterfaceName);
21387031Smsmith
214210976SjkimACPI_STATUS
215210976SjkimAcpiRemoveInterface (
216210976Sjkim    ACPI_STRING             InterfaceName);
217210976Sjkim
218216471Sjkim
21967754Smsmith/*
220210976Sjkim * ACPI Memory management
22177424Smsmith */
22277424Smsmithvoid *
22377424SmsmithAcpiAllocate (
22477424Smsmith    UINT32                  Size);
22577424Smsmith
22677424Smsmithvoid *
22777424SmsmithAcpiCallocate (
22877424Smsmith    UINT32                  Size);
22977424Smsmith
23077424Smsmithvoid
23177424SmsmithAcpiFree (
23277424Smsmith    void                    *Address);
23377424Smsmith
23477424Smsmith
23577424Smsmith/*
23667754Smsmith * ACPI table manipulation interfaces
23767754Smsmith */
23867754SmsmithACPI_STATUS
239167802SjkimAcpiReallocateRootTable (
240167802Sjkim    void);
241167802Sjkim
242167802SjkimACPI_STATUS
24367754SmsmithAcpiFindRootPointer (
244193267Sjkim    ACPI_SIZE               *RsdpAddress);
24567754Smsmith
24667754SmsmithACPI_STATUS
24767754SmsmithAcpiLoadTables (
24880062Smsmith    void);
24967754Smsmith
25067754SmsmithACPI_STATUS
25167754SmsmithAcpiGetTableHeader (
252167802Sjkim    ACPI_STRING             Signature,
253193267Sjkim    UINT32                  Instance,
25467754Smsmith    ACPI_TABLE_HEADER       *OutTableHeader);
25567754Smsmith
25667754SmsmithACPI_STATUS
25767754SmsmithAcpiGetTable (
258167802Sjkim    ACPI_STRING             Signature,
259193267Sjkim    UINT32                  Instance,
260167802Sjkim    ACPI_TABLE_HEADER       **OutTable);
26167754Smsmith
26278986SmsmithACPI_STATUS
263167802SjkimAcpiGetTableByIndex (
264193267Sjkim    UINT32                  TableIndex,
265167802Sjkim    ACPI_TABLE_HEADER       **OutTable);
26667754Smsmith
267193267SjkimACPI_STATUS
268193267SjkimAcpiInstallTableHandler (
269193267Sjkim    ACPI_TABLE_HANDLER      Handler,
270193267Sjkim    void                    *Context);
27178986Smsmith
272193267SjkimACPI_STATUS
273193267SjkimAcpiRemoveTableHandler (
274193267Sjkim    ACPI_TABLE_HANDLER      Handler);
275193267Sjkim
276193267Sjkim
27767754Smsmith/*
27867754Smsmith * Namespace and name interfaces
27967754Smsmith */
28067754SmsmithACPI_STATUS
28167754SmsmithAcpiWalkNamespace (
28267754Smsmith    ACPI_OBJECT_TYPE        Type,
28367754Smsmith    ACPI_HANDLE             StartObject,
28467754Smsmith    UINT32                  MaxDepth,
285199337Sjkim    ACPI_WALK_CALLBACK      PreOrderVisit,
286199337Sjkim    ACPI_WALK_CALLBACK      PostOrderVisit,
28767754Smsmith    void                    *Context,
288114237Snjl    void                    **ReturnValue);
28967754Smsmith
29067754SmsmithACPI_STATUS
29167754SmsmithAcpiGetDevices (
292114237Snjl    char                    *HID,
29377424Smsmith    ACPI_WALK_CALLBACK      UserFunction,
29467754Smsmith    void                    *Context,
29567754Smsmith    void                    **ReturnValue);
29667754Smsmith
29767754SmsmithACPI_STATUS
29867754SmsmithAcpiGetName (
299207344Sjkim    ACPI_HANDLE             Object,
30067754Smsmith    UINT32                  NameType,
30167754Smsmith    ACPI_BUFFER             *RetPathPtr);
30267754Smsmith
30367754SmsmithACPI_STATUS
30467754SmsmithAcpiGetHandle (
30567754Smsmith    ACPI_HANDLE             Parent,
30667754Smsmith    ACPI_STRING             Pathname,
30767754Smsmith    ACPI_HANDLE             *RetHandle);
30867754Smsmith
30987031SmsmithACPI_STATUS
31087031SmsmithAcpiAttachData (
311207344Sjkim    ACPI_HANDLE             Object,
31287031Smsmith    ACPI_OBJECT_HANDLER     Handler,
31387031Smsmith    void                    *Data);
31467754Smsmith
31587031SmsmithACPI_STATUS
31687031SmsmithAcpiDetachData (
317207344Sjkim    ACPI_HANDLE             Object,
31887031Smsmith    ACPI_OBJECT_HANDLER     Handler);
31987031Smsmith
32087031SmsmithACPI_STATUS
32187031SmsmithAcpiGetData (
322207344Sjkim    ACPI_HANDLE             Object,
32387031Smsmith    ACPI_OBJECT_HANDLER     Handler,
32487031Smsmith    void                    **Data);
32587031Smsmith
326151937SjkimACPI_STATUS
327151937SjkimAcpiDebugTrace (
328151937Sjkim    char                    *Name,
329151937Sjkim    UINT32                  DebugLevel,
330151937Sjkim    UINT32                  DebugLayer,
331151937Sjkim    UINT32                  Flags);
33287031Smsmith
333151937Sjkim
33467754Smsmith/*
33567754Smsmith * Object manipulation and enumeration
33667754Smsmith */
33767754SmsmithACPI_STATUS
33867754SmsmithAcpiEvaluateObject (
33967754Smsmith    ACPI_HANDLE             Object,
34067754Smsmith    ACPI_STRING             Pathname,
34167754Smsmith    ACPI_OBJECT_LIST        *ParameterObjects,
34267754Smsmith    ACPI_BUFFER             *ReturnObjectBuffer);
34367754Smsmith
34467754SmsmithACPI_STATUS
34599679SiwasakiAcpiEvaluateObjectTyped (
34699679Siwasaki    ACPI_HANDLE             Object,
34799679Siwasaki    ACPI_STRING             Pathname,
34899679Siwasaki    ACPI_OBJECT_LIST        *ExternalParams,
34999679Siwasaki    ACPI_BUFFER             *ReturnBuffer,
35099679Siwasaki    ACPI_OBJECT_TYPE        ReturnType);
35199679Siwasaki
35299679SiwasakiACPI_STATUS
35367754SmsmithAcpiGetObjectInfo (
354207344Sjkim    ACPI_HANDLE             Object,
355197104Sjkim    ACPI_DEVICE_INFO        **ReturnBuffer);
35667754Smsmith
35767754SmsmithACPI_STATUS
358193267SjkimAcpiInstallMethod (
359193267Sjkim    UINT8                   *Buffer);
360193267Sjkim
361193267SjkimACPI_STATUS
36267754SmsmithAcpiGetNextObject (
36367754Smsmith    ACPI_OBJECT_TYPE        Type,
36467754Smsmith    ACPI_HANDLE             Parent,
36567754Smsmith    ACPI_HANDLE             Child,
36667754Smsmith    ACPI_HANDLE             *OutHandle);
36767754Smsmith
36867754SmsmithACPI_STATUS
36967754SmsmithAcpiGetType (
37067754Smsmith    ACPI_HANDLE             Object,
37167754Smsmith    ACPI_OBJECT_TYPE        *OutType);
37267754Smsmith
37367754SmsmithACPI_STATUS
37467754SmsmithAcpiGetParent (
37567754Smsmith    ACPI_HANDLE             Object,
37667754Smsmith    ACPI_HANDLE             *OutHandle);
37767754Smsmith
37867754Smsmith
37967754Smsmith/*
380193267Sjkim * Handler interfaces
38167754Smsmith */
38267754SmsmithACPI_STATUS
383193267SjkimAcpiInstallInitializationHandler (
384193267Sjkim    ACPI_INIT_HANDLER       Handler,
385193267Sjkim    UINT32                  Function);
386193267Sjkim
387193267SjkimACPI_STATUS
388216471SjkimAcpiInstallGlobalEventHandler (
389216471Sjkim    ACPI_GBL_EVENT_HANDLER  Handler,
390216471Sjkim    void                    *Context);
391216471Sjkim
392216471SjkimACPI_STATUS
39367754SmsmithAcpiInstallFixedEventHandler (
39467754Smsmith    UINT32                  AcpiEvent,
39577424Smsmith    ACPI_EVENT_HANDLER      Handler,
39667754Smsmith    void                    *Context);
39767754Smsmith
39867754SmsmithACPI_STATUS
39967754SmsmithAcpiRemoveFixedEventHandler (
40067754Smsmith    UINT32                  AcpiEvent,
40177424Smsmith    ACPI_EVENT_HANDLER      Handler);
40267754Smsmith
40367754SmsmithACPI_STATUS
404216471SjkimAcpiInstallGpeHandler (
405216471Sjkim    ACPI_HANDLE             GpeDevice,
406216471Sjkim    UINT32                  GpeNumber,
407216471Sjkim    UINT32                  Type,
408216471Sjkim    ACPI_GPE_HANDLER        Address,
409216471Sjkim    void                    *Context);
410216471Sjkim
411216471SjkimACPI_STATUS
412216471SjkimAcpiRemoveGpeHandler (
413216471Sjkim    ACPI_HANDLE             GpeDevice,
414216471Sjkim    UINT32                  GpeNumber,
415216471Sjkim    ACPI_GPE_HANDLER        Address);
416216471Sjkim
417216471SjkimACPI_STATUS
41867754SmsmithAcpiInstallNotifyHandler (
41967754Smsmith    ACPI_HANDLE             Device,
42067754Smsmith    UINT32                  HandlerType,
42177424Smsmith    ACPI_NOTIFY_HANDLER     Handler,
42267754Smsmith    void                    *Context);
42367754Smsmith
42467754SmsmithACPI_STATUS
42567754SmsmithAcpiRemoveNotifyHandler (
42667754Smsmith    ACPI_HANDLE             Device,
42767754Smsmith    UINT32                  HandlerType,
42877424Smsmith    ACPI_NOTIFY_HANDLER     Handler);
42967754Smsmith
43067754SmsmithACPI_STATUS
43167754SmsmithAcpiInstallAddressSpaceHandler (
43267754Smsmith    ACPI_HANDLE             Device,
43377424Smsmith    ACPI_ADR_SPACE_TYPE     SpaceId,
43477424Smsmith    ACPI_ADR_SPACE_HANDLER  Handler,
43577424Smsmith    ACPI_ADR_SPACE_SETUP    Setup,
43667754Smsmith    void                    *Context);
43767754Smsmith
43867754SmsmithACPI_STATUS
43967754SmsmithAcpiRemoveAddressSpaceHandler (
44067754Smsmith    ACPI_HANDLE             Device,
44177424Smsmith    ACPI_ADR_SPACE_TYPE     SpaceId,
44277424Smsmith    ACPI_ADR_SPACE_HANDLER  Handler);
44367754Smsmith
44467754SmsmithACPI_STATUS
445138287SmarksAcpiInstallExceptionHandler (
446138287Smarks    ACPI_EXCEPTION_HANDLER  Handler);
447138287Smarks
448210976SjkimACPI_STATUS
449210976SjkimAcpiInstallInterfaceHandler (
450210976Sjkim    ACPI_INTERFACE_HANDLER  Handler);
451138287Smarks
452210976Sjkim
453138287Smarks/*
454216471Sjkim * Global Lock interfaces
455138287Smarks */
456138287SmarksACPI_STATUS
45767754SmsmithAcpiAcquireGlobalLock (
458107325Siwasaki    UINT16                  Timeout,
45991116Smsmith    UINT32                  *Handle);
46067754Smsmith
46167754SmsmithACPI_STATUS
46267754SmsmithAcpiReleaseGlobalLock (
46391116Smsmith    UINT32                  Handle);
46467754Smsmith
465216471Sjkim
466216471Sjkim/*
467216471Sjkim * Fixed Event interfaces
468216471Sjkim */
46967754SmsmithACPI_STATUS
47067754SmsmithAcpiEnableEvent (
471117521Snjl    UINT32                  Event,
47284491Smsmith    UINT32                  Flags);
47367754Smsmith
47467754SmsmithACPI_STATUS
47567754SmsmithAcpiDisableEvent (
476117521Snjl    UINT32                  Event,
47784491Smsmith    UINT32                  Flags);
47867754Smsmith
47967754SmsmithACPI_STATUS
48067754SmsmithAcpiClearEvent (
481117521Snjl    UINT32                  Event);
48267754Smsmith
48367754SmsmithACPI_STATUS
48467754SmsmithAcpiGetEventStatus (
485117521Snjl    UINT32                  Event,
48667754Smsmith    ACPI_EVENT_STATUS       *EventStatus);
48767754Smsmith
488193267Sjkim
489193267Sjkim/*
490216471Sjkim * General Purpose Event (GPE) Interfaces
491193267Sjkim */
492117521SnjlACPI_STATUS
493216471SjkimAcpiUpdateAllGpes (
494216471Sjkim    void);
495129684Snjl
496129684SnjlACPI_STATUS
497117521SnjlAcpiEnableGpe (
498117521Snjl    ACPI_HANDLE             GpeDevice,
499209746Sjkim    UINT32                  GpeNumber);
500117521Snjl
501117521SnjlACPI_STATUS
502117521SnjlAcpiDisableGpe (
503117521Snjl    ACPI_HANDLE             GpeDevice,
504209746Sjkim    UINT32                  GpeNumber);
505117521Snjl
506117521SnjlACPI_STATUS
507117521SnjlAcpiClearGpe (
508117521Snjl    ACPI_HANDLE             GpeDevice,
509206117Sjkim    UINT32                  GpeNumber);
510117521Snjl
511117521SnjlACPI_STATUS
512216471SjkimAcpiSetGpe (
513209746Sjkim    ACPI_HANDLE             GpeDevice,
514209746Sjkim    UINT32                  GpeNumber,
515209746Sjkim    UINT8                   Action);
516209746Sjkim
517209746SjkimACPI_STATUS
518216471SjkimAcpiFinishGpe (
519216471Sjkim    ACPI_HANDLE             GpeDevice,
520216471Sjkim    UINT32                  GpeNumber);
521216471Sjkim
522216471SjkimACPI_STATUS
523216471SjkimAcpiSetupGpeForWake (
524216471Sjkim    ACPI_HANDLE             ParentDevice,
525216471Sjkim    ACPI_HANDLE             GpeDevice,
526216471Sjkim    UINT32                  GpeNumber);
527216471Sjkim
528216471SjkimACPI_STATUS
529216471SjkimAcpiSetGpeWakeMask (
530216471Sjkim    ACPI_HANDLE             GpeDevice,
531216471Sjkim    UINT32                  GpeNumber,
532216471Sjkim    UINT8                   Action);
533216471Sjkim
534216471SjkimACPI_STATUS
535117521SnjlAcpiGetGpeStatus (
536117521Snjl    ACPI_HANDLE             GpeDevice,
537117521Snjl    UINT32                  GpeNumber,
538117521Snjl    ACPI_EVENT_STATUS       *EventStatus);
539117521Snjl
540117521SnjlACPI_STATUS
541193267SjkimAcpiDisableAllGpes (
542193267Sjkim    void);
543193267Sjkim
544193267SjkimACPI_STATUS
545193267SjkimAcpiEnableAllRuntimeGpes (
546193267Sjkim    void);
547193267Sjkim
548193267SjkimACPI_STATUS
549193267SjkimAcpiGetGpeDevice (
550193267Sjkim    UINT32                  GpeIndex,
551193267Sjkim    ACPI_HANDLE             *GpeDevice);
552193267Sjkim
553193267SjkimACPI_STATUS
554117521SnjlAcpiInstallGpeBlock (
555117521Snjl    ACPI_HANDLE             GpeDevice,
556117521Snjl    ACPI_GENERIC_ADDRESS    *GpeBlockAddress,
557117521Snjl    UINT32                  RegisterCount,
558151937Sjkim    UINT32                  InterruptNumber);
559117521Snjl
560117521SnjlACPI_STATUS
561117521SnjlAcpiRemoveGpeBlock (
562117521Snjl    ACPI_HANDLE             GpeDevice);
563117521Snjl
564117521Snjl
56567754Smsmith/*
56667754Smsmith * Resource interfaces
56767754Smsmith */
568114237Snjltypedef
569114237SnjlACPI_STATUS (*ACPI_WALK_RESOURCE_CALLBACK) (
570114237Snjl    ACPI_RESOURCE           *Resource,
571114237Snjl    void                    *Context);
572114237Snjl
573167802SjkimACPI_STATUS
574167802SjkimAcpiGetVendorResource (
575207344Sjkim    ACPI_HANDLE             Device,
576167802Sjkim    char                    *Name,
577167802Sjkim    ACPI_VENDOR_UUID        *Uuid,
578167802Sjkim    ACPI_BUFFER             *RetBuffer);
579114237Snjl
58067754SmsmithACPI_STATUS
581207344SjkimAcpiGetCurrentResources (
582207344Sjkim    ACPI_HANDLE             Device,
58367754Smsmith    ACPI_BUFFER             *RetBuffer);
58467754Smsmith
58567754SmsmithACPI_STATUS
586207344SjkimAcpiGetPossibleResources (
587207344Sjkim    ACPI_HANDLE             Device,
58867754Smsmith    ACPI_BUFFER             *RetBuffer);
58967754Smsmith
59067754SmsmithACPI_STATUS
591114237SnjlAcpiWalkResources (
592207344Sjkim    ACPI_HANDLE                 Device,
593167802Sjkim    char                        *Name,
594167802Sjkim    ACPI_WALK_RESOURCE_CALLBACK UserFunction,
595167802Sjkim    void                        *Context);
596114237Snjl
597114237SnjlACPI_STATUS
59867754SmsmithAcpiSetCurrentResources (
599207344Sjkim    ACPI_HANDLE             Device,
60067754Smsmith    ACPI_BUFFER             *InBuffer);
60167754Smsmith
60267754SmsmithACPI_STATUS
603207344SjkimAcpiGetIrqRoutingTable (
604207344Sjkim    ACPI_HANDLE             Device,
60567754Smsmith    ACPI_BUFFER             *RetBuffer);
60667754Smsmith
607114237SnjlACPI_STATUS
608114237SnjlAcpiResourceToAddress64 (
609114237Snjl    ACPI_RESOURCE           *Resource,
610114237Snjl    ACPI_RESOURCE_ADDRESS64 *Out);
61167754Smsmith
612193267Sjkim
61367754Smsmith/*
61467754Smsmith * Hardware (ACPI device) interfaces
61567754Smsmith */
61667754SmsmithACPI_STATUS
617193267SjkimAcpiReset (
618193267Sjkim    void);
619193267Sjkim
620193267SjkimACPI_STATUS
621193267SjkimAcpiRead (
622197104Sjkim    UINT64                  *Value,
623193267Sjkim    ACPI_GENERIC_ADDRESS    *Reg);
624193267Sjkim
625193267SjkimACPI_STATUS
626193267SjkimAcpiWrite (
627197104Sjkim    UINT64                  Value,
628193267Sjkim    ACPI_GENERIC_ADDRESS    *Reg);
629193267Sjkim
630193267SjkimACPI_STATUS
631193267SjkimAcpiReadBitRegister (
63299679Siwasaki    UINT32                  RegisterId,
633167802Sjkim    UINT32                  *ReturnValue);
63499679Siwasaki
63599679SiwasakiACPI_STATUS
636193267SjkimAcpiWriteBitRegister (
63799679Siwasaki    UINT32                  RegisterId,
638167802Sjkim    UINT32                  Value);
63999679Siwasaki
64099679SiwasakiACPI_STATUS
64199679SiwasakiAcpiGetSleepTypeData (
64299679Siwasaki    UINT8                   SleepState,
64399679Siwasaki    UINT8                   *Slp_TypA,
64499679Siwasaki    UINT8                   *Slp_TypB);
64587031Smsmith
64667754SmsmithACPI_STATUS
64787031SmsmithAcpiEnterSleepStatePrep (
64899679Siwasaki    UINT8                   SleepState);
64987031Smsmith
65087031SmsmithACPI_STATUS
65171867SmsmithAcpiEnterSleepState (
65299679Siwasaki    UINT8                   SleepState);
65371867Smsmith
65471867SmsmithACPI_STATUS
655114237SnjlAcpiEnterSleepStateS4bios (
656114237Snjl    void);
657114237Snjl
658114237SnjlACPI_STATUS
65982367SmsmithAcpiLeaveSleepState (
660193267Sjkim    UINT8                   SleepState)
661193267Sjkim    ;
662193267SjkimACPI_STATUS
663193267SjkimAcpiSetFirmwareWakingVector (
664193267Sjkim    UINT32                  PhysicalAddress);
66567754Smsmith
666193267Sjkim#if ACPI_MACHINE_WIDTH == 64
667193267SjkimACPI_STATUS
668193267SjkimAcpiSetFirmwareWakingVector64 (
669193267Sjkim    UINT64                  PhysicalAddress);
670193267Sjkim#endif
67199679Siwasaki
672193267Sjkim
673193267Sjkim/*
674193267Sjkim * Error/Warning output
675193267Sjkim */
676193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE
677193267SjkimAcpiError (
678193267Sjkim    const char              *ModuleName,
679193267Sjkim    UINT32                  LineNumber,
680193267Sjkim    const char              *Format,
681193267Sjkim    ...) ACPI_PRINTF_LIKE(3);
682193267Sjkim
683193267Sjkimvoid  ACPI_INTERNAL_VAR_XFACE
684193267SjkimAcpiException (
685193267Sjkim    const char              *ModuleName,
686193267Sjkim    UINT32                  LineNumber,
687193267Sjkim    ACPI_STATUS             Status,
688193267Sjkim    const char              *Format,
689193267Sjkim    ...) ACPI_PRINTF_LIKE(4);
690193267Sjkim
691193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE
692193267SjkimAcpiWarning (
693193267Sjkim    const char              *ModuleName,
694193267Sjkim    UINT32                  LineNumber,
695193267Sjkim    const char              *Format,
696193267Sjkim    ...) ACPI_PRINTF_LIKE(3);
697193267Sjkim
698193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE
699193267SjkimAcpiInfo (
700193267Sjkim    const char              *ModuleName,
701193267Sjkim    UINT32                  LineNumber,
702193267Sjkim    const char              *Format,
703193267Sjkim    ...) ACPI_PRINTF_LIKE(3);
704193267Sjkim
705193267Sjkim
706193267Sjkim/*
707193267Sjkim * Debug output
708193267Sjkim */
709193267Sjkim#ifdef ACPI_DEBUG_OUTPUT
710193267Sjkim
711193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE
712193267SjkimAcpiDebugPrint (
713193267Sjkim    UINT32                  RequestedDebugLevel,
714193267Sjkim    UINT32                  LineNumber,
715193267Sjkim    const char              *FunctionName,
716193267Sjkim    const char              *ModuleName,
717193267Sjkim    UINT32                  ComponentId,
718193267Sjkim    const char              *Format,
719193267Sjkim    ...) ACPI_PRINTF_LIKE(6);
720193267Sjkim
721193267Sjkimvoid ACPI_INTERNAL_VAR_XFACE
722193267SjkimAcpiDebugPrintRaw (
723193267Sjkim    UINT32                  RequestedDebugLevel,
724193267Sjkim    UINT32                  LineNumber,
725193267Sjkim    const char              *FunctionName,
726193267Sjkim    const char              *ModuleName,
727193267Sjkim    UINT32                  ComponentId,
728193267Sjkim    const char              *Format,
729193267Sjkim    ...) ACPI_PRINTF_LIKE(6);
730193267Sjkim#endif
731193267Sjkim
73267754Smsmith#endif /* __ACXFACE_H__ */
733