2005-04-17 06:20:36 +08:00
|
|
|
/******************************************************************************
|
|
|
|
*
|
|
|
|
* Name: acevents.h - Event subcomponent prototypes and defines
|
|
|
|
*
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (C) 2000 - 2005, R. Byron Moore
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions, and the following disclaimer,
|
|
|
|
* without modification.
|
|
|
|
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
|
|
|
|
* substantially similar to the "NO WARRANTY" disclaimer below
|
|
|
|
* ("Disclaimer") and any redistribution must be conditioned upon
|
|
|
|
* including a substantially similar Disclaimer requirement for further
|
|
|
|
* binary redistribution.
|
|
|
|
* 3. Neither the names of the above-listed copyright holders nor the names
|
|
|
|
* of any contributors may be used to endorse or promote products derived
|
|
|
|
* from this software without specific prior written permission.
|
|
|
|
*
|
|
|
|
* Alternatively, this software may be distributed under the terms of the
|
|
|
|
* GNU General Public License ("GPL") version 2 as published by the Free
|
|
|
|
* Software Foundation.
|
|
|
|
*
|
|
|
|
* NO WARRANTY
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
|
|
|
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
|
|
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
|
|
|
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
* POSSIBILITY OF SUCH DAMAGES.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ACEVENTS_H__
|
|
|
|
#define __ACEVENTS_H__
|
|
|
|
|
|
|
|
|
2005-04-19 10:49:35 +08:00
|
|
|
/*
|
|
|
|
* evevent
|
|
|
|
*/
|
2005-04-17 06:20:36 +08:00
|
|
|
acpi_status
|
|
|
|
acpi_ev_initialize_events (
|
|
|
|
void);
|
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_install_xrupt_handlers (
|
|
|
|
void);
|
|
|
|
|
|
|
|
u32
|
|
|
|
acpi_ev_fixed_event_detect (
|
|
|
|
void);
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2005-04-19 10:49:35 +08:00
|
|
|
* evmisc
|
2005-04-17 06:20:36 +08:00
|
|
|
*/
|
|
|
|
u8
|
|
|
|
acpi_ev_is_notify_object (
|
|
|
|
struct acpi_namespace_node *node);
|
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_acquire_global_lock(
|
|
|
|
u16 timeout);
|
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_release_global_lock(
|
|
|
|
void);
|
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_init_global_lock_handler (
|
|
|
|
void);
|
|
|
|
|
|
|
|
u32
|
|
|
|
acpi_ev_get_gpe_number_index (
|
|
|
|
u32 gpe_number);
|
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_queue_notify_request (
|
|
|
|
struct acpi_namespace_node *node,
|
|
|
|
u32 notify_value);
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2005-04-19 10:49:35 +08:00
|
|
|
* evgpe - GPE handling and dispatch
|
2005-04-17 06:20:36 +08:00
|
|
|
*/
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_update_gpe_enable_masks (
|
|
|
|
struct acpi_gpe_event_info *gpe_event_info,
|
|
|
|
u8 type);
|
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_enable_gpe (
|
|
|
|
struct acpi_gpe_event_info *gpe_event_info,
|
|
|
|
u8 write_to_hardware);
|
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_disable_gpe (
|
|
|
|
struct acpi_gpe_event_info *gpe_event_info);
|
|
|
|
|
|
|
|
struct acpi_gpe_event_info *
|
|
|
|
acpi_ev_get_gpe_event_info (
|
|
|
|
acpi_handle gpe_device,
|
|
|
|
u32 gpe_number);
|
|
|
|
|
2005-04-19 10:49:35 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* evgpeblk
|
|
|
|
*/
|
|
|
|
u8
|
|
|
|
acpi_ev_valid_gpe_event (
|
|
|
|
struct acpi_gpe_event_info *gpe_event_info);
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
acpi_status
|
2005-04-19 10:49:35 +08:00
|
|
|
acpi_ev_walk_gpe_list (
|
ACPICA 20050617-0624 from Bob Moore <robert.moore@intel.com>
ACPICA 20050617:
Moved the object cache operations into the OS interface
layer (OSL) to allow the host OS to handle these operations
if desired (for example, the Linux OSL will invoke the
slab allocator). This support is optional; the compile
time define ACPI_USE_LOCAL_CACHE may be used to utilize
the original cache code in the ACPI CA core. The new OSL
interfaces are shown below. See utalloc.c for an example
implementation, and acpiosxf.h for the exact interface
definitions. Thanks to Alexey Starikovskiy.
acpi_os_create_cache
acpi_os_delete_cache
acpi_os_purge_cache
acpi_os_acquire_object
acpi_os_release_object
Modified the interfaces to acpi_os_acquire_lock and
acpi_os_release_lock to return and restore a flags
parameter. This fits better with many OS lock models.
Note: the current execution state (interrupt handler
or not) is no longer passed to these interfaces. If
necessary, the OSL must determine this state by itself, a
simple and fast operation. Thanks to Alexey Starikovskiy.
Fixed a problem in the ACPI table handling where a valid
XSDT was assumed present if the revision of the RSDP
was 2 or greater. According to the ACPI specification,
the XSDT is optional in all cases, and the table manager
therefore now checks for both an RSDP >=2 and a valid
XSDT pointer. Otherwise, the RSDT pointer is used.
Some ACPI 2.0 compliant BIOSs contain only the RSDT.
Fixed an interpreter problem with the Mid() operator in the
case of an input string where the resulting output string
is of zero length. It now correctly returns a valid,
null terminated string object instead of a string object
with a null pointer.
Fixed a problem with the control method argument handling
to allow a store to an Arg object that already contains an
object of type Device. The Device object is now correctly
overwritten. Previously, an error was returned.
ACPICA 20050624:
Modified the new OSL cache interfaces to use ACPI_CACHE_T
as the type for the host-defined cache object. This allows
the OSL implementation to define and type this object in
any manner desired, simplifying the OSL implementation.
For example, ACPI_CACHE_T is defined as kmem_cache_t for
Linux, and should be defined in the OS-specific header
file for other operating systems as required.
Changed the interface to AcpiOsAcquireObject to directly
return the requested object as the function return (instead
of ACPI_STATUS.) This change was made for performance
reasons, since this is the purpose of the interface in the
first place. acpi_os_acquire_object is now similar to the
acpi_os_allocate interface. Thanks to Alexey Starikovskiy.
Modified the initialization sequence in
acpi_initialize_subsystem to call the OSL interface
acpi_osl_initialize first, before any local initialization.
This change was required because the global initialization
now calls OSL interfaces.
Restructured the code base to split some files because
of size and/or because the code logically belonged in a
separate file. New files are listed below.
utilities/utcache.c /* Local cache interfaces */
utilities/utmutex.c /* Local mutex support */
utilities/utstate.c /* State object support */
parser/psloop.c /* Main AML parse loop */
Signed-off-by: Len Brown <len.brown@intel.com>
2005-06-24 12:00:00 +08:00
|
|
|
ACPI_GPE_CALLBACK gpe_walk_callback);
|
2005-04-19 10:49:35 +08:00
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_delete_gpe_handlers (
|
|
|
|
struct acpi_gpe_xrupt_info *gpe_xrupt_info,
|
|
|
|
struct acpi_gpe_block_info *gpe_block);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_create_gpe_block (
|
|
|
|
struct acpi_namespace_node *gpe_device,
|
|
|
|
struct acpi_generic_address *gpe_block_address,
|
|
|
|
u32 register_count,
|
|
|
|
u8 gpe_block_base_number,
|
2005-05-13 12:00:00 +08:00
|
|
|
u32 interrupt_number,
|
2005-04-17 06:20:36 +08:00
|
|
|
struct acpi_gpe_block_info **return_gpe_block);
|
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_delete_gpe_block (
|
|
|
|
struct acpi_gpe_block_info *gpe_block);
|
|
|
|
|
|
|
|
u32
|
|
|
|
acpi_ev_gpe_dispatch (
|
|
|
|
struct acpi_gpe_event_info *gpe_event_info,
|
|
|
|
u32 gpe_number);
|
|
|
|
|
|
|
|
u32
|
|
|
|
acpi_ev_gpe_detect (
|
|
|
|
struct acpi_gpe_xrupt_info *gpe_xrupt_list);
|
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_set_gpe_type (
|
|
|
|
struct acpi_gpe_event_info *gpe_event_info,
|
|
|
|
u8 type);
|
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_check_for_wake_only_gpe (
|
|
|
|
struct acpi_gpe_event_info *gpe_event_info);
|
|
|
|
|
2005-04-19 10:49:35 +08:00
|
|
|
acpi_status
|
|
|
|
acpi_ev_gpe_initialize (
|
|
|
|
void);
|
|
|
|
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
/*
|
2005-04-19 10:49:35 +08:00
|
|
|
* evregion - Address Space handling
|
2005-04-17 06:20:36 +08:00
|
|
|
*/
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_install_region_handlers (
|
|
|
|
void);
|
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_initialize_op_regions (
|
|
|
|
void);
|
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_address_space_dispatch (
|
|
|
|
union acpi_operand_object *region_obj,
|
|
|
|
u32 function,
|
|
|
|
acpi_physical_address address,
|
|
|
|
u32 bit_width,
|
|
|
|
void *value);
|
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_attach_region (
|
|
|
|
union acpi_operand_object *handler_obj,
|
|
|
|
union acpi_operand_object *region_obj,
|
|
|
|
u8 acpi_ns_is_locked);
|
|
|
|
|
|
|
|
void
|
|
|
|
acpi_ev_detach_region (
|
|
|
|
union acpi_operand_object *region_obj,
|
|
|
|
u8 acpi_ns_is_locked);
|
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_install_space_handler (
|
|
|
|
struct acpi_namespace_node *node,
|
|
|
|
acpi_adr_space_type space_id,
|
|
|
|
acpi_adr_space_handler handler,
|
|
|
|
acpi_adr_space_setup setup,
|
|
|
|
void *context);
|
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_execute_reg_methods (
|
|
|
|
struct acpi_namespace_node *node,
|
|
|
|
acpi_adr_space_type space_id);
|
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_execute_reg_method (
|
|
|
|
union acpi_operand_object *region_obj,
|
|
|
|
u32 function);
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2005-04-19 10:49:35 +08:00
|
|
|
* evregini - Region initialization and setup
|
2005-04-17 06:20:36 +08:00
|
|
|
*/
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_system_memory_region_setup (
|
|
|
|
acpi_handle handle,
|
|
|
|
u32 function,
|
|
|
|
void *handler_context,
|
|
|
|
void **region_context);
|
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_io_space_region_setup (
|
|
|
|
acpi_handle handle,
|
|
|
|
u32 function,
|
|
|
|
void *handler_context,
|
|
|
|
void **region_context);
|
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_pci_config_region_setup (
|
|
|
|
acpi_handle handle,
|
|
|
|
u32 function,
|
|
|
|
void *handler_context,
|
|
|
|
void **region_context);
|
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_cmos_region_setup (
|
|
|
|
acpi_handle handle,
|
|
|
|
u32 function,
|
|
|
|
void *handler_context,
|
|
|
|
void **region_context);
|
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_pci_bar_region_setup (
|
|
|
|
acpi_handle handle,
|
|
|
|
u32 function,
|
|
|
|
void *handler_context,
|
|
|
|
void **region_context);
|
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_default_region_setup (
|
|
|
|
acpi_handle handle,
|
|
|
|
u32 function,
|
|
|
|
void *handler_context,
|
|
|
|
void **region_context);
|
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_initialize_region (
|
|
|
|
union acpi_operand_object *region_obj,
|
|
|
|
u8 acpi_ns_locked);
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2005-04-19 10:49:35 +08:00
|
|
|
* evsci - SCI (System Control Interrupt) handling/dispatch
|
2005-04-17 06:20:36 +08:00
|
|
|
*/
|
|
|
|
u32 ACPI_SYSTEM_XFACE
|
|
|
|
acpi_ev_gpe_xrupt_handler (
|
|
|
|
void *context);
|
|
|
|
|
|
|
|
u32
|
|
|
|
acpi_ev_install_sci_handler (
|
|
|
|
void);
|
|
|
|
|
|
|
|
acpi_status
|
|
|
|
acpi_ev_remove_sci_handler (
|
|
|
|
void);
|
|
|
|
|
|
|
|
u32
|
|
|
|
acpi_ev_initialize_sCI (
|
|
|
|
u32 program_sCI);
|
|
|
|
|
|
|
|
void
|
|
|
|
acpi_ev_terminate (
|
|
|
|
void);
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* __ACEVENTS_H__ */
|