aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/acutils.h
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2005-08-05 00:44:28 -0400
committerLen Brown <len.brown@intel.com>2005-08-05 00:45:14 -0400
commit4be44fcd3bf648b782f4460fd06dfae6c42ded4b (patch)
tree5b5b7d296ea58786f53b95e5eac9565ff66890b0 /include/acpi/acutils.h
parentc65ade4dc8b486e8c8b9b0a6399789a5428e2039 (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.h709
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
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,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 */
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 83
98char * 84char *acpi_ut_get_node_name(void *object);
99acpi_ut_get_descriptor_name (
100 void *object);
101 85
102char * 86char *acpi_ut_get_descriptor_name(void *object);
103acpi_ut_get_object_type_name (
104 union acpi_operand_object *obj_desc);
105 87
106char * 88char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc);
107acpi_ut_get_region_name (
108 u8 space_id);
109 89
110char * 90char *acpi_ut_get_region_name(u8 space_id);
111acpi_ut_get_event_name (
112 u32 event_id);
113 91
114char 92char *acpi_ut_get_event_name(u32 event_id);
115acpi_ut_hex_to_ascii_char (
116 acpi_integer integer,
117 u32 position);
118 93
119u8 94char acpi_ut_hex_to_ascii_char(acpi_integer integer, u32 position);
120acpi_ut_valid_object_type (
121 acpi_object_type type);
122 95
96u8 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 */
127acpi_status 101acpi_status acpi_ut_hardware_initialize(void);
128acpi_ut_hardware_initialize (
129 void);
130
131void
132acpi_ut_subsystem_shutdown (
133 void);
134 102
135acpi_status 103void acpi_ut_subsystem_shutdown(void);
136acpi_ut_validate_fadt (
137 void);
138 104
105acpi_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
145acpi_size 112acpi_size acpi_ut_strlen(const char *string);
146acpi_ut_strlen ( 113
147 const char *string); 114char *acpi_ut_strcpy(char *dst_string, const char *src_string);
148 115
149char * 116char *acpi_ut_strncpy(char *dst_string,
150acpi_ut_strcpy ( 117 const char *src_string, acpi_size count);
151 char *dst_string, 118
152 const char *src_string); 119int acpi_ut_memcmp(const char *buffer1, const char *buffer2, acpi_size count);
153 120
154char * 121int acpi_ut_strncmp(const char *string1, const char *string2, acpi_size count);
155acpi_ut_strncpy ( 122
156 char *dst_string, 123int acpi_ut_strcmp(const char *string1, const char *string2);
157 const char *src_string, 124
158 acpi_size count); 125char *acpi_ut_strcat(char *dst_string, const char *src_string);
159 126
160int 127char *acpi_ut_strncat(char *dst_string,
161acpi_ut_memcmp ( 128 const char *src_string, acpi_size count);
162 const char *buffer1, 129
163 const char *buffer2, 130u32 acpi_ut_strtoul(const char *string, char **terminator, u32 base);
164 acpi_size count); 131
165 132char *acpi_ut_strstr(char *string1, char *string2);
166int 133
167acpi_ut_strncmp ( 134void *acpi_ut_memcpy(void *dest, const void *src, acpi_size count);
168 const char *string1, 135
169 const char *string2, 136void *acpi_ut_memset(void *dest, acpi_native_uint value, acpi_size count);
170 acpi_size count); 137
171 138int acpi_ut_to_upper(int c);
172int 139
173acpi_ut_strcmp ( 140int acpi_ut_to_lower(int c);
174 const char *string1,
175 const char *string2);
176
177char *
178acpi_ut_strcat (
179 char *dst_string,
180 const char *src_string);
181
182char *
183acpi_ut_strncat (
184 char *dst_string,
185 const char *src_string,
186 acpi_size count);
187
188u32
189acpi_ut_strtoul (
190 const char *string,
191 char **terminator,
192 u32 base);
193
194char *
195acpi_ut_strstr (
196 char *string1,
197 char *string2);
198
199void *
200acpi_ut_memcpy (
201 void *dest,
202 const void *src,
203 acpi_size count);
204
205void *
206acpi_ut_memset (
207 void *dest,
208 acpi_native_uint value,
209 acpi_size count);
210
211int
212acpi_ut_to_upper (
213 int c);
214
215int
216acpi_ut_to_lower (
217 int c);
218 141
219extern const u8 _acpi_ctype[]; 142extern 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 */
247acpi_status 169acpi_status
248acpi_ut_build_simple_object( 170acpi_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
254acpi_status 174acpi_status
255acpi_ut_build_package_object ( 175acpi_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
260acpi_status 178acpi_status
261acpi_ut_copy_iobject_to_eobject ( 179acpi_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
265acpi_status 182acpi_status
266acpi_ut_copy_eobject_to_iobject ( 183acpi_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
270acpi_status 186acpi_status
271acpi_ut_copy_isimple_to_isimple ( 187acpi_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
275acpi_status 190acpi_status
276acpi_ut_copy_iobject_to_iobject ( 191acpi_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 */
285acpi_status 198acpi_status
286acpi_ut_update_object_reference ( 199acpi_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 */
294void 204void acpi_ut_init_stack_ptr_trace(void);
295acpi_ut_init_stack_ptr_trace (
296 void);
297 205
298void 206void acpi_ut_track_stack_ptr(void);
299acpi_ut_track_stack_ptr (
300 void);
301 207
302void 208void
303acpi_ut_trace ( 209acpi_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
309void 212void
310acpi_ut_trace_ptr ( 213acpi_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
317void 217void
318acpi_ut_trace_u32 ( 218acpi_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
325void 222void
326acpi_ut_trace_str ( 223acpi_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
333void 227void
334acpi_ut_exit ( 228acpi_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
340void 231void
341acpi_ut_status_exit ( 232acpi_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
348void 236void
349acpi_ut_value_exit ( 237acpi_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
356void 241void
357acpi_ut_ptr_exit ( 242acpi_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
364void 246void acpi_ut_report_info(char *module_name, u32 line_number, u32 component_id);
365acpi_ut_report_info (
366 char *module_name,
367 u32 line_number,
368 u32 component_id);
369 247
370void 248void acpi_ut_report_error(char *module_name, u32 line_number, u32 component_id);
371acpi_ut_report_error (
372 char *module_name,
373 u32 line_number,
374 u32 component_id);
375 249
376void 250void
377acpi_ut_report_warning ( 251acpi_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
382void 253void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id);
383acpi_ut_dump_buffer (
384 u8 *buffer,
385 u32 count,
386 u32 display,
387 u32 component_id);
388 254
389void ACPI_INTERNAL_VAR_XFACE 255void ACPI_INTERNAL_VAR_XFACE
390acpi_ut_debug_print ( 256acpi_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
399void ACPI_INTERNAL_VAR_XFACE 262void ACPI_INTERNAL_VAR_XFACE
400acpi_ut_debug_print_raw ( 263acpi_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 */
413void 273void acpi_ut_add_reference(union acpi_operand_object *object);
414acpi_ut_add_reference (
415 union acpi_operand_object *object);
416 274
417void 275void acpi_ut_remove_reference(union acpi_operand_object *object);
418acpi_ut_remove_reference (
419 union acpi_operand_object *object);
420 276
421void 277void acpi_ut_delete_internal_package_object(union acpi_operand_object *object);
422acpi_ut_delete_internal_package_object (
423 union acpi_operand_object *object);
424
425void
426acpi_ut_delete_internal_simple_object (
427 union acpi_operand_object *object);
428 278
429void 279void acpi_ut_delete_internal_simple_object(union acpi_operand_object *object);
430acpi_ut_delete_internal_object_list (
431 union acpi_operand_object **obj_list);
432 280
281void 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 */
437acpi_status 286acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state);
438acpi_ut_osi_implementation (
439 struct acpi_walk_state *walk_state);
440 287
441acpi_status 288acpi_status
442acpi_ut_evaluate_object ( 289acpi_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
448acpi_status 294acpi_status
449acpi_ut_evaluate_numeric_object ( 295acpi_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
454acpi_status 299acpi_status
455acpi_ut_execute_HID ( 300acpi_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
459acpi_status 303acpi_status
460acpi_ut_execute_CID ( 304acpi_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
464acpi_status 307acpi_status
465acpi_ut_execute_STA ( 308acpi_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
469acpi_status 311acpi_status
470acpi_ut_execute_UID ( 312acpi_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
474acpi_status 315acpi_status
475acpi_ut_execute_sxds ( 316acpi_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 */
483union acpi_operand_object * 321union acpi_operand_object *acpi_ut_create_internal_object_dbg(char *module_name,
484acpi_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 327void *acpi_ut_allocate_object_desc_dbg(char *module_name,
490void * 328 u32 line_number, u32 component_id);
491acpi_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
499void 333void acpi_ut_delete_object_desc(union acpi_operand_object *object);
500acpi_ut_delete_object_desc (
501 union acpi_operand_object *object);
502 334
503u8 335u8 acpi_ut_valid_internal_object(void *object);
504acpi_ut_valid_internal_object (
505 void *object);
506 336
507union acpi_operand_object * 337union acpi_operand_object *acpi_ut_create_buffer_object(acpi_size buffer_size);
508acpi_ut_create_buffer_object (
509 acpi_size buffer_size);
510 338
511union acpi_operand_object * 339union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size);
512acpi_ut_create_string_object (
513 acpi_size string_size);
514 340
515acpi_status 341acpi_status
516acpi_ut_get_object_size( 342acpi_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 */
524void 347void
525acpi_ut_push_generic_state ( 348acpi_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
529union acpi_generic_state *
530acpi_ut_pop_generic_state (
531 union acpi_generic_state **list_head);
532 350
351union acpi_generic_state *acpi_ut_pop_generic_state(union acpi_generic_state
352 **list_head);
533 353
534union acpi_generic_state * 354union acpi_generic_state *acpi_ut_create_generic_state(void);
535acpi_ut_create_generic_state (
536 void);
537 355
538struct acpi_thread_state * 356struct acpi_thread_state *acpi_ut_create_thread_state(void);
539acpi_ut_create_thread_state (
540 void);
541 357
542union acpi_generic_state * 358union acpi_generic_state *acpi_ut_create_update_state(union acpi_operand_object
543acpi_ut_create_update_state ( 359 *object, u16 action);
544 union acpi_operand_object *object,
545 u16 action);
546 360
547union acpi_generic_state * 361union acpi_generic_state *acpi_ut_create_pkg_state(void *internal_object,
548acpi_ut_create_pkg_state ( 362 void *external_object,
549 void *internal_object, 363 u16 index);
550 void *external_object,
551 u16 index);
552 364
553acpi_status 365acpi_status
554acpi_ut_create_update_state_and_push ( 366acpi_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
560acpi_status 371acpi_status
561acpi_ut_create_pkg_state_and_push ( 372acpi_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
568union acpi_generic_state * 378union acpi_generic_state *acpi_ut_create_control_state(void);
569acpi_ut_create_control_state (
570 void);
571
572void
573acpi_ut_delete_generic_state (
574 union acpi_generic_state *state);
575 379
380void acpi_ut_delete_generic_state(union acpi_generic_state *state);
576 381
577/* 382/*
578 * utmath 383 * utmath
579 */ 384 */
580acpi_status 385acpi_status
581acpi_ut_divide ( 386acpi_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
587acpi_status 390acpi_status
588acpi_ut_short_divide ( 391acpi_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 */
597acpi_status 398acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id);
598acpi_ut_allocate_owner_id (
599 acpi_owner_id *owner_id);
600 399
601void 400void acpi_ut_release_owner_id(acpi_owner_id * owner_id);
602acpi_ut_release_owner_id (
603 acpi_owner_id *owner_id);
604 401
605acpi_status 402acpi_status
606acpi_ut_walk_package_tree ( 403acpi_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
612void 407void acpi_ut_strupr(char *src_string);
613acpi_ut_strupr (
614 char *src_string);
615 408
616void 409void acpi_ut_print_string(char *string, u8 max_length);
617acpi_ut_print_string (
618 char *string,
619 u8 max_length);
620 410
621u8 411u8 acpi_ut_valid_acpi_name(u32 name);
622acpi_ut_valid_acpi_name (
623 u32 name);
624 412
625u8 413u8 acpi_ut_valid_acpi_character(char character);
626acpi_ut_valid_acpi_character (
627 char character);
628 414
629acpi_status 415acpi_status
630acpi_ut_strtoul64 ( 416acpi_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
639u8 * 422u8 *acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc);
640acpi_ut_get_resource_end_tag (
641 union acpi_operand_object *obj_desc);
642 423
643u8 424u8 acpi_ut_generate_checksum(u8 * buffer, u32 length);
644acpi_ut_generate_checksum (
645 u8 *buffer,
646 u32 length);
647 425
648u32 426u32 acpi_ut_dword_byte_swap(u32 value);
649acpi_ut_dword_byte_swap (
650 u32 value);
651 427
652void 428void acpi_ut_set_integer_width(u8 revision);
653acpi_ut_set_integer_width (
654 u8 revision);
655 429
656#ifdef ACPI_DEBUG_OUTPUT 430#ifdef ACPI_DEBUG_OUTPUT
657void 431void
658acpi_ut_display_init_pathname ( 432acpi_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 */
669acpi_status 441acpi_status acpi_ut_mutex_initialize(void);
670acpi_ut_mutex_initialize (
671 void);
672
673void
674acpi_ut_mutex_terminate (
675 void);
676 442
677acpi_status 443void acpi_ut_mutex_terminate(void);
678acpi_ut_acquire_mutex (
679 acpi_mutex_handle mutex_id);
680 444
681acpi_status 445acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id);
682acpi_ut_release_mutex (
683 acpi_mutex_handle mutex_id);
684 446
447acpi_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 */
689acpi_status 452acpi_status acpi_ut_create_caches(void);
690acpi_ut_create_caches (
691 void);
692 453
693acpi_status 454acpi_status acpi_ut_delete_caches(void);
694acpi_ut_delete_caches (
695 void);
696 455
697acpi_status 456acpi_status acpi_ut_validate_buffer(struct acpi_buffer *buffer);
698acpi_ut_validate_buffer (
699 struct acpi_buffer *buffer);
700 457
701acpi_status 458acpi_status
702acpi_ut_initialize_buffer ( 459acpi_ut_initialize_buffer(struct acpi_buffer *buffer,
703 struct acpi_buffer *buffer, 460 acpi_size required_length);
704 acpi_size required_length); 461
705 462void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line);
706void * 463
707acpi_ut_allocate ( 464void *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
713void *
714acpi_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
721void * 467void *acpi_ut_allocate_and_track(acpi_size size,
722acpi_ut_allocate_and_track ( 468 u32 component, char *module, u32 line);
723 acpi_size size, 469
724 u32 component, 470void *acpi_ut_callocate_and_track(acpi_size size,
725 char *module, 471 u32 component, char *module, u32 line);
726 u32 line);
727
728void *
729acpi_ut_callocate_and_track (
730 acpi_size size,
731 u32 component,
732 char *module,
733 u32 line);
734 472
735void 473void
736acpi_ut_free_and_track ( 474acpi_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
743void 477void acpi_ut_dump_allocation_info(void);
744acpi_ut_dump_allocation_info ( 478#endif /* ACPI_FUTURE_USAGE */
745 void);
746#endif /* ACPI_FUTURE_USAGE */
747 479
748void 480void acpi_ut_dump_allocations(u32 component, char *module);
749acpi_ut_dump_allocations (
750 u32 component,
751 char *module);
752#endif 481#endif
753 482
754#endif /* _ACUTILS_H */ 483#endif /* _ACUTILS_H */