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