Source code pulled from OpenBSD for OpenNTPD. The place to contribute to this code is via the OpenBSD CVS tree.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

921 lines
36 KiB

ATA/ATA-1/ATA-2/IDE/EIDE/etc FAQ
Part 1 of ? -- The Basics
Version 0b -- 7 Feb 95
by Hale Landis -- landis@sugs.tware.com
Note: Major changes from the previous version are marked by a
"!" at the left margin on the first line of the changed
paragraph.
First the "legal" stuff...
1) This FAQ is not intended to replace any other FAQ on this
subject but is an attempt to provide historical and technical
information about the ATA interface.
2) This FAQ is not an endorsement of any vendor's product(s).
3) This FAQ is not a recommendation to purchase any vendor's
product(s).
4) Every effort is made to insure that all of the information
presented here is not copyrighted, not proprietary and
unrestricted.
4) When opinions are stated they are clearly identified,
including the person's name and email address. Such opinions
are offered as long as they contribute to the understanding of
the subject being discussed. No "flames" allowed.
This is the first version of this FAQ. It will take some time to
get all the significant information into it so it will be rapidly
growing and changing during the next several weeks or months. I
don't even know how many parts there will be yet! Versions will
be numbered with simple integer numbers (no 1.1, 1.2, etc)
starting at 0.
If you have a question that is not answered here or if you have
unrestricted material that you would like to contribute, please
email it to landis@sugs.tware.com. DO NOT send material that is
copyrighted, proprietary or otherwise restricted in any way -- I
can't use such material in this document.
I don't have FTP access to anything at this time so I leave it to
others to put this at the appropriate FAQ FTP sites.
About myself: Until recently I worked for Seagate where I was
one of several people that attended the ATA, ATA-2, PCMCIA and
SFF meetings for Seagate. I was also the manager of a software
development group that created much of the engineering test
software for ATA hard disk drives. I am now a consultant and I
still attend the ATA-2 meetings.
Table of Contents
-----------------
Part 1 - The Basics
Glossary
Basic Questions
Part 2 - BIOS and Drivers
TBD
Glossary
--------
Read and understand these terms. You will be lost and confused
if you don't! Many of these are describe in much greater detail
in other parts of this FAQ.
ATA or AT Attachment
ATA is the proper and correct name for what most people call
IDE. In this document, ATA refers to all forms of ATA (ATA-1,
ATA-2, etc, IDE, EIDE, etc). The ATA interface uses a single
40-conductor cable in most desktop systems.
ATA-1
ATA-1 is the common name of the original ATA (IDE)
specification. ATA-1 is not an official standard yet. Final
approval is pending.
ATA-2 or ATA Extensions
ATA-2 is the common name of the new ATA specification. ATA-2
is still in early draft form and has not been submitted for
approval as an official standard.
ATA-3
! ATA-3 is the common name of a future version of the ATA
specification. The ATA-3 working group has held several
meeting but the only things adopted so far are a DMA
version of the Identify command, a description of
"device 1 only configurations" and a set of "security"
commands.
! There is much discussion going on concerning merging ATA-3
with ATAPI. This will require some kind of "command overlap"
capability. The details of this are consuming much of the
meeting time.
ATAPI or ATA Packet Interface
ATAPI is a proposed new interface specification. Initially it
will probably be used for CD-ROM and tape devices. It uses
the ATA hardware interface at the physical level but uses a
subset of the SCSI command set at the logical level. The
ATAPI specification work is currently being done in the SFF
committee.
! The ATAPI folks have delayed forwarding their CD-ROM
specification from SFF to X3T10 so the X3T10 ATAPI working
group has nothing to work on yet and have held no meetings.
! Block Mode
! Block mode is the name given to the use of the ATA Read
Multiple and Write Multiple commands. These commands generate
a single interrupt to the host system for each block of
sectors transferred. The traditional Read Sectors and Write
Sectors commands generate an interrupt to the host for each
sector transferred.
CAM (Common Access Method) Committee
The Common Access Method committee, now disbanded, worked on
two specifications: the CAM SCSI and CAM ATA specifications.
Both specifications were forwarded to the X3T9 committee for
further work years ago.
CHS or Cylinder/Head/Sector
CHS is the old and traditional way to address data sectors on
a hard disk. This style of addressing relates a sector's
address to the position of the read/write heads. In today's
ATA devices, all sector addresses used by the host are logical
and have nothing to do with the actual physical position of
the sector on the media or the actual position of the
read/write heads.
Command Block
Control Block
These are names given to the I/O register interface used by
ATA devices. It refers to a set of I/O registers, or I/O
ports and I/O port addresses used to program the device.
These names replace the older term Task File.
DMA or Direct Memory Access
DMA is a method of data transfer between two devices that does
not use the system's main processor as part of the data path.
DMA requires lots of hardware: a DMA arbitration unit, a DMA
data transfer unit and host bus signals that enable the DMA
controller to assume control of the host system's bus. When
the DMA controller has control of the host system's bus, it
moves data between the two devices by generating the
appropriate bus read/write cycles. For the ATA READ DMA
command this means generating an I/O read cycle and then a
memory write cycle for each 16-bit word being transferred.
For the ATA WRITE DMA command, a memory read cycle is followed
by an I/O write cycle for each 16-bit word transferred.
EIDE or Enhanced IDE
EIDE is a marketing program started by Western Digital to
promote certain ATA-2 features including ATAPI. WD has
encouraged other product vendors to mark their products as
"EIDE compatible" or "EIDE capable".
ESDI
See MFM.
Fast ATA
Fast ATA is a Seagate marketing program used to promote
certain ATA-2 features in newer ATA devices. Seagate has
encouraged other product vendors to mark their products as
"Fast ATA compatible" or "Fast ATA capable".
Host or Host System
The computer system that the ATA device is attached to.
HBA or Host Bus Adapter or Host Adapter
The hardware that converts host bus signals to/from ATA
interface signals. An ATA-1 host adapter is generally a very
simple piece of hardware. An ATA-2 host adapter can be simple
or complex.
IDE
IDE can mean any number of things: Imbedded Device (or Drive)
Electronics (yes, you can spell embedded with an "i"),
Intelligent Device (or Drive) Electronics, etc. The term IDE
is the trademark of someone (Western Digital does not claim
IDE as theirs but they do claim EIDE). Many hard disk vendors
do not use IDE to describe their products to avoid any
trademark conflicts.
LBA or Logical Block Addressing
LBA is a newer (for ATA it is newer) way to address data
sectors on a hard disc. This style of addressing uses a
28-bit binary number to address a sector. LBA numbers start
at zero. In today's ATA devices, all sector addresses used by
the host are logical and have nothing to do with the actual
physical location of the sector on the media.
Local Bus
Usually this refers to the processor's local bus in a high
performance computer system. Usually the processor, the
external processor instruction/data cache, the main memory
controller and the bridge controller for the next low speed
system bus, for example, a PCI bus, are located on the local
bus. Lower speed local buses may have connectors that allow
the attachment of other devices. For example, the VL-Bus is a
local bus that can allow attachment of video, SCSI or ATA
controllers. It is very difficult to attach other devices to
high speed (say faster than 100MHz) local buses due to
electrical restrictions that come into play at those higher
speeds.
Master
ATA device 0. Device 0, the master, is the "master" of
nothing. See Slave.
Megabyte or MB
Megabyte or MB is 1,000,000 bytes or 10^6 bytes. IT IS NOT
1,048,576 bytes or 2^20 bytes, repeat NOT!
MFM
In this document MFM refers to any of the older hard disk
controller interfaces, MFM, RLL and ESDI. It is used to
describe any hard disk controller that uses the Task File
interface on the host side and the ST506/ST412 interface
on the drive side.
OS
Operating System.
PC Card ATA
PCMCIA
We can thank the Personal Computer Memory Card International
Association for the PC Card specification. The PCMCIA is a
nonprofit industry association. The PC Card ATA
specification is another form of the ATA interface used by
PCMCIA compatible ATA devices. This interface uses the PCMCIA
68-pin connector. Most 68-pin ATA devices are dual mode --
they can operate as either a PCMCIA PC Card ATA device or as a
68-pin ATA device.
PCI
We can thank Intel and the other members of the PCI committee
for the PCI bus specification. PCI is intended to be the next
high performance computer bus. PCI is not generally described
as a processor local bus.
PIO or Programmed Input/Output
PIO is a method of data transfer between two devices that uses
the system's main processor as part of the data path. On
x86 systems, the REP INS and REP OUT instructions
implement this data transfer method. INS reads and I/O port
and writes the data into memory. OUTS reads data from memory
and writes the data to an I/O port. Each time an INS or OUTS
instruction is executed, the memory address is updated. The
REP prefix causes the instructions to be repeated until a
counter reaches zero.
RLL
See MFM.
Slave
ATA device 1. Device 1, the slave, is a "slave" to nothing.
See Master.
Task File
This is the name given to the I/O register interface used by
MFM controllers. It refers to a set of I/O registers, or I/O
ports and I/O port addresses used to program the controller.
In ATA, this name has been replaced by the terms Command Block
and Control Block.
SCSI
See the SCSI FAQ.
SFF or Small Form Factor
The SFF committee is an ad hoc committee formed by most of the
major storage device and system vendors to set standards for
the physical layout of hard disk and other devices. SFF has
published many specifications that describe the physical
mounting and connector specifications for hard disk devices,
including ATA devices. During a brief period of time when the
X3T9 committee was not doing much work on the ATA-1 interface,
the SFF committee published several specifications that were
not really part of the original SFF charter. Most, if not
all, of these nonphysical specifications have now been
incorporated into the latest X3T9 or X3T10 ATA specifications.
ATAPI is currently an SFF specification.
ST506 and ST412
This is the common name for the hard disk controller to hard
disk drive interface used by MFM, RLL and ESDI controllers and
disk drives. ST stands for Seagate Technology. The ST506 and
ST412 were the Seagate products that set the de facto
standards for this interface many years ago. This interface
is composed of two cables: a 34-conductor and a 20-conductor
cable.
VESA and VL-Bus
We can thank the Video Electronics Standards Association for
the VESA Local Bus or VL-Bus specification. The VL-Bus is one
example of a local bus. VESA is a nonprofit industry
association like the PCMCIA.
WG or Working Group
The actual work on various specifications and standards
documents within the X3T9, X3T10 and SFF committees happens in
working group meetings. Most WG meetings are held monthly.
X3T9 and X3T10
These are the names of the official standards committees that
have worked on the ATA-1 and ATA-2 specifications. X3T9 was
responsible for the SCSI and ATA-1 specifications and
standards. X3T10 has replaced X3T9 and is now responsible for
the current SCSI and ATA specifications and standards work.
528MB
This term is used in this document to describe the capacity
boundary that exists in most x86 system software. This
boundary limits the size of an ATA disk drive to 528MB. For
cylinder/head/sector style addressing of disk data sectors,
this number is computed as follows:
a) the number of cylinders are limited to 1024, numbered
0-1023.
b) the number of heads (per cylinder) are limited to 16,
numbered 0-15,
c) the number of sectors (per track) are limited to 63,
numbered 1-63.
d) a sector is 512 bytes,
e) 528MB means the following values:
( 1024 * 16 * 63 ) or 1,032,192 data sectors
or
( 1024 * 16 * 63 * 512 ) or 528,482,304 bytes.
68-pin ATA
This refers to a variation of the ATA interface that uses the
PCMCIA 68-pin physical interface but does not use the PCMCIA
electrical or logical interface. Most 68-pin ATA devices are
dual mode -- they can operate as either a PCMCIA PC Card ATA
device or as a 68-pin ATA device. This interface was
developed within the SFF committee and is now included in
ATA-2.
Basic Questions
---------------
### Where did ATA come from?
What we now call the ATA-1 interface was developed for Compaq
many years ago by Imprimus (then part of CDC, now part of
Seagate) and Western Digital. The first ATA-1 hard disk
drives were made by Imprimus but it was Conner that made the
interface so popular.
### How is ATA different from MFM?
From the host software standpoint, ATA is very much like the
Task File interface used by MFM controllers. A properly
written host software driver should not notice any difference
between the MFM Task File interface and the ATA Command Block
interface while doing basic commands such as Read/Write
Sectors.
At the hardware level, ATA uses a single cable between a host
bus adapter and the ATA device, where the MFM controller
interface uses two cables between the controller and the
drive.
In the MFM environment, the controller is one piece of
hardware and the drive another piece of hardware. Most likely
these two pieces of hardware are from different vendors. The
MFM controller is dependent on the design of both the host bus
and on the drive.
In the ATA environment, the host adapter is the one piece of
hardware that is dependent on the host system bus design. The
ATA interface is (mostly) system independent. All of the
hard disk controller and drive logic is contained in the ATA
device hardware. This gives the hard disk designer complete
control over both the controller and drive functions.
### Why is ATA so popular?
Two basic things make ATA so popular today: cost and hard
disk drive technology. An ATA-1 host adapter is cheap,
usually much less than $25US and it uses only one cable. On
the technology side, current hard disk features, such as,
defect handling, error recovery, zone recording, cache
management and power management require that the controller be
fully integrated with the read/write channel, the servo system
and spindle hardware of the disk drive.
### What are the basics of the ATA interface?
The ATA interface is a very simple interface based on an ISA
bus I/O device architecture. The interface consists of two
sets of I/O registers, mostly 8-bit, for passing command and
status information. The registers are like a set of mail
boxes with a door on front and back connected such that both
doors can not be open at the same time. The front door is
open when the Busy bit in the Status register is zero and the
host can read and write the registers. The back door is open
when the Busy bit in the Status register is one and the ATA
device can read or write the registers.
The physical interface contains just enough signals for a 16
bit data bus, five register address bits, and a few control
signals like read register, write register and reset.
ATA devices look like traditional hard disk
drives even though some are not really a hard disc with
rotating platters. User data is recorded in 512 byte sectors.
Each sector has a sector address. There are two ways to
express sector addresses: by cylinder/head/sector (CHS) or by
logical block address (LBA). CHS is standard, LBA is optional.
### What is EIDE or Fast ATA?
Both are marketing programs used to promote various ATA-2
features, mostly the faster data transfer rates defined by
ATA-2.
---
WD defines EIDE as:
* Support for drives larger than 528MB.
* Support for two connectors to allow up to four drives.
* Support for CD-ROM and tape peripherals.
* Support for 11.1/16.6 Mbytes/second, I/O Channel Ready PIO
data transfers.
* Support for 13.3/16.6 Mbytes/second, DMA data transfers.
---
???Seagate defines Fast ATA as:
* Support for PIO mode 3 (11.1 MB/sec) and DMA mode 1(13.3
MB/sec).
* Support for Multi-sector [Read/Write Multiple] transfers.
* Support for >528 MB.
* Support for Identify Drive Extensions & Set Transfer Mode
Extensions.
* Backward compatibility with ATA-1.
---
What does all of this mean to us?
Support for the ATA-2 high speed PIO and DMA data transfer
modes is both a hardware and software issue.
Support for more than one hard disc controller (or ATA host
adapter) requires the BIOS and/or the operating system to
support more than one Task File or Command/Control Block
register set on the host bus.
The 528MB problem is due to the original design of the x86
BIOS which limits cylinders to 1024 and sectors to 63. The
ATA interface allows up to 65,535 cylinders, 16 heads and 255
sectors -- that's about 136GB (137GB if is LBA is used).
Support for devices over 528MB requires the BIOS and/or
operating system to support some form of CHS translation.
Note that LBA alone does not solve this problem (in fact,
LBA may make things more complex).
Support for CD-ROM and tape will probably be done via the
ATAPI interface which uses a different command structure than
ATA. That makes ATAPI another host software issue.
### What does an ATA-1 host adapter do?
An ATA-1 host adapter is a simple piece of logic whose main
purpose is to reduce the system bus address lines from 12 (or
more) down to 5. It may also buffer some signals giving some
degree of electrical isolation between the host bus (usually
an ISA or EISA bus) and the ATA bus. In ATA-1, the ATA
interface is controlled directly by the host bus so that all
timings are controlled by the host bus timing.
### What does an ATA-2 host adapter do?
This answer is complex because it depends on how smart your
ATA-2 host adapter is. First, an ATA-2 host adapter supports
the ATA-2 higher speed data transfer rates. That requires
that the host adapter is attached to something other than an
ISA or EISA bus. Second, an ATA-2 host adapter may perform
32-bit wide transfers on the host bus. This requires FIFO
logic and data buffers in the host adapter. Third, an ATA-2
host adapter may use a different data transfer protocol on the
host side than is used on the ATA device side.
! ### Can I put an ATA-2 device on an ATA-1 host adapter?
! ### Can I put an ATA-1 device on an ATA-2 host adapter?
The answer to both questions is yes, as long as the electrical
timing specifications of the device are not violated. In
general it is impossible for an ATA-1 host adapter to violate
the specifications of an ATA-2 device. It is possible for an
ATA-2 host adapter to violate the timing specifications of an
ATA-1 device but this is not common. However, host adapter
hardware design errors or software driver bugs can cause such
a problem. The result will be corrupted data read or written
to the ATA-1 device.
! ### I have an ATA-2 host adapter with an ATA-2 device. I want to
! ### add an ATA-1 device to this host adapter. Can I run the ATA-2
! ### device in its ATA-2 data transfer modes?
Sorry, *NO* you can *NOT* run the new drive in its faster data
transfer modes. Be very careful, most of the ATA-2 host
adapter vendors don't have anything in their setup
documentation or software to prevent this sort of thing.
When you run the new drive at a data transfer speed that is
faster than the older drive can support, you are violating the
electrical interface setup and hold times on the older drive.
There is no telling what the older drive will do about this,
but you are asking for data corruption and other nasty
problems on your older drive.
### How many disk controllers and/or ATA host adapters and/or
### SCSI host adapters can I put in my system?
From a hardware standpoint -- as many as you want as long as
there are no I/O port address, memory address or interrupt
request signal conflicts. From a software standpoint it is a
whole different story.
First the simple x86 system hard disk controller
configurations...
a) 1 ATA with 1 or 2 drives at I/O port addresses
1Fxh/3Fxh using interrupt request 14 (IRQ14).
b) 1 ATA with 1 drive at I/O port addresses 1Fxh/3Fxh
using interrupt request 14 (IRQ14) plus a SCSI with 1 drive.
c) 1 SCSI with 1 or 2 drives.
Other configurations are possible but are most likely not
supported in the system or SCSI host adapter BIOS. And if its
not supported at the BIOS level, it is unlikely to be
supported by an operating system, especially DOS. The primary
reason the above configurations are so restrictive is that the
original IBM x86 BIOS supported only one MFM controller with a
maximum of 2 drives. This restriction was then coded into
much x86 software including many early version of DOS. The
configurations above work because they don't break this old
rule.
Just remember this -- most systems will always boot from
the first drive on the first controller. In a) that is
ATA drive 0, in b) that is ATA drive 0, in c) that is
SCSI drive 0.
And now the more complex configurations...
Once you go beyond the three configurations above all bets are
off. Most likely you will need operating system device
drivers in order to access any drives beyond the first two.
And now your real problems start especially if you like to run
more than one operating system!
If you do run more than one OS, then you need equivalent
drivers for each system if you would like to access all the
drives. Plus it would be nice if all the drivers configured
the drives in the same manner and supported all the possible
partitioning schemes and partition sizes. It would be
especially nice if a driver would not destroy the data in a
partition just because it did not understand the file system
format in that partition.
One of the things EIDE promotes is BIOS support for up to four
ATA devices -- 2 ATA host adapters each with 1 or 2 drives.
The first would be at I/O port addresses 1Fxh/3Fxh using
interrupt request 14 (IRQ14) and the second at I/O port
addresses 17xh/37xh using interrupt request 15 (IRQ15).
Acceptance of this configuration has not been spreading like
wild fire through the BIOS world.
Lets look at a two complex configurations...
a) 1 ATA with 2 drives and 1 SCSI with 1 or more drives.
Nice configuration. The ATA drives would be supported by the
system BIOS and the SCSI drives may be, could be, should be,
supported by the SCSI host adapter BIOS but probably not. So
in order to use the 2 SCSI drives you probably have to disable
the BIOS on the SCSI card and then load a device driver in
CONFIG.SYS. And because the SCSI BIOS is disabled, you then
need a SCSI driver for that other OS you run.
b) 2 ATA with 1 or 2 drives on each.
Also a nice configuration. But because the system BIOS
probably only supports the first controller address, you'll
need a DOS device driver loaded in CONFIG.SYS in order to
access the drives on the second controller. You'll need that
driver even if there is only one drive on the first
controller. You also need a similar driver to support the
second controller in your other OS.
Note: I understand that OS/2 does support both MFM/ATA
controller addresses and does allow up to four drives -- I
have not confirmed this for myself.
! ### Are disk drives the only ATA devices?
No. Over the years there have been ATA tape drives, ATA
CD-ROMS and other strange devices. Most of these are expected
to be added to an existing ATA host adapter as the second
device (device 1) with an existing ATA disk drive (device 0).
In general these require software drivers to operate with your
OS.
Now, we have ATAPI CD-ROM and tape devices that can be placed
on an ATA host adapter. And soon we should see system
motherboard BIOS support for booting from an ATAPI CD-ROM
device. The general idea is that an ATAPI device can coexist
with an ATA device on the same cable.
! ### What can be done to improve ATA device performance?
A difficult question. But the first step is usually to reduce
the number of interrupts that the host sees during a read or
write command. ATA disk drives have three types of read/write
commands:
* Read Sectors / Write Sectors -- These commands are the old
traditional data transfer commands. These commands generate
one interrupt to the host for each sector transferred. These
are PIO data in and PIO data out commands which use the host
processor to transfer the data.
* Read Multiple / Write Multiple -- These commands where
defined in ATA-1 but were not used very much until recently.
These commands generate one interrupt to the host for each
block of sectors transferred. The number of sector per block
is generally 4, 8 or 16. However, when 1 sector per block is
used, these commands are the same as the Read/Write Sectors
commands. These are PIO data in and PIO data out commands
which use the host processor to transfer the data.
* Read DMA / Write DMA -- These commands where defined in
ATA-1 but were not used very much until recently. The main
reason for not using them was that x86 system DMA transfer
rates are much slower than PIO. However, these command do
generate a single interrupt at the completion of the command.
Now see the next question...
! ### What else can be done to improve ATA device performance?
! ### -or-
! ### What is PIO mode "x" ?
An even more difficult question. The second step is usually
to increase the rate at which the host transfers data.
(Ahh... I can see the funny look on your face from here. You
are saying to yourself: "the rate at which the host transfers
data? doesn't this guy have things backwards?" Read on...)
The rate at which data is transferred to or from an ATA device
is determined by only one thing: the PIO or DMA cycle time
the host uses. No, the drive does not have much to do with
this! The only requirement is that the host not exceed the
minimum PIO or DMA cycle times that the device supports. For
example, during a PIO read command when the device signals an
interrupt to the host this means that the device is waiting
for the host to read the next sector or block of sectors from
the drive. The host must execute a REP INSW instruction to do
transfer the data. The rate at which the host executes this
instruction determines the PIO cycle time. Technically, for a
read command, the cycle time is the time from the host
assertion of the I/O Read signal to the next time the host
asserts the I/O Read signal.
Be careful when looking at the table below -- the data rate is
the data transfer rate achieved while transfering the sector
or block or sectors. It is an "instantaneous" data rate. The
overall data transfer rate for a command includes many time
consuming events such as the amount of time the host requires
to process an interrupt. Note that on many fast ATA drives
today, the time it takes the host to process an interrupt is
frequently greater than the time required to transfer the
sector of block of sectors for that interrupt! It is not
uncommon for the host overhead to reduce the data rate to 1/2
or 1/3 of the instantaneous rate shown here.
The ATA PIO modes are defined as follows:
PIO min cycle data comment
mode time rate
0 ???ns ?MB the rate at which a system
running at 4.77MHZ could
execute the REP INSW.
1 ???ns ?MB the rate at which a system
running at 6MHz could
execute the REP INSW.
2 240ns 8MB the rate at which a system
running at 8MHz could
execute the REP INSW.
3 180ns 13MB requires an ATA-2
host adapter.
4 120ns 16MB requires an ATA-2
host adapter.
The complete description of the PIO (and DMA modes is much
more complex and will be cover in more detail later in this
FAQ.
### Do I need BIOS or OS drivers to support more than 528MB?
Warning: Read the previous question before reading this one.
Maybe, probably, yes. The answer to this *very* complex and
will be discussed in detail in Part 2. Here is the brief
answer...
A traditional x86 system BIOS supports only CHS mode
addressing with cylinders limited to 1024, heads limited to 16
and sectors limited to 63. This allows addressing of drives
up to 528MB. These limitations come from the INT 13
read/write calls that combine a 10-bit cylinder number with a
6-bit sector number into a 16-bit register.
Note that this is entirely a software problem: the ATA
interface supports up to 65,535 cylinders, 16 heads and 255
sectors.
While the head number usually requires only 4-bits, up to 6 or
8 bits are available in the INT 13 interface. This fact has
allowed the SCSI folks to support big drives by increasing the
number of heads above 16. The SCSI host adapter BIOS converts
this "fake" CHS address to a different CHS or an LBA when it
issues a read/write command to the drive. The following table
shows some approximate drives sizes and the "fake" CHS
parameters that you may see from a SCSI BIOS:
cyl head sector size
1024 16 63 512MB
1024 32 63 1GB
512 64 63 1GB
1024 64 63 2GB
1024 256 63 8GB
The last entry represents the largest possible drive that
a traditional INT 13 BIOS can support.
The system BIOS folks *must* start supporting drives over
528MB in their BIOS by implementing some type of CHS
translation. To date, few systems have such BIOS. And here
is the bad part: Microsoft says that the BIOS *must*
support it in order to use it in their OS. The algorithm is
simple (but warning: this is not the complete algorithm!):
INT 13 input action ATA interface
cyl number "multiply" by n modified cyl number
head number "divide" by n modified head number
sector number nothing sector number
The value of n must be selected such that the modified head
number is less than 16.
LBA addressing at the hard disk drive level or at the BIOS or
driver level is another solution. This solution will probably
not be popular for several more years. It requires that the
BIOS people implement a new INT 13 interface, called the
Microsoft/IBM Extensions and that the OS people start using
this new BIOS interface. Few system BIOS support this
alternative interface today. Without this new interface, LBA
support at the hard disk drive level is not required.
So most of us have older systems without much possibility of
getting a BIOS upgrade, so what do we do? Well we must obtain
one of the many driver products that are on the market that
live in one of the disk boot sectors and "take over" the
system BIOS INT 13 with an INT 13 that supports the
translation. The biggest problem with this is that the
replacement INT 13 BIOS must live someplace in memory. For
DOS based systems, it can usually live at the top of the 640K
of memory and DOS is made to think that that part of memory,
usually around 8K bytes, does not exist. But the protected
mode OS's don't like this and usually wipe out the driver when
they load their kernel. So if you plan to run multiple OS's
on your system, buyer beware!
Then there is the Windows problem: the standard FastDisk
driver in Windows does *not* support such translation schemes
and can not be enabled. So make sure the driver you
purchase also comes with a Windows FastDisk replacement.
Buyer beware!
### Do I need BIOS or OS drivers to support the ATA-2 data
### transfer rates?
Warning: Read the previous two questions before reading this
one.
Maybe, probably, yes. The answer to this *very* complex and
will be discussed in detail in Part 2. Here is the brief
answer...
If you have a new ATA drive that supports the advanced PIO or
DMA data transfer rates (ATA-2 PIO Mode 3 or 4, or, ATA-2 DMA
Mode 1 or 2) then you also must have a new ATA host adapter
that attaches to the VL-Bus or PCI bus or some other high
speed bus (probably a 32-bit bus) in your system. That host
adapter has I/O registers of its own that are used to control
its advanced features. Controlling those advanced features
requires software -- either in the system INT 13 BIOS or in a
INT 13 BIOS on the host adapter card or in a driver loaded
via the boot record or later by your OS.
Depending on how that host adapter works you may also
need a Windows FastDisk replacement in order to use the high
speed data transfer modes in Windows.
Buyer beware!
### I just purchased a new high speed host adapter for my VL-Bus
### (or PCI bus) system and a new 540MB hard disk. How do I get
### full use out of all this new hardware?
Did you read the previous three questions?
You need BIOS or driver software and a Windows FastDisk
replacement. These *must* support both CHS translation
(because your drive is over 528MB) and the host adapter
hardware (to use the high speed data transfer rates).
Some drivers on the market today use LBA addressing on the
ATA interface to get over 528MB. This may make your disk
partition(s) unreadable by another OS.
Check the hardware and software specifications of the product
before you buy it! Ask lots of questions -- you probably get
lots of incorrect or misleading answers -- be prepared for
that! If you plan to run something other than DOS and
Windows, especially if you plan a "dual boot" or "boot
manager" environment, be real careful.
Buyer beware!
OPINION: I know of only one product that supports all of this
new hardware, supports over 528MB *and* supports most of the
current OS's that are shipping including several in shipping
in beta form. The product is from a small two person company
that is trying to sell the product on an OEM basis and not in
the retail market. - Hale Landis <landis@sugs.tware.com>
/end part 1/
--
\\===============\\=======================\\
\\ Hale Landis \\ 303-548-0567 \\
// Niwot, CO USA // landis@sugs.tware.com //
//===============//=======================//