aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/executer/exoparg1.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2006-01-27 16:43:00 -0500
committerLen Brown <len.brown@intel.com>2006-01-31 03:25:09 -0500
commitb8e4d89357fc434618a59c1047cac72641191805 (patch)
treeac97fcc6fdc277c682365900663872c96f2420bd /drivers/acpi/executer/exoparg1.c
parent292dd876ee765c478b27c93cc51e93a558ed58bf (diff)
[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 <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/executer/exoparg1.c')
-rw-r--r--drivers/acpi/executer/exoparg1.c57
1 files changed, 35 insertions, 22 deletions
diff --git a/drivers/acpi/executer/exoparg1.c b/drivers/acpi/executer/exoparg1.c
index bc8837ecb716..23d0823bcd5e 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)
111 111
112 default: /* Unknown opcode */ 112 default: /* Unknown opcode */
113 113
114 ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", 114 ACPI_ERROR((AE_INFO, "Unknown AML opcode %X",
115 walk_state->opcode)); 115 walk_state->opcode));
116 status = AE_AML_BAD_OPCODE; 116 status = AE_AML_BAD_OPCODE;
117 break; 117 break;
118 } 118 }
@@ -189,8 +189,8 @@ acpi_status acpi_ex_opcode_1A_0T_0R(struct acpi_walk_state *walk_state)
189 189
190 default: /* Unknown opcode */ 190 default: /* Unknown opcode */
191 191
192 ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", 192 ACPI_ERROR((AE_INFO, "Unknown AML opcode %X",
193 walk_state->opcode)); 193 walk_state->opcode));
194 status = AE_AML_BAD_OPCODE; 194 status = AE_AML_BAD_OPCODE;
195 break; 195 break;
196 } 196 }
@@ -229,8 +229,8 @@ acpi_status acpi_ex_opcode_1A_1T_0R(struct acpi_walk_state *walk_state)
229 229
230 default: /* Unknown opcode */ 230 default: /* Unknown opcode */
231 231
232 ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", 232 ACPI_ERROR((AE_INFO, "Unknown AML opcode %X",
233 walk_state->opcode)); 233 walk_state->opcode));
234 status = AE_AML_BAD_OPCODE; 234 status = AE_AML_BAD_OPCODE;
235 goto cleanup; 235 goto cleanup;
236 } 236 }
@@ -349,7 +349,9 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
349 /* Check the range of the digit */ 349 /* Check the range of the digit */
350 350
351 if (temp32 > 9) { 351 if (temp32 > 9) {
352 ACPI_REPORT_ERROR(("BCD digit too large (not decimal): 0x%X\n", temp32)); 352 ACPI_ERROR((AE_INFO,
353 "BCD digit too large (not decimal): 0x%X",
354 temp32));
353 355
354 status = AE_AML_NUMERIC_OVERFLOW; 356 status = AE_AML_NUMERIC_OVERFLOW;
355 goto cleanup; 357 goto cleanup;
@@ -394,7 +396,10 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
394 /* Overflow if there is any data left in Digit */ 396 /* Overflow if there is any data left in Digit */
395 397
396 if (digit > 0) { 398 if (digit > 0) {
397 ACPI_REPORT_ERROR(("Integer too large to convert to BCD: %8.8X%8.8X\n", ACPI_FORMAT_UINT64(operand[0]->integer.value))); 399 ACPI_ERROR((AE_INFO,
400 "Integer too large to convert to BCD: %8.8X%8.8X",
401 ACPI_FORMAT_UINT64(operand[0]->
402 integer.value)));
398 status = AE_AML_NUMERIC_OVERFLOW; 403 status = AE_AML_NUMERIC_OVERFLOW;
399 goto cleanup; 404 goto cleanup;
400 } 405 }
@@ -521,16 +526,16 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
521 526
522 /* These are two obsolete opcodes */ 527 /* These are two obsolete opcodes */
523 528
524 ACPI_REPORT_ERROR(("%s is obsolete and not implemented\n", 529 ACPI_ERROR((AE_INFO,
525 acpi_ps_get_opcode_name(walk_state-> 530 "%s is obsolete and not implemented",
526 opcode))); 531 acpi_ps_get_opcode_name(walk_state->opcode)));
527 status = AE_SUPPORT; 532 status = AE_SUPPORT;
528 goto cleanup; 533 goto cleanup;
529 534
530 default: /* Unknown opcode */ 535 default: /* Unknown opcode */
531 536
532 ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", 537 ACPI_ERROR((AE_INFO, "Unknown AML opcode %X",
533 walk_state->opcode)); 538 walk_state->opcode));
534 status = AE_AML_BAD_OPCODE; 539 status = AE_AML_BAD_OPCODE;
535 goto cleanup; 540 goto cleanup;
536 } 541 }
@@ -636,10 +641,10 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
636 acpi_ex_resolve_operands(AML_LNOT_OP, &temp_desc, 641 acpi_ex_resolve_operands(AML_LNOT_OP, &temp_desc,
637 walk_state); 642 walk_state);
638 if (ACPI_FAILURE(status)) { 643 if (ACPI_FAILURE(status)) {
639 ACPI_REPORT_ERROR(("%s: bad operand(s) %s\n", 644 ACPI_EXCEPTION((AE_INFO, status,
640 acpi_ps_get_opcode_name(walk_state-> 645 "While resolving operands for [%s]",
641 opcode), 646 acpi_ps_get_opcode_name(walk_state->
642 acpi_format_exception(status))); 647 opcode)));
643 648
644 goto cleanup; 649 goto cleanup;
645 } 650 }
@@ -738,7 +743,9 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
738 break; 743 break;
739 744
740 default: 745 default:
741 ACPI_REPORT_ERROR(("Operand is not Buf/Int/Str/Pkg - found type %s\n", acpi_ut_get_type_name(type))); 746 ACPI_ERROR((AE_INFO,
747 "Operand is not Buf/Int/Str/Pkg - found type %s",
748 acpi_ut_get_type_name(type)));
742 status = AE_AML_OPERAND_TYPE; 749 status = AE_AML_OPERAND_TYPE;
743 goto cleanup; 750 goto cleanup;
744 } 751 }
@@ -935,7 +942,10 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
935 942
936 default: 943 default:
937 944
938 ACPI_REPORT_ERROR(("Unknown Index target_type %X in obj %p\n", operand[0]->reference.target_type, operand[0])); 945 ACPI_ERROR((AE_INFO,
946 "Unknown Index target_type %X in obj %p",
947 operand[0]->reference.
948 target_type, operand[0]));
939 status = AE_AML_OPERAND_TYPE; 949 status = AE_AML_OPERAND_TYPE;
940 goto cleanup; 950 goto cleanup;
941 } 951 }
@@ -961,7 +971,10 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
961 break; 971 break;
962 972
963 default: 973 default:
964 ACPI_REPORT_ERROR(("Unknown opcode in ref(%p) - %X\n", operand[0], operand[0]->reference.opcode)); 974 ACPI_ERROR((AE_INFO,
975 "Unknown opcode in ref(%p) - %X",
976 operand[0],
977 operand[0]->reference.opcode));
965 978
966 status = AE_TYPE; 979 status = AE_TYPE;
967 goto cleanup; 980 goto cleanup;
@@ -971,8 +984,8 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
971 984
972 default: 985 default:
973 986
974 ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", 987 ACPI_ERROR((AE_INFO, "Unknown AML opcode %X",
975 walk_state->opcode)); 988 walk_state->opcode));
976 status = AE_AML_BAD_OPCODE; 989 status = AE_AML_BAD_OPCODE;
977 goto cleanup; 990 goto cleanup;
978 } 991 }