Commit graph

982 commits

Author SHA1 Message Date
KATO Takenori 2a0c056dc0 Sync with sys/i386/conf/files.i386 revision 1.179. 1997-11-27 10:14:54 +00:00
Mark Murray 61ca849927 From the author:
Here are the remanding changes required to support the Ensoniq
Soundscape using FreeBSD 3.0-current.

Notes:

  1) ad1848_init already has code to detect if DMA_DUPLEX should
     be set so it is not necessary (and is in fact a mistake) to
     hard code setting it.  Not all soundcards (i.e. the current
     sscape driver) are capable of using DMA_DUPLEX.

  2) The other changes are hopefully self explanatory.  Feel free
     to let me know if you need additional information.

Submitted by:	john@feith.com (John Wehle)
1997-11-25 19:30:38 +00:00
Alexander Langer e43a990070 Typo fix.
PR:		5068
Submitted by:	Studded@dal.net
1997-11-17 13:57:40 +00:00
John-Mark Gurney 8e9ddffa97 fix Jonathan Mini's email address per his request 1997-11-17 07:58:23 +00:00
Søren Schmidt c2fc1574ce Device # for Jonathan Mini's VESA support. 1997-11-16 10:02:13 +00:00
Julian Elischer 52bf64c787 Reviewed by: hackers@freebsd.org in general
Obtained from: Whistle Communications tree

Add an option to the way UFS works dependent on the SUID bit of directories
This changes makes things a whole lot simpler on systems running as
fileservers for PCs and MACS. to enable the new code you must
1/ enable option SUIDDIR on the kernel.
2/ mount the filesystem with option suiddir.
hopefully this makes it difficult enough for people to
do this accidentally.
see the new chmod(2) man page for detailed info.
1997-11-13 00:28:51 +00:00
Mike Smith 3da4461a71 Assign 84 to Andrew Gordon <arg@arg1.demon.co.uk> for the 'ttxt' Unitext
teletext decoder.
1997-11-10 03:50:29 +00:00
Wolfram Schneider 70e244f8f6 Remove the comments hat just list the nested includes.
The lists don't provide significantly more information than
grep '\.include', and grep gives lists that are actually correct.
Submitted by: Bruce
1997-11-09 15:03:15 +00:00
KATO Takenori c62a76ba79 Sync with sys/i386/conf/Makefile.i386 revision 1.105. 1997-11-06 09:51:34 +00:00
Mike Smith 41631559ba Bump configvers to 300003 to account for the crd->card (and related)
namespace changes.
1997-11-06 03:11:40 +00:00
Joerg Wunsch fbd1372a0b Make IPDIVERT a supported option. Alas, in_var.h depends on it, i
hope i've found out all files that actually depend on this dependancy.
IMHO, it's not very good practice to change the size of internal
structs depending on kernel options.
1997-11-05 20:17:23 +00:00
Steve Price 0f1d6a82dd Note that the Intel EtherExpress' driver is ie(4). 1997-11-04 21:11:14 +00:00
KATO Takenori 1248caae6e Sync with sys/i386/conf/Makefile.i386 revision 1.104. 1997-11-04 12:58:20 +00:00
Guido van Rooij 03486e0a41 Test if kvm_kernel.db exists before moving it. Otherwise installing
a kernel, booting single user and reinstalling a kernel fails.
1997-11-03 21:48:31 +00:00
KATO Takenori 47d57b2340 Synchronize with sys/i386/conf/files.i386 revision 1.178. 1997-10-28 14:29:23 +00:00
Joerg Wunsch ebc1f80ca7 Use the new "mandatory" keyword for the npx driver. 1997-10-28 07:28:34 +00:00
Joerg Wunsch 343b84b4e8 Removed another comment about not-so-mandatory devices i've missed in
the previous commit.  It's perfectly legal to build a kernel without
any video device driver (and even without any console driver at all if
desired).
1997-10-28 07:27:48 +00:00
Joerg Wunsch 1160da921f Remove the stale `log' non-pseudodevice.
Found by:	the new config(8) ;-)
1997-10-28 07:24:35 +00:00
Nate Williams c669d2df7e - 'Beep' support now happens in it's own separate file, so you can mess
around with different noises for the different events and not have it
  affect other files.

Inspired by:	PAO
1997-10-26 06:06:54 +00:00
Nate Williams e7e437dbfa - Do a bunch of gratuitous changes intended to make the code easier to
follow.
 * Rename/reorder all of the pccard structures, change many of the member
   names to be descriptive, and follow more closely other 'bus' drivers
   naming schemes.
 * Rename a bunch of parameter and local variable names to be more
   consistant in the code.
 * Renamed the PCCARD 'crd' device to be the 'card' device
 * KNF and make the code consistant where it was obvious.
 * ifdef'd out some unused code
1997-10-26 04:36:24 +00:00
KATO Takenori 201aca5d46 Synchronize with sys/i386/conf/Makefile.i386 revision 1.103. 1997-10-23 09:20:16 +00:00
Peter Wemm 48b29459ed Put in an initial %VERSREQ field. This will cause existing config(8)'s
to give a non-fatal warning about unknown directives, so there is no
hurry to rebuild config(8) yet, apart from shutting up the warning.
1997-10-22 00:48:36 +00:00
Bruce Evans 7ffe3d1c5d Oops, comment lines can't be indented either. 1997-10-21 10:39:27 +00:00
Bruce Evans 1bfc282680 Oops, comment lines can't be continued. 1997-10-21 10:36:07 +00:00
Bruce Evans 6e47de28bb Added -Wuninitialized to CWARNFLAGS. Warnings about uninitialialized
variables were lost when we removed -W, and 23 new ones including at
least one serious one have crept in for LINT.

Restored -Winline to CFLAGS.  This gives only 3 old warnings and 1 new
for LINT.
1997-10-21 06:53:24 +00:00
KATO Takenori ce22fd7cac Synchronize with sys/i386/conf/options.i386 revision 1.62. 1997-10-18 14:19:57 +00:00
Joerg Wunsch d37346eefb Make all the documented (in pcvt(4)) options supported options. While
i was at it, do no longer insist on `PCVT_FREEBSD' being declared in
the config file, but default it to a reasonable value.

