ACPICA: acpidump: Fix repetitive table dump in -n mode.
[linux-2.6-block.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
3035ff70
LZ
164/*
165 * Optionally enable output from the AML Debug Object.
166 */
167ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_aml_debug_object, FALSE);
9187a415 168
3035ff70
LZ
169/*
170 * Optionally copy the entire DSDT to local memory (instead of simply
171 * mapping it.) There are some BIOSs that corrupt or replace the original
172 * DSDT, creating the need for this option. Default is FALSE, do not copy
173 * the DSDT.
174 */
175ACPI_INIT_GLOBAL(u8, acpi_gbl_copy_dsdt_locally, FALSE);
1da177e4 176
3035ff70
LZ
177/*
178 * Optionally ignore an XSDT if present and use the RSDT instead.
179 * Although the ACPI specification requires that an XSDT be used instead
180 * of the RSDT, the XSDT has been found to be corrupt or ill-formed on
181 * some machines. Default behavior is to use the XSDT if present.
182 */
183ACPI_INIT_GLOBAL(u8, acpi_gbl_do_not_use_xsdt, FALSE);
1da177e4 184
3035ff70
LZ
185/*
186 * Optionally use 32-bit FADT addresses if and when there is a conflict
187 * (address mismatch) between the 32-bit and 64-bit versions of the
188 * address. Although ACPICA adheres to the ACPI specification which
189 * requires the use of the corresponding 64-bit address if it is non-zero,
190 * some machines have been found to have a corrupted non-zero 64-bit
c9b77a40 191 * address. Default is TRUE, favor the 32-bit addresses.
3035ff70 192 */
c9b77a40 193ACPI_INIT_GLOBAL(u8, acpi_gbl_use32_bit_fadt_addresses, TRUE);
b0ed7a91 194
3035ff70
LZ
195/*
196 * Optionally truncate I/O addresses to 16 bits. Provides compatibility
197 * with other ACPI implementations. NOTE: During ACPICA initialization,
198 * this value is set to TRUE if any Windows OSI strings have been
199 * requested by the BIOS.
200 */
201ACPI_INIT_GLOBAL(u8, acpi_gbl_truncate_io_addresses, FALSE);
b0ed7a91 202
3035ff70
LZ
203/*
204 * Disable runtime checking and repair of values returned by control methods.
205 * Use only if the repair is causing a problem on a particular machine.
206 */
207ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_auto_repair, FALSE);
2cf9f5bc 208
3035ff70
LZ
209/*
210 * Optionally do not install any SSDTs from the RSDT/XSDT during initialization.
211 * This can be useful for debugging ACPI problems on some machines.
212 */
213ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_ssdt_table_install, FALSE);
f654c0fe 214
3035ff70
LZ
215/*
216 * We keep track of the latest version of Windows that has been requested by
fea79bc0 217 * the BIOS. ACPI 5.0.
3035ff70
LZ
218 */
219ACPI_INIT_GLOBAL(u8, acpi_gbl_osi_data, 0);
be030a57 220
1da177e4 221/*
3a2f3a33
LZ
222 * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
223 * that the ACPI hardware is no longer required. A flag in the FADT indicates
224 * a reduced HW machine, and that flag is duplicated here for convenience.
1da177e4 225 */
3a2f3a33 226ACPI_INIT_GLOBAL(u8, acpi_gbl_reduced_hardware, FALSE);
f3d2e786 227
3a2f3a33
LZ
228/*
229 * This mechanism is used to trace a specified AML method. The method is
230 * traced each time it is executed.
231 */
232ACPI_INIT_GLOBAL(u32, acpi_gbl_trace_flags, 0);
233ACPI_INIT_GLOBAL(acpi_name, acpi_gbl_trace_method_name, 0);
1da177e4 234
3a2f3a33
LZ
235/*
236 * Runtime configuration of debug output control masks. We want the debug
237 * switches statically initialized so they are already set when the debugger
238 * is entered.
239 */
240ACPI_INIT_GLOBAL(u32, acpi_dbg_level, ACPI_DEBUG_DEFAULT);
241ACPI_INIT_GLOBAL(u32, acpi_dbg_layer, 0);
1da177e4 242
f60d8181 243/*
1011080d 244 * Other miscellaneous globals
f60d8181 245 */
3a2f3a33 246ACPI_GLOBAL(struct acpi_table_fadt, acpi_gbl_FADT);
1011080d 247ACPI_GLOBAL(u32, acpi_current_gpe_count);
3a2f3a33 248ACPI_GLOBAL(u8, acpi_gbl_system_awake_and_running);
f60d8181 249
1011080d
BM
250/*****************************************************************************
251 *
252 * ACPICA public interface configuration.
253 *
254 * Interfaces that are configured out of the ACPICA build are replaced
255 * by inlined stubs by default.
256 *
257 ****************************************************************************/
1da177e4 258
33620c54 259/*
1011080d
BM
260 * Hardware-reduced prototypes (default: Not hardware reduced).
261 *
262 * All ACPICA hardware-related interfaces that use these macros will be
263 * configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag
33620c54 264 * is set to TRUE.
1011080d
BM
265 *
266 * Note: This static build option for reduced hardware is intended to
267 * reduce ACPICA code size if desired or necessary. However, even if this
268 * option is not specified, the runtime behavior of ACPICA is dependent
269 * on the actual FADT reduced hardware flag (HW_REDUCED_ACPI). If set,
270 * the flag will enable similar behavior -- ACPICA will not attempt
271 * to access any ACPI-relate hardware (SCI, GPEs, Fixed Events, etc.)
33620c54
BM
272 */
273#if (!ACPI_REDUCED_HARDWARE)
274#define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \
8b9c1152 275 ACPI_EXTERNAL_RETURN_STATUS(prototype)
1da177e4 276
33620c54 277#define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \
8b9c1152 278 ACPI_EXTERNAL_RETURN_OK(prototype)
1da177e4 279
33620c54 280#define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \
8b9c1152 281 ACPI_EXTERNAL_RETURN_VOID(prototype)
cd27d79f 282
33620c54
BM
283#else
284#define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \
285 static ACPI_INLINE prototype {return(AE_NOT_CONFIGURED);}
1da177e4 286
33620c54
BM
287#define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \
288 static ACPI_INLINE prototype {return(AE_OK);}
1da177e4 289
33620c54 290#define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \
c26f3c90 291 static ACPI_INLINE prototype {return;}
3e08e2d2 292
33620c54 293#endif /* !ACPI_REDUCED_HARDWARE */
3e08e2d2 294
1da177e4 295/*
1011080d
BM
296 * Error message prototypes (default: error messages enabled).
297 *
298 * All interfaces related to error and warning messages
299 * will be configured out of the ACPICA build if the
300 * ACPI_NO_ERROR_MESSAGE flag is defined.
1da177e4 301 */
407e22af
LZ
302#ifndef ACPI_NO_ERROR_MESSAGES
303#define ACPI_MSG_DEPENDENT_RETURN_VOID(prototype) \
304 prototype;
1da177e4 305
407e22af
LZ
306#else
307#define ACPI_MSG_DEPENDENT_RETURN_VOID(prototype) \
308 static ACPI_INLINE prototype {return;}
1da177e4 309
407e22af 310#endif /* ACPI_NO_ERROR_MESSAGES */
1da177e4 311
1ce28c32 312/*
1011080d
BM
313 * Debugging output prototypes (default: no debug output).
314 *
315 * All interfaces related to debug output messages
316 * will be configured out of the ACPICA build unless the
317 * ACPI_DEBUG_OUTPUT flag is defined.
1ce28c32
LZ
318 */
319#ifdef ACPI_DEBUG_OUTPUT
320#define ACPI_DBG_DEPENDENT_RETURN_VOID(prototype) \
321 prototype;
1da177e4 322
1ce28c32
LZ
323#else
324#define ACPI_DBG_DEPENDENT_RETURN_VOID(prototype) \
325 static ACPI_INLINE prototype {return;}
1da177e4 326
1ce28c32 327#endif /* ACPI_DEBUG_OUTPUT */
1da177e4 328
1011080d
BM
329/*****************************************************************************
330 *
331 * ACPICA public interface prototypes
332 *
333 ****************************************************************************/
7c2e1771 334
44f6c012 335/*
75c8044f 336 * Initialization
1da177e4 337 */
8b9c1152
LZ
338ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
339 acpi_initialize_tables(struct acpi_table_desc
340 *initial_storage,
341 u32 initial_table_count,
342 u8 allow_resize))
343ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_initialize_subsystem(void))
1da177e4 344
8b9c1152 345ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_enable_subsystem(u32 flags))
1da177e4 346
8b9c1152
LZ
347ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
348 acpi_initialize_objects(u32 flags))
349ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_terminate(void))
50eca3eb 350
1da177e4 351/*
75c8044f 352 * Miscellaneous global interfaces
1da177e4 353 */
33620c54
BM
354ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void))
355ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void))
739dcbb9 356#ifdef ACPI_FUTURE_USAGE
8b9c1152 357ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_subsystem_status(void))
739dcbb9 358#endif
1da177e4 359
1da177e4 360#ifdef ACPI_FUTURE_USAGE
8b9c1152
LZ
361ACPI_EXTERNAL_RETURN_STATUS(acpi_status
362 acpi_get_system_info(struct acpi_buffer
363 *ret_buffer))
1da177e4 364#endif
8b9c1152
LZ
365ACPI_EXTERNAL_RETURN_STATUS(acpi_status
366 acpi_get_statistics(struct acpi_statistics *stats))
367ACPI_EXTERNAL_RETURN_PTR(const char
368 *acpi_format_exception(acpi_status exception))
369ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_purge_cached_objects(void))
370
371ACPI_EXTERNAL_RETURN_STATUS(acpi_status
372 acpi_install_interface(acpi_string interface_name))
373
374ACPI_EXTERNAL_RETURN_STATUS(acpi_status
375 acpi_remove_interface(acpi_string interface_name))
376ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_update_interfaces(u8 action))
377
378ACPI_EXTERNAL_RETURN_UINT32(u32
379 acpi_check_address_range(acpi_adr_space_type
380 space_id,
381 acpi_physical_address
382 address, acpi_size length,
383 u8 warn))
384ACPI_EXTERNAL_RETURN_STATUS(acpi_status
385 acpi_decode_pld_buffer(u8 *in_buffer,
386 acpi_size length,
387 struct acpi_pld_info
388 **return_buffer))
1da177e4 389
1da177e4 390/*
f60d8181 391 * ACPI table load/unload interfaces
1da177e4 392 */
8b9c1152
LZ
393ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
394 acpi_install_table(acpi_physical_address address,
395 u8 physical))
1da177e4 396
8b9c1152
LZ
397ACPI_EXTERNAL_RETURN_STATUS(acpi_status
398 acpi_load_table(struct acpi_table_header *table))
b2f7ddcf 399
8b9c1152
LZ
400ACPI_EXTERNAL_RETURN_STATUS(acpi_status
401 acpi_unload_parent_table(acpi_handle object))
402ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_load_tables(void))
1da177e4 403
f60d8181
BM
404/*
405 * ACPI table manipulation interfaces
406 */
8b9c1152
LZ
407ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_reallocate_root_table(void))
408
409ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
410 acpi_find_root_pointer(acpi_size * rsdp_address))
411
412ACPI_EXTERNAL_RETURN_STATUS(acpi_status
413 acpi_get_table_header(acpi_string signature,
414 u32 instance,
415 struct acpi_table_header
416 *out_table_header))
417ACPI_EXTERNAL_RETURN_STATUS(acpi_status
418 acpi_get_table(acpi_string signature, u32 instance,
419 struct acpi_table_header
420 **out_table))
421ACPI_EXTERNAL_RETURN_STATUS(acpi_status
422 acpi_get_table_by_index(u32 table_index,
423 struct acpi_table_header
424 **out_table))
425ACPI_EXTERNAL_RETURN_STATUS(acpi_status
426 acpi_install_table_handler(acpi_table_handler
427 handler, void *context))
428ACPI_EXTERNAL_RETURN_STATUS(acpi_status
429 acpi_remove_table_handler(acpi_table_handler
430 handler))
1da177e4 431
1da177e4
LT
432/*
433 * Namespace and name interfaces
434 */
8b9c1152
LZ
435ACPI_EXTERNAL_RETURN_STATUS(acpi_status
436 acpi_walk_namespace(acpi_object_type type,
437 acpi_handle start_object,
438 u32 max_depth,
439 acpi_walk_callback
440 descending_callback,
441 acpi_walk_callback
442 ascending_callback,
443 void *context,
444 void **return_value))
445ACPI_EXTERNAL_RETURN_STATUS(acpi_status
446 acpi_get_devices(const char *HID,
447 acpi_walk_callback user_function,
448 void *context,
449 void **return_value))
450ACPI_EXTERNAL_RETURN_STATUS(acpi_status
451 acpi_get_name(acpi_handle object, u32 name_type,
452 struct acpi_buffer *ret_path_ptr))
453ACPI_EXTERNAL_RETURN_STATUS(acpi_status
454 acpi_get_handle(acpi_handle parent,
455 acpi_string pathname,
456 acpi_handle * ret_handle))
457ACPI_EXTERNAL_RETURN_STATUS(acpi_status
458 acpi_attach_data(acpi_handle object,
459 acpi_object_handler handler,
460 void *data))
461ACPI_EXTERNAL_RETURN_STATUS(acpi_status
462 acpi_detach_data(acpi_handle object,
463 acpi_object_handler handler))
464ACPI_EXTERNAL_RETURN_STATUS(acpi_status
465 acpi_get_data(acpi_handle object,
466 acpi_object_handler handler,
467 void **data))
468ACPI_EXTERNAL_RETURN_STATUS(acpi_status
469 acpi_debug_trace(char *name, u32 debug_level,
470 u32 debug_layer, u32 flags))
0f0fe1a0 471
1da177e4
LT
472/*
473 * Object manipulation and enumeration
474 */
8b9c1152
LZ
475ACPI_EXTERNAL_RETURN_STATUS(acpi_status
476 acpi_evaluate_object(acpi_handle object,
477 acpi_string pathname,
478 struct acpi_object_list
479 *parameter_objects,
480 struct acpi_buffer
481 *return_object_buffer))
482ACPI_EXTERNAL_RETURN_STATUS(acpi_status
483 acpi_evaluate_object_typed(acpi_handle object,
484 acpi_string pathname,
485 struct acpi_object_list
486 *external_params,
487 struct acpi_buffer
488 *return_buffer,
489 acpi_object_type
490 return_type))
491ACPI_EXTERNAL_RETURN_STATUS(acpi_status
492 acpi_get_object_info(acpi_handle object,
493 struct acpi_device_info
494 **return_buffer))
495ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_install_method(u8 *buffer))
496
497ACPI_EXTERNAL_RETURN_STATUS(acpi_status
498 acpi_get_next_object(acpi_object_type type,
499 acpi_handle parent,
500 acpi_handle child,
501 acpi_handle * out_handle))
502
503ACPI_EXTERNAL_RETURN_STATUS(acpi_status
504 acpi_get_type(acpi_handle object,
505 acpi_object_type * out_type))
506
507ACPI_EXTERNAL_RETURN_STATUS(acpi_status
508 acpi_get_parent(acpi_handle object,
509 acpi_handle * out_handle))
1da177e4
LT
510
511/*
ecfbbc7b 512 * Handler interfaces
1da177e4 513 */
8b9c1152
LZ
514ACPI_EXTERNAL_RETURN_STATUS(acpi_status
515 acpi_install_initialization_handler
516 (acpi_init_handler handler, u32 function))
33620c54 517ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
8b9c1152
LZ
518 acpi_install_sci_handler(acpi_sci_handler
519 address,
520 void *context))
a2fd4b4b
LZ
521ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
522 acpi_remove_sci_handler(acpi_sci_handler
523 address))
524ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
525 acpi_install_global_event_handler
526 (acpi_gbl_event_handler handler,
527 void *context))
33620c54
BM
528ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
529 acpi_install_fixed_event_handler(u32
530 acpi_event,
531 acpi_event_handler
532 handler,
533 void
534 *context))
535ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
536 acpi_remove_fixed_event_handler(u32 acpi_event,
537 acpi_event_handler
538 handler))
539ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
540 acpi_install_gpe_handler(acpi_handle
541 gpe_device,
542 u32 gpe_number,
543 u32 type,
544 acpi_gpe_handler
545 address,
546 void *context))
547ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
548 acpi_remove_gpe_handler(acpi_handle gpe_device,
549 u32 gpe_number,
550 acpi_gpe_handler
551 address))
8b9c1152
LZ
552ACPI_EXTERNAL_RETURN_STATUS(acpi_status
553 acpi_install_notify_handler(acpi_handle device,
554 u32 handler_type,
555 acpi_notify_handler
556 handler,
557 void *context))
558ACPI_EXTERNAL_RETURN_STATUS(acpi_status
559 acpi_remove_notify_handler(acpi_handle device,
560 u32 handler_type,
561 acpi_notify_handler
562 handler))
563ACPI_EXTERNAL_RETURN_STATUS(acpi_status
564 acpi_install_address_space_handler(acpi_handle
565 device,
566 acpi_adr_space_type
567 space_id,
568 acpi_adr_space_handler
569 handler,
570 acpi_adr_space_setup
571 setup,
572 void *context))
573ACPI_EXTERNAL_RETURN_STATUS(acpi_status
574 acpi_remove_address_space_handler(acpi_handle
575 device,
576 acpi_adr_space_type
577 space_id,
578 acpi_adr_space_handler
579 handler))
1da177e4 580#ifdef ACPI_FUTURE_USAGE
8b9c1152
LZ
581ACPI_EXTERNAL_RETURN_STATUS(acpi_status
582 acpi_install_exception_handler
583 (acpi_exception_handler handler))
1da177e4 584#endif
8b9c1152
LZ
585ACPI_EXTERNAL_RETURN_STATUS(acpi_status
586 acpi_install_interface_handler
587 (acpi_interface_handler handler))
b0ed7a91 588
1da177e4 589/*
ffef6827 590 * Global Lock interfaces
1da177e4 591 */
33620c54
BM
592ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
593 acpi_acquire_global_lock(u16 timeout,
594 u32 *handle))
cd27d79f 595
33620c54
BM
596ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
597 acpi_release_global_lock(u32 handle))
1da177e4 598
ffef6827
LM
599/*
600 * Interfaces to AML mutex objects
601 */
8b9c1152
LZ
602ACPI_EXTERNAL_RETURN_STATUS(acpi_status
603 acpi_acquire_mutex(acpi_handle handle,
604 acpi_string pathname,
605 u16 timeout))
ffef6827 606
8b9c1152
LZ
607ACPI_EXTERNAL_RETURN_STATUS(acpi_status
608 acpi_release_mutex(acpi_handle handle,
609 acpi_string pathname))
ffef6827
LM
610
611/*
612 * Fixed Event interfaces
613 */
33620c54
BM
614ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
615 acpi_enable_event(u32 event, u32 flags))
1da177e4 616
33620c54
BM
617ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
618 acpi_disable_event(u32 event, u32 flags))
33620c54 619ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_clear_event(u32 event))
1da177e4 620
33620c54
BM
621ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
622 acpi_get_event_status(u32 event,
623 acpi_event_status
624 *event_status))
cd27d79f 625
08ac07b8 626/*
ffef6827 627 * General Purpose Event (GPE) Interfaces
08ac07b8 628 */
33620c54
BM
629ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_update_all_gpes(void))
630
631ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
632 acpi_enable_gpe(acpi_handle gpe_device,
633 u32 gpe_number))
634
635ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
636 acpi_disable_gpe(acpi_handle gpe_device,
637 u32 gpe_number))
638
639ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
640 acpi_clear_gpe(acpi_handle gpe_device,
641 u32 gpe_number))
642
643ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
644 acpi_set_gpe(acpi_handle gpe_device,
645 u32 gpe_number, u8 action))
646
647ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
648 acpi_finish_gpe(acpi_handle gpe_device,
649 u32 gpe_number))
650
651ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
652 acpi_setup_gpe_for_wake(acpi_handle
653 parent_device,
654 acpi_handle gpe_device,
655 u32 gpe_number))
656ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
657 acpi_set_gpe_wake_mask(acpi_handle gpe_device,
658 u32 gpe_number,
659 u8 action))
660ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
661 acpi_get_gpe_status(acpi_handle gpe_device,
662 u32 gpe_number,
663 acpi_event_status
664 *event_status))
33620c54 665ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable_all_gpes(void))
33620c54
BM
666ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_runtime_gpes(void))
667
668ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
669 acpi_get_gpe_device(u32 gpe_index,
670 acpi_handle * gpe_device))
671
672ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
673 acpi_install_gpe_block(acpi_handle gpe_device,
674 struct
675 acpi_generic_address
676 *gpe_block_address,
677 u32 register_count,
678 u32 interrupt_number))
679ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
680 acpi_remove_gpe_block(acpi_handle gpe_device))
a2100801 681
1da177e4
LT
682/*
683 * Resource interfaces
684 */
1da177e4 685typedef
61686124 686acpi_status(*acpi_walk_resource_callback) (struct acpi_resource * resource,
4be44fcd 687 void *context);
1da177e4 688
8b9c1152
LZ
689ACPI_EXTERNAL_RETURN_STATUS(acpi_status
690 acpi_get_vendor_resource(acpi_handle device,
691 char *name,
692 struct acpi_vendor_uuid
693 *uuid,
694 struct acpi_buffer
695 *ret_buffer))
696ACPI_EXTERNAL_RETURN_STATUS(acpi_status
697 acpi_get_current_resources(acpi_handle device,
698 struct acpi_buffer
699 *ret_buffer))
1da177e4 700#ifdef ACPI_FUTURE_USAGE
8b9c1152
LZ
701ACPI_EXTERNAL_RETURN_STATUS(acpi_status
702 acpi_get_possible_resources(acpi_handle device,
703 struct acpi_buffer
704 *ret_buffer))
1da177e4 705#endif
8b9c1152
LZ
706ACPI_EXTERNAL_RETURN_STATUS(acpi_status
707 acpi_get_event_resources(acpi_handle device_handle,
708 struct acpi_buffer
709 *ret_buffer))
710ACPI_EXTERNAL_RETURN_STATUS(acpi_status
711 acpi_walk_resource_buffer(struct acpi_buffer
712 *buffer,
713 acpi_walk_resource_callback
714 user_function,
715 void *context))
716ACPI_EXTERNAL_RETURN_STATUS(acpi_status
717 acpi_walk_resources(acpi_handle device, char *name,
718 acpi_walk_resource_callback
719 user_function, void *context))
720ACPI_EXTERNAL_RETURN_STATUS(acpi_status
721 acpi_set_current_resources(acpi_handle device,
722 struct acpi_buffer
723 *in_buffer))
724ACPI_EXTERNAL_RETURN_STATUS(acpi_status
725 acpi_get_irq_routing_table(acpi_handle device,
726 struct acpi_buffer
727 *ret_buffer))
728ACPI_EXTERNAL_RETURN_STATUS(acpi_status
729 acpi_resource_to_address64(struct acpi_resource
730 *resource,
731 struct
732 acpi_resource_address64
733 *out))
734ACPI_EXTERNAL_RETURN_STATUS(acpi_status
735 acpi_buffer_to_resource(u8 *aml_buffer,
736 u16 aml_buffer_length,
737 struct acpi_resource
738 **resource_ptr))
0e243178 739
1da177e4
LT
740/*
741 * Hardware (ACPI device) interfaces
742 */
8b9c1152 743ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_reset(void))
d3fd902d 744
8b9c1152
LZ
745ACPI_EXTERNAL_RETURN_STATUS(acpi_status
746 acpi_read(u64 *value,
747 struct acpi_generic_address *reg))
739dcbb9 748
8b9c1152
LZ
749ACPI_EXTERNAL_RETURN_STATUS(acpi_status
750 acpi_write(u64 value,
751 struct acpi_generic_address *reg))
739dcbb9 752
33620c54
BM
753ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
754 acpi_read_bit_register(u32 register_id,
755 u32 *return_value))
1da177e4 756
33620c54
BM
757ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
758 acpi_write_bit_register(u32 register_id,
759 u32 value))
1da177e4 760
33620c54
BM
761/*
762 * Sleep/Wake interfaces
763 */
8b9c1152
LZ
764ACPI_EXTERNAL_RETURN_STATUS(acpi_status
765 acpi_get_sleep_type_data(u8 sleep_state,
766 u8 *slp_typ_a,
767 u8 *slp_typ_b))
1da177e4 768
8b9c1152
LZ
769ACPI_EXTERNAL_RETURN_STATUS(acpi_status
770 acpi_enter_sleep_state_prep(u8 sleep_state))
771ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_enter_sleep_state(u8 sleep_state))
1da177e4 772
40bce100 773ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enter_sleep_state_s4bios(void))
1da177e4 774
8b9c1152
LZ
775ACPI_EXTERNAL_RETURN_STATUS(acpi_status
776 acpi_leave_sleep_state_prep(u8 sleep_state))
777ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_leave_sleep_state(u8 sleep_state))
1da177e4 778
739dcbb9
LZ
779ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
780 acpi_set_firmware_waking_vector(u32
781 physical_address))
739dcbb9
LZ
782#if ACPI_MACHINE_WIDTH == 64
783ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
784 acpi_set_firmware_waking_vector64(u64
785 physical_address))
786#endif
d08310fe
BM
787/*
788 * ACPI Timer interfaces
789 */
790#ifdef ACPI_FUTURE_USAGE
33620c54
BM
791ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
792 acpi_get_timer_resolution(u32 *resolution))
33620c54 793ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_get_timer(u32 *ticks))
d08310fe 794
33620c54
BM
795ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
796 acpi_get_timer_duration(u32 start_ticks,
797 u32 end_ticks,
798 u32 *time_elapsed))
d08310fe
BM
799#endif /* ACPI_FUTURE_USAGE */
800
50df4d8b 801/*
b74be611 802 * Error/Warning output
50df4d8b 803 */
407e22af
LZ
804ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
805 void ACPI_INTERNAL_VAR_XFACE
806 acpi_error(const char *module_name,
807 u32 line_number,
808 const char *format, ...))
809ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(4)
810 void ACPI_INTERNAL_VAR_XFACE
811 acpi_exception(const char *module_name,
812 u32 line_number,
813 acpi_status status,
814 const char *format, ...))
815ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
816 void ACPI_INTERNAL_VAR_XFACE
817 acpi_warning(const char *module_name,
818 u32 line_number,
819 const char *format, ...))
820ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
821 void ACPI_INTERNAL_VAR_XFACE
822 acpi_info(const char *module_name,
823 u32 line_number,
824 const char *format, ...))
825ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
826 void ACPI_INTERNAL_VAR_XFACE
827 acpi_bios_error(const char *module_name,
828 u32 line_number,
829 const char *format, ...))
830ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
831 void ACPI_INTERNAL_VAR_XFACE
832 acpi_bios_warning(const char *module_name,
833 u32 line_number,
834 const char *format, ...))
62cdd141 835
b74be611
BM
836/*
837 * Debug output
838 */
1ce28c32
LZ
839ACPI_DBG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(6)
840 void ACPI_INTERNAL_VAR_XFACE
841 acpi_debug_print(u32 requested_debug_level,
842 u32 line_number,
843 const char *function_name,
844 const char *module_name,
845 u32 component_id,
846 const char *format, ...))
847ACPI_DBG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(6)
848 void ACPI_INTERNAL_VAR_XFACE
849 acpi_debug_print_raw(u32 requested_debug_level,
850 u32 line_number,
851 const char *function_name,
852 const char *module_name,
853 u32 component_id,
854 const char *format, ...))
50df4d8b 855
0dedb3c4
LZ
856/*
857 * Divergences
858 */
859acpi_status acpi_get_id(acpi_handle object, acpi_owner_id * out_type);
860
861acpi_status acpi_unload_table_id(acpi_owner_id id);
862
863acpi_status
864acpi_get_table_with_size(acpi_string signature,
865 u32 instance, struct acpi_table_header **out_table,
866 acpi_size *tbl_size);
867
868acpi_status
869acpi_get_data_full(acpi_handle object, acpi_object_handler handler, void **data,
870 void (*callback)(void *));
50df4d8b 871
4be44fcd 872#endif /* __ACXFACE_H__ */