aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/executer/exprep.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/exprep.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/exprep.c')
-rw-r--r--drivers/acpi/executer/exprep.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/drivers/acpi/executer/exprep.c b/drivers/acpi/executer/exprep.c
index 3bde780c94cf..7719ae5d4f16 100644
--- a/drivers/acpi/executer/exprep.c
+++ b/drivers/acpi/executer/exprep.c
@@ -274,7 +274,7 @@ acpi_ex_decode_field_access(union acpi_operand_object *obj_desc,
274 default: 274 default:
275 /* Invalid field access type */ 275 /* Invalid field access type */
276 276
277 ACPI_REPORT_ERROR(("Unknown field access type %X\n", access)); 277 ACPI_ERROR((AE_INFO, "Unknown field access type %X", access));
278 return_UINT32(0); 278 return_UINT32(0);
279 } 279 }
280 280
@@ -421,13 +421,15 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info)
421 421
422 if (info->field_type != ACPI_TYPE_LOCAL_INDEX_FIELD) { 422 if (info->field_type != ACPI_TYPE_LOCAL_INDEX_FIELD) {
423 if (!info->region_node) { 423 if (!info->region_node) {
424 ACPI_REPORT_ERROR(("Null region_node\n")); 424 ACPI_ERROR((AE_INFO, "Null region_node"));
425 return_ACPI_STATUS(AE_AML_NO_OPERAND); 425 return_ACPI_STATUS(AE_AML_NO_OPERAND);
426 } 426 }
427 427
428 type = acpi_ns_get_type(info->region_node); 428 type = acpi_ns_get_type(info->region_node);
429 if (type != ACPI_TYPE_REGION) { 429 if (type != ACPI_TYPE_REGION) {
430 ACPI_REPORT_ERROR(("Needed Region, found type %X (%s)\n", type, acpi_ut_get_type_name(type))); 430 ACPI_ERROR((AE_INFO,
431 "Needed Region, found type %X (%s)",
432 type, acpi_ut_get_type_name(type)));
431 433
432 return_ACPI_STATUS(AE_AML_OPERAND_TYPE); 434 return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
433 } 435 }
@@ -496,17 +498,17 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info)
496 498
497 case ACPI_TYPE_LOCAL_INDEX_FIELD: 499 case ACPI_TYPE_LOCAL_INDEX_FIELD:
498 500
501 /* Get the Index and Data registers */
502
499 obj_desc->index_field.index_obj = 503 obj_desc->index_field.index_obj =
500 acpi_ns_get_attached_object(info->register_node); 504 acpi_ns_get_attached_object(info->register_node);
501 obj_desc->index_field.data_obj = 505 obj_desc->index_field.data_obj =
502 acpi_ns_get_attached_object(info->data_register_node); 506 acpi_ns_get_attached_object(info->data_register_node);
503 obj_desc->index_field.value = (u32)
504 (info->field_bit_position /
505 ACPI_MUL_8(obj_desc->field.access_byte_width));
506 507
507 if (!obj_desc->index_field.data_obj 508 if (!obj_desc->index_field.data_obj
508 || !obj_desc->index_field.index_obj) { 509 || !obj_desc->index_field.index_obj) {
509 ACPI_REPORT_ERROR(("Null Index Object during field prep\n")); 510 ACPI_ERROR((AE_INFO,
511 "Null Index Object during field prep"));
510 acpi_ut_delete_object_desc(obj_desc); 512 acpi_ut_delete_object_desc(obj_desc);
511 return_ACPI_STATUS(AE_AML_INTERNAL); 513 return_ACPI_STATUS(AE_AML_INTERNAL);
512 } 514 }
@@ -516,6 +518,15 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info)
516 acpi_ut_add_reference(obj_desc->index_field.data_obj); 518 acpi_ut_add_reference(obj_desc->index_field.data_obj);
517 acpi_ut_add_reference(obj_desc->index_field.index_obj); 519 acpi_ut_add_reference(obj_desc->index_field.index_obj);
518 520
521 /*
522 * The value written to the Index register is the byte offset of the
523 * target field
524 * Note: may change code to: ACPI_DIV_8 (Info->field_bit_position)
525 */
526 obj_desc->index_field.value = (u32)
527 (info->field_bit_position /
528 ACPI_MUL_8(obj_desc->field.access_byte_width));
529
519 ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, 530 ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
520 "index_field: bit_off %X, Off %X, Value %X, Gran %X, Index %p, Data %p\n", 531 "index_field: bit_off %X, Off %X, Value %X, Gran %X, Index %p, Data %p\n",
521 obj_desc->index_field.start_field_bit_offset, 532 obj_desc->index_field.start_field_bit_offset,