diff options
author | Lin Ming <ming.m.lin@intel.com> | 2012-01-12 00:10:32 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-01-17 03:38:50 -0500 |
commit | f654c0fefa8c16d439185b61442710fadc167e78 (patch) | |
tree | f6a375f7404e6a76f6eb24cc7d639f32b6789c7d /drivers/acpi/acpica/dsargs.c | |
parent | ecafe6faa294697305453b5a6af7760b94622787 (diff) |
ACPICA: Add support for region address conflict checking
Allows drivers to determine if any memory or I/O addresses
will conflict with addresses used by ACPI operation regions.
Introduces a new interface, acpi_check_address_range.
http://marc.info/?t=132251388700002&r=1&w=2
Reported-and-tested-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/dsargs.c')
-rw-r--r-- | drivers/acpi/acpica/dsargs.c | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/drivers/acpi/acpica/dsargs.c b/drivers/acpi/acpica/dsargs.c index d69e4a53175b..19c2be941e78 100644 --- a/drivers/acpi/acpica/dsargs.c +++ b/drivers/acpi/acpica/dsargs.c | |||
@@ -250,6 +250,13 @@ acpi_ds_get_bank_field_arguments(union acpi_operand_object *obj_desc) | |||
250 | status = acpi_ds_execute_arguments(node, node->parent, | 250 | status = acpi_ds_execute_arguments(node, node->parent, |
251 | extra_desc->extra.aml_length, | 251 | extra_desc->extra.aml_length, |
252 | extra_desc->extra.aml_start); | 252 | extra_desc->extra.aml_start); |
253 | if (ACPI_FAILURE(status)) { | ||
254 | return_ACPI_STATUS(status); | ||
255 | } | ||
256 | |||
257 | status = acpi_ut_add_address_range(obj_desc->region.space_id, | ||
258 | obj_desc->region.address, | ||
259 | obj_desc->region.length, node); | ||
253 | return_ACPI_STATUS(status); | 260 | return_ACPI_STATUS(status); |
254 | } | 261 | } |
255 | 262 | ||
@@ -391,25 +398,8 @@ acpi_status acpi_ds_get_region_arguments(union acpi_operand_object *obj_desc) | |||
391 | return_ACPI_STATUS(status); | 398 | return_ACPI_STATUS(status); |
392 | } | 399 | } |
393 | 400 | ||
394 | /* Validate the region address/length via the host OS */ | 401 | status = acpi_ut_add_address_range(obj_desc->region.space_id, |
395 | 402 | obj_desc->region.address, | |
396 | status = acpi_os_validate_address(obj_desc->region.space_id, | 403 | obj_desc->region.length, node); |
397 | obj_desc->region.address, | ||
398 | (acpi_size) obj_desc->region.length, | ||
399 | acpi_ut_get_node_name(node)); | ||
400 | |||
401 | if (ACPI_FAILURE(status)) { | ||
402 | /* | ||
403 | * Invalid address/length. We will emit an error message and mark | ||
404 | * the region as invalid, so that it will cause an additional error if | ||
405 | * it is ever used. Then return AE_OK. | ||
406 | */ | ||
407 | ACPI_EXCEPTION((AE_INFO, status, | ||
408 | "During address validation of OpRegion [%4.4s]", | ||
409 | node->name.ascii)); | ||
410 | obj_desc->common.flags |= AOPOBJ_INVALID; | ||
411 | status = AE_OK; | ||
412 | } | ||
413 | |||
414 | return_ACPI_STATUS(status); | 404 | return_ACPI_STATUS(status); |
415 | } | 405 | } |