aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/executer/exfldio.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2006-04-21 17:15:00 -0400
committerLen Brown <len.brown@intel.com>2006-06-14 02:30:55 -0400
commitb229cf92eee616c7cb5ad8cdb35a19b119f00bc8 (patch)
tree74b52bec6ec029859c2320aba227290a503af31a /drivers/acpi/executer/exfldio.c
parent793c2388cae3fd023b3b5166354931752d42353c (diff)
ACPI: ACPICA 20060421
Removed a device initialization optimization introduced in 20051216 where the _STA method was not run unless an _INI was also present for the same device. This optimization could cause problems because it could allow _INI methods to be run within a not-present device subtree (If a not-present device had no _INI, _STA would not be run, the not-present status would not be discovered, and the children of the device would be incorrectly traversed.) Implemented a new _STA optimization where namespace subtrees that do not contain _INI are identified and ignored during device initialization. Selectively running _STA can significantly improve boot time on large machines (with assistance from Len Brown.) Implemented support for the device initialization case where the returned _STA flags indicate a device not-present but functioning. In this case, _INI is not run, but the device children are examined for presence, as per the ACPI specification. Implemented an additional change to the IndexField support in order to conform to MS behavior. The value written to the Index Register is not simply a byte offset, it is a byte offset in units of the access width of the parent Index Field. (Fiodor Suietov) Defined and deployed a new OSL interface, acpi_os_validate_address(). This interface is called during the creation of all AML operation regions, and allows the host OS to exert control over what addresses it will allow the AML code to access. Operation Regions whose addresses are disallowed will cause a runtime exception when they are actually accessed (will not affect or abort table loading.) Defined and deployed a new OSL interface, acpi_os_validate_interface(). This interface allows the host OS to match the various "optional" interface/behavior strings for the _OSI predefined control method as appropriate (with assistance from Bjorn Helgaas.) Restructured and corrected various problems in the exception handling code paths within DsCallControlMethod and DsTerminateControlMethod in dsmethod (with assistance from Takayoshi Kochi.) Modified the Linux source converter to ignore quoted string literals while converting identifiers from mixed to lower case. This will correct problems with the disassembler and other areas where such strings must not be modified. The ACPI_FUNCTION_* macros no longer require quotes around the function name. This allows the Linux source converter to convert the names, now that the converter ignores quoted strings. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
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