From owner-acpi-jp@jp.freebsd.org  Fri Nov  9 06:52:12 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id GAA90642;
	Fri, 9 Nov 2001 06:52:12 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from calliope1.fm.intel.com (fmfdns01.fm.intel.com [132.233.247.10])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id GAA90636;
	Fri, 9 Nov 2001 06:52:09 +0900 (JST)
	(envelope-from robert.moore@intel.com)
Received: from fmsmsxvs043.fm.intel.com (fmsmsxv043-1.fm.intel.com [132.233.48.128])
	by calliope1.fm.intel.com (8.9.1a+p1/8.9.1/d: relay.m4,v 1.46 2001/10/25 21:02:55 root Exp $) with SMTP id VAA14651;
	Thu, 8 Nov 2001 21:52:08 GMT
Received: from fmsmsx28.fm.intel.com ([132.233.42.28])
 by fmsmsxvs043.fm.intel.com (NAVGW 2.5.1.6) with SMTP id M2001110813512209247
 ; Thu, 08 Nov 2001 13:51:22 -0800
Received: by fmsmsx28.fm.intel.com with Internet Mail Service (5.5.2653.19)
	id <W368TQDV>; Thu, 8 Nov 2001 13:52:28 -0800
Message-ID: <B9ECACBD6885D5119ADC00508B68C1EA2FDFFC@orsmsx107.jf.intel.com>
From: "Moore, Robert" <robert.moore@intel.com>
To: "'seno@necsystems.com'" <seno@necsystems.com>
Cc: "'KOCHI, Takayoshi'" <t-kouchi@mvf.biglobe.ne.jp>,
        "'acpi-jp@jp.freebsd.org'" <acpi-jp@jp.freebsd.org>,
        "'Mitsuru IWASAKI'" <iwasaki@jp.freebsd.org>
Date: Thu, 8 Nov 2001 13:51:59 -0800 
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain;
	charset="iso-8859-1"
Reply-To: acpi-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+010328
X-Sequence: acpi-jp 1460
Subject: [acpi-jp 1460] RE: acpica-unix-20011102 is out
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: robert.moore@intel.com


Since the BaseByteOffset takes into account the alignment to generate the
byte address of the first field datum, subtracting the BaseBitOffset
(BaseByteOffset * 8) from the starting FieldBitPosition should also give us
the correct bit offset. 

I like your solution, no divide. 
Bob


-----Original Message-----
From: Kenichi Senoo [mailto:seno@necsystems.com]
Sent: Thursday, November 08, 2001 1:21 PM
To: acpi-jp@jp.freebsd.org; 'Mitsuru IWASAKI'
Cc: Grover, Andrew; acpi-jp@jp.freebsd.org; 'KOCHI, Takayoshi'
Subject: [acpi-jp 1459] Re: acpica-unix-20011102 is out


Hi,
Since the datum is read from BaseByteOffset and the StartFieldBitOffset
is offset from the datum,  StartFieldBitOffset seems to be 
 (FieldBitPosition - ObjDesc->CommonField.BaseByteOffset * 8);

> I think that the fix for the StartFieldBitOffset problem (included in the
> 11/02 build) must use the address granularity rather than the access bit
> width.

> exprep.c
> /*
>  * StartFieldBitOffset is the offset of the first bit of the field within
a
> field datum.
>  */
> ObjDesc->CommonField.StartFieldBitOffset  = (UINT8) (FieldBitPosition %
> Alignment);
-- 
 Kenichi Senoh, NEC Systems, Inc.
