ACPICA: Utilities: Introduce acpi_log_error() to improve portability
[deliverable/linux.git] / include / acpi / acpixf.h
CommitLineData
1da177e4
LT
1/******************************************************************************
2 *
3 * Name: acpixf.h - External interfaces to the ACPI subsystem
4 *
5 *****************************************************************************/
6
7/*
fbb7a2dc 8 * Copyright (C) 2000 - 2014, Intel Corp.
1da177e4
LT
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
1da177e4
LT
44#ifndef __ACXFACE_H__
45#define __ACXFACE_H__
46
50df4d8b
BM
47/* Current ACPICA subsystem version in YYYYMMDD format */
48
bc381eeb 49#define ACPI_CA_VERSION 0x20140424
50df4d8b 50
a1ce3928
DH
51#include <acpi/acconfig.h>
52#include <acpi/actypes.h>
53#include <acpi/actbl.h>
d8dc91b7 54#include <acpi/acbuffer.h>
1da177e4 55
889c78be
LM
56extern u8 acpi_gbl_permanent_mmap;
57
1011080d
BM
58/*****************************************************************************
59 *
60 * Macros used for ACPICA globals and configuration
61 *
62 ****************************************************************************/
63
50df4d8b 64/*
1011080d 65 * Ensure that global variables are defined and initialized only once.
3035ff70 66 *
1011080d
BM
67 * The use of these macros allows for a single list of globals (here)
68 * in order to simplify maintenance of the code.
50df4d8b 69 */
3035ff70
LZ
70#ifdef DEFINE_ACPI_GLOBALS
71#define ACPI_GLOBAL(type,name) \
72 extern type name; \
73 type name
3e8214e5 74
3035ff70
LZ
75#define ACPI_INIT_GLOBAL(type,name,value) \
76 type name=value
3e8214e5 77
3035ff70
LZ
78#else
79#ifndef ACPI_GLOBAL
80#define ACPI_GLOBAL(type,name) \
81 extern type name
82#endif
3e8214e5 83
3035ff70
LZ
84#ifndef ACPI_INIT_GLOBAL
85#define ACPI_INIT_GLOBAL(type,name,value) \
86 extern type name
87#endif
88#endif
50df4d8b 89
33620c54 90/*
1011080d
BM
91 * These macros configure the various ACPICA interfaces. They are
92 * useful for generating stub inline functions for features that are
93 * configured out of the current kernel or ACPICA application.
33620c54 94 */
8b9c1152
LZ
95#ifndef ACPI_EXTERNAL_RETURN_STATUS
96#define ACPI_EXTERNAL_RETURN_STATUS(prototype) \
33620c54 97 prototype;
8b9c1152 98#endif
33620c54 99
8b9c1152
LZ
100#ifndef ACPI_EXTERNAL_RETURN_OK
101#define ACPI_EXTERNAL_RETURN_OK(prototype) \
33620c54 102 prototype;
8b9c1152 103#endif
33620c54 104
8b9c1152
LZ
105#ifndef ACPI_EXTERNAL_RETURN_VOID
106#define ACPI_EXTERNAL_RETURN_VOID(prototype) \
33620c54 107 prototype;
8b9c1152 108#endif
33620c54 109
8b9c1152
LZ
110#ifndef ACPI_EXTERNAL_RETURN_UINT32
111#define ACPI_EXTERNAL_RETURN_UINT32(prototype) \
112 prototype;
113#endif
33620c54 114
8b9c1152
LZ
115#ifndef ACPI_EXTERNAL_RETURN_PTR
116#define ACPI_EXTERNAL_RETURN_PTR(prototype) \
117 prototype;
118#endif
33620c54 119
3035ff70
LZ
120/*****************************************************************************
121 *
1011080d 122 * Public globals and runtime configuration options
3035ff70
LZ
123 *
124 ****************************************************************************/
33620c54 125
44f6c012 126/*
1011080d 127 * Enable "slack mode" of the AML interpreter? Default is FALSE, and the
3035ff70
LZ
128 * interpreter strictly follows the ACPI specification. Setting to TRUE
129 * allows the interpreter to ignore certain errors and/or bad AML constructs.
130 *
131 * Currently, these features are enabled by this flag:
132 *
133 * 1) Allow "implicit return" of last value in a control method
134 * 2) Allow access beyond the end of an operation region
135 * 3) Allow access to uninitialized locals/args (auto-init to integer 0)
136 * 4) Allow ANY object type to be a source operand for the Store() operator
137 * 5) Allow unresolved references (invalid target name) in package objects
138 * 6) Enable warning messages for behavior that is not ACPI spec compliant
1da177e4 139 */
3035ff70 140ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_interpreter_slack, FALSE);
1da177e4 141
3035ff70
LZ
142/*
143 * Automatically serialize all methods that create named objects? Default
144 * is TRUE, meaning that all non_serialized methods are scanned once at
145 * table load time to determine those that create named objects. Methods
146 * that create named objects are marked Serialized in order to prevent
147 * possible run-time problems if they are entered by more than one thread.
148 */
149ACPI_INIT_GLOBAL(u8, acpi_gbl_auto_serialize_methods, TRUE);
1da177e4 150
75c8044f 151/*
3035ff70
LZ
152 * Create the predefined _OSI method in the namespace? Default is TRUE
153 * because ACPICA is fully compatible with other ACPI implementations.
154 * Changing this will revert ACPICA (and machine ASL) to pre-OSI behavior.
75c8044f 155 */
3035ff70 156ACPI_INIT_GLOBAL(u8, acpi_gbl_create_osi_method, TRUE);
1da177e4 157
3035ff70
LZ
158/*
159 * Optionally use default values for the ACPI register widths. Set this to
160 * TRUE to use the defaults, if an FADT contains incorrect widths/lengths.
161 */
162ACPI_INIT_GLOBAL(u8, acpi_gbl_use_default_register_widths, TRUE);
1da177e4 163
47d68c7f
LZ
164/*
165 * Whether or not to verify the table checksum before installation. Set
166 * this to TRUE to verify the table checksum before install it to the table
167 * manager. Note that enabling this option causes errors to happen in some
168 * OSPMs during early initialization stages. Default behavior is to do such
169 * verification.
170 */
171ACPI_INIT_GLOBAL(u8, acpi_gbl_verify_table_checksum, TRUE);
172
3035ff70
LZ
173/*
174 * Optionally enable output from the AML Debug Object.
175 */
176ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_aml_debug_object, FALSE);
9187a415 177
3035ff70
LZ
178/*
179 * Optionally copy the entire DSDT to local memory (instead of simply
180 * mapping it.) There are some BIOSs that corrupt or replace the original
181 * DSDT, creating the need for this option. Default is FALSE, do not copy
182 * the DSDT.
183 */
184ACPI_INIT_GLOBAL(u8, acpi_gbl_copy_dsdt_locally, FALSE);
1da177e4 185
3035ff70
LZ
186/*
187 * Optionally ignore an XSDT if present and use the RSDT instead.
188 * Although the ACPI specification requires that an XSDT be used instead
189 * of the RSDT, the XSDT has been found to be corrupt or ill-formed on
190 * some machines. Default behavior is to use the XSDT if present.
191 */
192ACPI_INIT_GLOBAL(u8, acpi_gbl_do_not_use_xsdt, FALSE);
1da177e4 193
3035ff70
LZ
194/*
195 * Optionally use 32-bit FADT addresses if and when there is a conflict
196 * (address mismatch) between the 32-bit and 64-bit versions of the
197 * address. Although ACPICA adheres to the ACPI specification which
198 * requires the use of the corresponding 64-bit address if it is non-zero,
199 * some machines have been found to have a corrupted non-zero 64-bit
c9b77a40 200 * address. Default is TRUE, favor the 32-bit addresses.
3035ff70 201 */
c9b77a40 202ACPI_INIT_GLOBAL(u8, acpi_gbl_use32_bit_fadt_addresses, TRUE);
b0ed7a91 203
3035ff70
LZ
204/*
205 * Optionally truncate I/O addresses to 16 bits. Provides compatibility
206 * with other ACPI implementations. NOTE: During ACPICA initialization,
207 * this value is set to TRUE if any Windows OSI strings have been
208 * requested by the BIOS.
209 */
210ACPI_INIT_GLOBAL(u8, acpi_gbl_truncate_io_addresses, FALSE);
b0ed7a91 211
3035ff70
LZ
212/*
213 * Disable runtime checking and repair of values returned by control methods.
214 * Use only if the repair is causing a problem on a particular machine.
215 */
216ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_auto_repair, FALSE);
2cf9f5bc 217
3035ff70
LZ
218/*
219 * Optionally do not install any SSDTs from the RSDT/XSDT during initialization.
220 * This can be useful for debugging ACPI problems on some machines.
221 */
222ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_ssdt_table_install, FALSE);
f654c0fe 223
3035ff70
LZ
224/*
225 * We keep track of the latest version of Windows that has been requested by
fea79bc0 226 * the BIOS. ACPI 5.0.
3035ff70
LZ
227 */
228ACPI_INIT_GLOBAL(u8, acpi_gbl_osi_data, 0);
be030a57 229
1da177e4 230/*
3a2f3a33
LZ
231 * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
232 * that the ACPI hardware is no longer required. A flag in the FADT indicates
233 * a reduced HW machine, and that flag is duplicated here for convenience.
1da177e4 234 */
3a2f3a33 235ACPI_INIT_GLOBAL(u8, acpi_gbl_reduced_hardware, FALSE);
f3d2e786 236
3a2f3a33
LZ
237/*
238 * This mechanism is used to trace a specified AML method. The method is
239 * traced each time it is executed.
240 */
241ACPI_INIT_GLOBAL(u32, acpi_gbl_trace_flags, 0);
242ACPI_INIT_GLOBAL(acpi_name, acpi_gbl_trace_method_name, 0);
1da177e4 243
3a2f3a33
LZ
244/*
245 * Runtime configuration of debug output control masks. We want the debug
246 * switches statically initialized so they are already set when the debugger
247 * is entered.
248 */
249ACPI_INIT_GLOBAL(u32, acpi_dbg_level, ACPI_DEBUG_DEFAULT);
250ACPI_INIT_GLOBAL(u32, acpi_dbg_layer, 0);
1da177e4 251
f60d8181 252/*
1011080d 253 * Other miscellaneous globals
f60d8181 254 */
3a2f3a33 255ACPI_GLOBAL(struct acpi_table_fadt, acpi_gbl_FADT);
1011080d 256ACPI_GLOBAL(u32, acpi_current_gpe_count);
3a2f3a33 257ACPI_GLOBAL(u8, acpi_gbl_system_awake_and_running);
f60d8181 258
1011080d
BM
259/*****************************************************************************
260 *
261 * ACPICA public interface configuration.
262 *
263 * Interfaces that are configured out of the ACPICA build are replaced
264 * by inlined stubs by default.
265 *
266 ****************************************************************************/
1da177e4 267
33620c54 268/*
1011080d
BM
269 * Hardware-reduced prototypes (default: Not hardware reduced).
270 *
271 * All ACPICA hardware-related interfaces that use these macros will be
272 * configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag
33620c54 273 * is set to TRUE.
1011080d
BM
274 *
275 * Note: This static build option for reduced hardware is intended to
276 * reduce ACPICA code size if desired or necessary. However, even if this
277 * option is not specified, the runtime behavior of ACPICA is dependent
278 * on the actual FADT reduced hardware flag (HW_REDUCED_ACPI). If set,
279 * the flag will enable similar behavior -- ACPICA will not attempt
280 * to access any ACPI-relate hardware (SCI, GPEs, Fixed Events, etc.)
33620c54
BM
281 */
282#if (!ACPI_REDUCED_HARDWARE)
283#define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \
8b9c1152 284 ACPI_EXTERNAL_RETURN_STATUS(prototype)
1da177e4 285
33620c54 286#define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \
8b9c1152 287 ACPI_EXTERNAL_RETURN_OK(prototype)
1da177e4 288
33620c54 289#define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \
8b9c1152 290 ACPI_EXTERNAL_RETURN_VOID(prototype)
cd27d79f 291
33620c54
BM
292#else
293#define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \
294 static ACPI_INLINE prototype {return(AE_NOT_CONFIGURED);}
1da177e4 295
33620c54
BM
296#define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \
297 static ACPI_INLINE prototype {return(AE_OK);}
1da177e4 298
33620c54 299#define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \
c26f3c90 300 static ACPI_INLINE prototype {return;}
3e08e2d2 301
33620c54 302#endif /* !ACPI_REDUCED_HARDWARE */
3e08e2d2 303
1da177e4 304/*
1011080d
BM
305 * Error message prototypes (default: error messages enabled).
306 *
307 * All interfaces related to error and warning messages
308 * will be configured out of the ACPICA build if the
309 * ACPI_NO_ERROR_MESSAGE flag is defined.
1da177e4 310 */
407e22af
LZ
311#ifndef ACPI_NO_ERROR_MESSAGES
312#define ACPI_MSG_DEPENDENT_RETURN_VOID(prototype) \
313 prototype;
1da177e4 314
407e22af
LZ
315#else
316#define ACPI_MSG_DEPENDENT_RETURN_VOID(prototype) \
317 static ACPI_INLINE prototype {return;}
1da177e4 318
407e22af 319#endif /* ACPI_NO_ERROR_MESSAGES */
1da177e4 320
1ce28c32 321/*
1011080d
BM
322 * Debugging output prototypes (default: no debug output).
323 *
324 * All interfaces related to debug output messages
325 * will be configured out of the ACPICA build unless the
326 * ACPI_DEBUG_OUTPUT flag is defined.
1ce28c32
LZ
327 */
328#ifdef ACPI_DEBUG_OUTPUT
329#define ACPI_DBG_DEPENDENT_RETURN_VOID(prototype) \
330 prototype;
1da177e4 331
1ce28c32
LZ
332#else
333#define ACPI_DBG_DEPENDENT_RETURN_VOID(prototype) \
334 static ACPI_INLINE prototype {return;}
1da177e4 335
1ce28c32 336#endif /* ACPI_DEBUG_OUTPUT */
1da177e4 337
2e70da4c
LZ
338/*
339 * Application prototypes
340 *
341 * All interfaces used by application will be configured
342 * out of the ACPICA build unless the ACPI_APPLICATION
343 * flag is defined.
344 */
345#ifdef ACPI_APPLICATION
346#define ACPI_APP_DEPENDENT_RETURN_VOID(prototype) \
347 prototype;
348
349#else
350#define ACPI_APP_DEPENDENT_RETURN_VOID(prototype) \
351 static ACPI_INLINE prototype {return;}
352
353#endif /* ACPI_APPLICATION */
354
1011080d
BM
355/*****************************************************************************
356 *
357 * ACPICA public interface prototypes
358 *
359 ****************************************************************************/
7c2e1771 360
44f6c012 361/*
75c8044f 362 * Initialization
1da177e4 363 */
8b9c1152
LZ
364ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
365 acpi_initialize_tables(struct acpi_table_desc
366 *initial_storage,
367 u32 initial_table_count,
368 u8 allow_resize))
369ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_initialize_subsystem(void))
1da177e4 370
8b9c1152 371ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_enable_subsystem(u32 flags))
1da177e4 372
8b9c1152
LZ
373ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
374 acpi_initialize_objects(u32 flags))
375ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_terminate(void))
50eca3eb 376
1da177e4 377/*
75c8044f 378 * Miscellaneous global interfaces
1da177e4 379 */
33620c54
BM
380ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void))
381ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void))
739dcbb9 382#ifdef ACPI_FUTURE_USAGE
8b9c1152 383ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_subsystem_status(void))
739dcbb9 384#endif
1da177e4 385
1da177e4 386#ifdef ACPI_FUTURE_USAGE
8b9c1152
LZ
387ACPI_EXTERNAL_RETURN_STATUS(acpi_status
388 acpi_get_system_info(struct acpi_buffer
389 *ret_buffer))
1da177e4 390#endif
8b9c1152
LZ
391ACPI_EXTERNAL_RETURN_STATUS(acpi_status
392 acpi_get_statistics(struct acpi_statistics *stats))
393ACPI_EXTERNAL_RETURN_PTR(const char
394 *acpi_format_exception(acpi_status exception))
395ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_purge_cached_objects(void))
396
397ACPI_EXTERNAL_RETURN_STATUS(acpi_status
398 acpi_install_interface(acpi_string interface_name))
399
400ACPI_EXTERNAL_RETURN_STATUS(acpi_status
401 acpi_remove_interface(acpi_string interface_name))
402ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_update_interfaces(u8 action))
403
404ACPI_EXTERNAL_RETURN_UINT32(u32
405 acpi_check_address_range(acpi_adr_space_type
406 space_id,
407 acpi_physical_address
408 address, acpi_size length,
409 u8 warn))
410ACPI_EXTERNAL_RETURN_STATUS(acpi_status
411 acpi_decode_pld_buffer(u8 *in_buffer,
412 acpi_size length,
413 struct acpi_pld_info
414 **return_buffer))
1da177e4 415
1da177e4 416/*
f60d8181 417 * ACPI table load/unload interfaces
1da177e4 418 */
8b9c1152
LZ
419ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
420 acpi_install_table(acpi_physical_address address,
421 u8 physical))
1da177e4 422
8b9c1152
LZ
423ACPI_EXTERNAL_RETURN_STATUS(acpi_status
424 acpi_load_table(struct acpi_table_header *table))
b2f7ddcf 425
8b9c1152
LZ
426ACPI_EXTERNAL_RETURN_STATUS(acpi_status
427 acpi_unload_parent_table(acpi_handle object))
428ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_load_tables(void))
1da177e4 429
f60d8181
BM
430/*
431 * ACPI table manipulation interfaces
432 */
8b9c1152
LZ
433ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_reallocate_root_table(void))
434
435ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
436 acpi_find_root_pointer(acpi_size * rsdp_address))
437
438ACPI_EXTERNAL_RETURN_STATUS(acpi_status
439 acpi_get_table_header(acpi_string signature,
440 u32 instance,
441 struct acpi_table_header
442 *out_table_header))
443ACPI_EXTERNAL_RETURN_STATUS(acpi_status
444 acpi_get_table(acpi_string signature, u32 instance,
445 struct acpi_table_header
446 **out_table))
447ACPI_EXTERNAL_RETURN_STATUS(acpi_status
448 acpi_get_table_by_index(u32 table_index,
449 struct acpi_table_header
450 **out_table))
451ACPI_EXTERNAL_RETURN_STATUS(acpi_status
452 acpi_install_table_handler(acpi_table_handler
453 handler, void *context))
454ACPI_EXTERNAL_RETURN_STATUS(acpi_status
455 acpi_remove_table_handler(acpi_table_handler
456 handler))
1da177e4 457
1da177e4
LT
458/*
459 * Namespace and name interfaces
460 */
8b9c1152
LZ
461ACPI_EXTERNAL_RETURN_STATUS(acpi_status
462 acpi_walk_namespace(acpi_object_type type,
463 acpi_handle start_object,
464 u32 max_depth,
465 acpi_walk_callback
466 descending_callback,
467 acpi_walk_callback
468 ascending_callback,
469 void *context,
470 void **return_value))
471ACPI_EXTERNAL_RETURN_STATUS(acpi_status
472 acpi_get_devices(const char *HID,
473 acpi_walk_callback user_function,
474 void *context,
475 void **return_value))
476ACPI_EXTERNAL_RETURN_STATUS(acpi_status
477 acpi_get_name(acpi_handle object, u32 name_type,
478 struct acpi_buffer *ret_path_ptr))
479ACPI_EXTERNAL_RETURN_STATUS(acpi_status
480 acpi_get_handle(acpi_handle parent,
481 acpi_string pathname,
482 acpi_handle * ret_handle))
483ACPI_EXTERNAL_RETURN_STATUS(acpi_status
484 acpi_attach_data(acpi_handle object,
485 acpi_object_handler handler,
486 void *data))
487ACPI_EXTERNAL_RETURN_STATUS(acpi_status
488 acpi_detach_data(acpi_handle object,
489 acpi_object_handler handler))
490ACPI_EXTERNAL_RETURN_STATUS(acpi_status
491 acpi_get_data(acpi_handle object,
492 acpi_object_handler handler,
493 void **data))
494ACPI_EXTERNAL_RETURN_STATUS(acpi_status
495 acpi_debug_trace(char *name, u32 debug_level,
496 u32 debug_layer, u32 flags))
0f0fe1a0 497
1da177e4
LT
498/*
499 * Object manipulation and enumeration
500 */
8b9c1152
LZ
501ACPI_EXTERNAL_RETURN_STATUS(acpi_status
502 acpi_evaluate_object(acpi_handle object,
503 acpi_string pathname,
504 struct acpi_object_list
505 *parameter_objects,
506 struct acpi_buffer
507 *return_object_buffer))
508ACPI_EXTERNAL_RETURN_STATUS(acpi_status
509 acpi_evaluate_object_typed(acpi_handle object,
510 acpi_string pathname,
511 struct acpi_object_list
512 *external_params,
513 struct acpi_buffer
514 *return_buffer,
515 acpi_object_type
516 return_type))
517ACPI_EXTERNAL_RETURN_STATUS(acpi_status
518 acpi_get_object_info(acpi_handle object,
519 struct acpi_device_info
520 **return_buffer))
521ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_install_method(u8 *buffer))
522
523ACPI_EXTERNAL_RETURN_STATUS(acpi_status
524 acpi_get_next_object(acpi_object_type type,
525 acpi_handle parent,
526 acpi_handle child,
527 acpi_handle * out_handle))
528
529ACPI_EXTERNAL_RETURN_STATUS(acpi_status
530 acpi_get_type(acpi_handle object,
531 acpi_object_type * out_type))
532
533ACPI_EXTERNAL_RETURN_STATUS(acpi_status
534 acpi_get_parent(acpi_handle object,
535 acpi_handle * out_handle))
1da177e4
LT
536
537/*
ecfbbc7b 538 * Handler interfaces
1da177e4 539 */
8b9c1152
LZ
540ACPI_EXTERNAL_RETURN_STATUS(acpi_status
541 acpi_install_initialization_handler
542 (acpi_init_handler handler, u32 function))
33620c54 543ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
8b9c1152
LZ
544 acpi_install_sci_handler(acpi_sci_handler
545 address,
546 void *context))
a2fd4b4b
LZ
547ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
548 acpi_remove_sci_handler(acpi_sci_handler
549 address))
550ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
551 acpi_install_global_event_handler
552 (acpi_gbl_event_handler handler,
553 void *context))
33620c54
BM
554ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
555 acpi_install_fixed_event_handler(u32
556 acpi_event,
557 acpi_event_handler
558 handler,
559 void
560 *context))
561ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
562 acpi_remove_fixed_event_handler(u32 acpi_event,
563 acpi_event_handler
564 handler))
565ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
566 acpi_install_gpe_handler(acpi_handle
567 gpe_device,
568 u32 gpe_number,
569 u32 type,
570 acpi_gpe_handler
571 address,
572 void *context))
573ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
574 acpi_remove_gpe_handler(acpi_handle gpe_device,
575 u32 gpe_number,
576 acpi_gpe_handler
577 address))
8b9c1152
LZ
578ACPI_EXTERNAL_RETURN_STATUS(acpi_status
579 acpi_install_notify_handler(acpi_handle device,
580 u32 handler_type,
581 acpi_notify_handler
582 handler,
583 void *context))
584ACPI_EXTERNAL_RETURN_STATUS(acpi_status
585 acpi_remove_notify_handler(acpi_handle device,
586 u32 handler_type,
587 acpi_notify_handler
588 handler))
589ACPI_EXTERNAL_RETURN_STATUS(acpi_status
590 acpi_install_address_space_handler(acpi_handle
591 device,
592 acpi_adr_space_type
593 space_id,
594 acpi_adr_space_handler
595 handler,
596 acpi_adr_space_setup
597 setup,
598 void *context))
599ACPI_EXTERNAL_RETURN_STATUS(acpi_status
600 acpi_remove_address_space_handler(acpi_handle
601 device,
602 acpi_adr_space_type
603 space_id,
604 acpi_adr_space_handler
605 handler))
1da177e4 606#ifdef ACPI_FUTURE_USAGE
8b9c1152
LZ
607ACPI_EXTERNAL_RETURN_STATUS(acpi_status
608 acpi_install_exception_handler
609 (acpi_exception_handler handler))
1da177e4 610#endif
8b9c1152
LZ
611ACPI_EXTERNAL_RETURN_STATUS(acpi_status
612 acpi_install_interface_handler
613 (acpi_interface_handler handler))
b0ed7a91 614
1da177e4 615/*
ffef6827 616 * Global Lock interfaces
1da177e4 617 */
33620c54
BM
618ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
619 acpi_acquire_global_lock(u16 timeout,
620 u32 *handle))
cd27d79f 621
33620c54
BM
622ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
623 acpi_release_global_lock(u32 handle))
1da177e4 624
ffef6827
LM
625/*
626 * Interfaces to AML mutex objects
627 */
8b9c1152
LZ
628ACPI_EXTERNAL_RETURN_STATUS(acpi_status
629 acpi_acquire_mutex(acpi_handle handle,
630 acpi_string pathname,
631 u16 timeout))
ffef6827 632
8b9c1152
LZ
633ACPI_EXTERNAL_RETURN_STATUS(acpi_status
634 acpi_release_mutex(acpi_handle handle,
635 acpi_string pathname))
ffef6827
LM
636
637/*
638 * Fixed Event interfaces
639 */
33620c54
BM
640ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
641 acpi_enable_event(u32 event, u32 flags))
1da177e4 642
33620c54
BM
643ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
644 acpi_disable_event(u32 event, u32 flags))
33620c54 645ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_clear_event(u32 event))
1da177e4 646
33620c54
BM
647ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
648 acpi_get_event_status(u32 event,
649 acpi_event_status
650 *event_status))
cd27d79f 651
08ac07b8 652/*
ffef6827 653 * General Purpose Event (GPE) Interfaces
08ac07b8 654 */
33620c54
BM
655ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_update_all_gpes(void))
656
657ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
658 acpi_enable_gpe(acpi_handle gpe_device,
659 u32 gpe_number))
660
661ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
662 acpi_disable_gpe(acpi_handle gpe_device,
663 u32 gpe_number))
664
665ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
666 acpi_clear_gpe(acpi_handle gpe_device,
667 u32 gpe_number))
668
669ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
670 acpi_set_gpe(acpi_handle gpe_device,
671 u32 gpe_number, u8 action))
672
673ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
674 acpi_finish_gpe(acpi_handle gpe_device,
675 u32 gpe_number))
676
677ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
678 acpi_setup_gpe_for_wake(acpi_handle
679 parent_device,
680 acpi_handle gpe_device,
681 u32 gpe_number))
682ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
683 acpi_set_gpe_wake_mask(acpi_handle gpe_device,
684 u32 gpe_number,
685 u8 action))
686ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
687 acpi_get_gpe_status(acpi_handle gpe_device,
688 u32 gpe_number,
689 acpi_event_status
690 *event_status))
33620c54 691ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable_all_gpes(void))
33620c54
BM
692ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_runtime_gpes(void))
693
694ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
695 acpi_get_gpe_device(u32 gpe_index,
696 acpi_handle * gpe_device))
697
698ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
699 acpi_install_gpe_block(acpi_handle gpe_device,
700 struct
701 acpi_generic_address
702 *gpe_block_address,
703 u32 register_count,
704 u32 interrupt_number))
705ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
706 acpi_remove_gpe_block(acpi_handle gpe_device))
a2100801 707
1da177e4
LT
708/*
709 * Resource interfaces
710 */
1da177e4 711typedef
61686124 712acpi_status(*acpi_walk_resource_callback) (struct acpi_resource * resource,
4be44fcd 713 void *context);
1da177e4 714
8b9c1152
LZ
715ACPI_EXTERNAL_RETURN_STATUS(acpi_status
716 acpi_get_vendor_resource(acpi_handle device,
717 char *name,
718 struct acpi_vendor_uuid
719 *uuid,
720 struct acpi_buffer
721 *ret_buffer))
722ACPI_EXTERNAL_RETURN_STATUS(acpi_status
723 acpi_get_current_resources(acpi_handle device,
724 struct acpi_buffer
725 *ret_buffer))
1da177e4 726#ifdef ACPI_FUTURE_USAGE
8b9c1152
LZ
727ACPI_EXTERNAL_RETURN_STATUS(acpi_status
728 acpi_get_possible_resources(acpi_handle device,
729 struct acpi_buffer
730 *ret_buffer))
1da177e4 731#endif
8b9c1152
LZ
732ACPI_EXTERNAL_RETURN_STATUS(acpi_status
733 acpi_get_event_resources(acpi_handle device_handle,
734 struct acpi_buffer
735 *ret_buffer))
736ACPI_EXTERNAL_RETURN_STATUS(acpi_status
737 acpi_walk_resource_buffer(struct acpi_buffer
738 *buffer,
739 acpi_walk_resource_callback
740 user_function,
741 void *context))
742ACPI_EXTERNAL_RETURN_STATUS(acpi_status
743 acpi_walk_resources(acpi_handle device, char *name,
744 acpi_walk_resource_callback
745 user_function, void *context))
746ACPI_EXTERNAL_RETURN_STATUS(acpi_status
747 acpi_set_current_resources(acpi_handle device,
748 struct acpi_buffer
749 *in_buffer))
750ACPI_EXTERNAL_RETURN_STATUS(acpi_status
751 acpi_get_irq_routing_table(acpi_handle device,
752 struct acpi_buffer
753 *ret_buffer))
754ACPI_EXTERNAL_RETURN_STATUS(acpi_status
755 acpi_resource_to_address64(struct acpi_resource
756 *resource,
757 struct
758 acpi_resource_address64
759 *out))
760ACPI_EXTERNAL_RETURN_STATUS(acpi_status
761 acpi_buffer_to_resource(u8 *aml_buffer,
762 u16 aml_buffer_length,
763 struct acpi_resource
764 **resource_ptr))
0e243178 765
1da177e4
LT
766/*
767 * Hardware (ACPI device) interfaces
768 */
8b9c1152 769ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_reset(void))
d3fd902d 770
8b9c1152
LZ
771ACPI_EXTERNAL_RETURN_STATUS(acpi_status
772 acpi_read(u64 *value,
773 struct acpi_generic_address *reg))
739dcbb9 774
8b9c1152
LZ
775ACPI_EXTERNAL_RETURN_STATUS(acpi_status
776 acpi_write(u64 value,
777 struct acpi_generic_address *reg))
739dcbb9 778
33620c54
BM
779ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
780 acpi_read_bit_register(u32 register_id,
781 u32 *return_value))
1da177e4 782
33620c54
BM
783ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
784 acpi_write_bit_register(u32 register_id,
785 u32 value))
1da177e4 786
33620c54
BM
787/*
788 * Sleep/Wake interfaces
789 */
8b9c1152
LZ
790ACPI_EXTERNAL_RETURN_STATUS(acpi_status
791 acpi_get_sleep_type_data(u8 sleep_state,
792 u8 *slp_typ_a,
793 u8 *slp_typ_b))
1da177e4 794
8b9c1152
LZ
795ACPI_EXTERNAL_RETURN_STATUS(acpi_status
796 acpi_enter_sleep_state_prep(u8 sleep_state))
797ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_enter_sleep_state(u8 sleep_state))
1da177e4 798
40bce100 799ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enter_sleep_state_s4bios(void))
1da177e4 800
8b9c1152
LZ
801ACPI_EXTERNAL_RETURN_STATUS(acpi_status
802 acpi_leave_sleep_state_prep(u8 sleep_state))
803ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_leave_sleep_state(u8 sleep_state))
1da177e4 804
739dcbb9
LZ
805ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
806 acpi_set_firmware_waking_vector(u32
807 physical_address))
739dcbb9
LZ
808#if ACPI_MACHINE_WIDTH == 64
809ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
810 acpi_set_firmware_waking_vector64(u64
811 physical_address))
812#endif
d08310fe
BM
813/*
814 * ACPI Timer interfaces
815 */
816#ifdef ACPI_FUTURE_USAGE
33620c54
BM
817ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
818 acpi_get_timer_resolution(u32 *resolution))
33620c54 819ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_get_timer(u32 *ticks))
d08310fe 820
33620c54
BM
821ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
822 acpi_get_timer_duration(u32 start_ticks,
823 u32 end_ticks,
824 u32 *time_elapsed))
d08310fe
BM
825#endif /* ACPI_FUTURE_USAGE */
826
50df4d8b 827/*
b74be611 828 * Error/Warning output
50df4d8b 829 */
407e22af
LZ
830ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
831 void ACPI_INTERNAL_VAR_XFACE
832 acpi_error(const char *module_name,
833 u32 line_number,
834 const char *format, ...))
835ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(4)
836 void ACPI_INTERNAL_VAR_XFACE
837 acpi_exception(const char *module_name,
838 u32 line_number,
839 acpi_status status,
840 const char *format, ...))
841ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
842 void ACPI_INTERNAL_VAR_XFACE
843 acpi_warning(const char *module_name,
844 u32 line_number,
845 const char *format, ...))
846ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
847 void ACPI_INTERNAL_VAR_XFACE
848 acpi_info(const char *module_name,
849 u32 line_number,
850 const char *format, ...))
851ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
852 void ACPI_INTERNAL_VAR_XFACE
853 acpi_bios_error(const char *module_name,
854 u32 line_number,
855 const char *format, ...))
856ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
857 void ACPI_INTERNAL_VAR_XFACE
858 acpi_bios_warning(const char *module_name,
859 u32 line_number,
860 const char *format, ...))
62cdd141 861
b74be611
BM
862/*
863 * Debug output
864 */
1ce28c32
LZ
865ACPI_DBG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(6)
866 void ACPI_INTERNAL_VAR_XFACE
867 acpi_debug_print(u32 requested_debug_level,
868 u32 line_number,
869 const char *function_name,
870 const char *module_name,
871 u32 component_id,
872 const char *format, ...))
873ACPI_DBG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(6)
874 void ACPI_INTERNAL_VAR_XFACE
875 acpi_debug_print_raw(u32 requested_debug_level,
876 u32 line_number,
877 const char *function_name,
878 const char *module_name,
879 u32 component_id,
880 const char *format, ...))
2e70da4c
LZ
881ACPI_APP_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(1)
882 void ACPI_INTERNAL_VAR_XFACE
883 acpi_log_error(const char *format, ...))
50df4d8b 884
0dedb3c4
LZ
885/*
886 * Divergences
887 */
888acpi_status acpi_get_id(acpi_handle object, acpi_owner_id * out_type);
889
890acpi_status acpi_unload_table_id(acpi_owner_id id);
891
892acpi_status
893acpi_get_table_with_size(acpi_string signature,
894 u32 instance, struct acpi_table_header **out_table,
895 acpi_size *tbl_size);
896
897acpi_status
898acpi_get_data_full(acpi_handle object, acpi_object_handler handler, void **data,
899 void (*callback)(void *));
50df4d8b 900
4be44fcd 901#endif /* __ACXFACE_H__ */
This page took 0.513696 seconds and 5 git commands to generate.