aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/executer/exfldio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/executer/exfldio.c')
-rw-r--r--drivers/acpi/executer/exfldio.c30
1 files changed, 20 insertions, 10 deletions
diff --git a/drivers/acpi/executer/exfldio.c b/drivers/acpi/executer/exfldio.c
index d5a4b2627c19..ca9925c0d011 100644
--- a/drivers/acpi/executer/exfldio.c
+++ b/drivers/acpi/executer/exfldio.c
@@ -87,7 +87,7 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc,
87 acpi_status status = AE_OK; 87 acpi_status status = AE_OK;
88 union acpi_operand_object *rgn_desc; 88 union acpi_operand_object *rgn_desc;
89 89
90 ACPI_FUNCTION_TRACE_U32("ex_setup_region", field_datum_byte_offset); 90 ACPI_FUNCTION_TRACE_U32(ex_setup_region, field_datum_byte_offset);
91 91
92 rgn_desc = obj_desc->common_field.region_obj; 92 rgn_desc = obj_desc->common_field.region_obj;
93 93
@@ -112,6 +112,16 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc,
112 } 112 }
113 } 113 }
114 114
115 /* Exit if Address/Length have been disallowed by the host OS */
116
117 if (rgn_desc->common.flags & AOPOBJ_INVALID) {
118 return_ACPI_STATUS(AE_AML_ILLEGAL_ADDRESS);
119 }
120
121 /*
122 * Exit now for SMBus address space, it has a non-linear address space
123 * and the request cannot be directly validated
124 */
115 if (rgn_desc->region.space_id == ACPI_ADR_SPACE_SMBUS) { 125 if (rgn_desc->region.space_id == ACPI_ADR_SPACE_SMBUS) {
116 126
117 /* SMBus has a non-linear address space */ 127 /* SMBus has a non-linear address space */
@@ -218,7 +228,7 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc,
218 union acpi_operand_object *rgn_desc; 228 union acpi_operand_object *rgn_desc;
219 acpi_physical_address address; 229 acpi_physical_address address;
220 230
221 ACPI_FUNCTION_TRACE("ex_access_region"); 231 ACPI_FUNCTION_TRACE(ex_access_region);
222 232
223 /* 233 /*
224 * Ensure that the region operands are fully evaluated and verify 234 * Ensure that the region operands are fully evaluated and verify
@@ -247,7 +257,7 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc,
247 } 257 }
248 258
249 ACPI_DEBUG_PRINT_RAW((ACPI_DB_BFIELD, 259 ACPI_DEBUG_PRINT_RAW((ACPI_DB_BFIELD,
250 " Region [%s:%X], Width %X, byte_base %X, Offset %X at %8.8X%8.8X\n", 260 " Region [%s:%X], Width %X, ByteBase %X, Offset %X at %8.8X%8.8X\n",
251 acpi_ut_get_region_name(rgn_desc->region. 261 acpi_ut_get_region_name(rgn_desc->region.
252 space_id), 262 space_id),
253 rgn_desc->region.space_id, 263 rgn_desc->region.space_id,
@@ -353,7 +363,7 @@ acpi_ex_field_datum_io(union acpi_operand_object *obj_desc,
353 acpi_status status; 363 acpi_status status;
354 acpi_integer local_value; 364 acpi_integer local_value;
355 365
356 ACPI_FUNCTION_TRACE_U32("ex_field_datum_io", field_datum_byte_offset); 366 ACPI_FUNCTION_TRACE_U32(ex_field_datum_io, field_datum_byte_offset);
357 367
358 if (read_write == ACPI_READ) { 368 if (read_write == ACPI_READ) {
359 if (!value) { 369 if (!value) {
@@ -488,7 +498,7 @@ acpi_ex_field_datum_io(union acpi_operand_object *obj_desc,
488 } 498 }
489 499
490 ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, 500 ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
491 "I/O to Data Register: value_ptr %p\n", 501 "I/O to Data Register: ValuePtr %p\n",
492 value)); 502 value));
493 503
494 if (read_write == ACPI_READ) { 504 if (read_write == ACPI_READ) {
@@ -561,7 +571,7 @@ acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc,
561 acpi_integer merged_value; 571 acpi_integer merged_value;
562 acpi_integer current_value; 572 acpi_integer current_value;
563 573
564 ACPI_FUNCTION_TRACE_U32("ex_write_with_update_rule", mask); 574 ACPI_FUNCTION_TRACE_U32(ex_write_with_update_rule, mask);
565 575
566 /* Start with the new bits */ 576 /* Start with the new bits */
567 577
@@ -617,7 +627,7 @@ acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc,
617 default: 627 default:
618 628
619 ACPI_ERROR((AE_INFO, 629 ACPI_ERROR((AE_INFO,
620 "Unknown update_rule value: %X", 630 "Unknown UpdateRule value: %X",
621 (obj_desc->common_field. 631 (obj_desc->common_field.
622 field_flags & 632 field_flags &
623 AML_FIELD_UPDATE_RULE_MASK))); 633 AML_FIELD_UPDATE_RULE_MASK)));
@@ -626,7 +636,7 @@ acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc,
626 } 636 }
627 637
628 ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, 638 ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
629 "Mask %8.8X%8.8X, datum_offset %X, Width %X, Value %8.8X%8.8X, merged_value %8.8X%8.8X\n", 639 "Mask %8.8X%8.8X, DatumOffset %X, Width %X, Value %8.8X%8.8X, MergedValue %8.8X%8.8X\n",
630 ACPI_FORMAT_UINT64(mask), 640 ACPI_FORMAT_UINT64(mask),
631 field_datum_byte_offset, 641 field_datum_byte_offset,
632 obj_desc->common_field.access_byte_width, 642 obj_desc->common_field.access_byte_width,
@@ -669,7 +679,7 @@ acpi_ex_extract_from_field(union acpi_operand_object *obj_desc,
669 u32 field_datum_count; 679 u32 field_datum_count;
670 u32 i; 680 u32 i;
671 681
672 ACPI_FUNCTION_TRACE("ex_extract_from_field"); 682 ACPI_FUNCTION_TRACE(ex_extract_from_field);
673 683
674 /* Validate target buffer and clear it */ 684 /* Validate target buffer and clear it */
675 685
@@ -784,7 +794,7 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
784 u32 field_datum_count; 794 u32 field_datum_count;
785 u32 i; 795 u32 i;
786 796
787 ACPI_FUNCTION_TRACE("ex_insert_into_field"); 797 ACPI_FUNCTION_TRACE(ex_insert_into_field);
788 798
789 /* Validate input buffer */ 799 /* Validate input buffer */
790 800