More cleanup to follow, but this part is safe for RELENG_2_2, too.
1997-10-18 10:59:47 +00:00
Peter Wemm 829b5d5510 Don't doc PPP_BSDCOMP and PPP_DEFLATE twice. slight reorder so that the
options are not in the middle of the pseudo-device list.

Prompted by: bde
1997-10-18 10:10:36 +00:00
Peter Wemm 96be526ad0 Doc PPP_* options and add PPP_FILTER 1997-10-18 01:24:20 +00:00
Peter Wemm d41238de36 Convert PPP_FILTER to an option 1997-10-18 01:15:32 +00:00
Poul-Henning Kamp cec0f20ce7 VFS mega cleanup commit (x/N)
1.  Add new file "sys/kern/vfs_default.c" where default actions for
    VOPs go. Implement proper defaults for ABORTOP, BWRITE, LEASE,
    POLL, REVOKE and STRATEGY.  Various stuff spread over the entire
    tree belongs here.

2.  Change VOP_BLKATOFF to a normal function in cd9660.

3.  Kill VOP_BLKATOFF, VOP_TRUNCATE, VOP_VFREE, VOP_VALLOC.  These
    are private interface functions between UFS and the underlying
    storage manager layer (FFS/LFS/MFS/EXT2FS).  The functions now
    live in struct ufsmount instead.

4.  Remove a kludge of VOP_ functions in all filesystems, that did
    nothing but obscure the simplicity and break the expandability.
    If a filesystem doesn't implement VOP_FOO, it shouldn't have an
    entry for it in its vnops table.  The system will try to DTRT
    if it is not implemented.  There are still some cruft left, but
    the bulk of it is done.

