================================================================
Excerpted from...
BLUE NOTES -- Magazine of the San Francisco PC Users Group
Editor: Rick Moen, rick@hugin.imat.com (415-543-6475)
Production/design: Sylvia Rippel, syr@hooked.net (415-994-0745)
================================================================


Article from the March 1996 issue

All about EIDE

by Rick Moen

Lurking inside any PC of the past few years, you'll probably find an IDE hard drive. The reasons are clear: They're cheap and plentiful. Host adapter circuitry for them is now routinely included on motherboards, or on an add-in card for as little as $20. Their performance is adequate at least for single-user environments without good multi-tasking support (e.g., for Windows or Win95). Although alternative SCSI hard drives cost about the same(1), they require addition of a SCSI host adapter, of which a good model costs $225 or so (the "kit" version with driver software and cabling, not the "bare card" one that costs less and is usually cited).(2) Since IDE is perceived as "free", it's the default choice for most shops and users.

Recently, a series of improvements to the IDE standard have aimed to bring it up to date: support for tape and CD-ROM drives, faster performance, auto-configuration (sort of), support for up to four drives, and access to the full capacity of large (504Mb+) drives. However, the proliferation and partial-only implementation of standards has led to confusion and frustration, for many. This article aims to help by charting a path through the tangled Enhanced IDE thicket.

The Cast of Characters: ATA and Friends

Part of the confusion stems from terminology. "IDE" for example, is just a marketing term, encompassing a package of underlying technical standards. So are its two competing replacements, "EIDE" (advanced by Western Digital) and "Fast ATA" (promoted by Seagate, with support from Quantum). It makes more sense to discuss the underlying standards, so we'll now do so:

"IDE" (Integrated Drive Electronics) originated with the AT Attachment (ATA) hard drive standard, in the closing days of the IBM AT-clone computer. These drives really were no more sophisticated than the MFM/RLL/ESDI drives they replaced, except that all but the simplest electronics were moved from the host adapter (previously called a "controller") to the hard drive itself. Thus the term "Integrated Drive Electronics", since most required electronics was built into the drive.

Like their MFM/RLL predecessors, they relied heavily on hard drive support code built into all PC ROM chips since the IBM XT, that made possible communication with up to two hard drives of up to 1024 cylinders each. (A cylinder is the set of ring-shaped "tracks" readable from both sides of each platter in the drive, without moving the heads to other concentric tracks.) The ATA drives themselves had a design limit of 16 heads (i.e., 8 platters), and of 63 512-byte sectors on each track. Those two sets of limits in combination meant that no more than 528 million bytes (504 "megs") could be addressed by the computer (16 x 1024 x 512 x 63).

Western Digital's "EIDE" package and Seagate/Quantum's "Fast ATA" one both make improvements to this picture in two areas:

"EIDE" adds to those two elements an enhanced BIOS (no more 1024 cylinder limit, and more flexible addressing of hard drives), a secondary port permitting up to four devices (two per port), and support for tape and CD-ROM drives via a standard called "ATAPI" (ATA Packet Interface). More about all this later.

"Fast-ATA" omits those EIDE-specific enhancements, but adds processing of multiple read/write requests without CPU involvement in each access.

The above is technically (and in a nutshell) what all those terms mean. However, the sad news is that manufacturers and vendors implement the EIDE and Fast-ATA "standards" so inconsistently and incompletely that those names cannot in themselves be relied upon. Instead, it's necessary to look for implementation (or not) of their components, individually. Basically, when you see puffery about "EIDE" and the like, you can get meaningful information only by ignoring it and asking "So, what does this piece really do?"

The Gory (Gorier?) Details

ATAPI: The least mixed blessing in the lot is this new standard for tape and CD-ROM drives, because they'll work with even the oldest ATA ("IDE") host adapters (except for "intelligent" caching adapters, which will probably become confused and malfunction). This means that people who are using slow, cranky tape drives connected to floppy or parallel-printer ports (and are unwilling to pay to do it right, with SCSI) will now have a better low-cost alternative.

ATAPI devices do not occupy one of the BIOS setup-table entries, but will require drivers for each operating system. ATAPI-aware BIOSes are also just now coming out that will make it possible to boot from CDs.

