diff mbox

ACPICA: Handle large field apertures.

Message ID 1274841567.28455.16.camel@minggr.sh.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lin Ming May 26, 2010, 2:39 a.m. UTC
None
diff mbox

Patch

diff --git a/source/components/executer/exprep.c b/source/components/executer/exprep.c
index 95fa502..65cbe39 100644
--- a/source/components/executer/exprep.c
+++ b/source/components/executer/exprep.c
@@ -511,6 +511,7 @@  AcpiExPrepFieldValue (
     ACPI_OPERAND_OBJECT     *ObjDesc;
     ACPI_OPERAND_OBJECT     *SecondDesc = NULL;
     UINT32                  Type;
+    UINT32                  AccessByteWidth;
     ACPI_STATUS             Status;
 
 
@@ -568,8 +569,12 @@  AcpiExPrepFieldValue (
 	/* allow full data read from EC address space */
 	if (ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_EC) {
 	    if (ObjDesc->CommonField.BitLength > 8) {
-		ObjDesc->CommonField.AccessByteWidth =
-		    ACPI_ROUND_BITS_UP_TO_BYTES(ObjDesc->CommonField.BitLength);
+                AccessByteWidth = ACPI_ROUND_BITS_UP_TO_BYTES(ObjDesc->CommonField.BitLength);
+
+                /* The max of ObjDesc->CommonField.AccessByteWidth is 0xFF */
+                if (!(AccessByteWidth >> 8)) {
+		    ObjDesc->CommonField.AccessByteWidth = AccessByteWidth;
+                }
 	    }
 	}