^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * Copyright (C) 2000 - 2020, Intel Corp.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) *****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #ifndef _ACUTILS_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #define _ACUTILS_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) extern const u8 acpi_gbl_resource_aml_sizes[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) extern const u8 acpi_gbl_resource_aml_serial_bus_sizes[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) /* Strings used by the disassembler and debugger resource dump routines */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #if defined(ACPI_DEBUG_OUTPUT) || defined (ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) extern const char *acpi_gbl_bm_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) extern const char *acpi_gbl_config_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) extern const char *acpi_gbl_consume_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) extern const char *acpi_gbl_dec_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) extern const char *acpi_gbl_he_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) extern const char *acpi_gbl_io_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) extern const char *acpi_gbl_ll_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) extern const char *acpi_gbl_max_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) extern const char *acpi_gbl_mem_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) extern const char *acpi_gbl_min_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) extern const char *acpi_gbl_mtp_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) extern const char *acpi_gbl_rng_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) extern const char *acpi_gbl_rw_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) extern const char *acpi_gbl_shr_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) extern const char *acpi_gbl_siz_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) extern const char *acpi_gbl_trs_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) extern const char *acpi_gbl_ttp_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) extern const char *acpi_gbl_typ_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) extern const char *acpi_gbl_ppc_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) extern const char *acpi_gbl_ior_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) extern const char *acpi_gbl_dts_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) extern const char *acpi_gbl_ct_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) extern const char *acpi_gbl_sbt_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) extern const char *acpi_gbl_am_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) extern const char *acpi_gbl_sm_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) extern const char *acpi_gbl_wm_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) extern const char *acpi_gbl_cph_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) extern const char *acpi_gbl_cpo_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) extern const char *acpi_gbl_dp_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) extern const char *acpi_gbl_ed_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) extern const char *acpi_gbl_bpb_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) extern const char *acpi_gbl_sb_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) extern const char *acpi_gbl_fc_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) extern const char *acpi_gbl_pt_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) extern const char *acpi_gbl_ptyp_decode[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) * For the iASL compiler case, the output is redirected to stderr so that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) * any of the various ACPI errors and warnings do not appear in the output
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) * files, for either the compiler or disassembler portions of the tool.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) #ifdef ACPI_ASL_COMPILER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) #include <stdio.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) #define ACPI_MSG_REDIRECT_BEGIN \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) FILE *output_file = acpi_gbl_output_file; \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) acpi_os_redirect_output (stderr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) #define ACPI_MSG_REDIRECT_END \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) acpi_os_redirect_output (output_file);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) * non-iASL case - no redirection, nothing to do
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) #define ACPI_MSG_REDIRECT_BEGIN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) #define ACPI_MSG_REDIRECT_END
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) * Common error message prefixes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) #ifndef ACPI_MSG_ERROR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) #define ACPI_MSG_ERROR "ACPI Error: "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) #ifndef ACPI_MSG_WARNING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) #define ACPI_MSG_WARNING "ACPI Warning: "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) #ifndef ACPI_MSG_INFO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) #define ACPI_MSG_INFO "ACPI: "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) #ifndef ACPI_MSG_BIOS_ERROR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) #define ACPI_MSG_BIOS_ERROR "Firmware Error (ACPI): "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) #ifndef ACPI_MSG_BIOS_WARNING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) #define ACPI_MSG_BIOS_WARNING "Firmware Warning (ACPI): "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) * Common message suffix
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) #define ACPI_MSG_SUFFIX \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) acpi_os_printf (" (%8.8X/%s-%u)\n", ACPI_CA_VERSION, module_name, line_number)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) /* Flags to indicate implicit or explicit string-to-integer conversion */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) #define ACPI_IMPLICIT_CONVERSION TRUE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) #define ACPI_NO_IMPLICIT_CONVERSION FALSE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) /* Types for Resource descriptor entries */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) #define ACPI_INVALID_RESOURCE 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) #define ACPI_FIXED_LENGTH 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) #define ACPI_VARIABLE_LENGTH 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) #define ACPI_SMALL_VARIABLE_LENGTH 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) typedef
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) acpi_status (*acpi_walk_aml_callback) (u8 *aml,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) u32 length,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) u32 offset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) u8 resource_index, void **context);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) typedef
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) acpi_status (*acpi_pkg_callback) (u8 object_type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) union acpi_operand_object * source_object,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) union acpi_generic_state * state,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) void *context);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) struct acpi_pkg_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) u8 *free_space;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) acpi_size length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) u32 object_space;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) u32 num_packages;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) /* Object reference counts */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) #define REF_INCREMENT (u16) 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) #define REF_DECREMENT (u16) 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) /* acpi_ut_dump_buffer */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) #define DB_BYTE_DISPLAY 0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) #define DB_WORD_DISPLAY 0x02
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) #define DB_DWORD_DISPLAY 0x04
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) #define DB_QWORD_DISPLAY 0x08
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) #define DB_DISPLAY_DATA_ONLY 0x10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) * utascii - ASCII utilities
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) u8 acpi_ut_valid_nameseg(char *signature);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) u8 acpi_ut_valid_name_char(char character, u32 position);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) void acpi_ut_check_and_repair_ascii(u8 *name, char *repaired_name, u32 count);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) * utnonansi - Non-ANSI C library functions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) void acpi_ut_strupr(char *src_string);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) void acpi_ut_strlwr(char *src_string);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) int acpi_ut_stricmp(char *string1, char *string2);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) * utstrsuppt - string-to-integer conversion support functions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) acpi_status acpi_ut_convert_octal_string(char *string, u64 *return_value);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) acpi_status acpi_ut_convert_decimal_string(char *string, u64 *return_value_ptr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) acpi_status acpi_ut_convert_hex_string(char *string, u64 *return_value_ptr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) char acpi_ut_remove_whitespace(char **string);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) char acpi_ut_remove_leading_zeros(char **string);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) u8 acpi_ut_detect_hex_prefix(char **string);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) void acpi_ut_remove_hex_prefix(char **string);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) u8 acpi_ut_detect_octal_prefix(char **string);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) * utstrtoul64 - string-to-integer conversion functions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) acpi_status acpi_ut_strtoul64(char *string, u64 *ret_integer);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) u64 acpi_ut_explicit_strtoul64(char *string);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) u64 acpi_ut_implicit_strtoul64(char *string);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) * utglobal - Global data structures and procedures
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) acpi_status acpi_ut_init_globals(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) const char *acpi_ut_get_mutex_name(u32 mutex_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) const char *acpi_ut_get_notify_name(u32 notify_value, acpi_object_type type);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) const char *acpi_ut_get_type_name(acpi_object_type type);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) const char *acpi_ut_get_node_name(void *object);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) const char *acpi_ut_get_descriptor_name(void *object);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) const char *acpi_ut_get_reference_name(union acpi_operand_object *object);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) const char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) const char *acpi_ut_get_region_name(u8 space_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) const char *acpi_ut_get_event_name(u32 event_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) const char *acpi_ut_get_argument_type_name(u32 arg_type);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) char acpi_ut_hex_to_ascii_char(u64 integer, u32 position);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) acpi_status acpi_ut_ascii_to_hex_byte(char *two_ascii_chars, u8 *return_byte);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) u8 acpi_ut_ascii_char_to_hex(int hex_char);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) u8 acpi_ut_valid_object_type(acpi_object_type type);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) * utinit - miscellaneous initialization and shutdown
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) acpi_status acpi_ut_hardware_initialize(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) void acpi_ut_subsystem_shutdown(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) * utcopy - Object construction and conversion interfaces
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) acpi_ut_build_simple_object(union acpi_operand_object *obj,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) union acpi_object *user_obj,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) u8 *data_space, u32 *buffer_space_used);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) acpi_ut_build_package_object(union acpi_operand_object *obj,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) u8 *buffer, u32 *space_used);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) acpi_ut_copy_iobject_to_eobject(union acpi_operand_object *obj,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) struct acpi_buffer *ret_buffer);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) acpi_ut_copy_eobject_to_iobject(union acpi_object *obj,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) union acpi_operand_object **internal_obj);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) acpi_ut_copy_isimple_to_isimple(union acpi_operand_object *source_obj,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) union acpi_operand_object *dest_obj);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) acpi_ut_copy_iobject_to_iobject(union acpi_operand_object *source_desc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) union acpi_operand_object **dest_desc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) struct acpi_walk_state *walk_state);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) * utcreate - Object creation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) * utdebug - Debug interfaces
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) void acpi_ut_init_stack_ptr_trace(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) void acpi_ut_track_stack_ptr(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) acpi_ut_trace(u32 line_number,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) const char *function_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) const char *module_name, u32 component_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) acpi_ut_trace_ptr(u32 line_number,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) const char *function_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) const char *module_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) u32 component_id, const void *pointer);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) acpi_ut_trace_u32(u32 line_number,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) const char *function_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) const char *module_name, u32 component_id, u32 integer);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) acpi_ut_trace_str(u32 line_number,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) const char *function_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) const char *module_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) u32 component_id, const char *string);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) acpi_ut_exit(u32 line_number,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) const char *function_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) const char *module_name, u32 component_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) acpi_ut_status_exit(u32 line_number,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) const char *function_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) const char *module_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) u32 component_id, acpi_status status);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) acpi_ut_value_exit(u32 line_number,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) const char *function_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) const char *module_name, u32 component_id, u64 value);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) acpi_ut_ptr_exit(u32 line_number,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) const char *function_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) const char *module_name, u32 component_id, u8 *ptr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) acpi_ut_str_exit(u32 line_number,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) const char *function_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) const char *module_name, u32 component_id, const char *string);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) acpi_ut_debug_dump_buffer(u8 *buffer, u32 count, u32 display, u32 component_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) void acpi_ut_dump_buffer(u8 *buffer, u32 count, u32 display, u32 offset);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) #ifdef ACPI_APPLICATION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) acpi_ut_dump_buffer_to_file(ACPI_FILE file,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) u8 *buffer,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) u32 count, u32 display, u32 base_offset);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) void acpi_ut_report_error(char *module_name, u32 line_number);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) void acpi_ut_report_info(char *module_name, u32 line_number);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) void acpi_ut_report_warning(char *module_name, u32 line_number);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) * utdelete - Object deletion and reference counts
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) void acpi_ut_add_reference(union acpi_operand_object *object);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) void acpi_ut_remove_reference(union acpi_operand_object *object);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) void acpi_ut_delete_internal_package_object(union acpi_operand_object *object);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) void acpi_ut_delete_internal_simple_object(union acpi_operand_object *object);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) void acpi_ut_delete_internal_object_list(union acpi_operand_object **obj_list);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) * uteval - object evaluation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) const char *path,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) u32 expected_return_btypes,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) union acpi_operand_object **return_desc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) acpi_ut_evaluate_numeric_object(const char *object_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) struct acpi_namespace_node *device_node,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) u64 *value);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) acpi_ut_execute_STA(struct acpi_namespace_node *device_node, u32 *status_flags);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) acpi_ut_execute_power_methods(struct acpi_namespace_node *device_node,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) const char **method_names,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) u8 method_count, u8 *out_values);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) * utids - device ID support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387) acpi_ut_execute_HID(struct acpi_namespace_node *device_node,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) struct acpi_pnp_device_id ** return_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) acpi_ut_execute_UID(struct acpi_namespace_node *device_node,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) struct acpi_pnp_device_id ** return_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) acpi_ut_execute_CID(struct acpi_namespace_node *device_node,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) struct acpi_pnp_device_id_list ** return_cid_list);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) acpi_ut_execute_CLS(struct acpi_namespace_node *device_node,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) struct acpi_pnp_device_id **return_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403) * utlock - reader/writer locks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405) acpi_status acpi_ut_create_rw_lock(struct acpi_rw_lock *lock);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407) void acpi_ut_delete_rw_lock(struct acpi_rw_lock *lock);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409) acpi_status acpi_ut_acquire_read_lock(struct acpi_rw_lock *lock);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411) acpi_status acpi_ut_release_read_lock(struct acpi_rw_lock *lock);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413) acpi_status acpi_ut_acquire_write_lock(struct acpi_rw_lock *lock);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415) void acpi_ut_release_write_lock(struct acpi_rw_lock *lock);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418) * utobject - internal object create/delete/cache routines
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420) union acpi_operand_object *acpi_ut_create_internal_object_dbg(const char
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421) *module_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422) u32 line_number,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423) u32 component_id,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424) acpi_object_type
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425) type);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427) void *acpi_ut_allocate_object_desc_dbg(const char *module_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428) u32 line_number, u32 component_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430) #define acpi_ut_create_internal_object(t) acpi_ut_create_internal_object_dbg (_acpi_module_name,__LINE__,_COMPONENT,t)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431) #define acpi_ut_allocate_object_desc() acpi_ut_allocate_object_desc_dbg (_acpi_module_name,__LINE__,_COMPONENT)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433) void acpi_ut_delete_object_desc(union acpi_operand_object *object);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435) u8 acpi_ut_valid_internal_object(void *object);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437) union acpi_operand_object *acpi_ut_create_package_object(u32 count);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439) union acpi_operand_object *acpi_ut_create_integer_object(u64 value);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441) union acpi_operand_object *acpi_ut_create_buffer_object(acpi_size buffer_size);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443) union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446) acpi_ut_get_object_size(union acpi_operand_object *obj, acpi_size *obj_length);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 447)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 448) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 449) * utosi - Support for the _OSI predefined control method
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 450) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 451) acpi_status acpi_ut_initialize_interfaces(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 452)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 453) acpi_status acpi_ut_interface_terminate(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 454)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 455) acpi_status acpi_ut_install_interface(acpi_string interface_name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 456)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 457) acpi_status acpi_ut_remove_interface(acpi_string interface_name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 458)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 459) acpi_status acpi_ut_update_interfaces(u8 action);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 460)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 461) struct acpi_interface_info *acpi_ut_get_interface(acpi_string interface_name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 462)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 463) acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 464)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 465) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 466) * utpredef - support for predefined names
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 467) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 468) const union acpi_predefined_info *acpi_ut_get_next_predefined_method(const union
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 469) acpi_predefined_info
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 470) *this_name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 471)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 472) const union acpi_predefined_info *acpi_ut_match_predefined_method(char *name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 473)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 474) void acpi_ut_get_expected_return_types(char *buffer, u32 expected_btypes);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 475)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 476) #if (defined ACPI_ASL_COMPILER || defined ACPI_HELP_APP)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 477) const union acpi_predefined_info *acpi_ut_match_resource_name(char *name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 478)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 479) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 480) acpi_ut_display_predefined_method(char *buffer,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 481) const union acpi_predefined_info *this_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 482) u8 multi_line);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 483)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 484) u32 acpi_ut_get_resource_bit_width(char *buffer, u16 types);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 485) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 486)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 487) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 488) * utstate - Generic state creation/cache routines
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 489) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 490) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 491) acpi_ut_push_generic_state(union acpi_generic_state **list_head,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 492) union acpi_generic_state *state);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 493)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 494) union acpi_generic_state *acpi_ut_pop_generic_state(union acpi_generic_state
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 495) **list_head);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 496)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 497) union acpi_generic_state *acpi_ut_create_generic_state(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 498)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 499) struct acpi_thread_state *acpi_ut_create_thread_state(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 500)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 501) union acpi_generic_state *acpi_ut_create_update_state(union acpi_operand_object
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 502) *object, u16 action);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 503)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 504) union acpi_generic_state *acpi_ut_create_pkg_state(void *internal_object,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 505) void *external_object,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 506) u32 index);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 507)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 508) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 509) acpi_ut_create_update_state_and_push(union acpi_operand_object *object,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 510) u16 action,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 511) union acpi_generic_state **state_list);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 512)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 513) union acpi_generic_state *acpi_ut_create_control_state(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 514)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 515) void acpi_ut_delete_generic_state(union acpi_generic_state *state);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 516)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 517) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 518) * utmath
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 519) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 520) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 521) acpi_ut_divide(u64 in_dividend,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 522) u64 in_divisor, u64 *out_quotient, u64 *out_remainder);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 523)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 524) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 525) acpi_ut_short_divide(u64 in_dividend,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 526) u32 divisor, u64 *out_quotient, u32 *out_remainder);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 527)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 528) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 529) acpi_ut_short_multiply(u64 in_multiplicand, u32 multiplier, u64 *outproduct);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 530)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 531) acpi_status acpi_ut_short_shift_left(u64 operand, u32 count, u64 *out_result);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 532)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 533) acpi_status acpi_ut_short_shift_right(u64 operand, u32 count, u64 *out_result);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 534)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 535) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 536) * utmisc
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 537) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 538) const struct acpi_exception_info *acpi_ut_validate_exception(acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 539) status);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 540)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 541) u8 acpi_ut_is_pci_root_bridge(char *id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 542)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 543) #if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP || defined ACPI_NAMES_APP)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 544) u8 acpi_ut_is_aml_table(struct acpi_table_header *table);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 545) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 546)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 547) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 548) acpi_ut_walk_package_tree(union acpi_operand_object *source_object,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 549) void *target_object,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 550) acpi_pkg_callback walk_callback, void *context);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 551)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 552) /* Values for Base above (16=Hex, 10=Decimal) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 553)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 554) #define ACPI_ANY_BASE 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 555)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 556) u32 acpi_ut_dword_byte_swap(u32 value);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 557)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 558) void acpi_ut_set_integer_width(u8 revision);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 559)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 560) #ifdef ACPI_DEBUG_OUTPUT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 561) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 562) acpi_ut_display_init_pathname(u8 type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 563) struct acpi_namespace_node *obj_handle,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 564) const char *path);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 565) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 566)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 567) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 568) * utownerid - Support for Table/Method Owner IDs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 569) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 570) acpi_status acpi_ut_allocate_owner_id(acpi_owner_id *owner_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 571)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 572) void acpi_ut_release_owner_id(acpi_owner_id *owner_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 573)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 574) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 575) * utresrc
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 576) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 577) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 578) acpi_ut_walk_aml_resources(struct acpi_walk_state *walk_state,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 579) u8 *aml,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 580) acpi_size aml_length,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 581) acpi_walk_aml_callback user_function,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 582) void **context);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 583)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 584) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 585) acpi_ut_validate_resource(struct acpi_walk_state *walk_state,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 586) void *aml, u8 *return_index);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 587)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 588) u32 acpi_ut_get_descriptor_length(void *aml);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 589)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 590) u16 acpi_ut_get_resource_length(void *aml);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 591)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 592) u8 acpi_ut_get_resource_header_length(void *aml);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 593)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 594) u8 acpi_ut_get_resource_type(void *aml);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 595)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 596) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 597) acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc, u8 **end_tag);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 598)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 599) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 600) * utstring - String and character utilities
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 601) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 602) void acpi_ut_print_string(char *string, u16 max_length);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 603)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 604) #if defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 605) void ut_convert_backslashes(char *pathname);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 606) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 607)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 608) void acpi_ut_repair_name(char *name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 609)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 610) #if defined (ACPI_DEBUGGER) || defined (ACPI_APPLICATION) || defined (ACPI_DEBUG_OUTPUT)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 611) u8 acpi_ut_safe_strcpy(char *dest, acpi_size dest_size, char *source);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 612)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 613) void acpi_ut_safe_strncpy(char *dest, char *source, acpi_size dest_size);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 614)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 615) u8 acpi_ut_safe_strcat(char *dest, acpi_size dest_size, char *source);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 616)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 617) u8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 618) acpi_ut_safe_strncat(char *dest,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 619) acpi_size dest_size,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 620) char *source, acpi_size max_transfer_length);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 621) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 622)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 623) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 624) * utmutex - mutex support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 625) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 626) acpi_status acpi_ut_mutex_initialize(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 627)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 628) void acpi_ut_mutex_terminate(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 629)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 630) acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 631)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 632) acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 633)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 634) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 635) * utalloc - memory allocation and object caching
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 636) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 637) acpi_status acpi_ut_create_caches(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 638)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 639) acpi_status acpi_ut_delete_caches(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 640)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 641) acpi_status acpi_ut_validate_buffer(struct acpi_buffer *buffer);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 642)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 643) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 644) acpi_ut_initialize_buffer(struct acpi_buffer *buffer,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 645) acpi_size required_length);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 646)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 647) #ifdef ACPI_DBG_TRACK_ALLOCATIONS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 648) void *acpi_ut_allocate_and_track(acpi_size size,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 649) u32 component, const char *module, u32 line);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 650)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 651) void *acpi_ut_allocate_zeroed_and_track(acpi_size size,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 652) u32 component,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 653) const char *module, u32 line);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 654)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 655) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 656) acpi_ut_free_and_track(void *address,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 657) u32 component, const char *module, u32 line);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 658)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 659) void acpi_ut_dump_allocation_info(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 660)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 661) void acpi_ut_dump_allocations(u32 component, const char *module);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 662)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 663) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 664) acpi_ut_create_list(const char *list_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 665) u16 object_size, struct acpi_memory_list **return_cache);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 666)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 667) #endif /* ACPI_DBG_TRACK_ALLOCATIONS */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 668)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 669) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 670) * utaddress - address range check
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 671) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 672) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 673) acpi_ut_add_address_range(acpi_adr_space_type space_id,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 674) acpi_physical_address address,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 675) u32 length, struct acpi_namespace_node *region_node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 676)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 677) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 678) acpi_ut_remove_address_range(acpi_adr_space_type space_id,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 679) struct acpi_namespace_node *region_node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 680)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 681) u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 682) acpi_ut_check_address_range(acpi_adr_space_type space_id,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 683) acpi_physical_address address, u32 length, u8 warn);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 684)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 685) void acpi_ut_delete_address_lists(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 686)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 687) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 688) * utxferror - various error/warning output functions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 689) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 690) ACPI_PRINTF_LIKE(5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 691) void ACPI_INTERNAL_VAR_XFACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 692) acpi_ut_predefined_warning(const char *module_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 693) u32 line_number,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 694) char *pathname,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 695) u16 node_flags, const char *format, ...);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 696)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 697) ACPI_PRINTF_LIKE(5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 698) void ACPI_INTERNAL_VAR_XFACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 699) acpi_ut_predefined_info(const char *module_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 700) u32 line_number,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 701) char *pathname,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 702) u16 node_flags, const char *format, ...);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 703)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 704) ACPI_PRINTF_LIKE(5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 705) void ACPI_INTERNAL_VAR_XFACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 706) acpi_ut_predefined_bios_error(const char *module_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 707) u32 line_number,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 708) char *pathname,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 709) u16 node_flags, const char *format, ...);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 710)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 711) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 712) acpi_ut_prefixed_namespace_error(const char *module_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 713) u32 line_number,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 714) union acpi_generic_state *prefix_scope,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 715) const char *internal_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 716) acpi_status lookup_status);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 717)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 718) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 719) acpi_ut_method_error(const char *module_name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 720) u32 line_number,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 721) const char *message,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 722) struct acpi_namespace_node *node,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 723) const char *path, acpi_status lookup_status);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 724)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 725) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 726) * Utility functions for ACPI names and IDs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 727) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 728) const struct ah_predefined_name *acpi_ah_match_predefined_name(char *nameseg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 729)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 730) const struct ah_device_id *acpi_ah_match_hardware_id(char *hid);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 731)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 732) const char *acpi_ah_match_uuid(u8 *data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 733)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 734) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 735) * utuuid -- UUID support functions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 736) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 737) #if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP || defined ACPI_HELP_APP)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 738) void acpi_ut_convert_string_to_uuid(char *in_string, u8 *uuid_buffer);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 739) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 740)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 741) #endif /* _ACUTILS_H */