|
ReactOS 0.4.17-dev-1190-g4c812f4
|
#include <uacpi/internal/event.h>#include <uacpi/internal/registers.h>#include <uacpi/internal/context.h>#include <uacpi/internal/io.h>#include <uacpi/internal/log.h>#include <uacpi/internal/namespace.h>#include <uacpi/internal/interpreter.h>#include <uacpi/internal/notify.h>#include <uacpi/internal/utilities.h>#include <uacpi/internal/mutex.h>#include <uacpi/internal/stdlib.h>#include <uacpi/platform/atomic.h>#include <uacpi/acpi.h>
Go to the source code of this file.
Classes | |
| struct | fixed_event |
| struct | fixed_event_handler |
| struct | gpe_native_handler |
| struct | gpe_implicit_notify_handler |
| struct | gp_event |
| struct | gpe_register |
| struct | gpe_block |
| struct | gpe_interrupt_ctx |
| struct | gpe_match_ctx |
| struct | gpe_search_ctx |
| struct | do_for_all_gpes_ctx |
Macros | |
| #define | UACPI_EVENT_DISABLED 0 |
| #define | UACPI_EVENT_ENABLED 1 |
| #define | EVENTS_PER_GPE_REGISTER 8 |
| #define | PM1_STATUS_BITS |
Typedefs | |
| typedef uacpi_iteration_decision(* | gpe_block_iteration_callback) (struct gpe_block *, uacpi_handle) |
Variables | |
| static uacpi_handle | g_gpe_state_slock |
| static struct uacpi_recursive_lock | g_event_lock |
| static struct uacpi_recursive_lock | g_event_config_lock |
| static uacpi_bool | g_gpes_finalized |
| static const struct fixed_event | fixed_events [UACPI_FIXED_EVENT_MAX+1] |
| static struct fixed_event_handler | fixed_event_handlers [UACPI_FIXED_EVENT_MAX+1] |
| static uacpi_handle | g_fixed_event_slock |
| static struct gpe_interrupt_ctx * | g_gpe_interrupt_head |
| #define PM1_STATUS_BITS |
| typedef uacpi_iteration_decision(* gpe_block_iteration_callback) (struct gpe_block *, uacpi_handle) |
| Enumerator | |
|---|---|
| EVENT_CLEAR_IF_FIRST_YES | |
| EVENT_CLEAR_IF_FIRST_NO | |
| Enumerator | |
|---|---|
| GPE_BLOCK_ACTION_DISABLE_ALL | |
| GPE_BLOCK_ACTION_ENABLE_ALL_FOR_RUNTIME | |
| GPE_BLOCK_ACTION_ENABLE_ALL_FOR_WAKE | |
| GPE_BLOCK_ACTION_CLEAR_ALL | |
| Enumerator | |
|---|---|
| GPE_DISPATCHER_INTERRUPT | |
| GPE_DISPATCHER_POLL | |
Definition at line 747 of file event.c.
| Enumerator | |
|---|---|
| GPE_HANDLER_TYPE_NONE | |
| GPE_HANDLER_TYPE_AML_HANDLER | |
| GPE_HANDLER_TYPE_NATIVE_HANDLER | |
| GPE_HANDLER_TYPE_NATIVE_HANDLER_RAW | |
| GPE_HANDLER_TYPE_IMPLICIT_NOTIFY | |
Definition at line 380 of file event.c.
| Enumerator | |
|---|---|
| GPE_STATE_ENABLED | |
| GPE_STATE_ENABLED_CONDITIONALLY | |
| GPE_STATE_DISABLED | |
|
static |
Definition at line 642 of file event.c.
Referenced by async_run_gpe_handler().
|
static |
Definition at line 660 of file event.c.
Referenced by dispatch_gpe().
|
static |
Definition at line 569 of file event.c.
Referenced by dispatch_gpe(), gpe_add_user(), restore_gpe_unlocked(), and uacpi_clear_gpe().
|
static |
Definition at line 1610 of file event.c.
Referenced by initialize_gpes(), and uacpi_install_gpe_block().
|
static |
Definition at line 953 of file event.c.
Referenced by handle_gpes(), and uacpi_finalize_gpe_initialization().
|
static |
Definition at line 283 of file event.c.
Referenced by handle_fixed_events().
|
static |
Definition at line 827 of file event.c.
Referenced by detect_gpes(), and maybe_dispatch_gpe().
|
static |
Definition at line 1766 of file event.c.
Referenced by get_gpe(), and uacpi_uninstall_gpe_block().
|
static |
Definition at line 2804 of file event.c.
Referenced by for_all_gpes_locked(), and uacpi_clear_all_events().
|
static |
Definition at line 2100 of file event.c.
Referenced by uacpi_finalize_gpe_initialization().
|
static |
Definition at line 2207 of file event.c.
Referenced by uacpi_install_gpe_handler(), and uacpi_install_gpe_handler_raw().
|
static |
Definition at line 1477 of file event.c.
Referenced by create_gpe_block(), and uacpi_events_match_post_dynamic_table_load().
|
static |
Definition at line 45 of file event.c.
Referenced by do_install_gpe_handler(), gpe_get_mask_unmask(), uacpi_deinitialize_events(), uacpi_install_fixed_event_handler(), uacpi_install_gpe_block(), uacpi_setup_gpe_for_wake(), uacpi_uninstall_fixed_event_handler(), uacpi_uninstall_gpe_block(), and uacpi_uninstall_gpe_handler().
Definition at line 60 of file event.c.
Referenced by do_install_gpe_handler(), gpe_get_mask_unmask(), uacpi_deinitialize_events(), uacpi_install_fixed_event_handler(), uacpi_install_gpe_block(), uacpi_setup_gpe_for_wake(), uacpi_uninstall_fixed_event_handler(), uacpi_uninstall_gpe_block(), and uacpi_uninstall_gpe_handler().
|
static |
Definition at line 1037 of file event.c.
Referenced by create_gpe_block(), and uacpi_initialize_events().
|
static |
Definition at line 2817 of file event.c.
Referenced by uacpi_disable_all_gpes(), uacpi_enable_all_runtime_gpes(), and uacpi_enable_all_wake_gpes().
|
static |
Definition at line 1736 of file event.c.
Referenced by for_all_gpes_locked(), get_gpe(), uacpi_clear_all_events(), uacpi_finalize_gpe_initialization(), and uacpi_uninstall_gpe_block().
Definition at line 1223 of file event.c.
Referenced by create_gpe_block(), and uninstall_gpe_block().
|
static |
Definition at line 1783 of file event.c.
Referenced by sanitize_device_and_find_gpe(), and uacpi_install_gpe_block().
|
static |
Definition at line 1796 of file event.c.
Referenced by gpe_add_user(), and gpe_remove_user_unlocked().
|
static |
Definition at line 1851 of file event.c.
Referenced by do_initialize_gpe_block(), uacpi_enable_gpe(), and uacpi_uninstall_gpe_handler().
|
static |
Definition at line 1159 of file event.c.
Referenced by do_for_all_gpes().
Definition at line 1436 of file event.c.
Referenced by do_install_gpe_handler(), and uacpi_uninstall_gpe_handler().
|
static |
Definition at line 2746 of file event.c.
Referenced by uacpi_disable_gpe_for_wake(), and uacpi_enable_gpe_for_wake().
|
static |
Definition at line 1125 of file event.c.
Referenced by do_match_gpe_methods(), and uacpi_setup_gpe_for_wake().
Definition at line 1388 of file event.c.
Referenced by do_find_gpe(), and do_match_gpe_methods().
Definition at line 506 of file event.c.
Referenced by clear_gpe(), gp_event_toggle_masks(), gpe_enable_disable_for_wake(), gpe_is_armed(), gpe_mask_and_flush(), gpe_mask_safe(), gpe_mask_unmask(), gpe_try_claim(), maybe_dispatch_gpe(), set_gpe_state_unlocked(), and uacpi_gpe_info().
|
static |
Definition at line 2551 of file event.c.
Referenced by uacpi_mask_gpe(), and uacpi_unmask_gpe().
|
static |
|
static |
Definition at line 1923 of file event.c.
Referenced by gpe_mask_safe(), and gpe_mask_unmask().
|
static |
Definition at line 2048 of file event.c.
Referenced by do_install_gpe_handler(), uacpi_setup_gpe_for_wake(), and uacpi_uninstall_gpe_handler().
|
static |
Definition at line 1984 of file event.c.
Referenced by do_install_gpe_handler(), gpe_get_mask_unmask(), gpe_mask_safe(), gpe_mask_unmask(), uacpi_setup_gpe_for_wake(), and uacpi_uninstall_gpe_handler().
|
static |
Definition at line 1909 of file event.c.
Referenced by do_initialize_gpe_block(), uacpi_enable_gpe(), and uacpi_uninstall_gpe_handler().
Definition at line 1137 of file event.c.
Referenced by free_gpe_block(), and gpe_set_aml_handler().
|
static |
Definition at line 1834 of file event.c.
Referenced by do_install_gpe_handler().
|
static |
Definition at line 1814 of file event.c.
Referenced by gpe_remove_user(), uacpi_disable_gpe(), and uacpi_setup_gpe_for_wake().
|
static |
Definition at line 1453 of file event.c.
Referenced by do_match_gpe_methods().
|
static |
Definition at line 1413 of file event.c.
Referenced by do_install_gpe_handler(), gpe_set_aml_handler(), uacpi_setup_gpe_for_wake(), and uacpi_uninstall_gpe_handler().
|
static |
Definition at line 2486 of file event.c.
Referenced by uacpi_resume_gpe(), and uacpi_suspend_gpe().
|
static |
Definition at line 770 of file event.c.
Referenced by dispatch_gpe().
Definition at line 633 of file event.c.
Referenced by async_restore_gpe(), and dispatch_gpe().
|
static |
Definition at line 323 of file event.c.
Referenced by handle_sci().
|
static |
Definition at line 2990 of file event.c.
Referenced by uacpi_initialize_events().
|
static |
Definition at line 1027 of file event.c.
Referenced by find_or_create_gpe_interrupt_ctx(), handle_sci(), and unlink_gpe_interrupt_ctx().
|
static |
Definition at line 3017 of file event.c.
Referenced by uacpi_deinitialize_events(), and uacpi_initialize_events().
|
static |
Definition at line 140 of file event.c.
Referenced by uacpi_initialize_events_early().
|
static |
Definition at line 2860 of file event.c.
Referenced by uacpi_initialize_events().
|
static |
Definition at line 1008 of file event.c.
Referenced by uacpi_enable_gpe(), and uacpi_uninstall_gpe_handler().
|
static |
Definition at line 621 of file event.c.
Referenced by async_restore_gpe(), and dispatch_gpe().
|
static |
Definition at line 598 of file event.c.
Referenced by restore_gpe(), and uacpi_finish_handling_gpe().
|
static |
Definition at line 2189 of file event.c.
Referenced by do_install_gpe_handler(), gpe_enable_disable_for_wake(), gpe_get_mask_unmask(), gpe_suspend_resume(), uacpi_clear_gpe(), uacpi_disable_gpe(), uacpi_enable_gpe(), uacpi_finish_handling_gpe(), uacpi_gpe_info(), uacpi_setup_gpe_for_wake(), and uacpi_uninstall_gpe_handler().
|
static |
Definition at line 153 of file event.c.
Referenced by fire_event(), queue_add_timer(), queue_move_timer(), uacpi_disable_fixed_event(), uacpi_enable_fixed_event(), uacpi_events_restore_buttons_post_wake(), uacpi_install_fixed_event_handler(), and uacpi_uninstall_fixed_event_handler().
|
static |
|
static |
Definition at line 518 of file event.c.
Referenced by dispatch_gpe(), gpe_add_user(), gpe_mask_unmask(), gpe_remove_user_unlocked(), gpe_suspend_resume(), restore_gpe_unlocked(), and set_gpe_state().
| uacpi_status uacpi_clear_all_events | ( | void | ) |
Definition at line 3391 of file event.c.
Referenced by enter_sleep_state_hw_full().
| uacpi_status uacpi_clear_fixed_event | ( | uacpi_fixed_event | event | ) |
| uacpi_status uacpi_clear_gpe | ( | uacpi_namespace_node * | gpe_device, |
| uacpi_u16 | idx | ||
| ) |
Definition at line 3120 of file event.c.
Referenced by uacpi_state_reset().
| uacpi_status uacpi_disable_all_gpes | ( | void | ) |
Definition at line 2836 of file event.c.
Referenced by enter_sleep_state_hw_full(), and wake_from_sleep_state_hw_full().
| uacpi_status uacpi_disable_fixed_event | ( | uacpi_fixed_event | event | ) |
| uacpi_status uacpi_disable_gpe | ( | uacpi_namespace_node * | gpe_device, |
| uacpi_u16 | idx | ||
| ) |
| uacpi_status uacpi_disable_gpe_for_wake | ( | uacpi_namespace_node * | gpe_device, |
| uacpi_u16 | idx | ||
| ) |
Definition at line 2792 of file event.c.
| uacpi_status uacpi_enable_all_runtime_gpes | ( | void | ) |
Definition at line 2844 of file event.c.
Referenced by wake_from_sleep_state_hw_full().
| uacpi_status uacpi_enable_all_wake_gpes | ( | void | ) |
Definition at line 2852 of file event.c.
Referenced by enter_sleep_state_hw_full().
| uacpi_status uacpi_enable_fixed_event | ( | uacpi_fixed_event | event | ) |
Definition at line 178 of file event.c.
| uacpi_status uacpi_enable_gpe | ( | uacpi_namespace_node * | gpe_device, |
| uacpi_u16 | idx | ||
| ) |
Definition at line 2392 of file event.c.
| uacpi_status uacpi_enable_gpe_for_wake | ( | uacpi_namespace_node * | gpe_device, |
| uacpi_u16 | idx | ||
| ) |
Definition at line 1567 of file event.c.
Referenced by do_load_table(), handle_load(), and handle_load_table().
Definition at line 243 of file event.c.
Referenced by wake_from_sleep_state_hw_full().
| uacpi_status uacpi_finalize_gpe_initialization | ( | void | ) |
Definition at line 2154 of file event.c.
| uacpi_status uacpi_finish_handling_gpe | ( | uacpi_namespace_node * | gpe_device, |
| uacpi_u16 | idx | ||
| ) |
| uacpi_status uacpi_fixed_event_info | ( | uacpi_fixed_event | event, |
| uacpi_event_info * | out_info | ||
| ) |
Definition at line 3284 of file event.c.
| uacpi_status uacpi_gpe_info | ( | uacpi_namespace_node * | gpe_device, |
| uacpi_u16 | idx, | ||
| uacpi_event_info * | out_info | ||
| ) |
Definition at line 3326 of file event.c.
| const uacpi_char * uacpi_gpe_triggering_to_string | ( | uacpi_gpe_triggering | triggering | ) |
Definition at line 1889 of file event.c.
Referenced by do_install_gpe_handler().
| uacpi_status uacpi_initialize_events | ( | void | ) |
Definition at line 3057 of file event.c.
Referenced by uacpi_namespace_load().
| uacpi_status uacpi_initialize_events_early | ( | void | ) |
Definition at line 3027 of file event.c.
Referenced by uacpi_initialize().
| uacpi_status uacpi_install_fixed_event_handler | ( | uacpi_fixed_event | event, |
| uacpi_interrupt_handler | handler, | ||
| uacpi_handle | user | ||
| ) |
Definition at line 3193 of file event.c.
Referenced by uacpi_initialize_events().
| uacpi_status uacpi_install_gpe_block | ( | uacpi_namespace_node * | gpe_device, |
| uacpi_u64 | address, | ||
| uacpi_address_space | address_space, | ||
| uacpi_u16 | num_registers, | ||
| uacpi_u32 | irq | ||
| ) |
Definition at line 2914 of file event.c.
| uacpi_status uacpi_install_gpe_handler | ( | uacpi_namespace_node * | gpe_device, |
| uacpi_u16 | idx, | ||
| uacpi_gpe_triggering | triggering, | ||
| uacpi_gpe_handler | handler, | ||
| uacpi_handle | ctx | ||
| ) |
Definition at line 2290 of file event.c.
| uacpi_status uacpi_install_gpe_handler_raw | ( | uacpi_namespace_node * | gpe_device, |
| uacpi_u16 | idx, | ||
| uacpi_gpe_triggering | triggering, | ||
| uacpi_gpe_handler | handler, | ||
| uacpi_handle | ctx | ||
| ) |
| uacpi_status uacpi_mask_gpe | ( | uacpi_namespace_node * | gpe_device, |
| uacpi_u16 | idx | ||
| ) |
Definition at line 2578 of file event.c.
| uacpi_status uacpi_resume_gpe | ( | uacpi_namespace_node * | gpe_device, |
| uacpi_u16 | idx | ||
| ) |
Definition at line 2519 of file event.c.
| uacpi_status uacpi_setup_gpe_for_wake | ( | uacpi_namespace_node * | gpe_device, |
| uacpi_u16 | idx, | ||
| uacpi_namespace_node * | wake_device | ||
| ) |
Definition at line 2592 of file event.c.
| uacpi_status uacpi_suspend_gpe | ( | uacpi_namespace_node * | gpe_device, |
| uacpi_u16 | idx | ||
| ) |
| uacpi_status uacpi_uninstall_fixed_event_handler | ( | uacpi_fixed_event | event | ) |
Definition at line 3237 of file event.c.
Referenced by uacpi_deinitialize_events(), and uacpi_initialize_events().
| uacpi_status uacpi_uninstall_gpe_block | ( | uacpi_namespace_node * | gpe_device | ) |
Definition at line 2951 of file event.c.
| uacpi_status uacpi_uninstall_gpe_handler | ( | uacpi_namespace_node * | gpe_device, |
| uacpi_u16 | idx, | ||
| uacpi_gpe_handler | handler | ||
| ) |
Definition at line 2314 of file event.c.
| uacpi_status uacpi_unmask_gpe | ( | uacpi_namespace_node * | gpe_device, |
| uacpi_u16 | idx | ||
| ) |
Definition at line 1296 of file event.c.
Referenced by uacpi_deinitialize_events(), and uacpi_uninstall_gpe_block().
|
static |
Definition at line 1090 of file event.c.
Referenced by uacpi_deinitialize_events(), and uninstall_gpe_block().
Definition at line 76 of file event.c.
Referenced by gpe_mask_and_flush(), uacpi_uninstall_fixed_event_handler(), and uninstall_gpe_block().
|
static |
Definition at line 129 of file event.c.
Referenced by dispatch_fixed_event(), uacpi_deinitialize_events(), uacpi_enable_fixed_event(), uacpi_events_restore_buttons_post_wake(), uacpi_fixed_event_info(), uacpi_install_fixed_event_handler(), and uacpi_uninstall_fixed_event_handler().
|
static |
Definition at line 95 of file event.c.
Referenced by handle_fixed_events(), initialize_fixed_events(), set_event(), uacpi_clear_fixed_event(), uacpi_events_restore_buttons_post_wake(), and uacpi_fixed_event_info().
|
static |
Definition at line 42 of file event.c.
Referenced by event_config_lock(), event_config_unlock(), uacpi_deinitialize_events(), and uacpi_initialize_events_early().
|
static |
Definition at line 30 of file event.c.
Referenced by event_config_lock(), event_config_unlock(), for_all_gpes_locked(), uacpi_clear_all_events(), uacpi_deinitialize_events(), uacpi_enable_gpe(), uacpi_events_match_post_dynamic_table_load(), uacpi_finalize_gpe_initialization(), uacpi_initialize_events_early(), unlink_gpe_interrupt_ctx(), and wait_for_work_completion_unlocked().
|
static |
Definition at line 138 of file event.c.
Referenced by dispatch_fixed_event(), uacpi_deinitialize_events(), uacpi_disable_fixed_event(), uacpi_enable_fixed_event(), uacpi_events_restore_buttons_post_wake(), uacpi_fixed_event_info(), uacpi_initialize_events_early(), uacpi_install_fixed_event_handler(), and uacpi_uninstall_fixed_event_handler().
|
static |
Definition at line 504 of file event.c.
Referenced by find_or_create_gpe_interrupt_ctx(), for_each_gpe_block(), uacpi_deinitialize_events(), uacpi_events_match_post_dynamic_table_load(), uacpi_finalize_gpe_initialization(), and unlink_gpe_interrupt_ctx().
|
static |
Definition at line 29 of file event.c.
Referenced by create_gpe_block(), detect_gpes(), dispatch_gpe(), do_initialize_gpe_block(), find_or_create_gpe_interrupt_ctx(), gpe_add_user(), gpe_block_apply_action(), gpe_disarm(), gpe_drop_claim(), gpe_enable_disable_for_wake(), gpe_is_armed(), gpe_mask_and_flush(), gpe_mask_safe(), gpe_mask_unmask(), gpe_remove_user(), gpe_set_handler(), gpe_suspend_resume(), gpe_try_claim(), gpe_work_done(), restore_gpe(), set_gpe_state(), uacpi_clear_gpe(), uacpi_deinitialize_events(), uacpi_disable_gpe(), uacpi_finish_handling_gpe(), uacpi_gpe_info(), uacpi_initialize_events_early(), uacpi_setup_gpe_for_wake(), uninstall_gpe_block(), and unlink_gpe_interrupt_ctx().
|
static |
Definition at line 43 of file event.c.
Referenced by create_gpe_block(), uacpi_deinitialize_events(), and uacpi_finalize_gpe_initialization().