ACPICA: OSL: Add configurability for debug output functions.
[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
35476c75 49#define ACPI_CA_VERSION 0x20140325
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
50df4d8b 58/*
3035ff70
LZ
59 * Ensure that the globals are actually defined and initialized only once.
60 *
61 * The use of these macros allows a single list of globals (here) in order
62 * to simplify maintenance of the code.
63 */
64#ifdef DEFINE_ACPI_GLOBALS
65#define ACPI_GLOBAL(type,name) \
66 extern type name; \
67 type name
68
69#define ACPI_INIT_GLOBAL(type,name,value) \
70 type name=value
71
72#else
73#ifndef ACPI_GLOBAL
74#define ACPI_GLOBAL(type,name) \
75 extern type name
76#endif
77
78#ifndef ACPI_INIT_GLOBAL
79#define ACPI_INIT_GLOBAL(type,name,value) \
80 extern type name
81#endif
82#endif
83
84/* Public globals, available from outside ACPICA subsystem */
85
86/*****************************************************************************
87 *
88 * Runtime configuration (static defaults that can be overriden at runtime)
89 *
90 ****************************************************************************/
91
92/*
93 * Enable "slack" in the AML interpreter? Default is FALSE, and the
94 * interpreter strictly follows the ACPI specification. Setting to TRUE
95 * allows the interpreter to ignore certain errors and/or bad AML constructs.
96 *
97 * Currently, these features are enabled by this flag:
98 *
99 * 1) Allow "implicit return" of last value in a control method
100 * 2) Allow access beyond the end of an operation region
101 * 3) Allow access to uninitialized locals/args (auto-init to integer 0)
102 * 4) Allow ANY object type to be a source operand for the Store() operator
103 * 5) Allow unresolved references (invalid target name) in package objects
104 * 6) Enable warning messages for behavior that is not ACPI spec compliant
105 */
106ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_interpreter_slack, FALSE);
107
108/*
109 * Automatically serialize all methods that create named objects? Default
110 * is TRUE, meaning that all non_serialized methods are scanned once at
111 * table load time to determine those that create named objects. Methods
112 * that create named objects are marked Serialized in order to prevent
113 * possible run-time problems if they are entered by more than one thread.
114 */
115ACPI_INIT_GLOBAL(u8, acpi_gbl_auto_serialize_methods, TRUE);
116
117/*
118 * Create the predefined _OSI method in the namespace? Default is TRUE
119 * because ACPICA is fully compatible with other ACPI implementations.
120 * Changing this will revert ACPICA (and machine ASL) to pre-OSI behavior.
121 */
122ACPI_INIT_GLOBAL(u8, acpi_gbl_create_osi_method, TRUE);
123
124/*
125 * Optionally use default values for the ACPI register widths. Set this to
126 * TRUE to use the defaults, if an FADT contains incorrect widths/lengths.
127 */
128ACPI_INIT_GLOBAL(u8, acpi_gbl_use_default_register_widths, TRUE);
129
130/*
131 * Optionally enable output from the AML Debug Object.
132 */
133ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_aml_debug_object, FALSE);
134
135/*
136 * Optionally copy the entire DSDT to local memory (instead of simply
137 * mapping it.) There are some BIOSs that corrupt or replace the original
138 * DSDT, creating the need for this option. Default is FALSE, do not copy
139 * the DSDT.
140 */
141ACPI_INIT_GLOBAL(u8, acpi_gbl_copy_dsdt_locally, FALSE);
142
143/*
144 * Optionally ignore an XSDT if present and use the RSDT instead.
145 * Although the ACPI specification requires that an XSDT be used instead
146 * of the RSDT, the XSDT has been found to be corrupt or ill-formed on
147 * some machines. Default behavior is to use the XSDT if present.
148 */
149ACPI_INIT_GLOBAL(u8, acpi_gbl_do_not_use_xsdt, FALSE);
150
151/*
152 * Optionally use 32-bit FADT addresses if and when there is a conflict
153 * (address mismatch) between the 32-bit and 64-bit versions of the
154 * address. Although ACPICA adheres to the ACPI specification which
155 * requires the use of the corresponding 64-bit address if it is non-zero,
156 * some machines have been found to have a corrupted non-zero 64-bit
157 * address. Default is FALSE, do not favor the 32-bit addresses.
158 */
159ACPI_INIT_GLOBAL(u8, acpi_gbl_use32_bit_fadt_addresses, FALSE);
160
161/*
162 * Optionally truncate I/O addresses to 16 bits. Provides compatibility
163 * with other ACPI implementations. NOTE: During ACPICA initialization,
164 * this value is set to TRUE if any Windows OSI strings have been
165 * requested by the BIOS.
166 */
167ACPI_INIT_GLOBAL(u8, acpi_gbl_truncate_io_addresses, FALSE);
168
169/*
170 * Disable runtime checking and repair of values returned by control methods.
171 * Use only if the repair is causing a problem on a particular machine.
172 */
173ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_auto_repair, FALSE);
174
175/*
176 * Optionally do not install any SSDTs from the RSDT/XSDT during initialization.
177 * This can be useful for debugging ACPI problems on some machines.
178 */
179ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_ssdt_table_install, FALSE);
180
181/*
182 * We keep track of the latest version of Windows that has been requested by
183 * the BIOS. ACPI 5.0.
184 */
185ACPI_INIT_GLOBAL(u8, acpi_gbl_osi_data, 0);
186
187/*
3a2f3a33
LZ
188 * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
189 * that the ACPI hardware is no longer required. A flag in the FADT indicates
190 * a reduced HW machine, and that flag is duplicated here for convenience.
50df4d8b 191 */
3a2f3a33 192ACPI_INIT_GLOBAL(u8, acpi_gbl_reduced_hardware, FALSE);
3e8214e5 193
3a2f3a33
LZ
194/*
195 * This mechanism is used to trace a specified AML method. The method is
196 * traced each time it is executed.
197 */
198ACPI_INIT_GLOBAL(u32, acpi_gbl_trace_flags, 0);
199ACPI_INIT_GLOBAL(acpi_name, acpi_gbl_trace_method_name, 0);
3e8214e5 200
3a2f3a33
LZ
201/*
202 * Runtime configuration of debug output control masks. We want the debug
203 * switches statically initialized so they are already set when the debugger
204 * is entered.
205 */
206ACPI_INIT_GLOBAL(u32, acpi_dbg_level, ACPI_DEBUG_DEFAULT);
207ACPI_INIT_GLOBAL(u32, acpi_dbg_layer, 0);
3e8214e5 208
3a2f3a33
LZ
209/*
210 * Globals that are publically available
211 */
212ACPI_GLOBAL(u32, acpi_current_gpe_count);
213ACPI_GLOBAL(struct acpi_table_fadt, acpi_gbl_FADT);
214ACPI_GLOBAL(u8, acpi_gbl_system_awake_and_running);
50df4d8b 215
33620c54
BM
216/*
217 * Hardware-reduced prototypes. All interfaces that use these macros will
218 * be configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag
219 * is set to TRUE.
220 */
221#if (!ACPI_REDUCED_HARDWARE)
222#define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \
223 prototype;
224
225#define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \
226 prototype;
227
228#define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \
229 prototype;
230
231#else
232#define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \
233 static ACPI_INLINE prototype {return(AE_NOT_CONFIGURED);}
234
235#define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \
236 static ACPI_INLINE prototype {return(AE_OK);}
237
238#define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \
c26f3c90 239 static ACPI_INLINE prototype {return;}
33620c54
BM
240
241#endif /* !ACPI_REDUCED_HARDWARE */
242
407e22af
LZ
243/*
244 * Error-message prototypes. All interfaces that use these macros will
245 * be configured out of the ACPICA build if the ACPI_NO_ERROR_MESSAGE flag
246 * is defined.
247 */
248#ifndef ACPI_NO_ERROR_MESSAGES
249#define ACPI_MSG_DEPENDENT_RETURN_VOID(prototype) \
250 prototype;
251
252#else
253#define ACPI_MSG_DEPENDENT_RETURN_VOID(prototype) \
254 static ACPI_INLINE prototype {return;}
255
256#endif /* ACPI_NO_ERROR_MESSAGES */
257
1ce28c32
LZ
258/*
259 * Debugging-output prototypes. All interfaces that use these macros will
260 * be configured out of the ACPICA build if the ACPI_DEBUG_OUTPUT flag is
261 * not defined.
262 */
263#ifdef ACPI_DEBUG_OUTPUT
264#define ACPI_DBG_DEPENDENT_RETURN_VOID(prototype) \
265 prototype;
266
267#else
268#define ACPI_DBG_DEPENDENT_RETURN_VOID(prototype) \
269 static ACPI_INLINE prototype {return;}
270
271#endif /* ACPI_DEBUG_OUTPUT */
272
44f6c012 273/*
75c8044f 274 * Initialization
1da177e4 275 */
45c9f78b 276acpi_status __init
f3d2e786
BM
277acpi_initialize_tables(struct acpi_table_desc *initial_storage,
278 u32 initial_table_count, u8 allow_resize);
279
dd272b57 280acpi_status __init acpi_initialize_subsystem(void);
1da177e4 281
45c9f78b 282acpi_status __init acpi_enable_subsystem(u32 flags);
1da177e4 283
45c9f78b 284acpi_status __init acpi_initialize_objects(u32 flags);
1da177e4 285
45c9f78b 286acpi_status __init acpi_terminate(void);
1da177e4 287
75c8044f
LZ
288/*
289 * Miscellaneous global interfaces
290 */
33620c54
BM
291ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void))
292ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void))
739dcbb9 293#ifdef ACPI_FUTURE_USAGE
ed606944 294acpi_status acpi_subsystem_status(void);
739dcbb9 295#endif
1da177e4
LT
296
297#ifdef ACPI_FUTURE_USAGE
4be44fcd 298acpi_status acpi_get_system_info(struct acpi_buffer *ret_buffer);
1da177e4
LT
299#endif
300
9187a415
LZ
301acpi_status acpi_get_statistics(struct acpi_statistics *stats);
302
4be44fcd 303const char *acpi_format_exception(acpi_status exception);
1da177e4 304
4be44fcd 305acpi_status acpi_purge_cached_objects(void);
1da177e4 306
b0ed7a91
LM
307acpi_status acpi_install_interface(acpi_string interface_name);
308
309acpi_status acpi_remove_interface(acpi_string interface_name);
310
2cf9f5bc
LZ
311acpi_status acpi_update_interfaces(u8 action);
312
f654c0fe
LM
313u32
314acpi_check_address_range(acpi_adr_space_type space_id,
315 acpi_physical_address address,
316 acpi_size length, u8 warn);
317
be030a57
BM
318acpi_status
319acpi_decode_pld_buffer(u8 *in_buffer,
320 acpi_size length, struct acpi_pld_info **return_buffer);
321
1da177e4 322/*
f60d8181 323 * ACPI table load/unload interfaces
1da177e4 324 */
caf4a15c
LZ
325acpi_status __init
326acpi_install_table(acpi_physical_address address, u8 physical);
327
f60d8181 328acpi_status acpi_load_table(struct acpi_table_header *table);
f3d2e786 329
f60d8181 330acpi_status acpi_unload_parent_table(acpi_handle object);
1da177e4 331
45c9f78b 332acpi_status __init acpi_load_tables(void);
1da177e4 333
f60d8181
BM
334/*
335 * ACPI table manipulation interfaces
336 */
45c9f78b 337acpi_status __init acpi_reallocate_root_table(void);
f60d8181 338
45c9f78b 339acpi_status __init acpi_find_root_pointer(acpi_size *rsdp_address);
1da177e4 340
f3d2e786 341acpi_status acpi_unload_table_id(acpi_owner_id id);
1da177e4
LT
342
343acpi_status
f3d2e786 344acpi_get_table_header(acpi_string signature,
1f86e8c1 345 u32 instance, struct acpi_table_header *out_table_header);
1da177e4
LT
346
347acpi_status
7d97277b
YL
348acpi_get_table_with_size(acpi_string signature,
349 u32 instance, struct acpi_table_header **out_table,
350 acpi_size *tbl_size);
cd27d79f 351
7d97277b 352acpi_status
f3d2e786 353acpi_get_table(acpi_string signature,
67a119f9 354 u32 instance, struct acpi_table_header **out_table);
1da177e4
LT
355
356acpi_status
1f86e8c1 357acpi_get_table_by_index(u32 table_index, struct acpi_table_header **out_table);
1da177e4 358
3e08e2d2 359acpi_status
b43e1065 360acpi_install_table_handler(acpi_table_handler handler, void *context);
3e08e2d2 361
b43e1065 362acpi_status acpi_remove_table_handler(acpi_table_handler handler);
3e08e2d2 363
1da177e4
LT
364/*
365 * Namespace and name interfaces
366 */
1da177e4 367acpi_status
4be44fcd
LB
368acpi_walk_namespace(acpi_object_type type,
369 acpi_handle start_object,
370 u32 max_depth,
4ef17507
BM
371 acpi_walk_callback descending_callback,
372 acpi_walk_callback ascending_callback,
4be44fcd 373 void *context, void **return_value);
1da177e4
LT
374
375acpi_status
70b30fb1 376acpi_get_devices(const char *HID,
4be44fcd
LB
377 acpi_walk_callback user_function,
378 void *context, void **return_value);
1da177e4
LT
379
380acpi_status
b47cf58e 381acpi_get_name(acpi_handle object,
4be44fcd 382 u32 name_type, struct acpi_buffer *ret_path_ptr);
1da177e4
LT
383
384acpi_status
4be44fcd
LB
385acpi_get_handle(acpi_handle parent,
386 acpi_string pathname, acpi_handle * ret_handle);
1da177e4
LT
387
388acpi_status
b47cf58e 389acpi_attach_data(acpi_handle object, acpi_object_handler handler, void *data);
1da177e4 390
b47cf58e 391acpi_status acpi_detach_data(acpi_handle object, acpi_object_handler handler);
1da177e4 392
7c2e1771
RW
393acpi_status
394acpi_get_data_full(acpi_handle object, acpi_object_handler handler, void **data,
395 void (*callback)(void *));
396
1da177e4 397acpi_status
b47cf58e 398acpi_get_data(acpi_handle object, acpi_object_handler handler, void **data);
1da177e4 399
50eca3eb
BM
400acpi_status
401acpi_debug_trace(char *name, u32 debug_level, u32 debug_layer, u32 flags);
402
1da177e4
LT
403/*
404 * Object manipulation and enumeration
405 */
1da177e4 406acpi_status
4be44fcd
LB
407acpi_evaluate_object(acpi_handle object,
408 acpi_string pathname,
409 struct acpi_object_list *parameter_objects,
410 struct acpi_buffer *return_object_buffer);
1da177e4 411
1da177e4 412acpi_status
4be44fcd
LB
413acpi_evaluate_object_typed(acpi_handle object,
414 acpi_string pathname,
415 struct acpi_object_list *external_params,
416 struct acpi_buffer *return_buffer,
417 acpi_object_type return_type);
1da177e4
LT
418
419acpi_status
b47cf58e 420acpi_get_object_info(acpi_handle object,
15b8dd53 421 struct acpi_device_info **return_buffer);
1da177e4 422
b2f7ddcf
LM
423acpi_status acpi_install_method(u8 *buffer);
424
1da177e4 425acpi_status
4be44fcd
LB
426acpi_get_next_object(acpi_object_type type,
427 acpi_handle parent,
428 acpi_handle child, acpi_handle * out_handle);
1da177e4 429
4be44fcd 430acpi_status acpi_get_type(acpi_handle object, acpi_object_type * out_type);
1da177e4 431
0f0fe1a0
JK
432acpi_status acpi_get_id(acpi_handle object, acpi_owner_id * out_type);
433
4be44fcd 434acpi_status acpi_get_parent(acpi_handle object, acpi_handle * out_handle);
1da177e4
LT
435
436/*
ecfbbc7b 437 * Handler interfaces
1da177e4 438 */
ecfbbc7b
BM
439acpi_status
440acpi_install_initialization_handler(acpi_init_handler handler, u32 function);
441
33620c54 442ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
a2fd4b4b
LZ
443 acpi_install_sci_handler(acpi_sci_handler
444 address,
445 void *context))
446ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
447 acpi_remove_sci_handler(acpi_sci_handler
448 address))
449ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
450 acpi_install_global_event_handler
451 (acpi_gbl_event_handler handler,
452 void *context))
33620c54
BM
453ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
454 acpi_install_fixed_event_handler(u32
455 acpi_event,
456 acpi_event_handler
457 handler,
458 void
459 *context))
460ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
461 acpi_remove_fixed_event_handler(u32 acpi_event,
462 acpi_event_handler
463 handler))
464ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
465 acpi_install_gpe_handler(acpi_handle
466 gpe_device,
467 u32 gpe_number,
468 u32 type,
469 acpi_gpe_handler
470 address,
471 void *context))
472ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
473 acpi_remove_gpe_handler(acpi_handle gpe_device,
474 u32 gpe_number,
475 acpi_gpe_handler
476 address))
1f86e8c1 477acpi_status acpi_install_notify_handler(acpi_handle device, u32 handler_type,
ed606944
LZ
478 acpi_notify_handler handler,
479 void *context);
1da177e4
LT
480
481acpi_status
4be44fcd
LB
482acpi_remove_notify_handler(acpi_handle device,
483 u32 handler_type, acpi_notify_handler handler);
1da177e4
LT
484
485acpi_status
4be44fcd
LB
486acpi_install_address_space_handler(acpi_handle device,
487 acpi_adr_space_type space_id,
488 acpi_adr_space_handler handler,
489 acpi_adr_space_setup setup, void *context);
1da177e4
LT
490
491acpi_status
4be44fcd
LB
492acpi_remove_address_space_handler(acpi_handle device,
493 acpi_adr_space_type space_id,
494 acpi_adr_space_handler handler);
1da177e4 495
1da177e4 496#ifdef ACPI_FUTURE_USAGE
4be44fcd 497acpi_status acpi_install_exception_handler(acpi_exception_handler handler);
1da177e4
LT
498#endif
499
b0ed7a91
LM
500acpi_status acpi_install_interface_handler(acpi_interface_handler handler);
501
1da177e4 502/*
ffef6827 503 * Global Lock interfaces
1da177e4 504 */
33620c54
BM
505ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
506 acpi_acquire_global_lock(u16 timeout,
507 u32 *handle))
cd27d79f 508
33620c54
BM
509ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
510 acpi_release_global_lock(u32 handle))
1da177e4 511
ffef6827
LM
512/*
513 * Interfaces to AML mutex objects
514 */
515acpi_status
516acpi_acquire_mutex(acpi_handle handle, acpi_string pathname, u16 timeout);
517
518acpi_status acpi_release_mutex(acpi_handle handle, acpi_string pathname);
519
520/*
521 * Fixed Event interfaces
522 */
33620c54
BM
523ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
524 acpi_enable_event(u32 event, u32 flags))
1da177e4 525
33620c54
BM
526ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
527 acpi_disable_event(u32 event, u32 flags))
33620c54 528ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_clear_event(u32 event))
1da177e4 529
33620c54
BM
530ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
531 acpi_get_event_status(u32 event,
532 acpi_event_status
533 *event_status))
cd27d79f 534
08ac07b8 535/*
ffef6827 536 * General Purpose Event (GPE) Interfaces
08ac07b8 537 */
33620c54
BM
538ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_update_all_gpes(void))
539
540ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
541 acpi_enable_gpe(acpi_handle gpe_device,
542 u32 gpe_number))
543
544ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
545 acpi_disable_gpe(acpi_handle gpe_device,
546 u32 gpe_number))
547
548ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
549 acpi_clear_gpe(acpi_handle gpe_device,
550 u32 gpe_number))
551
552ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
553 acpi_set_gpe(acpi_handle gpe_device,
554 u32 gpe_number, u8 action))
555
556ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
557 acpi_finish_gpe(acpi_handle gpe_device,
558 u32 gpe_number))
559
560ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
561 acpi_setup_gpe_for_wake(acpi_handle
562 parent_device,
563 acpi_handle gpe_device,
564 u32 gpe_number))
565ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
566 acpi_set_gpe_wake_mask(acpi_handle gpe_device,
567 u32 gpe_number,
568 u8 action))
569ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
570 acpi_get_gpe_status(acpi_handle gpe_device,
571 u32 gpe_number,
572 acpi_event_status
573 *event_status))
33620c54 574ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable_all_gpes(void))
33620c54
BM
575ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_runtime_gpes(void))
576
577ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
578 acpi_get_gpe_device(u32 gpe_index,
579 acpi_handle * gpe_device))
580
581ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
582 acpi_install_gpe_block(acpi_handle gpe_device,
583 struct
584 acpi_generic_address
585 *gpe_block_address,
586 u32 register_count,
587 u32 interrupt_number))
588ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
589 acpi_remove_gpe_block(acpi_handle gpe_device))
a2100801 590
1da177e4
LT
591/*
592 * Resource interfaces
593 */
1da177e4 594typedef
61686124 595acpi_status(*acpi_walk_resource_callback) (struct acpi_resource * resource,
4be44fcd 596 void *context);
1da177e4 597
c51a4de8 598acpi_status
b47cf58e 599acpi_get_vendor_resource(acpi_handle device,
c51a4de8
BM
600 char *name,
601 struct acpi_vendor_uuid *uuid,
602 struct acpi_buffer *ret_buffer);
603
1da177e4 604acpi_status
b47cf58e 605acpi_get_current_resources(acpi_handle device, struct acpi_buffer *ret_buffer);
1da177e4
LT
606
607#ifdef ACPI_FUTURE_USAGE
608acpi_status
b47cf58e 609acpi_get_possible_resources(acpi_handle device, struct acpi_buffer *ret_buffer);
1da177e4
LT
610#endif
611
a91cdde2
BM
612acpi_status
613acpi_get_event_resources(acpi_handle device_handle,
614 struct acpi_buffer *ret_buffer);
615
afb1bbee
BM
616acpi_status
617acpi_walk_resource_buffer(struct acpi_buffer *buffer,
618 acpi_walk_resource_callback user_function,
619 void *context);
620
1da177e4 621acpi_status
b47cf58e 622acpi_walk_resources(acpi_handle device,
c51a4de8 623 char *name,
61686124 624 acpi_walk_resource_callback user_function, void *context);
1da177e4
LT
625
626acpi_status
b47cf58e 627acpi_set_current_resources(acpi_handle device, struct acpi_buffer *in_buffer);
1da177e4
LT
628
629acpi_status
b47cf58e 630acpi_get_irq_routing_table(acpi_handle device, struct acpi_buffer *ret_buffer);
1da177e4
LT
631
632acpi_status
4be44fcd
LB
633acpi_resource_to_address64(struct acpi_resource *resource,
634 struct acpi_resource_address64 *out);
1da177e4 635
0e243178
BM
636acpi_status
637acpi_buffer_to_resource(u8 *aml_buffer,
638 u16 aml_buffer_length,
639 struct acpi_resource **resource_ptr);
640
1da177e4
LT
641/*
642 * Hardware (ACPI device) interfaces
643 */
d3fd902d
BM
644acpi_status acpi_reset(void);
645
739dcbb9
LZ
646acpi_status acpi_read(u64 *value, struct acpi_generic_address *reg);
647
648acpi_status acpi_write(u64 value, struct acpi_generic_address *reg);
649
33620c54
BM
650ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
651 acpi_read_bit_register(u32 register_id,
652 u32 *return_value))
1da177e4 653
33620c54
BM
654ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
655 acpi_write_bit_register(u32 register_id,
656 u32 value))
1da177e4 657
33620c54
BM
658/*
659 * Sleep/Wake interfaces
660 */
1da177e4 661acpi_status
cd27d79f 662acpi_get_sleep_type_data(u8 sleep_state, u8 *slp_typ_a, u8 *slp_typ_b);
1da177e4 663
4be44fcd 664acpi_status acpi_enter_sleep_state_prep(u8 sleep_state);
1da177e4 665
40bce100 666acpi_status acpi_enter_sleep_state(u8 sleep_state);
1da177e4 667
40bce100 668ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enter_sleep_state_s4bios(void))
1da177e4 669
3f6f49c7 670acpi_status acpi_leave_sleep_state_prep(u8 sleep_state);
c95d47a8 671
4be44fcd 672acpi_status acpi_leave_sleep_state(u8 sleep_state);
1da177e4 673
739dcbb9
LZ
674ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
675 acpi_set_firmware_waking_vector(u32
676 physical_address))
739dcbb9
LZ
677#if ACPI_MACHINE_WIDTH == 64
678ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
679 acpi_set_firmware_waking_vector64(u64
680 physical_address))
681#endif
d08310fe
BM
682/*
683 * ACPI Timer interfaces
684 */
685#ifdef ACPI_FUTURE_USAGE
33620c54
BM
686ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
687 acpi_get_timer_resolution(u32 *resolution))
33620c54 688ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_get_timer(u32 *ticks))
d08310fe 689
33620c54
BM
690ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
691 acpi_get_timer_duration(u32 start_ticks,
692 u32 end_ticks,
693 u32 *time_elapsed))
d08310fe
BM
694#endif /* ACPI_FUTURE_USAGE */
695
50df4d8b 696/*
b74be611 697 * Error/Warning output
50df4d8b 698 */
407e22af
LZ
699ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
700 void ACPI_INTERNAL_VAR_XFACE
701 acpi_error(const char *module_name,
702 u32 line_number,
703 const char *format, ...))
704ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(4)
705 void ACPI_INTERNAL_VAR_XFACE
706 acpi_exception(const char *module_name,
707 u32 line_number,
708 acpi_status status,
709 const char *format, ...))
710ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
711 void ACPI_INTERNAL_VAR_XFACE
712 acpi_warning(const char *module_name,
713 u32 line_number,
714 const char *format, ...))
715ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
716 void ACPI_INTERNAL_VAR_XFACE
717 acpi_info(const char *module_name,
718 u32 line_number,
719 const char *format, ...))
720ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
721 void ACPI_INTERNAL_VAR_XFACE
722 acpi_bios_error(const char *module_name,
723 u32 line_number,
724 const char *format, ...))
725ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
726 void ACPI_INTERNAL_VAR_XFACE
727 acpi_bios_warning(const char *module_name,
728 u32 line_number,
729 const char *format, ...))
62cdd141 730
b74be611
BM
731/*
732 * Debug output
733 */
1ce28c32
LZ
734ACPI_DBG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(6)
735 void ACPI_INTERNAL_VAR_XFACE
736 acpi_debug_print(u32 requested_debug_level,
737 u32 line_number,
738 const char *function_name,
739 const char *module_name,
740 u32 component_id,
741 const char *format, ...))
742ACPI_DBG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(6)
743 void ACPI_INTERNAL_VAR_XFACE
744 acpi_debug_print_raw(u32 requested_debug_level,
745 u32 line_number,
746 const char *function_name,
747 const char *module_name,
748 u32 component_id,
749 const char *format, ...))
4be44fcd 750#endif /* __ACXFACE_H__ */