acutils.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875
  1. /******************************************************************************
  2. *
  3. * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
  4. *
  5. *****************************************************************************/
  6. /*
  7. * Copyright (C) 2000 - 2005, R. Byron Moore
  8. * All rights reserved.
  9. *
  10. * Redistribution and use in source and binary forms, with or without
  11. * modification, are permitted provided that the following conditions
  12. * are met:
  13. * 1. Redistributions of source code must retain the above copyright
  14. * notice, this list of conditions, and the following disclaimer,
  15. * without modification.
  16. * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  17. * substantially similar to the "NO WARRANTY" disclaimer below
  18. * ("Disclaimer") and any redistribution must be conditioned upon
  19. * including a substantially similar Disclaimer requirement for further
  20. * binary redistribution.
  21. * 3. Neither the names of the above-listed copyright holders nor the names
  22. * of any contributors may be used to endorse or promote products derived
  23. * from this software without specific prior written permission.
  24. *
  25. * Alternatively, this software may be distributed under the terms of the
  26. * GNU General Public License ("GPL") version 2 as published by the Free
  27. * Software Foundation.
  28. *
  29. * NO WARRANTY
  30. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  31. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  32. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
  33. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  34. * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  35. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  36. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  37. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  38. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  39. * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  40. * POSSIBILITY OF SUCH DAMAGES.
  41. */
  42. #ifndef _ACUTILS_H
  43. #define _ACUTILS_H
  44. typedef
  45. acpi_status (*acpi_pkg_callback) (
  46. u8 object_type,
  47. union acpi_operand_object *source_object,
  48. union acpi_generic_state *state,
  49. void *context);
  50. acpi_status
  51. acpi_ut_walk_package_tree (
  52. union acpi_operand_object *source_object,
  53. void *target_object,
  54. acpi_pkg_callback walk_callback,
  55. void *context);
  56. struct acpi_pkg_info
  57. {
  58. u8 *free_space;
  59. acpi_size length;
  60. u32 object_space;
  61. u32 num_packages;
  62. };
  63. #define REF_INCREMENT (u16) 0
  64. #define REF_DECREMENT (u16) 1
  65. #define REF_FORCE_DELETE (u16) 2
  66. /* acpi_ut_dump_buffer */
  67. #define DB_BYTE_DISPLAY 1
  68. #define DB_WORD_DISPLAY 2
  69. #define DB_DWORD_DISPLAY 4
  70. #define DB_QWORD_DISPLAY 8
  71. /* Global initialization interfaces */
  72. void
  73. acpi_ut_init_globals (
  74. void);
  75. void
  76. acpi_ut_terminate (
  77. void);
  78. /*
  79. * ut_init - miscellaneous initialization and shutdown
  80. */
  81. acpi_status
  82. acpi_ut_hardware_initialize (
  83. void);
  84. void
  85. acpi_ut_subsystem_shutdown (
  86. void);
  87. acpi_status
  88. acpi_ut_validate_fadt (
  89. void);
  90. /*
  91. * ut_global - Global data structures and procedures
  92. */
  93. #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
  94. char *
  95. acpi_ut_get_mutex_name (
  96. u32 mutex_id);
  97. #endif
  98. char *
  99. acpi_ut_get_type_name (
  100. acpi_object_type type);
  101. char *
  102. acpi_ut_get_node_name (
  103. void *object);
  104. char *
  105. acpi_ut_get_descriptor_name (
  106. void *object);
  107. char *
  108. acpi_ut_get_object_type_name (
  109. union acpi_operand_object *obj_desc);
  110. char *
  111. acpi_ut_get_region_name (
  112. u8 space_id);
  113. char *
  114. acpi_ut_get_event_name (
  115. u32 event_id);
  116. char
  117. acpi_ut_hex_to_ascii_char (
  118. acpi_integer integer,
  119. u32 position);
  120. u8
  121. acpi_ut_valid_object_type (
  122. acpi_object_type type);
  123. acpi_owner_id
  124. acpi_ut_allocate_owner_id (
  125. u32 id_type);
  126. /*
  127. * ut_clib - Local implementations of C library functions
  128. */
  129. #ifndef ACPI_USE_SYSTEM_CLIBRARY
  130. acpi_size
  131. acpi_ut_strlen (
  132. const char *string);
  133. char *
  134. acpi_ut_strcpy (
  135. char *dst_string,
  136. const char *src_string);
  137. char *
  138. acpi_ut_strncpy (
  139. char *dst_string,
  140. const char *src_string,
  141. acpi_size count);
  142. int
  143. acpi_ut_memcmp (
  144. const char *buffer1,
  145. const char *buffer2,
  146. acpi_size count);
  147. int
  148. acpi_ut_strncmp (
  149. const char *string1,
  150. const char *string2,
  151. acpi_size count);
  152. int
  153. acpi_ut_strcmp (
  154. const char *string1,
  155. const char *string2);
  156. char *
  157. acpi_ut_strcat (
  158. char *dst_string,
  159. const char *src_string);
  160. char *
  161. acpi_ut_strncat (
  162. char *dst_string,
  163. const char *src_string,
  164. acpi_size count);
  165. u32
  166. acpi_ut_strtoul (
  167. const char *string,
  168. char **terminator,
  169. u32 base);
  170. char *
  171. acpi_ut_strstr (
  172. char *string1,
  173. char *string2);
  174. void *
  175. acpi_ut_memcpy (
  176. void *dest,
  177. const void *src,
  178. acpi_size count);
  179. void *
  180. acpi_ut_memset (
  181. void *dest,
  182. acpi_native_uint value,
  183. acpi_size count);
  184. int
  185. acpi_ut_to_upper (
  186. int c);
  187. int
  188. acpi_ut_to_lower (
  189. int c);
  190. extern const u8 _acpi_ctype[];
  191. #define _ACPI_XA 0x00 /* extra alphabetic - not supported */
  192. #define _ACPI_XS 0x40 /* extra space */
  193. #define _ACPI_BB 0x00 /* BEL, BS, etc. - not supported */
  194. #define _ACPI_CN 0x20 /* CR, FF, HT, NL, VT */
  195. #define _ACPI_DI 0x04 /* '0'-'9' */
  196. #define _ACPI_LO 0x02 /* 'a'-'z' */
  197. #define _ACPI_PU 0x10 /* punctuation */
  198. #define _ACPI_SP 0x08 /* space */
  199. #define _ACPI_UP 0x01 /* 'A'-'Z' */
  200. #define _ACPI_XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */
  201. #define ACPI_IS_DIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI))
  202. #define ACPI_IS_SPACE(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP))
  203. #define ACPI_IS_XDIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_XD))
  204. #define ACPI_IS_UPPER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_UP))
  205. #define ACPI_IS_LOWER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO))
  206. #define ACPI_IS_PRINT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_SP | _ACPI_PU))
  207. #define ACPI_IS_ALPHA(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP))
  208. #define ACPI_IS_ASCII(c) ((c) < 0x80)
  209. #endif /* ACPI_USE_SYSTEM_CLIBRARY */
  210. /*
  211. * ut_copy - Object construction and conversion interfaces
  212. */
  213. acpi_status
  214. acpi_ut_build_simple_object(
  215. union acpi_operand_object *obj,
  216. union acpi_object *user_obj,
  217. u8 *data_space,
  218. u32 *buffer_space_used);
  219. acpi_status
  220. acpi_ut_build_package_object (
  221. union acpi_operand_object *obj,
  222. u8 *buffer,
  223. u32 *space_used);
  224. acpi_status
  225. acpi_ut_copy_ielement_to_eelement (
  226. u8 object_type,
  227. union acpi_operand_object *source_object,
  228. union acpi_generic_state *state,
  229. void *context);
  230. acpi_status
  231. acpi_ut_copy_ielement_to_ielement (
  232. u8 object_type,
  233. union acpi_operand_object *source_object,
  234. union acpi_generic_state *state,
  235. void *context);
  236. acpi_status
  237. acpi_ut_copy_iobject_to_eobject (
  238. union acpi_operand_object *obj,
  239. struct acpi_buffer *ret_buffer);
  240. acpi_status
  241. acpi_ut_copy_esimple_to_isimple(
  242. union acpi_object *user_obj,
  243. union acpi_operand_object **return_obj);
  244. acpi_status
  245. acpi_ut_copy_eobject_to_iobject (
  246. union acpi_object *obj,
  247. union acpi_operand_object **internal_obj);
  248. acpi_status
  249. acpi_ut_copy_isimple_to_isimple (
  250. union acpi_operand_object *source_obj,
  251. union acpi_operand_object *dest_obj);
  252. acpi_status
  253. acpi_ut_copy_ipackage_to_ipackage (
  254. union acpi_operand_object *source_obj,
  255. union acpi_operand_object *dest_obj,
  256. struct acpi_walk_state *walk_state);
  257. acpi_status
  258. acpi_ut_copy_simple_object (
  259. union acpi_operand_object *source_desc,
  260. union acpi_operand_object *dest_desc);
  261. acpi_status
  262. acpi_ut_copy_iobject_to_iobject (
  263. union acpi_operand_object *source_desc,
  264. union acpi_operand_object **dest_desc,
  265. struct acpi_walk_state *walk_state);
  266. /*
  267. * ut_create - Object creation
  268. */
  269. acpi_status
  270. acpi_ut_update_object_reference (
  271. union acpi_operand_object *object,
  272. u16 action);
  273. /*
  274. * ut_debug - Debug interfaces
  275. */
  276. void
  277. acpi_ut_init_stack_ptr_trace (
  278. void);
  279. void
  280. acpi_ut_track_stack_ptr (
  281. void);
  282. void
  283. acpi_ut_trace (
  284. u32 line_number,
  285. struct acpi_debug_print_info *dbg_info);
  286. void
  287. acpi_ut_trace_ptr (
  288. u32 line_number,
  289. struct acpi_debug_print_info *dbg_info,
  290. void *pointer);
  291. void
  292. acpi_ut_trace_u32 (
  293. u32 line_number,
  294. struct acpi_debug_print_info *dbg_info,
  295. u32 integer);
  296. void
  297. acpi_ut_trace_str (
  298. u32 line_number,
  299. struct acpi_debug_print_info *dbg_info,
  300. char *string);
  301. void
  302. acpi_ut_exit (
  303. u32 line_number,
  304. struct acpi_debug_print_info *dbg_info);
  305. void
  306. acpi_ut_status_exit (
  307. u32 line_number,
  308. struct acpi_debug_print_info *dbg_info,
  309. acpi_status status);
  310. void
  311. acpi_ut_value_exit (
  312. u32 line_number,
  313. struct acpi_debug_print_info *dbg_info,
  314. acpi_integer value);
  315. void
  316. acpi_ut_ptr_exit (
  317. u32 line_number,
  318. struct acpi_debug_print_info *dbg_info,
  319. u8 *ptr);
  320. void
  321. acpi_ut_report_info (
  322. char *module_name,
  323. u32 line_number,
  324. u32 component_id);
  325. void
  326. acpi_ut_report_error (
  327. char *module_name,
  328. u32 line_number,
  329. u32 component_id);
  330. void
  331. acpi_ut_report_warning (
  332. char *module_name,
  333. u32 line_number,
  334. u32 component_id);
  335. void
  336. acpi_ut_dump_buffer (
  337. u8 *buffer,
  338. u32 count,
  339. u32 display,
  340. u32 component_id);
  341. void ACPI_INTERNAL_VAR_XFACE
  342. acpi_ut_debug_print (
  343. u32 requested_debug_level,
  344. u32 line_number,
  345. struct acpi_debug_print_info *dbg_info,
  346. char *format,
  347. ...) ACPI_PRINTF_LIKE_FUNC;
  348. void ACPI_INTERNAL_VAR_XFACE
  349. acpi_ut_debug_print_raw (
  350. u32 requested_debug_level,
  351. u32 line_number,
  352. struct acpi_debug_print_info *dbg_info,
  353. char *format,
  354. ...) ACPI_PRINTF_LIKE_FUNC;
  355. /*
  356. * ut_delete - Object deletion
  357. */
  358. void
  359. acpi_ut_delete_internal_obj (
  360. union acpi_operand_object *object);
  361. void
  362. acpi_ut_delete_internal_package_object (
  363. union acpi_operand_object *object);
  364. void
  365. acpi_ut_delete_internal_simple_object (
  366. union acpi_operand_object *object);
  367. void
  368. acpi_ut_delete_internal_object_list (
  369. union acpi_operand_object **obj_list);
  370. /*
  371. * ut_eval - object evaluation
  372. */
  373. /* Method name strings */
  374. #define METHOD_NAME__HID "_HID"
  375. #define METHOD_NAME__CID "_CID"
  376. #define METHOD_NAME__UID "_UID"
  377. #define METHOD_NAME__ADR "_ADR"
  378. #define METHOD_NAME__STA "_STA"
  379. #define METHOD_NAME__REG "_REG"
  380. #define METHOD_NAME__SEG "_SEG"
  381. #define METHOD_NAME__BBN "_BBN"
  382. #define METHOD_NAME__PRT "_PRT"
  383. #define METHOD_NAME__CRS "_CRS"
  384. #define METHOD_NAME__PRS "_PRS"
  385. #define METHOD_NAME__PRW "_PRW"
  386. acpi_status
  387. acpi_ut_osi_implementation (
  388. struct acpi_walk_state *walk_state);
  389. acpi_status
  390. acpi_ut_evaluate_object (
  391. struct acpi_namespace_node *prefix_node,
  392. char *path,
  393. u32 expected_return_btypes,
  394. union acpi_operand_object **return_desc);
  395. acpi_status
  396. acpi_ut_evaluate_numeric_object (
  397. char *object_name,
  398. struct acpi_namespace_node *device_node,
  399. acpi_integer *address);
  400. acpi_status
  401. acpi_ut_execute_HID (
  402. struct acpi_namespace_node *device_node,
  403. struct acpi_device_id *hid);
  404. acpi_status
  405. acpi_ut_execute_CID (
  406. struct acpi_namespace_node *device_node,
  407. struct acpi_compatible_id_list **return_cid_list);
  408. acpi_status
  409. acpi_ut_execute_STA (
  410. struct acpi_namespace_node *device_node,
  411. u32 *status_flags);
  412. acpi_status
  413. acpi_ut_execute_UID (
  414. struct acpi_namespace_node *device_node,
  415. struct acpi_device_id *uid);
  416. acpi_status
  417. acpi_ut_execute_sxds (
  418. struct acpi_namespace_node *device_node,
  419. u8 *highest);
  420. /*
  421. * ut_mutex - mutual exclusion interfaces
  422. */
  423. acpi_status
  424. acpi_ut_mutex_initialize (
  425. void);
  426. void
  427. acpi_ut_mutex_terminate (
  428. void);
  429. acpi_status
  430. acpi_ut_create_mutex (
  431. acpi_mutex_handle mutex_id);
  432. acpi_status
  433. acpi_ut_delete_mutex (
  434. acpi_mutex_handle mutex_id);
  435. acpi_status
  436. acpi_ut_acquire_mutex (
  437. acpi_mutex_handle mutex_id);
  438. acpi_status
  439. acpi_ut_release_mutex (
  440. acpi_mutex_handle mutex_id);
  441. /*
  442. * ut_object - internal object create/delete/cache routines
  443. */
  444. union acpi_operand_object *
  445. acpi_ut_create_internal_object_dbg (
  446. char *module_name,
  447. u32 line_number,
  448. u32 component_id,
  449. acpi_object_type type);
  450. void *
  451. acpi_ut_allocate_object_desc_dbg (
  452. char *module_name,
  453. u32 line_number,
  454. u32 component_id);
  455. #define acpi_ut_create_internal_object(t) acpi_ut_create_internal_object_dbg (_THIS_MODULE,__LINE__,_COMPONENT,t)
  456. #define acpi_ut_allocate_object_desc() acpi_ut_allocate_object_desc_dbg (_THIS_MODULE,__LINE__,_COMPONENT)
  457. void
  458. acpi_ut_delete_object_desc (
  459. union acpi_operand_object *object);
  460. u8
  461. acpi_ut_valid_internal_object (
  462. void *object);
  463. union acpi_operand_object *
  464. acpi_ut_create_buffer_object (
  465. acpi_size buffer_size);
  466. union acpi_operand_object *
  467. acpi_ut_create_string_object (
  468. acpi_size string_size);
  469. /*
  470. * ut_ref_cnt - Object reference count management
  471. */
  472. void
  473. acpi_ut_add_reference (
  474. union acpi_operand_object *object);
  475. void
  476. acpi_ut_remove_reference (
  477. union acpi_operand_object *object);
  478. /*
  479. * ut_size - Object size routines
  480. */
  481. acpi_status
  482. acpi_ut_get_simple_object_size (
  483. union acpi_operand_object *obj,
  484. acpi_size *obj_length);
  485. acpi_status
  486. acpi_ut_get_package_object_size (
  487. union acpi_operand_object *obj,
  488. acpi_size *obj_length);
  489. acpi_status
  490. acpi_ut_get_object_size(
  491. union acpi_operand_object *obj,
  492. acpi_size *obj_length);
  493. acpi_status
  494. acpi_ut_get_element_length (
  495. u8 object_type,
  496. union acpi_operand_object *source_object,
  497. union acpi_generic_state *state,
  498. void *context);
  499. /*
  500. * ut_state - Generic state creation/cache routines
  501. */
  502. void
  503. acpi_ut_push_generic_state (
  504. union acpi_generic_state **list_head,
  505. union acpi_generic_state *state);
  506. union acpi_generic_state *
  507. acpi_ut_pop_generic_state (
  508. union acpi_generic_state **list_head);
  509. union acpi_generic_state *
  510. acpi_ut_create_generic_state (
  511. void);
  512. struct acpi_thread_state *
  513. acpi_ut_create_thread_state (
  514. void);
  515. union acpi_generic_state *
  516. acpi_ut_create_update_state (
  517. union acpi_operand_object *object,
  518. u16 action);
  519. union acpi_generic_state *
  520. acpi_ut_create_pkg_state (
  521. void *internal_object,
  522. void *external_object,
  523. u16 index);
  524. acpi_status
  525. acpi_ut_create_update_state_and_push (
  526. union acpi_operand_object *object,
  527. u16 action,
  528. union acpi_generic_state **state_list);
  529. #ifdef ACPI_FUTURE_USAGE
  530. acpi_status
  531. acpi_ut_create_pkg_state_and_push (
  532. void *internal_object,
  533. void *external_object,
  534. u16 index,
  535. union acpi_generic_state **state_list);
  536. #endif
  537. union acpi_generic_state *
  538. acpi_ut_create_control_state (
  539. void);
  540. void
  541. acpi_ut_delete_generic_state (
  542. union acpi_generic_state *state);
  543. #ifdef ACPI_ENABLE_OBJECT_CACHE
  544. void
  545. acpi_ut_delete_generic_state_cache (
  546. void);
  547. void
  548. acpi_ut_delete_object_cache (
  549. void);
  550. #endif
  551. /*
  552. * utmisc
  553. */
  554. void
  555. acpi_ut_print_string (
  556. char *string,
  557. u8 max_length);
  558. acpi_status
  559. acpi_ut_divide (
  560. acpi_integer in_dividend,
  561. acpi_integer in_divisor,
  562. acpi_integer *out_quotient,
  563. acpi_integer *out_remainder);
  564. acpi_status
  565. acpi_ut_short_divide (
  566. acpi_integer in_dividend,
  567. u32 divisor,
  568. acpi_integer *out_quotient,
  569. u32 *out_remainder);
  570. u8
  571. acpi_ut_valid_acpi_name (
  572. u32 name);
  573. u8
  574. acpi_ut_valid_acpi_character (
  575. char character);
  576. acpi_status
  577. acpi_ut_strtoul64 (
  578. char *string,
  579. u32 base,
  580. acpi_integer *ret_integer);
  581. /* Values for Base above (16=Hex, 10=Decimal) */
  582. #define ACPI_ANY_BASE 0
  583. #ifdef ACPI_FUTURE_USAGE
  584. char *
  585. acpi_ut_strupr (
  586. char *src_string);
  587. #endif
  588. u8 *
  589. acpi_ut_get_resource_end_tag (
  590. union acpi_operand_object *obj_desc);
  591. u8
  592. acpi_ut_generate_checksum (
  593. u8 *buffer,
  594. u32 length);
  595. u32
  596. acpi_ut_dword_byte_swap (
  597. u32 value);
  598. void
  599. acpi_ut_set_integer_width (
  600. u8 revision);
  601. #ifdef ACPI_DEBUG_OUTPUT
  602. void
  603. acpi_ut_display_init_pathname (
  604. u8 type,
  605. struct acpi_namespace_node *obj_handle,
  606. char *path);
  607. #endif
  608. /*
  609. * Utalloc - memory allocation and object caching
  610. */
  611. void *
  612. acpi_ut_acquire_from_cache (
  613. u32 list_id);
  614. void
  615. acpi_ut_release_to_cache (
  616. u32 list_id,
  617. void *object);
  618. #ifdef ACPI_ENABLE_OBJECT_CACHE
  619. void
  620. acpi_ut_delete_generic_cache (
  621. u32 list_id);
  622. #endif
  623. acpi_status
  624. acpi_ut_validate_buffer (
  625. struct acpi_buffer *buffer);
  626. acpi_status
  627. acpi_ut_initialize_buffer (
  628. struct acpi_buffer *buffer,
  629. acpi_size required_length);
  630. /* Memory allocation functions */
  631. void *
  632. acpi_ut_allocate (
  633. acpi_size size,
  634. u32 component,
  635. char *module,
  636. u32 line);
  637. void *
  638. acpi_ut_callocate (
  639. acpi_size size,
  640. u32 component,
  641. char *module,
  642. u32 line);
  643. #ifdef ACPI_DBG_TRACK_ALLOCATIONS
  644. void *
  645. acpi_ut_allocate_and_track (
  646. acpi_size size,
  647. u32 component,
  648. char *module,
  649. u32 line);
  650. void *
  651. acpi_ut_callocate_and_track (
  652. acpi_size size,
  653. u32 component,
  654. char *module,
  655. u32 line);
  656. void
  657. acpi_ut_free_and_track (
  658. void *address,
  659. u32 component,
  660. char *module,
  661. u32 line);
  662. struct acpi_debug_mem_block *
  663. acpi_ut_find_allocation (
  664. u32 list_id,
  665. void *allocation);
  666. acpi_status
  667. acpi_ut_track_allocation (
  668. u32 list_id,
  669. struct acpi_debug_mem_block *address,
  670. acpi_size size,
  671. u8 alloc_type,
  672. u32 component,
  673. char *module,
  674. u32 line);
  675. acpi_status
  676. acpi_ut_remove_allocation (
  677. u32 list_id,
  678. struct acpi_debug_mem_block *address,
  679. u32 component,
  680. char *module,
  681. u32 line);
  682. #ifdef ACPI_FUTURE_USAGE
  683. void
  684. acpi_ut_dump_allocation_info (
  685. void);
  686. #endif
  687. void
  688. acpi_ut_dump_allocations (
  689. u32 component,
  690. char *module);
  691. #endif
  692. #endif /* _ACUTILS_H */