OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [Documentation/] [ide.txt] - Blame information for rev 1772

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1625 jcastillo
ide.txt -- Information regarding the Enhanced IDE drive in Linux 2.0.xx
2
===============================================================================
3
Supported by:
4
        Mark Lord               -- disks, interfaces, probing
5
        Gadi Oxman      -- tapes, disks, whatever
6
        Scott Snyder    -- cdroms, ATAPI, audio
7
 
8
UDMA support was added for various chipsets, from kernel 2.0.35 on. Check
9
the udma.txt file in this directory for details.
10
 
11
   +-----------------------------------------------------------------+
12
   |  The hdparm utility for controlling various IDE features is     |
13
   |  packaged separately.  Look for it on popular linux FTP sites.  |
14
   +-----------------------------------------------------------------+
15
 
16
See description later on below for handling BIG IDE drives with >1024 cyls.
17
 
18
Major features of ide.c & ide-cd.c ("NEW!" marks changes since 1.2.13):
19
 
20
NEW!    - support for IDE ATAPI *floppy* drives
21
NEW!    - support for IDE ATAPI *tape* drives, courtesy of Gadi Oxman
22
                (re-run MAKEDEV.ide to create the tape device entries in /dev/)
23
NEW!    - support for up to *four* IDE interfaces on one or more IRQs
24
NEW!    - support for any mix of up to *eight* disk and/or cdrom drives
25
        - support for reading IDE ATAPI cdrom drives (NEC,MITSUMI,VERTOS,SONY)
26
        - support for audio functions
27
        - auto-detection of interfaces, drives, IRQs, and disk geometries
28
                - "single" drives should be jumpered as "master", not "slave"
29
NEW!              (both are now probed for)
30
        - support for BIOSs which report "more than 16 heads" on disk drives
31
        - uses LBA (slightly faster) on disk drives which support it
32
        - support for lots of fancy (E)IDE drive functions with hdparm utility
33
        - optional (compile time) support for 32-bit VLB data transfers
34
        - support for IDE multiple (block) mode (same as hd.c)
35
        - support for interrupt unmasking during I/O (better than hd.c)
36
        - improved handshaking and error detection/recovery
37
        - can co-exist with hd.c controlling the first interface
38
        - run-time selectable 32bit interface support (using hdparm-2.3)
39
NEW!    - support for reliable operation of buggy RZ1000 interfaces
40
                - PCI support is automatic when rz1000 support is configured
41
NEW!    - support for reliable operation of buggy CMD-640 interfaces
42
                - PCI support is automatic when cmd640 support is configured
43
                - for VLB, use kernel command line option:   ide0=cmd640_vlb
44
                - this support also enables the secondary i/f when needed
45
                - interface PIO timing & prefetch parameter support
46
NEW!    - experimental support for UMC 8672 interfaces
47
NEW!    - support for secondary interface on the FGI/Holtek HT-6560B VLB i/f
48
                - use kernel command line option:   ide0=ht6560
49
NEW!    - experimental support for various IDE chipsets
50
                - use appropriate kernel command line option from list below
51
NEW!    - support for drives with a stuck WRERR_STAT bit
52
NEW!    - support for removable devices, including door lock/unlock
53
NEW!    - transparent support for DiskManager 6.0x and "Dynamic Disk Overlay"
54
        - works with Linux fdisk, LILO, loadlin, bootln, etc..
55
NEW!    - mostly transparent support for EZ-Drive disk translation software
56
NEW!            - to use LILO with EZ, install LILO on the linux partition
57
                  rather than on the master boot record, and then mark the
58
                  linux partition as "bootable" or "active" using fdisk.
59
                  (courtesy of Juha Laiho ).
60
NEW!    - auto-detect of disk translations by examining partition table
61
NEW!    - ide-cd.c now compiles separate from ide.c
62
NEW!    - Bus-Master DMA support for Intel PCI Triton chipset IDE interfaces
63
                - for details, see comments at top of triton.c
64
NEW!    - ide-cd.c now supports door locking and auto-loading.
65
                - Also preliminary support for multisession
66
                  and direct reads of audio data.
67
NEW!    - experimental support for Promise DC4030VL caching interface card
68
NEW!            - email thanks/problems to: peterd@pnd-pc.demon.co.uk
69
NEW!    - the hdparm-3.1 package can be used to set PIO modes for some chipsets.
70
 
