diff options
Diffstat (limited to 'include/acpi/acutils.h')
-rw-r--r-- | include/acpi/acutils.h | 95 |
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 | ||
53 | extern const char *acpi_gbl_BMdecode[2]; | 53 | extern const char *acpi_gbl_bm_decode[]; |
54 | extern const char *acpi_gbl_config_decode[4]; | 54 | extern const char *acpi_gbl_config_decode[]; |
55 | extern const char *acpi_gbl_consume_decode[2]; | 55 | extern const char *acpi_gbl_consume_decode[]; |
56 | extern const char *acpi_gbl_DECdecode[2]; | 56 | extern const char *acpi_gbl_dec_decode[]; |
57 | extern const char *acpi_gbl_HEdecode[2]; | 57 | extern const char *acpi_gbl_he_decode[]; |
58 | extern const char *acpi_gbl_io_decode[2]; | 58 | extern const char *acpi_gbl_io_decode[]; |
59 | extern const char *acpi_gbl_LLdecode[2]; | 59 | extern const char *acpi_gbl_ll_decode[]; |
60 | extern const char *acpi_gbl_max_decode[2]; | 60 | extern const char *acpi_gbl_max_decode[]; |
61 | extern const char *acpi_gbl_MEMdecode[4]; | 61 | extern const char *acpi_gbl_mem_decode[]; |
62 | extern const char *acpi_gbl_min_decode[2]; | 62 | extern const char *acpi_gbl_min_decode[]; |
63 | extern const char *acpi_gbl_MTPdecode[4]; | 63 | extern const char *acpi_gbl_mtp_decode[]; |
64 | extern const char *acpi_gbl_RNGdecode[4]; | 64 | extern const char *acpi_gbl_rng_decode[]; |
65 | extern const char *acpi_gbl_RWdecode[2]; | 65 | extern const char *acpi_gbl_rw_decode[]; |
66 | extern const char *acpi_gbl_SHRdecode[2]; | 66 | extern const char *acpi_gbl_shr_decode[]; |
67 | extern const char *acpi_gbl_SIZdecode[4]; | 67 | extern const char *acpi_gbl_siz_decode[]; |
68 | extern const char *acpi_gbl_TRSdecode[2]; | 68 | extern const char *acpi_gbl_trs_decode[]; |
69 | extern const char *acpi_gbl_TTPdecode[2]; | 69 | extern const char *acpi_gbl_ttp_decode[]; |
70 | extern const char *acpi_gbl_TYPdecode[4]; | 70 | extern 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 | ||
80 | typedef | 80 | typedef |
81 | acpi_status(*acpi_walk_aml_callback) (u8 * aml, | ||
82 | u32 length, | ||
83 | u32 offset, | ||
84 | u8 resource_index, void **context); | ||
85 | |||
86 | typedef | ||
81 | acpi_status(*acpi_pkg_callback) (u8 object_type, | 87 | acpi_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 | ||
278 | void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id); | 284 | void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id); |
279 | 285 | ||
286 | void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display); | ||
287 | |||
280 | void acpi_ut_report_error(char *module_name, u32 line_number); | 288 | void acpi_ut_report_error(char *module_name, u32 line_number); |
281 | 289 | ||
282 | void acpi_ut_report_info(char *module_name, u32 line_number); | 290 | void 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 | */ |
456 | u8 acpi_ut_is_aml_table(struct acpi_table_header *table); | ||
457 | |||
448 | acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id); | 458 | acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id); |
449 | 459 | ||
450 | void acpi_ut_release_owner_id(acpi_owner_id * owner_id); | 460 | void 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 | ||
461 | u8 acpi_ut_valid_acpi_name(u32 name); | 471 | u8 acpi_ut_valid_acpi_name(u32 name); |
462 | 472 | ||
463 | u8 acpi_ut_valid_acpi_character(char character); | 473 | acpi_name acpi_ut_repair_name(acpi_name name); |
474 | |||
475 | u8 acpi_ut_valid_acpi_char(char character, acpi_native_uint position); | ||
464 | 476 | ||
465 | acpi_status | 477 | acpi_status |
466 | acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer); | 478 | acpi_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 | ||
484 | u32 acpi_ut_dword_byte_swap(u32 value); | ||
485 | |||
486 | void acpi_ut_set_integer_width(u8 revision); | ||
487 | |||
488 | #ifdef ACPI_DEBUG_OUTPUT | ||
489 | void | ||
490 | acpi_ut_display_init_pathname(u8 type, | ||
491 | struct acpi_namespace_node *obj_handle, | ||
492 | char *path); | ||
493 | #endif | ||
494 | |||
495 | /* | ||
496 | * utresrc | ||
497 | */ | ||
498 | acpi_status | ||
499 | acpi_ut_walk_aml_resources(u8 * aml, | ||
500 | acpi_size aml_length, | ||
501 | acpi_walk_aml_callback user_function, void **context); | ||
502 | |||
472 | acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index); | 503 | acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index); |
473 | 504 | ||
474 | u32 acpi_ut_get_descriptor_length(void *aml); | 505 | u32 acpi_ut_get_descriptor_length(void *aml); |
@@ -483,20 +514,6 @@ acpi_status | |||
483 | acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc, | 514 | acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc, |
484 | u8 ** end_tag); | 515 | u8 ** end_tag); |
485 | 516 | ||
486 | u8 acpi_ut_generate_checksum(u8 * buffer, u32 length); | ||
487 | |||
488 | u32 acpi_ut_dword_byte_swap(u32 value); | ||
489 | |||
490 | void acpi_ut_set_integer_width(u8 revision); | ||
491 | |||
492 | #ifdef ACPI_DEBUG_OUTPUT | ||
493 | void | ||
494 | acpi_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 | ||
524 | void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line); | 541 | void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line); |
525 | 542 | ||
526 | void *acpi_ut_callocate(acpi_size size, u32 component, char *module, u32 line); | 543 | void *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 |
529 | void *acpi_ut_allocate_and_track(acpi_size size, | 547 | void *acpi_ut_allocate_and_track(acpi_size size, |
530 | u32 component, char *module, u32 line); | 548 | u32 component, char *module, u32 line); |
531 | 549 | ||
532 | void *acpi_ut_callocate_and_track(acpi_size size, | 550 | void *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 | ||
535 | void | 553 | void |
536 | acpi_ut_free_and_track(void *address, u32 component, char *module, u32 line); | 554 | acpi_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 | ||
542 | void acpi_ut_dump_allocations(u32 component, char *module); | 560 | void acpi_ut_dump_allocations(u32 component, char *module); |
561 | |||
562 | acpi_status | ||
563 | acpi_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 */ |