acpixf.h revision 1.21 1 1.1 jruoho /******************************************************************************
2 1.1 jruoho *
3 1.1 jruoho * Name: acpixf.h - External interfaces to the ACPI subsystem
4 1.1 jruoho *
5 1.1 jruoho *****************************************************************************/
6 1.1 jruoho
7 1.3 jruoho /*
8 1.18 christos * Copyright (C) 2000 - 2018, Intel Corp.
9 1.1 jruoho * All rights reserved.
10 1.1 jruoho *
11 1.3 jruoho * Redistribution and use in source and binary forms, with or without
12 1.3 jruoho * modification, are permitted provided that the following conditions
13 1.3 jruoho * are met:
14 1.3 jruoho * 1. Redistributions of source code must retain the above copyright
15 1.3 jruoho * notice, this list of conditions, and the following disclaimer,
16 1.3 jruoho * without modification.
17 1.3 jruoho * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 1.3 jruoho * substantially similar to the "NO WARRANTY" disclaimer below
19 1.3 jruoho * ("Disclaimer") and any redistribution must be conditioned upon
20 1.3 jruoho * including a substantially similar Disclaimer requirement for further
21 1.3 jruoho * binary redistribution.
22 1.3 jruoho * 3. Neither the names of the above-listed copyright holders nor the names
23 1.3 jruoho * of any contributors may be used to endorse or promote products derived
24 1.3 jruoho * from this software without specific prior written permission.
25 1.3 jruoho *
26 1.3 jruoho * Alternatively, this software may be distributed under the terms of the
27 1.3 jruoho * GNU General Public License ("GPL") version 2 as published by the Free
28 1.3 jruoho * Software Foundation.
29 1.3 jruoho *
30 1.3 jruoho * NO WARRANTY
31 1.3 jruoho * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 1.3 jruoho * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 1.3 jruoho * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 1.3 jruoho * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 1.3 jruoho * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 1.3 jruoho * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 1.3 jruoho * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 1.3 jruoho * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 1.3 jruoho * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 1.3 jruoho * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 1.3 jruoho * POSSIBILITY OF SUCH DAMAGES.
42 1.3 jruoho */
43 1.1 jruoho
44 1.1 jruoho #ifndef __ACXFACE_H__
45 1.1 jruoho #define __ACXFACE_H__
46 1.1 jruoho
47 1.1 jruoho /* Current ACPICA subsystem version in YYYYMMDD format */
48 1.1 jruoho
49 1.21 christos #define ACPI_CA_VERSION 0x20181213
50 1.1 jruoho
51 1.6 christos #include "acconfig.h"
52 1.1 jruoho #include "actypes.h"
53 1.1 jruoho #include "actbl.h"
54 1.6 christos #include "acbuffer.h"
55 1.1 jruoho
56 1.7 christos
57 1.7 christos /*****************************************************************************
58 1.7 christos *
59 1.7 christos * Macros used for ACPICA globals and configuration
60 1.7 christos *
61 1.7 christos ****************************************************************************/
62 1.7 christos
63 1.7 christos /*
64 1.7 christos * Ensure that global variables are defined and initialized only once.
65 1.7 christos *
66 1.7 christos * The use of these macros allows for a single list of globals (here)
67 1.7 christos * in order to simplify maintenance of the code.
68 1.7 christos */
69 1.7 christos #ifdef DEFINE_ACPI_GLOBALS
70 1.7 christos #define ACPI_GLOBAL(type,name) \
71 1.7 christos extern type name; \
72 1.7 christos type name
73 1.7 christos
74 1.7 christos #define ACPI_INIT_GLOBAL(type,name,value) \
75 1.7 christos type name=value
76 1.7 christos
77 1.7 christos #else
78 1.7 christos #ifndef ACPI_GLOBAL
79 1.7 christos #define ACPI_GLOBAL(type,name) \
80 1.7 christos extern type name
81 1.7 christos #endif
82 1.7 christos
83 1.7 christos #ifndef ACPI_INIT_GLOBAL
84 1.7 christos #define ACPI_INIT_GLOBAL(type,name,value) \
85 1.7 christos extern type name
86 1.7 christos #endif
87 1.7 christos #endif
88 1.7 christos
89 1.7 christos /*
90 1.7 christos * These macros configure the various ACPICA interfaces. They are
91 1.7 christos * useful for generating stub inline functions for features that are
92 1.7 christos * configured out of the current kernel or ACPICA application.
93 1.7 christos */
94 1.7 christos #ifndef ACPI_EXTERNAL_RETURN_STATUS
95 1.7 christos #define ACPI_EXTERNAL_RETURN_STATUS(Prototype) \
96 1.7 christos Prototype;
97 1.7 christos #endif
98 1.7 christos
99 1.7 christos #ifndef ACPI_EXTERNAL_RETURN_OK
100 1.7 christos #define ACPI_EXTERNAL_RETURN_OK(Prototype) \
101 1.7 christos Prototype;
102 1.7 christos #endif
103 1.7 christos
104 1.7 christos #ifndef ACPI_EXTERNAL_RETURN_VOID
105 1.7 christos #define ACPI_EXTERNAL_RETURN_VOID(Prototype) \
106 1.7 christos Prototype;
107 1.7 christos #endif
108 1.7 christos
109 1.7 christos #ifndef ACPI_EXTERNAL_RETURN_UINT32
110 1.7 christos #define ACPI_EXTERNAL_RETURN_UINT32(Prototype) \
111 1.7 christos Prototype;
112 1.7 christos #endif
113 1.7 christos
114 1.7 christos #ifndef ACPI_EXTERNAL_RETURN_PTR
115 1.7 christos #define ACPI_EXTERNAL_RETURN_PTR(Prototype) \
116 1.7 christos Prototype;
117 1.7 christos #endif
118 1.7 christos
119 1.7 christos
120 1.7 christos /*****************************************************************************
121 1.7 christos *
122 1.7 christos * Public globals and runtime configuration options
123 1.7 christos *
124 1.7 christos ****************************************************************************/
125 1.7 christos
126 1.7 christos /*
127 1.7 christos * Enable "slack mode" of the AML interpreter? Default is FALSE, and the
128 1.7 christos * interpreter strictly follows the ACPI specification. Setting to TRUE
129 1.7 christos * allows the interpreter to ignore certain errors and/or bad AML constructs.
130 1.7 christos *
131 1.7 christos * Currently, these features are enabled by this flag:
132 1.7 christos *
133 1.7 christos * 1) Allow "implicit return" of last value in a control method
134 1.7 christos * 2) Allow access beyond the end of an operation region
135 1.7 christos * 3) Allow access to uninitialized locals/args (auto-init to integer 0)
136 1.7 christos * 4) Allow ANY object type to be a source operand for the Store() operator
137 1.7 christos * 5) Allow unresolved references (invalid target name) in package objects
138 1.7 christos * 6) Enable warning messages for behavior that is not ACPI spec compliant
139 1.7 christos */
140 1.7 christos ACPI_INIT_GLOBAL (UINT8, AcpiGbl_EnableInterpreterSlack, FALSE);
141 1.7 christos
142 1.7 christos /*
143 1.7 christos * Automatically serialize all methods that create named objects? Default
144 1.7 christos * is TRUE, meaning that all NonSerialized methods are scanned once at
145 1.7 christos * table load time to determine those that create named objects. Methods
146 1.7 christos * that create named objects are marked Serialized in order to prevent
147 1.7 christos * possible run-time problems if they are entered by more than one thread.
148 1.7 christos */
149 1.7 christos ACPI_INIT_GLOBAL (UINT8, AcpiGbl_AutoSerializeMethods, TRUE);
150 1.7 christos
151 1.7 christos /*
152 1.7 christos * Create the predefined _OSI method in the namespace? Default is TRUE
153 1.7 christos * because ACPICA is fully compatible with other ACPI implementations.
154 1.7 christos * Changing this will revert ACPICA (and machine ASL) to pre-OSI behavior.
155 1.7 christos */
156 1.7 christos ACPI_INIT_GLOBAL (UINT8, AcpiGbl_CreateOsiMethod, TRUE);
157 1.7 christos
158 1.7 christos /*
159 1.7 christos * Optionally use default values for the ACPI register widths. Set this to
160 1.7 christos * TRUE to use the defaults, if an FADT contains incorrect widths/lengths.
161 1.7 christos */
162 1.7 christos ACPI_INIT_GLOBAL (UINT8, AcpiGbl_UseDefaultRegisterWidths, TRUE);
163 1.7 christos
164 1.7 christos /*
165 1.16 christos * Whether or not to validate (map) an entire table to verify
166 1.16 christos * checksum/duplication in early stage before install. Set this to TRUE to
167 1.16 christos * allow early table validation before install it to the table manager.
168 1.16 christos * Note that enabling this option causes errors to happen in some OSPMs
169 1.16 christos * during early initialization stages. Default behavior is to allow such
170 1.16 christos * validation.
171 1.7 christos */
172 1.16 christos ACPI_INIT_GLOBAL (UINT8, AcpiGbl_EnableTableValidation, TRUE);
173 1.7 christos
174 1.7 christos /*
175 1.7 christos * Optionally enable output from the AML Debug Object.
176 1.7 christos */
177 1.7 christos ACPI_INIT_GLOBAL (_Bool, AcpiGbl_EnableAmlDebugObject, FALSE);
178 1.7 christos
179 1.7 christos /*
180 1.7 christos * Optionally copy the entire DSDT to local memory (instead of simply
181 1.7 christos * mapping it.) There are some BIOSs that corrupt or replace the original
182 1.7 christos * DSDT, creating the need for this option. Default is FALSE, do not copy
183 1.7 christos * the DSDT.
184 1.7 christos */
185 1.7 christos ACPI_INIT_GLOBAL (UINT8, AcpiGbl_CopyDsdtLocally, FALSE);
186 1.7 christos
187 1.7 christos /*
188 1.7 christos * Optionally ignore an XSDT if present and use the RSDT instead.
189 1.7 christos * Although the ACPI specification requires that an XSDT be used instead
190 1.7 christos * of the RSDT, the XSDT has been found to be corrupt or ill-formed on
191 1.7 christos * some machines. Default behavior is to use the XSDT if present.
192 1.7 christos */
193 1.7 christos ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DoNotUseXsdt, FALSE);
194 1.7 christos
195 1.7 christos /*
196 1.18 christos * Optionally support module level code by parsing an entire table as
197 1.18 christos * a method as it is loaded. Default is TRUE.
198 1.18 christos * NOTE, this is essentially obsolete and will be removed soon
199 1.18 christos * (01/2018).
200 1.13 christos */
201 1.18 christos ACPI_INIT_GLOBAL (UINT8, AcpiGbl_ExecuteTablesAsMethods, TRUE);
202 1.13 christos
203 1.13 christos /*
204 1.7 christos * Optionally use 32-bit FADT addresses if and when there is a conflict
205 1.7 christos * (address mismatch) between the 32-bit and 64-bit versions of the
206 1.7 christos * address. Although ACPICA adheres to the ACPI specification which
207 1.7 christos * requires the use of the corresponding 64-bit address if it is non-zero,
208 1.7 christos * some machines have been found to have a corrupted non-zero 64-bit
209 1.7 christos * address. Default is FALSE, do not favor the 32-bit addresses.
210 1.7 christos */
211 1.7 christos ACPI_INIT_GLOBAL (UINT8, AcpiGbl_Use32BitFadtAddresses, FALSE);
212 1.7 christos
213 1.7 christos /*
214 1.9 christos * Optionally use 32-bit FACS table addresses.
215 1.9 christos * It is reported that some platforms fail to resume from system suspending
216 1.9 christos * if 64-bit FACS table address is selected:
217 1.9 christos * https://bugzilla.kernel.org/show_bug.cgi?id=74021
218 1.9 christos * Default is TRUE, favor the 32-bit addresses.
219 1.9 christos */
220 1.9 christos ACPI_INIT_GLOBAL (UINT8, AcpiGbl_Use32BitFacsAddresses, TRUE);
221 1.9 christos
222 1.9 christos /*
223 1.7 christos * Optionally truncate I/O addresses to 16 bits. Provides compatibility
224 1.7 christos * with other ACPI implementations. NOTE: During ACPICA initialization,
225 1.7 christos * this value is set to TRUE if any Windows OSI strings have been
226 1.7 christos * requested by the BIOS.
227 1.7 christos */
228 1.7 christos ACPI_INIT_GLOBAL (UINT8, AcpiGbl_TruncateIoAddresses, FALSE);
229 1.7 christos
230 1.7 christos /*
231 1.7 christos * Disable runtime checking and repair of values returned by control methods.
232 1.7 christos * Use only if the repair is causing a problem on a particular machine.
233 1.7 christos */
234 1.7 christos ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableAutoRepair, FALSE);
235 1.7 christos
236 1.7 christos /*
237 1.7 christos * Optionally do not install any SSDTs from the RSDT/XSDT during initialization.
238 1.7 christos * This can be useful for debugging ACPI problems on some machines.
239 1.7 christos */
240 1.7 christos ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableSsdtTableInstall, FALSE);
241 1.7 christos
242 1.7 christos /*
243 1.9 christos * Optionally enable runtime namespace override.
244 1.9 christos */
245 1.9 christos ACPI_INIT_GLOBAL (UINT8, AcpiGbl_RuntimeNamespaceOverride, TRUE);
246 1.9 christos
247 1.9 christos /*
248 1.7 christos * We keep track of the latest version of Windows that has been requested by
249 1.7 christos * the BIOS. ACPI 5.0.
250 1.7 christos */
251 1.7 christos ACPI_INIT_GLOBAL (UINT8, AcpiGbl_OsiData, 0);
252 1.7 christos
253 1.7 christos /*
254 1.7 christos * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
255 1.7 christos * that the ACPI hardware is no longer required. A flag in the FADT indicates
256 1.7 christos * a reduced HW machine, and that flag is duplicated here for convenience.
257 1.7 christos */
258 1.7 christos ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_ReducedHardware, FALSE);
259 1.7 christos
260 1.7 christos /*
261 1.17 christos * Maximum timeout for While() loop iterations before forced method abort.
262 1.13 christos * This mechanism is intended to prevent infinite loops during interpreter
263 1.13 christos * execution within a host kernel.
264 1.13 christos */
265 1.17 christos ACPI_INIT_GLOBAL (UINT32, AcpiGbl_MaxLoopIterations, ACPI_MAX_LOOP_TIMEOUT);
266 1.13 christos
267 1.13 christos /*
268 1.18 christos * Optionally ignore AE_NOT_FOUND errors from named reference package elements
269 1.18 christos * during DSDT/SSDT table loading. This reduces error "noise" in platforms
270 1.18 christos * whose firmware is carrying around a bunch of unused package objects that
271 1.18 christos * refer to non-existent named objects. However, If the AML actually tries to
272 1.18 christos * use such a package, the unresolved element(s) will be replaced with NULL
273 1.18 christos * elements.
274 1.18 christos */
275 1.18 christos ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_IgnorePackageResolutionErrors, FALSE);
276 1.18 christos
277 1.18 christos /*
278 1.7 christos * This mechanism is used to trace a specified AML method. The method is
279 1.7 christos * traced each time it is executed.
280 1.7 christos */
281 1.7 christos ACPI_INIT_GLOBAL (UINT32, AcpiGbl_TraceFlags, 0);
282 1.9 christos ACPI_INIT_GLOBAL (const char *, AcpiGbl_TraceMethodName, NULL);
283 1.9 christos ACPI_INIT_GLOBAL (UINT32, AcpiGbl_TraceDbgLevel, ACPI_TRACE_LEVEL_DEFAULT);
284 1.9 christos ACPI_INIT_GLOBAL (UINT32, AcpiGbl_TraceDbgLayer, ACPI_TRACE_LAYER_DEFAULT);
285 1.7 christos
286 1.1 jruoho /*
287 1.7 christos * Runtime configuration of debug output control masks. We want the debug
288 1.7 christos * switches statically initialized so they are already set when the debugger
289 1.7 christos * is entered.
290 1.1 jruoho */
291 1.21 christos #if defined(ACPI_DEBUG_OUTPUT) && defined(ACPI_DEBUG_TRACE)
292 1.7 christos ACPI_INIT_GLOBAL (UINT32, AcpiDbgLevel, ACPI_DEBUG_DEFAULT);
293 1.7 christos #else
294 1.7 christos ACPI_INIT_GLOBAL (UINT32, AcpiDbgLevel, ACPI_NORMAL_DEFAULT);
295 1.7 christos #endif
296 1.7 christos ACPI_INIT_GLOBAL (UINT32, AcpiDbgLayer, ACPI_COMPONENT_DEFAULT);
297 1.7 christos
298 1.10 christos /* Optionally enable timer output with Debug Object output */
299 1.10 christos
300 1.10 christos ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisplayDebugTimer, FALSE);
301 1.10 christos
302 1.7 christos /*
303 1.14 christos * Debugger command handshake globals. Host OSes need to access these
304 1.14 christos * variables to implement their own command handshake mechanism.
305 1.14 christos */
306 1.14 christos #ifdef ACPI_DEBUGGER
307 1.14 christos ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_MethodExecuting, FALSE);
308 1.14 christos ACPI_GLOBAL (char, AcpiGbl_DbLineBuf[ACPI_DB_LINE_BUFFER_SIZE]);
309 1.14 christos #endif
310 1.14 christos
311 1.14 christos /*
312 1.7 christos * Other miscellaneous globals
313 1.7 christos */
314 1.7 christos ACPI_GLOBAL (ACPI_TABLE_FADT, AcpiGbl_FADT);
315 1.7 christos ACPI_GLOBAL (UINT32, AcpiCurrentGpeCount);
316 1.7 christos ACPI_GLOBAL (BOOLEAN, AcpiGbl_SystemAwakeAndRunning);
317 1.6 christos
318 1.6 christos
319 1.7 christos /*****************************************************************************
320 1.7 christos *
321 1.7 christos * ACPICA public interface configuration.
322 1.7 christos *
323 1.7 christos * Interfaces that are configured out of the ACPICA build are replaced
324 1.7 christos * by inlined stubs by default.
325 1.7 christos *
326 1.7 christos ****************************************************************************/
327 1.7 christos
328 1.6 christos /*
329 1.7 christos * Hardware-reduced prototypes (default: Not hardware reduced).
330 1.7 christos *
331 1.7 christos * All ACPICA hardware-related interfaces that use these macros will be
332 1.7 christos * configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag
333 1.6 christos * is set to TRUE.
334 1.7 christos *
335 1.7 christos * Note: This static build option for reduced hardware is intended to
336 1.7 christos * reduce ACPICA code size if desired or necessary. However, even if this
337 1.7 christos * option is not specified, the runtime behavior of ACPICA is dependent
338 1.7 christos * on the actual FADT reduced hardware flag (HW_REDUCED_ACPI). If set,
339 1.7 christos * the flag will enable similar behavior -- ACPICA will not attempt
340 1.7 christos * to access any ACPI-relate hardware (SCI, GPEs, Fixed Events, etc.)
341 1.6 christos */
342 1.6 christos #if (!ACPI_REDUCED_HARDWARE)
343 1.6 christos #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
344 1.7 christos ACPI_EXTERNAL_RETURN_STATUS(Prototype)
345 1.6 christos
346 1.6 christos #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \
347 1.7 christos ACPI_EXTERNAL_RETURN_OK(Prototype)
348 1.6 christos
349 1.6 christos #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \
350 1.7 christos ACPI_EXTERNAL_RETURN_VOID(Prototype)
351 1.6 christos
352 1.6 christos #else
353 1.6 christos #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
354 1.6 christos static ACPI_INLINE Prototype {return(AE_NOT_CONFIGURED);}
355 1.6 christos
356 1.6 christos #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \
357 1.6 christos static ACPI_INLINE Prototype {return(AE_OK);}
358 1.6 christos
359 1.6 christos #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \
360 1.6 christos static ACPI_INLINE Prototype {return;}
361 1.6 christos
362 1.6 christos #endif /* !ACPI_REDUCED_HARDWARE */
363 1.1 jruoho
364 1.1 jruoho
365 1.1 jruoho /*
366 1.7 christos * Error message prototypes (default: error messages enabled).
367 1.7 christos *
368 1.7 christos * All interfaces related to error and warning messages
369 1.7 christos * will be configured out of the ACPICA build if the
370 1.7 christos * ACPI_NO_ERROR_MESSAGE flag is defined.
371 1.7 christos */
372 1.7 christos #ifndef ACPI_NO_ERROR_MESSAGES
373 1.7 christos #define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \
374 1.7 christos Prototype;
375 1.7 christos
376 1.7 christos #else
377 1.7 christos #define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \
378 1.7 christos static ACPI_INLINE Prototype {return;}
379 1.7 christos
380 1.7 christos #endif /* ACPI_NO_ERROR_MESSAGES */
381 1.7 christos
382 1.7 christos
383 1.7 christos /*
384 1.7 christos * Debugging output prototypes (default: no debug output).
385 1.7 christos *
386 1.7 christos * All interfaces related to debug output messages
387 1.7 christos * will be configured out of the ACPICA build unless the
388 1.7 christos * ACPI_DEBUG_OUTPUT flag is defined.
389 1.7 christos */
390 1.7 christos #ifdef ACPI_DEBUG_OUTPUT
391 1.7 christos #define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype) \
392 1.7 christos Prototype;
393 1.7 christos
394 1.7 christos #else
395 1.7 christos #define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype) \
396 1.7 christos static ACPI_INLINE Prototype {return;}
397 1.7 christos
398 1.7 christos #endif /* ACPI_DEBUG_OUTPUT */
399 1.7 christos
400 1.7 christos
401 1.7 christos /*
402 1.7 christos * Application prototypes
403 1.7 christos *
404 1.7 christos * All interfaces used by application will be configured
405 1.7 christos * out of the ACPICA build unless the ACPI_APPLICATION
406 1.7 christos * flag is defined.
407 1.7 christos */
408 1.7 christos #ifdef ACPI_APPLICATION
409 1.7 christos #define ACPI_APP_DEPENDENT_RETURN_VOID(Prototype) \
410 1.7 christos Prototype;
411 1.7 christos
412 1.7 christos #else
413 1.7 christos #define ACPI_APP_DEPENDENT_RETURN_VOID(Prototype) \
414 1.7 christos static ACPI_INLINE Prototype {return;}
415 1.7 christos
416 1.7 christos #endif /* ACPI_APPLICATION */
417 1.7 christos
418 1.7 christos
419 1.10 christos /*
420 1.10 christos * Debugger prototypes
421 1.10 christos *
422 1.10 christos * All interfaces used by debugger will be configured
423 1.10 christos * out of the ACPICA build unless the ACPI_DEBUGGER
424 1.10 christos * flag is defined.
425 1.10 christos */
426 1.10 christos #ifdef ACPI_DEBUGGER
427 1.10 christos #define ACPI_DBR_DEPENDENT_RETURN_OK(Prototype) \
428 1.10 christos ACPI_EXTERNAL_RETURN_OK(Prototype)
429 1.10 christos
430 1.10 christos #define ACPI_DBR_DEPENDENT_RETURN_VOID(Prototype) \
431 1.10 christos ACPI_EXTERNAL_RETURN_VOID(Prototype)
432 1.10 christos
433 1.10 christos #else
434 1.10 christos #define ACPI_DBR_DEPENDENT_RETURN_OK(Prototype) \
435 1.10 christos static ACPI_INLINE Prototype {return(AE_OK);}
436 1.10 christos
437 1.10 christos #define ACPI_DBR_DEPENDENT_RETURN_VOID(Prototype) \
438 1.10 christos static ACPI_INLINE Prototype {return;}
439 1.10 christos
440 1.10 christos #endif /* ACPI_DEBUGGER */
441 1.10 christos
442 1.10 christos
443 1.7 christos /*****************************************************************************
444 1.7 christos *
445 1.7 christos * ACPICA public interface prototypes
446 1.7 christos *
447 1.7 christos ****************************************************************************/
448 1.7 christos
449 1.7 christos /*
450 1.3 jruoho * Initialization
451 1.1 jruoho */
452 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
453 1.13 christos ACPI_STATUS ACPI_INIT_FUNCTION
454 1.1 jruoho AcpiInitializeTables (
455 1.1 jruoho ACPI_TABLE_DESC *InitialStorage,
456 1.1 jruoho UINT32 InitialTableCount,
457 1.7 christos BOOLEAN AllowResize))
458 1.1 jruoho
459 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
460 1.13 christos ACPI_STATUS ACPI_INIT_FUNCTION
461 1.1 jruoho AcpiInitializeSubsystem (
462 1.7 christos void))
463 1.1 jruoho
464 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
465 1.13 christos ACPI_STATUS ACPI_INIT_FUNCTION
466 1.1 jruoho AcpiEnableSubsystem (
467 1.7 christos UINT32 Flags))
468 1.1 jruoho
469 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
470 1.13 christos ACPI_STATUS ACPI_INIT_FUNCTION
471 1.1 jruoho AcpiInitializeObjects (
472 1.7 christos UINT32 Flags))
473 1.1 jruoho
474 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
475 1.13 christos ACPI_STATUS ACPI_INIT_FUNCTION
476 1.1 jruoho AcpiTerminate (
477 1.7 christos void))
478 1.1 jruoho
479 1.3 jruoho
480 1.3 jruoho /*
481 1.3 jruoho * Miscellaneous global interfaces
482 1.3 jruoho */
483 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
484 1.1 jruoho ACPI_STATUS
485 1.3 jruoho AcpiEnable (
486 1.6 christos void))
487 1.1 jruoho
488 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
489 1.1 jruoho ACPI_STATUS
490 1.3 jruoho AcpiDisable (
491 1.6 christos void))
492 1.1 jruoho
493 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
494 1.1 jruoho ACPI_STATUS
495 1.3 jruoho AcpiSubsystemStatus (
496 1.7 christos void))
497 1.1 jruoho
498 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
499 1.1 jruoho ACPI_STATUS
500 1.1 jruoho AcpiGetSystemInfo (
501 1.7 christos ACPI_BUFFER *RetBuffer))
502 1.1 jruoho
503 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
504 1.1 jruoho ACPI_STATUS
505 1.1 jruoho AcpiGetStatistics (
506 1.7 christos ACPI_STATISTICS *Stats))
507 1.1 jruoho
508 1.7 christos ACPI_EXTERNAL_RETURN_PTR (
509 1.1 jruoho const char *
510 1.1 jruoho AcpiFormatException (
511 1.7 christos ACPI_STATUS Exception))
512 1.1 jruoho
513 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
514 1.1 jruoho ACPI_STATUS
515 1.1 jruoho AcpiPurgeCachedObjects (
516 1.7 christos void))
517 1.1 jruoho
518 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
519 1.3 jruoho ACPI_STATUS
520 1.3 jruoho AcpiInstallInterface (
521 1.7 christos ACPI_STRING InterfaceName))
522 1.3 jruoho
523 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
524 1.3 jruoho ACPI_STATUS
525 1.3 jruoho AcpiRemoveInterface (
526 1.7 christos ACPI_STRING InterfaceName))
527 1.3 jruoho
528 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
529 1.6 christos ACPI_STATUS
530 1.6 christos AcpiUpdateInterfaces (
531 1.7 christos UINT8 Action))
532 1.6 christos
533 1.7 christos ACPI_EXTERNAL_RETURN_UINT32 (
534 1.6 christos UINT32
535 1.6 christos AcpiCheckAddressRange (
536 1.6 christos ACPI_ADR_SPACE_TYPE SpaceId,
537 1.6 christos ACPI_PHYSICAL_ADDRESS Address,
538 1.6 christos ACPI_SIZE Length,
539 1.7 christos BOOLEAN Warn))
540 1.6 christos
541 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
542 1.6 christos ACPI_STATUS
543 1.6 christos AcpiDecodePldBuffer (
544 1.6 christos UINT8 *InBuffer,
545 1.6 christos ACPI_SIZE Length,
546 1.7 christos ACPI_PLD_INFO **ReturnBuffer))
547 1.6 christos
548 1.1 jruoho
549 1.1 jruoho /*
550 1.6 christos * ACPI table load/unload interfaces
551 1.1 jruoho */
552 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
553 1.13 christos ACPI_STATUS ACPI_INIT_FUNCTION
554 1.7 christos AcpiInstallTable (
555 1.7 christos ACPI_PHYSICAL_ADDRESS Address,
556 1.7 christos BOOLEAN Physical))
557 1.7 christos
558 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
559 1.6 christos ACPI_STATUS
560 1.6 christos AcpiLoadTable (
561 1.7 christos ACPI_TABLE_HEADER *Table))
562 1.6 christos
563 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
564 1.6 christos ACPI_STATUS
565 1.6 christos AcpiUnloadParentTable (
566 1.7 christos ACPI_HANDLE Object))
567 1.6 christos
568 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
569 1.13 christos ACPI_STATUS ACPI_INIT_FUNCTION
570 1.6 christos AcpiLoadTables (
571 1.7 christos void))
572 1.1 jruoho
573 1.1 jruoho
574 1.1 jruoho /*
575 1.1 jruoho * ACPI table manipulation interfaces
576 1.1 jruoho */
577 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
578 1.13 christos ACPI_STATUS ACPI_INIT_FUNCTION
579 1.1 jruoho AcpiReallocateRootTable (
580 1.7 christos void))
581 1.1 jruoho
582 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
583 1.13 christos ACPI_STATUS ACPI_INIT_FUNCTION
584 1.1 jruoho AcpiFindRootPointer (
585 1.8 christos ACPI_PHYSICAL_ADDRESS *RsdpAddress))
586 1.1 jruoho
587 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
588 1.1 jruoho ACPI_STATUS
589 1.1 jruoho AcpiGetTableHeader (
590 1.2 jruoho ACPI_CONST_STRING Signature,
591 1.1 jruoho UINT32 Instance,
592 1.7 christos ACPI_TABLE_HEADER *OutTableHeader))
593 1.1 jruoho
594 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
595 1.1 jruoho ACPI_STATUS
596 1.1 jruoho AcpiGetTable (
597 1.2 jruoho ACPI_CONST_STRING Signature,
598 1.1 jruoho UINT32 Instance,
599 1.7 christos ACPI_TABLE_HEADER **OutTable))
600 1.1 jruoho
601 1.14 christos ACPI_EXTERNAL_RETURN_VOID (
602 1.14 christos void
603 1.14 christos AcpiPutTable (
604 1.14 christos ACPI_TABLE_HEADER *Table))
605 1.14 christos
606 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
607 1.1 jruoho ACPI_STATUS
608 1.1 jruoho AcpiGetTableByIndex (
609 1.1 jruoho UINT32 TableIndex,
610 1.7 christos ACPI_TABLE_HEADER **OutTable))
611 1.1 jruoho
612 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
613 1.1 jruoho ACPI_STATUS
614 1.1 jruoho AcpiInstallTableHandler (
615 1.1 jruoho ACPI_TABLE_HANDLER Handler,
616 1.7 christos void *Context))
617 1.1 jruoho
618 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
619 1.1 jruoho ACPI_STATUS
620 1.1 jruoho AcpiRemoveTableHandler (
621 1.7 christos ACPI_TABLE_HANDLER Handler))
622 1.1 jruoho
623 1.1 jruoho
624 1.1 jruoho /*
625 1.1 jruoho * Namespace and name interfaces
626 1.1 jruoho */
627 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
628 1.1 jruoho ACPI_STATUS
629 1.1 jruoho AcpiWalkNamespace (
630 1.1 jruoho ACPI_OBJECT_TYPE Type,
631 1.1 jruoho ACPI_HANDLE StartObject,
632 1.1 jruoho UINT32 MaxDepth,
633 1.6 christos ACPI_WALK_CALLBACK DescendingCallback,
634 1.6 christos ACPI_WALK_CALLBACK AscendingCallback,
635 1.1 jruoho void *Context,
636 1.7 christos void **ReturnValue))
637 1.1 jruoho
638 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
639 1.1 jruoho ACPI_STATUS
640 1.1 jruoho AcpiGetDevices (
641 1.1 jruoho char *HID,
642 1.1 jruoho ACPI_WALK_CALLBACK UserFunction,
643 1.1 jruoho void *Context,
644 1.7 christos void **ReturnValue))
645 1.1 jruoho
646 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
647 1.1 jruoho ACPI_STATUS
648 1.1 jruoho AcpiGetName (
649 1.1 jruoho ACPI_HANDLE Object,
650 1.1 jruoho UINT32 NameType,
651 1.7 christos ACPI_BUFFER *RetPathPtr))
652 1.1 jruoho
653 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
654 1.1 jruoho ACPI_STATUS
655 1.1 jruoho AcpiGetHandle (
656 1.1 jruoho ACPI_HANDLE Parent,
657 1.2 jruoho ACPI_CONST_STRING Pathname,
658 1.7 christos ACPI_HANDLE *RetHandle))
659 1.1 jruoho
660 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
661 1.1 jruoho ACPI_STATUS
662 1.1 jruoho AcpiAttachData (
663 1.1 jruoho ACPI_HANDLE Object,
664 1.1 jruoho ACPI_OBJECT_HANDLER Handler,
665 1.7 christos void *Data))
666 1.1 jruoho
667 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
668 1.1 jruoho ACPI_STATUS
669 1.1 jruoho AcpiDetachData (
670 1.1 jruoho ACPI_HANDLE Object,
671 1.7 christos ACPI_OBJECT_HANDLER Handler))
672 1.1 jruoho
673 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
674 1.1 jruoho ACPI_STATUS
675 1.1 jruoho AcpiGetData (
676 1.1 jruoho ACPI_HANDLE Object,
677 1.1 jruoho ACPI_OBJECT_HANDLER Handler,
678 1.7 christos void **Data))
679 1.1 jruoho
680 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
681 1.1 jruoho ACPI_STATUS
682 1.1 jruoho AcpiDebugTrace (
683 1.9 christos const char *Name,
684 1.1 jruoho UINT32 DebugLevel,
685 1.1 jruoho UINT32 DebugLayer,
686 1.7 christos UINT32 Flags))
687 1.1 jruoho
688 1.1 jruoho
689 1.1 jruoho /*
690 1.1 jruoho * Object manipulation and enumeration
691 1.1 jruoho */
692 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
693 1.1 jruoho ACPI_STATUS
694 1.1 jruoho AcpiEvaluateObject (
695 1.1 jruoho ACPI_HANDLE Object,
696 1.2 jruoho ACPI_CONST_STRING Pathname,
697 1.1 jruoho ACPI_OBJECT_LIST *ParameterObjects,
698 1.7 christos ACPI_BUFFER *ReturnObjectBuffer))
699 1.1 jruoho
700 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
701 1.1 jruoho ACPI_STATUS
702 1.1 jruoho AcpiEvaluateObjectTyped (
703 1.1 jruoho ACPI_HANDLE Object,
704 1.2 jruoho ACPI_CONST_STRING Pathname,
705 1.1 jruoho ACPI_OBJECT_LIST *ExternalParams,
706 1.1 jruoho ACPI_BUFFER *ReturnBuffer,
707 1.7 christos ACPI_OBJECT_TYPE ReturnType))
708 1.1 jruoho
709 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
710 1.1 jruoho ACPI_STATUS
711 1.1 jruoho AcpiGetObjectInfo (
712 1.1 jruoho ACPI_HANDLE Object,
713 1.7 christos ACPI_DEVICE_INFO **ReturnBuffer))
714 1.1 jruoho
715 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
716 1.1 jruoho ACPI_STATUS
717 1.1 jruoho AcpiInstallMethod (
718 1.7 christos UINT8 *Buffer))
719 1.1 jruoho
720 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
721 1.1 jruoho ACPI_STATUS
722 1.1 jruoho AcpiGetNextObject (
723 1.1 jruoho ACPI_OBJECT_TYPE Type,
724 1.1 jruoho ACPI_HANDLE Parent,
725 1.1 jruoho ACPI_HANDLE Child,
726 1.7 christos ACPI_HANDLE *OutHandle))
727 1.1 jruoho
728 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
729 1.1 jruoho ACPI_STATUS
730 1.1 jruoho AcpiGetType (
731 1.1 jruoho ACPI_HANDLE Object,
732 1.7 christos ACPI_OBJECT_TYPE *OutType))
733 1.1 jruoho
734 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
735 1.1 jruoho ACPI_STATUS
736 1.1 jruoho AcpiGetParent (
737 1.1 jruoho ACPI_HANDLE Object,
738 1.7 christos ACPI_HANDLE *OutHandle))
739 1.1 jruoho
740 1.1 jruoho
741 1.1 jruoho /*
742 1.1 jruoho * Handler interfaces
743 1.1 jruoho */
744 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
745 1.1 jruoho ACPI_STATUS
746 1.1 jruoho AcpiInstallInitializationHandler (
747 1.1 jruoho ACPI_INIT_HANDLER Handler,
748 1.7 christos UINT32 Function))
749 1.1 jruoho
750 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
751 1.6 christos ACPI_STATUS
752 1.6 christos AcpiInstallSciHandler (
753 1.6 christos ACPI_SCI_HANDLER Address,
754 1.6 christos void *Context))
755 1.6 christos
756 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
757 1.6 christos ACPI_STATUS
758 1.6 christos AcpiRemoveSciHandler (
759 1.6 christos ACPI_SCI_HANDLER Address))
760 1.6 christos
761 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
762 1.1 jruoho ACPI_STATUS
763 1.3 jruoho AcpiInstallGlobalEventHandler (
764 1.3 jruoho ACPI_GBL_EVENT_HANDLER Handler,
765 1.6 christos void *Context))
766 1.3 jruoho
767 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
768 1.3 jruoho ACPI_STATUS
769 1.1 jruoho AcpiInstallFixedEventHandler (
770 1.1 jruoho UINT32 AcpiEvent,
771 1.1 jruoho ACPI_EVENT_HANDLER Handler,
772 1.6 christos void *Context))
773 1.1 jruoho
774 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
775 1.1 jruoho ACPI_STATUS
776 1.1 jruoho AcpiRemoveFixedEventHandler (
777 1.1 jruoho UINT32 AcpiEvent,
778 1.6 christos ACPI_EVENT_HANDLER Handler))
779 1.1 jruoho
780 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
781 1.1 jruoho ACPI_STATUS
782 1.3 jruoho AcpiInstallGpeHandler (
783 1.3 jruoho ACPI_HANDLE GpeDevice,
784 1.3 jruoho UINT32 GpeNumber,
785 1.3 jruoho UINT32 Type,
786 1.3 jruoho ACPI_GPE_HANDLER Address,
787 1.6 christos void *Context))
788 1.3 jruoho
789 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
790 1.3 jruoho ACPI_STATUS
791 1.8 christos AcpiInstallGpeRawHandler (
792 1.8 christos ACPI_HANDLE GpeDevice,
793 1.8 christos UINT32 GpeNumber,
794 1.8 christos UINT32 Type,
795 1.8 christos ACPI_GPE_HANDLER Address,
796 1.8 christos void *Context))
797 1.8 christos
798 1.8 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
799 1.8 christos ACPI_STATUS
800 1.3 jruoho AcpiRemoveGpeHandler (
801 1.3 jruoho ACPI_HANDLE GpeDevice,
802 1.3 jruoho UINT32 GpeNumber,
803 1.6 christos ACPI_GPE_HANDLER Address))
804 1.3 jruoho
805 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
806 1.3 jruoho ACPI_STATUS
807 1.1 jruoho AcpiInstallNotifyHandler (
808 1.1 jruoho ACPI_HANDLE Device,
809 1.1 jruoho UINT32 HandlerType,
810 1.1 jruoho ACPI_NOTIFY_HANDLER Handler,
811 1.7 christos void *Context))
812 1.1 jruoho
813 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
814 1.1 jruoho ACPI_STATUS
815 1.1 jruoho AcpiRemoveNotifyHandler (
816 1.1 jruoho ACPI_HANDLE Device,
817 1.1 jruoho UINT32 HandlerType,
818 1.7 christos ACPI_NOTIFY_HANDLER Handler))
819 1.1 jruoho
820 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
821 1.1 jruoho ACPI_STATUS
822 1.1 jruoho AcpiInstallAddressSpaceHandler (
823 1.1 jruoho ACPI_HANDLE Device,
824 1.1 jruoho ACPI_ADR_SPACE_TYPE SpaceId,
825 1.1 jruoho ACPI_ADR_SPACE_HANDLER Handler,
826 1.1 jruoho ACPI_ADR_SPACE_SETUP Setup,
827 1.7 christos void *Context))
828 1.1 jruoho
829 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
830 1.1 jruoho ACPI_STATUS
831 1.1 jruoho AcpiRemoveAddressSpaceHandler (
832 1.1 jruoho ACPI_HANDLE Device,
833 1.1 jruoho ACPI_ADR_SPACE_TYPE SpaceId,
834 1.7 christos ACPI_ADR_SPACE_HANDLER Handler))
835 1.1 jruoho
836 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
837 1.1 jruoho ACPI_STATUS
838 1.3 jruoho AcpiInstallExceptionHandler (
839 1.7 christos ACPI_EXCEPTION_HANDLER Handler))
840 1.1 jruoho
841 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
842 1.1 jruoho ACPI_STATUS
843 1.3 jruoho AcpiInstallInterfaceHandler (
844 1.7 christos ACPI_INTERFACE_HANDLER Handler))
845 1.1 jruoho
846 1.1 jruoho
847 1.1 jruoho /*
848 1.3 jruoho * Global Lock interfaces
849 1.1 jruoho */
850 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
851 1.1 jruoho ACPI_STATUS
852 1.1 jruoho AcpiAcquireGlobalLock (
853 1.1 jruoho UINT16 Timeout,
854 1.6 christos UINT32 *Handle))
855 1.1 jruoho
856 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
857 1.1 jruoho ACPI_STATUS
858 1.1 jruoho AcpiReleaseGlobalLock (
859 1.6 christos UINT32 Handle))
860 1.6 christos
861 1.6 christos
862 1.6 christos /*
863 1.6 christos * Interfaces to AML mutex objects
864 1.6 christos */
865 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
866 1.6 christos ACPI_STATUS
867 1.6 christos AcpiAcquireMutex (
868 1.6 christos ACPI_HANDLE Handle,
869 1.6 christos ACPI_STRING Pathname,
870 1.7 christos UINT16 Timeout))
871 1.6 christos
872 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
873 1.6 christos ACPI_STATUS
874 1.6 christos AcpiReleaseMutex (
875 1.6 christos ACPI_HANDLE Handle,
876 1.7 christos ACPI_STRING Pathname))
877 1.1 jruoho
878 1.3 jruoho
879 1.3 jruoho /*
880 1.3 jruoho * Fixed Event interfaces
881 1.3 jruoho */
882 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
883 1.1 jruoho ACPI_STATUS
884 1.1 jruoho AcpiEnableEvent (
885 1.1 jruoho UINT32 Event,
886 1.6 christos UINT32 Flags))
887 1.1 jruoho
888 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
889 1.1 jruoho ACPI_STATUS
890 1.1 jruoho AcpiDisableEvent (
891 1.1 jruoho UINT32 Event,
892 1.6 christos UINT32 Flags))
893 1.1 jruoho
894 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
895 1.1 jruoho ACPI_STATUS
896 1.1 jruoho AcpiClearEvent (
897 1.6 christos UINT32 Event))
898 1.1 jruoho
899 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
900 1.1 jruoho ACPI_STATUS
901 1.1 jruoho AcpiGetEventStatus (
902 1.1 jruoho UINT32 Event,
903 1.6 christos ACPI_EVENT_STATUS *EventStatus))
904 1.1 jruoho
905 1.1 jruoho
906 1.1 jruoho /*
907 1.3 jruoho * General Purpose Event (GPE) Interfaces
908 1.1 jruoho */
909 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
910 1.1 jruoho ACPI_STATUS
911 1.3 jruoho AcpiUpdateAllGpes (
912 1.6 christos void))
913 1.3 jruoho
914 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
915 1.3 jruoho ACPI_STATUS
916 1.3 jruoho AcpiEnableGpe (
917 1.3 jruoho ACPI_HANDLE GpeDevice,
918 1.6 christos UINT32 GpeNumber))
919 1.3 jruoho
920 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
921 1.3 jruoho ACPI_STATUS
922 1.3 jruoho AcpiDisableGpe (
923 1.3 jruoho ACPI_HANDLE GpeDevice,
924 1.6 christos UINT32 GpeNumber))
925 1.3 jruoho
926 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
927 1.3 jruoho ACPI_STATUS
928 1.3 jruoho AcpiClearGpe (
929 1.3 jruoho ACPI_HANDLE GpeDevice,
930 1.6 christos UINT32 GpeNumber))
931 1.3 jruoho
932 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
933 1.3 jruoho ACPI_STATUS
934 1.1 jruoho AcpiSetGpe (
935 1.1 jruoho ACPI_HANDLE GpeDevice,
936 1.1 jruoho UINT32 GpeNumber,
937 1.6 christos UINT8 Action))
938 1.1 jruoho
939 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
940 1.1 jruoho ACPI_STATUS
941 1.3 jruoho AcpiFinishGpe (
942 1.1 jruoho ACPI_HANDLE GpeDevice,
943 1.6 christos UINT32 GpeNumber))
944 1.1 jruoho
945 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
946 1.1 jruoho ACPI_STATUS
947 1.13 christos AcpiMaskGpe (
948 1.13 christos ACPI_HANDLE GpeDevice,
949 1.13 christos UINT32 GpeNumber,
950 1.13 christos BOOLEAN IsMasked))
951 1.13 christos
952 1.13 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
953 1.13 christos ACPI_STATUS
954 1.7 christos AcpiMarkGpeForWake (
955 1.7 christos ACPI_HANDLE GpeDevice,
956 1.7 christos UINT32 GpeNumber))
957 1.7 christos
958 1.7 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
959 1.7 christos ACPI_STATUS
960 1.3 jruoho AcpiSetupGpeForWake (
961 1.3 jruoho ACPI_HANDLE ParentDevice,
962 1.1 jruoho ACPI_HANDLE GpeDevice,
963 1.6 christos UINT32 GpeNumber))
964 1.1 jruoho
965 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
966 1.1 jruoho ACPI_STATUS
967 1.3 jruoho AcpiSetGpeWakeMask (
968 1.1 jruoho ACPI_HANDLE GpeDevice,
969 1.3 jruoho UINT32 GpeNumber,
970 1.6 christos UINT8 Action))
971 1.1 jruoho
972 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
973 1.1 jruoho ACPI_STATUS
974 1.1 jruoho AcpiGetGpeStatus (
975 1.1 jruoho ACPI_HANDLE GpeDevice,
976 1.1 jruoho UINT32 GpeNumber,
977 1.6 christos ACPI_EVENT_STATUS *EventStatus))
978 1.1 jruoho
979 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
980 1.1 jruoho ACPI_STATUS
981 1.1 jruoho AcpiDisableAllGpes (
982 1.6 christos void))
983 1.1 jruoho
984 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
985 1.1 jruoho ACPI_STATUS
986 1.1 jruoho AcpiEnableAllRuntimeGpes (
987 1.6 christos void))
988 1.1 jruoho
989 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
990 1.1 jruoho ACPI_STATUS
991 1.8 christos AcpiEnableAllWakeupGpes (
992 1.8 christos void))
993 1.8 christos
994 1.8 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
995 1.8 christos ACPI_STATUS
996 1.1 jruoho AcpiGetGpeDevice (
997 1.1 jruoho UINT32 GpeIndex,
998 1.6 christos ACPI_HANDLE *GpeDevice))
999 1.1 jruoho
1000 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
1001 1.1 jruoho ACPI_STATUS
1002 1.1 jruoho AcpiInstallGpeBlock (
1003 1.1 jruoho ACPI_HANDLE GpeDevice,
1004 1.1 jruoho ACPI_GENERIC_ADDRESS *GpeBlockAddress,
1005 1.1 jruoho UINT32 RegisterCount,
1006 1.6 christos UINT32 InterruptNumber))
1007 1.1 jruoho
1008 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
1009 1.1 jruoho ACPI_STATUS
1010 1.1 jruoho AcpiRemoveGpeBlock (
1011 1.6 christos ACPI_HANDLE GpeDevice))
1012 1.1 jruoho
1013 1.1 jruoho
1014 1.1 jruoho /*
1015 1.1 jruoho * Resource interfaces
1016 1.1 jruoho */
1017 1.1 jruoho typedef
1018 1.1 jruoho ACPI_STATUS (*ACPI_WALK_RESOURCE_CALLBACK) (
1019 1.1 jruoho ACPI_RESOURCE *Resource,
1020 1.1 jruoho void *Context);
1021 1.1 jruoho
1022 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
1023 1.1 jruoho ACPI_STATUS
1024 1.1 jruoho AcpiGetVendorResource (
1025 1.1 jruoho ACPI_HANDLE Device,
1026 1.1 jruoho char *Name,
1027 1.1 jruoho ACPI_VENDOR_UUID *Uuid,
1028 1.7 christos ACPI_BUFFER *RetBuffer))
1029 1.1 jruoho
1030 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
1031 1.1 jruoho ACPI_STATUS
1032 1.1 jruoho AcpiGetCurrentResources (
1033 1.1 jruoho ACPI_HANDLE Device,
1034 1.7 christos ACPI_BUFFER *RetBuffer))
1035 1.1 jruoho
1036 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
1037 1.1 jruoho ACPI_STATUS
1038 1.1 jruoho AcpiGetPossibleResources (
1039 1.1 jruoho ACPI_HANDLE Device,
1040 1.7 christos ACPI_BUFFER *RetBuffer))
1041 1.1 jruoho
1042 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
1043 1.1 jruoho ACPI_STATUS
1044 1.6 christos AcpiGetEventResources (
1045 1.6 christos ACPI_HANDLE DeviceHandle,
1046 1.7 christos ACPI_BUFFER *RetBuffer))
1047 1.6 christos
1048 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
1049 1.6 christos ACPI_STATUS
1050 1.6 christos AcpiWalkResourceBuffer (
1051 1.6 christos ACPI_BUFFER *Buffer,
1052 1.6 christos ACPI_WALK_RESOURCE_CALLBACK UserFunction,
1053 1.7 christos void *Context))
1054 1.6 christos
1055 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
1056 1.6 christos ACPI_STATUS
1057 1.1 jruoho AcpiWalkResources (
1058 1.1 jruoho ACPI_HANDLE Device,
1059 1.2 jruoho const char *Name,
1060 1.1 jruoho ACPI_WALK_RESOURCE_CALLBACK UserFunction,
1061 1.7 christos void *Context))
1062 1.1 jruoho
1063 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
1064 1.1 jruoho ACPI_STATUS
1065 1.1 jruoho AcpiSetCurrentResources (
1066 1.1 jruoho ACPI_HANDLE Device,
1067 1.7 christos ACPI_BUFFER *InBuffer))
1068 1.1 jruoho
1069 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
1070 1.1 jruoho ACPI_STATUS
1071 1.1 jruoho AcpiGetIrqRoutingTable (
1072 1.1 jruoho ACPI_HANDLE Device,
1073 1.7 christos ACPI_BUFFER *RetBuffer))
1074 1.1 jruoho
1075 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
1076 1.1 jruoho ACPI_STATUS
1077 1.1 jruoho AcpiResourceToAddress64 (
1078 1.1 jruoho ACPI_RESOURCE *Resource,
1079 1.7 christos ACPI_RESOURCE_ADDRESS64 *Out))
1080 1.1 jruoho
1081 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
1082 1.6 christos ACPI_STATUS
1083 1.6 christos AcpiBufferToResource (
1084 1.6 christos UINT8 *AmlBuffer,
1085 1.6 christos UINT16 AmlBufferLength,
1086 1.7 christos ACPI_RESOURCE **ResourcePtr))
1087 1.6 christos
1088 1.1 jruoho
1089 1.1 jruoho /*
1090 1.1 jruoho * Hardware (ACPI device) interfaces
1091 1.1 jruoho */
1092 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
1093 1.1 jruoho ACPI_STATUS
1094 1.1 jruoho AcpiReset (
1095 1.7 christos void))
1096 1.1 jruoho
1097 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
1098 1.1 jruoho ACPI_STATUS
1099 1.1 jruoho AcpiRead (
1100 1.1 jruoho UINT64 *Value,
1101 1.7 christos ACPI_GENERIC_ADDRESS *Reg))
1102 1.1 jruoho
1103 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
1104 1.1 jruoho ACPI_STATUS
1105 1.1 jruoho AcpiWrite (
1106 1.1 jruoho UINT64 Value,
1107 1.7 christos ACPI_GENERIC_ADDRESS *Reg))
1108 1.1 jruoho
1109 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
1110 1.1 jruoho ACPI_STATUS
1111 1.1 jruoho AcpiReadBitRegister (
1112 1.1 jruoho UINT32 RegisterId,
1113 1.6 christos UINT32 *ReturnValue))
1114 1.1 jruoho
1115 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
1116 1.1 jruoho ACPI_STATUS
1117 1.1 jruoho AcpiWriteBitRegister (
1118 1.1 jruoho UINT32 RegisterId,
1119 1.6 christos UINT32 Value))
1120 1.1 jruoho
1121 1.6 christos
1122 1.6 christos /*
1123 1.6 christos * Sleep/Wake interfaces
1124 1.6 christos */
1125 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
1126 1.1 jruoho ACPI_STATUS
1127 1.1 jruoho AcpiGetSleepTypeData (
1128 1.1 jruoho UINT8 SleepState,
1129 1.1 jruoho UINT8 *Slp_TypA,
1130 1.7 christos UINT8 *Slp_TypB))
1131 1.1 jruoho
1132 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
1133 1.1 jruoho ACPI_STATUS
1134 1.1 jruoho AcpiEnterSleepStatePrep (
1135 1.7 christos UINT8 SleepState))
1136 1.1 jruoho
1137 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
1138 1.1 jruoho ACPI_STATUS
1139 1.1 jruoho AcpiEnterSleepState (
1140 1.7 christos UINT8 SleepState))
1141 1.1 jruoho
1142 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
1143 1.1 jruoho ACPI_STATUS
1144 1.1 jruoho AcpiEnterSleepStateS4bios (
1145 1.6 christos void))
1146 1.6 christos
1147 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
1148 1.6 christos ACPI_STATUS
1149 1.6 christos AcpiLeaveSleepStatePrep (
1150 1.7 christos UINT8 SleepState))
1151 1.1 jruoho
1152 1.7 christos ACPI_EXTERNAL_RETURN_STATUS (
1153 1.1 jruoho ACPI_STATUS
1154 1.1 jruoho AcpiLeaveSleepState (
1155 1.7 christos UINT8 SleepState))
1156 1.6 christos
1157 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
1158 1.1 jruoho ACPI_STATUS
1159 1.1 jruoho AcpiSetFirmwareWakingVector (
1160 1.9 christos ACPI_PHYSICAL_ADDRESS PhysicalAddress,
1161 1.9 christos ACPI_PHYSICAL_ADDRESS PhysicalAddress64))
1162 1.1 jruoho
1163 1.1 jruoho
1164 1.1 jruoho /*
1165 1.6 christos * ACPI Timer interfaces
1166 1.6 christos */
1167 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
1168 1.6 christos ACPI_STATUS
1169 1.6 christos AcpiGetTimerResolution (
1170 1.6 christos UINT32 *Resolution))
1171 1.6 christos
1172 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
1173 1.6 christos ACPI_STATUS
1174 1.6 christos AcpiGetTimer (
1175 1.6 christos UINT32 *Ticks))
1176 1.6 christos
1177 1.6 christos ACPI_HW_DEPENDENT_RETURN_STATUS (
1178 1.6 christos ACPI_STATUS
1179 1.6 christos AcpiGetTimerDuration (
1180 1.6 christos UINT32 StartTicks,
1181 1.6 christos UINT32 EndTicks,
1182 1.6 christos UINT32 *TimeElapsed))
1183 1.6 christos
1184 1.6 christos
1185 1.6 christos /*
1186 1.1 jruoho * Error/Warning output
1187 1.1 jruoho */
1188 1.7 christos ACPI_MSG_DEPENDENT_RETURN_VOID (
1189 1.6 christos ACPI_PRINTF_LIKE(3)
1190 1.1 jruoho void ACPI_INTERNAL_VAR_XFACE
1191 1.1 jruoho AcpiError (
1192 1.1 jruoho const char *ModuleName,
1193 1.1 jruoho UINT32 LineNumber,
1194 1.1 jruoho const char *Format,
1195 1.7 christos ...))
1196 1.1 jruoho
1197 1.7 christos ACPI_MSG_DEPENDENT_RETURN_VOID (
1198 1.6 christos ACPI_PRINTF_LIKE(4)
1199 1.1 jruoho void ACPI_INTERNAL_VAR_XFACE
1200 1.1 jruoho AcpiException (
1201 1.1 jruoho const char *ModuleName,
1202 1.1 jruoho UINT32 LineNumber,
1203 1.1 jruoho ACPI_STATUS Status,
1204 1.1 jruoho const char *Format,
1205 1.7 christos ...))
1206 1.1 jruoho
1207 1.7 christos ACPI_MSG_DEPENDENT_RETURN_VOID (
1208 1.6 christos ACPI_PRINTF_LIKE(3)
1209 1.1 jruoho void ACPI_INTERNAL_VAR_XFACE
1210 1.1 jruoho AcpiWarning (
1211 1.1 jruoho const char *ModuleName,
1212 1.1 jruoho UINT32 LineNumber,
1213 1.1 jruoho const char *Format,
1214 1.7 christos ...))
1215 1.1 jruoho
1216 1.7 christos ACPI_MSG_DEPENDENT_RETURN_VOID (
1217 1.11 christos ACPI_PRINTF_LIKE(1)
1218 1.1 jruoho void ACPI_INTERNAL_VAR_XFACE
1219 1.1 jruoho AcpiInfo (
1220 1.1 jruoho const char *Format,
1221 1.7 christos ...))
1222 1.6 christos
1223 1.7 christos ACPI_MSG_DEPENDENT_RETURN_VOID (
1224 1.6 christos ACPI_PRINTF_LIKE(3)
1225 1.6 christos void ACPI_INTERNAL_VAR_XFACE
1226 1.6 christos AcpiBiosError (
1227 1.6 christos const char *ModuleName,
1228 1.6 christos UINT32 LineNumber,
1229 1.6 christos const char *Format,
1230 1.7 christos ...))
1231 1.6 christos
1232 1.7 christos ACPI_MSG_DEPENDENT_RETURN_VOID (
1233 1.6 christos ACPI_PRINTF_LIKE(3)
1234 1.6 christos void ACPI_INTERNAL_VAR_XFACE
1235 1.6 christos AcpiBiosWarning (
1236 1.6 christos const char *ModuleName,
1237 1.6 christos UINT32 LineNumber,
1238 1.6 christos const char *Format,
1239 1.7 christos ...))
1240 1.1 jruoho
1241 1.1 jruoho
1242 1.1 jruoho /*
1243 1.1 jruoho * Debug output
1244 1.1 jruoho */
1245 1.7 christos ACPI_DBG_DEPENDENT_RETURN_VOID (
1246 1.6 christos ACPI_PRINTF_LIKE(6)
1247 1.1 jruoho void ACPI_INTERNAL_VAR_XFACE
1248 1.1 jruoho AcpiDebugPrint (
1249 1.1 jruoho UINT32 RequestedDebugLevel,
1250 1.1 jruoho UINT32 LineNumber,
1251 1.1 jruoho const char *FunctionName,
1252 1.1 jruoho const char *ModuleName,
1253 1.1 jruoho UINT32 ComponentId,
1254 1.1 jruoho const char *Format,
1255 1.7 christos ...))
1256 1.1 jruoho
1257 1.7 christos ACPI_DBG_DEPENDENT_RETURN_VOID (
1258 1.6 christos ACPI_PRINTF_LIKE(6)
1259 1.1 jruoho void ACPI_INTERNAL_VAR_XFACE
1260 1.1 jruoho AcpiDebugPrintRaw (
1261 1.1 jruoho UINT32 RequestedDebugLevel,
1262 1.1 jruoho UINT32 LineNumber,
1263 1.1 jruoho const char *FunctionName,
1264 1.1 jruoho const char *ModuleName,
1265 1.1 jruoho UINT32 ComponentId,
1266 1.1 jruoho const char *Format,
1267 1.7 christos ...))
1268 1.7 christos
1269 1.9 christos ACPI_DBG_DEPENDENT_RETURN_VOID (
1270 1.9 christos void
1271 1.9 christos AcpiTracePoint (
1272 1.9 christos ACPI_TRACE_EVENT_TYPE Type,
1273 1.9 christos BOOLEAN Begin,
1274 1.9 christos UINT8 *Aml,
1275 1.9 christos char *Pathname))
1276 1.9 christos
1277 1.10 christos ACPI_STATUS
1278 1.10 christos AcpiInitializeDebugger (
1279 1.10 christos void);
1280 1.10 christos
1281 1.10 christos void
1282 1.10 christos AcpiTerminateDebugger (
1283 1.10 christos void);
1284 1.10 christos
1285 1.10 christos void
1286 1.14 christos AcpiRunDebugger (
1287 1.14 christos char *BatchBuffer);
1288 1.14 christos
1289 1.14 christos void
1290 1.10 christos AcpiSetDebuggerThreadId (
1291 1.10 christos ACPI_THREAD_ID ThreadId);
1292 1.10 christos
1293 1.1 jruoho #endif /* __ACXFACE_H__ */
1294