ATA-2 hard drives: This is the most-touted specification, the one providing for faster IDE communication. PIO modes 3 and 4 (11 and 16Mb/sec) and DMA modes 1 and 2 (13 and 16Mb/sec) are theoretically much faster than ATA. This refers to communication between the drive and the adapter. Unfortunately, that's never where the bottleneck is, since it outstrips physical read/write disk access on even the fastest IDE hard drive — the actual limiting factor. Therefore, these faster modes are of essentially no benefit in the real world. (In fact, even the original ATA interface, with a transfer rate of 8.3Mb/sec, is faster than the best current IDE drives.)

Real improvement to IDE speeds would thus be possible if physical access were improved. For example, SCSI drives do "elevator seeking", meaning that they sort pending access requests into the order involving the least head movement. By contrast, IDE drives service access requests in strict order of receipt, so they tend to spend much more time seeking tracks, a relatively very slow activity.

The DMA communication modes are supposed to lend IDE some of the benefits of SCSI, allowing direct memory access (thus the acronym) for information flow between RAM and the drives, as opposed to Programmed I/O (PIO), which uses the CPU for all data transfers. DMA is mostly of benefit in non-DOS/Windows multitasking operating systems, where the CPU can be doing useful work during disk transfers.

So, DMA occurs between the host adapter and system memory. Unfortunately, some manufacturers use the term to refer to adapter-to-drive communication — which amounts to PIO operation. So, claims about IDE "DMA" modes should be evaluated with caution.

Last, the drives are supposed to support a new "Identity Drive" function that will automatically inform compatible host adapters about how big the drive is (# of heads, cylinders, and sectors/track), when you tell the adapter to query the drive and "fill in" the drive table entry. Not all purportedly ATA-2 drives implement this function, though.

ATA-2 host adapters: As mentioned, the new class of adapters theoretically benefits from the faster modes. Like ATA-2 drives, they are backwards compatible to older equipment. One exception: Putting a new, fast second drive on the same IDE cable as your old one may not work if the new drives spin faster, because many adapters still don't do independent timing for the master and slave units. The only cure in that case is something wretched like slowing down the new drive's spindle rotation by running a wire between the drives' "spindle sync" jumpers. Most users never figure this out (and, of course, shouldn't have to), but just return "incompatible" units.

As mentioned above, some controllers do DMA transfers — or promise to. There's a further elaboration in some of the fancier host adapters: bus-mastering DMA. Ordinary DMA uses the motherboard DMA controller chip, which on most motherboards is a rather creaky, slow device(3) (but better than PIO). Bus-mastering host adapters include their own DMA chips, able to function independently. The performance advantage can be substantial — given good software drivers.

