*BSD News Article 7034


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!asuvax!ncar!csn!raven!rcd
From: rcd@raven.eklektix.com (Dick Dunn)
Subject: Re: Finding untranslated params for IDE drives (w/ pgm)
Message-ID: <1992Oct25.183912@eklektix.com>
Summary: "IDE controller" is a misnomer
Organization: eklektix - Boulder, Colorado
References: <1992Oct19.053131.11296@tfs.com> <BwLopC.82n@flatlin.ka.sub.org> <1992Oct25.112332.25964@fcom.cc.utah.edu>
Date: Sun, 25 Oct 1992 18:39:12 GMT
Lines: 67

terry@cs.weber.edu (A Wizard of Earth C) writes:
>(Christoph Badura) writes:
>|> (Julian Elischer) writes:
>|> >Terry feels that tehhe translation in IDE drives is done by the BIOS
>|> >support routines...
....
>|> Terry feels wrong. IDE translation is done "on the drive",...
....
>Terry feels this from disassembling the BIOS *on board* an IDE controller;

There is NO BIOS on an IDE controller.

Remember, we're making the distinction between "drive" and "controller",
which are two objects, purchased separately, connected by a cable.  The
term "controller" is a misnomer for an IDE card anyway...it's nothing but
a set of connectors and some signal buffering.  (The idea of building a
BIOS out of a few 74LS glue chips and maybe a PAL is amusing, though.)

Once again: There is NO BIOS on an IDE "controller".
The logic is all on the drives themselves.  That's the whole point of IDE.

>one wonders how AMI BIOS drive type 47 works when the drive hardware only has
>access to the CMOS settings through it's controller firmware?

See command 0x91, variously known as "set parameters", "initialize drive
parameters", etc.  This is an AT disk controller command, sent from host to
controller/drive.  The "parameters" to the command (the relevant controller
registers) are drive/head, which must contain the unit number and the
number of heads, and sector-count, which must contain the number of sectors
per track.  This command is sent by the main-board BIOS code, using CMOS
values, at POST time.

>Terry also feels that, were the translation 100% transparent, no one trying to
>load both DOS and 386BSD on an IDE drive would ever have problems related to
>translation...

The interpretation of "set parameters" varies with the drive/controller.
Old drives would either accept the parameters as given if they matched the
physical configuration, or reject.  A more recent drive having only one
translation mode would behave similarly--either accept parameters which
match the one possible translation mode, or reject.

Some drives can operate in more than one logical configuration.  This isn't
even a new idea; large ESDI drives did it years ago.  (In this case, the
possible configurations may include an untranslated configuration, but they
need not.  For a zone-recorded drive, they won't.)  In this case, the "set
parameters" command tells the drive which configuration to select...and
*HERE* is where the trouble can happen.  If you set the drive parameters,
write stuff on the disk, then reset the drive to different parameters,
you'll scramble the sector sequence because you've changed the logical->
physical mapping.

The translation *is* transparent in the sense that once you've done the
"set parameters" (which is an initialization command), the translation
stays put.  The problems happen with drives that allow multiple trans-
lations, and they happen when the drive is explicitly asked to change its
translation.

[Digression: Why do some drives offer multiple translations?  To allow them
to work with various old BIOSes that don't have user-defined drive type and
that have a limited table of fixed drive configurations.]

And, one last time, on an IDE drive the translation happens on the drive
itself.
-- 
Dick Dunn    rcd@raven.eklektix.com   -or-   raven!rcd    Boulder, Colorado
   Mr Natural says, "Get the right tool for the job!"