Return to BSD News archive
Newsgroups: comp.unix.bsd Path: sserve!manuel.anu.edu.au!munnari.oz.au!sgiblab!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!hamblin.math.byu.edu!news.byu.edu!ux1!fcom.cc.utah.edu!cs.weber.edu!terry From: terry@cs.weber.edu (A Wizard of Earth C) Subject: Re: Finding untranslated params for IDE drives (w/ pgm) Message-ID: <1992Oct26.203210.3624@fcom.cc.utah.edu> Sender: news@fcom.cc.utah.edu Reply-To: terry@icarus.weber.edu Organization: Weber State University (Ogden, UT) References: <1992Oct25.112332.25964@fcom.cc.utah.edu> <720052151snx@grendel.demon.co.uk> Date: Mon, 26 Oct 92 20:32:10 GMT Lines: 112 In article <720052151snx@grendel.demon.co.uk> jes@grendel.demon.co.uk (Jim Segrave) writes: >In article <1992Oct25.112332.25964@fcom.cc.utah.edu> terry@cs.weber.edu writes: > >> In article <BwLopC.82n@flatlin.ka.sub.org>, bad@flatlin.ka.sub.org (Christoph Badura) writes: >> |> In <1992Oct19.053131.11296@tfs.com> julian@tfs.com (Julian Elischer) writes: >> |> >Terry feels that tehhe translation in IDE drives is done by the BIOS >> |> >support routines, though I was dubious about this (but hey >> |> >I don't have an IDE drive so what do I know) >> |> >> |> Terry feels wrong. IDE translation is done "on the drive", because you >> |> can hook up translated IDE drives to machines that know zilch about >> |> IDE, because IDE didn't exist when their BIOS was programmed. >> >> Terry feels this from disassembling the BIOS *on board* an IDE controller; >> 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? > >Odd that. I've been doing PC-AT BIOS work for the last year or two and >worked with Quantam, Coneer, Fujitsu, NEC, Maxtor, and Teac IDE drives. >In every single case, the BIOS at power up sets the drive configuration >from the drive type using either a table in EPROM or values stored in >the CMOS RAM of the RTC chip (for the user defined types). The PC BIOS >sets int 0x41/0x46 to be a segment:offset pointer to a 16 byte table >describing the drive. For predefined types, these are set to preset >entries within the BIOS prom. For user defined drives, the BIOS must >locate some free memory (often by reducing the base memory size by 1K), >create a drive table in this memory, and set the pointer to this newly >created table. After the drive configuration is set, all accesses to >the drive are translated in the drive using the configuration details >supplied. This is the AMI/HP Vectra/AT&T 386SX-wgs behaviour. While it may be typical of a newer BIOS, it certainly isn't typical of, for instance, a 1988 Everex Step/16. I think you are confusing behaviour of an old machine with a "smart" IDE card and a newer machine with a "smart" BIOS but "dumb" IDE card. With a "smart" IDE card, you set the BIOS to the closest value you can get which will allow you to access the largest number of sectors less than the disk size. As part of power on cycle, the card is made aware of the translation it should do (if any) when the CMOS settings don't match the drive parameters. This is basically a soft sector-number to sector-number translation based on sector*track*cylinder*head (so that sector n from the start of the disk is sector n from the start of the disk). Controllers like this ran about $80 and were the only way to get IDE drives to work in some machines (given their hardware translation occurring at the same time) until Maxtor came out with a four translation jumperable drive; still, it's possible that your CMOS table can't match one of the provided geometries and you won't be able to use the disk with the older hardware without a "smart" controller. >I can believe that there may have been early IDE drives which did not do >mapping in the controller, but these would be quite rare these days. >Every IDE drive I have encountered uses controller mapping - most of >them do not use an constant number of sectors/track, making BIOS level >mapping very difficult. Except for timing problems with some drives - >Quantams in particular - IDE drives can be fitted to ATs with a BIOS >written for ISA MFM controllers without any problems. Well, not that anyone is really running 386BSD on AT's (which are 286's), I think the rarity you predict has been proven out by the number of people who are only unable to install 386BSD and DOS on the same drive, but for which installing 386BSD to take the whole drive seems to work. >> 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. Terry wonders *why* the software >> is sensitive to the "transparent" translation of cylinder boundries if >> Christoph is right? >At a guess - I'm not running 386BSD - the disc label contains different >parameters than the geometry set by the BIOS and once the OS starts up, >it remaps the drive to a new and incompatible configuration. The problem is that the OS runs in protected mode with drivers that can't use the BIOS, and part of the startup to get the disk control information has to ask the controller not the BIOS. Old cards cause it to die because soft translation requires that the BIOS entry points be used. New cards cause it to die because either the hard translation doesn't match one of the avilable geometries, or more frequently, as Frank MacLauglin proved, the initialization sequence followed by 386BSD (whose driver can't distinguish between IDE and MFM or RLL wd controllers) causes the drive to be used under it's reported "native" geometry. People with several models of Maxtor drives and one model of Quantum drive that I know about wonder what the fuss is, because their drives report their translated geometries -- so the reset doesn't effect them -- they have no problems, just like the RLL and MFM users. Thus they can run with both DOS and 386BSD on the drive without ever seeing the problems from the "wrong" geometry being used by 386BSD. When I figure out something from the Byte article that will let me get rid of the "translation shut off" or hack the wd driver to not query the original geometry as part of init (thus breaking all installations using > 1023 cylinders on non-IDE drives), I'll post the "fixes" and upload a dist.fs to agate (using the new kernel will hose you if you already have a working IDE drive unless it is one of the Maxtors or the Quantum, so this will be a "new installation only" fix). Terry Lambert terry@icarus.weber.edu terry_lambert@novell.com --- Any opinions in this posting are my own and not those of my present or previous employers. -- ------------------------------------------------------------------------------- "I have an 8 user poetic license" - me Get the 386bsd FAQ from agate.berkeley.edu:/pub/386BSD/386bsd-0.1/unofficial -------------------------------------------------------------------------------