- Send the SCM reply packet with the final status after completing the requested...
[reactos.git] / reactos / drivers / bus / acpi / include / acpixf.h
1
2 /******************************************************************************
3 *
4 * Name: acpixf.h - External interfaces to the ACPI subsystem
5 *
6 *****************************************************************************/
7
8 /*
9 * Copyright (C) 2000, 2001 R. Byron Moore
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 */
25
26
27 #ifndef __ACXFACE_H__
28 #define __ACXFACE_H__
29
30 #include "actypes.h"
31 #include "actbl.h"
32
33
34 /*
35 * Global interfaces
36 */
37
38 ACPI_STATUS
39 acpi_initialize_subsystem (
40 void);
41
42 ACPI_STATUS
43 acpi_enable_subsystem (
44 u32 flags);
45
46 ACPI_STATUS
47 acpi_terminate (
48 void);
49
50 ACPI_STATUS
51 acpi_enable (
52 void);
53
54 ACPI_STATUS
55 acpi_disable (
56 void);
57
58 ACPI_STATUS
59 acpi_get_system_info(
60 ACPI_BUFFER *ret_buffer);
61
62 ACPI_STATUS
63 acpi_format_exception (
64 ACPI_STATUS exception,
65 ACPI_BUFFER *out_buffer);
66
67
68 /*
69 * ACPI Memory manager
70 */
71
72 void *
73 acpi_allocate (
74 u32 size);
75
76 void *
77 acpi_callocate (
78 u32 size);
79
80 void
81 acpi_free (
82 void *address);
83
84
85 /*
86 * ACPI table manipulation interfaces
87 */
88
89 ACPI_STATUS
90 acpi_find_root_pointer (
91 ACPI_PHYSICAL_ADDRESS *rsdp_physical_address);
92
93 ACPI_STATUS
94 acpi_load_tables (
95 ACPI_PHYSICAL_ADDRESS rsdp_physical_address);
96
97 ACPI_STATUS
98 acpi_load_table (
99 ACPI_TABLE_HEADER *table_ptr);
100
101 ACPI_STATUS
102 acpi_unload_table (
103 ACPI_TABLE_TYPE table_type);
104
105 ACPI_STATUS
106 acpi_get_table_header (
107 ACPI_TABLE_TYPE table_type,
108 u32 instance,
109 ACPI_TABLE_HEADER *out_table_header);
110
111 ACPI_STATUS
112 acpi_get_table (
113 ACPI_TABLE_TYPE table_type,
114 u32 instance,
115 ACPI_BUFFER *ret_buffer);
116
117
118 /*
119 * Namespace and name interfaces
120 */
121
122 ACPI_STATUS
123 acpi_walk_namespace (
124 ACPI_OBJECT_TYPE type,
125 ACPI_HANDLE start_object,
126 u32 max_depth,
127 WALK_CALLBACK user_function,
128 void *context,
129 void * *return_value);
130
131 ACPI_STATUS
132 acpi_get_devices (
133 NATIVE_CHAR *HID,
134 WALK_CALLBACK user_function,
135 void *context,
136 void **return_value);
137
138 ACPI_STATUS
139 acpi_get_name (
140 ACPI_HANDLE handle,
141 u32 name_type,
142 ACPI_BUFFER *ret_path_ptr);
143
144 ACPI_STATUS
145 acpi_get_handle (
146 ACPI_HANDLE parent,
147 ACPI_STRING pathname,
148 ACPI_HANDLE *ret_handle);
149
150
151 /*
152 * Object manipulation and enumeration
153 */
154
155 ACPI_STATUS
156 acpi_evaluate_object (
157 ACPI_HANDLE object,
158 ACPI_STRING pathname,
159 ACPI_OBJECT_LIST *parameter_objects,
160 ACPI_BUFFER *return_object_buffer);
161
162 ACPI_STATUS
163 acpi_get_object_info (
164 ACPI_HANDLE device,
165 ACPI_DEVICE_INFO *info);
166
167 ACPI_STATUS
168 acpi_get_next_object (
169 ACPI_OBJECT_TYPE type,
170 ACPI_HANDLE parent,
171 ACPI_HANDLE child,
172 ACPI_HANDLE *out_handle);
173
174 ACPI_STATUS
175 acpi_get_type (
176 ACPI_HANDLE object,
177 ACPI_OBJECT_TYPE *out_type);
178
179 ACPI_STATUS
180 acpi_get_parent (
181 ACPI_HANDLE object,
182 ACPI_HANDLE *out_handle);
183
184
185 /*
186 * Event handler interfaces
187 */
188
189 ACPI_STATUS
190 acpi_install_fixed_event_handler (
191 u32 acpi_event,
192 FIXED_EVENT_HANDLER handler,
193 void *context);
194
195 ACPI_STATUS
196 acpi_remove_fixed_event_handler (
197 u32 acpi_event,
198 FIXED_EVENT_HANDLER handler);
199
200 ACPI_STATUS
201 acpi_install_notify_handler (
202 ACPI_HANDLE device,
203 u32 handler_type,
204 NOTIFY_HANDLER handler,
205 void *context);
206
207 ACPI_STATUS
208 acpi_remove_notify_handler (
209 ACPI_HANDLE device,
210 u32 handler_type,
211 NOTIFY_HANDLER handler);
212
213 ACPI_STATUS
214 acpi_install_address_space_handler (
215 ACPI_HANDLE device,
216 ACPI_ADDRESS_SPACE_TYPE space_id,
217 ADDRESS_SPACE_HANDLER handler,
218 ADDRESS_SPACE_SETUP setup,
219 void *context);
220
221 ACPI_STATUS
222 acpi_remove_address_space_handler (
223 ACPI_HANDLE device,
224 ACPI_ADDRESS_SPACE_TYPE space_id,
225 ADDRESS_SPACE_HANDLER handler);
226
227 ACPI_STATUS
228 acpi_install_gpe_handler (
229 u32 gpe_number,
230 u32 type,
231 GPE_HANDLER handler,
232 void *context);
233
234 ACPI_STATUS
235 acpi_acquire_global_lock (
236 void);
237
238 ACPI_STATUS
239 acpi_release_global_lock (
240 void);
241
242 ACPI_STATUS
243 acpi_remove_gpe_handler (
244 u32 gpe_number,
245 GPE_HANDLER handler);
246
247 ACPI_STATUS
248 acpi_enable_event (
249 u32 acpi_event,
250 u32 type);
251
252 ACPI_STATUS
253 acpi_disable_event (
254 u32 acpi_event,
255 u32 type);
256
257 ACPI_STATUS
258 acpi_clear_event (
259 u32 acpi_event,
260 u32 type);
261
262 ACPI_STATUS
263 acpi_get_event_status (
264 u32 acpi_event,
265 u32 type,
266 ACPI_EVENT_STATUS *event_status);
267
268 /*
269 * Resource interfaces
270 */
271
272 ACPI_STATUS
273 acpi_get_current_resources(
274 ACPI_HANDLE device_handle,
275 ACPI_BUFFER *ret_buffer);
276
277 ACPI_STATUS
278 acpi_get_possible_resources(
279 ACPI_HANDLE device_handle,
280 ACPI_BUFFER *ret_buffer);
281
282 ACPI_STATUS
283 acpi_set_current_resources (
284 ACPI_HANDLE device_handle,
285 ACPI_BUFFER *in_buffer);
286
287 ACPI_STATUS
288 acpi_get_irq_routing_table (
289 ACPI_HANDLE bus_device_handle,
290 ACPI_BUFFER *ret_buffer);
291
292
293 /*
294 * Hardware (ACPI device) interfaces
295 */
296
297 ACPI_STATUS
298 acpi_set_firmware_waking_vector (
299 ACPI_PHYSICAL_ADDRESS physical_address);
300
301 ACPI_STATUS
302 acpi_get_firmware_waking_vector (
303 ACPI_PHYSICAL_ADDRESS *physical_address);
304
305 ACPI_STATUS
306 acpi_enter_sleep_state (
307 u8 sleep_state);
308
309 ACPI_STATUS
310 acpi_get_processor_throttling_info (
311 ACPI_HANDLE processor_handle,
312 ACPI_BUFFER *user_buffer);
313
314 ACPI_STATUS
315 acpi_set_processor_throttling_state (
316 ACPI_HANDLE processor_handle,
317 u32 throttle_state);
318
319 ACPI_STATUS
320 acpi_get_processor_throttling_state (
321 ACPI_HANDLE processor_handle,
322 u32 *throttle_state);
323
324 ACPI_STATUS
325 acpi_get_processor_cx_info (
326 ACPI_HANDLE processor_handle,
327 ACPI_BUFFER *user_buffer);
328
329 ACPI_STATUS
330 acpi_set_processor_sleep_state (
331 ACPI_HANDLE processor_handle,
332 u32 cx_state);
333
334 ACPI_STATUS
335 acpi_processor_sleep (
336 ACPI_HANDLE processor_handle,
337 u32 *pm_timer_ticks);
338
339
340 #endif /* __ACXFACE_H__ */