71
For work in progress, see the comments in ide.c, ide-cd.c, and triton.c.
72
 
73
Note that there is now a group actively working on support for the Promise
74
caching IDE cards, such as the DC4030VL, and early results are encouraging.
75
Look for this support to be added to the kernel soon.
76
 
77
 
78
***  IMPORTANT NOTICES:  BUGGY IDE CHIPSETS CAN CORRUPT DATA!!
79
***  =================
80
***  PCI versions of the CMD640 and RZ1000 interfaces are now detected
81
***  automatically at startup when PCI BIOS support is configured.
82
***
83
***  Linux disables the "prefetch" ("readahead") mode of the RZ1000
84
***  to prevent data corruption possible due to hardware design flaws.
85
***
86
***  For the CMD640, linux disables "IRQ unmasking" (hdparm -u1) on any
87
***  drive for which the "prefetch" mode of the CMD640 is turned on.
88
***  If "prefetch" is disabled (hdparm -p8), then "IRQ unmasking" can be
89
***  used again.
90
***
91
***  For the CMD640, linux disables "32bit I/O" (hdparm -c1) on any drive
92
***  for which the "prefetch" mode of the CMD640 is turned off.
93
***  If "prefetch" is enabled (hdparm -p9), then "32bit I/O" can be
94
***  used again.
95
***
96
***  The CMD640 is also used on some Vesa Local Bus (VLB) cards, and is *NOT*
97
***  automatically detected by Linux.  For safe, reliable operation with such
98
***  interfaces, one *MUST* use the "ide0=cmd640_vlb" kernel option.
99
***
100
***  Use of the "serialize" option is no longer necessary.
101
 
102
This is the multiple IDE interface driver, as evolved from hd.c.
103
It supports up to four IDE interfaces, on one or more IRQs (usually 14 & 15).
104
There can be up to two drives per interface, as per the ATA-2 spec.
105
 
106
Primary:    ide0, port 0x1f0; major=3;  hda is minor=0; hdb is minor=64
107
Secondary:  ide1, port 0x170; major=22; hdc is minor=0; hdd is minor=64
108
Tertiary:   ide2, port 0x1e8; major=33; hde is minor=0; hdf is minor=64
109
Quaternary: ide3, port 0x168; major=34; hdg is minor=0; hdh is minor=64
110
 
111
To access devices on the 2nd/3rd/4th interfaces, device entries must first be
112
created in /dev for them.  To create such entries, simply run the included
113
shell script:   /usr/src/linux/scripts/MAKEDEV.ide
114
 
115
Apparently many releases of Slackware 2.2/2.3 have incorrect entries
116
in /dev for hdc* and hdd* -- this can also be corrected by running MAKEDEV.ide
117
 
118
ide.c automatically probes for the standard four IDE interfaces,
119
for the drives/geometries attached to those interfaces, and for the
120
IRQ numbers being used by the interfaces (normally 14, 15, 11 and 10).
121
 
122
For special cases, interfaces may be specified using kernel "command line"
123
options.  For example,
124
 
125
        ide3=0x168,0x36e,10     /* ioports 0x168-0x16f,0x36e, irq 10 */
126
 
127
Normally the irq number need not be specified, as ide.c will probe for it:
128
 
129
        ide3=0x168,0x36e        /* ioports 0x168-0x16f,0x36e */
130
 
131
The standard port, and irq values are these:
132
 
133
        ide0=0x1f0,0x3f6,14
134
        ide1=0x170,0x376,15
135
        ide2=0x1e8,0x3ee,11
136
        ide3=0x168,0x36e,10
137
 
138
Note that the first parameter reserves 8 contiguous ioports, whereas the
139
second value denotes a single ioport. If in doubt, do a 'cat /proc/ioports'.
140
 
141
In all probability the device uses these ports and IRQs if it is attached
142
to the appropriate ide channel.  Pass the parameter for the correct ide
143
channel to the kernel, as explained above.
144
 
145
Any number of interfaces may share a single IRQ if necessary, at a slight
146
performance penalty, whether on separate cards or a single VLB card.
147
The IDE driver automatically detects and handles this.  However, this may
148
or may not be harmful to your hardware.. two or more cards driving the same IRQ
149
can potentially burn each other's bus driver, though in practice this
150
seldom occurs.  Be careful, and if in doubt, don't do it!
151
 
