From 4a90c7e86202f46fa9af011bdbcdf36e355d1721 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Fri, 13 Jan 2006 16:22:00 -0500 Subject: [ACPI] ACPICA 20060113 Added 2006 copyright. At SuSE's suggestion, enabled all error messages without enabling function tracing, ie with CONFIG_ACPI_DEBUG=n Replaced all instances of the ACPI_DEBUG_PRINT macro invoked at the ACPI_DB_ERROR and ACPI_DB_WARN debug levels with the ACPI_REPORT_ERROR and ACPI_REPORT_WARNING macros, respectively. This preserves all error and warning messages in the non-debug version of the ACPICA code (this has been referred to as the "debug lite" option.) Over 200 cases were converted to create a total of over 380 error/warning messages across the ACPICA code. This increases the code and data size of the default non-debug version by about 13K. Added ACPI_NO_ERROR_MESSAGES flag to enable deleting all messages. The size of the debug version remains about the same. Signed-off-by: Bob Moore Signed-off-by: Len Brown --- drivers/acpi/executer/exoparg1.c | 59 ++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 36 deletions(-) (limited to 'drivers/acpi/executer/exoparg1.c') diff --git a/drivers/acpi/executer/exoparg1.c b/drivers/acpi/executer/exoparg1.c index 97e34542f5e..bc8837ecb71 100644 --- a/drivers/acpi/executer/exoparg1.c +++ b/drivers/acpi/executer/exoparg1.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2005, R. Byron Moore + * Copyright (C) 2000 - 2006, R. Byron Moore * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -111,7 +111,8 @@ acpi_status acpi_ex_opcode_0A_0T_1R(struct acpi_walk_state *walk_state) default: /* Unknown opcode */ - ACPI_REPORT_ERROR(("acpi_ex_opcode_0A_0T_1R: Unknown opcode %X\n", walk_state->opcode)); + ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", + walk_state->opcode)); status = AE_AML_BAD_OPCODE; break; } @@ -188,7 +189,8 @@ acpi_status acpi_ex_opcode_1A_0T_0R(struct acpi_walk_state *walk_state) default: /* Unknown opcode */ - ACPI_REPORT_ERROR(("acpi_ex_opcode_1A_0T_0R: Unknown opcode %X\n", walk_state->opcode)); + ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", + walk_state->opcode)); status = AE_AML_BAD_OPCODE; break; } @@ -227,7 +229,8 @@ acpi_status acpi_ex_opcode_1A_1T_0R(struct acpi_walk_state *walk_state) default: /* Unknown opcode */ - ACPI_REPORT_ERROR(("acpi_ex_opcode_1A_1T_0R: Unknown opcode %X\n", walk_state->opcode)); + ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", + walk_state->opcode)); status = AE_AML_BAD_OPCODE; goto cleanup; } @@ -346,9 +349,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) /* Check the range of the digit */ if (temp32 > 9) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "BCD digit too large (not decimal): 0x%X\n", - temp32)); + ACPI_REPORT_ERROR(("BCD digit too large (not decimal): 0x%X\n", temp32)); status = AE_AML_NUMERIC_OVERFLOW; goto cleanup; @@ -393,12 +394,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) /* Overflow if there is any data left in Digit */ if (digit > 0) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "Integer too large to convert to BCD: %8.8X%8.8X\n", - ACPI_FORMAT_UINT64(operand - [0]-> - integer. - value))); + ACPI_REPORT_ERROR(("Integer too large to convert to BCD: %8.8X%8.8X\n", ACPI_FORMAT_UINT64(operand[0]->integer.value))); status = AE_AML_NUMERIC_OVERFLOW; goto cleanup; } @@ -525,15 +521,16 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) /* These are two obsolete opcodes */ - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "%s is obsolete and not implemented\n", - acpi_ps_get_opcode_name(walk_state->opcode))); + ACPI_REPORT_ERROR(("%s is obsolete and not implemented\n", + acpi_ps_get_opcode_name(walk_state-> + opcode))); status = AE_SUPPORT; goto cleanup; default: /* Unknown opcode */ - ACPI_REPORT_ERROR(("acpi_ex_opcode_1A_1T_1R: Unknown opcode %X\n", walk_state->opcode)); + ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", + walk_state->opcode)); status = AE_AML_BAD_OPCODE; goto cleanup; } @@ -639,11 +636,10 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) acpi_ex_resolve_operands(AML_LNOT_OP, &temp_desc, walk_state); if (ACPI_FAILURE(status)) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "%s: bad operand(s) %s\n", - acpi_ps_get_opcode_name(walk_state-> - opcode), - acpi_format_exception(status))); + ACPI_REPORT_ERROR(("%s: bad operand(s) %s\n", + acpi_ps_get_opcode_name(walk_state-> + opcode), + acpi_format_exception(status))); goto cleanup; } @@ -742,9 +738,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) break; default: - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "size_of - Operand is not Buf/Int/Str/Pkg - found type %s\n", - acpi_ut_get_type_name(type))); + ACPI_REPORT_ERROR(("Operand is not Buf/Int/Str/Pkg - found type %s\n", acpi_ut_get_type_name(type))); status = AE_AML_OPERAND_TYPE; goto cleanup; } @@ -941,11 +935,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) default: - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "Unknown Index target_type %X in obj %p\n", - operand[0]->reference. - target_type, - operand[0])); + ACPI_REPORT_ERROR(("Unknown Index target_type %X in obj %p\n", operand[0]->reference.target_type, operand[0])); status = AE_AML_OPERAND_TYPE; goto cleanup; } @@ -971,11 +961,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) break; default: - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "Unknown opcode in ref(%p) - %X\n", - operand[0], - operand[0]->reference. - opcode)); + ACPI_REPORT_ERROR(("Unknown opcode in ref(%p) - %X\n", operand[0], operand[0]->reference.opcode)); status = AE_TYPE; goto cleanup; @@ -985,7 +971,8 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) default: - ACPI_REPORT_ERROR(("acpi_ex_opcode_1A_0T_1R: Unknown opcode %X\n", walk_state->opcode)); + ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", + walk_state->opcode)); status = AE_AML_BAD_OPCODE; goto cleanup; } -- cgit v1.2.3 From b8e4d89357fc434618a59c1047cac72641191805 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Fri, 27 Jan 2006 16:43:00 -0500 Subject: [ACPI] ACPICA 20060127 Implemented support in the Resource Manager to allow unresolved namestring references within resource package objects for the _PRT method. This support is in addition to the previously implemented unresolved reference support within the AML parser. If the interpreter slack mode is enabled (true on Linux unless acpi=strict), these unresolved references will be passed through to the caller as a NULL package entry. http://bugzilla.kernel.org/show_bug.cgi?id=5741 Implemented and deployed new macros and functions for error and warning messages across the subsystem. These macros are simpler and generate less code than their predecessors. The new macros ACPI_ERROR, ACPI_EXCEPTION, ACPI_WARNING, and ACPI_INFO replace the ACPI_REPORT_* macros. Implemented the acpi_cpu_flags type to simplify host OS integration of the Acquire/Release Lock OSL interfaces. Suggested by Steven Rostedt and Andrew Morton. Fixed a problem where Alias ASL operators are sometimes not correctly resolved. causing AE_AML_INTERNAL http://bugzilla.kernel.org/show_bug.cgi?id=5189 http://bugzilla.kernel.org/show_bug.cgi?id=5674 Fixed several problems with the implementation of the ConcatenateResTemplate ASL operator. As per the ACPI specification, zero length buffers are now treated as a single EndTag. One-length buffers always cause a fatal exception. Non-zero length buffers that do not end with a full 2-byte EndTag cause a fatal exception. Fixed a possible structure overwrite in the AcpiGetObjectInfo external interface. (With assistance from Thomas Renninger) Signed-off-by: Bob Moore Signed-off-by: Len Brown --- drivers/acpi/executer/exoparg1.c | 57 ++++++++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 22 deletions(-) (limited to 'drivers/acpi/executer/exoparg1.c') diff --git a/drivers/acpi/executer/exoparg1.c b/drivers/acpi/executer/exoparg1.c index bc8837ecb71..23d0823bcd5 100644 --- a/drivers/acpi/executer/exoparg1.c +++ b/drivers/acpi/executer/exoparg1.c @@ -111,8 +111,8 @@ acpi_status acpi_ex_opcode_0A_0T_1R(struct acpi_walk_state *walk_state) default: /* Unknown opcode */ - ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", - walk_state->opcode)); + ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", + walk_state->opcode)); status = AE_AML_BAD_OPCODE; break; } @@ -189,8 +189,8 @@ acpi_status acpi_ex_opcode_1A_0T_0R(struct acpi_walk_state *walk_state) default: /* Unknown opcode */ - ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", - walk_state->opcode)); + ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", + walk_state->opcode)); status = AE_AML_BAD_OPCODE; break; } @@ -229,8 +229,8 @@ acpi_status acpi_ex_opcode_1A_1T_0R(struct acpi_walk_state *walk_state) default: /* Unknown opcode */ - ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", - walk_state->opcode)); + ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", + walk_state->opcode)); status = AE_AML_BAD_OPCODE; goto cleanup; } @@ -349,7 +349,9 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) /* Check the range of the digit */ if (temp32 > 9) { - ACPI_REPORT_ERROR(("BCD digit too large (not decimal): 0x%X\n", temp32)); + ACPI_ERROR((AE_INFO, + "BCD digit too large (not decimal): 0x%X", + temp32)); status = AE_AML_NUMERIC_OVERFLOW; goto cleanup; @@ -394,7 +396,10 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) /* Overflow if there is any data left in Digit */ if (digit > 0) { - ACPI_REPORT_ERROR(("Integer too large to convert to BCD: %8.8X%8.8X\n", ACPI_FORMAT_UINT64(operand[0]->integer.value))); + ACPI_ERROR((AE_INFO, + "Integer too large to convert to BCD: %8.8X%8.8X", + ACPI_FORMAT_UINT64(operand[0]-> + integer.value))); status = AE_AML_NUMERIC_OVERFLOW; goto cleanup; } @@ -521,16 +526,16 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) /* These are two obsolete opcodes */ - ACPI_REPORT_ERROR(("%s is obsolete and not implemented\n", - acpi_ps_get_opcode_name(walk_state-> - opcode))); + ACPI_ERROR((AE_INFO, + "%s is obsolete and not implemented", + acpi_ps_get_opcode_name(walk_state->opcode))); status = AE_SUPPORT; goto cleanup; default: /* Unknown opcode */ - ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", - walk_state->opcode)); + ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", + walk_state->opcode)); status = AE_AML_BAD_OPCODE; goto cleanup; } @@ -636,10 +641,10 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) acpi_ex_resolve_operands(AML_LNOT_OP, &temp_desc, walk_state); if (ACPI_FAILURE(status)) { - ACPI_REPORT_ERROR(("%s: bad operand(s) %s\n", - acpi_ps_get_opcode_name(walk_state-> - opcode), - acpi_format_exception(status))); + ACPI_EXCEPTION((AE_INFO, status, + "While resolving operands for [%s]", + acpi_ps_get_opcode_name(walk_state-> + opcode))); goto cleanup; } @@ -738,7 +743,9 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) break; default: - ACPI_REPORT_ERROR(("Operand is not Buf/Int/Str/Pkg - found type %s\n", acpi_ut_get_type_name(type))); + ACPI_ERROR((AE_INFO, + "Operand is not Buf/Int/Str/Pkg - found type %s", + acpi_ut_get_type_name(type))); status = AE_AML_OPERAND_TYPE; goto cleanup; } @@ -935,7 +942,10 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) default: - ACPI_REPORT_ERROR(("Unknown Index target_type %X in obj %p\n", operand[0]->reference.target_type, operand[0])); + ACPI_ERROR((AE_INFO, + "Unknown Index target_type %X in obj %p", + operand[0]->reference. + target_type, operand[0])); status = AE_AML_OPERAND_TYPE; goto cleanup; } @@ -961,7 +971,10 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) break; default: - ACPI_REPORT_ERROR(("Unknown opcode in ref(%p) - %X\n", operand[0], operand[0]->reference.opcode)); + ACPI_ERROR((AE_INFO, + "Unknown opcode in ref(%p) - %X", + operand[0], + operand[0]->reference.opcode)); status = AE_TYPE; goto cleanup; @@ -971,8 +984,8 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) default: - ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", - walk_state->opcode)); + ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", + walk_state->opcode)); status = AE_AML_BAD_OPCODE; goto cleanup; } -- cgit v1.2.3