ACPICA: OSL: Move external globals from utglobal.c to acpixf.h using ACPI_INIT_GLOBAL...
[deliverable/linux.git] / include / acpi / acpixf.h
1 /******************************************************************************
2 *
3 * Name: acpixf.h - External interfaces to the ACPI subsystem
4 *
5 *****************************************************************************/
6
7 /*
8 * Copyright (C) 2000 - 2014, Intel Corp.
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 __ACXFACE_H__
45 #define __ACXFACE_H__
46
47 /* Current ACPICA subsystem version in YYYYMMDD format */
48
49 #define ACPI_CA_VERSION 0x20140325
50
51 #include <acpi/acconfig.h>
52 #include <acpi/actypes.h>
53 #include <acpi/actbl.h>
54 #include <acpi/acbuffer.h>
55
56 extern u8 acpi_gbl_permanent_mmap;
57
58 /*
59 * Ensure that the globals are actually defined and initialized only once.
60 *
61 * The use of these macros allows a single list of globals (here) in order
62 * to simplify maintenance of the code.
63 */
64 #ifdef DEFINE_ACPI_GLOBALS
65 #define ACPI_GLOBAL(type,name) \
66 extern type name; \
67 type name
68
69 #define ACPI_INIT_GLOBAL(type,name,value) \
70 type name=value
71
72 #else
73 #ifndef ACPI_GLOBAL
74 #define ACPI_GLOBAL(type,name) \
75 extern type name
76 #endif
77
78 #ifndef ACPI_INIT_GLOBAL
79 #define ACPI_INIT_GLOBAL(type,name,value) \
80 extern type name
81 #endif
82 #endif
83
84 /* Public globals, available from outside ACPICA subsystem */
85
86 /*****************************************************************************
87 *
88 * Runtime configuration (static defaults that can be overriden at runtime)
89 *
90 ****************************************************************************/
91
92 /*
93 * Enable "slack" in the AML interpreter? Default is FALSE, and the
94 * interpreter strictly follows the ACPI specification. Setting to TRUE
95 * allows the interpreter to ignore certain errors and/or bad AML constructs.
96 *
97 * Currently, these features are enabled by this flag:
98 *
99 * 1) Allow "implicit return" of last value in a control method
100 * 2) Allow access beyond the end of an operation region
101 * 3) Allow access to uninitialized locals/args (auto-init to integer 0)
102 * 4) Allow ANY object type to be a source operand for the Store() operator
103 * 5) Allow unresolved references (invalid target name) in package objects
104 * 6) Enable warning messages for behavior that is not ACPI spec compliant
105 */
106 ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_interpreter_slack, FALSE);
107
108 /*
109 * Automatically serialize all methods that create named objects? Default
110 * is TRUE, meaning that all non_serialized methods are scanned once at
111 * table load time to determine those that create named objects. Methods
112 * that create named objects are marked Serialized in order to prevent
113 * possible run-time problems if they are entered by more than one thread.
114 */
115 ACPI_INIT_GLOBAL(u8, acpi_gbl_auto_serialize_methods, TRUE);
116
117 /*
118 * Create the predefined _OSI method in the namespace? Default is TRUE
119 * because ACPICA is fully compatible with other ACPI implementations.
120 * Changing this will revert ACPICA (and machine ASL) to pre-OSI behavior.
121 */
122 ACPI_INIT_GLOBAL(u8, acpi_gbl_create_osi_method, TRUE);
123
124 /*
125 * Optionally use default values for the ACPI register widths. Set this to
126 * TRUE to use the defaults, if an FADT contains incorrect widths/lengths.
127 */
128 ACPI_INIT_GLOBAL(u8, acpi_gbl_use_default_register_widths, TRUE);
129
130 /*
131 * Optionally enable output from the AML Debug Object.
132 */
133 ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_aml_debug_object, FALSE);
134
135 /*
136 * Optionally copy the entire DSDT to local memory (instead of simply
137 * mapping it.) There are some BIOSs that corrupt or replace the original
138 * DSDT, creating the need for this option. Default is FALSE, do not copy
139 * the DSDT.
140 */
141 ACPI_INIT_GLOBAL(u8, acpi_gbl_copy_dsdt_locally, FALSE);
142
143 /*
144 * Optionally ignore an XSDT if present and use the RSDT instead.
145 * Although the ACPI specification requires that an XSDT be used instead
146 * of the RSDT, the XSDT has been found to be corrupt or ill-formed on
147 * some machines. Default behavior is to use the XSDT if present.
148 */
149 ACPI_INIT_GLOBAL(u8, acpi_gbl_do_not_use_xsdt, FALSE);
150
151 /*
152 * Optionally use 32-bit FADT addresses if and when there is a conflict
153 * (address mismatch) between the 32-bit and 64-bit versions of the
154 * address. Although ACPICA adheres to the ACPI specification which
155 * requires the use of the corresponding 64-bit address if it is non-zero,
156 * some machines have been found to have a corrupted non-zero 64-bit
157 * address. Default is FALSE, do not favor the 32-bit addresses.
158 */
159 ACPI_INIT_GLOBAL(u8, acpi_gbl_use32_bit_fadt_addresses, FALSE);
160
161 /*
162 * Optionally truncate I/O addresses to 16 bits. Provides compatibility
163 * with other ACPI implementations. NOTE: During ACPICA initialization,
164 * this value is set to TRUE if any Windows OSI strings have been
165 * requested by the BIOS.
166 */
167 ACPI_INIT_GLOBAL(u8, acpi_gbl_truncate_io_addresses, FALSE);
168
169 /*
170 * Disable runtime checking and repair of values returned by control methods.
171 * Use only if the repair is causing a problem on a particular machine.
172 */
173 ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_auto_repair, FALSE);
174
175 /*
176 * Optionally do not install any SSDTs from the RSDT/XSDT during initialization.
177 * This can be useful for debugging ACPI problems on some machines.
178 */
179 ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_ssdt_table_install, FALSE);
180
181 /*
182 * We keep track of the latest version of Windows that has been requested by
183 * the BIOS. ACPI 5.0.
184 */
185 ACPI_INIT_GLOBAL(u8, acpi_gbl_osi_data, 0);
186
187 /*
188 * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
189 * that the ACPI hardware is no longer required. A flag in the FADT indicates
190 * a reduced HW machine, and that flag is duplicated here for convenience.
191 */
192 ACPI_INIT_GLOBAL(u8, acpi_gbl_reduced_hardware, FALSE);
193
194 /*
195 * This mechanism is used to trace a specified AML method. The method is
196 * traced each time it is executed.
197 */
198 ACPI_INIT_GLOBAL(u32, acpi_gbl_trace_flags, 0);
199 ACPI_INIT_GLOBAL(acpi_name, acpi_gbl_trace_method_name, 0);
200
201 /*
202 * Runtime configuration of debug output control masks. We want the debug
203 * switches statically initialized so they are already set when the debugger
204 * is entered.
205 */
206 ACPI_INIT_GLOBAL(u32, acpi_dbg_level, ACPI_DEBUG_DEFAULT);
207 ACPI_INIT_GLOBAL(u32, acpi_dbg_layer, 0);
208
209 /*
210 * Globals that are publically available
211 */
212 ACPI_GLOBAL(u32, acpi_current_gpe_count);
213 ACPI_GLOBAL(struct acpi_table_fadt, acpi_gbl_FADT);
214 ACPI_GLOBAL(u8, acpi_gbl_system_awake_and_running);
215
216 /*
217 * Hardware-reduced prototypes. All interfaces that use these macros will
218 * be configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag
219 * is set to TRUE.
220 */
221 #if (!ACPI_REDUCED_HARDWARE)
222 #define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \
223 prototype;
224
225 #define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \
226 prototype;
227
228 #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \
229 prototype;
230
231 #else
232 #define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \
233 static ACPI_INLINE prototype {return(AE_NOT_CONFIGURED);}
234
235 #define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \
236 static ACPI_INLINE prototype {return(AE_OK);}
237
238 #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \
239 static ACPI_INLINE prototype {return;}
240
241 #endif /* !ACPI_REDUCED_HARDWARE */
242
243 /*
244 * Initialization
245 */
246 acpi_status __init
247 acpi_initialize_tables(struct acpi_table_desc *initial_storage,
248 u32 initial_table_count, u8 allow_resize);
249
250 acpi_status __init acpi_initialize_subsystem(void);
251
252 acpi_status __init acpi_enable_subsystem(u32 flags);
253
254 acpi_status __init acpi_initialize_objects(u32 flags);
255
256 acpi_status __init acpi_terminate(void);
257
258 /*
259 * Miscellaneous global interfaces
260 */
261 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void))
262 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void))
263 #ifdef ACPI_FUTURE_USAGE
264 acpi_status acpi_subsystem_status(void);
265 #endif
266
267 #ifdef ACPI_FUTURE_USAGE
268 acpi_status acpi_get_system_info(struct acpi_buffer *ret_buffer);
269 #endif
270
271 acpi_status acpi_get_statistics(struct acpi_statistics *stats);
272
273 const char *acpi_format_exception(acpi_status exception);
274
275 acpi_status acpi_purge_cached_objects(void);
276
277 acpi_status acpi_install_interface(acpi_string interface_name);
278
279 acpi_status acpi_remove_interface(acpi_string interface_name);
280
281 acpi_status acpi_update_interfaces(u8 action);
282
283 u32
284 acpi_check_address_range(acpi_adr_space_type space_id,
285 acpi_physical_address address,
286 acpi_size length, u8 warn);
287
288 acpi_status
289 acpi_decode_pld_buffer(u8 *in_buffer,
290 acpi_size length, struct acpi_pld_info **return_buffer);
291
292 /*
293 * ACPI table load/unload interfaces
294 */
295 acpi_status __init
296 acpi_install_table(acpi_physical_address address, u8 physical);
297
298 acpi_status acpi_load_table(struct acpi_table_header *table);
299
300 acpi_status acpi_unload_parent_table(acpi_handle object);
301
302 acpi_status __init acpi_load_tables(void);
303
304 /*
305 * ACPI table manipulation interfaces
306 */
307 acpi_status __init acpi_reallocate_root_table(void);
308
309 acpi_status __init acpi_find_root_pointer(acpi_size *rsdp_address);
310
311 acpi_status acpi_unload_table_id(acpi_owner_id id);
312
313 acpi_status
314 acpi_get_table_header(acpi_string signature,
315 u32 instance, struct acpi_table_header *out_table_header);
316
317 acpi_status
318 acpi_get_table_with_size(acpi_string signature,
319 u32 instance, struct acpi_table_header **out_table,
320 acpi_size *tbl_size);
321
322 acpi_status
323 acpi_get_table(acpi_string signature,
324 u32 instance, struct acpi_table_header **out_table);
325
326 acpi_status
327 acpi_get_table_by_index(u32 table_index, struct acpi_table_header **out_table);
328
329 acpi_status
330 acpi_install_table_handler(acpi_table_handler handler, void *context);
331
332 acpi_status acpi_remove_table_handler(acpi_table_handler handler);
333
334 /*
335 * Namespace and name interfaces
336 */
337 acpi_status
338 acpi_walk_namespace(acpi_object_type type,
339 acpi_handle start_object,
340 u32 max_depth,
341 acpi_walk_callback descending_callback,
342 acpi_walk_callback ascending_callback,
343 void *context, void **return_value);
344
345 acpi_status
346 acpi_get_devices(const char *HID,
347 acpi_walk_callback user_function,
348 void *context, void **return_value);
349
350 acpi_status
351 acpi_get_name(acpi_handle object,
352 u32 name_type, struct acpi_buffer *ret_path_ptr);
353
354 acpi_status
355 acpi_get_handle(acpi_handle parent,
356 acpi_string pathname, acpi_handle * ret_handle);
357
358 acpi_status
359 acpi_attach_data(acpi_handle object, acpi_object_handler handler, void *data);
360
361 acpi_status acpi_detach_data(acpi_handle object, acpi_object_handler handler);
362
363 acpi_status
364 acpi_get_data_full(acpi_handle object, acpi_object_handler handler, void **data,
365 void (*callback)(void *));
366
367 acpi_status
368 acpi_get_data(acpi_handle object, acpi_object_handler handler, void **data);
369
370 acpi_status
371 acpi_debug_trace(char *name, u32 debug_level, u32 debug_layer, u32 flags);
372
373 /*
374 * Object manipulation and enumeration
375 */
376 acpi_status
377 acpi_evaluate_object(acpi_handle object,
378 acpi_string pathname,
379 struct acpi_object_list *parameter_objects,
380 struct acpi_buffer *return_object_buffer);
381
382 acpi_status
383 acpi_evaluate_object_typed(acpi_handle object,
384 acpi_string pathname,
385 struct acpi_object_list *external_params,
386 struct acpi_buffer *return_buffer,
387 acpi_object_type return_type);
388
389 acpi_status
390 acpi_get_object_info(acpi_handle object,
391 struct acpi_device_info **return_buffer);
392
393 acpi_status acpi_install_method(u8 *buffer);
394
395 acpi_status
396 acpi_get_next_object(acpi_object_type type,
397 acpi_handle parent,
398 acpi_handle child, acpi_handle * out_handle);
399
400 acpi_status acpi_get_type(acpi_handle object, acpi_object_type * out_type);
401
402 acpi_status acpi_get_id(acpi_handle object, acpi_owner_id * out_type);
403
404 acpi_status acpi_get_parent(acpi_handle object, acpi_handle * out_handle);
405
406 /*
407 * Handler interfaces
408 */
409 acpi_status
410 acpi_install_initialization_handler(acpi_init_handler handler, u32 function);
411
412 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
413 acpi_install_sci_handler(acpi_sci_handler
414 address,
415 void *context))
416 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
417 acpi_remove_sci_handler(acpi_sci_handler
418 address))
419 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
420 acpi_install_global_event_handler
421 (acpi_gbl_event_handler handler,
422 void *context))
423 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
424 acpi_install_fixed_event_handler(u32
425 acpi_event,
426 acpi_event_handler
427 handler,
428 void
429 *context))
430 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
431 acpi_remove_fixed_event_handler(u32 acpi_event,
432 acpi_event_handler
433 handler))
434 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
435 acpi_install_gpe_handler(acpi_handle
436 gpe_device,
437 u32 gpe_number,
438 u32 type,
439 acpi_gpe_handler
440 address,
441 void *context))
442 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
443 acpi_remove_gpe_handler(acpi_handle gpe_device,
444 u32 gpe_number,
445 acpi_gpe_handler
446 address))
447 acpi_status acpi_install_notify_handler(acpi_handle device, u32 handler_type,
448 acpi_notify_handler handler,
449 void *context);
450
451 acpi_status
452 acpi_remove_notify_handler(acpi_handle device,
453 u32 handler_type, acpi_notify_handler handler);
454
455 acpi_status
456 acpi_install_address_space_handler(acpi_handle device,
457 acpi_adr_space_type space_id,
458 acpi_adr_space_handler handler,
459 acpi_adr_space_setup setup, void *context);
460
461 acpi_status
462 acpi_remove_address_space_handler(acpi_handle device,
463 acpi_adr_space_type space_id,
464 acpi_adr_space_handler handler);
465
466 #ifdef ACPI_FUTURE_USAGE
467 acpi_status acpi_install_exception_handler(acpi_exception_handler handler);
468 #endif
469
470 acpi_status acpi_install_interface_handler(acpi_interface_handler handler);
471
472 /*
473 * Global Lock interfaces
474 */
475 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
476 acpi_acquire_global_lock(u16 timeout,
477 u32 *handle))
478
479 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
480 acpi_release_global_lock(u32 handle))
481
482 /*
483 * Interfaces to AML mutex objects
484 */
485 acpi_status
486 acpi_acquire_mutex(acpi_handle handle, acpi_string pathname, u16 timeout);
487
488 acpi_status acpi_release_mutex(acpi_handle handle, acpi_string pathname);
489
490 /*
491 * Fixed Event interfaces
492 */
493 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
494 acpi_enable_event(u32 event, u32 flags))
495
496 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
497 acpi_disable_event(u32 event, u32 flags))
498 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_clear_event(u32 event))
499
500 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
501 acpi_get_event_status(u32 event,
502 acpi_event_status
503 *event_status))
504
505 /*
506 * General Purpose Event (GPE) Interfaces
507 */
508 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_update_all_gpes(void))
509
510 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
511 acpi_enable_gpe(acpi_handle gpe_device,
512 u32 gpe_number))
513
514 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
515 acpi_disable_gpe(acpi_handle gpe_device,
516 u32 gpe_number))
517
518 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
519 acpi_clear_gpe(acpi_handle gpe_device,
520 u32 gpe_number))
521
522 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
523 acpi_set_gpe(acpi_handle gpe_device,
524 u32 gpe_number, u8 action))
525
526 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
527 acpi_finish_gpe(acpi_handle gpe_device,
528 u32 gpe_number))
529
530 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
531 acpi_setup_gpe_for_wake(acpi_handle
532 parent_device,
533 acpi_handle gpe_device,
534 u32 gpe_number))
535 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
536 acpi_set_gpe_wake_mask(acpi_handle gpe_device,
537 u32 gpe_number,
538 u8 action))
539 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
540 acpi_get_gpe_status(acpi_handle gpe_device,
541 u32 gpe_number,
542 acpi_event_status
543 *event_status))
544 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable_all_gpes(void))
545 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_runtime_gpes(void))
546
547 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
548 acpi_get_gpe_device(u32 gpe_index,
549 acpi_handle * gpe_device))
550
551 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
552 acpi_install_gpe_block(acpi_handle gpe_device,
553 struct
554 acpi_generic_address
555 *gpe_block_address,
556 u32 register_count,
557 u32 interrupt_number))
558 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
559 acpi_remove_gpe_block(acpi_handle gpe_device))
560
561 /*
562 * Resource interfaces
563 */
564 typedef
565 acpi_status(*acpi_walk_resource_callback) (struct acpi_resource * resource,
566 void *context);
567
568 acpi_status
569 acpi_get_vendor_resource(acpi_handle device,
570 char *name,
571 struct acpi_vendor_uuid *uuid,
572 struct acpi_buffer *ret_buffer);
573
574 acpi_status
575 acpi_get_current_resources(acpi_handle device, struct acpi_buffer *ret_buffer);
576
577 #ifdef ACPI_FUTURE_USAGE
578 acpi_status
579 acpi_get_possible_resources(acpi_handle device, struct acpi_buffer *ret_buffer);
580 #endif
581
582 acpi_status
583 acpi_get_event_resources(acpi_handle device_handle,
584 struct acpi_buffer *ret_buffer);
585
586 acpi_status
587 acpi_walk_resource_buffer(struct acpi_buffer *buffer,
588 acpi_walk_resource_callback user_function,
589 void *context);
590
591 acpi_status
592 acpi_walk_resources(acpi_handle device,
593 char *name,
594 acpi_walk_resource_callback user_function, void *context);
595
596 acpi_status
597 acpi_set_current_resources(acpi_handle device, struct acpi_buffer *in_buffer);
598
599 acpi_status
600 acpi_get_irq_routing_table(acpi_handle device, struct acpi_buffer *ret_buffer);
601
602 acpi_status
603 acpi_resource_to_address64(struct acpi_resource *resource,
604 struct acpi_resource_address64 *out);
605
606 acpi_status
607 acpi_buffer_to_resource(u8 *aml_buffer,
608 u16 aml_buffer_length,
609 struct acpi_resource **resource_ptr);
610
611 /*
612 * Hardware (ACPI device) interfaces
613 */
614 acpi_status acpi_reset(void);
615
616 acpi_status acpi_read(u64 *value, struct acpi_generic_address *reg);
617
618 acpi_status acpi_write(u64 value, struct acpi_generic_address *reg);
619
620 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
621 acpi_read_bit_register(u32 register_id,
622 u32 *return_value))
623
624 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
625 acpi_write_bit_register(u32 register_id,
626 u32 value))
627
628 /*
629 * Sleep/Wake interfaces
630 */
631 acpi_status
632 acpi_get_sleep_type_data(u8 sleep_state, u8 *slp_typ_a, u8 *slp_typ_b);
633
634 acpi_status acpi_enter_sleep_state_prep(u8 sleep_state);
635
636 acpi_status acpi_enter_sleep_state(u8 sleep_state);
637
638 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enter_sleep_state_s4bios(void))
639
640 acpi_status acpi_leave_sleep_state_prep(u8 sleep_state);
641
642 acpi_status acpi_leave_sleep_state(u8 sleep_state);
643
644 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
645 acpi_set_firmware_waking_vector(u32
646 physical_address))
647 #if ACPI_MACHINE_WIDTH == 64
648 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
649 acpi_set_firmware_waking_vector64(u64
650 physical_address))
651 #endif
652 /*
653 * ACPI Timer interfaces
654 */
655 #ifdef ACPI_FUTURE_USAGE
656 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
657 acpi_get_timer_resolution(u32 *resolution))
658 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_get_timer(u32 *ticks))
659
660 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
661 acpi_get_timer_duration(u32 start_ticks,
662 u32 end_ticks,
663 u32 *time_elapsed))
664 #endif /* ACPI_FUTURE_USAGE */
665
666 /*
667 * Error/Warning output
668 */
669 ACPI_PRINTF_LIKE(3)
670 void ACPI_INTERNAL_VAR_XFACE
671 acpi_error(const char *module_name, u32 line_number, const char *format, ...);
672
673 ACPI_PRINTF_LIKE(4)
674 void ACPI_INTERNAL_VAR_XFACE
675 acpi_exception(const char *module_name,
676 u32 line_number, acpi_status status, const char *format, ...);
677
678 ACPI_PRINTF_LIKE(3)
679 void ACPI_INTERNAL_VAR_XFACE
680 acpi_warning(const char *module_name, u32 line_number, const char *format, ...);
681
682 ACPI_PRINTF_LIKE(3)
683 void ACPI_INTERNAL_VAR_XFACE
684 acpi_info(const char *module_name, u32 line_number, const char *format, ...);
685
686 ACPI_PRINTF_LIKE(3)
687 void ACPI_INTERNAL_VAR_XFACE
688 acpi_bios_error(const char *module_name,
689 u32 line_number, const char *format, ...);
690
691 ACPI_PRINTF_LIKE(3)
692 void ACPI_INTERNAL_VAR_XFACE
693 acpi_bios_warning(const char *module_name,
694 u32 line_number, const char *format, ...);
695
696 /*
697 * Debug output
698 */
699 #ifdef ACPI_DEBUG_OUTPUT
700
701 ACPI_PRINTF_LIKE(6)
702 void ACPI_INTERNAL_VAR_XFACE
703 acpi_debug_print(u32 requested_debug_level,
704 u32 line_number,
705 const char *function_name,
706 const char *module_name,
707 u32 component_id, const char *format, ...);
708
709 ACPI_PRINTF_LIKE(6)
710 void ACPI_INTERNAL_VAR_XFACE
711 acpi_debug_print_raw(u32 requested_debug_level,
712 u32 line_number,
713 const char *function_name,
714 const char *module_name,
715 u32 component_id, const char *format, ...);
716 #endif
717
718 #endif /* __ACXFACE_H__ */
This page took 0.045388 seconds and 6 git commands to generate.