diff options
Diffstat (limited to 'include/acpi/acutils.h')
| -rw-r--r-- | include/acpi/acutils.h | 82 |
1 files changed, 72 insertions, 10 deletions
diff --git a/include/acpi/acutils.h b/include/acpi/acutils.h index c1086452696e..0927765df6aa 100644 --- a/include/acpi/acutils.h +++ b/include/acpi/acutils.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
| @@ -44,6 +44,39 @@ | |||
| 44 | #ifndef _ACUTILS_H | 44 | #ifndef _ACUTILS_H |
| 45 | #define _ACUTILS_H | 45 | #define _ACUTILS_H |
| 46 | 46 | ||
| 47 | extern const u8 acpi_gbl_resource_aml_sizes[]; | ||
| 48 | |||
| 49 | /* Strings used by the disassembler and debugger resource dump routines */ | ||
| 50 | |||
| 51 | #if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER) | ||
| 52 | |||
| 53 | extern const char *acpi_gbl_BMdecode[2]; | ||
| 54 | extern const char *acpi_gbl_config_decode[4]; | ||
| 55 | extern const char *acpi_gbl_consume_decode[2]; | ||
| 56 | extern const char *acpi_gbl_DECdecode[2]; | ||
| 57 | extern const char *acpi_gbl_HEdecode[2]; | ||
| 58 | extern const char *acpi_gbl_io_decode[2]; | ||
| 59 | extern const char *acpi_gbl_LLdecode[2]; | ||
| 60 | extern const char *acpi_gbl_max_decode[2]; | ||
| 61 | extern const char *acpi_gbl_MEMdecode[4]; | ||
| 62 | extern const char *acpi_gbl_min_decode[2]; | ||
| 63 | extern const char *acpi_gbl_MTPdecode[4]; | ||
| 64 | extern const char *acpi_gbl_RNGdecode[4]; | ||
| 65 | extern const char *acpi_gbl_RWdecode[2]; | ||
| 66 | extern const char *acpi_gbl_SHRdecode[2]; | ||
| 67 | extern const char *acpi_gbl_SIZdecode[4]; | ||
| 68 | extern const char *acpi_gbl_TRSdecode[2]; | ||
| 69 | extern const char *acpi_gbl_TTPdecode[2]; | ||
| 70 | extern const char *acpi_gbl_TYPdecode[4]; | ||
| 71 | #endif | ||
| 72 | |||
| 73 | /* Types for Resource descriptor entries */ | ||
| 74 | |||
| 75 | #define ACPI_INVALID_RESOURCE 0 | ||
| 76 | #define ACPI_FIXED_LENGTH 1 | ||
| 77 | #define ACPI_VARIABLE_LENGTH 2 | ||
| 78 | #define ACPI_SMALL_VARIABLE_LENGTH 3 | ||
| 79 | |||
| 47 | typedef | 80 | typedef |
| 48 | acpi_status(*acpi_pkg_callback) (u8 object_type, | 81 | acpi_status(*acpi_pkg_callback) (u8 object_type, |
| 49 | union acpi_operand_object * source_object, | 82 | union acpi_operand_object * source_object, |
| @@ -159,7 +192,6 @@ extern const u8 _acpi_ctype[]; | |||
| 159 | #define ACPI_IS_LOWER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO)) | 192 | #define ACPI_IS_LOWER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO)) |
| 160 | #define ACPI_IS_PRINT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_SP | _ACPI_PU)) | 193 | #define ACPI_IS_PRINT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_SP | _ACPI_PU)) |
| 161 | #define ACPI_IS_ALPHA(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP)) | 194 | #define ACPI_IS_ALPHA(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP)) |
| 162 | #define ACPI_IS_ASCII(c) ((c) < 0x80) | ||
| 163 | 195 | ||
| 164 | #endif /* ACPI_USE_SYSTEM_CLIBRARY */ | 196 | #endif /* ACPI_USE_SYSTEM_CLIBRARY */ |
| 165 | 197 | ||
| @@ -243,21 +275,22 @@ acpi_ut_ptr_exit(u32 line_number, | |||
| 243 | const char *function_name, | 275 | const char *function_name, |
| 244 | char *module_name, u32 component_id, u8 * ptr); | 276 | char *module_name, u32 component_id, u8 * ptr); |
| 245 | 277 | ||
| 246 | void acpi_ut_report_info(char *module_name, u32 line_number, u32 component_id); | 278 | void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id); |
| 247 | 279 | ||
| 248 | void acpi_ut_report_error(char *module_name, u32 line_number, u32 component_id); | 280 | void acpi_ut_report_error(char *module_name, u32 line_number); |
| 249 | 281 | ||
| 250 | void | 282 | void acpi_ut_report_info(char *module_name, u32 line_number); |
| 251 | acpi_ut_report_warning(char *module_name, u32 line_number, u32 component_id); | ||
| 252 | 283 | ||
| 253 | void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id); | 284 | void acpi_ut_report_warning(char *module_name, u32 line_number); |
| 285 | |||
| 286 | /* Error and message reporting interfaces */ | ||
| 254 | 287 | ||
| 255 | void ACPI_INTERNAL_VAR_XFACE | 288 | void ACPI_INTERNAL_VAR_XFACE |
| 256 | acpi_ut_debug_print(u32 requested_debug_level, | 289 | acpi_ut_debug_print(u32 requested_debug_level, |
| 257 | u32 line_number, | 290 | u32 line_number, |
| 258 | const char *function_name, | 291 | const char *function_name, |
| 259 | char *module_name, | 292 | char *module_name, |
| 260 | u32 component_id, char *format, ...) ACPI_PRINTF_LIKE_FUNC; | 293 | u32 component_id, char *format, ...) ACPI_PRINTF_LIKE(6); |
| 261 | 294 | ||
| 262 | void ACPI_INTERNAL_VAR_XFACE | 295 | void ACPI_INTERNAL_VAR_XFACE |
| 263 | acpi_ut_debug_print_raw(u32 requested_debug_level, | 296 | acpi_ut_debug_print_raw(u32 requested_debug_level, |
| @@ -265,7 +298,24 @@ acpi_ut_debug_print_raw(u32 requested_debug_level, | |||
| 265 | const char *function_name, | 298 | const char *function_name, |
| 266 | char *module_name, | 299 | char *module_name, |
| 267 | u32 component_id, | 300 | u32 component_id, |
| 268 | char *format, ...) ACPI_PRINTF_LIKE_FUNC; | 301 | char *format, ...) ACPI_PRINTF_LIKE(6); |
| 302 | |||
| 303 | void ACPI_INTERNAL_VAR_XFACE | ||
| 304 | acpi_ut_error(char *module_name, | ||
| 305 | u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3); | ||
| 306 | |||
| 307 | void ACPI_INTERNAL_VAR_XFACE | ||
| 308 | acpi_ut_exception(char *module_name, | ||
| 309 | u32 line_number, | ||
| 310 | acpi_status status, char *format, ...) ACPI_PRINTF_LIKE(4); | ||
| 311 | |||
| 312 | void ACPI_INTERNAL_VAR_XFACE | ||
| 313 | acpi_ut_warning(char *module_name, | ||
| 314 | u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3); | ||
| 315 | |||
| 316 | void ACPI_INTERNAL_VAR_XFACE | ||
| 317 | acpi_ut_info(char *module_name, | ||
| 318 | u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3); | ||
| 269 | 319 | ||
| 270 | /* | 320 | /* |
| 271 | * utdelete - Object deletion and reference counts | 321 | * utdelete - Object deletion and reference counts |
| @@ -419,7 +469,19 @@ acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer); | |||
| 419 | 469 | ||
| 420 | #define ACPI_ANY_BASE 0 | 470 | #define ACPI_ANY_BASE 0 |
| 421 | 471 | ||
| 422 | u8 *acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc); | 472 | acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index); |
| 473 | |||
| 474 | u32 acpi_ut_get_descriptor_length(void *aml); | ||
| 475 | |||
| 476 | u16 acpi_ut_get_resource_length(void *aml); | ||
| 477 | |||
| 478 | u8 acpi_ut_get_resource_header_length(void *aml); | ||
| 479 | |||
| 480 | u8 acpi_ut_get_resource_type(void *aml); | ||
| 481 | |||
| 482 | acpi_status | ||
| 483 | acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc, | ||
| 484 | u8 ** end_tag); | ||
| 423 | 485 | ||
| 424 | u8 acpi_ut_generate_checksum(u8 * buffer, u32 length); | 486 | u8 acpi_ut_generate_checksum(u8 * buffer, u32 length); |
| 425 | 487 | ||