152
Drives are normally found by auto-probing and/or examining the CMOS/BIOS data.
153
For really weird situations, the apparent (fdisk) geometry can also be specified
154
on the kernel "command line" using LILO.  The format of such lines is:
155
 
156
        hdx=cyls,heads,sects,wpcom,irq
157
or      hdx=cdrom
158
 
159
where hdx can be any of hda through hdh, Three values are required
160
(cyls,heads,sects).  For example:
161
 
162
        hdc=1050,32,64  hdd=cdrom
163
 
164
either {hda,hdb} or {hdc,hdd}.  The results of successful auto-probing may
165
override the physical geometry/irq specified, though the "original" geometry
166
may be retained as the "logical" geometry for partitioning purposes (fdisk).
167
 
168
If the auto-probing during boot time confuses a drive (ie. the drive works
169
with hd.c but not with ide.c), then an command line option may be specified
170
for each drive for which you'd like the drive to skip the hardware
171
probe/identification sequence.  For example:
172
 
173
        hdb=noprobe
174
or
175
        hdc=768,16,32
176
        hdc=noprobe
177
 
178
Note that when only one IDE device is attached to an interface,
179
it should be jumpered as "single" or "master", *not* "slave".
180
Many folks have had "trouble" with cdroms because of this requirement,
181
so ide.c now probes for both units, though success is more likely
182
when the drive is jumpered correctly.
183
 
184
Courtesy of Scott Snyder, the driver supports ATAPI cdrom drives
185
such as the NEC-260 and the new MITSUMI triple/quad speed drives.
186
Such drives will be identified at boot time, just like a hard disk.
187
 
188
If for some reason your cdrom drive is *not* found at boot time, you can force
189
the probe to look harder by supplying a kernel command line parameter
190
via LILO, such as:
191
 
192
        hdc=cdrom       /* hdc = "master" on second interface */
193
or
194
        hdd=cdrom       /* hdd = "slave" on second interface */
195
 
196
For example, a GW2000 system might have a hard drive on the primary
197
interface (/dev/hda) and an IDE cdrom drive on the secondary interface
198
(/dev/hdc).  To mount a CD in the cdrom drive, one would use something like:
199
 
200
        ln -sf /dev/hdc /dev/cdrom
201
        mkdir /cd
202
        mount /dev/cdrom /cd -t iso9660 -o ro
203
 
