@@ -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;
+ }
}
}