Subversion Repositories shark

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
434 giacomo 1
/******************************************************************************
2
 *
3
 * Name: acevents.h - Event subcomponent prototypes and defines
4
 *
5
 *****************************************************************************/
6
 
7
/*
8
 * Copyright (C) 2000 - 2003, R. Byron Moore
9
 * All rights reserved.
10
 *
11
 * Redistribution and use in source and binary forms, with or without
12
 * modification, are permitted provided that the following conditions
13
 * are met:
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.
25
 *
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.
29
 *
30
 * NO WARRANTY
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.
42
 */
43
 
44
#ifndef __ACEVENTS_H__
45
#define __ACEVENTS_H__
46
 
47
 
48
acpi_status
49
acpi_ev_initialize (
50
        void);
51
 
52
acpi_status
53
acpi_ev_handler_initialize (
54
        void);
55
 
56
 
57
/*
58
 * Evfixed - Fixed event handling
59
 */
60
 
61
acpi_status
62
acpi_ev_fixed_event_initialize (
63
        void);
64
 
65
u32
66
acpi_ev_fixed_event_detect (
67
        void);
68
 
69
u32
70
acpi_ev_fixed_event_dispatch (
71
        u32                             event);
72
 
73
 
74
/*
75
 * Evmisc
76
 */
77
 
78
u8
79
acpi_ev_is_notify_object (
80
        struct acpi_namespace_node      *node);
81
 
82
acpi_status
83
acpi_ev_acquire_global_lock(
84
        u16                             timeout);
85
 
86
acpi_status
87
acpi_ev_release_global_lock(
88
        void);
89
 
90
acpi_status
91
acpi_ev_init_global_lock_handler (
92
        void);
93
 
94
u32
95
acpi_ev_get_gpe_number_index (
96
        u32                             gpe_number);
97
 
98
acpi_status
99
acpi_ev_queue_notify_request (
100
        struct acpi_namespace_node      *node,
101
        u32                             notify_value);
102
 
103
void ACPI_SYSTEM_XFACE
104
acpi_ev_notify_dispatch (
105
        void                            *context);
106
 
107
 
108
/*
109
 * Evgpe - GPE handling and dispatch
110
 */
111
 
112
acpi_status
113
acpi_ev_walk_gpe_list (
114
        ACPI_GPE_CALLBACK       gpe_walk_callback);
115
 
116
u8
117
acpi_ev_valid_gpe_event (
118
        struct acpi_gpe_event_info      *gpe_event_info);
119
 
120
struct acpi_gpe_event_info *
121
acpi_ev_get_gpe_event_info (
122
        acpi_handle                     gpe_device,
123
        u32                             gpe_number);
124
 
125
acpi_status
126
acpi_ev_gpe_initialize (
127
        void);
128
 
129
acpi_status
130
acpi_ev_create_gpe_block (
131
        struct acpi_namespace_node      *gpe_device,
132
        struct acpi_generic_address     *gpe_block_address,
133
        u32                             register_count,
134
        u8                              gpe_block_base_number,
135
        u32                             interrupt_level,
136
        struct acpi_gpe_block_info      **return_gpe_block);
137
 
138
acpi_status
139
acpi_ev_delete_gpe_block (
140
        struct acpi_gpe_block_info      *gpe_block);
141
 
142
u32
143
acpi_ev_gpe_dispatch (
144
        struct acpi_gpe_event_info      *gpe_event_info,
145
        u32                             gpe_number);
146
 
147
u32
148
acpi_ev_gpe_detect (
149
        struct acpi_gpe_xrupt_info      *gpe_xrupt_list);
150
 
151
/*
152
 * Evregion - Address Space handling
153
 */
154
 
155
acpi_status
156
acpi_ev_init_address_spaces (
157
        void);
158
 
159
acpi_status
160
acpi_ev_address_space_dispatch (
161
        union acpi_operand_object      *region_obj,
162
        u32                             function,
163
        acpi_physical_address           address,
164
        u32                             bit_width,
165
        void                            *value);
166
 
167
acpi_status
168
acpi_ev_install_handler (
169
        acpi_handle                     obj_handle,
170
        u32                             level,
171
        void                            *context,
172
        void                            **return_value);
173
 
174
acpi_status
175
acpi_ev_attach_region (
176
        union acpi_operand_object       *handler_obj,
177
        union acpi_operand_object       *region_obj,
178
        u8                              acpi_ns_is_locked);
179
 
180
void
181
acpi_ev_detach_region (
182
        union acpi_operand_object      *region_obj,
183
        u8                              acpi_ns_is_locked);
184
 
185
 
186
/*
187
 * Evregini - Region initialization and setup
188
 */
189
 
190
acpi_status
191
acpi_ev_system_memory_region_setup (
192
        acpi_handle                     handle,
193
        u32                             function,
194
        void                            *handler_context,
195
        void                            **region_context);
196
 
197
acpi_status
198
acpi_ev_io_space_region_setup (
199
        acpi_handle                     handle,
200
        u32                             function,
201
        void                            *handler_context,
202
        void                            **region_context);
203
 
204
acpi_status
205
acpi_ev_pci_config_region_setup (
206
        acpi_handle                     handle,
207
        u32                             function,
208
        void                            *handler_context,
209
        void                            **region_context);
210
 
211
acpi_status
212
acpi_ev_cmos_region_setup (
213
        acpi_handle                     handle,
214
        u32                             function,
215
        void                            *handler_context,
216
        void                            **region_context);
217
 
218
acpi_status
219
acpi_ev_pci_bar_region_setup (
220
        acpi_handle                     handle,
221
        u32                             function,
222
        void                            *handler_context,
223
        void                            **region_context);
224
 
225
acpi_status
226
acpi_ev_default_region_setup (
227
        acpi_handle                     handle,
228
        u32                             function,
229
        void                            *handler_context,
230
        void                            **region_context);
231
 
232
acpi_status
233
acpi_ev_initialize_region (
234
        union acpi_operand_object       *region_obj,
235
        u8                              acpi_ns_locked);
236
 
237
 
238
/*
239
 * Evsci - SCI (System Control Interrupt) handling/dispatch
240
 */
241
 
242
u32 ACPI_SYSTEM_XFACE
243
acpi_ev_gpe_xrupt_handler (
244
        void                            *context);
245
 
246
u32
247
acpi_ev_install_sci_handler (
248
        void);
249
 
250
acpi_status
251
acpi_ev_remove_sci_handler (
252
        void);
253
 
254
u32
255
acpi_ev_initialize_sCI (
256
        u32                             program_sCI);
257
 
258
void
259
acpi_ev_terminate (
260
        void);
261
 
262
 
263
#endif  /* __ACEVENTS_H__  */