204
If, after doing all of the above, mount doesn't work and you see
205
errors from the driver (with dmesg) complaining about `status=0xff',
206
this means that the hardware is not responding to the driver's attempts
207
to read it.  One of the following is probably the problem:
208
 
209
  - Your hardware is broken.
210
 
211
  - You are using the wrong address for the device, or you have the
212
    drive jumpered wrong.  Review the configuration instructions above.
213
 
214
  - Your IDE controller requires some nonstandard initialization sequence
215
    before it will work properly.  If this is the case, there will often
216
    be a separate MS-DOS driver just for the controller.  IDE interfaces
217
    on sound cards usually fall into this category.  Such configurations
218
    can often be made to work by first booting MS-DOS, loading the
219
    appropriate drivers, and then warm-booting linux (without powering
220
    off).  This can be automated using loadlin in the MS-DOS autoexec.
221
 
222
If you always get timeout errors, interrupts from the drive are probably
223
not making it to the host.  Check how you have the hardware jumpered
224
and make sure it matches what the driver expects (see the configuration
225
instructions above).  If you have a PCI system, also check the BIOS
226
setup; i've had one report of a system which was shipped with IRQ 15
227
disabled by the BIOS.
228
 
229
The kernel is able to execute binaries directly off of the cdrom,
230
provided it is mounted with the default block size of 1024 (as above).
231
 
232
Please pass on any feedback on the cdrom stuff to the author & maintainer,
233
Scott Snyder (snyder@fnald0.fnal.gov).
234
 
235
Note that if BOTH hd.c and ide.c are configured into the kernel,
236
hd.c will normally be allowed to control the primary IDE interface.
237
This is useful for older hardware that may be incompatible with ide.c,
238
and still allows newer hardware to run on the 2nd/3rd/4th IDE ports
239
under control of ide.c.   To have ide.c also "take over" the primary
240
IDE port in this situation, use the "command line" parameter:  ide0=0x1f0
241
 
242
mlord@pobox.com
243
snyder@fnald0.fnal.gov
244
================================================================================
245
 
246
Summary of ide driver parameters for kernel "command line":
247
----------------------------------------------------------
248
 "hdx="  is recognized for all "x" from "a" to "h", such as "hdc".
249
 "idex=" is recognized for all "x" from "0" to "3", such as "ide1".
250
 
251
 "hdx=noprobe"          : drive may be present, but do not probe for it
252
 "hdx=none"             : drive is NOT present, ignore cmos and do not probe
253
 "hdx=nowerr"           : ignore the WRERR_STAT bit on this drive
254
 "hdx=cdrom"            : drive is present, and is a cdrom drive
255
 "hdx=cyl,head,sect"    : disk drive is present, with specified geometry
256
 "hdx=autotune"         : driver will attempt to tune interface speed
257
                                to the fastest PIO mode supported,
258
                                if possible for this drive only.
259
                                Not fully supported by all chipset types,
260
                                and quite likely to cause trouble with
261
                                older/odd IDE drives.
262
 "hdx=slow"             : insert a huge pause after each access to the data
263
                                port. Should be used only as a last resort.
264
 "hdx=ide-scsi"         : use the ide-scsi driver for hdx
265
 
266
 "idebus=xx"            : inform IDE driver of VESA/PCI bus speed in Mhz,
267
                                where "xx" is between 20 and 66 inclusive,
268
                                used when tuning chipset PIO modes.
269
                                For PCI bus, 25 is correct for a P75 system,
270
                                30 is correct for P90,P120,P180 systems,
271
                                and 33 is used for P100,P133,P166 systems.
272
                                If in doubt, use idebus=33 for PCI.
273
                                As for VLB, it is safest to not specify it.
274
                                Bigger values are safer than smaller ones.
275
 
276
 "idex=noprobe"         : do not attempt to access/use this interface
277
 "idex=base"            : probe for an interface at the addr specified,
278
                                where "base" is usually 0x1f0 or 0x170
279
                                and "ctl" is assumed to be "base"+0x206
280
 "idex=base,ctl"        : specify both base and ctl
281
 "idex=base,ctl,irq"    : specify base, ctl, and irq number
282
 "idex=autotune"        : driver will attempt to tune interface speed
283
                                to the fastest PIO mode supported,
284
                                for all drives on this interface.
285
                                Not fully supported by all chipset types,
286
                                and quite likely to cause trouble with
287
                                older/odd IDE drives.
288
 "idex=noautotune"      : driver will NOT attempt to tune interface speed
289
                                This is the default for most chipsets,
290
                                except the cmd640.
291
 "idex=serialize"       : do not overlap operations on idex and ide(x^1)
292
 
293
 The following are valid ONLY on ide0,
294
 and the defaults for the base,ctl ports must not be altered.
295
 
296
 "ide0=dtc2278"         : probe/support DTC2278 interface
297
 "ide0=ht6560b"         : probe/support HT6560B interface
298
 "ide0=cmd640_vlb"      : *REQUIRED* for VLB cards with the CMD640 chip
299
                          (not for PCI -- automatically detected)
300
 "ide0=qd6580"          : probe/support qd6580 interface
301
 "ide0=ali14xx"         : probe/support ali14xx chipsets (ALI M1439/M1445)
302
 "ide0=umc8672"         : probe/support umc8672 chipsets
303
 
304
Everything else is rejected with a "BAD OPTION" message.
305
 
306
================================================================================
307
 
308
Some Terminology
309
----------------
310
IDE = Integrated Drive Electronics, meaning that each drive has a built-in
311
controller, which is why an "IDE interface card" is not a "controller card".
312
 
313
IDE drives are designed to attach almost directly to the ISA bus of an AT-style
314
computer.  The typical IDE interface card merely provides I/O port address
315
decoding and tri-state buffers, although several newer localbus cards go much
316
beyond the basics.  When purchasing a localbus IDE interface, avoid cards with
317
an onboard BIOS and those which require special drivers.  Instead, look for a
318
card which uses hardware switches/jumpers to select the interface timing speed,
319
to allow much faster data transfers than the original 8Mhz ISA bus allows.
320
 
321
ATA = AT (the old IBM 286 computer) Attachment Interface, a draft American
322
National Standard for connecting hard drives to PCs.  This is the official
323
name for "IDE".
324
 
325
The latest standards define some enhancements, known as the ATA-2 spec,
326
which grew out of vendor-specific "Enhanced IDE" (EIDE) implementations.
327
 
328
ATAPI = ATA Packet Interface, a new protocol for controlling the drives,
329
similar to SCSI protocols, created at the same time as the ATA2 standard.
330
ATAPI is currently used for controlling CDROM and TAPE devices, and will
331
likely also soon be used for Floppy drives, removable R/W cartridges,
332
and for high capacity hard disk drives.
333
 
334
How To Use *Big* ATA/IDE drives with Linux
335
------------------------------------------
336
The ATA Interface spec for IDE disk drives allows a total of 28 bits
337
(8 bits for sector, 16 bits for cylinder, and 4 bits for head) for addressing
338
individual disk sectors of 512 bytes each (in "Linear Block Address" (LBA)
339
mode, there is still only a total of 28 bits available in the hardware).
340
This "limits" the capacity of an IDE drive to no more than 128GB (Giga-bytes).
341
All current day IDE drives are somewhat smaller than this upper limit, and
342
within a few years, ATAPI disk drives will raise the limit considerably.
343
 
344
All IDE disk drives "suffer" from a "16-heads" limitation:  the hardware has
345
only a four bit field for head selection, restricting the number of "physical"
346
heads to 16 or less.  Since the BIOS usually has a 63 sectors/track limit,
347
this means that all IDE drivers larger than 504MB (528Meg) must use a "physical"
348
geometry with more than 1024 cylinders.
349
 
350
   (1024cyls * 16heads * 63sects * 512bytes/sector) / (1024 * 1024) == 504MB
351
 
352
(Some BIOSs (and controllers with onboard BIOS) pretend to allow "32" or "64"
353
 heads per drive (discussed below), but can only do so by playing games with
354
 the real (hidden) geometry, which is always limited to 16 or fewer heads).
355
 
356
This presents two problems to most systems:
357
 
358
        1. The INT13 interface to the BIOS only allows 10-bits for cylinder
359
        addresses, giving a limit of 1024cyls for programs which use it.
360
 
361
        2. The physical geometry fields of the disk partition table only
362
        allow 10-bits for cylinder addresses, giving a similar limit of 1024
363
        cyls for operating systems that do not use the "sector count" fields
364
        instead of the physical Cyl/Head/Sect (CHS) geometry fields.
365
 
366
Neither of these limitations affects Linux itself, as it (1) does not use the
367
BIOS for disk access, and it (2) is clever enough to use the "sector count"
368
fields of the partition table instead of the physical CHS geometry fields.
369
 
370
        a) Most folks use LILO to load linux.  LILO uses the INT13 interface
371
        to the BIOS to load the kernel at boot time.  Therefore, LILO can only
372
        load linux if the files it needs (usually just the kernel images) are
373
        located below the magic 1024 cylinder "boundary" (more on this later).
374
 
375
        b) Many folks also like to have bootable DOS partitions on their
376
        drive(s).  DOS also uses the INT13 interface to the BIOS, not only
377
        for booting, but also for operation after booting.  Therefore, DOS
378
        can normally only access partitions which are contained entirely below
379
        the magic 1024 cylinder "boundary".
380
 
381
There are at least seven commonly used schemes for kludging DOS to work
382
around this "limitation".  In the long term, the problem is being solved
383
by introduction of an alternative BIOS interface that does not have the
384
same limitations as the INT13 interface.  New versions of DOS are expected
385
to detect and use this interface in systems whose BIOS provides it.
386
 
387
But in the present day, alternative solutions are necessary.
388
 
389
The most popular solution in newer systems is to have the BIOS shift bits
390
between the cylinder and head number fields.  This is activated by entering
391
a translated logical geometry into the BIOS/CMOS setup for the drive.
392
Thus, if the drive has a geometry of 2100/16/63 (CHS), then the BIOS could
393
present a "logical" geometry of 525/64/63 by "shifting" two bits from the
394
cylinder number into the head number field for purposes of the partition table,
395
CMOS setup, and INT13 interfaces.  Linux kernels 1.1.39 and higher detect and
396
"handle" this translation automatically, making this a rather painless solution
397
for the 1024 cyls problem.  If for some reason Linux gets confused (unlikely),
398
then use the kernel command line parameters to pass the *logical* geometry,
399
as in:  hda=525,64,63
400
 
401
If the BIOS does not support this form of drive translation, then several
402
options remain, listed below in order of popularity:
403
 
404
        - use a partition below the 1024 cyl boundary to hold the linux
405
        boot files (kernel images and /boot directory), and place the rest
406
        of linux anywhere else on the drive.  These files can reside in a DOS
407
        partition, or in a tailor-made linux boot partition.
408
        - use DiskManager software from OnTrack, supplied free with
409
        many new hard drive purchases.
410
        - use EZ-Drive software (similar to DiskManager).  Note though,
411
        that LILO must *not* use the MBR when EZ-Drive is present.
412
        Instead, install LILO on the first sector of your linux partition,
413
        and mark it as "active" or "bootable" with fdisk.
414
        - boot from a floppy disk instead of the hard drive (takes 10 seconds).
415
 
416
If you cannot use drive translation, *and* your BIOS also restricts you to
417
entering no more than 1024 cylinders in the geometry field in the CMOS setup,
418
then just set it to 1024.  As of v3.5 of this driver, Linux automatically
419
determines the *real* number of cylinders for fdisk to use, allowing easy
420
access to the full disk capacity without having to fiddle around.
421
 
422
Regardless of what you do, all DOS partitions *must* be contained entirely
423
within the first 1024 logical cylinders.  For a 1Gig WD disk drive, here's
424
a good "half and half" partitioning scheme to start with:
425
 
426
        geometry = 2100/16/63
427
        /dev/hda1 from cyl    1 to  992         dos
428
        /dev/hda2 from cyl  993 to 1023         swap
429
        /dev/hda3 from cyl 1024 to 2100         linux
430
 
431
To ensure that LILO can boot linux, the boot files (kernel and /boot/*)
432
must reside within the first 1024 cylinders of the drive.  If your linux
433
root partition is *not* completely within the first 1024 cyls (quite common),
434
then you can use LILO to boot linux from files on your DOS partition
435
by doing the following after installing Slackware (or whatever):
436
 
437
        0. Boot from the "boot floppy" created during the installation
438
        1. Mount your DOS partition as /dos (and stick it in /etc/fstab)
439
        2. Move your kernel (/vmlinuz) to /dos/vmlinuz with:  mv /vmlinuz /dos
440
        3. Edit /etc/lilo.conf to change /vmlinuz to /dos/vmlinuz
441
        4. Move /boot to /dos/boot with:  cp -a /boot /dos ; rm -r /boot
442
        5. Create a symlink for LILO to use with:  ln -s /dos/boot /boot
443
        6. Re-run LILO with:  lilo
444
 
445
        A danger with this approach is that whenever an MS-DOS "defragmentation"
446
        program is run (like Norton "speeddisk"), it may move the Linux boot
447
        files around, confusing LILO and making the (Linux) system unbootable.
448
        Be sure to keep a kernel "boot floppy" at hand for such circumstances.
449
        A possible workaround is to mark the Linux files as S+H+R (System,
450
        Hidden, Readonly), to prevent most defragmentation programs from
451
        moving the files around.
452
 
453
If you "don't do DOS", then partition as you please, but remember to create
454
a small partition to hold the /boot directory (and vmlinuz) as described above
455
such that they stay within the first 1024 cylinders.
456
 
457
Note that when creating partitions that span beyond cylinder 1024,
458
Linux fdisk will complain about "Partition X has different physical/logical
459
endings" and emit messages such as "This is larger than 1024, and may cause
460
problems with some software".   Ignore this for linux partitions.  The "some
461
software" refers to DOS, the BIOS, and LILO, as described previously.
462
 
463
Western Digital ships a "DiskManager 6.03" diskette with all of their big
464
hard drives.  Use BIOS translation instead of this if possible, as it is a
465
more generally compatible method of achieving the same results (DOS access
466
to the entire disk).  However, if you must use DiskManager, it now works
467
with Linux 1.3.x in most cases.  Let me know if you still have trouble.
468
 
469
My recommendations to anyone who asks about NEW systems are:
470
 
471
        - buy a motherboard that uses the Intel Triton chipset -- very common.
472
        - use IDE for the first two drives, placing them on separate interfaces.
473
        - place the IDE cdrom drive as slave on either interface.
474
        - if additional disks are to be connected, consider your needs:
475
                - fileserver?  Buy a SC200 SCSI adaptor for the next few drives.
476
                - personal system?  Use IDE for the next two drives.
477
                - still not enough?  Keep adding SC200 SCSI cards as needed.
478
 
479
Most manufacturers make both IDE and SCSI-2 versions of each of their drives.
480
The IDE ones are usually faster and cheaper, due to the higher data transfer
481
speed of PIO mode4 (ATA2), 16.6MBytes/sec versus 10Mbytes/sec for SCSI-2.
482
 
483
In particular, I recommend Quantum FireBalls as cheap and exceptionally fast.
484
The new WD1.6GB models are also cheap screamers.
485
 
486
For really high end systems, go for fast/wide 7200rpm SCSI.  But it'll cost ya!
487
 
488
mlord@pobox.com
489
================================================================================
490
 
491
DMA Bus Master transfer
492
-----------------------
493
The triton.c driver provides support for the DMA Bus Mastering functions of
494
the Intel PCI Triton I/II chipsets (i82371FB or i82371SB).
495
 
496
Pretty much the same code will work for the OPTi "Viper" chipset. Look for
497
DMA support for this in linux kernel 2.1.xx, when it appears.
498
 
499
DMA is currently supported only for hard disk drives (not cdroms).
500
 
501
Support for cdroms will likely be added at a later date, after broader
502
experience has been obtained with hard disks.
503
 
504
Up to four drives may be enabled for DMA, and the motherboard chipset will
505
(hopefully) arbitrate the PCI bus among them.  Note that the i82371 chip
506
provides a single "line buffer" for the BM IDE function, so performance of
507
multiple (two) drives doing DMA simultaneously will suffer somewhat, as they
508
contest for that resource bottleneck.  This is handled transparently inside
509
the i82371 chip.
510
 
511
The SiS 5513 controller has two completely independent IDE controller units,
512
each with a 64-byte line buffer (same size as the Intel); there is no
513
bottleneck in simultaneous (U)DMA transfers for this resource. The 5513 is
514
built-in the SiS 5571, 5598 and 5591 chipsets.
515
 
516
The VIA chipsets like the Intel have a single 64 byte line buffer, but it
517
can be split 1/2-1/2 or 1/4-3/4 between both channels.
518
 
519
By default, DMA support is prepared for use, but is currently enabled only
520
for drives which support multi-word DMA mode2 (mword2), or which are
521
recognized as "good" (see table below).  Drives with only mode0 or mode1
522
(single or multi) DMA should also work with this chipset/driver (eg.
523
MC2112A) but are not enabled by default.  Use "hdparm -i" to view modes
524
supported by a given drive.
525
 
526
The hdparm-3.3 (patched) utility can be used to manually enable /disable DMA
527
support, but must be (re-)compiled against this kernel version or later.
528
 
529
Michel Aubry has produced a patch against hdparm-3.3 to support UDMA.
530
 
531
To enable DMA, use "hdparm -d1 /dev/hd?" on a per-drive basis after booting.
532
If problems arise, ide.c will disable DMA operation after a few retries.
533
This error recovery mechanism works and has been extremely well exercised.
534
 
535
IDE drives, depending on their vintage, may support several different modes
536
of DMA operation.  The boot-time modes are indicated with a "*" in the
537
"hdparm -I" listing, and can be changed with *knowledgeable* use of the
538
"hdparm -X" feature (X32 for DMA 0, X33 for DMA 1, X34 for DMA 2, X64 for
539
UDMA 0, X65 for UDMA 1 and X66 for UDMA 2).
540
 
541
Testing was done with an ASUS P55TP4XE/100 system and the following drives:
542
 
543
  Quantum Fireball 1080A (1Gig w/83kB buffer), DMA mode2, PIO mode4.
544
        - DMA mode2 works well (7.4MB/sec), despite the tiny on-drive buffer.
545
        - This drive also does PIO mode4, at about the same speed as DMA mode2.
546
          An awesome drive for the price!
547
 
548
  Fujitsu M1606TA (1Gig w/256kB buffer), DMA mode2, PIO mode4.
549
        - DMA mode2 gives horrible performance (1.6MB/sec), despite the good
550
          size of the on-drive buffer and a boasted 10ms average access time.
551
        - PIO mode4 was better, but peaked at a mere 4.5MB/sec.
552
 
553
  Micropolis MC2112A (1Gig w/508kB buffer), drive pre-dates EIDE and ATA2.
554
        - DMA works fine (2.2MB/sec), probably due to the large on-drive buffer.
555
        - This older drive can also be tweaked for fastPIO (3.7MB/sec) by using
556
          maximum clock settings (5,4) and setting all flags except prefetch.
557
 
558
  Western Digital AC31000H (1Gig w/128kB buffer), DMA mode1, PIO mode3.
559
        - DMA does not work reliably.  The drive appears to be somewhat tardy
560
          in deasserting DMARQ at the end of a sector.  This is evident in
561
          the observation that WRITEs work most of the time, depending on
562
          cache-buffer occupancy, but multi-sector reads seldom work.
563
 
564
Testing was done with a Gigabyte GA-586 ATE system and the following drive:
565
(Uwe Bonnes - bon@elektron.ikp.physik.th-darmstadt.de)
566
 
567
  Western Digital AC31600H (1.6Gig w/128kB buffer), DMA mode2, PIO mode4.
568
        - much better than its 1Gig cousin, this drive is reported to work
569
          very well with DMA (7.3MB/sec).
570
 
571
Other drives:
572
 
573
  Maxtor 7540AV (515Meg w/32kB buffer), DMA modes mword0/sword2, PIO mode3.
574
        - a budget drive, with budget performance, around 3MB/sec.
575
 
576
  Western Digital AC2850F (814Meg w/64kB buffer), DMA mode1, PIO mode3.
577
        - another "caviar" drive, similar to the AC31000, except that this one
578
          worked with DMA in at least one system.  Throughput is about 3.8MB/sec
579
          for both DMA and PIO.
580
 
581
  Conner CFS850A (812Meg w/64kB buffer), DMA mode2, PIO mode4.
582
        - like most Conner models, this drive proves that even a fast interface
583
          cannot improve slow media.  Both DMA and PIO peak around 3.5MB/sec.
584
 
585
  Maxtor 71260AT (1204Meg w/256kB buffer), DMA mword0/sword2, PIO mode3.
586
        - works with DMA, on some systems (but not always on others, eg. Dell),
587
          giving 3-4MB/sec performance, about the same as mode3.
588
 
589
  IBM DHEA 36480 (6197Meg w/476kB buffer), DMA mode2, PIO mode4, UDMA mode2
590
        - works with DMA and UDMA on systems that support it. This drive and its
591
          larger 8.4GB cousin provide throughput of 9.8MB/sec under UDMA.
592
 
593
If you have any drive models to add, email your results to:  mlord@pobox.com
594
Keep an eye on /var/adm/messages for "DMA disabled" messages.
595
 
596
Some people have reported trouble with Intel Zappa motherboards.
597
This can be fixed by upgrading the AMI BIOS to version 1.00.04.BS0,
598
available from ftp://ftp.intel.com/pub/bios/10004bs0.exe
599
(thanks to Glen Morrell  for researching this).
600
 
601
And, yes, Intel Zappa boards really *do* use the Triton IDE ports.
602
 
603
Changes by Michel Aubry, Andre Hedrick and Andrew D. Balsa, June 1998:
604
  a) Added support for non-Intel chipsets that support Bus Mastering DMA.
605
  b) Added support for UDMA (33Mb/s) drives and controllers. Note that UDMA
606
     support must be enabled in the BIOS, and that both the hard disk drive
607
     _and_ the chipset must support UDMA.
608
  On the IBM DHEA-36480 drive, transfer rates go from 7.76Mb/s to 9.76Mb/s,
609
  a 25% improvement with zero cost (DMA mode2 to UDMA mode2).
610
 
611
Extra UDMA PCI controller card support by Andre M. Hedrick, June 1998:
612
  - PDC20246 Promise Ultra33 UDMA.
613
  - AEC6210  Artop Electronics Corp. ACARD
614
        sold under SIIG CN2449 UltraIDE Pro.
615
  - HPT343   Triones Technologies (HighPoint Technologies) Inc.
616
        future support -- nonbooting cards, need MNDA approval for
617
        information release.
618
        sold under Digital Research DRIDEUDMA.
619
 
620
For more information on UDMA support, check /Documentation/udma.txt.

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.