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.h95
1 files changed, 59 insertions, 36 deletions
diff --git a/include/acpi/acutils.h b/include/acpi/acutils.h
index 0927765df6aa..ba039ea1a057 100644
--- a/include/acpi/acutils.h
+++ b/include/acpi/acutils.h
@@ -50,24 +50,24 @@ extern const u8 acpi_gbl_resource_aml_sizes[];
50 50
51#if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER) 51#if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER)
52 52
53extern const char *acpi_gbl_BMdecode[2]; 53extern const char *acpi_gbl_bm_decode[];
54extern const char *acpi_gbl_config_decode[4]; 54extern const char *acpi_gbl_config_decode[];
55extern const char *acpi_gbl_consume_decode[2]; 55extern const char *acpi_gbl_consume_decode[];
56extern const char *acpi_gbl_DECdecode[2]; 56extern const char *acpi_gbl_dec_decode[];
57extern const char *acpi_gbl_HEdecode[2]; 57extern const char *acpi_gbl_he_decode[];
58extern const char *acpi_gbl_io_decode[2]; 58extern const char *acpi_gbl_io_decode[];
59extern const char *acpi_gbl_LLdecode[2]; 59extern const char *acpi_gbl_ll_decode[];
60extern const char *acpi_gbl_max_decode[2]; 60extern const char *acpi_gbl_max_decode[];
61extern const char *acpi_gbl_MEMdecode[4]; 61extern const char *acpi_gbl_mem_decode[];
62extern const char *acpi_gbl_min_decode[2]; 62extern const char *acpi_gbl_min_decode[];
63extern const char *acpi_gbl_MTPdecode[4]; 63extern const char *acpi_gbl_mtp_decode[];
64extern const char *acpi_gbl_RNGdecode[4]; 64extern const char *acpi_gbl_rng_decode[];
65extern const char *acpi_gbl_RWdecode[2]; 65extern const char *acpi_gbl_rw_decode[];
66extern const char *acpi_gbl_SHRdecode[2]; 66extern const char *acpi_gbl_shr_decode[];
67extern const char *acpi_gbl_SIZdecode[4]; 67extern const char *acpi_gbl_siz_decode[];
68extern const char *acpi_gbl_TRSdecode[2]; 68extern const char *acpi_gbl_trs_decode[];
69extern const char *acpi_gbl_TTPdecode[2]; 69extern const char *acpi_gbl_ttp_decode[];
70extern const char *acpi_gbl_TYPdecode[4]; 70extern const char *acpi_gbl_typ_decode[];
71#endif 71#endif
72 72
73/* Types for Resource descriptor entries */ 73/* Types for Resource descriptor entries */
@@ -78,6 +78,12 @@ extern const char *acpi_gbl_TYPdecode[4];
78#define ACPI_SMALL_VARIABLE_LENGTH 3 78#define ACPI_SMALL_VARIABLE_LENGTH 3
79 79
80typedef 80typedef
81acpi_status(*acpi_walk_aml_callback) (u8 * aml,
82 u32 length,
83 u32 offset,
84 u8 resource_index, void **context);
85
86typedef
81acpi_status(*acpi_pkg_callback) (u8 object_type, 87acpi_status(*acpi_pkg_callback) (u8 object_type,
82 union acpi_operand_object * source_object, 88 union acpi_operand_object * source_object,
83 union acpi_generic_state * state, 89 union acpi_generic_state * state,
@@ -277,6 +283,8 @@ acpi_ut_ptr_exit(u32 line_number,
277 283
278void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id); 284void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id);
279 285
286void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display);
287
280void acpi_ut_report_error(char *module_name, u32 line_number); 288void acpi_ut_report_error(char *module_name, u32 line_number);
281 289
282void acpi_ut_report_info(char *module_name, u32 line_number); 290void acpi_ut_report_info(char *module_name, u32 line_number);
@@ -445,6 +453,8 @@ acpi_ut_short_divide(acpi_integer in_dividend,
445/* 453/*
446 * utmisc 454 * utmisc
447 */ 455 */
456u8 acpi_ut_is_aml_table(struct acpi_table_header *table);
457
448acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id); 458acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id);
449 459
450void acpi_ut_release_owner_id(acpi_owner_id * owner_id); 460void acpi_ut_release_owner_id(acpi_owner_id * owner_id);
@@ -460,7 +470,9 @@ void acpi_ut_print_string(char *string, u8 max_length);
460 470
461u8 acpi_ut_valid_acpi_name(u32 name); 471u8 acpi_ut_valid_acpi_name(u32 name);
462 472
463u8 acpi_ut_valid_acpi_character(char character); 473acpi_name acpi_ut_repair_name(acpi_name name);
474
475u8 acpi_ut_valid_acpi_char(char character, acpi_native_uint position);
464 476
465acpi_status 477acpi_status
466acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer); 478acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer);
@@ -469,6 +481,25 @@ acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer);
469 481
470#define ACPI_ANY_BASE 0 482#define ACPI_ANY_BASE 0
471 483
484u32 acpi_ut_dword_byte_swap(u32 value);
485
486void acpi_ut_set_integer_width(u8 revision);
487
488#ifdef ACPI_DEBUG_OUTPUT
489void
490acpi_ut_display_init_pathname(u8 type,
491 struct acpi_namespace_node *obj_handle,
492 char *path);
493#endif
494
495/*
496 * utresrc
497 */
498acpi_status
499acpi_ut_walk_aml_resources(u8 * aml,
500 acpi_size aml_length,
501 acpi_walk_aml_callback user_function, void **context);
502
472acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index); 503acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index);
473 504
474u32 acpi_ut_get_descriptor_length(void *aml); 505u32 acpi_ut_get_descriptor_length(void *aml);
@@ -483,20 +514,6 @@ acpi_status
483acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc, 514acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc,
484 u8 ** end_tag); 515 u8 ** end_tag);
485 516
486u8 acpi_ut_generate_checksum(u8 * buffer, u32 length);
487
488u32 acpi_ut_dword_byte_swap(u32 value);
489
490void acpi_ut_set_integer_width(u8 revision);
491
492#ifdef ACPI_DEBUG_OUTPUT
493void
494acpi_ut_display_init_pathname(u8 type,
495 struct acpi_namespace_node *obj_handle,
496 char *path);
497
498#endif
499
500/* 517/*
501 * utmutex - mutex support 518 * utmutex - mutex support
502 */ 519 */
@@ -523,14 +540,15 @@ acpi_ut_initialize_buffer(struct acpi_buffer *buffer,
523 540
524void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line); 541void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line);
525 542
526void *acpi_ut_callocate(acpi_size size, u32 component, char *module, u32 line); 543void *acpi_ut_allocate_zeroed(acpi_size size,
544 u32 component, char *module, u32 line);
527 545
528#ifdef ACPI_DBG_TRACK_ALLOCATIONS 546#ifdef ACPI_DBG_TRACK_ALLOCATIONS
529void *acpi_ut_allocate_and_track(acpi_size size, 547void *acpi_ut_allocate_and_track(acpi_size size,
530 u32 component, char *module, u32 line); 548 u32 component, char *module, u32 line);
531 549
532void *acpi_ut_callocate_and_track(acpi_size size, 550void *acpi_ut_allocate_zeroed_and_track(acpi_size size,
533 u32 component, char *module, u32 line); 551 u32 component, char *module, u32 line);
534 552
535void 553void
536acpi_ut_free_and_track(void *address, u32 component, char *module, u32 line); 554acpi_ut_free_and_track(void *address, u32 component, char *module, u32 line);
@@ -540,6 +558,11 @@ void acpi_ut_dump_allocation_info(void);
540#endif /* ACPI_FUTURE_USAGE */ 558#endif /* ACPI_FUTURE_USAGE */
541 559
542void acpi_ut_dump_allocations(u32 component, char *module); 560void acpi_ut_dump_allocations(u32 component, char *module);
561
562acpi_status
563acpi_ut_create_list(char *list_name,
564 u16 object_size, struct acpi_memory_list **return_cache);
565
543#endif 566#endif
544 567
545#endif /* _ACUTILS_H */ 568#endif /* _ACUTILS_H */