Subject: Re: LSI Logic 53c1030 / mpt(4) - dma error message
To: Jachym Holecek <freza@liberouter.org>
From: Frank van der Linden <fvdl@netbsd.org>
List: current-users
Date: 02/04/2005 23:16:31
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).

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.

- Frank