ia64/xen-unstable

view xen/include/acpi/acpixf.h @ 9372:fcef620a859c

'permitted_clock_jitter' units are nanoseconds not microseconds.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Mar 21 15:10:26 2006 +0100 (2006-03-21)
parents ddd290cc8f0d
children 13cba2e78a65
line source
2 /******************************************************************************
3 *
4 * Name: acpixf.h - External interfaces to the ACPI subsystem
5 *
6 *****************************************************************************/
8 /*
9 * Copyright (C) 2000 - 2005, R. Byron Moore
10 * All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions, and the following disclaimer,
17 * without modification.
18 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
19 * substantially similar to the "NO WARRANTY" disclaimer below
20 * ("Disclaimer") and any redistribution must be conditioned upon
21 * including a substantially similar Disclaimer requirement for further
22 * binary redistribution.
23 * 3. Neither the names of the above-listed copyright holders nor the names
24 * of any contributors may be used to endorse or promote products derived
25 * from this software without specific prior written permission.
26 *
27 * Alternatively, this software may be distributed under the terms of the
28 * GNU General Public License ("GPL") version 2 as published by the Free
29 * Software Foundation.
30 *
31 * NO WARRANTY
32 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
33 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
35 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
36 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
38 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
39 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
40 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
41 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42 * POSSIBILITY OF SUCH DAMAGES.
43 */
46 #ifndef __ACXFACE_H__
47 #define __ACXFACE_H__
49 #include "actypes.h"
50 #include "actbl.h"
53 /*
54 * Global interfaces
55 */
57 acpi_status
58 acpi_initialize_subsystem (
59 void);
61 acpi_status
62 acpi_enable_subsystem (
63 u32 flags);
65 acpi_status
66 acpi_initialize_objects (
67 u32 flags);
69 acpi_status
70 acpi_terminate (
71 void);
73 #ifdef ACPI_FUTURE_USAGE
74 acpi_status
75 acpi_subsystem_status (
76 void);
77 #endif
79 acpi_status
80 acpi_enable (
81 void);
83 acpi_status
84 acpi_disable (
85 void);
87 #ifdef ACPI_FUTURE_USAGE
88 acpi_status
89 acpi_get_system_info (
90 struct acpi_buffer *ret_buffer);
91 #endif
93 const char *
94 acpi_format_exception (
95 acpi_status exception);
97 acpi_status
98 acpi_purge_cached_objects (
99 void);
101 #ifdef ACPI_FUTURE_USAGE
102 acpi_status
103 acpi_install_initialization_handler (
104 acpi_init_handler handler,
105 u32 function);
106 #endif
108 /*
109 * ACPI Memory manager
110 */
112 void *
113 acpi_allocate (
114 u32 size);
116 void *
117 acpi_callocate (
118 u32 size);
120 void
121 acpi_free (
122 void *address);
125 /*
126 * ACPI table manipulation interfaces
127 */
129 acpi_status
130 acpi_find_root_pointer (
131 u32 flags,
132 struct acpi_pointer *rsdp_address);
134 acpi_status
135 acpi_load_tables (
136 void);
138 #ifdef ACPI_FUTURE_USAGE
139 acpi_status
140 acpi_load_table (
141 struct acpi_table_header *table_ptr);
143 acpi_status
144 acpi_unload_table (
145 acpi_table_type table_type);
147 acpi_status
148 acpi_get_table_header (
149 acpi_table_type table_type,
150 u32 instance,
151 struct acpi_table_header *out_table_header);
152 #endif /* ACPI_FUTURE_USAGE */
154 acpi_status
155 acpi_get_table (
156 acpi_table_type table_type,
157 u32 instance,
158 struct acpi_buffer *ret_buffer);
160 acpi_status
161 acpi_get_firmware_table (
162 acpi_string signature,
163 u32 instance,
164 u32 flags,
165 struct acpi_table_header **table_pointer);
168 /*
169 * Namespace and name interfaces
170 */
172 acpi_status
173 acpi_walk_namespace (
174 acpi_object_type type,
175 acpi_handle start_object,
176 u32 max_depth,
177 acpi_walk_callback user_function,
178 void *context,
179 void **return_value);
181 acpi_status
182 acpi_get_devices (
183 char *HID,
184 acpi_walk_callback user_function,
185 void *context,
186 void **return_value);
188 acpi_status
189 acpi_get_name (
190 acpi_handle handle,
191 u32 name_type,
192 struct acpi_buffer *ret_path_ptr);
194 acpi_status
195 acpi_get_handle (
196 acpi_handle parent,
197 acpi_string pathname,
198 acpi_handle *ret_handle);
200 acpi_status
201 acpi_attach_data (
202 acpi_handle obj_handle,
203 acpi_object_handler handler,
204 void *data);
206 acpi_status
207 acpi_detach_data (
208 acpi_handle obj_handle,
209 acpi_object_handler handler);
211 acpi_status
212 acpi_get_data (
213 acpi_handle obj_handle,
214 acpi_object_handler handler,
215 void **data);
218 /*
219 * Object manipulation and enumeration
220 */
222 acpi_status
223 acpi_evaluate_object (
224 acpi_handle object,
225 acpi_string pathname,
226 struct acpi_object_list *parameter_objects,
227 struct acpi_buffer *return_object_buffer);
229 #ifdef ACPI_FUTURE_USAGE
230 acpi_status
231 acpi_evaluate_object_typed (
232 acpi_handle object,
233 acpi_string pathname,
234 struct acpi_object_list *external_params,
235 struct acpi_buffer *return_buffer,
236 acpi_object_type return_type);
237 #endif
239 acpi_status
240 acpi_get_object_info (
241 acpi_handle handle,
242 struct acpi_buffer *return_buffer);
244 acpi_status
245 acpi_get_next_object (
246 acpi_object_type type,
247 acpi_handle parent,
248 acpi_handle child,
249 acpi_handle *out_handle);
251 acpi_status
252 acpi_get_type (
253 acpi_handle object,
254 acpi_object_type *out_type);
256 acpi_status
257 acpi_get_parent (
258 acpi_handle object,
259 acpi_handle *out_handle);
262 /*
263 * Event handler interfaces
264 */
266 acpi_status
267 acpi_install_fixed_event_handler (
268 u32 acpi_event,
269 acpi_event_handler handler,
270 void *context);
272 acpi_status
273 acpi_remove_fixed_event_handler (
274 u32 acpi_event,
275 acpi_event_handler handler);
277 acpi_status
278 acpi_install_notify_handler (
279 acpi_handle device,
280 u32 handler_type,
281 acpi_notify_handler handler,
282 void *context);
284 acpi_status
285 acpi_remove_notify_handler (
286 acpi_handle device,
287 u32 handler_type,
288 acpi_notify_handler handler);
290 acpi_status
291 acpi_install_address_space_handler (
292 acpi_handle device,
293 acpi_adr_space_type space_id,
294 acpi_adr_space_handler handler,
295 acpi_adr_space_setup setup,
296 void *context);
298 acpi_status
299 acpi_remove_address_space_handler (
300 acpi_handle device,
301 acpi_adr_space_type space_id,
302 acpi_adr_space_handler handler);
304 acpi_status
305 acpi_install_gpe_handler (
306 acpi_handle gpe_device,
307 u32 gpe_number,
308 u32 type,
309 acpi_event_handler address,
310 void *context);
312 #ifdef ACPI_FUTURE_USAGE
313 acpi_status
314 acpi_install_exception_handler (
315 acpi_exception_handler handler);
316 #endif
319 /*
320 * Event interfaces
321 */
323 acpi_status
324 acpi_acquire_global_lock (
325 u16 timeout,
326 u32 *handle);
328 acpi_status
329 acpi_release_global_lock (
330 u32 handle);
332 acpi_status
333 acpi_remove_gpe_handler (
334 acpi_handle gpe_device,
335 u32 gpe_number,
336 acpi_event_handler address);
338 acpi_status
339 acpi_enable_event (
340 u32 event,
341 u32 flags);
343 acpi_status
344 acpi_disable_event (
345 u32 event,
346 u32 flags);
348 acpi_status
349 acpi_clear_event (
350 u32 event);
352 #ifdef ACPI_FUTURE_USAGE
353 acpi_status
354 acpi_get_event_status (
355 u32 event,
356 acpi_event_status *event_status);
357 #endif /* ACPI_FUTURE_USAGE */
359 acpi_status
360 acpi_set_gpe_type (
361 acpi_handle gpe_device,
362 u32 gpe_number,
363 u8 type);
365 acpi_status
366 acpi_enable_gpe (
367 acpi_handle gpe_device,
368 u32 gpe_number,
369 u32 flags);
371 acpi_status
372 acpi_disable_gpe (
373 acpi_handle gpe_device,
374 u32 gpe_number,
375 u32 flags);
377 acpi_status
378 acpi_clear_gpe (
379 acpi_handle gpe_device,
380 u32 gpe_number,
381 u32 flags);
383 #ifdef ACPI_FUTURE_USAGE
384 acpi_status
385 acpi_get_gpe_status (
386 acpi_handle gpe_device,
387 u32 gpe_number,
388 u32 flags,
389 acpi_event_status *event_status);
390 #endif /* ACPI_FUTURE_USAGE */
392 acpi_status
393 acpi_install_gpe_block (
394 acpi_handle gpe_device,
395 struct acpi_generic_address *gpe_block_address,
396 u32 register_count,
397 u32 interrupt_level);
399 acpi_status
400 acpi_remove_gpe_block (
401 acpi_handle gpe_device);
404 /*
405 * Resource interfaces
406 */
408 typedef
409 acpi_status (*ACPI_WALK_RESOURCE_CALLBACK) (
410 struct acpi_resource *resource,
411 void *context);
414 acpi_status
415 acpi_get_current_resources(
416 acpi_handle device_handle,
417 struct acpi_buffer *ret_buffer);
419 #ifdef ACPI_FUTURE_USAGE
420 acpi_status
421 acpi_get_possible_resources(
422 acpi_handle device_handle,
423 struct acpi_buffer *ret_buffer);
424 #endif
426 acpi_status
427 acpi_walk_resources (
428 acpi_handle device_handle,
429 char *path,
430 ACPI_WALK_RESOURCE_CALLBACK user_function,
431 void *context);
433 acpi_status
434 acpi_set_current_resources (
435 acpi_handle device_handle,
436 struct acpi_buffer *in_buffer);
438 acpi_status
439 acpi_get_irq_routing_table (
440 acpi_handle bus_device_handle,
441 struct acpi_buffer *ret_buffer);
443 acpi_status
444 acpi_resource_to_address64 (
445 struct acpi_resource *resource,
446 struct acpi_resource_address64 *out);
448 /*
449 * Hardware (ACPI device) interfaces
450 */
452 acpi_status
453 acpi_get_register (
454 u32 register_id,
455 u32 *return_value,
456 u32 flags);
458 acpi_status
459 acpi_set_register (
460 u32 register_id,
461 u32 value,
462 u32 flags);
464 acpi_status
465 acpi_set_firmware_waking_vector (
466 acpi_physical_address physical_address);
468 #ifdef ACPI_FUTURE_USAGE
469 acpi_status
470 acpi_get_firmware_waking_vector (
471 acpi_physical_address *physical_address);
472 #endif
474 acpi_status
475 acpi_get_sleep_type_data (
476 u8 sleep_state,
477 u8 *slp_typ_a,
478 u8 *slp_typ_b);
480 acpi_status
481 acpi_enter_sleep_state_prep (
482 u8 sleep_state);
484 acpi_status asmlinkage
485 acpi_enter_sleep_state (
486 u8 sleep_state);
488 acpi_status asmlinkage
489 acpi_enter_sleep_state_s4bios (
490 void);
492 acpi_status
493 acpi_leave_sleep_state (
494 u8 sleep_state);
497 #endif /* __ACXFACE_H__ */