5.  Fix another VCALL in vfs_cache.c (thanks Bruce!)
1997-10-16 10:50:27 +00:00
Mike Smith f88c134620 Mention that the Zip driver (vpo) requires SCSI disk support, and works
best with EPP 1.9 mode selected.
Submitted by:	Gianmarco Giovannelli <gmarco@giovannelli.it>
1997-10-15 07:35:48 +00:00
KATO Takenori c0cbbae78b Synchronize with sys/i386/conf/Makefile.i386 revision 1.268. 1997-10-12 12:00:23 +00:00
KATO Takenori e429a56a35 Synchronize with sys/i386/conf/options.i386 revision 1.61. 1997-10-12 11:59:43 +00:00
Joerg Wunsch 19d4b75dfe sppp(4) is now also a consumer of the kernel MD5 code. 1997-10-11 18:35:26 +00:00
Peter Wemm 98823b2366 Convert the VM86 option from a global option to an option only depended
on by the files that use it.  Changing the VM86 option now only causes
a recompile of a dozen files or so rather than the entire kernel.
1997-10-10 09:44:12 +00:00
KATO Takenori 6593be6011 Added two Cyrix 6x86/6x86MX options.
- CPU_CYRIX_NO_LOCK enables weak locking.  If this option is not set and
  FAILESAFE is defined, NO_LOCK bit of CCR1 is cleared.
- CPU_WT_ALLOC enables write-through allocation.
1997-10-06 08:08:41 +00:00
KATO Takenori b0db572e2d Commented out entries of Luigi's sound driver. The name `pcm' is
conflict with sys/isa/sound/pcm86.c.

Pointed out by:	Mitsuru IWASAKI <iwasaki@pc.jaring.my>
1997-09-24 16:41:18 +00:00
John Polstra 1a0eac8a9b Increment RELDATE so that it is possible to distinguish between the
incompatible old and new forms of mount(2).
1997-09-24 04:36:19 +00:00
Jordan K. Hubbard 8dd4744e1a Fix merge spam
Spotted by:	Alex Nash
1997-09-23 16:28:00 +00:00
Jordan K. Hubbard 0a648f6aad Reserve entry for CAN16-2 CAN-PC Interface
Submitted by:	Christoph Kukulies <kuku@gilberto.physik.RWTH-Aachen.DE>
1997-09-23 08:45:33 +00:00
Jordan K. Hubbard ab6e02da0f Be more explicit about one of IPFIREWALL's features. 1997-09-23 08:42:42 +00:00
Joerg Wunsch 6cce995019 Make MFS a supported option, finally. 1997-09-22 21:24:03 +00:00
KATO Takenori 727fd58620 Synchronize with sys/i386/conf/files.i386 revision 1.177. 1997-09-22 12:18:52 +00:00
Justin T. Gibbs 168bbc9927 Move the rules for aicasm to the MI conf file. 1997-09-21 21:34:31 +00:00
Justin T. Gibbs f2f9c18505 Move the rules for aicasm to the MI conf file.
Add kern/subr_autoconf.c as a standard file as it contains the bulk of
the code for performing interrupt driven configuration.
1997-09-21 21:32:04 +00:00
John Dyson e871e61fcf Addition of support of the slightly rogue Promise IDE interface(Dyson), support
of multiple PCI IDE controllers(Dyson), and some updates and cleanups from
John Hood, who originally made our IDE DMA stuff work :-).

