xref: /titanic_52/usr/src/uts/intel/sys/acpi/acpixf.h (revision 385cc6b4ad1792caef3f84eb61eed3f27085801f)
17c478bd9Sstevel@tonic-gate /******************************************************************************
27c478bd9Sstevel@tonic-gate  *
37c478bd9Sstevel@tonic-gate  * Name: acpixf.h - External interfaces to the ACPI subsystem
47c478bd9Sstevel@tonic-gate  *
57c478bd9Sstevel@tonic-gate  *****************************************************************************/
67c478bd9Sstevel@tonic-gate 
726f3cdf0SGordon Ross /*
8*385cc6b4SJerry Jelinek  * Copyright (C) 2000 - 2016, Intel Corp.
97c478bd9Sstevel@tonic-gate  * All rights reserved.
107c478bd9Sstevel@tonic-gate  *
1126f3cdf0SGordon Ross  * Redistribution and use in source and binary forms, with or without
1226f3cdf0SGordon Ross  * modification, are permitted provided that the following conditions
1326f3cdf0SGordon Ross  * are met:
1426f3cdf0SGordon Ross  * 1. Redistributions of source code must retain the above copyright
1526f3cdf0SGordon Ross  *    notice, this list of conditions, and the following disclaimer,
1626f3cdf0SGordon Ross  *    without modification.
1726f3cdf0SGordon Ross  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
1826f3cdf0SGordon Ross  *    substantially similar to the "NO WARRANTY" disclaimer below
1926f3cdf0SGordon Ross  *    ("Disclaimer") and any redistribution must be conditioned upon
2026f3cdf0SGordon Ross  *    including a substantially similar Disclaimer requirement for further
2126f3cdf0SGordon Ross  *    binary redistribution.
2226f3cdf0SGordon Ross  * 3. Neither the names of the above-listed copyright holders nor the names
2326f3cdf0SGordon Ross  *    of any contributors may be used to endorse or promote products derived
2426f3cdf0SGordon Ross  *    from this software without specific prior written permission.
257c478bd9Sstevel@tonic-gate  *
2626f3cdf0SGordon Ross  * Alternatively, this software may be distributed under the terms of the
2726f3cdf0SGordon Ross  * GNU General Public License ("GPL") version 2 as published by the Free
2826f3cdf0SGordon Ross  * Software Foundation.
297c478bd9Sstevel@tonic-gate  *
3026f3cdf0SGordon Ross  * NO WARRANTY
3126f3cdf0SGordon Ross  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3226f3cdf0SGordon Ross  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3326f3cdf0SGordon Ross  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
3426f3cdf0SGordon Ross  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3526f3cdf0SGordon Ross  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3626f3cdf0SGordon Ross  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3726f3cdf0SGordon Ross  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3826f3cdf0SGordon Ross  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
3926f3cdf0SGordon Ross  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
4026f3cdf0SGordon Ross  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
4126f3cdf0SGordon Ross  * POSSIBILITY OF SUCH DAMAGES.
4226f3cdf0SGordon Ross  */
437c478bd9Sstevel@tonic-gate 
447c478bd9Sstevel@tonic-gate #ifndef __ACXFACE_H__
457c478bd9Sstevel@tonic-gate #define __ACXFACE_H__
467c478bd9Sstevel@tonic-gate 
47aa2aa9a6SDana Myers /* Current ACPICA subsystem version in YYYYMMDD format */
48aa2aa9a6SDana Myers 
49*385cc6b4SJerry Jelinek #define ACPI_CA_VERSION                 0x20160527
50aa2aa9a6SDana Myers 
51*385cc6b4SJerry Jelinek #include "acconfig.h"
527c478bd9Sstevel@tonic-gate #include "actypes.h"
537c478bd9Sstevel@tonic-gate #include "actbl.h"
54*385cc6b4SJerry Jelinek #include "acbuffer.h"
55*385cc6b4SJerry Jelinek 
56*385cc6b4SJerry Jelinek 
57*385cc6b4SJerry Jelinek /*****************************************************************************
58*385cc6b4SJerry Jelinek  *
59*385cc6b4SJerry Jelinek  * Macros used for ACPICA globals and configuration
60*385cc6b4SJerry Jelinek  *
61*385cc6b4SJerry Jelinek  ****************************************************************************/
627c478bd9Sstevel@tonic-gate 
63aa2aa9a6SDana Myers /*
64*385cc6b4SJerry Jelinek  * Ensure that global variables are defined and initialized only once.
65*385cc6b4SJerry Jelinek  *
66*385cc6b4SJerry Jelinek  * The use of these macros allows for a single list of globals (here)
67*385cc6b4SJerry Jelinek  * in order to simplify maintenance of the code.
68aa2aa9a6SDana Myers  */
69*385cc6b4SJerry Jelinek #ifdef DEFINE_ACPI_GLOBALS
70*385cc6b4SJerry Jelinek #define ACPI_GLOBAL(type,name) \
71*385cc6b4SJerry Jelinek     extern type name; \
72*385cc6b4SJerry Jelinek     type name
73aa2aa9a6SDana Myers 
74*385cc6b4SJerry Jelinek #define ACPI_INIT_GLOBAL(type,name,value) \
75*385cc6b4SJerry Jelinek     type name=value
76aa2aa9a6SDana Myers 
77*385cc6b4SJerry Jelinek #else
78*385cc6b4SJerry Jelinek #ifndef ACPI_GLOBAL
79*385cc6b4SJerry Jelinek #define ACPI_GLOBAL(type,name) \
80*385cc6b4SJerry Jelinek     extern type name
81*385cc6b4SJerry Jelinek #endif
8257190917SDana Myers 
83*385cc6b4SJerry Jelinek #ifndef ACPI_INIT_GLOBAL
84*385cc6b4SJerry Jelinek #define ACPI_INIT_GLOBAL(type,name,value) \
85*385cc6b4SJerry Jelinek     extern type name
86*385cc6b4SJerry Jelinek #endif
87*385cc6b4SJerry Jelinek #endif
8857190917SDana Myers 
89*385cc6b4SJerry Jelinek /*
90*385cc6b4SJerry Jelinek  * These macros configure the various ACPICA interfaces. They are
91*385cc6b4SJerry Jelinek  * useful for generating stub inline functions for features that are
92*385cc6b4SJerry Jelinek  * configured out of the current kernel or ACPICA application.
93*385cc6b4SJerry Jelinek  */
94*385cc6b4SJerry Jelinek #ifndef ACPI_EXTERNAL_RETURN_STATUS
95*385cc6b4SJerry Jelinek #define ACPI_EXTERNAL_RETURN_STATUS(Prototype) \
96*385cc6b4SJerry Jelinek     Prototype;
97*385cc6b4SJerry Jelinek #endif
98aa2aa9a6SDana Myers 
99*385cc6b4SJerry Jelinek #ifndef ACPI_EXTERNAL_RETURN_OK
100*385cc6b4SJerry Jelinek #define ACPI_EXTERNAL_RETURN_OK(Prototype) \
101*385cc6b4SJerry Jelinek     Prototype;
102*385cc6b4SJerry Jelinek #endif
103*385cc6b4SJerry Jelinek 
104*385cc6b4SJerry Jelinek #ifndef ACPI_EXTERNAL_RETURN_VOID
105*385cc6b4SJerry Jelinek #define ACPI_EXTERNAL_RETURN_VOID(Prototype) \
106*385cc6b4SJerry Jelinek     Prototype;
107*385cc6b4SJerry Jelinek #endif
108*385cc6b4SJerry Jelinek 
109*385cc6b4SJerry Jelinek #ifndef ACPI_EXTERNAL_RETURN_UINT32
110*385cc6b4SJerry Jelinek #define ACPI_EXTERNAL_RETURN_UINT32(Prototype) \
111*385cc6b4SJerry Jelinek     Prototype;
112*385cc6b4SJerry Jelinek #endif
113*385cc6b4SJerry Jelinek 
114*385cc6b4SJerry Jelinek #ifndef ACPI_EXTERNAL_RETURN_PTR
115*385cc6b4SJerry Jelinek #define ACPI_EXTERNAL_RETURN_PTR(Prototype) \
116*385cc6b4SJerry Jelinek     Prototype;
117*385cc6b4SJerry Jelinek #endif
118*385cc6b4SJerry Jelinek 
119*385cc6b4SJerry Jelinek 
120*385cc6b4SJerry Jelinek /*****************************************************************************
121*385cc6b4SJerry Jelinek  *
122*385cc6b4SJerry Jelinek  * Public globals and runtime configuration options
123*385cc6b4SJerry Jelinek  *
124*385cc6b4SJerry Jelinek  ****************************************************************************/
125*385cc6b4SJerry Jelinek 
126*385cc6b4SJerry Jelinek /*
127*385cc6b4SJerry Jelinek  * Enable "slack mode" of the AML interpreter?  Default is FALSE, and the
128*385cc6b4SJerry Jelinek  * interpreter strictly follows the ACPI specification. Setting to TRUE
129*385cc6b4SJerry Jelinek  * allows the interpreter to ignore certain errors and/or bad AML constructs.
130*385cc6b4SJerry Jelinek  *
131*385cc6b4SJerry Jelinek  * Currently, these features are enabled by this flag:
132*385cc6b4SJerry Jelinek  *
133*385cc6b4SJerry Jelinek  * 1) Allow "implicit return" of last value in a control method
134*385cc6b4SJerry Jelinek  * 2) Allow access beyond the end of an operation region
135*385cc6b4SJerry Jelinek  * 3) Allow access to uninitialized locals/args (auto-init to integer 0)
136*385cc6b4SJerry Jelinek  * 4) Allow ANY object type to be a source operand for the Store() operator
137*385cc6b4SJerry Jelinek  * 5) Allow unresolved references (invalid target name) in package objects
138*385cc6b4SJerry Jelinek  * 6) Enable warning messages for behavior that is not ACPI spec compliant
139*385cc6b4SJerry Jelinek  */
140*385cc6b4SJerry Jelinek ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_EnableInterpreterSlack, FALSE);
141*385cc6b4SJerry Jelinek 
142*385cc6b4SJerry Jelinek /*
143*385cc6b4SJerry Jelinek  * Automatically serialize all methods that create named objects? Default
144*385cc6b4SJerry Jelinek  * is TRUE, meaning that all NonSerialized methods are scanned once at
145*385cc6b4SJerry Jelinek  * table load time to determine those that create named objects. Methods
146*385cc6b4SJerry Jelinek  * that create named objects are marked Serialized in order to prevent
147*385cc6b4SJerry Jelinek  * possible run-time problems if they are entered by more than one thread.
148*385cc6b4SJerry Jelinek  */
149*385cc6b4SJerry Jelinek ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_AutoSerializeMethods, TRUE);
150*385cc6b4SJerry Jelinek 
151*385cc6b4SJerry Jelinek /*
152*385cc6b4SJerry Jelinek  * Create the predefined _OSI method in the namespace? Default is TRUE
153*385cc6b4SJerry Jelinek  * because ACPICA is fully compatible with other ACPI implementations.
154*385cc6b4SJerry Jelinek  * Changing this will revert ACPICA (and machine ASL) to pre-OSI behavior.
155*385cc6b4SJerry Jelinek  */
156*385cc6b4SJerry Jelinek ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_CreateOsiMethod, TRUE);
157*385cc6b4SJerry Jelinek 
158*385cc6b4SJerry Jelinek /*
159*385cc6b4SJerry Jelinek  * Optionally use default values for the ACPI register widths. Set this to
160*385cc6b4SJerry Jelinek  * TRUE to use the defaults, if an FADT contains incorrect widths/lengths.
161*385cc6b4SJerry Jelinek  */
162*385cc6b4SJerry Jelinek ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_UseDefaultRegisterWidths, TRUE);
163*385cc6b4SJerry Jelinek 
164*385cc6b4SJerry Jelinek /*
165*385cc6b4SJerry Jelinek  * Whether or not to verify the table checksum before installation. Set
166*385cc6b4SJerry Jelinek  * this to TRUE to verify the table checksum before install it to the table
167*385cc6b4SJerry Jelinek  * manager. Note that enabling this option causes errors to happen in some
168*385cc6b4SJerry Jelinek  * OSPMs during early initialization stages. Default behavior is to do such
169*385cc6b4SJerry Jelinek  * verification.
170*385cc6b4SJerry Jelinek  */
171*385cc6b4SJerry Jelinek ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_VerifyTableChecksum, TRUE);
172*385cc6b4SJerry Jelinek 
173*385cc6b4SJerry Jelinek /*
174*385cc6b4SJerry Jelinek  * Optionally enable output from the AML Debug Object.
175*385cc6b4SJerry Jelinek  */
176*385cc6b4SJerry Jelinek ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_EnableAmlDebugObject, FALSE);
177*385cc6b4SJerry Jelinek 
178*385cc6b4SJerry Jelinek /*
179*385cc6b4SJerry Jelinek  * Optionally copy the entire DSDT to local memory (instead of simply
180*385cc6b4SJerry Jelinek  * mapping it.) There are some BIOSs that corrupt or replace the original
181*385cc6b4SJerry Jelinek  * DSDT, creating the need for this option. Default is FALSE, do not copy
182*385cc6b4SJerry Jelinek  * the DSDT.
183*385cc6b4SJerry Jelinek  */
184*385cc6b4SJerry Jelinek ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_CopyDsdtLocally, FALSE);
185*385cc6b4SJerry Jelinek 
186*385cc6b4SJerry Jelinek /*
187*385cc6b4SJerry Jelinek  * Optionally ignore an XSDT if present and use the RSDT instead.
188*385cc6b4SJerry Jelinek  * Although the ACPI specification requires that an XSDT be used instead
189*385cc6b4SJerry Jelinek  * of the RSDT, the XSDT has been found to be corrupt or ill-formed on
190*385cc6b4SJerry Jelinek  * some machines. Default behavior is to use the XSDT if present.
191*385cc6b4SJerry Jelinek  */
192*385cc6b4SJerry Jelinek ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_DoNotUseXsdt, FALSE);
193*385cc6b4SJerry Jelinek 
194*385cc6b4SJerry Jelinek /*
195*385cc6b4SJerry Jelinek  * Optionally support group module level code.
196*385cc6b4SJerry Jelinek  */
197*385cc6b4SJerry Jelinek ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_GroupModuleLevelCode, FALSE);
198*385cc6b4SJerry Jelinek 
199*385cc6b4SJerry Jelinek /*
200*385cc6b4SJerry Jelinek  * Optionally use 32-bit FADT addresses if and when there is a conflict
201*385cc6b4SJerry Jelinek  * (address mismatch) between the 32-bit and 64-bit versions of the
202*385cc6b4SJerry Jelinek  * address. Although ACPICA adheres to the ACPI specification which
203*385cc6b4SJerry Jelinek  * requires the use of the corresponding 64-bit address if it is non-zero,
204*385cc6b4SJerry Jelinek  * some machines have been found to have a corrupted non-zero 64-bit
205*385cc6b4SJerry Jelinek  * address. Default is FALSE, do not favor the 32-bit addresses.
206*385cc6b4SJerry Jelinek  */
207*385cc6b4SJerry Jelinek ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_Use32BitFadtAddresses, FALSE);
208*385cc6b4SJerry Jelinek 
209*385cc6b4SJerry Jelinek /*
210*385cc6b4SJerry Jelinek  * Optionally use 32-bit FACS table addresses.
211*385cc6b4SJerry Jelinek  * It is reported that some platforms fail to resume from system suspending
212*385cc6b4SJerry Jelinek  * if 64-bit FACS table address is selected:
213*385cc6b4SJerry Jelinek  * https://bugzilla.kernel.org/show_bug.cgi?id=74021
214*385cc6b4SJerry Jelinek  * Default is TRUE, favor the 32-bit addresses.
215*385cc6b4SJerry Jelinek  */
216*385cc6b4SJerry Jelinek ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_Use32BitFacsAddresses, TRUE);
217*385cc6b4SJerry Jelinek 
218*385cc6b4SJerry Jelinek /*
219*385cc6b4SJerry Jelinek  * Optionally truncate I/O addresses to 16 bits. Provides compatibility
220*385cc6b4SJerry Jelinek  * with other ACPI implementations. NOTE: During ACPICA initialization,
221*385cc6b4SJerry Jelinek  * this value is set to TRUE if any Windows OSI strings have been
222*385cc6b4SJerry Jelinek  * requested by the BIOS.
223*385cc6b4SJerry Jelinek  */
224*385cc6b4SJerry Jelinek ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_TruncateIoAddresses, FALSE);
225*385cc6b4SJerry Jelinek 
226*385cc6b4SJerry Jelinek /*
227*385cc6b4SJerry Jelinek  * Disable runtime checking and repair of values returned by control methods.
228*385cc6b4SJerry Jelinek  * Use only if the repair is causing a problem on a particular machine.
229*385cc6b4SJerry Jelinek  */
230*385cc6b4SJerry Jelinek ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_DisableAutoRepair, FALSE);
231*385cc6b4SJerry Jelinek 
232*385cc6b4SJerry Jelinek /*
233*385cc6b4SJerry Jelinek  * Optionally do not install any SSDTs from the RSDT/XSDT during initialization.
234*385cc6b4SJerry Jelinek  * This can be useful for debugging ACPI problems on some machines.
235*385cc6b4SJerry Jelinek  */
236*385cc6b4SJerry Jelinek ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_DisableSsdtTableInstall, FALSE);
237*385cc6b4SJerry Jelinek 
238*385cc6b4SJerry Jelinek /*
239*385cc6b4SJerry Jelinek  * Optionally enable runtime namespace override.
240*385cc6b4SJerry Jelinek  */
241*385cc6b4SJerry Jelinek ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_RuntimeNamespaceOverride, TRUE);
242*385cc6b4SJerry Jelinek 
243*385cc6b4SJerry Jelinek /*
244*385cc6b4SJerry Jelinek  * We keep track of the latest version of Windows that has been requested by
245*385cc6b4SJerry Jelinek  * the BIOS. ACPI 5.0.
246*385cc6b4SJerry Jelinek  */
247*385cc6b4SJerry Jelinek ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_OsiData, 0);
248*385cc6b4SJerry Jelinek 
249*385cc6b4SJerry Jelinek /*
250*385cc6b4SJerry Jelinek  * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
251*385cc6b4SJerry Jelinek  * that the ACPI hardware is no longer required. A flag in the FADT indicates
252*385cc6b4SJerry Jelinek  * a reduced HW machine, and that flag is duplicated here for convenience.
253*385cc6b4SJerry Jelinek  */
254*385cc6b4SJerry Jelinek ACPI_INIT_GLOBAL (BOOLEAN,          AcpiGbl_ReducedHardware, FALSE);
255*385cc6b4SJerry Jelinek 
256*385cc6b4SJerry Jelinek /*
257*385cc6b4SJerry Jelinek  * This mechanism is used to trace a specified AML method. The method is
258*385cc6b4SJerry Jelinek  * traced each time it is executed.
259*385cc6b4SJerry Jelinek  */
260*385cc6b4SJerry Jelinek ACPI_INIT_GLOBAL (UINT32,           AcpiGbl_TraceFlags, 0);
261*385cc6b4SJerry Jelinek ACPI_INIT_GLOBAL (const char *,     AcpiGbl_TraceMethodName, NULL);
262*385cc6b4SJerry Jelinek ACPI_INIT_GLOBAL (UINT32,           AcpiGbl_TraceDbgLevel, ACPI_TRACE_LEVEL_DEFAULT);
263*385cc6b4SJerry Jelinek ACPI_INIT_GLOBAL (UINT32,           AcpiGbl_TraceDbgLayer, ACPI_TRACE_LAYER_DEFAULT);
264*385cc6b4SJerry Jelinek 
265*385cc6b4SJerry Jelinek /*
266*385cc6b4SJerry Jelinek  * Runtime configuration of debug output control masks. We want the debug
267*385cc6b4SJerry Jelinek  * switches statically initialized so they are already set when the debugger
268*385cc6b4SJerry Jelinek  * is entered.
269*385cc6b4SJerry Jelinek  */
270*385cc6b4SJerry Jelinek #ifdef ACPI_DEBUG_OUTPUT
271*385cc6b4SJerry Jelinek ACPI_INIT_GLOBAL (UINT32,           AcpiDbgLevel, ACPI_DEBUG_DEFAULT);
272*385cc6b4SJerry Jelinek #else
273*385cc6b4SJerry Jelinek ACPI_INIT_GLOBAL (UINT32,           AcpiDbgLevel, ACPI_NORMAL_DEFAULT);
274*385cc6b4SJerry Jelinek #endif
275*385cc6b4SJerry Jelinek ACPI_INIT_GLOBAL (UINT32,           AcpiDbgLayer, ACPI_COMPONENT_DEFAULT);
276*385cc6b4SJerry Jelinek 
277*385cc6b4SJerry Jelinek /* Optionally enable timer output with Debug Object output */
278*385cc6b4SJerry Jelinek 
279*385cc6b4SJerry Jelinek ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_DisplayDebugTimer, FALSE);
280*385cc6b4SJerry Jelinek 
281*385cc6b4SJerry Jelinek /*
282*385cc6b4SJerry Jelinek  * Other miscellaneous globals
283*385cc6b4SJerry Jelinek  */
284*385cc6b4SJerry Jelinek ACPI_GLOBAL (ACPI_TABLE_FADT,       AcpiGbl_FADT);
285*385cc6b4SJerry Jelinek ACPI_GLOBAL (UINT32,                AcpiCurrentGpeCount);
286*385cc6b4SJerry Jelinek ACPI_GLOBAL (BOOLEAN,               AcpiGbl_SystemAwakeAndRunning);
287*385cc6b4SJerry Jelinek 
288*385cc6b4SJerry Jelinek 
289*385cc6b4SJerry Jelinek /*****************************************************************************
290*385cc6b4SJerry Jelinek  *
291*385cc6b4SJerry Jelinek  * ACPICA public interface configuration.
292*385cc6b4SJerry Jelinek  *
293*385cc6b4SJerry Jelinek  * Interfaces that are configured out of the ACPICA build are replaced
294*385cc6b4SJerry Jelinek  * by inlined stubs by default.
295*385cc6b4SJerry Jelinek  *
296*385cc6b4SJerry Jelinek  ****************************************************************************/
297*385cc6b4SJerry Jelinek 
298*385cc6b4SJerry Jelinek /*
299*385cc6b4SJerry Jelinek  * Hardware-reduced prototypes (default: Not hardware reduced).
300*385cc6b4SJerry Jelinek  *
301*385cc6b4SJerry Jelinek  * All ACPICA hardware-related interfaces that use these macros will be
302*385cc6b4SJerry Jelinek  * configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag
303*385cc6b4SJerry Jelinek  * is set to TRUE.
304*385cc6b4SJerry Jelinek  *
305*385cc6b4SJerry Jelinek  * Note: This static build option for reduced hardware is intended to
306*385cc6b4SJerry Jelinek  * reduce ACPICA code size if desired or necessary. However, even if this
307*385cc6b4SJerry Jelinek  * option is not specified, the runtime behavior of ACPICA is dependent
308*385cc6b4SJerry Jelinek  * on the actual FADT reduced hardware flag (HW_REDUCED_ACPI). If set,
309*385cc6b4SJerry Jelinek  * the flag will enable similar behavior -- ACPICA will not attempt
310*385cc6b4SJerry Jelinek  * to access any ACPI-relate hardware (SCI, GPEs, Fixed Events, etc.)
311*385cc6b4SJerry Jelinek  */
312*385cc6b4SJerry Jelinek #if (!ACPI_REDUCED_HARDWARE)
313*385cc6b4SJerry Jelinek #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
314*385cc6b4SJerry Jelinek     ACPI_EXTERNAL_RETURN_STATUS(Prototype)
315*385cc6b4SJerry Jelinek 
316*385cc6b4SJerry Jelinek #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \
317*385cc6b4SJerry Jelinek     ACPI_EXTERNAL_RETURN_OK(Prototype)
318*385cc6b4SJerry Jelinek 
319*385cc6b4SJerry Jelinek #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \
320*385cc6b4SJerry Jelinek     ACPI_EXTERNAL_RETURN_VOID(Prototype)
321*385cc6b4SJerry Jelinek 
322*385cc6b4SJerry Jelinek #else
323*385cc6b4SJerry Jelinek #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
324*385cc6b4SJerry Jelinek     static ACPI_INLINE Prototype {return(AE_NOT_CONFIGURED);}
325*385cc6b4SJerry Jelinek 
326*385cc6b4SJerry Jelinek #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \
327*385cc6b4SJerry Jelinek     static ACPI_INLINE Prototype {return(AE_OK);}
328*385cc6b4SJerry Jelinek 
329*385cc6b4SJerry Jelinek #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \
330*385cc6b4SJerry Jelinek     static ACPI_INLINE Prototype {return;}
331*385cc6b4SJerry Jelinek 
332*385cc6b4SJerry Jelinek #endif /* !ACPI_REDUCED_HARDWARE */
333*385cc6b4SJerry Jelinek 
334*385cc6b4SJerry Jelinek 
335*385cc6b4SJerry Jelinek /*
336*385cc6b4SJerry Jelinek  * Error message prototypes (default: error messages enabled).
337*385cc6b4SJerry Jelinek  *
338*385cc6b4SJerry Jelinek  * All interfaces related to error and warning messages
339*385cc6b4SJerry Jelinek  * will be configured out of the ACPICA build if the
340*385cc6b4SJerry Jelinek  * ACPI_NO_ERROR_MESSAGE flag is defined.
341*385cc6b4SJerry Jelinek  */
342*385cc6b4SJerry Jelinek #ifndef ACPI_NO_ERROR_MESSAGES
343*385cc6b4SJerry Jelinek #define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \
344*385cc6b4SJerry Jelinek     Prototype;
345*385cc6b4SJerry Jelinek 
346*385cc6b4SJerry Jelinek #else
347*385cc6b4SJerry Jelinek #define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \
348*385cc6b4SJerry Jelinek     static ACPI_INLINE Prototype {return;}
349*385cc6b4SJerry Jelinek 
350*385cc6b4SJerry Jelinek #endif /* ACPI_NO_ERROR_MESSAGES */
351*385cc6b4SJerry Jelinek 
352*385cc6b4SJerry Jelinek 
353*385cc6b4SJerry Jelinek /*
354*385cc6b4SJerry Jelinek  * Debugging output prototypes (default: no debug output).
355*385cc6b4SJerry Jelinek  *
356*385cc6b4SJerry Jelinek  * All interfaces related to debug output messages
357*385cc6b4SJerry Jelinek  * will be configured out of the ACPICA build unless the
358*385cc6b4SJerry Jelinek  * ACPI_DEBUG_OUTPUT flag is defined.
359*385cc6b4SJerry Jelinek  */
360*385cc6b4SJerry Jelinek #ifdef ACPI_DEBUG_OUTPUT
361*385cc6b4SJerry Jelinek #define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype) \
362*385cc6b4SJerry Jelinek     Prototype;
363*385cc6b4SJerry Jelinek 
364*385cc6b4SJerry Jelinek #else
365*385cc6b4SJerry Jelinek #define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype)
366*385cc6b4SJerry Jelinek #endif /* ACPI_DEBUG_OUTPUT */
367*385cc6b4SJerry Jelinek 
368*385cc6b4SJerry Jelinek 
369*385cc6b4SJerry Jelinek /*
370*385cc6b4SJerry Jelinek  * Application prototypes
371*385cc6b4SJerry Jelinek  *
372*385cc6b4SJerry Jelinek  * All interfaces used by application will be configured
373*385cc6b4SJerry Jelinek  * out of the ACPICA build unless the ACPI_APPLICATION
374*385cc6b4SJerry Jelinek  * flag is defined.
375*385cc6b4SJerry Jelinek  */
376*385cc6b4SJerry Jelinek #ifdef ACPI_APPLICATION
377*385cc6b4SJerry Jelinek #define ACPI_APP_DEPENDENT_RETURN_VOID(Prototype) \
378*385cc6b4SJerry Jelinek     Prototype;
379*385cc6b4SJerry Jelinek 
380*385cc6b4SJerry Jelinek #else
381*385cc6b4SJerry Jelinek #define ACPI_APP_DEPENDENT_RETURN_VOID(Prototype)
382*385cc6b4SJerry Jelinek #endif /* ACPI_APPLICATION */
383*385cc6b4SJerry Jelinek 
384*385cc6b4SJerry Jelinek 
385*385cc6b4SJerry Jelinek /*
386*385cc6b4SJerry Jelinek  * Debugger prototypes
387*385cc6b4SJerry Jelinek  *
388*385cc6b4SJerry Jelinek  * All interfaces used by debugger will be configured
389*385cc6b4SJerry Jelinek  * out of the ACPICA build unless the ACPI_DEBUGGER
390*385cc6b4SJerry Jelinek  * flag is defined.
391*385cc6b4SJerry Jelinek  */
392*385cc6b4SJerry Jelinek #ifdef ACPI_DEBUGGER
393*385cc6b4SJerry Jelinek #define ACPI_DBR_DEPENDENT_RETURN_OK(Prototype) \
394*385cc6b4SJerry Jelinek     ACPI_EXTERNAL_RETURN_OK(Prototype)
395*385cc6b4SJerry Jelinek 
396*385cc6b4SJerry Jelinek #define ACPI_DBR_DEPENDENT_RETURN_VOID(Prototype) \
397*385cc6b4SJerry Jelinek     ACPI_EXTERNAL_RETURN_VOID(Prototype)
398*385cc6b4SJerry Jelinek 
399*385cc6b4SJerry Jelinek #else
400*385cc6b4SJerry Jelinek #define ACPI_DBR_DEPENDENT_RETURN_OK(Prototype) \
401*385cc6b4SJerry Jelinek     static ACPI_INLINE Prototype {return(AE_OK);}
402*385cc6b4SJerry Jelinek 
403*385cc6b4SJerry Jelinek #define ACPI_DBR_DEPENDENT_RETURN_VOID(Prototype) \
404*385cc6b4SJerry Jelinek     static ACPI_INLINE Prototype {return;}
405*385cc6b4SJerry Jelinek 
406*385cc6b4SJerry Jelinek #endif /* ACPI_DEBUGGER */
407*385cc6b4SJerry Jelinek 
408*385cc6b4SJerry Jelinek 
409*385cc6b4SJerry Jelinek /*****************************************************************************
410*385cc6b4SJerry Jelinek  *
411*385cc6b4SJerry Jelinek  * ACPICA public interface prototypes
412*385cc6b4SJerry Jelinek  *
413*385cc6b4SJerry Jelinek  ****************************************************************************/
4147c478bd9Sstevel@tonic-gate 
4157c478bd9Sstevel@tonic-gate /*
41626f3cdf0SGordon Ross  * Initialization
4177c478bd9Sstevel@tonic-gate  */
418*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
4197c478bd9Sstevel@tonic-gate ACPI_STATUS
420db2bae30SDana Myers AcpiInitializeTables (
421db2bae30SDana Myers     ACPI_TABLE_DESC         *InitialStorage,
422db2bae30SDana Myers     UINT32                  InitialTableCount,
423*385cc6b4SJerry Jelinek     BOOLEAN                 AllowResize))
424db2bae30SDana Myers 
425*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
426db2bae30SDana Myers ACPI_STATUS
4277c478bd9Sstevel@tonic-gate AcpiInitializeSubsystem (
428*385cc6b4SJerry Jelinek     void))
4297c478bd9Sstevel@tonic-gate 
430*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
4317c478bd9Sstevel@tonic-gate ACPI_STATUS
4327c478bd9Sstevel@tonic-gate AcpiEnableSubsystem (
433*385cc6b4SJerry Jelinek     UINT32                  Flags))
4347c478bd9Sstevel@tonic-gate 
435*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
4367c478bd9Sstevel@tonic-gate ACPI_STATUS
4377c478bd9Sstevel@tonic-gate AcpiInitializeObjects (
438*385cc6b4SJerry Jelinek     UINT32                  Flags))
4397c478bd9Sstevel@tonic-gate 
440*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
4417c478bd9Sstevel@tonic-gate ACPI_STATUS
4427c478bd9Sstevel@tonic-gate AcpiTerminate (
443*385cc6b4SJerry Jelinek     void))
4447c478bd9Sstevel@tonic-gate 
4457c478bd9Sstevel@tonic-gate 
44626f3cdf0SGordon Ross /*
44726f3cdf0SGordon Ross  * Miscellaneous global interfaces
44826f3cdf0SGordon Ross  */
449*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
4507c478bd9Sstevel@tonic-gate ACPI_STATUS
4517c478bd9Sstevel@tonic-gate AcpiEnable (
452*385cc6b4SJerry Jelinek     void))
4537c478bd9Sstevel@tonic-gate 
454*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
4557c478bd9Sstevel@tonic-gate ACPI_STATUS
4567c478bd9Sstevel@tonic-gate AcpiDisable (
457*385cc6b4SJerry Jelinek     void))
4587c478bd9Sstevel@tonic-gate 
459*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
4607c478bd9Sstevel@tonic-gate ACPI_STATUS
46126f3cdf0SGordon Ross AcpiSubsystemStatus (
462*385cc6b4SJerry Jelinek     void))
46326f3cdf0SGordon Ross 
464*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
46526f3cdf0SGordon Ross ACPI_STATUS
4667c478bd9Sstevel@tonic-gate AcpiGetSystemInfo (
467*385cc6b4SJerry Jelinek     ACPI_BUFFER             *RetBuffer))
4687c478bd9Sstevel@tonic-gate 
469*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
470db2bae30SDana Myers ACPI_STATUS
471db2bae30SDana Myers AcpiGetStatistics (
472*385cc6b4SJerry Jelinek     ACPI_STATISTICS         *Stats))
473db2bae30SDana Myers 
474*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_PTR (
4757c478bd9Sstevel@tonic-gate const char *
4767c478bd9Sstevel@tonic-gate AcpiFormatException (
477*385cc6b4SJerry Jelinek     ACPI_STATUS             Exception))
4787c478bd9Sstevel@tonic-gate 
479*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
4807c478bd9Sstevel@tonic-gate ACPI_STATUS
4817c478bd9Sstevel@tonic-gate AcpiPurgeCachedObjects (
482*385cc6b4SJerry Jelinek     void))
4837c478bd9Sstevel@tonic-gate 
484*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
48526f3cdf0SGordon Ross ACPI_STATUS
48626f3cdf0SGordon Ross AcpiInstallInterface (
487*385cc6b4SJerry Jelinek     ACPI_STRING             InterfaceName))
48826f3cdf0SGordon Ross 
489*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
49026f3cdf0SGordon Ross ACPI_STATUS
49126f3cdf0SGordon Ross AcpiRemoveInterface (
492*385cc6b4SJerry Jelinek     ACPI_STRING             InterfaceName))
493*385cc6b4SJerry Jelinek 
494*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
495*385cc6b4SJerry Jelinek ACPI_STATUS
496*385cc6b4SJerry Jelinek AcpiUpdateInterfaces (
497*385cc6b4SJerry Jelinek     UINT8                   Action))
498*385cc6b4SJerry Jelinek 
499*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_UINT32 (
500*385cc6b4SJerry Jelinek UINT32
501*385cc6b4SJerry Jelinek AcpiCheckAddressRange (
502*385cc6b4SJerry Jelinek     ACPI_ADR_SPACE_TYPE     SpaceId,
503*385cc6b4SJerry Jelinek     ACPI_PHYSICAL_ADDRESS   Address,
504*385cc6b4SJerry Jelinek     ACPI_SIZE               Length,
505*385cc6b4SJerry Jelinek     BOOLEAN                 Warn))
506*385cc6b4SJerry Jelinek 
507*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
508*385cc6b4SJerry Jelinek ACPI_STATUS
509*385cc6b4SJerry Jelinek AcpiDecodePldBuffer (
510*385cc6b4SJerry Jelinek     UINT8                   *InBuffer,
511*385cc6b4SJerry Jelinek     ACPI_SIZE               Length,
512*385cc6b4SJerry Jelinek     ACPI_PLD_INFO           **ReturnBuffer))
51326f3cdf0SGordon Ross 
5147c478bd9Sstevel@tonic-gate 
5157c478bd9Sstevel@tonic-gate /*
516*385cc6b4SJerry Jelinek  * ACPI table load/unload interfaces
5177c478bd9Sstevel@tonic-gate  */
518*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
519*385cc6b4SJerry Jelinek ACPI_STATUS
520*385cc6b4SJerry Jelinek AcpiInstallTable (
521*385cc6b4SJerry Jelinek     ACPI_PHYSICAL_ADDRESS   Address,
522*385cc6b4SJerry Jelinek     BOOLEAN                 Physical))
5237c478bd9Sstevel@tonic-gate 
524*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
525*385cc6b4SJerry Jelinek ACPI_STATUS
526*385cc6b4SJerry Jelinek AcpiLoadTable (
527*385cc6b4SJerry Jelinek     ACPI_TABLE_HEADER       *Table))
5287c478bd9Sstevel@tonic-gate 
529*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
530*385cc6b4SJerry Jelinek ACPI_STATUS
531*385cc6b4SJerry Jelinek AcpiUnloadParentTable (
532*385cc6b4SJerry Jelinek     ACPI_HANDLE             Object))
533*385cc6b4SJerry Jelinek 
534*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
535*385cc6b4SJerry Jelinek ACPI_STATUS
536*385cc6b4SJerry Jelinek AcpiLoadTables (
537*385cc6b4SJerry Jelinek     void))
5387c478bd9Sstevel@tonic-gate 
5397c478bd9Sstevel@tonic-gate 
5407c478bd9Sstevel@tonic-gate /*
5417c478bd9Sstevel@tonic-gate  * ACPI table manipulation interfaces
5427c478bd9Sstevel@tonic-gate  */
543*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
5447c478bd9Sstevel@tonic-gate ACPI_STATUS
545db2bae30SDana Myers AcpiReallocateRootTable (
546*385cc6b4SJerry Jelinek     void))
547db2bae30SDana Myers 
548*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
549db2bae30SDana Myers ACPI_STATUS
5507c478bd9Sstevel@tonic-gate AcpiFindRootPointer (
551*385cc6b4SJerry Jelinek     ACPI_PHYSICAL_ADDRESS   *RsdpAddress))
5527c478bd9Sstevel@tonic-gate 
553*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
5547c478bd9Sstevel@tonic-gate ACPI_STATUS
5557c478bd9Sstevel@tonic-gate AcpiGetTableHeader (
556db2bae30SDana Myers     ACPI_STRING             Signature,
5577c478bd9Sstevel@tonic-gate     UINT32                  Instance,
558*385cc6b4SJerry Jelinek     ACPI_TABLE_HEADER       *OutTableHeader))
5597c478bd9Sstevel@tonic-gate 
560*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
5617c478bd9Sstevel@tonic-gate ACPI_STATUS
5627c478bd9Sstevel@tonic-gate AcpiGetTable (
5637c478bd9Sstevel@tonic-gate     ACPI_STRING             Signature,
5647c478bd9Sstevel@tonic-gate     UINT32                  Instance,
565*385cc6b4SJerry Jelinek     ACPI_TABLE_HEADER       **OutTable))
566db2bae30SDana Myers 
567*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
568db2bae30SDana Myers ACPI_STATUS
569db2bae30SDana Myers AcpiGetTableByIndex (
570db2bae30SDana Myers     UINT32                  TableIndex,
571*385cc6b4SJerry Jelinek     ACPI_TABLE_HEADER       **OutTable))
572db2bae30SDana Myers 
573*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
574db2bae30SDana Myers ACPI_STATUS
575db2bae30SDana Myers AcpiInstallTableHandler (
576db2bae30SDana Myers     ACPI_TABLE_HANDLER      Handler,
577*385cc6b4SJerry Jelinek     void                    *Context))
578db2bae30SDana Myers 
579*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
580db2bae30SDana Myers ACPI_STATUS
581db2bae30SDana Myers AcpiRemoveTableHandler (
582*385cc6b4SJerry Jelinek     ACPI_TABLE_HANDLER      Handler))
5837c478bd9Sstevel@tonic-gate 
5847c478bd9Sstevel@tonic-gate 
5857c478bd9Sstevel@tonic-gate /*
5867c478bd9Sstevel@tonic-gate  * Namespace and name interfaces
5877c478bd9Sstevel@tonic-gate  */
588*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
5897c478bd9Sstevel@tonic-gate ACPI_STATUS
5907c478bd9Sstevel@tonic-gate AcpiWalkNamespace (
5917c478bd9Sstevel@tonic-gate     ACPI_OBJECT_TYPE        Type,
5927c478bd9Sstevel@tonic-gate     ACPI_HANDLE             StartObject,
5937c478bd9Sstevel@tonic-gate     UINT32                  MaxDepth,
594*385cc6b4SJerry Jelinek     ACPI_WALK_CALLBACK      DescendingCallback,
595*385cc6b4SJerry Jelinek     ACPI_WALK_CALLBACK      AscendingCallback,
5967c478bd9Sstevel@tonic-gate     void                    *Context,
597*385cc6b4SJerry Jelinek     void                    **ReturnValue))
5987c478bd9Sstevel@tonic-gate 
599*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
6007c478bd9Sstevel@tonic-gate ACPI_STATUS
6017c478bd9Sstevel@tonic-gate AcpiGetDevices (
6027c478bd9Sstevel@tonic-gate     char                    *HID,
6037c478bd9Sstevel@tonic-gate     ACPI_WALK_CALLBACK      UserFunction,
6047c478bd9Sstevel@tonic-gate     void                    *Context,
605*385cc6b4SJerry Jelinek     void                    **ReturnValue))
6067c478bd9Sstevel@tonic-gate 
607*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
6087c478bd9Sstevel@tonic-gate ACPI_STATUS
6097c478bd9Sstevel@tonic-gate AcpiGetName (
61026f3cdf0SGordon Ross     ACPI_HANDLE             Object,
6117c478bd9Sstevel@tonic-gate     UINT32                  NameType,
612*385cc6b4SJerry Jelinek     ACPI_BUFFER             *RetPathPtr))
6137c478bd9Sstevel@tonic-gate 
614*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
6157c478bd9Sstevel@tonic-gate ACPI_STATUS
6167c478bd9Sstevel@tonic-gate AcpiGetHandle (
6177c478bd9Sstevel@tonic-gate     ACPI_HANDLE             Parent,
6187c478bd9Sstevel@tonic-gate     ACPI_STRING             Pathname,
619*385cc6b4SJerry Jelinek     ACPI_HANDLE             *RetHandle))
6207c478bd9Sstevel@tonic-gate 
621*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
6227c478bd9Sstevel@tonic-gate ACPI_STATUS
6237c478bd9Sstevel@tonic-gate AcpiAttachData (
62426f3cdf0SGordon Ross     ACPI_HANDLE             Object,
6257c478bd9Sstevel@tonic-gate     ACPI_OBJECT_HANDLER     Handler,
626*385cc6b4SJerry Jelinek     void                    *Data))
6277c478bd9Sstevel@tonic-gate 
628*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
6297c478bd9Sstevel@tonic-gate ACPI_STATUS
6307c478bd9Sstevel@tonic-gate AcpiDetachData (
63126f3cdf0SGordon Ross     ACPI_HANDLE             Object,
632*385cc6b4SJerry Jelinek     ACPI_OBJECT_HANDLER     Handler))
6337c478bd9Sstevel@tonic-gate 
634*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
6357c478bd9Sstevel@tonic-gate ACPI_STATUS
6367c478bd9Sstevel@tonic-gate AcpiGetData (
63726f3cdf0SGordon Ross     ACPI_HANDLE             Object,
6387c478bd9Sstevel@tonic-gate     ACPI_OBJECT_HANDLER     Handler,
639*385cc6b4SJerry Jelinek     void                    **Data))
6407c478bd9Sstevel@tonic-gate 
641*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
642186507a7Smyers ACPI_STATUS
643186507a7Smyers AcpiDebugTrace (
644*385cc6b4SJerry Jelinek     const char              *Name,
645186507a7Smyers     UINT32                  DebugLevel,
646186507a7Smyers     UINT32                  DebugLayer,
647*385cc6b4SJerry Jelinek     UINT32                  Flags))
648186507a7Smyers 
6497c478bd9Sstevel@tonic-gate 
6507c478bd9Sstevel@tonic-gate /*
6517c478bd9Sstevel@tonic-gate  * Object manipulation and enumeration
6527c478bd9Sstevel@tonic-gate  */
653*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
6547c478bd9Sstevel@tonic-gate ACPI_STATUS
6557c478bd9Sstevel@tonic-gate AcpiEvaluateObject (
6567c478bd9Sstevel@tonic-gate     ACPI_HANDLE             Object,
6577c478bd9Sstevel@tonic-gate     ACPI_STRING             Pathname,
6587c478bd9Sstevel@tonic-gate     ACPI_OBJECT_LIST        *ParameterObjects,
659*385cc6b4SJerry Jelinek     ACPI_BUFFER             *ReturnObjectBuffer))
6607c478bd9Sstevel@tonic-gate 
661*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
6627c478bd9Sstevel@tonic-gate ACPI_STATUS
6637c478bd9Sstevel@tonic-gate AcpiEvaluateObjectTyped (
6647c478bd9Sstevel@tonic-gate     ACPI_HANDLE             Object,
6657c478bd9Sstevel@tonic-gate     ACPI_STRING             Pathname,
6667c478bd9Sstevel@tonic-gate     ACPI_OBJECT_LIST        *ExternalParams,
6677c478bd9Sstevel@tonic-gate     ACPI_BUFFER             *ReturnBuffer,
668*385cc6b4SJerry Jelinek     ACPI_OBJECT_TYPE        ReturnType))
6697c478bd9Sstevel@tonic-gate 
670*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
6717c478bd9Sstevel@tonic-gate ACPI_STATUS
6727c478bd9Sstevel@tonic-gate AcpiGetObjectInfo (
67326f3cdf0SGordon Ross     ACPI_HANDLE             Object,
674*385cc6b4SJerry Jelinek     ACPI_DEVICE_INFO        **ReturnBuffer))
6757c478bd9Sstevel@tonic-gate 
676*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
6777c478bd9Sstevel@tonic-gate ACPI_STATUS
678aa2aa9a6SDana Myers AcpiInstallMethod (
679*385cc6b4SJerry Jelinek     UINT8                   *Buffer))
680aa2aa9a6SDana Myers 
681*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
682aa2aa9a6SDana Myers ACPI_STATUS
6837c478bd9Sstevel@tonic-gate AcpiGetNextObject (
6847c478bd9Sstevel@tonic-gate     ACPI_OBJECT_TYPE        Type,
6857c478bd9Sstevel@tonic-gate     ACPI_HANDLE             Parent,
6867c478bd9Sstevel@tonic-gate     ACPI_HANDLE             Child,
687*385cc6b4SJerry Jelinek     ACPI_HANDLE             *OutHandle))
6887c478bd9Sstevel@tonic-gate 
689*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
6907c478bd9Sstevel@tonic-gate ACPI_STATUS
6917c478bd9Sstevel@tonic-gate AcpiGetType (
6927c478bd9Sstevel@tonic-gate     ACPI_HANDLE             Object,
693*385cc6b4SJerry Jelinek     ACPI_OBJECT_TYPE        *OutType))
6947c478bd9Sstevel@tonic-gate 
695*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
6967c478bd9Sstevel@tonic-gate ACPI_STATUS
6977c478bd9Sstevel@tonic-gate AcpiGetParent (
6987c478bd9Sstevel@tonic-gate     ACPI_HANDLE             Object,
699*385cc6b4SJerry Jelinek     ACPI_HANDLE             *OutHandle))
7007c478bd9Sstevel@tonic-gate 
7017c478bd9Sstevel@tonic-gate 
7027c478bd9Sstevel@tonic-gate /*
703aa2aa9a6SDana Myers  * Handler interfaces
7047c478bd9Sstevel@tonic-gate  */
705*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
7067c478bd9Sstevel@tonic-gate ACPI_STATUS
707aa2aa9a6SDana Myers AcpiInstallInitializationHandler (
708aa2aa9a6SDana Myers     ACPI_INIT_HANDLER       Handler,
709*385cc6b4SJerry Jelinek     UINT32                  Function))
710aa2aa9a6SDana Myers 
711*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
712*385cc6b4SJerry Jelinek ACPI_STATUS
713*385cc6b4SJerry Jelinek AcpiInstallSciHandler (
714*385cc6b4SJerry Jelinek     ACPI_SCI_HANDLER        Address,
715*385cc6b4SJerry Jelinek     void                    *Context))
716*385cc6b4SJerry Jelinek 
717*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
718*385cc6b4SJerry Jelinek ACPI_STATUS
719*385cc6b4SJerry Jelinek AcpiRemoveSciHandler (
720*385cc6b4SJerry Jelinek     ACPI_SCI_HANDLER        Address))
721*385cc6b4SJerry Jelinek 
722*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
723aa2aa9a6SDana Myers ACPI_STATUS
72426f3cdf0SGordon Ross AcpiInstallGlobalEventHandler (
72526f3cdf0SGordon Ross     ACPI_GBL_EVENT_HANDLER  Handler,
726*385cc6b4SJerry Jelinek     void                    *Context))
72726f3cdf0SGordon Ross 
728*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
72926f3cdf0SGordon Ross ACPI_STATUS
7307c478bd9Sstevel@tonic-gate AcpiInstallFixedEventHandler (
7317c478bd9Sstevel@tonic-gate     UINT32                  AcpiEvent,
7327c478bd9Sstevel@tonic-gate     ACPI_EVENT_HANDLER      Handler,
733*385cc6b4SJerry Jelinek     void                    *Context))
7347c478bd9Sstevel@tonic-gate 
735*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
7367c478bd9Sstevel@tonic-gate ACPI_STATUS
7377c478bd9Sstevel@tonic-gate AcpiRemoveFixedEventHandler (
7387c478bd9Sstevel@tonic-gate     UINT32                  AcpiEvent,
739*385cc6b4SJerry Jelinek     ACPI_EVENT_HANDLER      Handler))
7407c478bd9Sstevel@tonic-gate 
741*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
7427c478bd9Sstevel@tonic-gate ACPI_STATUS
74326f3cdf0SGordon Ross AcpiInstallGpeHandler (
74426f3cdf0SGordon Ross     ACPI_HANDLE             GpeDevice,
74526f3cdf0SGordon Ross     UINT32                  GpeNumber,
74626f3cdf0SGordon Ross     UINT32                  Type,
74726f3cdf0SGordon Ross     ACPI_GPE_HANDLER        Address,
748*385cc6b4SJerry Jelinek     void                    *Context))
74926f3cdf0SGordon Ross 
750*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
751*385cc6b4SJerry Jelinek ACPI_STATUS
752*385cc6b4SJerry Jelinek AcpiInstallGpeRawHandler (
753*385cc6b4SJerry Jelinek     ACPI_HANDLE             GpeDevice,
754*385cc6b4SJerry Jelinek     UINT32                  GpeNumber,
755*385cc6b4SJerry Jelinek     UINT32                  Type,
756*385cc6b4SJerry Jelinek     ACPI_GPE_HANDLER        Address,
757*385cc6b4SJerry Jelinek     void                    *Context))
758*385cc6b4SJerry Jelinek 
759*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
76026f3cdf0SGordon Ross ACPI_STATUS
76126f3cdf0SGordon Ross AcpiRemoveGpeHandler (
76226f3cdf0SGordon Ross     ACPI_HANDLE             GpeDevice,
76326f3cdf0SGordon Ross     UINT32                  GpeNumber,
764*385cc6b4SJerry Jelinek     ACPI_GPE_HANDLER        Address))
76526f3cdf0SGordon Ross 
766*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
76726f3cdf0SGordon Ross ACPI_STATUS
7687c478bd9Sstevel@tonic-gate AcpiInstallNotifyHandler (
7697c478bd9Sstevel@tonic-gate     ACPI_HANDLE             Device,
7707c478bd9Sstevel@tonic-gate     UINT32                  HandlerType,
7717c478bd9Sstevel@tonic-gate     ACPI_NOTIFY_HANDLER     Handler,
772*385cc6b4SJerry Jelinek     void                    *Context))
7737c478bd9Sstevel@tonic-gate 
774*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
7757c478bd9Sstevel@tonic-gate ACPI_STATUS
7767c478bd9Sstevel@tonic-gate AcpiRemoveNotifyHandler (
7777c478bd9Sstevel@tonic-gate     ACPI_HANDLE             Device,
7787c478bd9Sstevel@tonic-gate     UINT32                  HandlerType,
779*385cc6b4SJerry Jelinek     ACPI_NOTIFY_HANDLER     Handler))
7807c478bd9Sstevel@tonic-gate 
781*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
7827c478bd9Sstevel@tonic-gate ACPI_STATUS
7837c478bd9Sstevel@tonic-gate AcpiInstallAddressSpaceHandler (
7847c478bd9Sstevel@tonic-gate     ACPI_HANDLE             Device,
7857c478bd9Sstevel@tonic-gate     ACPI_ADR_SPACE_TYPE     SpaceId,
7867c478bd9Sstevel@tonic-gate     ACPI_ADR_SPACE_HANDLER  Handler,
7877c478bd9Sstevel@tonic-gate     ACPI_ADR_SPACE_SETUP    Setup,
788*385cc6b4SJerry Jelinek     void                    *Context))
7897c478bd9Sstevel@tonic-gate 
790*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
7917c478bd9Sstevel@tonic-gate ACPI_STATUS
7927c478bd9Sstevel@tonic-gate AcpiRemoveAddressSpaceHandler (
7937c478bd9Sstevel@tonic-gate     ACPI_HANDLE             Device,
7947c478bd9Sstevel@tonic-gate     ACPI_ADR_SPACE_TYPE     SpaceId,
795*385cc6b4SJerry Jelinek     ACPI_ADR_SPACE_HANDLER  Handler))
7967c478bd9Sstevel@tonic-gate 
797*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
7987c478bd9Sstevel@tonic-gate ACPI_STATUS
7997c478bd9Sstevel@tonic-gate AcpiInstallExceptionHandler (
800*385cc6b4SJerry Jelinek     ACPI_EXCEPTION_HANDLER  Handler))
8017c478bd9Sstevel@tonic-gate 
802*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
80326f3cdf0SGordon Ross ACPI_STATUS
80426f3cdf0SGordon Ross AcpiInstallInterfaceHandler (
805*385cc6b4SJerry Jelinek     ACPI_INTERFACE_HANDLER  Handler))
80626f3cdf0SGordon Ross 
8077c478bd9Sstevel@tonic-gate 
8087c478bd9Sstevel@tonic-gate /*
80926f3cdf0SGordon Ross  * Global Lock interfaces
8107c478bd9Sstevel@tonic-gate  */
811*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
8127c478bd9Sstevel@tonic-gate ACPI_STATUS
8137c478bd9Sstevel@tonic-gate AcpiAcquireGlobalLock (
8147c478bd9Sstevel@tonic-gate     UINT16                  Timeout,
815*385cc6b4SJerry Jelinek     UINT32                  *Handle))
8167c478bd9Sstevel@tonic-gate 
817*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
8187c478bd9Sstevel@tonic-gate ACPI_STATUS
8197c478bd9Sstevel@tonic-gate AcpiReleaseGlobalLock (
820*385cc6b4SJerry Jelinek     UINT32                  Handle))
821*385cc6b4SJerry Jelinek 
822*385cc6b4SJerry Jelinek 
823*385cc6b4SJerry Jelinek /*
824*385cc6b4SJerry Jelinek  * Interfaces to AML mutex objects
825*385cc6b4SJerry Jelinek  */
826*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
827*385cc6b4SJerry Jelinek ACPI_STATUS
828*385cc6b4SJerry Jelinek AcpiAcquireMutex (
829*385cc6b4SJerry Jelinek     ACPI_HANDLE             Handle,
830*385cc6b4SJerry Jelinek     ACPI_STRING             Pathname,
831*385cc6b4SJerry Jelinek     UINT16                  Timeout))
832*385cc6b4SJerry Jelinek 
833*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
834*385cc6b4SJerry Jelinek ACPI_STATUS
835*385cc6b4SJerry Jelinek AcpiReleaseMutex (
836*385cc6b4SJerry Jelinek     ACPI_HANDLE             Handle,
837*385cc6b4SJerry Jelinek     ACPI_STRING             Pathname))
8387c478bd9Sstevel@tonic-gate 
83926f3cdf0SGordon Ross 
84026f3cdf0SGordon Ross /*
84126f3cdf0SGordon Ross  * Fixed Event interfaces
84226f3cdf0SGordon Ross  */
843*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
8447c478bd9Sstevel@tonic-gate ACPI_STATUS
8457c478bd9Sstevel@tonic-gate AcpiEnableEvent (
8467c478bd9Sstevel@tonic-gate     UINT32                  Event,
847*385cc6b4SJerry Jelinek     UINT32                  Flags))
8487c478bd9Sstevel@tonic-gate 
849*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
8507c478bd9Sstevel@tonic-gate ACPI_STATUS
8517c478bd9Sstevel@tonic-gate AcpiDisableEvent (
8527c478bd9Sstevel@tonic-gate     UINT32                  Event,
853*385cc6b4SJerry Jelinek     UINT32                  Flags))
8547c478bd9Sstevel@tonic-gate 
855*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
8567c478bd9Sstevel@tonic-gate ACPI_STATUS
8577c478bd9Sstevel@tonic-gate AcpiClearEvent (
858*385cc6b4SJerry Jelinek     UINT32                  Event))
8597c478bd9Sstevel@tonic-gate 
860*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
8617c478bd9Sstevel@tonic-gate ACPI_STATUS
8627c478bd9Sstevel@tonic-gate AcpiGetEventStatus (
8637c478bd9Sstevel@tonic-gate     UINT32                  Event,
864*385cc6b4SJerry Jelinek     ACPI_EVENT_STATUS       *EventStatus))
8657c478bd9Sstevel@tonic-gate 
866aa2aa9a6SDana Myers 
867aa2aa9a6SDana Myers /*
86826f3cdf0SGordon Ross  * General Purpose Event (GPE) Interfaces
869aa2aa9a6SDana Myers  */
870*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
8717c478bd9Sstevel@tonic-gate ACPI_STATUS
87226f3cdf0SGordon Ross AcpiUpdateAllGpes (
873*385cc6b4SJerry Jelinek     void))
8747c478bd9Sstevel@tonic-gate 
875*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
8767c478bd9Sstevel@tonic-gate ACPI_STATUS
8777c478bd9Sstevel@tonic-gate AcpiEnableGpe (
8787c478bd9Sstevel@tonic-gate     ACPI_HANDLE             GpeDevice,
879*385cc6b4SJerry Jelinek     UINT32                  GpeNumber))
8807c478bd9Sstevel@tonic-gate 
881*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
8827c478bd9Sstevel@tonic-gate ACPI_STATUS
8837c478bd9Sstevel@tonic-gate AcpiDisableGpe (
8847c478bd9Sstevel@tonic-gate     ACPI_HANDLE             GpeDevice,
885*385cc6b4SJerry Jelinek     UINT32                  GpeNumber))
8867c478bd9Sstevel@tonic-gate 
887*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
8887c478bd9Sstevel@tonic-gate ACPI_STATUS
8897c478bd9Sstevel@tonic-gate AcpiClearGpe (
8907c478bd9Sstevel@tonic-gate     ACPI_HANDLE             GpeDevice,
891*385cc6b4SJerry Jelinek     UINT32                  GpeNumber))
89226f3cdf0SGordon Ross 
893*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
89426f3cdf0SGordon Ross ACPI_STATUS
89526f3cdf0SGordon Ross AcpiSetGpe (
89626f3cdf0SGordon Ross     ACPI_HANDLE             GpeDevice,
8977c478bd9Sstevel@tonic-gate     UINT32                  GpeNumber,
898*385cc6b4SJerry Jelinek     UINT8                   Action))
89926f3cdf0SGordon Ross 
900*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
90126f3cdf0SGordon Ross ACPI_STATUS
90226f3cdf0SGordon Ross AcpiFinishGpe (
90326f3cdf0SGordon Ross     ACPI_HANDLE             GpeDevice,
904*385cc6b4SJerry Jelinek     UINT32                  GpeNumber))
90526f3cdf0SGordon Ross 
906*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
907*385cc6b4SJerry Jelinek ACPI_STATUS
908*385cc6b4SJerry Jelinek AcpiMarkGpeForWake (
909*385cc6b4SJerry Jelinek     ACPI_HANDLE             GpeDevice,
910*385cc6b4SJerry Jelinek     UINT32                  GpeNumber))
911*385cc6b4SJerry Jelinek 
912*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
91326f3cdf0SGordon Ross ACPI_STATUS
91426f3cdf0SGordon Ross AcpiSetupGpeForWake (
91526f3cdf0SGordon Ross     ACPI_HANDLE             ParentDevice,
91626f3cdf0SGordon Ross     ACPI_HANDLE             GpeDevice,
917*385cc6b4SJerry Jelinek     UINT32                  GpeNumber))
91826f3cdf0SGordon Ross 
919*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
92026f3cdf0SGordon Ross ACPI_STATUS
92126f3cdf0SGordon Ross AcpiSetGpeWakeMask (
92226f3cdf0SGordon Ross     ACPI_HANDLE             GpeDevice,
92326f3cdf0SGordon Ross     UINT32                  GpeNumber,
924*385cc6b4SJerry Jelinek     UINT8                   Action))
9257c478bd9Sstevel@tonic-gate 
926*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
9277c478bd9Sstevel@tonic-gate ACPI_STATUS
9287c478bd9Sstevel@tonic-gate AcpiGetGpeStatus (
9297c478bd9Sstevel@tonic-gate     ACPI_HANDLE             GpeDevice,
9307c478bd9Sstevel@tonic-gate     UINT32                  GpeNumber,
931*385cc6b4SJerry Jelinek     ACPI_EVENT_STATUS       *EventStatus))
9327c478bd9Sstevel@tonic-gate 
933*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
9347c478bd9Sstevel@tonic-gate ACPI_STATUS
935aa2aa9a6SDana Myers AcpiDisableAllGpes (
936*385cc6b4SJerry Jelinek     void))
937aa2aa9a6SDana Myers 
938*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
939aa2aa9a6SDana Myers ACPI_STATUS
940aa2aa9a6SDana Myers AcpiEnableAllRuntimeGpes (
941*385cc6b4SJerry Jelinek     void))
942aa2aa9a6SDana Myers 
943*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
944*385cc6b4SJerry Jelinek ACPI_STATUS
945*385cc6b4SJerry Jelinek AcpiEnableAllWakeupGpes (
946*385cc6b4SJerry Jelinek     void))
947*385cc6b4SJerry Jelinek 
948*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
949aa2aa9a6SDana Myers ACPI_STATUS
950aa2aa9a6SDana Myers AcpiGetGpeDevice (
951aa2aa9a6SDana Myers     UINT32                  GpeIndex,
952*385cc6b4SJerry Jelinek     ACPI_HANDLE             *GpeDevice))
953aa2aa9a6SDana Myers 
954*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
955aa2aa9a6SDana Myers ACPI_STATUS
9567c478bd9Sstevel@tonic-gate AcpiInstallGpeBlock (
9577c478bd9Sstevel@tonic-gate     ACPI_HANDLE             GpeDevice,
9587c478bd9Sstevel@tonic-gate     ACPI_GENERIC_ADDRESS    *GpeBlockAddress,
9597c478bd9Sstevel@tonic-gate     UINT32                  RegisterCount,
960*385cc6b4SJerry Jelinek     UINT32                  InterruptNumber))
9617c478bd9Sstevel@tonic-gate 
962*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
9637c478bd9Sstevel@tonic-gate ACPI_STATUS
9647c478bd9Sstevel@tonic-gate AcpiRemoveGpeBlock (
965*385cc6b4SJerry Jelinek     ACPI_HANDLE             GpeDevice))
9667c478bd9Sstevel@tonic-gate 
9677c478bd9Sstevel@tonic-gate 
9687c478bd9Sstevel@tonic-gate /*
9697c478bd9Sstevel@tonic-gate  * Resource interfaces
9707c478bd9Sstevel@tonic-gate  */
9717c478bd9Sstevel@tonic-gate typedef
9727c478bd9Sstevel@tonic-gate ACPI_STATUS (*ACPI_WALK_RESOURCE_CALLBACK) (
9737c478bd9Sstevel@tonic-gate     ACPI_RESOURCE           *Resource,
9747c478bd9Sstevel@tonic-gate     void                    *Context);
9757c478bd9Sstevel@tonic-gate 
976*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
97730082d0cSmyers ACPI_STATUS
97830082d0cSmyers AcpiGetVendorResource (
97926f3cdf0SGordon Ross     ACPI_HANDLE             Device,
98030082d0cSmyers     char                    *Name,
98130082d0cSmyers     ACPI_VENDOR_UUID        *Uuid,
982*385cc6b4SJerry Jelinek     ACPI_BUFFER             *RetBuffer))
9837c478bd9Sstevel@tonic-gate 
984*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
9857c478bd9Sstevel@tonic-gate ACPI_STATUS
9867c478bd9Sstevel@tonic-gate AcpiGetCurrentResources (
98726f3cdf0SGordon Ross     ACPI_HANDLE             Device,
988*385cc6b4SJerry Jelinek     ACPI_BUFFER             *RetBuffer))
9897c478bd9Sstevel@tonic-gate 
990*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
9917c478bd9Sstevel@tonic-gate ACPI_STATUS
9927c478bd9Sstevel@tonic-gate AcpiGetPossibleResources (
99326f3cdf0SGordon Ross     ACPI_HANDLE             Device,
994*385cc6b4SJerry Jelinek     ACPI_BUFFER             *RetBuffer))
9957c478bd9Sstevel@tonic-gate 
996*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
997*385cc6b4SJerry Jelinek ACPI_STATUS
998*385cc6b4SJerry Jelinek AcpiGetEventResources (
999*385cc6b4SJerry Jelinek     ACPI_HANDLE             DeviceHandle,
1000*385cc6b4SJerry Jelinek     ACPI_BUFFER             *RetBuffer))
1001*385cc6b4SJerry Jelinek 
1002*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
1003*385cc6b4SJerry Jelinek ACPI_STATUS
1004*385cc6b4SJerry Jelinek AcpiWalkResourceBuffer (
1005*385cc6b4SJerry Jelinek     ACPI_BUFFER                 *Buffer,
1006*385cc6b4SJerry Jelinek     ACPI_WALK_RESOURCE_CALLBACK UserFunction,
1007*385cc6b4SJerry Jelinek     void                        *Context))
1008*385cc6b4SJerry Jelinek 
1009*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
10107c478bd9Sstevel@tonic-gate ACPI_STATUS
10117c478bd9Sstevel@tonic-gate AcpiWalkResources (
101226f3cdf0SGordon Ross     ACPI_HANDLE                 Device,
101330082d0cSmyers     char                        *Name,
10147c478bd9Sstevel@tonic-gate     ACPI_WALK_RESOURCE_CALLBACK UserFunction,
1015*385cc6b4SJerry Jelinek     void                        *Context))
10167c478bd9Sstevel@tonic-gate 
1017*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
10187c478bd9Sstevel@tonic-gate ACPI_STATUS
10197c478bd9Sstevel@tonic-gate AcpiSetCurrentResources (
102026f3cdf0SGordon Ross     ACPI_HANDLE             Device,
1021*385cc6b4SJerry Jelinek     ACPI_BUFFER             *InBuffer))
10227c478bd9Sstevel@tonic-gate 
1023*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
10247c478bd9Sstevel@tonic-gate ACPI_STATUS
10257c478bd9Sstevel@tonic-gate AcpiGetIrqRoutingTable (
102626f3cdf0SGordon Ross     ACPI_HANDLE             Device,
1027*385cc6b4SJerry Jelinek     ACPI_BUFFER             *RetBuffer))
10287c478bd9Sstevel@tonic-gate 
1029*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
10307c478bd9Sstevel@tonic-gate ACPI_STATUS
10317c478bd9Sstevel@tonic-gate AcpiResourceToAddress64 (
10327c478bd9Sstevel@tonic-gate     ACPI_RESOURCE           *Resource,
1033*385cc6b4SJerry Jelinek     ACPI_RESOURCE_ADDRESS64 *Out))
1034*385cc6b4SJerry Jelinek 
1035*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
1036*385cc6b4SJerry Jelinek ACPI_STATUS
1037*385cc6b4SJerry Jelinek AcpiBufferToResource (
1038*385cc6b4SJerry Jelinek     UINT8                   *AmlBuffer,
1039*385cc6b4SJerry Jelinek     UINT16                  AmlBufferLength,
1040*385cc6b4SJerry Jelinek     ACPI_RESOURCE           **ResourcePtr))
10417c478bd9Sstevel@tonic-gate 
1042aa2aa9a6SDana Myers 
10437c478bd9Sstevel@tonic-gate /*
10447c478bd9Sstevel@tonic-gate  * Hardware (ACPI device) interfaces
10457c478bd9Sstevel@tonic-gate  */
1046*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
10477c478bd9Sstevel@tonic-gate ACPI_STATUS
1048aa2aa9a6SDana Myers AcpiReset (
1049*385cc6b4SJerry Jelinek     void))
1050aa2aa9a6SDana Myers 
1051*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
1052aa2aa9a6SDana Myers ACPI_STATUS
1053aa2aa9a6SDana Myers AcpiRead (
105457190917SDana Myers     UINT64                  *Value,
1055*385cc6b4SJerry Jelinek     ACPI_GENERIC_ADDRESS    *Reg))
1056aa2aa9a6SDana Myers 
1057*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
1058aa2aa9a6SDana Myers ACPI_STATUS
1059aa2aa9a6SDana Myers AcpiWrite (
106057190917SDana Myers     UINT64                  Value,
1061*385cc6b4SJerry Jelinek     ACPI_GENERIC_ADDRESS    *Reg))
1062aa2aa9a6SDana Myers 
1063*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
1064aa2aa9a6SDana Myers ACPI_STATUS
1065aa2aa9a6SDana Myers AcpiReadBitRegister (
10667c478bd9Sstevel@tonic-gate     UINT32                  RegisterId,
1067*385cc6b4SJerry Jelinek     UINT32                  *ReturnValue))
1068db2bae30SDana Myers 
1069*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
1070db2bae30SDana Myers ACPI_STATUS
1071aa2aa9a6SDana Myers AcpiWriteBitRegister (
10727c478bd9Sstevel@tonic-gate     UINT32                  RegisterId,
1073*385cc6b4SJerry Jelinek     UINT32                  Value))
10747c478bd9Sstevel@tonic-gate 
1075*385cc6b4SJerry Jelinek 
1076*385cc6b4SJerry Jelinek /*
1077*385cc6b4SJerry Jelinek  * Sleep/Wake interfaces
1078*385cc6b4SJerry Jelinek  */
1079*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
10807c478bd9Sstevel@tonic-gate ACPI_STATUS
10817c478bd9Sstevel@tonic-gate AcpiGetSleepTypeData (
10827c478bd9Sstevel@tonic-gate     UINT8                   SleepState,
10837c478bd9Sstevel@tonic-gate     UINT8                   *Slp_TypA,
1084*385cc6b4SJerry Jelinek     UINT8                   *Slp_TypB))
10857c478bd9Sstevel@tonic-gate 
1086*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
10877c478bd9Sstevel@tonic-gate ACPI_STATUS
10887c478bd9Sstevel@tonic-gate AcpiEnterSleepStatePrep (
1089*385cc6b4SJerry Jelinek     UINT8                   SleepState))
10907c478bd9Sstevel@tonic-gate 
1091*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
10927c478bd9Sstevel@tonic-gate ACPI_STATUS
10937c478bd9Sstevel@tonic-gate AcpiEnterSleepState (
1094*385cc6b4SJerry Jelinek     UINT8                   SleepState))
10957c478bd9Sstevel@tonic-gate 
1096*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
10977c478bd9Sstevel@tonic-gate ACPI_STATUS
10987c478bd9Sstevel@tonic-gate AcpiEnterSleepStateS4bios (
1099*385cc6b4SJerry Jelinek     void))
11007c478bd9Sstevel@tonic-gate 
1101*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
1102*385cc6b4SJerry Jelinek ACPI_STATUS
1103*385cc6b4SJerry Jelinek AcpiLeaveSleepStatePrep (
1104*385cc6b4SJerry Jelinek     UINT8                   SleepState))
1105*385cc6b4SJerry Jelinek 
1106*385cc6b4SJerry Jelinek ACPI_EXTERNAL_RETURN_STATUS (
11077c478bd9Sstevel@tonic-gate ACPI_STATUS
11087c478bd9Sstevel@tonic-gate AcpiLeaveSleepState (
1109*385cc6b4SJerry Jelinek     UINT8                   SleepState))
1110*385cc6b4SJerry Jelinek 
1111*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
1112aa2aa9a6SDana Myers ACPI_STATUS
1113aa2aa9a6SDana Myers AcpiSetFirmwareWakingVector (
1114*385cc6b4SJerry Jelinek     ACPI_PHYSICAL_ADDRESS   PhysicalAddress,
1115*385cc6b4SJerry Jelinek     ACPI_PHYSICAL_ADDRESS   PhysicalAddress64))
11167c478bd9Sstevel@tonic-gate 
1117*385cc6b4SJerry Jelinek 
1118*385cc6b4SJerry Jelinek /*
1119*385cc6b4SJerry Jelinek  * ACPI Timer interfaces
1120*385cc6b4SJerry Jelinek  */
1121*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
1122aa2aa9a6SDana Myers ACPI_STATUS
1123*385cc6b4SJerry Jelinek AcpiGetTimerResolution (
1124*385cc6b4SJerry Jelinek     UINT32                  *Resolution))
1125*385cc6b4SJerry Jelinek 
1126*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
1127*385cc6b4SJerry Jelinek ACPI_STATUS
1128*385cc6b4SJerry Jelinek AcpiGetTimer (
1129*385cc6b4SJerry Jelinek     UINT32                  *Ticks))
1130*385cc6b4SJerry Jelinek 
1131*385cc6b4SJerry Jelinek ACPI_HW_DEPENDENT_RETURN_STATUS (
1132*385cc6b4SJerry Jelinek ACPI_STATUS
1133*385cc6b4SJerry Jelinek AcpiGetTimerDuration (
1134*385cc6b4SJerry Jelinek     UINT32                  StartTicks,
1135*385cc6b4SJerry Jelinek     UINT32                  EndTicks,
1136*385cc6b4SJerry Jelinek     UINT32                  *TimeElapsed))
1137aa2aa9a6SDana Myers 
1138aa2aa9a6SDana Myers 
1139aa2aa9a6SDana Myers /*
1140aa2aa9a6SDana Myers  * Error/Warning output
1141aa2aa9a6SDana Myers  */
1142*385cc6b4SJerry Jelinek ACPI_MSG_DEPENDENT_RETURN_VOID (
1143*385cc6b4SJerry Jelinek ACPI_PRINTF_LIKE(3)
1144aa2aa9a6SDana Myers void ACPI_INTERNAL_VAR_XFACE
1145aa2aa9a6SDana Myers AcpiError (
1146aa2aa9a6SDana Myers     const char              *ModuleName,
1147aa2aa9a6SDana Myers     UINT32                  LineNumber,
1148aa2aa9a6SDana Myers     const char              *Format,
1149*385cc6b4SJerry Jelinek     ...))
1150aa2aa9a6SDana Myers 
1151*385cc6b4SJerry Jelinek ACPI_MSG_DEPENDENT_RETURN_VOID (
1152*385cc6b4SJerry Jelinek ACPI_PRINTF_LIKE(4)
1153aa2aa9a6SDana Myers void  ACPI_INTERNAL_VAR_XFACE
1154aa2aa9a6SDana Myers AcpiException (
1155aa2aa9a6SDana Myers     const char              *ModuleName,
1156aa2aa9a6SDana Myers     UINT32                  LineNumber,
1157aa2aa9a6SDana Myers     ACPI_STATUS             Status,
1158aa2aa9a6SDana Myers     const char              *Format,
1159*385cc6b4SJerry Jelinek     ...))
1160aa2aa9a6SDana Myers 
1161*385cc6b4SJerry Jelinek ACPI_MSG_DEPENDENT_RETURN_VOID (
1162*385cc6b4SJerry Jelinek ACPI_PRINTF_LIKE(3)
1163aa2aa9a6SDana Myers void ACPI_INTERNAL_VAR_XFACE
1164aa2aa9a6SDana Myers AcpiWarning (
1165aa2aa9a6SDana Myers     const char              *ModuleName,
1166aa2aa9a6SDana Myers     UINT32                  LineNumber,
1167aa2aa9a6SDana Myers     const char              *Format,
1168*385cc6b4SJerry Jelinek     ...))
1169aa2aa9a6SDana Myers 
1170*385cc6b4SJerry Jelinek ACPI_MSG_DEPENDENT_RETURN_VOID (
1171*385cc6b4SJerry Jelinek ACPI_PRINTF_LIKE(1)
1172aa2aa9a6SDana Myers void ACPI_INTERNAL_VAR_XFACE
1173aa2aa9a6SDana Myers AcpiInfo (
1174*385cc6b4SJerry Jelinek     const char              *Format,
1175*385cc6b4SJerry Jelinek     ...))
1176*385cc6b4SJerry Jelinek 
1177*385cc6b4SJerry Jelinek ACPI_MSG_DEPENDENT_RETURN_VOID (
1178*385cc6b4SJerry Jelinek ACPI_PRINTF_LIKE(3)
1179*385cc6b4SJerry Jelinek void ACPI_INTERNAL_VAR_XFACE
1180*385cc6b4SJerry Jelinek AcpiBiosError (
1181aa2aa9a6SDana Myers     const char              *ModuleName,
1182aa2aa9a6SDana Myers     UINT32                  LineNumber,
1183aa2aa9a6SDana Myers     const char              *Format,
1184*385cc6b4SJerry Jelinek     ...))
1185*385cc6b4SJerry Jelinek 
1186*385cc6b4SJerry Jelinek ACPI_MSG_DEPENDENT_RETURN_VOID (
1187*385cc6b4SJerry Jelinek ACPI_PRINTF_LIKE(3)
1188*385cc6b4SJerry Jelinek void ACPI_INTERNAL_VAR_XFACE
1189*385cc6b4SJerry Jelinek AcpiBiosWarning (
1190*385cc6b4SJerry Jelinek     const char              *ModuleName,
1191*385cc6b4SJerry Jelinek     UINT32                  LineNumber,
1192*385cc6b4SJerry Jelinek     const char              *Format,
1193*385cc6b4SJerry Jelinek     ...))
1194aa2aa9a6SDana Myers 
1195aa2aa9a6SDana Myers 
1196aa2aa9a6SDana Myers /*
1197aa2aa9a6SDana Myers  * Debug output
1198aa2aa9a6SDana Myers  */
1199*385cc6b4SJerry Jelinek ACPI_DBG_DEPENDENT_RETURN_VOID (
1200*385cc6b4SJerry Jelinek ACPI_PRINTF_LIKE(6)
1201aa2aa9a6SDana Myers void ACPI_INTERNAL_VAR_XFACE
1202aa2aa9a6SDana Myers AcpiDebugPrint (
1203aa2aa9a6SDana Myers     UINT32                  RequestedDebugLevel,
1204aa2aa9a6SDana Myers     UINT32                  LineNumber,
1205aa2aa9a6SDana Myers     const char              *FunctionName,
1206aa2aa9a6SDana Myers     const char              *ModuleName,
1207aa2aa9a6SDana Myers     UINT32                  ComponentId,
1208aa2aa9a6SDana Myers     const char              *Format,
1209*385cc6b4SJerry Jelinek     ...))
1210aa2aa9a6SDana Myers 
1211*385cc6b4SJerry Jelinek ACPI_DBG_DEPENDENT_RETURN_VOID (
1212*385cc6b4SJerry Jelinek ACPI_PRINTF_LIKE(6)
1213aa2aa9a6SDana Myers void ACPI_INTERNAL_VAR_XFACE
1214aa2aa9a6SDana Myers AcpiDebugPrintRaw (
1215aa2aa9a6SDana Myers     UINT32                  RequestedDebugLevel,
1216aa2aa9a6SDana Myers     UINT32                  LineNumber,
1217aa2aa9a6SDana Myers     const char              *FunctionName,
1218aa2aa9a6SDana Myers     const char              *ModuleName,
1219aa2aa9a6SDana Myers     UINT32                  ComponentId,
1220aa2aa9a6SDana Myers     const char              *Format,
1221*385cc6b4SJerry Jelinek     ...))
1222*385cc6b4SJerry Jelinek 
1223*385cc6b4SJerry Jelinek ACPI_DBG_DEPENDENT_RETURN_VOID (
1224*385cc6b4SJerry Jelinek void
1225*385cc6b4SJerry Jelinek AcpiTracePoint (
1226*385cc6b4SJerry Jelinek     ACPI_TRACE_EVENT_TYPE   Type,
1227*385cc6b4SJerry Jelinek     BOOLEAN                 Begin,
1228*385cc6b4SJerry Jelinek     UINT8                   *Aml,
1229*385cc6b4SJerry Jelinek     char                    *Pathname))
1230*385cc6b4SJerry Jelinek 
1231*385cc6b4SJerry Jelinek ACPI_APP_DEPENDENT_RETURN_VOID (
1232*385cc6b4SJerry Jelinek ACPI_PRINTF_LIKE(1)
1233*385cc6b4SJerry Jelinek void ACPI_INTERNAL_VAR_XFACE
1234*385cc6b4SJerry Jelinek AcpiLogError (
1235*385cc6b4SJerry Jelinek     const char              *Format,
1236*385cc6b4SJerry Jelinek     ...))
1237*385cc6b4SJerry Jelinek 
1238*385cc6b4SJerry Jelinek ACPI_STATUS
1239*385cc6b4SJerry Jelinek AcpiInitializeDebugger (
1240*385cc6b4SJerry Jelinek     void);
1241*385cc6b4SJerry Jelinek 
1242*385cc6b4SJerry Jelinek void
1243*385cc6b4SJerry Jelinek AcpiTerminateDebugger (
1244*385cc6b4SJerry Jelinek     void);
1245*385cc6b4SJerry Jelinek 
1246*385cc6b4SJerry Jelinek void
1247*385cc6b4SJerry Jelinek AcpiSetDebuggerThreadId (
1248*385cc6b4SJerry Jelinek     ACPI_THREAD_ID          ThreadId);
12497c478bd9Sstevel@tonic-gate 
12507c478bd9Sstevel@tonic-gate #endif /* __ACXFACE_H__ */
1251