diff options
author | Len Brown <len.brown@intel.com> | 2005-08-05 00:44:28 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-08-05 00:45:14 -0400 |
commit | 4be44fcd3bf648b782f4460fd06dfae6c42ded4b (patch) | |
tree | 5b5b7d296ea58786f53b95e5eac9565ff66890b0 /include/acpi/acutils.h | |
parent | c65ade4dc8b486e8c8b9b0a6399789a5428e2039 (diff) |
[ACPI] Lindent all ACPI files
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi/acutils.h')
-rw-r--r-- | include/acpi/acutils.h | 709 |
1 files changed, 219 insertions, 490 deletions
diff --git a/include/acpi/acutils.h b/include/acpi/acutils.h index 0e7b0a3e3b5e..c1086452696e 100644 --- a/include/acpi/acutils.h +++ b/include/acpi/acutils.h | |||
@@ -44,20 +44,17 @@ | |||
44 | #ifndef _ACUTILS_H | 44 | #ifndef _ACUTILS_H |
45 | #define _ACUTILS_H | 45 | #define _ACUTILS_H |
46 | 46 | ||
47 | |||
48 | typedef | 47 | typedef |
49 | acpi_status (*acpi_pkg_callback) ( | 48 | acpi_status(*acpi_pkg_callback) (u8 object_type, |
50 | u8 object_type, | 49 | union acpi_operand_object * source_object, |
51 | union acpi_operand_object *source_object, | 50 | union acpi_generic_state * state, |
52 | union acpi_generic_state *state, | 51 | void *context); |
53 | void *context); | 52 | |
54 | 53 | struct acpi_pkg_info { | |
55 | struct acpi_pkg_info | 54 | u8 *free_space; |
56 | { | 55 | acpi_size length; |
57 | u8 *free_space; | 56 | u32 object_space; |
58 | acpi_size length; | 57 | u32 num_packages; |
59 | u32 object_space; | ||
60 | u32 num_packages; | ||
61 | }; | 58 | }; |
62 | 59 | ||
63 | #define REF_INCREMENT (u16) 0 | 60 | #define REF_INCREMENT (u16) 0 |
@@ -71,163 +68,89 @@ struct acpi_pkg_info | |||
71 | #define DB_DWORD_DISPLAY 4 | 68 | #define DB_DWORD_DISPLAY 4 |
72 | #define DB_QWORD_DISPLAY 8 | 69 | #define DB_QWORD_DISPLAY 8 |
73 | 70 | ||
74 | |||
75 | /* | 71 | /* |
76 | * utglobal - Global data structures and procedures | 72 | * utglobal - Global data structures and procedures |
77 | */ | 73 | */ |
78 | void | 74 | void acpi_ut_init_globals(void); |
79 | acpi_ut_init_globals ( | ||
80 | void); | ||
81 | 75 | ||
82 | #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) | 76 | #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) |
83 | 77 | ||
84 | char * | 78 | char *acpi_ut_get_mutex_name(u32 mutex_id); |
85 | acpi_ut_get_mutex_name ( | ||
86 | u32 mutex_id); | ||
87 | 79 | ||
88 | #endif | 80 | #endif |
89 | 81 | ||
90 | char * | 82 | char *acpi_ut_get_type_name(acpi_object_type type); |
91 | acpi_ut_get_type_name ( | ||
92 | acpi_object_type type); | ||
93 | |||
94 | char * | ||
95 | acpi_ut_get_node_name ( | ||
96 | void *object); | ||
97 | 83 | ||
98 | char * | 84 | char *acpi_ut_get_node_name(void *object); |
99 | acpi_ut_get_descriptor_name ( | ||
100 | void *object); | ||
101 | 85 | ||
102 | char * | 86 | char *acpi_ut_get_descriptor_name(void *object); |
103 | acpi_ut_get_object_type_name ( | ||
104 | union acpi_operand_object *obj_desc); | ||
105 | 87 | ||
106 | char * | 88 | char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc); |
107 | acpi_ut_get_region_name ( | ||
108 | u8 space_id); | ||
109 | 89 | ||
110 | char * | 90 | char *acpi_ut_get_region_name(u8 space_id); |
111 | acpi_ut_get_event_name ( | ||
112 | u32 event_id); | ||
113 | 91 | ||
114 | char | 92 | char *acpi_ut_get_event_name(u32 event_id); |
115 | acpi_ut_hex_to_ascii_char ( | ||
116 | acpi_integer integer, | ||
117 | u32 position); | ||
118 | 93 | ||
119 | u8 | 94 | char acpi_ut_hex_to_ascii_char(acpi_integer integer, u32 position); |
120 | acpi_ut_valid_object_type ( | ||
121 | acpi_object_type type); | ||
122 | 95 | ||
96 | u8 acpi_ut_valid_object_type(acpi_object_type type); | ||
123 | 97 | ||
124 | /* | 98 | /* |
125 | * utinit - miscellaneous initialization and shutdown | 99 | * utinit - miscellaneous initialization and shutdown |
126 | */ | 100 | */ |
127 | acpi_status | 101 | acpi_status acpi_ut_hardware_initialize(void); |
128 | acpi_ut_hardware_initialize ( | ||
129 | void); | ||
130 | |||
131 | void | ||
132 | acpi_ut_subsystem_shutdown ( | ||
133 | void); | ||
134 | 102 | ||
135 | acpi_status | 103 | void acpi_ut_subsystem_shutdown(void); |
136 | acpi_ut_validate_fadt ( | ||
137 | void); | ||
138 | 104 | ||
105 | acpi_status acpi_ut_validate_fadt(void); | ||
139 | 106 | ||
140 | /* | 107 | /* |
141 | * utclib - Local implementations of C library functions | 108 | * utclib - Local implementations of C library functions |
142 | */ | 109 | */ |
143 | #ifndef ACPI_USE_SYSTEM_CLIBRARY | 110 | #ifndef ACPI_USE_SYSTEM_CLIBRARY |
144 | 111 | ||
145 | acpi_size | 112 | acpi_size acpi_ut_strlen(const char *string); |
146 | acpi_ut_strlen ( | 113 | |
147 | const char *string); | 114 | char *acpi_ut_strcpy(char *dst_string, const char *src_string); |
148 | 115 | ||
149 | char * | 116 | char *acpi_ut_strncpy(char *dst_string, |
150 | acpi_ut_strcpy ( | 117 | const char *src_string, acpi_size count); |
151 | char *dst_string, | 118 | |
152 | const char *src_string); | 119 | int acpi_ut_memcmp(const char *buffer1, const char *buffer2, acpi_size count); |
153 | 120 | ||
154 | char * | 121 | int acpi_ut_strncmp(const char *string1, const char *string2, acpi_size count); |
155 | acpi_ut_strncpy ( | 122 | |
156 | char *dst_string, | 123 | int acpi_ut_strcmp(const char *string1, const char *string2); |
157 | const char *src_string, | 124 | |
158 | acpi_size count); | 125 | char *acpi_ut_strcat(char *dst_string, const char *src_string); |
159 | 126 | ||
160 | int | 127 | char *acpi_ut_strncat(char *dst_string, |
161 | acpi_ut_memcmp ( | 128 | const char *src_string, acpi_size count); |
162 | const char *buffer1, | 129 | |
163 | const char *buffer2, | 130 | u32 acpi_ut_strtoul(const char *string, char **terminator, u32 base); |
164 | acpi_size count); | 131 | |
165 | 132 | char *acpi_ut_strstr(char *string1, char *string2); | |
166 | int | 133 | |
167 | acpi_ut_strncmp ( | 134 | void *acpi_ut_memcpy(void *dest, const void *src, acpi_size count); |
168 | const char *string1, | 135 | |
169 | const char *string2, | 136 | void *acpi_ut_memset(void *dest, acpi_native_uint value, acpi_size count); |
170 | acpi_size count); | 137 | |
171 | 138 | int acpi_ut_to_upper(int c); | |
172 | int | 139 | |
173 | acpi_ut_strcmp ( | 140 | int acpi_ut_to_lower(int c); |
174 | const char *string1, | ||
175 | const char *string2); | ||
176 | |||
177 | char * | ||
178 | acpi_ut_strcat ( | ||
179 | char *dst_string, | ||
180 | const char *src_string); | ||
181 | |||
182 | char * | ||
183 | acpi_ut_strncat ( | ||
184 | char *dst_string, | ||
185 | const char *src_string, | ||
186 | acpi_size count); | ||
187 | |||
188 | u32 | ||
189 | acpi_ut_strtoul ( | ||
190 | const char *string, | ||
191 | char **terminator, | ||
192 | u32 base); | ||
193 | |||
194 | char * | ||
195 | acpi_ut_strstr ( | ||
196 | char *string1, | ||
197 | char *string2); | ||
198 | |||
199 | void * | ||
200 | acpi_ut_memcpy ( | ||
201 | void *dest, | ||
202 | const void *src, | ||
203 | acpi_size count); | ||
204 | |||
205 | void * | ||
206 | acpi_ut_memset ( | ||
207 | void *dest, | ||
208 | acpi_native_uint value, | ||
209 | acpi_size count); | ||
210 | |||
211 | int | ||
212 | acpi_ut_to_upper ( | ||
213 | int c); | ||
214 | |||
215 | int | ||
216 | acpi_ut_to_lower ( | ||
217 | int c); | ||
218 | 141 | ||
219 | extern const u8 _acpi_ctype[]; | 142 | extern const u8 _acpi_ctype[]; |
220 | 143 | ||
221 | #define _ACPI_XA 0x00 /* extra alphabetic - not supported */ | 144 | #define _ACPI_XA 0x00 /* extra alphabetic - not supported */ |
222 | #define _ACPI_XS 0x40 /* extra space */ | 145 | #define _ACPI_XS 0x40 /* extra space */ |
223 | #define _ACPI_BB 0x00 /* BEL, BS, etc. - not supported */ | 146 | #define _ACPI_BB 0x00 /* BEL, BS, etc. - not supported */ |
224 | #define _ACPI_CN 0x20 /* CR, FF, HT, NL, VT */ | 147 | #define _ACPI_CN 0x20 /* CR, FF, HT, NL, VT */ |
225 | #define _ACPI_DI 0x04 /* '0'-'9' */ | 148 | #define _ACPI_DI 0x04 /* '0'-'9' */ |
226 | #define _ACPI_LO 0x02 /* 'a'-'z' */ | 149 | #define _ACPI_LO 0x02 /* 'a'-'z' */ |
227 | #define _ACPI_PU 0x10 /* punctuation */ | 150 | #define _ACPI_PU 0x10 /* punctuation */ |
228 | #define _ACPI_SP 0x08 /* space */ | 151 | #define _ACPI_SP 0x08 /* space */ |
229 | #define _ACPI_UP 0x01 /* 'A'-'Z' */ | 152 | #define _ACPI_UP 0x01 /* 'A'-'Z' */ |
230 | #define _ACPI_XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */ | 153 | #define _ACPI_XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */ |
231 | 154 | ||
232 | #define ACPI_IS_DIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI)) | 155 | #define ACPI_IS_DIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI)) |
233 | #define ACPI_IS_SPACE(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP)) | 156 | #define ACPI_IS_SPACE(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP)) |
@@ -238,517 +161,323 @@ extern const u8 _acpi_ctype[]; | |||
238 | #define ACPI_IS_ALPHA(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP)) | 161 | #define ACPI_IS_ALPHA(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP)) |
239 | #define ACPI_IS_ASCII(c) ((c) < 0x80) | 162 | #define ACPI_IS_ASCII(c) ((c) < 0x80) |
240 | 163 | ||
241 | #endif /* ACPI_USE_SYSTEM_CLIBRARY */ | 164 | #endif /* ACPI_USE_SYSTEM_CLIBRARY */ |
242 | |||
243 | 165 | ||
244 | /* | 166 | /* |
245 | * utcopy - Object construction and conversion interfaces | 167 | * utcopy - Object construction and conversion interfaces |
246 | */ | 168 | */ |
247 | acpi_status | 169 | acpi_status |
248 | acpi_ut_build_simple_object( | 170 | acpi_ut_build_simple_object(union acpi_operand_object *obj, |
249 | union acpi_operand_object *obj, | 171 | union acpi_object *user_obj, |
250 | union acpi_object *user_obj, | 172 | u8 * data_space, u32 * buffer_space_used); |
251 | u8 *data_space, | ||
252 | u32 *buffer_space_used); | ||
253 | 173 | ||
254 | acpi_status | 174 | acpi_status |
255 | acpi_ut_build_package_object ( | 175 | acpi_ut_build_package_object(union acpi_operand_object *obj, |
256 | union acpi_operand_object *obj, | 176 | u8 * buffer, u32 * space_used); |
257 | u8 *buffer, | ||
258 | u32 *space_used); | ||
259 | 177 | ||
260 | acpi_status | 178 | acpi_status |
261 | acpi_ut_copy_iobject_to_eobject ( | 179 | acpi_ut_copy_iobject_to_eobject(union acpi_operand_object *obj, |
262 | union acpi_operand_object *obj, | 180 | struct acpi_buffer *ret_buffer); |
263 | struct acpi_buffer *ret_buffer); | ||
264 | 181 | ||
265 | acpi_status | 182 | acpi_status |
266 | acpi_ut_copy_eobject_to_iobject ( | 183 | acpi_ut_copy_eobject_to_iobject(union acpi_object *obj, |
267 | union acpi_object *obj, | 184 | union acpi_operand_object **internal_obj); |
268 | union acpi_operand_object **internal_obj); | ||
269 | 185 | ||
270 | acpi_status | 186 | acpi_status |
271 | acpi_ut_copy_isimple_to_isimple ( | 187 | acpi_ut_copy_isimple_to_isimple(union acpi_operand_object *source_obj, |
272 | union acpi_operand_object *source_obj, | 188 | union acpi_operand_object *dest_obj); |
273 | union acpi_operand_object *dest_obj); | ||
274 | 189 | ||
275 | acpi_status | 190 | acpi_status |
276 | acpi_ut_copy_iobject_to_iobject ( | 191 | acpi_ut_copy_iobject_to_iobject(union acpi_operand_object *source_desc, |
277 | union acpi_operand_object *source_desc, | 192 | union acpi_operand_object **dest_desc, |
278 | union acpi_operand_object **dest_desc, | 193 | struct acpi_walk_state *walk_state); |
279 | struct acpi_walk_state *walk_state); | ||
280 | |||
281 | 194 | ||
282 | /* | 195 | /* |
283 | * utcreate - Object creation | 196 | * utcreate - Object creation |
284 | */ | 197 | */ |
285 | acpi_status | 198 | acpi_status |
286 | acpi_ut_update_object_reference ( | 199 | acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action); |
287 | union acpi_operand_object *object, | ||
288 | u16 action); | ||
289 | |||
290 | 200 | ||
291 | /* | 201 | /* |
292 | * utdebug - Debug interfaces | 202 | * utdebug - Debug interfaces |
293 | */ | 203 | */ |
294 | void | 204 | void acpi_ut_init_stack_ptr_trace(void); |
295 | acpi_ut_init_stack_ptr_trace ( | ||
296 | void); | ||
297 | 205 | ||
298 | void | 206 | void acpi_ut_track_stack_ptr(void); |
299 | acpi_ut_track_stack_ptr ( | ||
300 | void); | ||
301 | 207 | ||
302 | void | 208 | void |
303 | acpi_ut_trace ( | 209 | acpi_ut_trace(u32 line_number, |
304 | u32 line_number, | 210 | const char *function_name, char *module_name, u32 component_id); |
305 | const char *function_name, | ||
306 | char *module_name, | ||
307 | u32 component_id); | ||
308 | 211 | ||
309 | void | 212 | void |
310 | acpi_ut_trace_ptr ( | 213 | acpi_ut_trace_ptr(u32 line_number, |
311 | u32 line_number, | 214 | const char *function_name, |
312 | const char *function_name, | 215 | char *module_name, u32 component_id, void *pointer); |
313 | char *module_name, | ||
314 | u32 component_id, | ||
315 | void *pointer); | ||
316 | 216 | ||
317 | void | 217 | void |
318 | acpi_ut_trace_u32 ( | 218 | acpi_ut_trace_u32(u32 line_number, |
319 | u32 line_number, | 219 | const char *function_name, |
320 | const char *function_name, | 220 | char *module_name, u32 component_id, u32 integer); |
321 | char *module_name, | ||
322 | u32 component_id, | ||
323 | u32 integer); | ||
324 | 221 | ||
325 | void | 222 | void |
326 | acpi_ut_trace_str ( | 223 | acpi_ut_trace_str(u32 line_number, |
327 | u32 line_number, | 224 | const char *function_name, |
328 | const char *function_name, | 225 | char *module_name, u32 component_id, char *string); |
329 | char *module_name, | ||
330 | u32 component_id, | ||
331 | char *string); | ||
332 | 226 | ||
333 | void | 227 | void |
334 | acpi_ut_exit ( | 228 | acpi_ut_exit(u32 line_number, |
335 | u32 line_number, | 229 | const char *function_name, char *module_name, u32 component_id); |
336 | const char *function_name, | ||
337 | char *module_name, | ||
338 | u32 component_id); | ||
339 | 230 | ||
340 | void | 231 | void |
341 | acpi_ut_status_exit ( | 232 | acpi_ut_status_exit(u32 line_number, |
342 | u32 line_number, | 233 | const char *function_name, |
343 | const char *function_name, | 234 | char *module_name, u32 component_id, acpi_status status); |
344 | char *module_name, | ||
345 | u32 component_id, | ||
346 | acpi_status status); | ||
347 | 235 | ||
348 | void | 236 | void |
349 | acpi_ut_value_exit ( | 237 | acpi_ut_value_exit(u32 line_number, |
350 | u32 line_number, | 238 | const char *function_name, |
351 | const char *function_name, | 239 | char *module_name, u32 component_id, acpi_integer value); |
352 | char *module_name, | ||
353 | u32 component_id, | ||
354 | acpi_integer value); | ||
355 | 240 | ||
356 | void | 241 | void |
357 | acpi_ut_ptr_exit ( | 242 | acpi_ut_ptr_exit(u32 line_number, |
358 | u32 line_number, | 243 | const char *function_name, |
359 | const char *function_name, | 244 | char *module_name, u32 component_id, u8 * ptr); |
360 | char *module_name, | ||
361 | u32 component_id, | ||
362 | u8 *ptr); | ||
363 | 245 | ||
364 | void | 246 | void acpi_ut_report_info(char *module_name, u32 line_number, u32 component_id); |
365 | acpi_ut_report_info ( | ||
366 | char *module_name, | ||
367 | u32 line_number, | ||
368 | u32 component_id); | ||
369 | 247 | ||
370 | void | 248 | void acpi_ut_report_error(char *module_name, u32 line_number, u32 component_id); |
371 | acpi_ut_report_error ( | ||
372 | char *module_name, | ||
373 | u32 line_number, | ||
374 | u32 component_id); | ||
375 | 249 | ||
376 | void | 250 | void |
377 | acpi_ut_report_warning ( | 251 | acpi_ut_report_warning(char *module_name, u32 line_number, u32 component_id); |
378 | char *module_name, | ||
379 | u32 line_number, | ||
380 | u32 component_id); | ||
381 | 252 | ||
382 | void | 253 | void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id); |
383 | acpi_ut_dump_buffer ( | ||
384 | u8 *buffer, | ||
385 | u32 count, | ||
386 | u32 display, | ||
387 | u32 component_id); | ||
388 | 254 | ||
389 | void ACPI_INTERNAL_VAR_XFACE | 255 | void ACPI_INTERNAL_VAR_XFACE |
390 | acpi_ut_debug_print ( | 256 | acpi_ut_debug_print(u32 requested_debug_level, |
391 | u32 requested_debug_level, | 257 | u32 line_number, |
392 | u32 line_number, | 258 | const char *function_name, |
393 | const char *function_name, | 259 | char *module_name, |
394 | char *module_name, | 260 | u32 component_id, char *format, ...) ACPI_PRINTF_LIKE_FUNC; |
395 | u32 component_id, | ||
396 | char *format, | ||
397 | ...) ACPI_PRINTF_LIKE_FUNC; | ||
398 | 261 | ||
399 | void ACPI_INTERNAL_VAR_XFACE | 262 | void ACPI_INTERNAL_VAR_XFACE |
400 | acpi_ut_debug_print_raw ( | 263 | acpi_ut_debug_print_raw(u32 requested_debug_level, |
401 | u32 requested_debug_level, | 264 | u32 line_number, |
402 | u32 line_number, | 265 | const char *function_name, |
403 | const char *function_name, | 266 | char *module_name, |
404 | char *module_name, | 267 | u32 component_id, |
405 | u32 component_id, | 268 | char *format, ...) ACPI_PRINTF_LIKE_FUNC; |
406 | char *format, | ||
407 | ...) ACPI_PRINTF_LIKE_FUNC; | ||
408 | |||
409 | 269 | ||
410 | /* | 270 | /* |
411 | * utdelete - Object deletion and reference counts | 271 | * utdelete - Object deletion and reference counts |
412 | */ | 272 | */ |
413 | void | 273 | void acpi_ut_add_reference(union acpi_operand_object *object); |
414 | acpi_ut_add_reference ( | ||
415 | union acpi_operand_object *object); | ||
416 | 274 | ||
417 | void | 275 | void acpi_ut_remove_reference(union acpi_operand_object *object); |
418 | acpi_ut_remove_reference ( | ||
419 | union acpi_operand_object *object); | ||
420 | 276 | ||
421 | void | 277 | void acpi_ut_delete_internal_package_object(union acpi_operand_object *object); |
422 | acpi_ut_delete_internal_package_object ( | ||
423 | union acpi_operand_object *object); | ||
424 | |||
425 | void | ||
426 | acpi_ut_delete_internal_simple_object ( | ||
427 | union acpi_operand_object *object); | ||
428 | 278 | ||
429 | void | 279 | void acpi_ut_delete_internal_simple_object(union acpi_operand_object *object); |
430 | acpi_ut_delete_internal_object_list ( | ||
431 | union acpi_operand_object **obj_list); | ||
432 | 280 | ||
281 | void acpi_ut_delete_internal_object_list(union acpi_operand_object **obj_list); | ||
433 | 282 | ||
434 | /* | 283 | /* |
435 | * uteval - object evaluation | 284 | * uteval - object evaluation |
436 | */ | 285 | */ |
437 | acpi_status | 286 | acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state); |
438 | acpi_ut_osi_implementation ( | ||
439 | struct acpi_walk_state *walk_state); | ||
440 | 287 | ||
441 | acpi_status | 288 | acpi_status |
442 | acpi_ut_evaluate_object ( | 289 | acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node, |
443 | struct acpi_namespace_node *prefix_node, | 290 | char *path, |
444 | char *path, | 291 | u32 expected_return_btypes, |
445 | u32 expected_return_btypes, | 292 | union acpi_operand_object **return_desc); |
446 | union acpi_operand_object **return_desc); | ||
447 | 293 | ||
448 | acpi_status | 294 | acpi_status |
449 | acpi_ut_evaluate_numeric_object ( | 295 | acpi_ut_evaluate_numeric_object(char *object_name, |
450 | char *object_name, | 296 | struct acpi_namespace_node *device_node, |
451 | struct acpi_namespace_node *device_node, | 297 | acpi_integer * address); |
452 | acpi_integer *address); | ||
453 | 298 | ||
454 | acpi_status | 299 | acpi_status |
455 | acpi_ut_execute_HID ( | 300 | acpi_ut_execute_HID(struct acpi_namespace_node *device_node, |
456 | struct acpi_namespace_node *device_node, | 301 | struct acpi_device_id *hid); |
457 | struct acpi_device_id *hid); | ||
458 | 302 | ||
459 | acpi_status | 303 | acpi_status |
460 | acpi_ut_execute_CID ( | 304 | acpi_ut_execute_CID(struct acpi_namespace_node *device_node, |
461 | struct acpi_namespace_node *device_node, | 305 | struct acpi_compatible_id_list **return_cid_list); |
462 | struct acpi_compatible_id_list **return_cid_list); | ||
463 | 306 | ||
464 | acpi_status | 307 | acpi_status |
465 | acpi_ut_execute_STA ( | 308 | acpi_ut_execute_STA(struct acpi_namespace_node *device_node, |
466 | struct acpi_namespace_node *device_node, | 309 | u32 * status_flags); |
467 | u32 *status_flags); | ||
468 | 310 | ||
469 | acpi_status | 311 | acpi_status |
470 | acpi_ut_execute_UID ( | 312 | acpi_ut_execute_UID(struct acpi_namespace_node *device_node, |
471 | struct acpi_namespace_node *device_node, | 313 | struct acpi_device_id *uid); |
472 | struct acpi_device_id *uid); | ||
473 | 314 | ||
474 | acpi_status | 315 | acpi_status |
475 | acpi_ut_execute_sxds ( | 316 | acpi_ut_execute_sxds(struct acpi_namespace_node *device_node, u8 * highest); |
476 | struct acpi_namespace_node *device_node, | ||
477 | u8 *highest); | ||
478 | |||
479 | 317 | ||
480 | /* | 318 | /* |
481 | * utobject - internal object create/delete/cache routines | 319 | * utobject - internal object create/delete/cache routines |
482 | */ | 320 | */ |
483 | union acpi_operand_object * | 321 | union acpi_operand_object *acpi_ut_create_internal_object_dbg(char *module_name, |
484 | acpi_ut_create_internal_object_dbg ( | 322 | u32 line_number, |
485 | char *module_name, | 323 | u32 component_id, |
486 | u32 line_number, | 324 | acpi_object_type |
487 | u32 component_id, | 325 | type); |
488 | acpi_object_type type); | 326 | |
489 | 327 | void *acpi_ut_allocate_object_desc_dbg(char *module_name, | |
490 | void * | 328 | u32 line_number, u32 component_id); |
491 | acpi_ut_allocate_object_desc_dbg ( | ||
492 | char *module_name, | ||
493 | u32 line_number, | ||
494 | u32 component_id); | ||
495 | 329 | ||
496 | #define acpi_ut_create_internal_object(t) acpi_ut_create_internal_object_dbg (_acpi_module_name,__LINE__,_COMPONENT,t) | 330 | #define acpi_ut_create_internal_object(t) acpi_ut_create_internal_object_dbg (_acpi_module_name,__LINE__,_COMPONENT,t) |
497 | #define acpi_ut_allocate_object_desc() acpi_ut_allocate_object_desc_dbg (_acpi_module_name,__LINE__,_COMPONENT) | 331 | #define acpi_ut_allocate_object_desc() acpi_ut_allocate_object_desc_dbg (_acpi_module_name,__LINE__,_COMPONENT) |
498 | 332 | ||
499 | void | 333 | void acpi_ut_delete_object_desc(union acpi_operand_object *object); |
500 | acpi_ut_delete_object_desc ( | ||
501 | union acpi_operand_object *object); | ||
502 | 334 | ||
503 | u8 | 335 | u8 acpi_ut_valid_internal_object(void *object); |
504 | acpi_ut_valid_internal_object ( | ||
505 | void *object); | ||
506 | 336 | ||
507 | union acpi_operand_object * | 337 | union acpi_operand_object *acpi_ut_create_buffer_object(acpi_size buffer_size); |
508 | acpi_ut_create_buffer_object ( | ||
509 | acpi_size buffer_size); | ||
510 | 338 | ||
511 | union acpi_operand_object * | 339 | union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size); |
512 | acpi_ut_create_string_object ( | ||
513 | acpi_size string_size); | ||
514 | 340 | ||
515 | acpi_status | 341 | acpi_status |
516 | acpi_ut_get_object_size( | 342 | acpi_ut_get_object_size(union acpi_operand_object *obj, acpi_size * obj_length); |
517 | union acpi_operand_object *obj, | ||
518 | acpi_size *obj_length); | ||
519 | |||
520 | 343 | ||
521 | /* | 344 | /* |
522 | * utstate - Generic state creation/cache routines | 345 | * utstate - Generic state creation/cache routines |
523 | */ | 346 | */ |
524 | void | 347 | void |
525 | acpi_ut_push_generic_state ( | 348 | acpi_ut_push_generic_state(union acpi_generic_state **list_head, |
526 | union acpi_generic_state **list_head, | 349 | union acpi_generic_state *state); |
527 | union acpi_generic_state *state); | ||
528 | |||
529 | union acpi_generic_state * | ||
530 | acpi_ut_pop_generic_state ( | ||
531 | union acpi_generic_state **list_head); | ||
532 | 350 | ||
351 | union acpi_generic_state *acpi_ut_pop_generic_state(union acpi_generic_state | ||
352 | **list_head); | ||
533 | 353 | ||
534 | union acpi_generic_state * | 354 | union acpi_generic_state *acpi_ut_create_generic_state(void); |
535 | acpi_ut_create_generic_state ( | ||
536 | void); | ||
537 | 355 | ||
538 | struct acpi_thread_state * | 356 | struct acpi_thread_state *acpi_ut_create_thread_state(void); |
539 | acpi_ut_create_thread_state ( | ||
540 | void); | ||
541 | 357 | ||
542 | union acpi_generic_state * | 358 | union acpi_generic_state *acpi_ut_create_update_state(union acpi_operand_object |
543 | acpi_ut_create_update_state ( | 359 | *object, u16 action); |
544 | union acpi_operand_object *object, | ||
545 | u16 action); | ||
546 | 360 | ||
547 | union acpi_generic_state * | 361 | union acpi_generic_state *acpi_ut_create_pkg_state(void *internal_object, |
548 | acpi_ut_create_pkg_state ( | 362 | void *external_object, |
549 | void *internal_object, | 363 | u16 index); |
550 | void *external_object, | ||
551 | u16 index); | ||
552 | 364 | ||
553 | acpi_status | 365 | acpi_status |
554 | acpi_ut_create_update_state_and_push ( | 366 | acpi_ut_create_update_state_and_push(union acpi_operand_object *object, |
555 | union acpi_operand_object *object, | 367 | u16 action, |
556 | u16 action, | 368 | union acpi_generic_state **state_list); |
557 | union acpi_generic_state **state_list); | ||
558 | 369 | ||
559 | #ifdef ACPI_FUTURE_USAGE | 370 | #ifdef ACPI_FUTURE_USAGE |
560 | acpi_status | 371 | acpi_status |
561 | acpi_ut_create_pkg_state_and_push ( | 372 | acpi_ut_create_pkg_state_and_push(void *internal_object, |
562 | void *internal_object, | 373 | void *external_object, |
563 | void *external_object, | 374 | u16 index, |
564 | u16 index, | 375 | union acpi_generic_state **state_list); |
565 | union acpi_generic_state **state_list); | 376 | #endif /* ACPI_FUTURE_USAGE */ |
566 | #endif /* ACPI_FUTURE_USAGE */ | ||
567 | 377 | ||
568 | union acpi_generic_state * | 378 | union acpi_generic_state *acpi_ut_create_control_state(void); |
569 | acpi_ut_create_control_state ( | ||
570 | void); | ||
571 | |||
572 | void | ||
573 | acpi_ut_delete_generic_state ( | ||
574 | union acpi_generic_state *state); | ||
575 | 379 | ||
380 | void acpi_ut_delete_generic_state(union acpi_generic_state *state); | ||
576 | 381 | ||
577 | /* | 382 | /* |
578 | * utmath | 383 | * utmath |
579 | */ | 384 | */ |
580 | acpi_status | 385 | acpi_status |
581 | acpi_ut_divide ( | 386 | acpi_ut_divide(acpi_integer in_dividend, |
582 | acpi_integer in_dividend, | 387 | acpi_integer in_divisor, |
583 | acpi_integer in_divisor, | 388 | acpi_integer * out_quotient, acpi_integer * out_remainder); |
584 | acpi_integer *out_quotient, | ||
585 | acpi_integer *out_remainder); | ||
586 | 389 | ||
587 | acpi_status | 390 | acpi_status |
588 | acpi_ut_short_divide ( | 391 | acpi_ut_short_divide(acpi_integer in_dividend, |
589 | acpi_integer in_dividend, | 392 | u32 divisor, |
590 | u32 divisor, | 393 | acpi_integer * out_quotient, u32 * out_remainder); |
591 | acpi_integer *out_quotient, | ||
592 | u32 *out_remainder); | ||
593 | 394 | ||
594 | /* | 395 | /* |
595 | * utmisc | 396 | * utmisc |
596 | */ | 397 | */ |
597 | acpi_status | 398 | acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id); |
598 | acpi_ut_allocate_owner_id ( | ||
599 | acpi_owner_id *owner_id); | ||
600 | 399 | ||
601 | void | 400 | void acpi_ut_release_owner_id(acpi_owner_id * owner_id); |
602 | acpi_ut_release_owner_id ( | ||
603 | acpi_owner_id *owner_id); | ||
604 | 401 | ||
605 | acpi_status | 402 | acpi_status |
606 | acpi_ut_walk_package_tree ( | 403 | acpi_ut_walk_package_tree(union acpi_operand_object *source_object, |
607 | union acpi_operand_object *source_object, | 404 | void *target_object, |
608 | void *target_object, | 405 | acpi_pkg_callback walk_callback, void *context); |
609 | acpi_pkg_callback walk_callback, | ||
610 | void *context); | ||
611 | 406 | ||
612 | void | 407 | void acpi_ut_strupr(char *src_string); |
613 | acpi_ut_strupr ( | ||
614 | char *src_string); | ||
615 | 408 | ||
616 | void | 409 | void acpi_ut_print_string(char *string, u8 max_length); |
617 | acpi_ut_print_string ( | ||
618 | char *string, | ||
619 | u8 max_length); | ||
620 | 410 | ||
621 | u8 | 411 | u8 acpi_ut_valid_acpi_name(u32 name); |
622 | acpi_ut_valid_acpi_name ( | ||
623 | u32 name); | ||
624 | 412 | ||
625 | u8 | 413 | u8 acpi_ut_valid_acpi_character(char character); |
626 | acpi_ut_valid_acpi_character ( | ||
627 | char character); | ||
628 | 414 | ||
629 | acpi_status | 415 | acpi_status |
630 | acpi_ut_strtoul64 ( | 416 | acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer); |
631 | char *string, | ||
632 | u32 base, | ||
633 | acpi_integer *ret_integer); | ||
634 | 417 | ||
635 | /* Values for Base above (16=Hex, 10=Decimal) */ | 418 | /* Values for Base above (16=Hex, 10=Decimal) */ |
636 | 419 | ||
637 | #define ACPI_ANY_BASE 0 | 420 | #define ACPI_ANY_BASE 0 |
638 | 421 | ||
639 | u8 * | 422 | u8 *acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc); |
640 | acpi_ut_get_resource_end_tag ( | ||
641 | union acpi_operand_object *obj_desc); | ||
642 | 423 | ||
643 | u8 | 424 | u8 acpi_ut_generate_checksum(u8 * buffer, u32 length); |
644 | acpi_ut_generate_checksum ( | ||
645 | u8 *buffer, | ||
646 | u32 length); | ||
647 | 425 | ||
648 | u32 | 426 | u32 acpi_ut_dword_byte_swap(u32 value); |
649 | acpi_ut_dword_byte_swap ( | ||
650 | u32 value); | ||
651 | 427 | ||
652 | void | 428 | void acpi_ut_set_integer_width(u8 revision); |
653 | acpi_ut_set_integer_width ( | ||
654 | u8 revision); | ||
655 | 429 | ||
656 | #ifdef ACPI_DEBUG_OUTPUT | 430 | #ifdef ACPI_DEBUG_OUTPUT |
657 | void | 431 | void |
658 | acpi_ut_display_init_pathname ( | 432 | acpi_ut_display_init_pathname(u8 type, |
659 | u8 type, | 433 | struct acpi_namespace_node *obj_handle, |
660 | struct acpi_namespace_node *obj_handle, | 434 | char *path); |
661 | char *path); | ||
662 | 435 | ||
663 | #endif | 436 | #endif |
664 | 437 | ||
665 | |||
666 | /* | 438 | /* |
667 | * utmutex - mutex support | 439 | * utmutex - mutex support |
668 | */ | 440 | */ |
669 | acpi_status | 441 | acpi_status acpi_ut_mutex_initialize(void); |
670 | acpi_ut_mutex_initialize ( | ||
671 | void); | ||
672 | |||
673 | void | ||
674 | acpi_ut_mutex_terminate ( | ||
675 | void); | ||
676 | 442 | ||
677 | acpi_status | 443 | void acpi_ut_mutex_terminate(void); |
678 | acpi_ut_acquire_mutex ( | ||
679 | acpi_mutex_handle mutex_id); | ||
680 | 444 | ||
681 | acpi_status | 445 | acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id); |
682 | acpi_ut_release_mutex ( | ||
683 | acpi_mutex_handle mutex_id); | ||
684 | 446 | ||
447 | acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id); | ||
685 | 448 | ||
686 | /* | 449 | /* |
687 | * utalloc - memory allocation and object caching | 450 | * utalloc - memory allocation and object caching |
688 | */ | 451 | */ |
689 | acpi_status | 452 | acpi_status acpi_ut_create_caches(void); |
690 | acpi_ut_create_caches ( | ||
691 | void); | ||
692 | 453 | ||
693 | acpi_status | 454 | acpi_status acpi_ut_delete_caches(void); |
694 | acpi_ut_delete_caches ( | ||
695 | void); | ||
696 | 455 | ||
697 | acpi_status | 456 | acpi_status acpi_ut_validate_buffer(struct acpi_buffer *buffer); |
698 | acpi_ut_validate_buffer ( | ||
699 | struct acpi_buffer *buffer); | ||
700 | 457 | ||
701 | acpi_status | 458 | acpi_status |
702 | acpi_ut_initialize_buffer ( | 459 | acpi_ut_initialize_buffer(struct acpi_buffer *buffer, |
703 | struct acpi_buffer *buffer, | 460 | acpi_size required_length); |
704 | acpi_size required_length); | 461 | |
705 | 462 | void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line); | |
706 | void * | 463 | |
707 | acpi_ut_allocate ( | 464 | void *acpi_ut_callocate(acpi_size size, u32 component, char *module, u32 line); |
708 | acpi_size size, | ||
709 | u32 component, | ||
710 | char *module, | ||
711 | u32 line); | ||
712 | |||
713 | void * | ||
714 | acpi_ut_callocate ( | ||
715 | acpi_size size, | ||
716 | u32 component, | ||
717 | char *module, | ||
718 | u32 line); | ||
719 | 465 | ||
720 | #ifdef ACPI_DBG_TRACK_ALLOCATIONS | 466 | #ifdef ACPI_DBG_TRACK_ALLOCATIONS |
721 | void * | 467 | void *acpi_ut_allocate_and_track(acpi_size size, |
722 | acpi_ut_allocate_and_track ( | 468 | u32 component, char *module, u32 line); |
723 | acpi_size size, | 469 | |
724 | u32 component, | 470 | void *acpi_ut_callocate_and_track(acpi_size size, |
725 | char *module, | 471 | u32 component, char *module, u32 line); |
726 | u32 line); | ||
727 | |||
728 | void * | ||
729 | acpi_ut_callocate_and_track ( | ||
730 | acpi_size size, | ||
731 | u32 component, | ||
732 | char *module, | ||
733 | u32 line); | ||
734 | 472 | ||
735 | void | 473 | void |
736 | acpi_ut_free_and_track ( | 474 | acpi_ut_free_and_track(void *address, u32 component, char *module, u32 line); |
737 | void *address, | ||
738 | u32 component, | ||
739 | char *module, | ||
740 | u32 line); | ||
741 | 475 | ||
742 | #ifdef ACPI_FUTURE_USAGE | 476 | #ifdef ACPI_FUTURE_USAGE |
743 | void | 477 | void acpi_ut_dump_allocation_info(void); |
744 | acpi_ut_dump_allocation_info ( | 478 | #endif /* ACPI_FUTURE_USAGE */ |
745 | void); | ||
746 | #endif /* ACPI_FUTURE_USAGE */ | ||
747 | 479 | ||
748 | void | 480 | void acpi_ut_dump_allocations(u32 component, char *module); |
749 | acpi_ut_dump_allocations ( | ||
750 | u32 component, | ||
751 | char *module); | ||
752 | #endif | 481 | #endif |
753 | 482 | ||
754 | #endif /* _ACUTILS_H */ | 483 | #endif /* _ACUTILS_H */ |