I have run tests with 7 IDE drives connected to my system, all in DMA
mode, with no errors.  Modulo any bugs, this stuff makes IDE look
really good (within it's limitations.)

Submitted by:	John Hood <cgull@smoke.marlboro.vt.us>
1997-09-20 07:41:58 +00:00
KATO Takenori 55d994bfb5 Synchronize with sys/i386/conf/options.i386 and sys/i386/isa/sio.c
revisions 1.60 and 1.182, respectively.
1997-09-20 05:28:02 +00:00
John-Mark Gurney 6a796ce0a1 teach sio how to attach to isa PnP cards. This is mainly for use with
internal modems.  Currently detects a USR modem, and a couple Supra
modems...  vendor id's for sio capabile cards welcomed...

document new option EXTRA_SIO that will increase sio's internal data
structures to support X more serial ports...  these are used by the
PnP part of sio for attaching...  If you don't have it specified, it
will default to 2...  This is defaulted to 0 if you don't have PnP
compiled into your kernel...

also document that if you set the PnP flags (pnp x flags y) to 0x1 that
the modem will be refused to be recognized by the sio driver... this
is for people that want the traditional isa driver to probe and attach
the modem... (for keeping legacy sio numbering)
1997-09-19 15:25:49 +00:00
KATO Takenori 61fd9882c1 Synchronize with sys/i386/conf/options.i386 and sys/i386/isa/fd.c
revisions 1.59 and 1.101, respectively.
1997-09-17 08:01:07 +00:00
Joerg Wunsch 0cc12cc57e Make TCPDEBUG a new-style option. 1997-09-16 18:36:06 +00:00
Joerg Wunsch d2fb48929a Make FDC_DEBUG a supported option.
Hide the bogus FDC ``chip type'' display behind a (mostly) undocumented
option, since people started to trust the bogus claim.  Once we're going
to handle 2.88 MB controllers, we have to redo the chip detection, by
now just leave it hidden.
1997-09-16 07:45:45 +00:00
KATO Takenori b91a9de202 Synchronize with sys/i386/conf/files.i386 revision 1.176. 1997-09-15 04:00:32 +00:00
John-Mark Gurney c740608242 docment the new sound drivers in LINT and add the necessary files to
files.i386.

We aren't sure if this new code and the old sound code will co-exist in a
kernel, so the device pcm0 line is left commented out in LINT.

Submitted-by:	Luigi Rizzo
1997-09-14 21:45:05 +00:00
KATO Takenori eba56748e7 Synchronize with sys/i386/conf/files.i386 revision 1.175. 1997-09-10 08:05:46 +00:00
Peter Wemm ffdd472de7 Allow a compile-time override of the ipfw deny rule. For a 'firewall'
you don't want this (and the documentation explains why), but if you
use ipfw as an as-needed casual filter as needed which normally runs as
'allow all' then having the kernel and /sbin/ipfw get out of sync is a
*MAJOR* pain in the behind.

PR: 4141
Submitted by: Heikki Suonsivu <hsu@mail.clinet.fi>
1997-09-10 03:07:14 +00:00
John-Mark Gurney 53a7a570be add pnp device entries... 1997-09-09 12:40:54 +00:00
Bruce Evans a910e75cdc Removed vestiges of config-time "argument processing" configuration. 1997-09-07 13:49:56 +00:00
Bruce Evans 7128e3fc0a Removed more vestiges of config-time swap configuration. 1997-09-07 12:56:46 +00:00
KATO Takenori 7aa7e2b075 Synchronize with sys/i386/conf/options.1386 revision 1.58. 1997-09-05 10:18:16 +00:00
Kazutaka YOKOTA 297976f79f Add a new compile option SC_HISTORY_SIZE for syscons. 1997-09-04 23:03:11 +00:00
Søren Schmidt 1f7727a963 Upgrade of EIDE DMA support, Johns comments:
* lots of fixes to error handling-- mostly works now
* improve DMA timing config for Triton chipsets-- PIIX4 and UDMA drive
  still untested
* generally improve DMA config in many ways-- mostly cleanup
* clean up boot-time messages
* rewrite PRD generation algorithm
* first wd timeout is now longer, to handle drive spinup

Submitted by: John Hood <cgull@smoke.marlboro.vt.us>
1997-09-04 18:49:53 +00:00
KATO Takenori 47e05c0b61 Synchronize with sys/i386/conf/files.i386 revision 1.174. 1997-09-03 12:40:10 +00:00
Justin T. Gibbs c66dbc92d4 Make the aic7xxx sequencer assembler compile in the kernel's object
directory.  Rename (via repository copy) some files so that the potential
for future conflicts is minimized.

PR: conf/4363
1997-09-03 03:44:58 +00:00
KATO Takenori 17f8b8963b Synchronize with sys/i386/conf/options.i386 revision 1.57. 1997-09-01 10:41:04 +00:00
Bruce Evans 6d58e6cbc4 Fixed options SHOW_BUSYBUFS and PANIC_REBOOT_WAIT_TIME which were broken
by incomplete cutting and pasting from machdep.c to kern_shutdown.c.

PR:		3953
1997-08-31 23:08:38 +00:00
Bruce Evans f3086365a3 Put I*86_CPU options in opt_global.h and don't #include "opt_cpu.h"
centrally.
1997-08-31 22:43:46 +00:00
KATO Takenori 4c7bdfd64b Synchronize with sys/i386/conf/files.i386 and sys/i386/i386/trap.c
revisions 1.173 and 1.109, respectively.
1997-08-29 08:15:57 +00:00
Jonathan Lemon adeb9a12ce Document the VM86 option.
Reminded-by:	John-Mark Gurney
1997-08-28 15:00:05 +00:00
Jonathan Lemon 5f07393373 Remove the vm86 support as an LKM, and link it directly into the kernel
if 'options "VM86"' is in the config file.  The LKM was really for
development, and has probably outlived its usefulness.
1997-08-28 14:36:56 +00:00
KATO Takenori a1b442d74c Synchronize with sys/i386/conf/files.i386 and majors.i386 revisions
1.172 and 1.17, respectively.
1997-08-28 14:21:12 +00:00
Jordan K. Hubbard 3b577e1f2f Add entries for Comtrol Rocketport serial card.
Submitted by:	Amir Farah <amir@comtrol.com>
1997-08-28 12:18:09 +00:00
KATO Takenori 17c008220e Use existing path, even though PC-98 doesn't support each device driver. 1997-08-27 08:47:03 +00:00
Peter Wemm 9a3b3e8bce Clean up the SMP AP bootstrap and eliminate the wretched idle procs.
- We now have enough per-cpu idle context, the real idle loop has been
revived (cpu's halt now with nothing to do).
- Some preliminary support for running some operations outside the
global lock (eg: zeroing "free but not yet zeroed pages") is present
but appears to cause problems.  Off by default.
- the smp_active sysctl now behaves differently. It's merely a 'true/false'
option.  Setting smp_active to zero causes the AP's to halt in the idle
loop and stop scheduling processes.
- bootstrap is a lot safer.  Instead of sharing a statically compiled in
stack a number of times (which has caused lots of problems) and then
abandoning it, we use the idle context to boot the AP's directly.  This
should help >2 cpu support since the bootlock stuff was in doubt.
- print physical apic id in traps.. helps identify private pages getting
out of sync.  (You don't want to know how much hair I tore out with this!)

More cleanup to follow, this is more of a checkpoint than a
'finished' thing.
1997-08-26 18:10:38 +00:00
Peter Wemm 89327d27f7 Mention PPP_DEFLATE and PPP_BSDCOMP for kernel ppp. 1997-08-19 17:11:35 +00:00
Peter Wemm 13c497114e Use two NetBSD-style options (PPP_DEFLATE and PPP_BSDCOMP) to control
whether or not to compile the two ppp compression methods.
1997-08-19 17:05:26 +00:00
Peter Wemm 2d4b190bc5 Update kernel parts of pppd from 2.2.0 to 2.3.0. I've yet to look at the
2.3.0 -> 2.3.1 changes, but I seem to recall that there are certain
"issues" with 2.3.1 (I'm not sure if it's just pppd or the whole lot, I
am not quite that far).  The present pppd seems to work with it just fine
for the time being.

Among the changes are that zlib (aka LZ77 aka deflate aka gzip) compression
is implemented as well as the original compress(1) LZW style.
1997-08-19 14:10:50 +00:00
Garrett Wollman cee405ba27 Enable hostcache code. 1997-08-16 19:11:10 +00:00
Mike Smith 49975ec268 Assign character major 82 to the 'ppi' Generic Parallel Port I/O device. 1997-08-16 14:15:40 +00:00
Mike Smith 22531ffcef Add new ppbus files.
Submitted by:	Nicolas Souchu <Nicolas.Souchu@prism.uvsq.fr>
1997-08-16 14:06:05 +00:00
Mike Smith 22526298ad Oops, reference the ppi and vpo drivers properly. Obviously nobody's
using this stuff yet 8)
1997-08-16 12:21:23 +00:00
KATO Takenori e7e37fb1a0 Synchronize with sys/i386/conf/files.i386 revision 1.171. 1997-08-16 01:31:22 +00:00
Mike Smith ab4c624ba4 Add support for the new Parallel-Port Bus and devices thereon.
Submitted by:	Nicolas Souchu <Nicolas.Souchu@prism.uvsq.fr>
1997-08-14 14:03:27 +00:00
Mike Smith 1b16a0ddb8 Add parallel-Port Bus drivers.
Submitted by:	Nicolas Souchu <Nicolas.Souchu@prism.uvsq.fr>
1997-08-14 13:59:24 +00:00
Jordan K. Hubbard 56ed81f738 Reserve major 81 for rocketport driver. 1997-08-13 21:01:30 +00:00
KATO Takenori f791a51afe Synchronize with sys/i386/conf/options.i386 revision 1.55. 1997-08-09 01:58:50 +00:00
John Dyson b6a6d066a8 Add VM86 to the options. 1997-08-09 00:19:39 +00:00
John Dyson 3075778b63 Get rid of the ad-hoc memory allocator for vm_map_entries, in lieu of
a simple, clean zone type allocator.  This new allocator will also be
used for machine dependent pmap PV entries.
1997-08-05 00:02:08 +00:00
KATO Takenori bbd5c527aa Synchronize with sys/i386/conf/options.i386 revision 1.54. 1997-08-02 10:23:17 +00:00
KATO Takenori 7bb6fb1df2 Synchronize with sys/i386/conf/files.i386 revision 1.170. 1997-08-02 06:58:53 +00:00
KATO Takenori 0f3fdd504d Synchronize with sys/i386/conf/options.i386 revision 1.53. 1997-08-02 06:58:07 +00:00
Mike Smith 3476cdb9f4 Sanitise the Wavelan entries.
Submitted by:	bde
1997-08-02 05:20:14 +00:00
Mike Smith e2c77d8580 Add new BIOS-related files. 1997-08-01 06:04:34 +00:00
Mike Smith 36bdbe9431 New LINT comments and options for the Wavelan (wl) driver.
Submitted by:	Jim Binkley <jrb@cs.pdx.edu>
1997-08-01 03:33:08 +00:00
KATO Takenori 7ae53134ce Synchronize with sys/i386/conf/files.i386 and sys/i386/isa/wd.c
revisions 1.169 and 1.133, respectively.
1997-07-31 13:10:54 +00:00
Søren Schmidt 8b8a0b53b1 Add support for busmaster DMA on some PCI IDE chipsets.
I changed a few bits here and there, mainly renaming wd82371.c
to ide_pci.c now that it's supposed to handle different chipsets.

It runs on my P6 natoma board with two Maxtor drives, and also
on a Fujitsu machine I have at work with an Opti chipset and
a Quantum drive.

Submitted by:cgull@smoke.marlboro.vt.us <John Hood>

Original readme:

*** WARNING ***

This code has so far been tested on exactly one motherboard with two
identical drives known for their good DMA support.

This code, in the right circumstances, could corrupt data subtly,
silently, and invisibly, in much the same way that older PCI IDE
controllers do.  It's ALPHA-quality code; there's one or two major
gaps in my understanding of PCI IDE still.  Don't use this code on any
system with data that you care about; it's only good for hack boxes.
Expect that any data may be silently and randomly corrupted at any
moment.  It's a disk driver.  It has bugs.  Disk drivers with bugs
munch data.  It's a fact of life.

I also *STRONGLY* recommend getting a copy of your chipset's manual
and the ATA-2 or ATA-3 spec and making sure that timing modes on your
disk drives and IDE controller are being setup correctly by the BIOS--
because the driver makes only the lamest of attempts to do this just
now.

*** END WARNING ***

that said, i happen to think the code is working pretty well...

WHAT IT DOES:

this code adds support to the wd driver for bus mastering PCI IDE
controllers that follow the SFF-8038 standard.  (all the bus mastering
PCI IDE controllers i've seen so far do follow this standard.)  it
should provide busmastering on nearly any current P5 or P6 chipset,
specifically including any Intel chipset using one of the PIIX south
bridges-- this includes the '430FX, '430VX, '430HX, '430TX, '440LX,
and (i think) the Orion '450GX chipsets.  specific support is also
included for the VIA Apollo VP-1 chipset, as it appears in the
relabeled "HXPro" incarnation seen on cheap US$70 taiwanese
motherboards (that's what's in my development machine).  it works out
of the box on controllers that do DMA mode2; if my understanding is
correct, it'll probably work on Ultra-DMA33 controllers as well.
it'll probably work on busmastering IDE controllers in PCI slots, too,
but this is an area i am less sure about.

it cuts CPU usage considerably and improves drive performance
slightly.  usable numbers are difficult to come by with existing
benchmark tools, but experimentation on my K5-P90 system, with VIA
VP-1 chipset and Quantum Fireball 1080 drives, shows that disk i/o on
raw partitions imposes perhaps 5% cpu load.  cpu load during
filesystem i/o drops a lot, from near 100% to anywhere between 30% and
70%.  (the improvement may not be as large on an Intel chipset; from
what i can tell, the VIA VP-1 may not be very efficient with PCI I/O.)
disk performance improves by 5% or 10% with these drives.

real, visible, end-user performance improvement on a single user
machine is about nil. :) a kernel compile was sped up by a whole three
seconds.  it *does* feel a bit better-behaved when the system is
swapping heavily, but a better disk driver is not the fix for *that*
problem.

THE CODE:

this code is a patch to wd.c and wd82371.c, and associated header
files.  it should be considered alpha code; more work needs to be
done.

wd.c has fairly clean patches to add calls to busmaster code, as
implemented in wd82371.c and potentially elsewhere (one could imagine,
say, a Mac having a different DMA controller).

wd82371.c has been considerably reworked: the wddma interface that it
presents has been changed (expect more changes), many bugs have been
fixed, a new internal interface has been added for supporting
different chipsets, and the PCI probe has been considerably extended.

the interface between wd82371.c and wd.c is still fairly clean, but
i'm not sure it's in the right place.  there's a mess of issues around
ATA/ATAPI that need to be sorted out, including ATAPI support, CD-ROM
support, tape support, LS-120/Zip support, SFF-8038i DMA, UltraDMA,
PCI IDE controllers, bus probes, buggy controllers, controller timing
setup, drive timing setup, world peace and kitchen sinks.  whatever
happens with all this and however it gets partitioned, it is fairly
clear that wd.c needs some significant rework-- probably a complete
rewrite.

timing setup on disk controllers is something i've entirely punted on.
on my development machine, it appears that the BIOS does at least some
of the necessary timing setup.  i chose to restrict operation to
drives that are already configured for Mode4 PIO and Mode2 multiword
DMA, since the timing is essentially the same and many if not most
chipsets use the same control registers for DMA and PIO timing.

does anybody *know* whether BIOSes are required to do timing setup for
DMA modes on drives under their care?

error recovery is probably weak.  early on in development, i was
getting drive errors induced by bugs in the driver; i used these to
flush out the worst of the bugs in the driver's error handling, but
problems may remain.  i haven't got a drive with bad sectors i can
watch the driver flail on.

complaints about how wd82371.c has been reindented will be ignored
until the FreeBSD project has a real style policy, there is a
mechanism for individual authors to match it (indent flags or an emacs
c-mode or whatever), and it is enforced.  if i'm going to use a source
style i don't like, it would help if i could figure out what it *is*
(style(9) is about half of a policy), and a way to reasonably
duplicate it.  i ended up wasting a while trying to figure out what
the right thing to do was before deciding reformatting the whole thing
was the worst possible thing to do, except for all the other
possibilities.

i have maintained wd.c's indentation; that was not too hard,
fortunately.

TO INSTALL:

my dev box is freebsd 2.2.2 release.  fortunately, wd.c is a living
fossil, and has diverged very little recently.  included in this
tarball is a patch file, 'otherdiffs', for all files except wd82371.c,
my edited wd82371.c, a patch file, 'wd82371.c-diff-exact', against the
2.2.2 dist of 82371.c, and another patch file,
'wd82371.c-diff-whitespace', generated with diff -b (ignore
whitespace).  most of you not using 2.2.2 will probably have to use
this last patchfile with 'patch --ignore-whitespace'.  apply from the
kernel source tree root. as far as i can tell, this should apply
cleanly on anything from -current back to 2.2.2 and probably back to
2.2.0.  you, the kernel hacker, can figure out what to do from here.
if you need more specific directions, you probably should not be
experimenting with this code yet.

to enable DMA support, set flag 0x2000 for that drive in your config
file or in userconfig, as you would the 32-bit-PIO flag.  the driver
will then turn on DMA support if your drive and controller pass its
tests.  it's a bit picky, probably.  on discovering DMA mode failures
or disk errors or transfers that the DMA controller can't deal with,
the driver will fall back to PIO, so it is wise to setup the flags as
if PIO were still important.

'controller wdc0 at isa? port "IO_WD1" bio irq 14 flags 0xa0ffa0ff
vector wdintr' should work with nearly any PCI IDE controller.

i would *strongly* suggest booting single-user at first, and thrashing
the drive a bit while it's still mounted read-only.  this should be
fairly safe, even if the driver goes completely out to lunch.  it
might save you a reinstall.

one way to tell whether the driver is really using DMA is to check the
interrupt count during disk i/o with vmstat; DMA mode will add an
extremely low number of interrupts, as compared to even multi-sector
PIO.

boot -v will give you a copious register dump of timing-related info
on Intel and VIAtech chipsets, as well as PIO/DMA mode information on
all hard drives.  refer to your ATA and chipset documentation to
interpret these.

WHAT I'D LIKE FROM YOU and THINGS TO TEST:

reports.  success reports, failure reports, any kind of reports. :)
send them to cgull+ide@smoke.marlboro.vt.us.

i'd also like to see the kernel messages from various BIOSes (boot -v;
dmesg), along with info on the motherboard and BIOS on that machine.

