|
ReactOS 0.4.17-dev-1268-g5608ce5
|


Go to the source code of this file.
Macros | |
| #define | UACPI_GPE_REENABLE (1 << 7) |
Typedefs | |
| typedef enum uacpi_fixed_event | uacpi_fixed_event |
| typedef uacpi_interrupt_ret(* | uacpi_gpe_handler) (uacpi_handle ctx, uacpi_namespace_node *gpe_device, uacpi_u16 idx) |
| typedef enum uacpi_gpe_triggering | uacpi_gpe_triggering |
Enumerations | |
| enum | uacpi_fixed_event { UACPI_FIXED_EVENT_TIMER_STATUS = 1 , UACPI_FIXED_EVENT_POWER_BUTTON , UACPI_FIXED_EVENT_SLEEP_BUTTON , UACPI_FIXED_EVENT_RTC , UACPI_FIXED_EVENT_MAX = UACPI_FIXED_EVENT_RTC } |
| enum | uacpi_gpe_triggering { UACPI_GPE_TRIGGERING_LEVEL = 0 , UACPI_GPE_TRIGGERING_EDGE = 1 , UACPI_GPE_TRIGGERING_MAX = UACPI_GPE_TRIGGERING_EDGE } |
| typedef enum uacpi_fixed_event uacpi_fixed_event |
| typedef uacpi_interrupt_ret(* uacpi_gpe_handler) (uacpi_handle ctx, uacpi_namespace_node *gpe_device, uacpi_u16 idx) |
| Enumerator | |
|---|---|
| UACPI_FIXED_EVENT_TIMER_STATUS | |
| UACPI_FIXED_EVENT_POWER_BUTTON | |
| UACPI_FIXED_EVENT_SLEEP_BUTTON | |
| UACPI_FIXED_EVENT_RTC | |
| UACPI_FIXED_EVENT_MAX | |
| Enumerator | |
|---|---|
| UACPI_GPE_TRIGGERING_LEVEL | |
| UACPI_GPE_TRIGGERING_EDGE | |
| UACPI_GPE_TRIGGERING_MAX | |
Definition at line 116 of file event.h.
| uacpi_u16 uacpi_gpe_triggering uacpi_gpe_handler uacpi_handle ctx uacpi_u16 uacpi_namespace_node *wake_device uacpi_u16 idx uacpi_u16 idx uacpi_u16 idx uacpi_u16 idx uacpi_u16 idx UACPI_ALWAYS_ERROR_FOR_REDUCED_HARDWARE | ( | uacpi_status | uacpi_unmask_gpe uacpi_namespace_node *gpe_device, uacpi_u16 idx | ) |
Mark a GPE managed by 'gpe_device' as enabled/disabled for wake. The GPE must have previously been marked by calling uacpi_gpe_setup_for_wake. This function only affects the GPE enable register state following the call to uacpi_gpe_enable_all_for_wake.
NOTE:
Disable a general purpose event managed by 'gpe_device'. This drops a reference taken by uacpi_enable_gpe: the event is only disabled once it has none left.
NOTE:
NOTE:
Suspend/resume a general purpose event managed by 'gpe_device'. This bypasses the reference counting mechanism and unconditionally clears/sets the corresponding bit in the enable registers. This is used for switching the GPE to poll mode.
NOTE:
Finish handling the GPE managed by 'gpe_device' at 'idx'. This clears the status registers if it hasn't been cleared yet and re-enables the event if it was enabled before.
NOTE:
Calls to enable/disable as well as suspend/resume still keep track of what the event is supposed to be like while it's masked, which is what decides whether it gets enabled once it's unmasked.
Note that the mask only applies while the system is running: an event that is enabled for wake is still going to be enabled by uacpi_enable_all_wake_gpes even if it's masked.
NOTE:
Disable all GPEs currently set up on the system. Enable all GPEs not marked as wake. This is only needed after the system wakes from a shallow sleep state and is called automatically by wake code. Enable all GPEs marked as wake. This is only needed before the system goes to sleep is called automatically by sleep code. Install/uninstall a new GPE block, usually defined by a device in the namespace with a _HID of ACPI0006.
NOTE:
| uacpi_u16 uacpi_gpe_triggering uacpi_gpe_handler uacpi_handle ctx uacpi_u16 uacpi_namespace_node *wake_device uacpi_u16 idx UACPI_ALWAYS_ERROR_FOR_REDUCED_HARDWARE | ( | uacpi_status | uacpi_finalize_gpe_initializationvoid | ) |
Finalize GPE initialization by enabling all GPEs not configured for wake and having a matching AML handler detected.
This should be called after the kernel power managment subsystem has enumerated all of the devices, executing their _PRW methods etc., and marking those it wishes to use for wake by calling uacpi_setup_gpe_for_wake or uacpi_mark_gpe_for_wake.
This only affects the GPE blocks that haven't been finalized yet, so it's safe, and in fact required, to call this again after installing a new GPE block via uacpi_install_gpe_block. Enable a general purpose event managed by 'gpe_device'. Internally this uses reference counting to make sure a GPE is not disabled until all possible users of it do so. GPEs not marked for wake are enabled automatically so this API is only needed for wake events or those that don't have a corresponding AML handler.
Some hardware doesn't raise an interrupt for an edge triggered event that is already pending by the time it's enabled, so such an event is dispatched right away instead, unless it has a raw handler, see uacpi_install_gpe_handler_raw.
NOTE: 'gpe_device' may be null for GPEs managed by _GPE
| UACPI_ALWAYS_ERROR_FOR_REDUCED_HARDWARE | ( | uacpi_status | uacpi_fixed_event_info uacpi_fixed_event event, uacpi_event_info *out_info | ) |
Returns the state of a fixed event.
NOTE: may be called from an interrupt context, including the handler of the event itself. Returns the state of the GPE at 'idx' managed by 'gpe_device'.
NOTE:
| UACPI_ALWAYS_ERROR_FOR_REDUCED_HARDWARE | ( | uacpi_status | uacpi_install_fixed_event_handler uacpi_fixed_event event, uacpi_interrupt_handler handler, uacpi_handle user | ) |
Install/uninstall a handler for a fixed event. The handler is invoked in an interrupt context every time that the event fires.
NOTE: neither of these may be called from an interrupt handler, nor from deferred work (see uacpi_kernel_schedule_work), which includes notify handlers, as they might have to wait for both of those to complete. The same goes for an address space handler, and for whoever is holding the global lock. Enable/disable a fixed event. Note that the event is automatically enabled upon installing a handler to it.
NOTE: both may be called from an interrupt context, including the handler of the event itself. Clear the status bit of a fixed event.
NOTE: may be called from an interrupt context, including the handler of the event itself.
Definition at line 30 of file event.h.
| UACPI_ALWAYS_ERROR_FOR_REDUCED_HARDWARE | ( | 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 | ) |
Installs a handler to the provided GPE at 'idx' controlled by device 'gpe_device'. The GPE is automatically disabled & cleared according to the configured triggering upon invoking the handler. The event is optionally re-enabled (by returning UACPI_GPE_REENABLE from the handler)
NOTE:
The handler is in charge of the event from that point on: it's expected to clear its status via uacpi_clear_gpe, and to keep it from firing when needed via uacpi_suspend_gpe & uacpi_resume_gpe, both of which may be called by the handler itself. The event still has to be enabled via uacpi_enable_gpe in order to fire to begin with.
The event is not polled by uACPI when it's enabled, so the caller is expected to do that themselves after enabling or resuming it, by checking for UACPI_EVENT_INFO_HW_STATUS via uacpi_gpe_info.
NOTE:
| uacpi_u16 uacpi_gpe_triggering uacpi_gpe_handler uacpi_handle ctx UACPI_ALWAYS_ERROR_FOR_REDUCED_HARDWARE | ( | uacpi_status | uacpi_uninstall_gpe_handler uacpi_namespace_node *gpe_device, uacpi_u16 idx, uacpi_gpe_handler handler | ) |
Uninstalls a handler, that was previously installed to the GPE at 'idx' controlled by device 'gpe_device'.
NOTE:
NOTE:
| 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_u16 uacpi_gpe_triggering uacpi_gpe_handler uacpi_handle ctx uacpi_u16 uacpi_namespace_node *wake_device uacpi_u16 idx uacpi_u16 idx uacpi_u16 idx uacpi_u16 idx uacpi_u16 idx uacpi_u64 uacpi_address_space address_space |
Definition at line 401 of file event.h.
Referenced by debugdataspaces_ReadIo(), debugdataspaces_WriteIo(), DECLARE_INTERFACE_(), sm6_parser_declare_global(), and uacpi_install_gpe_block().
Definition at line 401 of file event.h.
Referenced by create_gpe_block(), and uacpi_install_gpe_block().
| uacpi_u16 uacpi_gpe_triggering triggering |
Definition at line 170 of file event.h.
Referenced by dispatch_gpe(), do_install_gpe_handler(), do_match_gpe_methods(), gpe_set_aml_handler(), gpe_set_handler(), uacpi_gpe_triggering_to_string(), uacpi_install_gpe_handler(), and uacpi_install_gpe_handler_raw().
| uacpi_event_info |
Definition at line 82 of file event.h.
Referenced by uacpi_fixed_event_info(), and uacpi_gpe_info().