Subject: Re: LSI Logic 53c1030 / mpt(4) - dma error message
To: Frank van der Linden <fvdl@netbsd.org>
From: Nicolas Joly <njoly@pasteur.fr>
List: current-users
Date: 02/07/2005 10:37:08
On Fri, Feb 04, 2005 at 11:16:31PM +0100, Frank van der Linden wrote:
> On Fri, Feb 04, 2005 at 10:38:20PM +0100, Jachym Holecek wrote:
> > (I still think transfer bytecount gets screwed somewhere on the way,
> > there's a couple of implicit signed/unsigned int/int64_t casts involved...)
> 
> The first problem is that the bootinfo_wedge structure wasn't aligned
> properly for 64bits, so the 32bit bootloader's alignment for it did not
> match with the 64bit kernel, and produced bogus values (note:
> "findroot: unable to read block 4294967296", which was reported by
> someone else on port-amd64 too).
> 
> I fixed sys/arch/x86/include/bootinfo.h (rev. 1.7).

Frank, it works fine now. Thanks.

> However, this just revealed an underlying problem. The block numbers were
> ridiculous, but the buffer size was just 512 bytes. There is probably
> an overflow in there somewhere for the "blk * DEV_BSIZE" offset passed
> to vn_rdwr.
> 
> 4294967296 is 2^32, so DEV_BSIZE * blk = 2^9 * 2^32 = 2^41, which should
> still fit.

Jachym,

Do you still want the requested output, with Frank fix removed, to
track the underlying problem ?

Again, thanks for your help.

-- 
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.