i'm especially interested in reports on how this code works on the
various Intel chipsets, and whether the register dump works
correctly.  i'm also interested in hearing about other chipsets.

i'm especially interested in hearing success/failure reports for PCI
IDE controllers on cards, such as CMD's or Promise's new busmastering
IDE controllers.

UltraDMA-33 reports.

interoperation with ATAPI peripherals-- FreeBSD doesn't work with my
old Hitachi IDE CDROM, so i can't tell if I've broken anything. :)

i'd especially like to hear how the drive copes in DMA operation on
drives with bad sectors.  i haven't been able to find any such yet.

success/failure reports on older IDE drives with early support for DMA
modes-- those introduced between 1.5 and 3 years ago, typically
ranging from perhaps 400MB to 1.6GB.

failure reports on operation with more than one drive would be
appreciated.  the driver was developed with two drives on one
controller, the worst-case situation, and has been tested with one
drive on each controller, but you never know...

any reports of messages from the driver during normal operation,
especially "reverting to PIO mode", or "dmaverify odd vaddr or length"
(the DMA controller is strongly halfword oriented, and i'm curious to
know if any FreeBSD usage actually needs misaligned transfers).

performance reports.  beware that bonnie's CPU usage reporting is
useless for IDE drives; the best test i've found has been to run a
program that runs a spin loop at an idle priority and reports how many
iterations it manages, and even that sometimes produces numbers i
don't believe.  performance reports of multi-drive operation are
especially interesting; my system cannot sustain full throughput on
two drives on separate controllers, but that may just be a lame
motherboard.

