Subject: Re: ERR_NOOS in stand/mbr/mbr.S
To: Brian A. Seklecki <lavalamp@spiritual-machines.org>
From: David Laight <david@l8s.co.uk>
List: port-i386
Date: 05/04/2006 22:20:46
On Fri, Apr 28, 2006 at 12:27:23PM -0400, Brian A. Seklecki wrote:
> >geometry.  Note the "geomspec" operand to vnconfig; if you get that right,
> 
> "Ahhhh" you're right.  I forgot about the whole PC BIOS LBA/CHS/Large mode 
> access.  I can toggle on or off LBA access mode on some of my dev boxes; 
> however some of them like to probe it in CHS mode.
> 
> What mode do you suppose a CF ATA adapter should be in?  This is 1GIG, so 
> translation is almost a must.

What actually matters here is the 'fake' geometry that the Soekris BIOS
reports for the disk, this may be different from any other geometry
values returned for the same CF card by any other system.

Since the sector you are having trouble reading is the first one of the
netbsd partition, large disk issues aren't a problem.  This sector is
(with a normal setup) the first sector of the track zero head 1, and for
most bios 'fake' geometries is sector 63.  However is the bios uses a
geometry with 32 sectors per track, and your mbr table starts in sector
63, this would be sector 32 of track 0 head 1 (if my sums are correct).

The 'mbr' and 'mbr_bootsel' both try to use CHS addressing, but will
fall back onto LBA addressing if the LBA sector number on the mbr
partition entry doesn't match the CHS one with the geometry reported
by the bios (the check isn't foolproof - but should be ok with these
numbers).

CHS addressing is used by default because there are systems where the
bios appears to support LBA reads, but the reads fail when attempted.

The 'mbr_lba' code will always use LBA addressing.  You can only shoe-horn
so much functionality into the space available!

	David

-- 
David Laight: david@l8s.co.uk