aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/dispatcher/dsfield.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/dispatcher/dsfield.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/dispatcher/dsfield.c')
-rw-r--r--drivers/acpi/dispatcher/dsfield.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/drivers/acpi/dispatcher/dsfield.c b/drivers/acpi/dispatcher/dsfield.c
index f3a008ff1eae..76bc0463f6de 100644
--- a/drivers/acpi/dispatcher/dsfield.c
+++ b/drivers/acpi/dispatcher/dsfield.c
@@ -128,7 +128,7 @@ acpi_ds_create_buffer_field(union acpi_parse_object *op,
128 ACPI_IMODE_LOAD_PASS1, flags, walk_state, 128 ACPI_IMODE_LOAD_PASS1, flags, walk_state,
129 &(node)); 129 &(node));
130 if (ACPI_FAILURE(status)) { 130 if (ACPI_FAILURE(status)) {
131 ACPI_REPORT_NSERROR(arg->common.value.string, status); 131 ACPI_ERROR_NAMESPACE(arg->common.value.string, status);
132 return_ACPI_STATUS(status); 132 return_ACPI_STATUS(status);
133 } 133 }
134 } 134 }
@@ -232,7 +232,8 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
232 + (acpi_integer) arg->common.value.size; 232 + (acpi_integer) arg->common.value.size;
233 233
234 if (position > ACPI_UINT32_MAX) { 234 if (position > ACPI_UINT32_MAX) {
235 ACPI_REPORT_ERROR(("Bit offset within field too large (> 0xFFFFFFFF)\n")); 235 ACPI_ERROR((AE_INFO,
236 "Bit offset within field too large (> 0xFFFFFFFF)"));
236 return_ACPI_STATUS(AE_SUPPORT); 237 return_ACPI_STATUS(AE_SUPPORT);
237 } 238 }
238 239
@@ -268,8 +269,8 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
268 ACPI_NS_DONT_OPEN_SCOPE, 269 ACPI_NS_DONT_OPEN_SCOPE,
269 walk_state, &info->field_node); 270 walk_state, &info->field_node);
270 if (ACPI_FAILURE(status)) { 271 if (ACPI_FAILURE(status)) {
271 ACPI_REPORT_NSERROR((char *)&arg->named.name, 272 ACPI_ERROR_NAMESPACE((char *)&arg->named.name,
272 status); 273 status);
273 if (status != AE_ALREADY_EXISTS) { 274 if (status != AE_ALREADY_EXISTS) {
274 return_ACPI_STATUS(status); 275 return_ACPI_STATUS(status);
275 } 276 }
@@ -293,7 +294,11 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
293 + (acpi_integer) arg->common.value.size; 294 + (acpi_integer) arg->common.value.size;
294 295
295 if (position > ACPI_UINT32_MAX) { 296 if (position > ACPI_UINT32_MAX) {
296 ACPI_REPORT_ERROR(("Field [%4.4s] bit offset too large (> 0xFFFFFFFF)\n", ACPI_CAST_PTR(char, &info->field_node->name))); 297 ACPI_ERROR((AE_INFO,
298 "Field [%4.4s] bit offset too large (> 0xFFFFFFFF)",
299 ACPI_CAST_PTR(char,
300 &info->field_node->
301 name)));
297 return_ACPI_STATUS(AE_SUPPORT); 302 return_ACPI_STATUS(AE_SUPPORT);
298 } 303 }
299 304
@@ -302,8 +307,9 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
302 307
303 default: 308 default:
304 309
305 ACPI_REPORT_ERROR(("Invalid opcode in field list: %X\n", 310 ACPI_ERROR((AE_INFO,
306 arg->common.aml_opcode)); 311 "Invalid opcode in field list: %X",
312 arg->common.aml_opcode));
307 return_ACPI_STATUS(AE_AML_BAD_OPCODE); 313 return_ACPI_STATUS(AE_AML_BAD_OPCODE);
308 } 314 }
309 315
@@ -348,7 +354,7 @@ acpi_ds_create_field(union acpi_parse_object *op,
348 ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, 354 ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT,
349 walk_state, &region_node); 355 walk_state, &region_node);
350 if (ACPI_FAILURE(status)) { 356 if (ACPI_FAILURE(status)) {
351 ACPI_REPORT_NSERROR(arg->common.value.name, status); 357 ACPI_ERROR_NAMESPACE(arg->common.value.name, status);
352 return_ACPI_STATUS(status); 358 return_ACPI_STATUS(status);
353 } 359 }
354 } 360 }
@@ -430,8 +436,8 @@ acpi_ds_init_field_objects(union acpi_parse_object *op,
430 ACPI_NS_ERROR_IF_FOUND, 436 ACPI_NS_ERROR_IF_FOUND,
431 walk_state, &node); 437 walk_state, &node);
432 if (ACPI_FAILURE(status)) { 438 if (ACPI_FAILURE(status)) {
433 ACPI_REPORT_NSERROR((char *)&arg->named.name, 439 ACPI_ERROR_NAMESPACE((char *)&arg->named.name,
434 status); 440 status);
435 if (status != AE_ALREADY_EXISTS) { 441 if (status != AE_ALREADY_EXISTS) {
436 return_ACPI_STATUS(status); 442 return_ACPI_STATUS(status);
437 } 443 }
@@ -487,7 +493,7 @@ acpi_ds_create_bank_field(union acpi_parse_object *op,
487 ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, 493 ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT,
488 walk_state, &region_node); 494 walk_state, &region_node);
489 if (ACPI_FAILURE(status)) { 495 if (ACPI_FAILURE(status)) {
490 ACPI_REPORT_NSERROR(arg->common.value.name, status); 496 ACPI_ERROR_NAMESPACE(arg->common.value.name, status);
491 return_ACPI_STATUS(status); 497 return_ACPI_STATUS(status);
492 } 498 }
493 } 499 }
@@ -501,7 +507,7 @@ acpi_ds_create_bank_field(union acpi_parse_object *op,
501 ACPI_NS_SEARCH_PARENT, walk_state, 507 ACPI_NS_SEARCH_PARENT, walk_state,
502 &info.register_node); 508 &info.register_node);
503 if (ACPI_FAILURE(status)) { 509 if (ACPI_FAILURE(status)) {
504 ACPI_REPORT_NSERROR(arg->common.value.string, status); 510 ACPI_ERROR_NAMESPACE(arg->common.value.string, status);
505 return_ACPI_STATUS(status); 511 return_ACPI_STATUS(status);
506 } 512 }
507 513
@@ -559,7 +565,7 @@ acpi_ds_create_index_field(union acpi_parse_object *op,
559 ACPI_NS_SEARCH_PARENT, walk_state, 565 ACPI_NS_SEARCH_PARENT, walk_state,
560 &info.register_node); 566 &info.register_node);
561 if (ACPI_FAILURE(status)) { 567 if (ACPI_FAILURE(status)) {
562 ACPI_REPORT_NSERROR(arg->common.value.string, status); 568 ACPI_ERROR_NAMESPACE(arg->common.value.string, status);
563 return_ACPI_STATUS(status); 569 return_ACPI_STATUS(status);
564 } 570 }
565 571
@@ -572,7 +578,7 @@ acpi_ds_create_index_field(union acpi_parse_object *op,
572 ACPI_NS_SEARCH_PARENT, walk_state, 578 ACPI_NS_SEARCH_PARENT, walk_state,
573 &info.data_register_node); 579 &info.data_register_node);
574 if (ACPI_FAILURE(status)) { 580 if (ACPI_FAILURE(status)) {
575 ACPI_REPORT_NSERROR(arg->common.value.string, status); 581 ACPI_ERROR_NAMESPACE(arg->common.value.string, status);
576 return_ACPI_STATUS(status); 582 return_ACPI_STATUS(status);
577 } 583 }
578 584