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.h82
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
47extern 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
53extern const char *acpi_gbl_BMdecode[2];
54extern const char *acpi_gbl_config_decode[4];
55extern const char *acpi_gbl_consume_decode[2];
56extern const char *acpi_gbl_DECdecode[2];
57extern const char *acpi_gbl_HEdecode[2];
58extern const char *acpi_gbl_io_decode[2];
59extern const char *acpi_gbl_LLdecode[2];
60extern const char *acpi_gbl_max_decode[2];
61extern const char *acpi_gbl_MEMdecode[4];
62extern const char *acpi_gbl_min_decode[2];
63extern const char *acpi_gbl_MTPdecode[4];
64extern const char *acpi_gbl_RNGdecode[4];
65extern const char *acpi_gbl_RWdecode[2];
66extern const char *acpi_gbl_SHRdecode[2];
67extern const char *acpi_gbl_SIZdecode[4];
68extern const char *acpi_gbl_TRSdecode[2];
69extern const char *acpi_gbl_TTPdecode[2];
70extern 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
47typedef 80typedef
48acpi_status(*acpi_pkg_callback) (u8 object_type, 81acpi_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
246void acpi_ut_report_info(char *module_name, u32 line_number, u32 component_id); 278void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id);
247 279
248void acpi_ut_report_error(char *module_name, u32 line_number, u32 component_id); 280void acpi_ut_report_error(char *module_name, u32 line_number);
249 281
250void 282void acpi_ut_report_info(char *module_name, u32 line_number);
251acpi_ut_report_warning(char *module_name, u32 line_number, u32 component_id);
252 283
253void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id); 284void acpi_ut_report_warning(char *module_name, u32 line_number);
285
286/* Error and message reporting interfaces */
254 287
255void ACPI_INTERNAL_VAR_XFACE 288void ACPI_INTERNAL_VAR_XFACE
256acpi_ut_debug_print(u32 requested_debug_level, 289acpi_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
262void ACPI_INTERNAL_VAR_XFACE 295void ACPI_INTERNAL_VAR_XFACE
263acpi_ut_debug_print_raw(u32 requested_debug_level, 296acpi_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
303void ACPI_INTERNAL_VAR_XFACE
304acpi_ut_error(char *module_name,
305 u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3);
306
307void ACPI_INTERNAL_VAR_XFACE
308acpi_ut_exception(char *module_name,
309 u32 line_number,
310 acpi_status status, char *format, ...) ACPI_PRINTF_LIKE(4);
311
312void ACPI_INTERNAL_VAR_XFACE
313acpi_ut_warning(char *module_name,
314 u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3);
315
316void ACPI_INTERNAL_VAR_XFACE
317acpi_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
422u8 *acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc); 472acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index);
473
474u32 acpi_ut_get_descriptor_length(void *aml);
475
476u16 acpi_ut_get_resource_length(void *aml);
477
478u8 acpi_ut_get_resource_header_length(void *aml);
479
480u8 acpi_ut_get_resource_type(void *aml);
481
482acpi_status
483acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc,
484 u8 ** end_tag);
423 485
424u8 acpi_ut_generate_checksum(u8 * buffer, u32 length); 486u8 acpi_ut_generate_checksum(u8 * buffer, u32 length);
425 487