Subject: Re: Larger than 8 gig IDE drives
To: Jukka A Andberg <jaandber@cs.Helsinki.FI>
From: Ignatios Souvatzis <is@beverly.kleinbus.org>
List: port-amiga
Date: 03/03/2001 19:48:27
On Sat, Mar 03, 2001 at 02:53:33PM +0200, Jukka A Andberg wrote:

> I used the wd-driver and got the same values for these three ones
> but with a final sector count that indicated the real capacity of
> the drive. This was even the same sector count as reported on the
> manufacturer's page.

A) Yes! Let me explain how I think modern IDE drives work:

- the c-h-s geometry indicates the maximum that the (old) BIOS functions 
can handle, 8.mumble Gigabytes, depending on the definition of GB.

(16383 * 255 * 63 * 512 bytes).

- the linear value reported is the real capacity of the disk.

Note that both is what the drive reports!

B) Now, the idesc driver has to translate various scsi requests of
the sd driver into corresponding IDE access magic, and from what
you report it looks to me (I didn't check the code) that it looks
at the c-h-s stuff only (while the wdc stuff gets it right).

If there is an easy way to fix this for idesc, I might be tempted
to add this to the idesc driver and ask to get it into 1.5.1, but
I won't spent much time myself to read and write code for idesc...
it's supposed to mostly die in 1.6.

C) A different question is how to _use_ the disk, as we currently don't have
any in-tree RDB generator in NetBSD. If you create a RDB and PARTs that 
use the correct capacity of the disk, NetBSD will be fine with it, afaict.

The value reported at kernel startup is only used to create a fake internal
disk label if no RDB is found on the disk (that is, you're trying to use
the raw disk).

Regards,
	Ignatios