1 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
2 /******************************************************************************
4 * Name: acpixf.h - External interfaces to the ACPI subsystem
6 * Copyright (C) 2000 - 2018, Intel Corp.
8 *****************************************************************************/
13 /* Current ACPICA subsystem version in YYYYMMDD format */
15 #define ACPI_CA_VERSION 0x20180313
17 #include <acpi/acconfig.h>
18 #include <acpi/actypes.h>
19 #include <acpi/actbl.h>
20 #include <acpi/acbuffer.h>
22 /*****************************************************************************
24 * Macros used for ACPICA globals and configuration
26 ****************************************************************************/
29 * Ensure that global variables are defined and initialized only once.
31 * The use of these macros allows for a single list of globals (here)
32 * in order to simplify maintenance of the code.
34 #ifdef DEFINE_ACPI_GLOBALS
35 #define ACPI_GLOBAL(type,name) \
39 #define ACPI_INIT_GLOBAL(type,name,value) \
44 #define ACPI_GLOBAL(type,name) \
48 #ifndef ACPI_INIT_GLOBAL
49 #define ACPI_INIT_GLOBAL(type,name,value) \
55 * These macros configure the various ACPICA interfaces. They are
56 * useful for generating stub inline functions for features that are
57 * configured out of the current kernel or ACPICA application.
59 #ifndef ACPI_EXTERNAL_RETURN_STATUS
60 #define ACPI_EXTERNAL_RETURN_STATUS(prototype) \
64 #ifndef ACPI_EXTERNAL_RETURN_OK
65 #define ACPI_EXTERNAL_RETURN_OK(prototype) \
69 #ifndef ACPI_EXTERNAL_RETURN_VOID
70 #define ACPI_EXTERNAL_RETURN_VOID(prototype) \
74 #ifndef ACPI_EXTERNAL_RETURN_UINT32
75 #define ACPI_EXTERNAL_RETURN_UINT32(prototype) \
79 #ifndef ACPI_EXTERNAL_RETURN_PTR
80 #define ACPI_EXTERNAL_RETURN_PTR(prototype) \
84 /*****************************************************************************
86 * Public globals and runtime configuration options
88 ****************************************************************************/
91 * Enable "slack mode" of the AML interpreter? Default is FALSE, and the
92 * interpreter strictly follows the ACPI specification. Setting to TRUE
93 * allows the interpreter to ignore certain errors and/or bad AML constructs.
95 * Currently, these features are enabled by this flag:
97 * 1) Allow "implicit return" of last value in a control method
98 * 2) Allow access beyond the end of an operation region
99 * 3) Allow access to uninitialized locals/args (auto-init to integer 0)
100 * 4) Allow ANY object type to be a source operand for the Store() operator
101 * 5) Allow unresolved references (invalid target name) in package objects
102 * 6) Enable warning messages for behavior that is not ACPI spec compliant
104 ACPI_INIT_GLOBAL(u8
, acpi_gbl_enable_interpreter_slack
, FALSE
);
107 * Automatically serialize all methods that create named objects? Default
108 * is TRUE, meaning that all non_serialized methods are scanned once at
109 * table load time to determine those that create named objects. Methods
110 * that create named objects are marked Serialized in order to prevent
111 * possible run-time problems if they are entered by more than one thread.
113 ACPI_INIT_GLOBAL(u8
, acpi_gbl_auto_serialize_methods
, TRUE
);
116 * Create the predefined _OSI method in the namespace? Default is TRUE
117 * because ACPICA is fully compatible with other ACPI implementations.
118 * Changing this will revert ACPICA (and machine ASL) to pre-OSI behavior.
120 ACPI_INIT_GLOBAL(u8
, acpi_gbl_create_osi_method
, TRUE
);
123 * Optionally use default values for the ACPI register widths. Set this to
124 * TRUE to use the defaults, if an FADT contains incorrect widths/lengths.
126 ACPI_INIT_GLOBAL(u8
, acpi_gbl_use_default_register_widths
, TRUE
);
129 * Whether or not to validate (map) an entire table to verify
130 * checksum/duplication in early stage before install. Set this to TRUE to
131 * allow early table validation before install it to the table manager.
132 * Note that enabling this option causes errors to happen in some OSPMs
133 * during early initialization stages. Default behavior is to allow such
136 ACPI_INIT_GLOBAL(u8
, acpi_gbl_enable_table_validation
, TRUE
);
139 * Optionally enable output from the AML Debug Object.
141 ACPI_INIT_GLOBAL(u8
, acpi_gbl_enable_aml_debug_object
, FALSE
);
144 * Optionally copy the entire DSDT to local memory (instead of simply
145 * mapping it.) There are some BIOSs that corrupt or replace the original
146 * DSDT, creating the need for this option. Default is FALSE, do not copy
149 ACPI_INIT_GLOBAL(u8
, acpi_gbl_copy_dsdt_locally
, FALSE
);
152 * Optionally ignore an XSDT if present and use the RSDT instead.
153 * Although the ACPI specification requires that an XSDT be used instead
154 * of the RSDT, the XSDT has been found to be corrupt or ill-formed on
155 * some machines. Default behavior is to use the XSDT if present.
157 ACPI_INIT_GLOBAL(u8
, acpi_gbl_do_not_use_xsdt
, FALSE
);
160 * Optionally support group module level code.
161 * NOTE, this is essentially obsolete and will be removed soon
164 ACPI_INIT_GLOBAL(u8
, acpi_gbl_group_module_level_code
, FALSE
);
167 * Optionally support module level code by parsing an entire table as
168 * a method as it is loaded. Default is TRUE.
169 * NOTE, this is essentially obsolete and will be removed soon
172 ACPI_INIT_GLOBAL(u8
, acpi_gbl_execute_tables_as_methods
, TRUE
);
175 * Optionally use 32-bit FADT addresses if and when there is a conflict
176 * (address mismatch) between the 32-bit and 64-bit versions of the
177 * address. Although ACPICA adheres to the ACPI specification which
178 * requires the use of the corresponding 64-bit address if it is non-zero,
179 * some machines have been found to have a corrupted non-zero 64-bit
180 * address. Default is FALSE, do not favor the 32-bit addresses.
182 ACPI_INIT_GLOBAL(u8
, acpi_gbl_use32_bit_fadt_addresses
, FALSE
);
185 * Optionally use 32-bit FACS table addresses.
186 * It is reported that some platforms fail to resume from system suspending
187 * if 64-bit FACS table address is selected:
188 * https://bugzilla.kernel.org/show_bug.cgi?id=74021
189 * Default is TRUE, favor the 32-bit addresses.
191 ACPI_INIT_GLOBAL(u8
, acpi_gbl_use32_bit_facs_addresses
, TRUE
);
194 * Optionally truncate I/O addresses to 16 bits. Provides compatibility
195 * with other ACPI implementations. NOTE: During ACPICA initialization,
196 * this value is set to TRUE if any Windows OSI strings have been
197 * requested by the BIOS.
199 ACPI_INIT_GLOBAL(u8
, acpi_gbl_truncate_io_addresses
, FALSE
);
202 * Disable runtime checking and repair of values returned by control methods.
203 * Use only if the repair is causing a problem on a particular machine.
205 ACPI_INIT_GLOBAL(u8
, acpi_gbl_disable_auto_repair
, FALSE
);
208 * Optionally do not install any SSDTs from the RSDT/XSDT during initialization.
209 * This can be useful for debugging ACPI problems on some machines.
211 ACPI_INIT_GLOBAL(u8
, acpi_gbl_disable_ssdt_table_install
, FALSE
);
214 * Optionally enable runtime namespace override.
216 ACPI_INIT_GLOBAL(u8
, acpi_gbl_runtime_namespace_override
, TRUE
);
219 * We keep track of the latest version of Windows that has been requested by
220 * the BIOS. ACPI 5.0.
222 ACPI_INIT_GLOBAL(u8
, acpi_gbl_osi_data
, 0);
225 * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
226 * that the ACPI hardware is no longer required. A flag in the FADT indicates
227 * a reduced HW machine, and that flag is duplicated here for convenience.
229 ACPI_INIT_GLOBAL(u8
, acpi_gbl_reduced_hardware
, FALSE
);
232 * Maximum timeout for While() loop iterations before forced method abort.
233 * This mechanism is intended to prevent infinite loops during interpreter
234 * execution within a host kernel.
236 ACPI_INIT_GLOBAL(u32
, acpi_gbl_max_loop_iterations
, ACPI_MAX_LOOP_TIMEOUT
);
239 * Optionally ignore AE_NOT_FOUND errors from named reference package elements
240 * during DSDT/SSDT table loading. This reduces error "noise" in platforms
241 * whose firmware is carrying around a bunch of unused package objects that
242 * refer to non-existent named objects. However, If the AML actually tries to
243 * use such a package, the unresolved element(s) will be replaced with NULL
246 ACPI_INIT_GLOBAL(u8
, acpi_gbl_ignore_package_resolution_errors
, FALSE
);
249 * This mechanism is used to trace a specified AML method. The method is
250 * traced each time it is executed.
252 ACPI_INIT_GLOBAL(u32
, acpi_gbl_trace_flags
, 0);
253 ACPI_INIT_GLOBAL(const char *, acpi_gbl_trace_method_name
, NULL
);
254 ACPI_INIT_GLOBAL(u32
, acpi_gbl_trace_dbg_level
, ACPI_TRACE_LEVEL_DEFAULT
);
255 ACPI_INIT_GLOBAL(u32
, acpi_gbl_trace_dbg_layer
, ACPI_TRACE_LAYER_DEFAULT
);
258 * Runtime configuration of debug output control masks. We want the debug
259 * switches statically initialized so they are already set when the debugger
262 ACPI_INIT_GLOBAL(u32
, acpi_dbg_level
, ACPI_DEBUG_DEFAULT
);
263 ACPI_INIT_GLOBAL(u32
, acpi_dbg_layer
, 0);
265 /* Optionally enable timer output with Debug Object output */
267 ACPI_INIT_GLOBAL(u8
, acpi_gbl_display_debug_timer
, FALSE
);
270 * Debugger command handshake globals. Host OSes need to access these
271 * variables to implement their own command handshake mechanism.
274 ACPI_INIT_GLOBAL(u8
, acpi_gbl_method_executing
, FALSE
);
275 ACPI_GLOBAL(char, acpi_gbl_db_line_buf
[ACPI_DB_LINE_BUFFER_SIZE
]);
279 * Other miscellaneous globals
281 ACPI_GLOBAL(struct acpi_table_fadt
, acpi_gbl_FADT
);
282 ACPI_GLOBAL(u32
, acpi_current_gpe_count
);
283 ACPI_GLOBAL(u8
, acpi_gbl_system_awake_and_running
);
285 /*****************************************************************************
287 * ACPICA public interface configuration.
289 * Interfaces that are configured out of the ACPICA build are replaced
290 * by inlined stubs by default.
292 ****************************************************************************/
295 * Hardware-reduced prototypes (default: Not hardware reduced).
297 * All ACPICA hardware-related interfaces that use these macros will be
298 * configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag
301 * Note: This static build option for reduced hardware is intended to
302 * reduce ACPICA code size if desired or necessary. However, even if this
303 * option is not specified, the runtime behavior of ACPICA is dependent
304 * on the actual FADT reduced hardware flag (HW_REDUCED_ACPI). If set,
305 * the flag will enable similar behavior -- ACPICA will not attempt
306 * to access any ACPI-relate hardware (SCI, GPEs, Fixed Events, etc.)
308 #if (!ACPI_REDUCED_HARDWARE)
309 #define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \
310 ACPI_EXTERNAL_RETURN_STATUS(prototype)
312 #define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \
313 ACPI_EXTERNAL_RETURN_OK(prototype)
315 #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \
316 ACPI_EXTERNAL_RETURN_VOID(prototype)
319 #define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \
320 static ACPI_INLINE prototype {return(AE_NOT_CONFIGURED);}
322 #define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \
323 static ACPI_INLINE prototype {return(AE_OK);}
325 #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \
326 static ACPI_INLINE prototype {return;}
328 #endif /* !ACPI_REDUCED_HARDWARE */
331 * Error message prototypes (default: error messages enabled).
333 * All interfaces related to error and warning messages
334 * will be configured out of the ACPICA build if the
335 * ACPI_NO_ERROR_MESSAGE flag is defined.
337 #ifndef ACPI_NO_ERROR_MESSAGES
338 #define ACPI_MSG_DEPENDENT_RETURN_VOID(prototype) \
342 #define ACPI_MSG_DEPENDENT_RETURN_VOID(prototype) \
343 static ACPI_INLINE prototype {return;}
345 #endif /* ACPI_NO_ERROR_MESSAGES */
348 * Debugging output prototypes (default: no debug output).
350 * All interfaces related to debug output messages
351 * will be configured out of the ACPICA build unless the
352 * ACPI_DEBUG_OUTPUT flag is defined.
354 #ifdef ACPI_DEBUG_OUTPUT
355 #define ACPI_DBG_DEPENDENT_RETURN_VOID(prototype) \
359 #define ACPI_DBG_DEPENDENT_RETURN_VOID(prototype) \
360 static ACPI_INLINE prototype {return;}
362 #endif /* ACPI_DEBUG_OUTPUT */
365 * Application prototypes
367 * All interfaces used by application will be configured
368 * out of the ACPICA build unless the ACPI_APPLICATION
371 #ifdef ACPI_APPLICATION
372 #define ACPI_APP_DEPENDENT_RETURN_VOID(prototype) \
376 #define ACPI_APP_DEPENDENT_RETURN_VOID(prototype) \
377 static ACPI_INLINE prototype {return;}
379 #endif /* ACPI_APPLICATION */
382 * Debugger prototypes
384 * All interfaces used by debugger will be configured
385 * out of the ACPICA build unless the ACPI_DEBUGGER
389 #define ACPI_DBR_DEPENDENT_RETURN_OK(prototype) \
390 ACPI_EXTERNAL_RETURN_OK(prototype)
392 #define ACPI_DBR_DEPENDENT_RETURN_VOID(prototype) \
393 ACPI_EXTERNAL_RETURN_VOID(prototype)
396 #define ACPI_DBR_DEPENDENT_RETURN_OK(prototype) \
397 static ACPI_INLINE prototype {return(AE_OK);}
399 #define ACPI_DBR_DEPENDENT_RETURN_VOID(prototype) \
400 static ACPI_INLINE prototype {return;}
402 #endif /* ACPI_DEBUGGER */
404 /*****************************************************************************
406 * ACPICA public interface prototypes
408 ****************************************************************************/
413 ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
414 acpi_initialize_tables(struct acpi_table_desc
416 u32 initial_table_count
,
418 ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
419 acpi_initialize_subsystem(void))
420 ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
421 acpi_enable_subsystem(u32 flags
))
422 ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
423 acpi_initialize_objects(u32 flags
))
424 ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
425 acpi_terminate(void))
428 * Miscellaneous global interfaces
430 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_enable(void))
431 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_disable(void))
432 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
acpi_subsystem_status(void))
434 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
435 acpi_get_system_info(struct acpi_buffer
437 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
438 acpi_get_statistics(struct acpi_statistics
*stats
))
439 ACPI_EXTERNAL_RETURN_PTR(const char
440 *acpi_format_exception(acpi_status exception
))
441 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
acpi_purge_cached_objects(void))
443 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
444 acpi_install_interface(acpi_string interface_name
))
446 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
447 acpi_remove_interface(acpi_string interface_name
))
448 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
acpi_update_interfaces(u8 action
))
450 ACPI_EXTERNAL_RETURN_UINT32(u32
451 acpi_check_address_range(acpi_adr_space_type
453 acpi_physical_address
454 address
, acpi_size length
,
456 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
457 acpi_decode_pld_buffer(u8
*in_buffer
,
463 * ACPI table load/unload interfaces
465 ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
466 acpi_install_table(acpi_physical_address address
,
469 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
470 acpi_load_table(struct acpi_table_header
*table
))
472 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
473 acpi_unload_parent_table(acpi_handle object
))
475 ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
476 acpi_load_tables(void))
479 * ACPI table manipulation interfaces
481 ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
482 acpi_reallocate_root_table(void))
484 ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
485 acpi_find_root_pointer(acpi_physical_address
487 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
488 acpi_get_table_header(acpi_string signature
,
490 struct acpi_table_header
492 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
493 acpi_get_table(acpi_string signature
, u32 instance
,
494 struct acpi_table_header
496 ACPI_EXTERNAL_RETURN_VOID(void acpi_put_table(struct acpi_table_header
*table
))
498 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
499 acpi_get_table_by_index(u32 table_index
,
500 struct acpi_table_header
502 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
503 acpi_install_table_handler(acpi_table_handler
504 handler
, void *context
))
505 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
506 acpi_remove_table_handler(acpi_table_handler
510 * Namespace and name interfaces
512 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
513 acpi_walk_namespace(acpi_object_type type
,
514 acpi_handle start_object
,
521 void **return_value
))
522 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
523 acpi_get_devices(const char *HID
,
524 acpi_walk_callback user_function
,
526 void **return_value
))
527 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
528 acpi_get_name(acpi_handle object
, u32 name_type
,
529 struct acpi_buffer
*ret_path_ptr
))
530 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
531 acpi_get_handle(acpi_handle parent
,
532 acpi_string pathname
,
533 acpi_handle
*ret_handle
))
534 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
535 acpi_attach_data(acpi_handle object
,
536 acpi_object_handler handler
,
538 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
539 acpi_detach_data(acpi_handle object
,
540 acpi_object_handler handler
))
541 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
542 acpi_get_data(acpi_handle object
,
543 acpi_object_handler handler
,
545 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
546 acpi_debug_trace(const char *name
, u32 debug_level
,
547 u32 debug_layer
, u32 flags
))
550 * Object manipulation and enumeration
552 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
553 acpi_evaluate_object(acpi_handle object
,
554 acpi_string pathname
,
555 struct acpi_object_list
558 *return_object_buffer
))
559 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
560 acpi_evaluate_object_typed(acpi_handle object
,
561 acpi_string pathname
,
562 struct acpi_object_list
568 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
569 acpi_get_object_info(acpi_handle object
,
570 struct acpi_device_info
572 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
acpi_install_method(u8
*buffer
))
574 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
575 acpi_get_next_object(acpi_object_type type
,
578 acpi_handle
*out_handle
))
580 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
581 acpi_get_type(acpi_handle object
,
582 acpi_object_type
*out_type
))
584 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
585 acpi_get_parent(acpi_handle object
,
586 acpi_handle
*out_handle
))
591 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
592 acpi_install_initialization_handler
593 (acpi_init_handler handler
, u32 function
))
594 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
595 acpi_install_sci_handler(acpi_sci_handler
598 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
599 acpi_remove_sci_handler(acpi_sci_handler
601 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
602 acpi_install_global_event_handler
603 (acpi_gbl_event_handler handler
,
605 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
606 acpi_install_fixed_event_handler(u32
612 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
613 acpi_remove_fixed_event_handler(u32 acpi_event
,
616 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
617 acpi_install_gpe_handler(acpi_handle
624 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
625 acpi_install_gpe_raw_handler(acpi_handle
632 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
633 acpi_remove_gpe_handler(acpi_handle gpe_device
,
637 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
638 acpi_install_notify_handler(acpi_handle device
,
643 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
644 acpi_remove_notify_handler(acpi_handle device
,
648 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
649 acpi_install_address_space_handler(acpi_handle
653 acpi_adr_space_handler
658 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
659 acpi_remove_address_space_handler(acpi_handle
663 acpi_adr_space_handler
665 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
666 acpi_install_exception_handler
667 (acpi_exception_handler handler
))
668 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
669 acpi_install_interface_handler
670 (acpi_interface_handler handler
))
673 * Global Lock interfaces
675 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
676 acpi_acquire_global_lock(u16 timeout
,
679 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
680 acpi_release_global_lock(u32 handle
))
683 * Interfaces to AML mutex objects
685 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
686 acpi_acquire_mutex(acpi_handle handle
,
687 acpi_string pathname
,
690 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
691 acpi_release_mutex(acpi_handle handle
,
692 acpi_string pathname
))
695 * Fixed Event interfaces
697 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
698 acpi_enable_event(u32 event
, u32 flags
))
700 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
701 acpi_disable_event(u32 event
, u32 flags
))
702 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_clear_event(u32 event
))
704 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
705 acpi_get_event_status(u32 event
,
710 * General Purpose Event (GPE) Interfaces
712 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_update_all_gpes(void))
714 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
715 acpi_enable_gpe(acpi_handle gpe_device
,
718 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
719 acpi_disable_gpe(acpi_handle gpe_device
,
722 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
723 acpi_clear_gpe(acpi_handle gpe_device
,
726 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
727 acpi_set_gpe(acpi_handle gpe_device
,
728 u32 gpe_number
, u8 action
))
730 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
731 acpi_finish_gpe(acpi_handle gpe_device
,
734 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
735 acpi_mask_gpe(acpi_handle gpe_device
,
736 u32 gpe_number
, u8 is_masked
))
738 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
739 acpi_mark_gpe_for_wake(acpi_handle gpe_device
,
742 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
743 acpi_setup_gpe_for_wake(acpi_handle
745 acpi_handle gpe_device
,
747 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
748 acpi_set_gpe_wake_mask(acpi_handle gpe_device
,
751 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
752 acpi_get_gpe_status(acpi_handle gpe_device
,
756 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_disable_all_gpes(void))
757 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_enable_all_runtime_gpes(void))
758 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_enable_all_wakeup_gpes(void))
760 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
761 acpi_get_gpe_device(u32 gpe_index
,
762 acpi_handle
*gpe_device
))
764 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
765 acpi_install_gpe_block(acpi_handle gpe_device
,
770 u32 interrupt_number
))
771 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
772 acpi_remove_gpe_block(acpi_handle gpe_device
))
775 * Resource interfaces
778 acpi_status (*acpi_walk_resource_callback
) (struct acpi_resource
* resource
,
781 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
782 acpi_get_vendor_resource(acpi_handle device
,
784 struct acpi_vendor_uuid
788 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
789 acpi_get_current_resources(acpi_handle device
,
792 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
793 acpi_get_possible_resources(acpi_handle device
,
796 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
797 acpi_get_event_resources(acpi_handle device_handle
,
800 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
801 acpi_walk_resource_buffer(struct acpi_buffer
803 acpi_walk_resource_callback
806 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
807 acpi_walk_resources(acpi_handle device
, char *name
,
808 acpi_walk_resource_callback
809 user_function
, void *context
))
810 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
811 acpi_set_current_resources(acpi_handle device
,
814 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
815 acpi_get_irq_routing_table(acpi_handle device
,
818 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
819 acpi_resource_to_address64(struct acpi_resource
822 acpi_resource_address64
824 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
825 acpi_buffer_to_resource(u8
*aml_buffer
,
826 u16 aml_buffer_length
,
831 * Hardware (ACPI device) interfaces
833 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
acpi_reset(void))
835 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
836 acpi_read(u64
*value
,
837 struct acpi_generic_address
*reg
))
839 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
840 acpi_write(u64 value
,
841 struct acpi_generic_address
*reg
))
843 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
844 acpi_read_bit_register(u32 register_id
,
847 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
848 acpi_write_bit_register(u32 register_id
,
852 * Sleep/Wake interfaces
854 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
855 acpi_get_sleep_type_data(u8 sleep_state
,
859 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
860 acpi_enter_sleep_state_prep(u8 sleep_state
))
861 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
acpi_enter_sleep_state(u8 sleep_state
))
863 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_enter_sleep_state_s4bios(void))
865 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
866 acpi_leave_sleep_state_prep(u8 sleep_state
))
867 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
acpi_leave_sleep_state(u8 sleep_state
))
869 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
870 acpi_set_firmware_waking_vector
871 (acpi_physical_address physical_address
,
872 acpi_physical_address physical_address64
))
874 * ACPI Timer interfaces
876 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
877 acpi_get_timer_resolution(u32
*resolution
))
878 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_get_timer(u32
*ticks
))
880 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
881 acpi_get_timer_duration(u32 start_ticks
,
886 * Error/Warning output
888 ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
889 void ACPI_INTERNAL_VAR_XFACE
890 acpi_error(const char *module_name
,
892 const char *format
, ...))
893 ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(4)
894 void ACPI_INTERNAL_VAR_XFACE
895 acpi_exception(const char *module_name
,
898 const char *format
, ...))
899 ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
900 void ACPI_INTERNAL_VAR_XFACE
901 acpi_warning(const char *module_name
,
903 const char *format
, ...))
904 ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(1)
905 void ACPI_INTERNAL_VAR_XFACE
906 acpi_info(const char *format
, ...))
907 ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
908 void ACPI_INTERNAL_VAR_XFACE
909 acpi_bios_error(const char *module_name
,
911 const char *format
, ...))
912 ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
913 void ACPI_INTERNAL_VAR_XFACE
914 acpi_bios_warning(const char *module_name
,
916 const char *format
, ...))
921 ACPI_DBG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(6)
922 void ACPI_INTERNAL_VAR_XFACE
923 acpi_debug_print(u32 requested_debug_level
,
925 const char *function_name
,
926 const char *module_name
,
928 const char *format
, ...))
929 ACPI_DBG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(6)
930 void ACPI_INTERNAL_VAR_XFACE
931 acpi_debug_print_raw(u32 requested_debug_level
,
933 const char *function_name
,
934 const char *module_name
,
936 const char *format
, ...))
938 ACPI_DBG_DEPENDENT_RETURN_VOID(void
939 acpi_trace_point(acpi_trace_event_type type
,
941 u8
*aml
, char *pathname
))
943 acpi_status
acpi_initialize_debugger(void);
945 void acpi_terminate_debugger(void);
950 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
951 acpi_get_data_full(acpi_handle object
,
952 acpi_object_handler handler
,
954 void (*callback
)(void *)))
956 void acpi_run_debugger(char *batch_buffer
);
958 void acpi_set_debugger_thread_id(acpi_thread_id thread_id
);
960 #endif /* __ACXFACE_H__ */