1 /******************************************************************************
3 * Name: acpixf.h - External interfaces to the ACPI subsystem
5 *****************************************************************************/
8 * Copyright (C) 2000 - 2014, Intel Corp.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
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.
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.
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.
47 /* Current ACPICA subsystem version in YYYYMMDD format */
49 #define ACPI_CA_VERSION 0x20140325
51 #include <acpi/acconfig.h>
52 #include <acpi/actypes.h>
53 #include <acpi/actbl.h>
54 #include <acpi/acbuffer.h>
56 extern u8 acpi_gbl_permanent_mmap;
59 * Ensure that the globals are actually defined and initialized only once.
61 * The use of these macros allows a single list of globals (here) in order
62 * to simplify maintenance of the code.
64 #ifdef DEFINE_ACPI_GLOBALS
65 #define ACPI_GLOBAL(type,name) \
69 #define ACPI_INIT_GLOBAL(type,name,value) \
74 #define ACPI_GLOBAL(type,name) \
78 #ifndef ACPI_INIT_GLOBAL
79 #define ACPI_INIT_GLOBAL(type,name,value) \
84 /* ACPICA prototypes */
86 #ifndef ACPI_EXTERNAL_RETURN_STATUS
87 #define ACPI_EXTERNAL_RETURN_STATUS(prototype) \
91 #ifndef ACPI_EXTERNAL_RETURN_OK
92 #define ACPI_EXTERNAL_RETURN_OK(prototype) \
96 #ifndef ACPI_EXTERNAL_RETURN_VOID
97 #define ACPI_EXTERNAL_RETURN_VOID(prototype) \
101 #ifndef ACPI_EXTERNAL_RETURN_UINT32
102 #define ACPI_EXTERNAL_RETURN_UINT32(prototype) \
106 #ifndef ACPI_EXTERNAL_RETURN_PTR
107 #define ACPI_EXTERNAL_RETURN_PTR(prototype) \
111 /* Public globals, available from outside ACPICA subsystem */
113 /*****************************************************************************
115 * Runtime configuration (static defaults that can be overriden at runtime)
117 ****************************************************************************/
120 * Enable "slack" in the AML interpreter? Default is FALSE, and the
121 * interpreter strictly follows the ACPI specification. Setting to TRUE
122 * allows the interpreter to ignore certain errors and/or bad AML constructs.
124 * Currently, these features are enabled by this flag:
126 * 1) Allow "implicit return" of last value in a control method
127 * 2) Allow access beyond the end of an operation region
128 * 3) Allow access to uninitialized locals/args (auto-init to integer 0)
129 * 4) Allow ANY object type to be a source operand for the Store() operator
130 * 5) Allow unresolved references (invalid target name) in package objects
131 * 6) Enable warning messages for behavior that is not ACPI spec compliant
133 ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_interpreter_slack, FALSE);
136 * Automatically serialize all methods that create named objects? Default
137 * is TRUE, meaning that all non_serialized methods are scanned once at
138 * table load time to determine those that create named objects. Methods
139 * that create named objects are marked Serialized in order to prevent
140 * possible run-time problems if they are entered by more than one thread.
142 ACPI_INIT_GLOBAL(u8, acpi_gbl_auto_serialize_methods, TRUE);
145 * Create the predefined _OSI method in the namespace? Default is TRUE
146 * because ACPICA is fully compatible with other ACPI implementations.
147 * Changing this will revert ACPICA (and machine ASL) to pre-OSI behavior.
149 ACPI_INIT_GLOBAL(u8, acpi_gbl_create_osi_method, TRUE);
152 * Optionally use default values for the ACPI register widths. Set this to
153 * TRUE to use the defaults, if an FADT contains incorrect widths/lengths.
155 ACPI_INIT_GLOBAL(u8, acpi_gbl_use_default_register_widths, TRUE);
158 * Optionally enable output from the AML Debug Object.
160 ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_aml_debug_object, FALSE);
163 * Optionally copy the entire DSDT to local memory (instead of simply
164 * mapping it.) There are some BIOSs that corrupt or replace the original
165 * DSDT, creating the need for this option. Default is FALSE, do not copy
168 ACPI_INIT_GLOBAL(u8, acpi_gbl_copy_dsdt_locally, FALSE);
171 * Optionally ignore an XSDT if present and use the RSDT instead.
172 * Although the ACPI specification requires that an XSDT be used instead
173 * of the RSDT, the XSDT has been found to be corrupt or ill-formed on
174 * some machines. Default behavior is to use the XSDT if present.
176 ACPI_INIT_GLOBAL(u8, acpi_gbl_do_not_use_xsdt, FALSE);
179 * Optionally use 32-bit FADT addresses if and when there is a conflict
180 * (address mismatch) between the 32-bit and 64-bit versions of the
181 * address. Although ACPICA adheres to the ACPI specification which
182 * requires the use of the corresponding 64-bit address if it is non-zero,
183 * some machines have been found to have a corrupted non-zero 64-bit
184 * address. Default is FALSE, do not favor the 32-bit addresses.
186 ACPI_INIT_GLOBAL(u8, acpi_gbl_use32_bit_fadt_addresses, FALSE);
189 * Optionally truncate I/O addresses to 16 bits. Provides compatibility
190 * with other ACPI implementations. NOTE: During ACPICA initialization,
191 * this value is set to TRUE if any Windows OSI strings have been
192 * requested by the BIOS.
194 ACPI_INIT_GLOBAL(u8, acpi_gbl_truncate_io_addresses, FALSE);
197 * Disable runtime checking and repair of values returned by control methods.
198 * Use only if the repair is causing a problem on a particular machine.
200 ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_auto_repair, FALSE);
203 * Optionally do not install any SSDTs from the RSDT/XSDT during initialization.
204 * This can be useful for debugging ACPI problems on some machines.
206 ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_ssdt_table_install, FALSE);
209 * We keep track of the latest version of Windows that has been requested by
210 * the BIOS. ACPI 5.0.
212 ACPI_INIT_GLOBAL(u8, acpi_gbl_osi_data, 0);
215 * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
216 * that the ACPI hardware is no longer required. A flag in the FADT indicates
217 * a reduced HW machine, and that flag is duplicated here for convenience.
219 ACPI_INIT_GLOBAL(u8, acpi_gbl_reduced_hardware, FALSE);
222 * This mechanism is used to trace a specified AML method. The method is
223 * traced each time it is executed.
225 ACPI_INIT_GLOBAL(u32, acpi_gbl_trace_flags, 0);
226 ACPI_INIT_GLOBAL(acpi_name, acpi_gbl_trace_method_name, 0);
229 * Runtime configuration of debug output control masks. We want the debug
230 * switches statically initialized so they are already set when the debugger
233 ACPI_INIT_GLOBAL(u32, acpi_dbg_level, ACPI_DEBUG_DEFAULT);
234 ACPI_INIT_GLOBAL(u32, acpi_dbg_layer, 0);
237 * Globals that are publically available
239 ACPI_GLOBAL(u32, acpi_current_gpe_count);
240 ACPI_GLOBAL(struct acpi_table_fadt, acpi_gbl_FADT);
241 ACPI_GLOBAL(u8, acpi_gbl_system_awake_and_running);
244 * Hardware-reduced prototypes. All interfaces that use these macros will
245 * be configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag
248 #if (!ACPI_REDUCED_HARDWARE)
249 #define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \
250 ACPI_EXTERNAL_RETURN_STATUS(prototype)
252 #define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \
253 ACPI_EXTERNAL_RETURN_OK(prototype)
255 #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \
256 ACPI_EXTERNAL_RETURN_VOID(prototype)
259 #define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \
260 static ACPI_INLINE prototype {return(AE_NOT_CONFIGURED);}
262 #define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \
263 static ACPI_INLINE prototype {return(AE_OK);}
265 #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \
266 static ACPI_INLINE prototype {return;}
268 #endif /* !ACPI_REDUCED_HARDWARE */
271 * Error-message prototypes. All interfaces that use these macros will
272 * be configured out of the ACPICA build if the ACPI_NO_ERROR_MESSAGE flag
275 #ifndef ACPI_NO_ERROR_MESSAGES
276 #define ACPI_MSG_DEPENDENT_RETURN_VOID(prototype) \
280 #define ACPI_MSG_DEPENDENT_RETURN_VOID(prototype) \
281 static ACPI_INLINE prototype {return;}
283 #endif /* ACPI_NO_ERROR_MESSAGES */
286 * Debugging-output prototypes. All interfaces that use these macros will
287 * be configured out of the ACPICA build if the ACPI_DEBUG_OUTPUT flag is
290 #ifdef ACPI_DEBUG_OUTPUT
291 #define ACPI_DBG_DEPENDENT_RETURN_VOID(prototype) \
295 #define ACPI_DBG_DEPENDENT_RETURN_VOID(prototype) \
296 static ACPI_INLINE prototype {return;}
298 #endif /* ACPI_DEBUG_OUTPUT */
303 ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
304 acpi_initialize_tables(struct acpi_table_desc
306 u32 initial_table_count,
308 ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_initialize_subsystem(void))
310 ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_enable_subsystem(u32 flags))
312 ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
313 acpi_initialize_objects(u32 flags))
314 ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_terminate(void))
317 * Miscellaneous global interfaces
319 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void))
320 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void))
321 #ifdef ACPI_FUTURE_USAGE
322 ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_subsystem_status(void))
325 #ifdef ACPI_FUTURE_USAGE
326 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
327 acpi_get_system_info(struct acpi_buffer
330 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
331 acpi_get_statistics(struct acpi_statistics *stats))
332 ACPI_EXTERNAL_RETURN_PTR(const char
333 *acpi_format_exception(acpi_status exception))
334 ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_purge_cached_objects(void))
336 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
337 acpi_install_interface(acpi_string interface_name))
339 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
340 acpi_remove_interface(acpi_string interface_name))
341 ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_update_interfaces(u8 action))
343 ACPI_EXTERNAL_RETURN_UINT32(u32
344 acpi_check_address_range(acpi_adr_space_type
346 acpi_physical_address
347 address, acpi_size length,
349 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
350 acpi_decode_pld_buffer(u8 *in_buffer,
356 * ACPI table load/unload interfaces
358 ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
359 acpi_install_table(acpi_physical_address address,
362 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
363 acpi_load_table(struct acpi_table_header *table))
365 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
366 acpi_unload_parent_table(acpi_handle object))
367 ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_load_tables(void))
370 * ACPI table manipulation interfaces
372 ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_reallocate_root_table(void))
374 ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
375 acpi_find_root_pointer(acpi_size * rsdp_address))
377 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
378 acpi_get_table_header(acpi_string signature,
380 struct acpi_table_header
382 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
383 acpi_get_table(acpi_string signature, u32 instance,
384 struct acpi_table_header
386 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
387 acpi_get_table_by_index(u32 table_index,
388 struct acpi_table_header
390 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
391 acpi_install_table_handler(acpi_table_handler
392 handler, void *context))
393 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
394 acpi_remove_table_handler(acpi_table_handler
398 * Namespace and name interfaces
400 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
401 acpi_walk_namespace(acpi_object_type type,
402 acpi_handle start_object,
409 void **return_value))
410 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
411 acpi_get_devices(const char *HID,
412 acpi_walk_callback user_function,
414 void **return_value))
415 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
416 acpi_get_name(acpi_handle object, u32 name_type,
417 struct acpi_buffer *ret_path_ptr))
418 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
419 acpi_get_handle(acpi_handle parent,
420 acpi_string pathname,
421 acpi_handle * ret_handle))
422 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
423 acpi_attach_data(acpi_handle object,
424 acpi_object_handler handler,
426 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
427 acpi_detach_data(acpi_handle object,
428 acpi_object_handler handler))
429 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
430 acpi_get_data(acpi_handle object,
431 acpi_object_handler handler,
433 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
434 acpi_debug_trace(char *name, u32 debug_level,
435 u32 debug_layer, u32 flags))
438 * Object manipulation and enumeration
440 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
441 acpi_evaluate_object(acpi_handle object,
442 acpi_string pathname,
443 struct acpi_object_list
446 *return_object_buffer))
447 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
448 acpi_evaluate_object_typed(acpi_handle object,
449 acpi_string pathname,
450 struct acpi_object_list
456 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
457 acpi_get_object_info(acpi_handle object,
458 struct acpi_device_info
460 ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_install_method(u8 *buffer))
462 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
463 acpi_get_next_object(acpi_object_type type,
466 acpi_handle * out_handle))
468 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
469 acpi_get_type(acpi_handle object,
470 acpi_object_type * out_type))
472 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
473 acpi_get_parent(acpi_handle object,
474 acpi_handle * out_handle))
479 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
480 acpi_install_initialization_handler
481 (acpi_init_handler handler, u32 function))
482 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
483 acpi_install_sci_handler(acpi_sci_handler
486 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
487 acpi_remove_sci_handler(acpi_sci_handler
489 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
490 acpi_install_global_event_handler
491 (acpi_gbl_event_handler handler,
493 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
494 acpi_install_fixed_event_handler(u32
500 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
501 acpi_remove_fixed_event_handler(u32 acpi_event,
504 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
505 acpi_install_gpe_handler(acpi_handle
512 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
513 acpi_remove_gpe_handler(acpi_handle gpe_device,
517 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
518 acpi_install_notify_handler(acpi_handle device,
523 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
524 acpi_remove_notify_handler(acpi_handle device,
528 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
529 acpi_install_address_space_handler(acpi_handle
533 acpi_adr_space_handler
538 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
539 acpi_remove_address_space_handler(acpi_handle
543 acpi_adr_space_handler
545 #ifdef ACPI_FUTURE_USAGE
546 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
547 acpi_install_exception_handler
548 (acpi_exception_handler handler))
550 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
551 acpi_install_interface_handler
552 (acpi_interface_handler handler))
555 * Global Lock interfaces
557 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
558 acpi_acquire_global_lock(u16 timeout,
561 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
562 acpi_release_global_lock(u32 handle))
565 * Interfaces to AML mutex objects
567 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
568 acpi_acquire_mutex(acpi_handle handle,
569 acpi_string pathname,
572 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
573 acpi_release_mutex(acpi_handle handle,
574 acpi_string pathname))
577 * Fixed Event interfaces
579 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
580 acpi_enable_event(u32 event, u32 flags))
582 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
583 acpi_disable_event(u32 event, u32 flags))
584 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_clear_event(u32 event))
586 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
587 acpi_get_event_status(u32 event,
592 * General Purpose Event (GPE) Interfaces
594 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_update_all_gpes(void))
596 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
597 acpi_enable_gpe(acpi_handle gpe_device,
600 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
601 acpi_disable_gpe(acpi_handle gpe_device,
604 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
605 acpi_clear_gpe(acpi_handle gpe_device,
608 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
609 acpi_set_gpe(acpi_handle gpe_device,
610 u32 gpe_number, u8 action))
612 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
613 acpi_finish_gpe(acpi_handle gpe_device,
616 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
617 acpi_setup_gpe_for_wake(acpi_handle
619 acpi_handle gpe_device,
621 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
622 acpi_set_gpe_wake_mask(acpi_handle gpe_device,
625 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
626 acpi_get_gpe_status(acpi_handle gpe_device,
630 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable_all_gpes(void))
631 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_runtime_gpes(void))
633 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
634 acpi_get_gpe_device(u32 gpe_index,
635 acpi_handle * gpe_device))
637 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
638 acpi_install_gpe_block(acpi_handle gpe_device,
643 u32 interrupt_number))
644 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
645 acpi_remove_gpe_block(acpi_handle gpe_device))
648 * Resource interfaces
651 acpi_status(*acpi_walk_resource_callback) (struct acpi_resource * resource,
654 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
655 acpi_get_vendor_resource(acpi_handle device,
657 struct acpi_vendor_uuid
661 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
662 acpi_get_current_resources(acpi_handle device,
665 #ifdef ACPI_FUTURE_USAGE
666 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
667 acpi_get_possible_resources(acpi_handle device,
671 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
672 acpi_get_event_resources(acpi_handle device_handle,
675 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
676 acpi_walk_resource_buffer(struct acpi_buffer
678 acpi_walk_resource_callback
681 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
682 acpi_walk_resources(acpi_handle device, char *name,
683 acpi_walk_resource_callback
684 user_function, void *context))
685 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
686 acpi_set_current_resources(acpi_handle device,
689 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
690 acpi_get_irq_routing_table(acpi_handle device,
693 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
694 acpi_resource_to_address64(struct acpi_resource
697 acpi_resource_address64
699 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
700 acpi_buffer_to_resource(u8 *aml_buffer,
701 u16 aml_buffer_length,
706 * Hardware (ACPI device) interfaces
708 ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_reset(void))
710 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
711 acpi_read(u64 *value,
712 struct acpi_generic_address *reg))
714 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
715 acpi_write(u64 value,
716 struct acpi_generic_address *reg))
718 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
719 acpi_read_bit_register(u32 register_id,
722 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
723 acpi_write_bit_register(u32 register_id,
727 * Sleep/Wake interfaces
729 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
730 acpi_get_sleep_type_data(u8 sleep_state,
734 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
735 acpi_enter_sleep_state_prep(u8 sleep_state))
736 ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_enter_sleep_state(u8 sleep_state))
738 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enter_sleep_state_s4bios(void))
740 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
741 acpi_leave_sleep_state_prep(u8 sleep_state))
742 ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_leave_sleep_state(u8 sleep_state))
744 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
745 acpi_set_firmware_waking_vector(u32
747 #if ACPI_MACHINE_WIDTH == 64
748 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
749 acpi_set_firmware_waking_vector64(u64
753 * ACPI Timer interfaces
755 #ifdef ACPI_FUTURE_USAGE
756 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
757 acpi_get_timer_resolution(u32 *resolution))
758 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_get_timer(u32 *ticks))
760 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
761 acpi_get_timer_duration(u32 start_ticks,
764 #endif /* ACPI_FUTURE_USAGE */
767 * Error/Warning output
769 ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
770 void ACPI_INTERNAL_VAR_XFACE
771 acpi_error(const char *module_name,
773 const char *format, ...))
774 ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(4)
775 void ACPI_INTERNAL_VAR_XFACE
776 acpi_exception(const char *module_name,
779 const char *format, ...))
780 ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
781 void ACPI_INTERNAL_VAR_XFACE
782 acpi_warning(const char *module_name,
784 const char *format, ...))
785 ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
786 void ACPI_INTERNAL_VAR_XFACE
787 acpi_info(const char *module_name,
789 const char *format, ...))
790 ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
791 void ACPI_INTERNAL_VAR_XFACE
792 acpi_bios_error(const char *module_name,
794 const char *format, ...))
795 ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
796 void ACPI_INTERNAL_VAR_XFACE
797 acpi_bios_warning(const char *module_name,
799 const char *format, ...))
804 ACPI_DBG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(6)
805 void ACPI_INTERNAL_VAR_XFACE
806 acpi_debug_print(u32 requested_debug_level,
808 const char *function_name,
809 const char *module_name,
811 const char *format, ...))
812 ACPI_DBG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(6)
813 void ACPI_INTERNAL_VAR_XFACE
814 acpi_debug_print_raw(u32 requested_debug_level,
816 const char *function_name,
817 const char *module_name,
819 const char *format, ...))
824 acpi_status acpi_get_id(acpi_handle object, acpi_owner_id * out_type);
826 acpi_status acpi_unload_table_id(acpi_owner_id id);
829 acpi_get_table_with_size(acpi_string signature,
830 u32 instance, struct acpi_table_header **out_table,
831 acpi_size *tbl_size);
834 acpi_get_data_full(acpi_handle object, acpi_object_handler handler, void **data,
835 void (*callback)(void *));
837 #endif /* __ACXFACE_H__ */