Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /****************************************************************************** |
| 2 | * |
| 3 | * Name: acinterp.h - Interpreter subcomponent prototypes and defines |
| 4 | * |
| 5 | *****************************************************************************/ |
| 6 | |
| 7 | /* |
| 8 | * Copyright (C) 2000 - 2005, 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 __ACINTERP_H__ |
| 45 | #define __ACINTERP_H__ |
| 46 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 47 | #define ACPI_WALK_OPERANDS (&(walk_state->operands [walk_state->num_operands -1])) |
| 48 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 49 | /* |
| 50 | * exconvrt - object conversion |
| 51 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 52 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 53 | acpi_ex_convert_to_integer(union acpi_operand_object *obj_desc, |
| 54 | union acpi_operand_object **result_desc, u32 flags); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 55 | |
| 56 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 57 | acpi_ex_convert_to_buffer(union acpi_operand_object *obj_desc, |
| 58 | union acpi_operand_object **result_desc); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 59 | |
| 60 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 61 | acpi_ex_convert_to_string(union acpi_operand_object *obj_desc, |
| 62 | union acpi_operand_object **result_desc, u32 type); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 63 | |
| 64 | /* Types for ->String conversion */ |
| 65 | |
| 66 | #define ACPI_EXPLICIT_BYTE_COPY 0x00000000 |
| 67 | #define ACPI_EXPLICIT_CONVERT_HEX 0x00000001 |
| 68 | #define ACPI_IMPLICIT_CONVERT_HEX 0x00000002 |
| 69 | #define ACPI_EXPLICIT_CONVERT_DECIMAL 0x00000003 |
| 70 | |
| 71 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 72 | acpi_ex_convert_to_target_type(acpi_object_type destination_type, |
| 73 | union acpi_operand_object *source_desc, |
| 74 | union acpi_operand_object **result_desc, |
| 75 | struct acpi_walk_state *walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 76 | |
| 77 | /* |
| 78 | * exfield - ACPI AML (p-code) execution - field manipulation |
| 79 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 80 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 81 | acpi_ex_common_buffer_setup(union acpi_operand_object *obj_desc, |
| 82 | u32 buffer_length, u32 * datum_count); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 83 | |
| 84 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 85 | acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc, |
| 86 | acpi_integer mask, |
| 87 | acpi_integer field_value, |
| 88 | u32 field_datum_byte_offset); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 89 | |
| 90 | void |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 91 | acpi_ex_get_buffer_datum(acpi_integer * datum, |
| 92 | void *buffer, |
| 93 | u32 buffer_length, |
| 94 | u32 byte_granularity, u32 buffer_offset); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 95 | |
| 96 | void |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 97 | acpi_ex_set_buffer_datum(acpi_integer merged_datum, |
| 98 | void *buffer, |
| 99 | u32 buffer_length, |
| 100 | u32 byte_granularity, u32 buffer_offset); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 101 | |
| 102 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 103 | acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state, |
| 104 | union acpi_operand_object *obj_desc, |
| 105 | union acpi_operand_object **ret_buffer_desc); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 106 | |
| 107 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 108 | acpi_ex_write_data_to_field(union acpi_operand_object *source_desc, |
| 109 | union acpi_operand_object *obj_desc, |
| 110 | union acpi_operand_object **result_desc); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 111 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 112 | /* |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 113 | * exfldio - low level field I/O |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 114 | */ |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 115 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 116 | acpi_ex_extract_from_field(union acpi_operand_object *obj_desc, |
| 117 | void *buffer, u32 buffer_length); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 118 | |
| 119 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 120 | acpi_ex_insert_into_field(union acpi_operand_object *obj_desc, |
| 121 | void *buffer, u32 buffer_length); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 122 | |
| 123 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 124 | acpi_ex_access_region(union acpi_operand_object *obj_desc, |
| 125 | u32 field_datum_byte_offset, |
| 126 | acpi_integer * value, u32 read_write); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 127 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 128 | /* |
| 129 | * exmisc - misc support routines |
| 130 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 131 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 132 | acpi_ex_get_object_reference(union acpi_operand_object *obj_desc, |
| 133 | union acpi_operand_object **return_desc, |
| 134 | struct acpi_walk_state *walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 135 | |
| 136 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 137 | acpi_ex_concat_template(union acpi_operand_object *obj_desc, |
| 138 | union acpi_operand_object *obj_desc2, |
| 139 | union acpi_operand_object **actual_return_desc, |
| 140 | struct acpi_walk_state *walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 141 | |
| 142 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 143 | acpi_ex_do_concatenate(union acpi_operand_object *obj_desc, |
| 144 | union acpi_operand_object *obj_desc2, |
| 145 | union acpi_operand_object **actual_return_desc, |
| 146 | struct acpi_walk_state *walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 147 | |
| 148 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 149 | acpi_ex_do_logical_numeric_op(u16 opcode, |
| 150 | acpi_integer integer0, |
| 151 | acpi_integer integer1, u8 * logical_result); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 152 | |
| 153 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 154 | acpi_ex_do_logical_op(u16 opcode, |
| 155 | union acpi_operand_object *operand0, |
| 156 | union acpi_operand_object *operand1, u8 * logical_result); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 157 | |
| 158 | acpi_integer |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 159 | acpi_ex_do_math_op(u16 opcode, acpi_integer operand0, acpi_integer operand1); |
| 160 | |
| 161 | acpi_status acpi_ex_create_mutex(struct acpi_walk_state *walk_state); |
| 162 | |
| 163 | acpi_status acpi_ex_create_processor(struct acpi_walk_state *walk_state); |
| 164 | |
| 165 | acpi_status acpi_ex_create_power_resource(struct acpi_walk_state *walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 166 | |
| 167 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 168 | acpi_ex_create_region(u8 * aml_start, |
| 169 | u32 aml_length, |
| 170 | u8 region_space, struct acpi_walk_state *walk_state); |
| 171 | |
| 172 | acpi_status acpi_ex_create_table_region(struct acpi_walk_state *walk_state); |
| 173 | |
| 174 | acpi_status acpi_ex_create_event(struct acpi_walk_state *walk_state); |
| 175 | |
| 176 | acpi_status acpi_ex_create_alias(struct acpi_walk_state *walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 177 | |
| 178 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 179 | acpi_ex_create_method(u8 * aml_start, |
| 180 | u32 aml_length, struct acpi_walk_state *walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 181 | |
| 182 | /* |
| 183 | * exconfig - dynamic table load/unload |
| 184 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 185 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 186 | acpi_ex_load_op(union acpi_operand_object *obj_desc, |
| 187 | union acpi_operand_object *target, |
| 188 | struct acpi_walk_state *walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 189 | |
| 190 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 191 | acpi_ex_load_table_op(struct acpi_walk_state *walk_state, |
| 192 | union acpi_operand_object **return_desc); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 193 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 194 | acpi_status acpi_ex_unload_table(union acpi_operand_object *ddb_handle); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 195 | |
| 196 | /* |
| 197 | * exmutex - mutex support |
| 198 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 199 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 200 | acpi_ex_acquire_mutex(union acpi_operand_object *time_desc, |
| 201 | union acpi_operand_object *obj_desc, |
| 202 | struct acpi_walk_state *walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 203 | |
| 204 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 205 | acpi_ex_release_mutex(union acpi_operand_object *obj_desc, |
| 206 | struct acpi_walk_state *walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 207 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 208 | void acpi_ex_release_all_mutexes(struct acpi_thread_state *thread); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 209 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 210 | void acpi_ex_unlink_mutex(union acpi_operand_object *obj_desc); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 211 | |
| 212 | /* |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 213 | * exprep - ACPI AML execution - prep utilities |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 214 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 215 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 216 | acpi_ex_prep_common_field_object(union acpi_operand_object *obj_desc, |
| 217 | u8 field_flags, |
| 218 | u8 field_attribute, |
| 219 | u32 field_bit_position, u32 field_bit_length); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 220 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 221 | acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 222 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 223 | /* |
| 224 | * exsystem - Interface to OS services |
| 225 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 226 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 227 | acpi_ex_system_do_notify_op(union acpi_operand_object *value, |
| 228 | union acpi_operand_object *obj_desc); |
| 229 | |
| 230 | acpi_status acpi_ex_system_do_suspend(acpi_integer time); |
| 231 | |
| 232 | acpi_status acpi_ex_system_do_stall(u32 time); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 233 | |
| 234 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 235 | acpi_ex_system_acquire_mutex(union acpi_operand_object *time, |
| 236 | union acpi_operand_object *obj_desc); |
| 237 | |
| 238 | acpi_status acpi_ex_system_release_mutex(union acpi_operand_object *obj_desc); |
| 239 | |
| 240 | acpi_status acpi_ex_system_signal_event(union acpi_operand_object *obj_desc); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 241 | |
| 242 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 243 | acpi_ex_system_wait_event(union acpi_operand_object *time, |
| 244 | union acpi_operand_object *obj_desc); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 245 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 246 | acpi_status acpi_ex_system_reset_event(union acpi_operand_object *obj_desc); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 247 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 248 | acpi_status acpi_ex_system_wait_semaphore(acpi_handle semaphore, u16 timeout); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 249 | |
| 250 | /* |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 251 | * exoparg1 - ACPI AML execution, 1 operand |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 252 | */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 253 | acpi_status acpi_ex_opcode_0A_0T_1R(struct acpi_walk_state *walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 254 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 255 | acpi_status acpi_ex_opcode_1A_0T_0R(struct acpi_walk_state *walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 256 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 257 | acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 258 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 259 | acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 260 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 261 | acpi_status acpi_ex_opcode_1A_1T_0R(struct acpi_walk_state *walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 262 | |
| 263 | /* |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 264 | * exoparg2 - ACPI AML execution, 2 operands |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 265 | */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 266 | acpi_status acpi_ex_opcode_2A_0T_0R(struct acpi_walk_state *walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 267 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 268 | acpi_status acpi_ex_opcode_2A_0T_1R(struct acpi_walk_state *walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 269 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 270 | acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 271 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 272 | acpi_status acpi_ex_opcode_2A_2T_1R(struct acpi_walk_state *walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 273 | |
| 274 | /* |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 275 | * exoparg3 - ACPI AML execution, 3 operands |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 276 | */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 277 | acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 278 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 279 | acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 280 | |
| 281 | /* |
| 282 | * exoparg6 - ACPI AML execution, 6 operands |
| 283 | */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 284 | acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state *walk_state); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 285 | |
| 286 | /* |
| 287 | * exresolv - Object resolution and get value functions |
| 288 | */ |
| 289 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 290 | acpi_ex_resolve_to_value(union acpi_operand_object **stack_ptr, |
| 291 | struct acpi_walk_state *walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 292 | |
| 293 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 294 | acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state, |
| 295 | union acpi_operand_object *operand, |
| 296 | acpi_object_type * return_type, |
| 297 | union acpi_operand_object **return_desc); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 298 | |
| 299 | /* |
| 300 | * exresnte - resolve namespace node |
| 301 | */ |
| 302 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 303 | acpi_ex_resolve_node_to_value(struct acpi_namespace_node **stack_ptr, |
| 304 | struct acpi_walk_state *walk_state); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 305 | |
| 306 | /* |
| 307 | * exresop - resolve operand to value |
| 308 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 309 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 310 | acpi_ex_resolve_operands(u16 opcode, |
| 311 | union acpi_operand_object **stack_ptr, |
| 312 | struct acpi_walk_state *walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 313 | |
| 314 | /* |
| 315 | * exdump - Interpreter debug output routines |
| 316 | */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 317 | void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 318 | |
| 319 | void |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 320 | acpi_ex_dump_operands(union acpi_operand_object **operands, |
| 321 | acpi_interpreter_mode interpreter_mode, |
| 322 | char *ident, |
| 323 | u32 num_levels, |
| 324 | char *note, char *module_name, u32 line_number); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 325 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 326 | #ifdef ACPI_FUTURE_USAGE |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 327 | void |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 328 | acpi_ex_dump_object_descriptor(union acpi_operand_object *object, u32 flags); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 329 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 330 | void acpi_ex_dump_node(struct acpi_namespace_node *node, u32 flags); |
| 331 | #endif /* ACPI_FUTURE_USAGE */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 332 | |
| 333 | /* |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 334 | * exnames - AML namestring support |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 335 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 336 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 337 | acpi_ex_get_name_string(acpi_object_type data_type, |
| 338 | u8 * in_aml_address, |
| 339 | char **out_name_string, u32 * out_name_length); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 340 | |
| 341 | /* |
| 342 | * exstore - Object store support |
| 343 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 344 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 345 | acpi_ex_store(union acpi_operand_object *val_desc, |
| 346 | union acpi_operand_object *dest_desc, |
| 347 | struct acpi_walk_state *walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 348 | |
| 349 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 350 | acpi_ex_store_object_to_node(union acpi_operand_object *source_desc, |
| 351 | struct acpi_namespace_node *node, |
| 352 | struct acpi_walk_state *walk_state, |
| 353 | u8 implicit_conversion); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 354 | |
| 355 | #define ACPI_IMPLICIT_CONVERSION TRUE |
| 356 | #define ACPI_NO_IMPLICIT_CONVERSION FALSE |
| 357 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 358 | /* |
| 359 | * exstoren - resolve/store object |
| 360 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 361 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 362 | acpi_ex_resolve_object(union acpi_operand_object **source_desc_ptr, |
| 363 | acpi_object_type target_type, |
| 364 | struct acpi_walk_state *walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 365 | |
| 366 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 367 | acpi_ex_store_object_to_object(union acpi_operand_object *source_desc, |
| 368 | union acpi_operand_object *dest_desc, |
| 369 | union acpi_operand_object **new_desc, |
| 370 | struct acpi_walk_state *walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 371 | |
| 372 | /* |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 373 | * exstorob - store object - buffer/string |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 374 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 375 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 376 | acpi_ex_store_buffer_to_buffer(union acpi_operand_object *source_desc, |
| 377 | union acpi_operand_object *target_desc); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 378 | |
| 379 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 380 | acpi_ex_store_string_to_string(union acpi_operand_object *source_desc, |
| 381 | union acpi_operand_object *target_desc); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 382 | |
| 383 | /* |
| 384 | * excopy - object copy |
| 385 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 386 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 387 | acpi_ex_copy_integer_to_index_field(union acpi_operand_object *source_desc, |
| 388 | union acpi_operand_object *target_desc); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 389 | |
| 390 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 391 | acpi_ex_copy_integer_to_bank_field(union acpi_operand_object *source_desc, |
| 392 | union acpi_operand_object *target_desc); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 393 | |
| 394 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 395 | acpi_ex_copy_data_to_named_field(union acpi_operand_object *source_desc, |
| 396 | struct acpi_namespace_node *node); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 397 | |
| 398 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 399 | acpi_ex_copy_integer_to_buffer_field(union acpi_operand_object *source_desc, |
| 400 | union acpi_operand_object *target_desc); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 401 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 402 | /* |
| 403 | * exutils - interpreter/scanner utilities |
| 404 | */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 405 | acpi_status acpi_ex_enter_interpreter(void); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 406 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 407 | void acpi_ex_exit_interpreter(void); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 408 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 409 | void acpi_ex_truncate_for32bit_table(union acpi_operand_object *obj_desc); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 410 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 411 | u8 acpi_ex_acquire_global_lock(u32 rule); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 412 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 413 | void acpi_ex_release_global_lock(u8 locked); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 414 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 415 | void acpi_ex_eisa_id_to_string(u32 numeric_id, char *out_string); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 416 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 417 | void acpi_ex_unsigned_integer_to_string(acpi_integer value, char *out_string); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 418 | |
| 419 | /* |
| 420 | * exregion - default op_region handlers |
| 421 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 422 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 423 | acpi_ex_system_memory_space_handler(u32 function, |
| 424 | acpi_physical_address address, |
| 425 | u32 bit_width, |
| 426 | acpi_integer * value, |
| 427 | void *handler_context, |
| 428 | void *region_context); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 429 | |
| 430 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 431 | acpi_ex_system_io_space_handler(u32 function, |
| 432 | acpi_physical_address address, |
| 433 | u32 bit_width, |
| 434 | acpi_integer * value, |
| 435 | void *handler_context, void *region_context); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 436 | |
| 437 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 438 | acpi_ex_pci_config_space_handler(u32 function, |
| 439 | acpi_physical_address address, |
| 440 | u32 bit_width, |
| 441 | acpi_integer * value, |
| 442 | void *handler_context, void *region_context); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 443 | |
| 444 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 445 | acpi_ex_cmos_space_handler(u32 function, |
| 446 | acpi_physical_address address, |
| 447 | u32 bit_width, |
| 448 | acpi_integer * value, |
| 449 | void *handler_context, void *region_context); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 450 | |
| 451 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 452 | acpi_ex_pci_bar_space_handler(u32 function, |
| 453 | acpi_physical_address address, |
| 454 | u32 bit_width, |
| 455 | acpi_integer * value, |
| 456 | void *handler_context, void *region_context); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 457 | |
| 458 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 459 | acpi_ex_embedded_controller_space_handler(u32 function, |
| 460 | acpi_physical_address address, |
| 461 | u32 bit_width, |
| 462 | acpi_integer * value, |
| 463 | void *handler_context, |
| 464 | void *region_context); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 465 | |
| 466 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 467 | acpi_ex_sm_bus_space_handler(u32 function, |
| 468 | acpi_physical_address address, |
| 469 | u32 bit_width, |
| 470 | acpi_integer * value, |
| 471 | void *handler_context, void *region_context); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 472 | |
| 473 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 474 | acpi_ex_data_table_space_handler(u32 function, |
| 475 | acpi_physical_address address, |
| 476 | u32 bit_width, |
| 477 | acpi_integer * value, |
| 478 | void *handler_context, void *region_context); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 479 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 480 | #endif /* __INTERP_H__ */ |