summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/exprep.c
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>2000-12-21 06:56:46 +0000
committermsmith <msmith@FreeBSD.org>2000-12-21 06:56:46 +0000
commit07e76fb2a28476ae54bb108098c0707743ab398c (patch)
tree75730fe174d9e937dfe3355d34c0bf027089aab8 /sys/contrib/dev/acpica/exprep.c
parentb92a08961bec1b7b6c9756c131e093978f2f9029 (diff)
parent68d9171019852e7a4325965a2539a5a2eb7571da (diff)
downloadFreeBSD-src-07e76fb2a28476ae54bb108098c0707743ab398c.zip
FreeBSD-src-07e76fb2a28476ae54bb108098c0707743ab398c.tar.gz
This commit was generated by cvs2svn to compensate for changes in r70243,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'sys/contrib/dev/acpica/exprep.c')
-rw-r--r--sys/contrib/dev/acpica/exprep.c28
1 files changed, 22 insertions, 6 deletions
diff --git a/sys/contrib/dev/acpica/exprep.c b/sys/contrib/dev/acpica/exprep.c
index 63b7c0b..b0aa979 100644
--- a/sys/contrib/dev/acpica/exprep.c
+++ b/sys/contrib/dev/acpica/exprep.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amprep - ACPI AML (p-code) execution - field prep utilities
- * $Revision: 69 $
+ * $Revision: 72 $
*
*****************************************************************************/
@@ -10,8 +10,8 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
- * reserved.
+ * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * All rights reserved.
*
* 2. License
*
@@ -142,13 +142,29 @@
static UINT32
AcpiAmlDecodeFieldAccessType (
- UINT32 Access)
+ UINT32 Access,
+ UINT16 Length)
{
switch (Access)
{
case ACCESS_ANY_ACC:
- return (8);
+ if (Length <= 8)
+ {
+ return (8);
+ }
+ else if (Length <= 16)
+ {
+ return (16);
+ }
+ else if (Length <= 32)
+ {
+ return (32);
+ }
+ else
+ {
+ return (8);
+ }
break;
case ACCESS_BYTE_ACC:
@@ -229,7 +245,7 @@ AcpiAmlPrepCommonFieldObject (
/* Decode the access type so we can compute offsets */
- Granularity = AcpiAmlDecodeFieldAccessType (ObjDesc->Field.Access);
+ Granularity = AcpiAmlDecodeFieldAccessType (ObjDesc->Field.Access, ObjDesc->Field.Length);
if (!Granularity)
{
return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
OpenPOWER on IntegriCloud