THINGS I'M STILL MISSING CLUE ON:

* who's responsible for configuring DMA timing modes on IDE drives?
the BIOS or the driver?

* is there a spec for dealing with Ultra-DMA extensions?

* are there any chipsets or with bugs relating to DMA transfer that
should be blacklisted?

* are there any ATA interfaces that use some other kind of DMA
controller in conjunction with standard ATA protocol?

FINAL NOTE:

after having looked at the ATA-3 spec, all i can say is, "it's ugly".
*especially* electrically.  the IDE bus is best modeled as an
unterminated transmission line, these days.

for maximum reliability, keep your IDE cables as short as possible and
as few as possible.  from what i can tell, most current chipsets have
both IDE ports wired into a single buss, to a greater or lesser
degree.  using two cables means you double the length of this bus.

SCSI may have its warts, but at least the basic analog design of the
bus is still somewhat reasonable.  IDE passed beyond the veil two
years ago.

  --John Hood, cgull@smoke.marlboro.vt.us
1997-07-29 12:57:25 +00:00
KATO Takenori 2f2a1f2613 Synchronize with sys/i386/conf/options.i386 revision 1.52. 1997-07-26 13:53:27 +00:00
Steve Passe 25717e9980 Removed "options SMP_TIMER_NC". 1997-07-26 01:46:03 +00:00
KATO Takenori 94a95fad51 Synchronize with sys/i386/conf/options.i386 revision 1.51. 1997-07-26 01:35:14 +00:00
KATO Takenori 4b73f65291 Synchronize with sys/i386/conf/files.i386 revision 1.168. 1997-07-26 01:34:33 +00:00