1 2 /****************************************************************************** 3 * 4 * Name: acpixf.h - External interfaces to the ACPI subsystem 5 * 6 *****************************************************************************/ 7 8 /* 9 * Copyright (C) 2000 - 2007, 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 */ 44 45 #ifndef __ACXFACE_H__ 46 #define __ACXFACE_H__ 47 48 #include "actypes.h" 49 #include "actbl.h" 50 51 /* 52 * Global interfaces 53 */ 54 acpi_status 55 acpi_initialize_tables(struct acpi_table_desc *initial_storage, 56 u32 initial_table_count, u8 allow_resize); 57 58 const char *acpi_format_exception(acpi_status exception); 59 60 /* 61 * ACPI table manipulation interfaces 62 */ 63 acpi_status acpi_reallocate_root_table(void); 64 65 acpi_status acpi_find_root_pointer(acpi_native_uint * rsdp_address); 66 67 acpi_status acpi_load_tables(void); 68 69 acpi_status acpi_load_table(struct acpi_table_header *table_ptr); 70 71 acpi_status 72 acpi_get_table_header(acpi_string signature, 73 acpi_native_uint instance, 74 struct acpi_table_header *out_table_header); 75 76 acpi_status 77 acpi_get_table(acpi_string signature, 78 acpi_native_uint instance, struct acpi_table_header **out_table); 79 80 acpi_status 81 acpi_get_table_phys(acpi_string signature, acpi_native_uint instance, 82 acpi_physical_address *addr, acpi_native_uint *len); 83 /* 84 * Namespace and name interfaces 85 */ 86 acpi_status 87 acpi_get_handle(acpi_handle parent, 88 acpi_string pathname, acpi_handle * ret_handle); 89 90 acpi_status 91 acpi_debug_trace(char *name, u32 debug_level, u32 debug_layer, u32 flags); 92 93 acpi_status 94 acpi_get_object_info(acpi_handle handle, struct acpi_buffer *return_buffer); 95 96 acpi_status acpi_get_type(acpi_handle object, acpi_object_type * out_type); 97 98 acpi_status acpi_get_parent(acpi_handle object, acpi_handle * out_handle); 99 100 /* 101 * Hardware (ACPI device) interfaces 102 */ 103 acpi_status acpi_get_register(u32 register_id, u32 * return_value); 104 105 acpi_status acpi_set_register(u32 register_id, u32 value); 106 107 acpi_status 108 acpi_set_firmware_waking_vector(acpi_physical_address physical_address); 109 110 #ifdef ACPI_FUTURE_USAGE 111 acpi_status 112 acpi_get_firmware_waking_vector(acpi_physical_address * physical_address); 113 #endif 114 115 acpi_status 116 acpi_get_sleep_type_data(u8 sleep_state, u8 * slp_typ_a, u8 * slp_typ_b); 117 118 acpi_status acpi_enter_sleep_state_prep(u8 sleep_state); 119 120 acpi_status acpi_enter_sleep_state(u8 sleep_state); 121 122 acpi_status acpi_enter_sleep_state_s4bios(void); 123 124 acpi_status acpi_leave_sleep_state_prep(u8 sleep_state); 125 126 acpi_status acpi_leave_sleep_state(u8 sleep_state); 127 128 #endif /* __ACXFACE_H__ */ 129