patch-2.4.0-prerelease linux/drivers/acpi/interpreter/amfield.c
Next file: linux/drivers/acpi/interpreter/amfldio.c
Previous file: linux/drivers/acpi/interpreter/amdyadic.c
Back to the patch index
Back to the overall index
- Lines: 52
- Date:
Fri Dec 29 14:07:21 2000
- Orig file:
v2.4.0-test12/linux/drivers/acpi/interpreter/amfield.c
- Orig date:
Sun Oct 8 10:50:14 2000
diff -u --recursive --new-file v2.4.0-test12/linux/drivers/acpi/interpreter/amfield.c linux/drivers/acpi/interpreter/amfield.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: amfield - ACPI AML (p-code) execution - field manipulation
- * $Revision: 70 $
+ * $Revision: 74 $
*
*****************************************************************************/
@@ -105,7 +105,7 @@
/*
- * If the address and length have not been previously evaluated,
+ * If the Region Address and Length have not been previously evaluated,
* evaluate them and save the results.
*/
if (!(rgn_desc->region.flags & AOPOBJ_DATA_VALID)) {
@@ -116,6 +116,16 @@
}
}
+
+ if ((obj_desc->common.type == ACPI_TYPE_FIELD_UNIT) &&
+ (!(obj_desc->common.flags & AOPOBJ_DATA_VALID)))
+ {
+ /*
+ * Field Buffer and Index have not been previously evaluated,
+ */
+ return (AE_AML_INTERNAL);
+ }
+
if (rgn_desc->region.length <
(obj_desc->field.offset & ~((u32) field_byte_width - 1)) +
field_byte_width)
@@ -213,7 +223,16 @@
actual_byte_length = buffer_length;
if (buffer_length > byte_field_length) {
actual_byte_length = byte_field_length;
+ }
+
+ /* TBD: should these round down to a power of 2? */
+
+ if (DIV_8(bit_granularity) > byte_field_length) {
+ bit_granularity = MUL_8(byte_field_length);
+ }
+ if (byte_granularity > byte_field_length) {
+ byte_granularity = byte_field_length;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)