ACPICA: OSL: Add configurability for error message functions.
[deliverable/linux.git] / include / acpi / acpixf.h
1 /******************************************************************************
2 *
3 * Name: acpixf.h - External interfaces to the ACPI subsystem
4 *
5 *****************************************************************************/
6
7 /*
8 * Copyright (C) 2000 - 2014, Intel Corp.
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
44 #ifndef __ACXFACE_H__
45 #define __ACXFACE_H__
46
47 /* Current ACPICA subsystem version in YYYYMMDD format */
48
49 #define ACPI_CA_VERSION 0x20140325
50
51 #include <acpi/acconfig.h>
52 #include <acpi/actypes.h>
53 #include <acpi/actbl.h>
54 #include <acpi/acbuffer.h>
55
56 extern u8 acpi_gbl_permanent_mmap;
57
58 /*
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 */
106 ACPI_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 */
115 ACPI_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 */
122 ACPI_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 */
128 ACPI_INIT_GLOBAL(u8, acpi_gbl_use_default_register_widths, TRUE);
129
130 /*
131 * Optionally enable output from the AML Debug Object.
132 */
133 ACPI_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 */
141 ACPI_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 */
149 ACPI_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 */
159 ACPI_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 */
167 ACPI_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 */
173 ACPI_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 */
179 ACPI_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 */
185 ACPI_INIT_GLOBAL(u8, acpi_gbl_osi_data, 0);
186
187 /*
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.
191 */
192 ACPI_INIT_GLOBAL(u8, acpi_gbl_reduced_hardware, FALSE);
193
194 /*
195 * This mechanism is used to trace a specified AML method. The method is
196 * traced each time it is executed.
197 */
198 ACPI_INIT_GLOBAL(u32, acpi_gbl_trace_flags, 0);
199 ACPI_INIT_GLOBAL(acpi_name, acpi_gbl_trace_method_name, 0);
200
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 */
206 ACPI_INIT_GLOBAL(u32, acpi_dbg_level, ACPI_DEBUG_DEFAULT);
207 ACPI_INIT_GLOBAL(u32, acpi_dbg_layer, 0);
208
209 /*
210 * Globals that are publically available
211 */
212 ACPI_GLOBAL(u32, acpi_current_gpe_count);
213 ACPI_GLOBAL(struct acpi_table_fadt, acpi_gbl_FADT);
214 ACPI_GLOBAL(u8, acpi_gbl_system_awake_and_running);
215
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) \
239 static ACPI_INLINE prototype {return;}
240
241 #endif /* !ACPI_REDUCED_HARDWARE */
242
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
258 /*
259 * Initialization
260 */
261 acpi_status __init
262 acpi_initialize_tables(struct acpi_table_desc *initial_storage,
263 u32 initial_table_count, u8 allow_resize);
264
265 acpi_status __init acpi_initialize_subsystem(void);
266
267 acpi_status __init acpi_enable_subsystem(u32 flags);
268
269 acpi_status __init acpi_initialize_objects(u32 flags);
270
271 acpi_status __init acpi_terminate(void);
272
273 /*
274 * Miscellaneous global interfaces
275 */
276 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void))
277 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void))
278 #ifdef ACPI_FUTURE_USAGE
279 acpi_status acpi_subsystem_status(void);
280 #endif
281
282 #ifdef ACPI_FUTURE_USAGE
283 acpi_status acpi_get_system_info(struct acpi_buffer *ret_buffer);
284 #endif
285
286 acpi_status acpi_get_statistics(struct acpi_statistics *stats);
287
288 const char *acpi_format_exception(acpi_status exception);
289
290 acpi_status acpi_purge_cached_objects(void);
291
292 acpi_status acpi_install_interface(acpi_string interface_name);
293
294 acpi_status acpi_remove_interface(acpi_string interface_name);
295
296 acpi_status acpi_update_interfaces(u8 action);
297
298 u32
299 acpi_check_address_range(acpi_adr_space_type space_id,
300 acpi_physical_address address,
301 acpi_size length, u8 warn);
302
303 acpi_status
304 acpi_decode_pld_buffer(u8 *in_buffer,
305 acpi_size length, struct acpi_pld_info **return_buffer);
306
307 /*
308 * ACPI table load/unload interfaces
309 */
310 acpi_status __init
311 acpi_install_table(acpi_physical_address address, u8 physical);
312
313 acpi_status acpi_load_table(struct acpi_table_header *table);
314
315 acpi_status acpi_unload_parent_table(acpi_handle object);
316
317 acpi_status __init acpi_load_tables(void);
318
319 /*
320 * ACPI table manipulation interfaces
321 */
322 acpi_status __init acpi_reallocate_root_table(void);
323
324 acpi_status __init acpi_find_root_pointer(acpi_size *rsdp_address);
325
326 acpi_status acpi_unload_table_id(acpi_owner_id id);
327
328 acpi_status
329 acpi_get_table_header(acpi_string signature,
330 u32 instance, struct acpi_table_header *out_table_header);
331
332 acpi_status
333 acpi_get_table_with_size(acpi_string signature,
334 u32 instance, struct acpi_table_header **out_table,
335 acpi_size *tbl_size);
336
337 acpi_status
338 acpi_get_table(acpi_string signature,
339 u32 instance, struct acpi_table_header **out_table);
340
341 acpi_status
342 acpi_get_table_by_index(u32 table_index, struct acpi_table_header **out_table);
343
344 acpi_status
345 acpi_install_table_handler(acpi_table_handler handler, void *context);
346
347 acpi_status acpi_remove_table_handler(acpi_table_handler handler);
348
349 /*
350 * Namespace and name interfaces
351 */
352 acpi_status
353 acpi_walk_namespace(acpi_object_type type,
354 acpi_handle start_object,
355 u32 max_depth,
356 acpi_walk_callback descending_callback,
357 acpi_walk_callback ascending_callback,
358 void *context, void **return_value);
359
360 acpi_status
361 acpi_get_devices(const char *HID,
362 acpi_walk_callback user_function,
363 void *context, void **return_value);
364
365 acpi_status
366 acpi_get_name(acpi_handle object,
367 u32 name_type, struct acpi_buffer *ret_path_ptr);
368
369 acpi_status
370 acpi_get_handle(acpi_handle parent,
371 acpi_string pathname, acpi_handle * ret_handle);
372
373 acpi_status
374 acpi_attach_data(acpi_handle object, acpi_object_handler handler, void *data);
375
376 acpi_status acpi_detach_data(acpi_handle object, acpi_object_handler handler);
377
378 acpi_status
379 acpi_get_data_full(acpi_handle object, acpi_object_handler handler, void **data,
380 void (*callback)(void *));
381
382 acpi_status
383 acpi_get_data(acpi_handle object, acpi_object_handler handler, void **data);
384
385 acpi_status
386 acpi_debug_trace(char *name, u32 debug_level, u32 debug_layer, u32 flags);
387
388 /*
389 * Object manipulation and enumeration
390 */
391 acpi_status
392 acpi_evaluate_object(acpi_handle object,
393 acpi_string pathname,
394 struct acpi_object_list *parameter_objects,
395 struct acpi_buffer *return_object_buffer);
396
397 acpi_status
398 acpi_evaluate_object_typed(acpi_handle object,
399 acpi_string pathname,
400 struct acpi_object_list *external_params,
401 struct acpi_buffer *return_buffer,
402 acpi_object_type return_type);
403
404 acpi_status
405 acpi_get_object_info(acpi_handle object,
406 struct acpi_device_info **return_buffer);
407
408 acpi_status acpi_install_method(u8 *buffer);
409
410 acpi_status
411 acpi_get_next_object(acpi_object_type type,
412 acpi_handle parent,
413 acpi_handle child, acpi_handle * out_handle);
414
415 acpi_status acpi_get_type(acpi_handle object, acpi_object_type * out_type);
416
417 acpi_status acpi_get_id(acpi_handle object, acpi_owner_id * out_type);
418
419 acpi_status acpi_get_parent(acpi_handle object, acpi_handle * out_handle);
420
421 /*
422 * Handler interfaces
423 */
424 acpi_status
425 acpi_install_initialization_handler(acpi_init_handler handler, u32 function);
426
427 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
428 acpi_install_sci_handler(acpi_sci_handler
429 address,
430 void *context))
431 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
432 acpi_remove_sci_handler(acpi_sci_handler
433 address))
434 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
435 acpi_install_global_event_handler
436 (acpi_gbl_event_handler handler,
437 void *context))
438 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
439 acpi_install_fixed_event_handler(u32
440 acpi_event,
441 acpi_event_handler
442 handler,
443 void
444 *context))
445 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
446 acpi_remove_fixed_event_handler(u32 acpi_event,
447 acpi_event_handler
448 handler))
449 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
450 acpi_install_gpe_handler(acpi_handle
451 gpe_device,
452 u32 gpe_number,
453 u32 type,
454 acpi_gpe_handler
455 address,
456 void *context))
457 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
458 acpi_remove_gpe_handler(acpi_handle gpe_device,
459 u32 gpe_number,
460 acpi_gpe_handler
461 address))
462 acpi_status acpi_install_notify_handler(acpi_handle device, u32 handler_type,
463 acpi_notify_handler handler,
464 void *context);
465
466 acpi_status
467 acpi_remove_notify_handler(acpi_handle device,
468 u32 handler_type, acpi_notify_handler handler);
469
470 acpi_status
471 acpi_install_address_space_handler(acpi_handle device,
472 acpi_adr_space_type space_id,
473 acpi_adr_space_handler handler,
474 acpi_adr_space_setup setup, void *context);
475
476 acpi_status
477 acpi_remove_address_space_handler(acpi_handle device,
478 acpi_adr_space_type space_id,
479 acpi_adr_space_handler handler);
480
481 #ifdef ACPI_FUTURE_USAGE
482 acpi_status acpi_install_exception_handler(acpi_exception_handler handler);
483 #endif
484
485 acpi_status acpi_install_interface_handler(acpi_interface_handler handler);
486
487 /*
488 * Global Lock interfaces
489 */
490 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
491 acpi_acquire_global_lock(u16 timeout,
492 u32 *handle))
493
494 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
495 acpi_release_global_lock(u32 handle))
496
497 /*
498 * Interfaces to AML mutex objects
499 */
500 acpi_status
501 acpi_acquire_mutex(acpi_handle handle, acpi_string pathname, u16 timeout);
502
503 acpi_status acpi_release_mutex(acpi_handle handle, acpi_string pathname);
504
505 /*
506 * Fixed Event interfaces
507 */
508 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
509 acpi_enable_event(u32 event, u32 flags))
510
511 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
512 acpi_disable_event(u32 event, u32 flags))
513 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_clear_event(u32 event))
514
515 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
516 acpi_get_event_status(u32 event,
517 acpi_event_status
518 *event_status))
519
520 /*
521 * General Purpose Event (GPE) Interfaces
522 */
523 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_update_all_gpes(void))
524
525 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
526 acpi_enable_gpe(acpi_handle gpe_device,
527 u32 gpe_number))
528
529 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
530 acpi_disable_gpe(acpi_handle gpe_device,
531 u32 gpe_number))
532
533 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
534 acpi_clear_gpe(acpi_handle gpe_device,
535 u32 gpe_number))
536
537 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
538 acpi_set_gpe(acpi_handle gpe_device,
539 u32 gpe_number, u8 action))
540
541 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
542 acpi_finish_gpe(acpi_handle gpe_device,
543 u32 gpe_number))
544
545 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
546 acpi_setup_gpe_for_wake(acpi_handle
547 parent_device,
548 acpi_handle gpe_device,
549 u32 gpe_number))
550 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
551 acpi_set_gpe_wake_mask(acpi_handle gpe_device,
552 u32 gpe_number,
553 u8 action))
554 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
555 acpi_get_gpe_status(acpi_handle gpe_device,
556 u32 gpe_number,
557 acpi_event_status
558 *event_status))
559 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable_all_gpes(void))
560 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_runtime_gpes(void))
561
562 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
563 acpi_get_gpe_device(u32 gpe_index,
564 acpi_handle * gpe_device))
565
566 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
567 acpi_install_gpe_block(acpi_handle gpe_device,
568 struct
569 acpi_generic_address
570 *gpe_block_address,
571 u32 register_count,
572 u32 interrupt_number))
573 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
574 acpi_remove_gpe_block(acpi_handle gpe_device))
575
576 /*
577 * Resource interfaces
578 */
579 typedef
580 acpi_status(*acpi_walk_resource_callback) (struct acpi_resource * resource,
581 void *context);
582
583 acpi_status
584 acpi_get_vendor_resource(acpi_handle device,
585 char *name,
586 struct acpi_vendor_uuid *uuid,
587 struct acpi_buffer *ret_buffer);
588
589 acpi_status
590 acpi_get_current_resources(acpi_handle device, struct acpi_buffer *ret_buffer);
591
592 #ifdef ACPI_FUTURE_USAGE
593 acpi_status
594 acpi_get_possible_resources(acpi_handle device, struct acpi_buffer *ret_buffer);
595 #endif
596
597 acpi_status
598 acpi_get_event_resources(acpi_handle device_handle,
599 struct acpi_buffer *ret_buffer);
600
601 acpi_status
602 acpi_walk_resource_buffer(struct acpi_buffer *buffer,
603 acpi_walk_resource_callback user_function,
604 void *context);
605
606 acpi_status
607 acpi_walk_resources(acpi_handle device,
608 char *name,
609 acpi_walk_resource_callback user_function, void *context);
610
611 acpi_status
612 acpi_set_current_resources(acpi_handle device, struct acpi_buffer *in_buffer);
613
614 acpi_status
615 acpi_get_irq_routing_table(acpi_handle device, struct acpi_buffer *ret_buffer);
616
617 acpi_status
618 acpi_resource_to_address64(struct acpi_resource *resource,
619 struct acpi_resource_address64 *out);
620
621 acpi_status
622 acpi_buffer_to_resource(u8 *aml_buffer,
623 u16 aml_buffer_length,
624 struct acpi_resource **resource_ptr);
625
626 /*
627 * Hardware (ACPI device) interfaces
628 */
629 acpi_status acpi_reset(void);
630
631 acpi_status acpi_read(u64 *value, struct acpi_generic_address *reg);
632
633 acpi_status acpi_write(u64 value, struct acpi_generic_address *reg);
634
635 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
636 acpi_read_bit_register(u32 register_id,
637 u32 *return_value))
638
639 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
640 acpi_write_bit_register(u32 register_id,
641 u32 value))
642
643 /*
644 * Sleep/Wake interfaces
645 */
646 acpi_status
647 acpi_get_sleep_type_data(u8 sleep_state, u8 *slp_typ_a, u8 *slp_typ_b);
648
649 acpi_status acpi_enter_sleep_state_prep(u8 sleep_state);
650
651 acpi_status acpi_enter_sleep_state(u8 sleep_state);
652
653 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enter_sleep_state_s4bios(void))
654
655 acpi_status acpi_leave_sleep_state_prep(u8 sleep_state);
656
657 acpi_status acpi_leave_sleep_state(u8 sleep_state);
658
659 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
660 acpi_set_firmware_waking_vector(u32
661 physical_address))
662 #if ACPI_MACHINE_WIDTH == 64
663 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
664 acpi_set_firmware_waking_vector64(u64
665 physical_address))
666 #endif
667 /*
668 * ACPI Timer interfaces
669 */
670 #ifdef ACPI_FUTURE_USAGE
671 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
672 acpi_get_timer_resolution(u32 *resolution))
673 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_get_timer(u32 *ticks))
674
675 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
676 acpi_get_timer_duration(u32 start_ticks,
677 u32 end_ticks,
678 u32 *time_elapsed))
679 #endif /* ACPI_FUTURE_USAGE */
680
681 /*
682 * Error/Warning output
683 */
684 ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
685 void ACPI_INTERNAL_VAR_XFACE
686 acpi_error(const char *module_name,
687 u32 line_number,
688 const char *format, ...))
689 ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(4)
690 void ACPI_INTERNAL_VAR_XFACE
691 acpi_exception(const char *module_name,
692 u32 line_number,
693 acpi_status status,
694 const char *format, ...))
695 ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
696 void ACPI_INTERNAL_VAR_XFACE
697 acpi_warning(const char *module_name,
698 u32 line_number,
699 const char *format, ...))
700 ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
701 void ACPI_INTERNAL_VAR_XFACE
702 acpi_info(const char *module_name,
703 u32 line_number,
704 const char *format, ...))
705 ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
706 void ACPI_INTERNAL_VAR_XFACE
707 acpi_bios_error(const char *module_name,
708 u32 line_number,
709 const char *format, ...))
710 ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
711 void ACPI_INTERNAL_VAR_XFACE
712 acpi_bios_warning(const char *module_name,
713 u32 line_number,
714 const char *format, ...))
715
716 /*
717 * Debug output
718 */
719 #ifdef ACPI_DEBUG_OUTPUT
720 ACPI_PRINTF_LIKE(6)
721 void ACPI_INTERNAL_VAR_XFACE
722 acpi_debug_print(u32 requested_debug_level,
723 u32 line_number,
724 const char *function_name,
725 const char *module_name,
726 u32 component_id, const char *format, ...);
727
728 ACPI_PRINTF_LIKE(6)
729 void ACPI_INTERNAL_VAR_XFACE
730 acpi_debug_print_raw(u32 requested_debug_level,
731 u32 line_number,
732 const char *function_name,
733 const char *module_name,
734 u32 component_id, const char *format, ...);
735 #endif
736
737 #endif /* __ACXFACE_H__ */
This page took 0.059006 seconds and 6 git commands to generate.