Some (not all) ATA-2 adapters have a "secondary port" that can support another pair of drives on a second ribbon cable. How is this possible? By essentially putting two adapters on the same card. This capability comes at a price: The adapter ties up two already-scarce hardware interrupts(4) (plus two I/O base addresses, but that's not a problem).

Consider the plight of the well-equipped IDE proponent: He starts out with a fax-modem, a mouse, a parallel printer, and a sound card (each using an interrupt). However, any budding technophile needs a scanner, right? So, that's one interrupt for the scanner support card, and two for the "EIDE" card. Now, he's run out of free interrupts, and must pursue bogus solutions such as "sharing" them — while reassuring onlookers that it's "good enough" and "perfectly adequate for normal users". Alternatively, one SCSI host card could support any number of hard, tape, and CD-ROM drives, plus a scanner, with less fiddling — using one interrupt instead of three, but this doesn't occur to Mr. Proponent. Ah well. "Drink deeply of the Pierian spring; a little knowledge is a dangerous thing." Always beware of what the semi-informed call "good enough".

Enhanced BIOS: Many a recent buyer of gigabyte-plus IDE hard drives has found, to his distress, that the new acquisition formats to only 504Mb. As I've outlined, this results from the unfortunate combination of the PC BIOS's 1024-cylinder limit and IDE drives' 16-head limit — negative synergy, as it were. When you storm back to your local clone vendor, he'll tell you there are three solutions: Replace the PC BIOS, use a new controller with an on-card BIOS that overrides the motherboard BIOS where hard disks are concerned, or install translating "driver" software, typically OnTrack's Disk Manager package.(5)

[Dec. 2003 note: A variant of Disk Manager is available from Seagate as SeaTools Disc Diagnostic. Very likely, that version is crippled to work on Seagate drives, only.

In most situations, Disk Manager (or equivalent) must be installed into a critical part of your boot hard drive, the Master Boot Record (MBR). This means modifying your operating system's boot-up files. It also means that, if you want to try running anything but DOS/Windows, you're out of luck.(6) If a virus or utility — or just an operating system reinstallation — rewrites your MBR (which isn't that uncommon), you'll find that your hard drive is suddenly unreadable until you reinstall the disk driver software. Floppy boot disks must, of course, be specially modified to include support for the driver software, or they, too, will fail to read your hard drive.

Some disk utilities that write directly to the hardware may also not be DM-"aware", and will thus quite possibly corrupt your hard drive. OnTrack disclaims responsibility for any such incidents. User beware.

All in all, a less than satisfactory solution — bringing us back to the alternative: Enhanced BIOS ROMs.

The good news is that it really doesn't matter whether one's Enhanced BIOS is on the motherboard or is an add-on ROM on an ATA-2 host adapter. It's really the same thing, effectively. The bad news — and you may have guessed this, by now — is that there are three different "standards" for such ROMs:

How do you know whether your BIOS is enhanced? Well, if it's dated before 1994, it definitely isn't. If you look in your drive "type" table (in the ROM-based setup screens, accessible when you start up your computer), look to see if you have options for hard drive support such as "LBA", "ECHS", or "Large". That is the information held in an EBIOS's Enhanced Disk Parameter Table (EDPT), taking up an extra 16k of upper memory, and is the hallmark of an EBIOS.

Any of these three solutions works around the infamous 504Mb barrier by using a different "drive geometry" (tradeoffs among cylinders, head, and sector counts in internal translation tables, to stay within design limits on each one), avoiding the unfortunate mismatch that happened earlier. The new limit, by the way, is 8Gb. Plenty of room (but, then, they said that about 640k of RAM, too).

Depending on your operating system, you might not have to use either a Disk Manger-type package or an Enhanced BIOS: OS/2 and Linux both take care of such matters right in the operating system, transparently. NT, on the other hand, has no such capabilities, and is stuck with brain-dead DOS-style BIOS-level translation.

Operating System-Specific Drivers

Getting the theoretical benefits of ATA-2 host adapters and ATAPI tape or CD-ROM devices — especially the performance benefits — absolutely requires good drivers, which must exist for each operating system you want to try. Purportedly fast operating modes may be compromised in flaky driver software. I mention this because buggy drivers are reported to be all too common.

For those running Windows, you should be aware that drivers are needed not just for DOS, but also for Windows itself (and should be furnished with the ATA-2 host adapter or ATAPI device). This should include driver's for Microsoft's FastDisk interface — so-called "32-bit disk access". The benefits of this technique are often drastically overstated by IDE proponents: FastDisk replaces the BIOS disk routines, and has the primary benefit of allowing DOS sessions under Windows to operate in virtual memory. This leads to a very minor improvement in memory management, and a small reduction in the number of CPU switches in and out of protected mode — not a significant difference.

Absent a replacement FastDisk driver specifically written to be ATAPI-aware, any ATAPI devices on the primary ATA-2 channel will crash FastDisk (and thus Windows). The remedy is to either move the ATAPI drive to the second channel, or disable FastDisk.

Corruption Risks

I've already mentioned what are said to be common problems with flaky drivers. There are a few further hazards:

Why, Oh Why?

I didn't use to know any of this stuff. Frankly, I shouldn't have to, and neither should you.

On one black Friday, back in 1992, my pride-and-joy 660Mb ESDI drive died, and I turned my back permanently on MFM/RLL/ESDI and all those sorts of related drive standards, such as IDE: I switched to SCSI, in order to avoid any number of hassles, and get better performance (especially with the more "real" operating systems I had become interested in, such as OS/2, NetWare, and UNIX). All I knew about IDE was that you still had to set "drive tables" for them, and that you could run one drive, or two if spindle sync permits, by appropriately setting master/slave jumpers on the drives — if you can find the drive documentation.

Then, my Mom and I were shopping down at Fry's, and saw a very cheap 1Gb IDE on sale (a Western Digital, I think). What the heck; we bought it. A day later, I faintly recalled the 504Mb barrier — and that nasty, dyspeptic feeling when you realise you've made a strategic error started to set in: We took it back, and went all-SCSI on her new system, instead.

However, I needed to know, because my clients need me to. So, I began researching the overview and pitfall-chart that constitutes the backbone of this article. So, now you'll know, too.

IDE vs. SCSI — The Face-Off

Here's the difference in a nutshell:

Do I have fairly firm opinions on this matter? Why, certainly. I think that's fair to say. Some are going to disagree on sundry points, perhaps loudly: I would expect no less. However, the next time you hear them say that SCSI provides no real benefit to the average user, and that it costs $400 more, you'll know why I regard that as absolutely errant nonsense.

Further Reading:

Quite a number of resources are available to those with access to the Internet. (If you're not, why not? It's a benefit of club membership, after all.) Here are a few of the relevant ftp sites, which you can visit with any ftp or Web software:


----------
(1) Around the 1Gb range, the best sale prices for reasonable ATA-2 drives run $0.22 per meg, while SCSI is around $0.23 per meg. There's a price differential, but not a significant one. The real difference is in the cost of host adapters — but, then, SCSI adapters also do more, and are more flexible.

[Dec. 2003 comment: That was true at the time. It's not, any more: The price gap has re-widened dramatically, partly on account of ATA manufacturing economies of scale, partly through SCSI hardware being artificially classified as specialty items, for purposes of retail pricing.

(2) This is for the fully-equipped version of the standard high-quality bus-mastering ISA adapter, the Adaptec 1542CP. The recently discontinued 1542CF — every bit as good — is out there for $150 or so. Notably, however, Adaptec's excellent and very fast PCI model, the 2940, now runs around $170 ($220 as a "kit"). The market has spoken: The ISA bus is finally dead.

Buslogic is worth considering as an alternative to Adaptec, and I've heard good things about some of the new PCI (or integral-to-motherboard) SCSI adapters based on very inexpensive NCR chipsets, but have no experience with them.

[Dec. 2003 comment: Buslogic was later bought by Mylex, and its product line moved to that brand.

(3) This is true on ISA motherboards. Bus-mastering DMA doesn't really work on VLB. I've seen claims to the contrary for some new VLB-based ATA-2 host adapters, but I have my doubts.

(4) Many PCI motherboards don't allow a single board to be allocated two interrupts, leading to creation of one of the craziest work-arounds I've ever heard of: tiny "paddle-board" extension hardware that plunks into a neighbouring motherboard expansion slot, just to qualify for a second interrupt!

(5) One alternative package (rarely-seen) is MicroHouse EZ Drive.

[Dec. 2003 comment: MicroHouse International seems to have gone out of business. The rights to EZ-Drive were sold to StorageSoft, Inc., which appears to have been bought by Phoenix Technologies.]

(6) Version 7, just out, is supposed to fix this, to a degree — supporting OS/2, NT, and Win95. There are also "fixes" to make OS/2 and NT work with DM 6.x.

(7) Strangely, IDE proponents tend to also be Windows/Win95 fans, and excuse this design flaw in IDE on grounds that users only need a single execution thread most of the time, while out of the other side of their mouths they praise Windows/Win95's purported multi-tasking strengths. I wonder if they can see the contradiction, here?

(8)In my view, there are two causes of the sorts of problems that one finds throughout ATA-2/ATAPI technology: the newness of the (would-be) standards, and pervasive cost compromises. Thus the shortage of solid drivers, and the often-incomplete implementation of EIDE/Fast-ATA standards.

(9) Provided I already have separate terminators at each end of the SCSI chain, which is my preference. This renders SCSI termination a non-issue.

(10) Probably about $150-$200, these days. Very handy.


- end -




"EIDE" Revisited

by Rick Moen
(May 1998 update)

"Plus Ça Change, Plus C'est La Même Chose." Things have moved forward in the ATA (IDE) world since I wrote the original article — and yet they haven't.

What's new? The new buzzword is Ultra-ATA, also known as ATA-33 or U-ATA,, which is yet another marketing term (as were "EIDE" and "Fast-ATA" before it). Ultra-ATA implements yet another drive-addressing mode, called DMA/33, which is (in theory) twice as fast as its predecessor, DMA mode 2, maxing out at a 33 MB per second transfer rate between supporting ATA host adapters and hard drives.

Ultra-33 is a slight elaboration of another marketing package called ATA-3, which promises bug-fixes to the corruption-prone PIO mode 4 drive-addressing scheme, better power manaagement and detection of impending drive failure, and a really bad password-protection mechanism. Add the DMA/33 mode to all that, and you get Ultra-33 (ATA-33, U-ATA)). It's most often found (and cited as a key selling point) in Intel's bargain-basement TX motherboard chipset.

(more to come — this part is being written right now!)

Copyright (C) 1996-1999 by Rick Moen. All rights reserved. Permission for reproduction in whole or in part is granted to computer user groups for non-profit use.