aboutsummaryrefslogtreecommitdiff
path: root/sys/doc
diff options
context:
space:
mode:
authorsvn2git <svn2git@FreeBSD.org>1994-07-01 08:00:00 +0000
committersvn2git <svn2git@FreeBSD.org>1994-07-01 08:00:00 +0000
commit5e0e9b99dc3fc0ecd49d929db0d57c784b66f481 (patch)
treee779b5a6edddbb949b7990751b12d6f25304ba86 /sys/doc
parenta16f65c7d117419bd266c28a1901ef129a337569 (diff)
This commit was manufactured to restore the state of the 1.1.5.1-RELEASE image. Releases prior to 5.3-RELEASE are omitting the secure/ and crypto/ subdirs.
Diffstat (limited to 'sys/doc')
-rw-r--r--sys/doc/Changes277
-rw-r--r--sys/doc/Makefile19
-rw-r--r--sys/doc/ata/ata-145
-rw-r--r--sys/doc/ata/ata-10213
-rw-r--r--sys/doc/ata/ata-11201
-rw-r--r--sys/doc/ata/ata-24
-rw-r--r--sys/doc/ata/ata-327
-rw-r--r--sys/doc/ata/ata-459
-rw-r--r--sys/doc/ata/ata-5189
-rw-r--r--sys/doc/ata/ata-6337
-rw-r--r--sys/doc/ata/ata-7321
-rw-r--r--sys/doc/ata/ata-8143
-rw-r--r--sys/doc/ata/ata-9721
-rw-r--r--sys/doc/ata/ata-apx426
-rw-r--r--sys/doc/ata/ata-prt174
-rw-r--r--sys/doc/ata/ata-toc159
-rw-r--r--sys/doc/ed.relnotes174
-rw-r--r--sys/doc/memory-test.doc40
-rw-r--r--sys/doc/options.doc682
-rw-r--r--sys/doc/options.texi1074
-rw-r--r--sys/doc/seagate.doc125
-rw-r--r--sys/doc/sound.doc80
-rw-r--r--sys/doc/vm_layout.doc32
-rw-r--r--sys/doc/wt.doc77
24 files changed, 5599 insertions, 0 deletions
diff --git a/sys/doc/Changes b/sys/doc/Changes
new file mode 100644
index 000000000000..685f1f3173b5
--- /dev/null
+++ b/sys/doc/Changes
@@ -0,0 +1,277 @@
+Hello, Emacs, this is an -*- Indented-Text -*- file!
+
+$Id: Changes,v 1.5 1994/04/20 19:22:38 wollman Exp $
+
+This file is intended to keep track of important kernel and user
+changes in FreeBSD between releases. Entries are in reverse
+chronological order; userids can be decoded with the chart at the end
+of this file.
+
+---------------
+Since 1.1 BETA:
+---------------
+
+- I/O clustering is implemented for all block devices. This should
+ substantially improve the performance of disk drives which don't
+ have write-behind caches, especially on IDE drives. (dyson/davidg)
+
+- Allow mbufs to point to other ``external'' objects than just
+ clusters, and add in performance enhancements for NFS from Yuval
+ Yarom. (davidg)
+
+- Yet more VM system improvements. (dyson/davidg)
+ o 4-MB systems should now spend substantially less time in the VM
+ system.
+ o General cleanup and some portability fixes.
+ o A new system process is now responsible for keeping page
+ statistics, rather than making the pagedaemon do it, which was
+ getting impractical. Performance is improved on small-memory
+ machines.
+ o Process resource usage counters are now properly updated for
+ faults and swaps.
+
+- Fixed bugs in truncating mapped files. (dyson/davidg)
+
+- A new version of the interrupt-handler glue code has been added, which
+ is faster and architecturally cleaner than the previous version. The
+ beginnings of better profiling support have also been added. (bde/davidg)
+
+- This file moved from /sys/i386/doc to /sys/doc. (wollman)
+
+- Bounce buffers have been implemented for ISA devices which use
+ DMA (although not all devices can make use of it yet). (davidg/dyson)
+
+- The set*id() functions have been changed (wollman):
+ o A significant security hole involving the POSIX saved uid and gid
+ has been plugged.
+ o The setreuid() and setregid() functions now never change the real
+ ID, but rather only ensure that you will be able to change the
+ EFFECTIVE ID back to what you specified as a real ID. This change
+ breaks the setruid() and setrgid() functions, which were a bad
+ idea in a POSIX environment anyway. Logic taken from 4.4BSD.
+ o The SUGID process flag bit has been implemented as in 4.4, and the
+ `ps' program modified to print it out.
+
+- The scheduling algorithm has been changed to penalize
+ processes that fork a lot, like `make', which should enhance
+ interactive performance during such operations significantly.
+ (davidg/dyson)
+
+- MCLBYTES is now 4096, so each mbuf cluster is given a whole page, in
+ preparation for page flipping. (davidg/dyson)
+
+- More VM system improvements (dyson/davidg):
+ o Pre-faulting of initial pages on process startup and mmap (faster
+ than starting and immediately taking a fault).
+ o Even more efficient physical map (pmap) code.
+ o Pageouts are now clustered, similar to pagein clustering in 1.1.
+ o The pageout code is more efficient and keeps better statistics.
+ o The procfs can now provide more information from the VM system.
+ o Some pager bugs have been fixed.
+
+- Improved IP checksum and bzero routines. (bde/dyson)
+
+- The Mitsumi CD-ROM driver is more careful about recognizing Ethernet
+ cards as CD-ROMs. (jkh)
+
+- `struct tty's now allocated dynamically, and ring buffers can be
+ deallocated. (guido)
+
+
+---------------------------
+Between 1.1 BETA and 1.0.2:
+---------------------------
+
+- QIC-40 and QIC-80 tapes are now supported, using the `ft' driver
+ from Jim Babb. (alm/nate)
+
+- Improved lpt driver, should no longer lock up when lprm is done on
+ an active job. Fixed up the probe routine so that it works on most
+ if not all printers now. (csgr/rgrimes)
+
+- Substantial changes to system configuration; you MUST re-build
+ `config' before attempting to build a 1.1 kernel. (nate/martin)
+
+- Improved the quality of the information given to the user when
+ a fatal trap occurs. (davidg)
+
+- Added support in the if_ed driver for the WD8013W, WD8003W, and
+ WD8003EB. (davidg)
+
+- Change to generic console code to eliminate console hangs with all
+ `pc' consoles. (davidg)
+
+- Upgrade to new version of syscons which handles the `hanging console'
+ problem and adds some new features and code cleanup. (nate)
+
+- Various TCP bugs fixed - don't forward loopback packets; Nagel
+ congestion avoidence - immediately ack small packets. (davidg)
+
+- TCP debugging code is now truly optional, thus reducing kernel size
+ when it is disabled (the default). (davidg)
+
+- Because the `sio' FIFOs are now configurable, the `com' driver is no
+ longer supported. (team sighs with relief)
+
+- Performance and stylistic improvements to the `sio' serial driver.
+ Probe code now works somewhat better for oddball devices. The 16550
+ FIFO length is now configurable using `flags' in the config
+ declaration. (ache/bde)
+
+- Performance improvements and complete implementation of POSIX VMIN
+ and VTIME for the generic TTY code. (ache/bde)
+
+- Crash dumps on SCSI disks now work and are standard. (rgrimes/davidg)
+
+- QMAGIC is now the official default executable format. (davidg)
+
+- Network booting is now supported, as is booting from DOS. (martin)
+
+- Local LDTs are now supported for WINE (based on work by John Brezak).
+ (hsu/davidg)
+
+- DDB will now print symbolic arguments and line numbers in
+ backtraces (from John Brezak). (davidg)
+
+- Added four pattern memory test to eliminate problems with buggy
+ chipsets that incorrectly map memory, and to find problems with
+ defective memory. The memory sizing code has been improved to
+ further eliminate problems with buggy chipsets/BIOSs. (davidg)
+
+- USE_486_WRITE_PROTECT is now gone; the system will automatically
+ detect 486 CPUs and behave accordingly. (davidg)
+
+- Added SysV IPC, messaging, and semaphore code by Danny Boulet.
+ (hsu/davidg)
+
+- Because of the VM system changes, Paul Kranenburg's process
+ filesystem is now MANDATORY in order for `ps' and friends to be able
+ to dig up process information which has been paged out. (davidg)
+
+- Substantial VM system improvements: (dyson/davidg)
+ o FreeBSD once again works on 4-MB machines.
+ o Maximum and default size limits set to reasonable values.
+ o The user area is now in the process address space, and can
+ now be paged out along with the rest of the process.
+ o Process page tables can now be paged out.
+ o The physical map (pmap) module has been mostly rewritten for
+ efficiency, and is considerably faster than it used to be.
+ o The pageout system now actually implements modified LRU.
+ o Process RSS soft limits implemented. Hooks are in place for
+ RSS hard limits.
+ o Pagers can now do multiple-page operations ("page fault
+ clustering"), and page fault read behind and read ahead
+ have been implemented to take advantage of this.
+ o The vnode pager no longer drags pages through the buffer
+ cache, eliminating an expensive memory copy and flushing
+ of cached data.
+ o When the system runs out of swap space, the faulting process
+ is killed off (with a message to syslog); the old code would
+ just deadlock.
+ o Swap space allocation is much more efficient, and swap
+ striping actually works now. It's now possible for every
+ last block of swap space to be used before the systems runs
+ out.
+ o The pagedaemon's algorithms are considerably improved, thus
+ reducing the amount of CPU time used by the pagedaemon.
+ o All kernels MUST now load at virtual address 0xf010000, and
+ the lower 640k is reclaimed for system use. This removes
+ the 640K kernel size limit.
+ o VM object cache size is now dynamic and a function of the
+ kernel `maxusers' parameter.
+ o Memory in the I/O hole is explicitly marked non-cacheable.
+
+- Added 3C509 driver written by Herb Peyerl. (ats/nate)
+
+- Added a new `wd' driver which does a much better job of probing, handles
+ stray interrupts better, and supports multiple controllers. In addition
+ this driver supports DOS partitions much better and conforms to ATA specs
+ much better. NB: configuration lines for this driver are different
+ than those for pervious versions; see a GENERIC for details.
+ (nate/bde/guido)
+
+- Added support in the if_ed driver for the Toshiba ethernet cards.The
+ support must be enabled with an "options TOSH_ETHER" in the config
+ file. Done it this way, because I don't know how widespread the cards
+ are. (ats)
+
+- Added support in the if_ed driver for the SMC Ultra via patches from
+ Glen Lowe. (davidg)
+
+- Updated Mitsumi CD driver to work with FX models. (jkh/Gary
+ Clark II)
+
+- Add extended formats set to floppy driver, improve autoconfiguration,
+ add "fdformat" utility for floppy formatting.
+ The format of floppy disk minor numbers has changed, thus
+ necessitating a new `MAKEDEV fd'. (ache/joerg/Serge Vakulenko)
+
+- Add XNTPD to contrib section, and (un-compilable) kernel support for
+ same to /sys/kern. (wollman)
+
+- Use linker-constructed sets to initialize certain system tables
+ rather than manually enumerating all the options in the source files.
+ This makes certain pseudo-devices and all image activators drop-in at
+ link time, if desired. (wollman)
+
+- Added YP code from Theo Deraadt. (paul/nate)
+
+- Make all mandatory options ``standard''. (wollman)
+
+- Update `wt' driver to support more devices and controllers. The
+ driver will also auto-detect tape density on models which support
+ it. The structure of `wt' device minor numbers has changed;
+ `MAKEDEV wt' must be run to create the new device nodes.
+
+- Re-design execve() system call to allow for multiple ``image activators''
+ which recognize and load various file formats. Currently only
+ a.out and interpreted formats are recognized. (davidg)
+
+- Provide the address of the faulting reference to signal handlers, to
+ make life easier for smart garbage-collection algorithms. (hsu)
+
+- New, improved process tracing code from Sean Eric Fagan. (davidg)
+
+- Re-organize locore into several different source files according to
+ function. (davidg)
+
+- On panic, don't reboot right away but give the user some time to
+ abort the reboot or at least write down the panic message. (davidg)
+
+- Kernel timezone handling is now delegated to an external program,
+ `adjkerntz'. No more bogus summer time jumps. (ache)
+
+- Separate all IP-related variables that users might want to modify into
+ netinet/in_var.c. (wollman)
+
+- New, redesigned SCSI system; should run faster and have fewer bugs.
+ (julian)
+
+- Make it possible to mmap(2) /dev/mem. (julian)
+
+
+-----------------------
+Userids map as follows:
+-----------------------
+ache Andrew Chernov
+alm Andrew Moore
+ats Andreas Schulz
+chmr Christoph Robitscho
+csgr Geoff Rehmet
+davidg David Greenman
+dyson John Dyson
+guido Guido van Rooij
+hsu Jeffrey Hsu
+jkh Jordan Hubbard
+joerg Joerg Wunsch
+jtc J.T. Conklin
+ljo L. Jonas Olson
+martin Martin Renters
+nate Nate Williams
+paul Paul Richards
+proven Chris Provenzano
+rich Rich Murphey
+rls Rob Shady
+smace Scott Mace
+swallace Steven Wallace
+wollman Garrett Wollman
diff --git a/sys/doc/Makefile b/sys/doc/Makefile
new file mode 100644
index 000000000000..78e3021c3831
--- /dev/null
+++ b/sys/doc/Makefile
@@ -0,0 +1,19 @@
+# $Id: Makefile,v 1.1 1994/03/30 20:36:32 wollman Exp $
+#
+# Makefile for /sys/i386/doc
+# This creates options.info and options.doc from options.texi, if the
+# GNU makeinfo program is present, and fails miserably otherwise.
+#
+
+all: options.info options.doc
+
+options.info: options.texi
+ makeinfo options.texi
+
+options.doc: options.texi
+ makeinfo -o options.doc+ --no-headers options.texi
+ sed '/^General Index/,$$d' < options.doc+ > options.doc
+ rm -f options.doc+
+
+clean:
+ rm -f options.info options.doc options.doc+
diff --git a/sys/doc/ata/ata-1 b/sys/doc/ata/ata-1
new file mode 100644
index 000000000000..5486217b026b
--- /dev/null
+++ b/sys/doc/ata/ata-1
@@ -0,0 +1,45 @@
+ Information Processing Systems --
+
+ Common Access Method --
+
+ AT Attachment
+
+
+1. Scope
+
+This standard defines the CAM (Common Access Method) AT Attachment.
+
+The CAM Committee was formed in October, 1988 and the first working document
+of the AT Attachment was introduced in March, 1989.
+
+1.1 Description of Clauses
+
+Clause 1 contains the Scope and Purpose.
+
+Clause 2 contains Referenced and Related International Standards.
+
+Clause 3 contains the General Description.
+
+Clause 4 contains the Glossary.
+
+Clause 5 contains the electrical and mechanical characteristics; covering
+the interface cabling requirements of the DC, data cables and connectors.
+
+Clause 6 contains the signal descriptions of the AT Attachment interface.
+
+Clause 7 contains descriptions of the registers of the AT Attachment
+interface.
+
+Clause 8 describes the programming requirements of the AT Attachment
+interface.
+
+Clause 9 contains descriptions of the commands of the AT Attachment interface.
+
+Clause 10 contains an overview of the protocol of the AT Attachment interface.
+
+Clause 11 contains the interface timing diagrams.
+
+Annex A is informative.
+
+Annex B is informative.
+
diff --git a/sys/doc/ata/ata-10 b/sys/doc/ata/ata-10
new file mode 100644
index 000000000000..f4c0336944d4
--- /dev/null
+++ b/sys/doc/ata/ata-10
@@ -0,0 +1,213 @@
+10. Protocol Overview
+
+Commands can be grouped into different classes according to the protocols
+followed for command execution. The command classes with their associated
+protocols are defined below.
+
+For all commands, the host first checks if BSY=1, and should proceed no
+further unless and until BSY=0. For most commands, the host will also wait for
+DRDY=1 before proceeding. Those commands shown with DRDY=x can be executed
+when DRDY=0.
+
+Data transfers may be accomplished in more ways than are described below, but
+these sequences should work with all known implementations of ATA drives.
+
+10.1 PIO Data In Commands
+
+This class includes:
+
+ - Identify Drive
+ - Read Buffer
+ - Read Long
+ - Read Sector(s)
+
+Execution includes the transfer of one or more 512 byte (>512 bytes on Read
+Long) sectors of data from the drive to the host.
+
+ a) The host writes any required parameters to the Features, Sector Count,
+ Sector Number, Cylinder and Drive/Head registers.
+ b) The host writes the command code to the Command Register.
+ c) The drive sets BSY and prepares for data transfer.
+ d) When a sector of data is available, the drive sets DRQ and clears BSY
+ prior to asserting INTRQ.
+ e) After detecting INTRQ, the host reads the Status Register, then reads one
+ sector of data via the Data Register. In response to the Status Register
+ being read, the drive negates INTRQ.
+ f) The drive clears DRQ. If transfer of another sector is required, the drive
+ also sets BSY and the above sequence is repeated from d).
+
+10.1.1 PIO Read Command
+
+ +- a) -+-- b) -+ +- e) -+--------+ +- e) -+--------+
+ |Setup | Issue | | Read |Transfer| | Read |Transfer|
+ | |Command| |Status| Data |:::::::|Status| Data |
+ +------+-------+ +------+--------+ +------+--------+
+ |BSY=0 | |BSY=1 |BSY=0 | |BSY=1 |BSY=0 | |BSY=1
+ |DRDY=1 | | | | | |
+ |DRQ=1 | |DRQ=0 |DRQ=1 | |DRQ=0
+ |Assert|Negate | |Assert|Negate
+ INTRQ INTRQ INTRQ INTRQ
+
+If Error Status is presented, the drive is prepared to transfer data, and it
+is at the host's discretion that the data is transferred.
+
+10.1.2 PIO Read Aborted Command
+
+ +- a) -+-- b) -+ +- e) -+
+ |Setup | Issue | | Read |
+ | |Command| |Status|
+ +------+-------+ +------+
+ |BSY=0 | |BSY=1 |BSY=0 |
+ |DRDY=1 | |
+ |DRQ=1 |DRQ=0
+ |Assert|Negate
+ INTRQ INTRQ
+
+Although DRQ=1, there is no data to be transferred under this condition.
+
+10.2 PIO Data Out Commands
+
+This class includes:
+
+ - Format
+ - Write Buffer
+ - Write Long
+ - Write Sector(s)
+
+Execution includes the transfer of one or more 512 byte (>512 bytes on Write
+Long) sectors of data from the drive to the host.
+
+ a) The host writes any required parameters to the Features, Sector Count,
+ Sector Number, Cylinder and Drive/Head registers.
+ b) The host writes the command code to the Command Register.
+ c) The drive sets DRQ when it is ready to accept the first sector of data.
+ d) The host writes one sector of data via the Data Register.
+ e) The drive clears DRQ and sets BSY.
+ f) When the drive has completed processing of the sector, it clears BSY and
+ asserts INTRQ. If transfer of another sector is required, the drive also
+ sets DRQ.
+ g) After detecting INTRQ, the host reads the Status Register.
+ h) The drive clears the interrupt.
+ i) If transfer of another sector is required, the above sequence is repeated
+ from d).
+
+10.2.1 PIO Write Command
+
+ +- a) -+-- b) -+ +--------+ +- e) -+--------+ +- e) -+
+ |Setup | Issue | |Transfer| | Read |Transfer| | Read |
+ | |Command| | Data | |Status| Data |:::::::|Status|
+ +------+-------+ +--------+ +------+--------+ +------+
+ |BSY=0 | |BSY=1 |BSY=0 |BSY=1 |BSY=0 | |BSY=1 |BSY=0 |
+ |DRDY=1 | | | | | | |
+ |DRQ=1 |DRQ=0 |DRQ=1 | |DRQ=0 | |
+ | | |Assert|Negate | |Assert|Negate
+ INTRQ INTRQ INTRQ INTRQ
+
+10.2.2 PIO Write Aborted Command
+
+ +- a) -+-- b) -+ +- e) -+
+ |Setup | Issue | | Read |
+ | |Command| |Status|
+ +------+-------+ +------+
+ |BSY=0 | |BSY=1 |BSY=0 |
+ |DRDY=1 | |
+ | |Assert|Negate
+ INTRQ INTRQ
+
+10.3 Non-Data Commands
+
+This class includes:
+
+ - Execute Drive Diagnostic (DRDY=x)
+ - Idle
+ - Initialize Drive Parameters (DRDY=x)
+ - Read Power Mode
+ - Read Verify Sector(s)
+ - Recalibrate
+ - Seek
+ - Set Features
+ - Set Multiple Mode
+ - Standby
+
+Execution of these commands involves no data transfer.
+
+ a) The host writes any required parameters to the Features, Sector Count,
+ Sector Number, Cylinder and Drive/Head registers.
+ b) The host writes the command code to the Command Register.
+ c) The drive sets BSY.
+ d) When the drive has completed processing, it clears BSY and asserts INTRQ.
+ g) The host reads the Status Register.
+ h) The drive negates INTRQ.
+
+10.4 Miscellaneous Commands
+
+This class includes:
+
+ - Read Multiple
+ - Sleep
+ - Write Multiple
+ - Write Same
+
+The protocol for these commands is contained in the individual command
+descriptions.
+
+10.5 DMA Data Transfer Commands (Optional)
+
+This class comprises:
+
+ - Read DMA
+ - Write DMA
+
+Data transfers using DMA commands differ in two ways from PIO transfers:
+
+ - data transfers are performed using the slave-DMA channel
+ - no intermediate sector interrupts are issued on multi-sector commands
+
+Initiation of the DMA transfer commands is identical to the Read Sector or
+Write Sector commands except that the host initializes the slave-DMA channel
+prior to issuing the command.
+
+The interrupt handler for DMA transfers is different in that:
+
+ - no intermediate sector interrupts are issued on multi-sector commands
+ - the host resets the DMA channel prior to reading status from the drive.
+
+The DMA protocol allows high performance multi-tasking operating systems to
+eliminate processor overhead associated with PIO transfers.
+
+ a) Command Phase
+ 1) Host initializes the slave-DMA channel
+ 2) Host updates the Command Block Registers
+ 3) Host writes command code to the Command Register
+ b) Data Phase - the register contents are not valid during a DMA Data Phase.
+ 1) The slave-DMA channel qualifies data transfers to and from the drive
+ with DMARQ
+ c) Status Phase
+ 1) Drive generates the interrupt to the host
+ 2) Host resets the slave-DMA channel
+ 3) Host reads the Status Register and Error Register
+
+10.5.1 Normal DMA Transfer
+
+ +--------------+-------+ +---------------------+ +---------+------+
+ |Initialize DMA|Command| | DMA Data Transfer | |Reset DMA|Status|
+ +--------------+-------+ +---------------------+ +---------+------+
+ |BSY=0 |BSY=1 |BSY=x |BSY=1 |BSY=0
+ |DRQ=x |nIEN=0
+
+10.5.2 Aborted DMA Transfer
+
+ +--------------+-------+ +-------------+ +---------+------+
+ |Initialize DMA|Command| | DMA Data | |Reset DMA|Status|
+ +--------------+-------+ +-------------+ +---------+------+
+ |BSY=0 |BSY=1 |BSY=x |BSY=1 |BSY=0
+ |DRQ=1 |nIEN=0
+
+10.5.3 Aborted DMA Command
+
+ +--------------+-------+ +---------+------+
+ |Initialize DMA|Command| |Reset DMA|Status|
+ +--------------+-------+ +---------+------+
+ |BSY=0 |BSY=1 |BSY=1 |BSY=0
+ |nIEN=0
+
diff --git a/sys/doc/ata/ata-11 b/sys/doc/ata/ata-11
new file mode 100644
index 000000000000..bba6a1073cc8
--- /dev/null
+++ b/sys/doc/ata/ata-11
@@ -0,0 +1,201 @@
+11. Timing
+
+11.1 Deskewing
+
+The host shall provide cable deskewing for all signals originating from the
+controller. The drive shall provide cable deskewing for all signals
+originating at the host.
+
+11.2 Symbols
+
+Certain symbols are used in the timing diagrams. These symbols and their
+respective definitions are listed below.
+
+ / or \ - signal transition (asserted or negated) *
+ < or > - data transition (asserted or negated)
+ XXXXXX - undefined but not necessarily released
+ . . . - the "other" condition if a signal is shown with no change
+ #n - used to number the sequence in which events occur e.g. #a, #b
+ _ _ __
+__/_ _/ - a degree of uncertainty as to when a signal may be asserted
+
+__ _ _
+ \_ _\__ - a degree of uncertainty as to when a signal may be negated
+
+.. T - Nominal Clock Period
+..
+ * All signals are shown with the Asserted condition facing to the top of
+ the page. The negated condition is shown towards the bottom of the page
+ relative to the asserted condition.
+
+..Within each figure the timing terms i.e. tA, tB etc are repeated. There is
+..no continuity of definition of tA from one figure to another.
+..
+11.3 Terms
+
+The interface uses a mixture of negative and positive signals for control and
+data. The terms asserted and negated are used for consistency and are
+independent of electrical characteristics.
+
+In all timing diagrams, the lower line indicates negated, and the upper line
+indicates asserted e.g. the following illustrates the representation of a
+signal named TEST going from negated to asserted and back to negated, based on
+the polarity of the signal.
+
+ Assert Negate
+ | |
+ Bit Setting=1 |__________|
+ Bit Setting=0 TEST _____/ \_______
+
+ Assert Negate
+ | |
+ Bit Setting=0 |__________|
+ Bit Setting=1 TEST- _____/ \_______
+
+.. Processor I/O Write, 16 Bit:
+11.4 Data Transfers
+
+Figure 11-1 defines the relationships between the interface signals for both
+16-bit and 8-bit data transfers.
+
+ |<------------ t0 -------------------->|
+ __________________________________________ |
+ Address Valid *1 ...../ \________
+ |<-t1->| ->| t9 |<-
+ ->|t7|<- |<----------- t2 ------------->| ->|t8|<-
+ | | |______________________________| | |_____
+ DIOR-/DIOW- ____________/ \_______/
+ | | |_ _ _ _ _ _ _ _ _ _ _____________ |
+ Write Data Valid *2__________/_ _ _ _ _ _ _ _ _ _/ \__________
+ | | | |<--t3---->| |
+ | | | ->|t4|<- |
+ | | |_ _ _ _ _ _ _ _ _ _ _ ___________ |
+ Read Data Valid *2__________/_ _ _ _ _ _ _ _ _ _ _/ | \__________
+ | | | |<--t5-->| | |
+ | | | ->|t6|<- |
+ | | | | | |
+ | |__________________________________________|
+ IOCS16- ________/ \_____
+
+ *1 Drive Address consists of signals CS1FX-, CS3FX- and DA2-0
+ *2 Data consists of DD0-15 (16-bit) or DD0-7 (8-bit)
+
+ +------------------------------------------+-------+-------+-------+
+ | PIO | Mode 0| Mode 1| Mode 2|
+ | Timing Parameters | nsec | nsec | nsec |
+ +----+------------------------------------------+-------+-------+-------+
+ | t0 | Cycle Time (Min) | 600 | 383 | 240 |
+ | t1 | Address Valid to DIOR-/DIOW- Setup (Min) | 70 | 50 | 30 |
+ | t2 | DIOR-/DIOW- 16-bit (Min) | 165 | 125 | 100 |
+ | | Pulse Width 8-bit (Min) | 290 | 290 | 290 |
+ | t3 | DIOW- Data Setup (Min) | 60 | 45 | 30 |
+ | t4 | DIOW- Data Hold (Min) | 30 | 20 | 15 |
+ | t5 | DIOR- Data Setup (Min) | 50 | 35 | 20 |
+ | t6 | DIOR- Data Hold (Min) | 5 | 5 | 5 |
+ | t7 | Addr Valid to IOCS16- Assertion (Max) | 90 | 50 | 40 |
+ | t8 | Addr Valid to IOCS16- Negation (Max) | 60 | 45 | 30 |
+ | t9 | DIOR-/DIOW- to Address Valid Hold (Min) | 20 | 15 | 10 |
+ +----+------------------------------------------+-------+-------+-------+
+..rm102
+.. NOTE: These are minimum acceptable interface timing requirements.
+
+ FIGURE 11-1: PIO DATA TRANSFER TO/FROM DRIVE
+
+ ___________________________________
+ DIOR-/DIOW- __________/ \______________
+ |
+ |<- tA ->|<--- tB ---->|
+ ___________________| |_____________________
+ IORDY \___________________/
+
+ Label Description Min Max Units
+
+ tA IORDY Setup time - 35 nsecs
+ tB IORDY Pulse Width - 1,250 nsecs
+
+ WARNING: The use of IORDY for data transfers is a system integration issue
+ which requires control of both ends of the cable.
+
+ FIGURE 11-2: IORDY TIMING REQUIRMENTS
+
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+ |<----------------------- t0 ---------------------->|
+ ____________ _______
+ DMARQ ___/ \______________________________________/ |
+ |<- tC ->| |
+ |_____________________________________________ |___
+ DMACK- _______/ \_____/
+ |<--- tI --->|________________|<----- tJ -----| |
+ DIOR-/DIOW- ____________________/ \_________________________
+ | | | |
+ | |<------ tD ---->| |
+ Read | ______________ |
+ DD0-15 -------------------------------<______________>----------------
+ | |<-- tE -->| |<- tF ->| |
+ Write | _________________________ |
+ DD0-15 --------------------------<_________________________>-----------
+ | | | | |
+ | |<-- tG -->|<-- tH -->| |
+
+ +----------------------------------+-------+-------+-------+
+ | DMA | Mode 0| Mode 1| Mode 2|
+ | Timing Parameters | nsec | nsec | nsec |
+ +----+----------------------------------+-------+-------+-------+
+ | t0 | Cycle Time (Min) | 960 | 480 | 240 |
+ | tC | DMACK to DMREQ Delay (Max) | 200 | 100 | 80 |
+ | tD | DIOR-/DIOW- 16-bit (Min) | 480 | 240 | 120 |
+ | tE | DIOR- Data Setup (Min) | 250 | 150 | 50 |
+ | tF | DIOR- Data Hold (Min) | 5 | 5 | 5 |
+ | tG | DIOW- Data Setup (Min) | 250 | 100 | 35 |
+ | tH | DIOW- Data Hold (Min) | 50 | 30 | 20 |
+ | tI | DMACK to DIOR-/DIOW- Setup (Min) | 0 | 0 | 0 |
+ | tJ | DIOR-/DIOW- to DMACK Hold (Min) | 0 | 0 | 0 |
+ +----+----------------------------------+-------+-------+-------+
+
+ FIGURE 11-3: DMA DATA TRANSFER
+
+11.5 Power On and Hard Reset
+
+ ______
+ RESET- _____/ \_____________________________________________________
+ |<-tM->|
+ | | Drive 0
+ _ _ _ _ _ _ _ _______ _ _ _ _ _ _ _ _ _ _ _ _ _|
+ BSY _ _ _ _ _ _ _/ \_ _ _ _ _ *1 _ _ _ _ _ _\________________
+ ->|tN|<-
+ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
+ DASP- _ _ _ _ _ _ _ _\_______/_ _ _ _ *2 _ _ _ _ _ _ _ _ _ _\=== *3 ==
+ ->| tP |<- | |_ _ _ __________
+ Control Registers_______________________________________/_ _ _ /
+ | | |
+ | | | Drive 1
+ _ _ _ _ _ _ _ _ _________________________________|
+ BSY _ _ _ _ _ _ _ _/ \________________
+ _ _ _ _ _ _ _ _ _ _ ______ _ _ _ _ _
+ PDIAG- _ _ _ _ _ _ _ _ _ _\____________________________/ \_ _ _ _ _
+ | | | |<----------- tQ -------->|
+ _ _ _ _ _ _ _ _ _ _________________________ _ _ _
+ DASP- _ _ _ _ _ _ _ _ _\_____/ \ _ _ _\=== *3 ==
+ |<- tR ->|<------------ tS -------------->|
+ _ _ _ __________
+ Control Registers_______________________________________/_ _ _ /
+
+ *1 Drive 0 can set BSY=0 if Drive 1 not present
+ *2 Drive 0 can use DASP- to indicate it is active if Drive 1 is not
+ present
+ *3 DASP- can be asserted to indicate that the drive is active
+ +-------------------+------------+
+ | Label | Units |
+ +-------------------+------------+
+ | tM (Min) | 25 usec |
+ | tN (Max) | 400 nsec |
+ | tP (Max) | 1 msec |
+ | tQ (Max) | 30 secs |
+ | tR Drive 0 (Max) | 450 msec |
+ | tR Drive 1 (Max) | 400 msec |
+ | tS (Max) | 30.5 secs |
+ +-------------------+------------+
+
+ FIGURE 11-4 RESET SEQUENCE
+
diff --git a/sys/doc/ata/ata-2 b/sys/doc/ata/ata-2
new file mode 100644
index 000000000000..bad2d9eea869
--- /dev/null
+++ b/sys/doc/ata/ata-2
@@ -0,0 +1,4 @@
+2. References
+
+None.
+
diff --git a/sys/doc/ata/ata-3 b/sys/doc/ata/ata-3
new file mode 100644
index 000000000000..54645e040b7f
--- /dev/null
+++ b/sys/doc/ata/ata-3
@@ -0,0 +1,27 @@
+3. General Description
+
+The application environment for the AT Attachment is any computer which uses
+an AT Bus or 40-pin ATA interface.
+
+The AT Bus is a widely used and implemented interface for which a variety of
+peripherals have been manufactured. As a means of reducing size and cost, a
+class of products has emerged which embed the controller functionality in the
+drive. These new products utilize the AT Bus fixed disk interface protocol,
+and a subset of the AT bus. Because of their compatibility with existing AT
+hardware and software this interface quickly became a de facto industry
+standard.
+
+The purpose of the ATA standard is to define the de facto implementations.
+
+Software in the Operating System dispatches I/O (Input/Output) requests via
+the AT Bus to peripherals which respond to direct commands.
+
+3.1 Structure
+
+This standard relies upon specifications of the mechanical and electrical
+characteristics of the AT Bus and a subset of the AT Bus specifically
+developed for the direct attachment of peripherals.
+
+Also defined are the methods by which commands are directed to peripherals,
+the contents of registers and the method of data transfers.
+
diff --git a/sys/doc/ata/ata-4 b/sys/doc/ata/ata-4
new file mode 100644
index 000000000000..0c2fb638ce8d
--- /dev/null
+++ b/sys/doc/ata/ata-4
@@ -0,0 +1,59 @@
+4. Definitions and Conventions
+
+4.1 Definitions
+
+For the purpose of this standard the following definitions apply:
+
+4.1.1 ATA (AT Attachment): ATA defines a compatible register set and a 40-pin
+connector and its associated signals.
+
+4.1.2 Data block: This term describes a data transfer, and is typically a
+single sector, except when declared otherwise by use of the Set Multiple
+command.
+
+4.1.3 DMA (Direct Memory Access): A means of data transfer between
+peripheral and host memory without processor intervention.
+
+4.1.4 Optional: This term describes features which are not required by the
+standard. However, if any feature defined by the standard is implemented, it
+shall be done in the same way as defined by the standard. Describing a feature
+as optional in the text is done to assist the reader. If there is a conflict
+between text and tables on a feature described as optional, the table shall be
+accepted as being correct.
+
+4.1.5 PIO (Programmed Input/Output): A means of data transfer that requires
+the use of the host processor.
+
+4.1.6 Reserved: Where this term is used for bits, bytes, fields and code
+values; the bits, bytes, fields and code values are set aside for future
+standardization, and shall be zero.
+
+..4.1.10 VU (Vendor Unique): This term defines those features that can be
+..defined by the vendor in a specific implementation. Caution should be
+..exercised in defining and using such features since they may or may not
+..vary between vendors.
+..
+4.1.7 VU (Vendor Unique): This term is used to describe bits, bytes,
+fields, code values and features which are not described in this standard,
+and may be used in a way that varies between vendors.
+
+4.2 Conventions
+
+Certain terms used herein are the proper names of signals. These are printed
+in uppercase to avoid possible confusion with other uses of the same words;
+e.g., ATTENTION. Any lowercase uses of these words have the normal American-
+English meaning.
+
+A number of conditions, commands, sequence parameters, events, English text,
+states or similar terms are printed with the first letter of each word in
+uppercase and the rest lowercase; e.g., In, Out, Request Status. Any lowercase
+uses of these words have the normal American-English meaning.
+
+The American convention of numbering is used i.e., the thousands and higher
+multiples are separated by a comma and a period is used as the decimal point.
+This is equivalent to the ISO convention of a space and comma.
+
+ American: 0.6 ISO: 0,6
+ 1,000 1 000
+ 1,323,462.9 1 323 462,9
+
diff --git a/sys/doc/ata/ata-5 b/sys/doc/ata/ata-5
new file mode 100644
index 000000000000..c120a39b3736
--- /dev/null
+++ b/sys/doc/ata/ata-5
@@ -0,0 +1,189 @@
+5. Interface Cabling Requirements
+
+5.1 Configuration
+
+This standard provides the capability of operating on the AT Bus in a daisy
+chained configuration with a second drive that operates in accordance with
+these standards. One drive (selected as Drive 0) has been referred to as the
+master in industry terms and the second (selected as Drive 1) has been
+referred to as the slave (see Figure 5-3).
+
+The designation as Drive 0 or Drive 1 is made by a jumper plug or switch on
+the drive.
+
+Data is transferred in parallel (8 or 16 bits) either to or from host memory
+to the drive's buffer under the direction of commands previously transferred
+from the host. The drive performs all of the operations necessary to properly
+write data to, or read data from, the disk media. Data read from the media is
+stored in the drive's buffer pending transfer to the host memory and data is
+transferred from the host memory to the drive's buffer to be written to the
+media.
+
+ +-----------------------------------------------------+
+ | |
+ | HOST |
+ | |
+ +---------------^-------------------------------------+
+ | ATA Interface
+ | _____________________
+ |/ |
+ +------v--+ +------v--+
+ | DRIVE 0 | | DRIVE 1 |
+ +---------+ +---------+
+
+ FIGURE 5-1: ATA INTERFACE TO EMBEDDED BUS PERIPHERALS
+
+ +-----------------------------------------------------+
+ | |
+ | HOST |
+ | |
+ +------+====== AT Bus ======+-------------------------+
+ | |
+ | ADAPTER |
+ | |
+ +--------^-----------+
+ | ATA Interface
+ | _____________________
+ |/ |
+ +------v--+ +------v--+
+ | DRIVE 0 | | DRIVE 1 |
+ +---------+ +---------+
+
+ FIGURE 5-2: HOST BUS ADAPTER AND PERIPHERAL DEVICES
+
+ +-----------------------------------------------------+
+ | |
+ | HOST |
+ | |
+ +---------------^-------------------------------------+
+ | ATA Interface
+ +------v-----+
+ | |
+ | CONTROLLER |
+ | |
+ +-^----^---^-+
+ | | |__________________ Device Interface
+ | ___|_________________ | e.g. ESDI, SCSI
+ |/ | | |
+ +-v----v--+ +-v----v--+
+ | DRIVE | | DRIVE |
+ +---------+ +---------+
+
+ FIGURE 5-3: ATA INTERFACE TO CONTROLLER AND PERIPHERAL DEVICES
+
+5.2 Addressing Considerations
+
+In traditional controller operation, only the selected controller receives
+commands from the host following selection. In this standard, the register
+contents go to both drives (and their embedded controllers). The host
+discriminates between the two by using the DRV bit in the Drive/Head Register.
+
+5.3 DC Cable and Connector
+
+The drive receives DC power through a 4-pin or a low-power application 3-pin
+connector.
+
+5.3.1 4-Pin Power
+
+The pin assignments are shown in Table 5-1. Recommended part numbers for the
+mating connector to 18AWG cable are shown below, but equivalent parts may be
+used.
+
+ Connector (4 Pin) AMP 1-480424-0 or equivalent.
+ Contacts (Loose Piece) AMP 60619-4 or equivalent.
+ Contacts (Strip) AMP 61117-4 or equivalent.
+
+ TABLE 5-1: DC INTERFACE
+ +------------------------+------------+
+ | POWER LINE DESIGNATION | PIN NUMBER |
+ +------------------------+------------+
+ | +12 V | 1-01 |
+ | +12 V RETURN | 1-02 |
+ | +5 V RETURN | 1-03 |
+ | +5 V | 1-04 |
+ +------------------------+------------+
+
+5.3.2 3-Pin Power
+
+The pin assignments are shown in Table 5-2. Recommended part numbers for the
+mating connector to 18AWG cable are shown below, but equivalent parts may be
+used.
+
+ Connector (3 Pin) Molex 5484 39-27-0032 or equivalent.
+
+ TABLE 5-2: DC INTERFACE
+ +------------------------+------------+
+ | POWER LINE DESIGNATION | PIN NUMBER |
+ +------------------------+------------+
+ | +12 V | 1-01 |
+ | Ground | 1-02 |
+ | +5 V | 1-03 |
+ +------------------------+------------+
+
+5.3.3 Device Grounding
+
+System ground may be connected to a "quick-connect" terminal equivalent to:
+
+ Drive Connector Terminal AMP 61664-1 or equivalent.
+ Cable Connector Terminal AMP 62137-2 or equivalent.
+
+Provision for tying the DC Logic ground and the chassis ground together or for
+separating these two ground planes is vendor specific.
+
+5.4 I/O Connector
+
+The I/O connector is a 40-pin connector as shown in Figure 5-4, with pin
+assignments as shown in Table 6-1.
+
+The connector should be keyed to prevent the possibility of installing it
+upside down. A key is provided by the removal of Pin 20. The corresponding pin
+on the cable connector should be plugged.
+
+The pin locations are governed by the cable plug, not the receptacle. The way
+in which the receptacle is mounted on the Printed Circuit Board affects the
+pin positions, and pin 1 should remain in the same relative position. This
+means the pin numbers of the receptacle may not reflect the conductor number
+of the plug. The header receptacle is not polarized, and all the signals are
+relative to Pin 20, which is keyed.
+
+By using the plug positions as primary, a straight cable can connect drives.
+As shown in Figure 5-4, conductor 1 on pin 1 of the plug has to be in the
+same relative position no matter what the receptacle numbering looks like.
+If receptacle numbering was followed, the cable would have to twist 180
+degrees between a drive with top-mounted receptacles, and a drive with
+bottom-mounted receptacles.
+
+ +-----------------------+
+ | 1|
+ |40 20 2|
+ ==+==== Circuit Board ====+== ==+==== Circuit Board ====+==
+ | 1|
+ |40 20 2|
+ +-----------------------+
+.. * Location of pin number stamped as 1 when receptacle mounted upside down
+ FIGURE 5-4: 40-PIN CONNECTOR MOUNTING
+
+Recommended part numbers for the mating connector are shown below, but
+equivalent parts may be used.
+
+ Connector (40 Pin) 3M 3417-7000 or equivalent.
+ Strain relief 3M 3448-2040 or equivalent.
+ Flat Cable (Stranded 28 AWG) 3M 3365-40 or equivalent.
+ Flat Cable (Stranded 28 AWG) 3M 3517-40 (Shielded) or equivalent.
+
+5.5 I/O Cable
+
+The cable specifications affect system integrity and the maximum length that
+can be supported in any application.
+
+ TABLE 5-3: CABLE PARAMETERS
+ +-------------------------------------+------+--------+
+ | Cable length of 0.46m (18 inches) * | Min | Max |
+ +-------------------------------------+------+--------+
+ | Driver IoL Sink Current | 12mA | |
+ | Driver IoH Source Current | | -400uA |
+ | Cable Capacitive Loading | | 200pF |
+ +-------------------------------------+------+--------+
+ * This distance may be exceeded in circumstances where the
+ characteristics of both ends of the cable can be controlled.
+
diff --git a/sys/doc/ata/ata-6 b/sys/doc/ata/ata-6
new file mode 100644
index 000000000000..1bce4866f5b5
--- /dev/null
+++ b/sys/doc/ata/ata-6
@@ -0,0 +1,337 @@
+6. Physical Interface
+
+6.1 Signal Conventions
+
+Signal names are shown in all upper case letters. Signals can be asserted
+(active, true) in either a high (more positive voltage) or low (less positive
+voltage) state. A dash character (-) at the beginning or end of a signal name
+indicates it is asserted at the low level (active low). No dash or a plus
+character (+) at the beginning or end of a signal name indicates it is
+asserted high (active high). An asserted signal may be driven high or low by
+an active circuit, or it may be allowed to be pulled to the correct state by
+the bias circuitry.
+
+Control signals that are asserted for one function when high and asserted for
+another function when low are named with the asserted high function name
+followed by a slash character (/), and the asserted low function name followed
+with a dash (-) e.g. BITENA/BITCLR- enables a bit when high and clears a bit
+when low. All signals are TTL compatible unless otherwise noted. Negated means
+that the signal is driven by an active circuit to the state opposite to the
+asserted state (inactive, or false) or may be simply released (in which case
+the bias circuitry pulls it inactive, or false), at the option of the
+implementor.
+
+6.2 Signal Summary
+
+The physical interface consists of single ended TTL compatible receivers and
+drivers communicating through a 40-conductor flat ribbon nonshielded cable
+using an asynchronous interface protocol. The pin numbers and signal names
+are shown in Table 6-1. Reserved signals shall be left unconnected.
+
+ TABLE 6-1: INTERFACE SIGNALS
+ +----------------------------------+ +-----------+
+ | HOST I/O | | DRIVE I/O |
+ | CONNECTOR | | CONNECTOR |
+ | | | |
+ | HOST RESET 1 | ----- RESET- -------->| 1 |
+ | 2 | ----- Ground -------- | 2 |
+ | HOST DATA BUS BIT 7 3 |<----- DD7 ----------->| 3 |
+ | HOST DATA BUS BIT 8 4 |<----- DD8 ----------->| 4 |
+ | HOST DATA BUS BIT 6 5 |<----- DD6 ----------->| 5 |
+ | HOST DATA BUS BIT 9 6 |<----- DD9 ----------->| 6 |
+ | HOST DATA BUS BIT 5 7 |<----- DD5 ----------->| 7 |
+ | HOST DATA BUS BIT 10 8 |<----- DD10 ---------->| 8 |
+ | HOST DATA BUS BIT 4 9 |<----- DD4 ----------->| 9 |
+ | HOST DATA BUS BIT 11 10 |<----- DD11 ---------->| 10 |
+ | HOST DATA BUS BIT 3 11 |<----- DD3 ----------->| 11 |
+ | HOST DATA BUS BIT 12 12 |<----- DD12 ---------->| 12 |
+ | HOST DATA BUS BIT 2 13 |<----- DD2 ----------->| 13 |
+ | HOST DATA BUS BIT 13 14 |<----- DD13 ---------->| 14 |
+ | HOST DATA BUS BIT 1 15 |<----- DD1 ----------->| 15 |
+ | HOST DATA BUS BIT 14 16 |<----- DD14 ---------->| 16 |
+ | HOST DATA BUS BIT 0 17 |<----- DD0 ----------->| 17 |
+ | HOST DATA BUS BIT 15 18 |<----- DD15 ---------->| 18 |
+ | 19 | ----- Ground -------- | 19 |
+ | 20 | ----- (keypin) ------ | 20 |
+ | DMA REQUEST 21 |<----- DMARQ --------- | 21 |
+ | 22 | ----- Ground -------- | 22 |
+ | HOST I/O WRITE 23 | ----- DIOW- --------->| 23 |
+ | 24 | ----- Ground -------- | 24 |
+ | HOST I/O READ 25 | ----- DIOR- --------->| 25 |
+ | 26 | ----- Ground -------- | 26 |
+ | I/O CHANNEL READY 27 |<----- IORDY --------- | 27 |
+ | SPINDLE SYNC 28 |*----- SPSYNC --------*| 28 |
+ | DMA ACKNOWLEDGE 29 | ----- DMACK- -------->| 29 |
+ | 30 | ----- Ground -------- | 30 |
+ | HOST INTERRUPT REQUEST 31 |<----- INTRQ --------- | 31 |
+ | HOST 16 BIT I/O 32 |<----- IOCS16- ------- | 32 |
+ | HOST ADDRESS BUS BIT 1 33 | ----- DA1 ----------->| 33 |
+ | PASSED DIAGNOSTICS 34 |*----- PDIAG- --------*| 34 |
+ | HOST ADDRESS BUS BIT 0 35 | ----- DAO ----------->| 35 |
+ | HOST ADDRESS BUS BIT 2 36 | ----- DA2 ----------->| 36 |
+ | HOST CHIP SELECT 0 37 | ----- CS1FX- -------->| 37 |
+ | HOST CHIP SELECT 1 38 | ----- CS3FX- -------->| 38 |
+ | DRIVE ACTIVE/DRIVE 1 PRESENT 39 |<----- DASP- ---------*| 39 |
+ | 40 | ----- Ground -------- | 40 |
+ +----------------------------------+ +-----------+
+
+ * Drive Intercommunication Signals
+
+ +---HOST---+ +-Drive 0-+ +-Drive 1-+
+ | 28 | ----->| 28 28 |<----- SPSYNC ---->| 28 |
+ | 34 | ----- | 34 34 |<----- PDIAG- ---- | 34 |
+ | 39 |<----- | 39 39 |<----- DASP- ----- | 39 |
+ +----------+ +---------+ +---------+
+
+6.3 Signal Descriptions
+
+The interface signals and pins are described in more detail than shown in
+Table 6-1. The signals are listed according to function, rather than in
+numerical connector pin order. Table 6-2 lists signal name mnemonic, connector
+pin number, whether input to (I) or output from (O) the drive, and full signal
+name.
+
+ TABLE 6-2: INTERFACE SIGNALS DESCRIPTION
+ +--------+----+-----+
+ | Signal | Pin| I/O |
+ +--------+----+-----+-----------------------------------------------------+
+ | CS1FX- | 37 | I | Drive chip Select 0 |
+ | CS3FX- | 38 | I | Drive chip Select 1 |
+ | DA0 | 35 | I | Drive Address Bus - Bit 0 |
+ | DA1 | 33 | I | - Bit 1 |
+ | DA2 | 36 | I | - Bit 2 |
+ | DASP- | 39 | I/O | Drive Active/Drive 1 Present |
+ | DD0 | 17 | I/O | Drive Data Bus - Bit 0 |
+ | DD1 | 15 | I/O | - Bit 1 |
+ | DD2 | 13 | I/O | - Bit 2 |
+ | DD3 | 11 | I/O | - Bit 3 |
+ | DD4 | 9 | I/O | - Bit 4 |
+ | DD5 | 7 | I/O | - Bit 5 |
+ | DD6 | 5 | I/O | - Bit 6 |
+ | DD7 | 3 | I/O | - Bit 7 |
+ | DD8 | 4 | I/O | - Bit 8 |
+ | DD9 | 6 | I/O | - Bit 9 |
+ | DD10 | 8 | I/O | - Bit 10 |
+ | DD11 | 10 | I/O | - Bit 11 |
+ | DD12 | 12 | I/O | - Bit 12 |
+ | DD13 | 14 | I/O | - Bit 13 |
+ | DD14 | 16 | I/O | - Bit 14 |
+ | DD15 | 18 | I/O | - Bit 15 |
+ | DIOR- | 25 | I | Drive I/O Read |
+ | DIOW- | 23 | I | Drive I/O Write |
+ | DMACK- | 29 | I | DMA Acknowledge |
+ | DMARQ | 21 | O | DMA Request |
+ | INTRQ | 31 | O | Drive Interrupt |
+ | IOCS16-| 32 | O | Drive 16-bit I/O |
+ | IORDY | 27 | O | I/O Channel Ready |
+ | PDIAG- | 34 | I/O | Passed Diagnostics |
+ | RESET- | 1 | I | Drive Reset |
+ | SPSYNC | 28 | - | Spindle Sync |
+ | keypin | 20 | - | Pin used for keying the interface connector. |
+ +--------+----+-----+-----------------------------------------------------+
+
+6.3.1 CS1FX- (Drive chip Select 0)
+
+This is the chip select signal decoded from the host address bus used to
+select the Command Block Registers.
+
+6.3.2 CS3FX- (Drive chip Select 1)
+
+This is the chip select signal decoded from the host address bus used to
+select the Control Block Registers.
+
+6.3.3 DA0-2 (Drive Address Bus)
+
+This is the 3-bit binary coded address asserted by the host to access a
+register or data port in the drive.
+
+6.3.4 DASP- (Drive Active/Drive 1 Present)
+
+This is a time-multiplexed signal which indicates that a drive is active, or
+that Drive 1 is present. This signal shall be an open collector output and
+each drive shall have a 10K pull-up resistor.
+
+During power on initialization or after RESET- is negated, DASP- shall be
+asserted by Drive 1 within 400 msec to indicate that Drive 1 is present.
+
+Drive 0 shall allow up to 450 msec for Drive 1 to assert DASP-. If Drive 1 is
+not present, Drive 0 may assert DASP- to drive an activity LED.
+
+DASP- shall be negated following acceptance of the first valid command by
+Drive 1 or after 31 seconds, whichever comes first.
+
+Any time after negation of DASP-, either drive may assert DASP- to indicate
+that a drive is active.
+
+..rm102
+ NOTE: Prior to the development of this standard, products were introduced
+ which did not time multiplex DASP-. Some used two jumpers to indicate
+ to Drive 0 whether Drive 1 was present. If such a drive is jumpered to
+ indicate Drive 1 is present it should work successfully with a Drive 1
+ which complies with this standard. If installed as Drive 1, such a
+ drive may not work successfully because it may not assert DASP- for a
+ long enough period to be recognized. However, it would assert DASP-
+ to indicate that the drive is active.
+
+6.3.5 DD0-DD15 (Drive Data Bus)
+
+This is an 8- or 16-bit bidirectional data bus between the host and the drive.
+The lower 8 bits are used for 8-bit transfers e.g. registers, ECC bytes.
+
+6.3.6 DIOR- (Drive I/O Read)
+
+This is the Read strobe signal. The falling edge of DIOR- enables data from a
+register or the data port of the drive onto the host data bus, DD0-DD7 or DD0-
+DD15. The rising edge of DIOR- latches data at the host.
+
+6.3.7 DIOW- (Drive I/O Write)
+
+This is the Write strobe signal. The rising edge of DIOW- clocks data from the
+host data bus, DD0-DD7 or DD0-DD15, into a register or the data port of the
+drive.
+
+6.3.8 DMACK- (DMA Acknowledge) (Optional)
+
+This signal shall be used by the host in response to DMARQ to either
+acknowledge that data has been accepted, or that data is available.
+
+6.3.9 DMARQ (DMA Request) (Optional)
+
+This signal, used for DMA data transfers between host and drive, shall be
+asserted by the drive when it is ready to transfer data to or from the host.
+The direction of data transfer is controlled by DIOR- and DIOW-. This signal
+is used in a handshake manner with DMACK- i.e. the drive shall wait until the
+host asserts DMACK- before negating DMARQ, and re-asserting DMARQ if there is
+more data to transfer.
+
+When a DMA operation is enabled, IOCS16-, CS1FX- and CS3FX- shall not be
+asserted and transfers shall be 16-bits wide.
+
+..rm102
+ NOTE: ATA products with DMA capability require a pull-down resistor on this
+ signal to prevent spurious data transfers. This resistor may affect
+ driver requirements for drives sharing this signal in systems with
+ unbuffered ATA signals.
+
+6.3.10 INTRQ (Drive Interrupt)
+
+This signal is used to interrupt the host system. INTRQ is asserted only when
+the drive has a pending interrupt, the drive is selected, and the host has
+cleared nIEN in the Device Control Register. If nIEN=1, or the drive is not
+selected, this output is in a high impedance state, regardless of the presence
+or absence of a pending interrupt.
+
+INTRQ shall be negated by:
+
+ - assertion of RESET- or
+ - the setting of SRST of the Device Control Register, or
+ - the host writing the Command Register or
+ - the host reading the Status Register
+
+..rm102
+ NOTE: Some drives may negate INTRQ on a PIO data transfer completion, except
+ on a single sector read or on the last sector of a multi-sector read.
+
+On PIO transfers, INTRQ is asserted at the beginning of each data block to be
+transferred. A data block is typically a single sector, except when
+declared otherwise by use of the Set Multiple command. An exception occurs on
+Format Track, Write Sector(s), Write Buffer and Write Long commands - INTRQ
+shall not be asserted at the beginning of the first data block to be
+transferred.
+
+On DMA transfers, INTRQ is asserted only once, after the command has
+completed.
+
+6.3.11 IOCS16- (Drive 16-bit I/O)
+
+Except for DMA transfers, IOCS16- indicates to the host system that the 16-bit
+data port has been addressed and that the drive is prepared to send or receive
+a 16-bit data word. This shall be an open collector output.
+
+ - When transferring in PIO mode, If IOCS16- is not asserted, transfers shall
+ be 8-bit using DD0-7.
+ - When transferring in PIO mode, if IOCS16- is asserted, transfers shall be
+ 16-bit using DD0-15.
+ for 16-bit data transfers.
+ - When transferring in DMA mode, the host shall use a 16-bit DMA channel and
+ IOCS16- shall not be asserted.
+
+6.3.12 IORDY (I/O Channel Ready) (Optional)
+
+This signal is negated to extend the host transfer cycle of any host register
+access (Read or Write) when the drive is not ready to respond to a data
+transfer request. When IORDY is not negated, IORDY shall be in a high
+impedance state.
+
+6.3.13 PDIAG- (Passed Diagnostics)
+
+This signal shall be asserted by Drive 1 to indicate to Drive 0 that it has
+completed diagnostics. A 10K pull-up resistor shall be used on this signal by
+each drive.
+
+Following a power on reset, software reset or RESET-, Drive 1 shall negate
+PDIAG- within 1 msec (to indicate to Drive 0 that it is busy). Drive 1 shall
+then assert PDIAG- within 30 seconds to indicate that it is no longer busy,
+and is able to provide status. After the assertion of PDIAG-, Drive 1 may be
+unable to accept commands until it has finished its reset procedure and is
+Ready (DRDY=1).
+
+Following the receipt of a valid Execute Drive Diagnostics command, Drive
+1 shall negate PDIAG- within 1 msec to indicate to Drive 0 that it is busy
+and has not yet passed its drive diagnostics. If Drive 1 is present then
+Drive 0 shall wait for up to 5 seconds from the receipt of a valid Execute
+Drive Diagnostics command for Drive 1 to assert PDIAG-. Drive 1 should
+clear BSY before asserting PDIAG-, as PDIAG- is used to indicate that
+Drive 1 has passed its diagnostics and is ready to post status.
+
+..
+If DASP- was not asserted by Drive 1 during reset initialization, Drive 0
+shall post its own status immediately after it completes diagnostics, and
+clear the Drive 1 Status Register to 00h. Drive 0 may be unable to accept
+commands until it has finished its reset procedure and is Ready (DRDY=1).
+
+6.3.14 RESET- (Drive Reset)
+
+This signal from the host system shall be asserted for at least 25 usec after
+voltage levels have stabilized during power on and negated thereafter unless
+some event requires that the drive(s) be reset following power on.
+
+6.3.15 SPSYNC (Spindle Synchronization) (Optional)
+
+This signal may be either input or output to the drive depending on a vendor-
+defined switch. If a drive is set to Master the signal is output, and if a
+drive is set to slave the signal is input.
+
+There is no requirement that each drive implementation be plug-compatible to
+the extent that a multiple vendor drive subsystem be operable. Mix and match
+of different manufacturers drives is unlikely because rpm, sync fields, sync
+bytes etc need to be virtually identical. However, if drives are designed to
+match the following recommendation, controllers can operate drives with a
+single implementation.
+
+There can only be one master drive at a time in a configuration. The host or
+the drive designated as master can generate SPSYNC at least once per rotation,
+but may be at a higher frequency.
+
+SPSYNC received by a drive is used as the synchronization signal to lock the
+spindles in step. The time to achieve synchronization varies, and is indicated
+by the drive setting DRDY i.e. if the drive does not achieve synchronization
+following power on or a reset, it shall not set DRDY.
+
+A master drive or the host generates SPSYNC and transmits it.
+
+A slave drive does not generate SPSYNC and is responsible to synchronize its
+index to SPSYNC.
+
+If a drive does not support synchronization, it shall ignore SPSYNC.
+
+In the event that a drive previously synchronized loses synchronization, but
+is otherwise operational, it does not clear DRDY.
+
+Prior to the introduction of this standard, this signal was defined as DALE
+(Drive Address Latch Enable), and used for an address valid indication from
+the host system. If used, the host address and chip selects, DAO through DA2,
+CS1FX-, and CS3FX- were valid at the negation of this signal and remained
+valid while DALE was negated, therefore, the drive did not need to latch these
+signals with DALE.
+
diff --git a/sys/doc/ata/ata-7 b/sys/doc/ata/ata-7
new file mode 100644
index 000000000000..240706912a85
--- /dev/null
+++ b/sys/doc/ata/ata-7
@@ -0,0 +1,321 @@
+7. Logical Interface
+
+7.1 General
+
+7.1.1 Bit Conventions
+
+Bit names are shown in all upper case letters except where a lower case n
+precedes a bit name. This indicates that when nBIT=0 (bit is zero) the action
+is true and when nBIT=1 (bit is one) the action is false. If there is no
+preceding n, then when BIT=1 it is true, and when BIT=0 it is false.
+
+A bit can be set to one or cleared to zero and polarity influences whether it
+is to be interpreted as true or false:
+
+ True BIT=1 nBIT=0
+ False BIT=0 nBIT=1
+
+7.1.2 Environment
+
+The drives using this interface shall be programmed by the host computer to
+perform commands and return status to the host at command completion. When two
+drives are daisy chained on the interface, commands are written in parallel to
+both drives, and for all except the Execute Diagnostics command, only the
+selected drive executes the command. On an Execute Diagnostics command
+addressed to Drive 0, both drives shall execute the command, and Drive 1 shall
+post its status to Drive 0 via PDIAG-.
+
+Drives are selected by the DRV bit in the Drive/Head Register (see 7.2.8), and
+by a jumper or switch on the drive designating it as either a Drive 0 or as
+Drive 1. When DRV=0, Drive 0 is selected. When DRV=1, Drive 1 is selected.
+When drives are daisy chained, one shall be set as Drive 0 and the other as
+Drive 1. When a single drive is attached to the interface it shall be set as
+Drive 0.
+
+Prior to the adoption of this standard, some drives may have provided jumpers
+to indicate Drive 0 with no Drive 1 present, or Drive 0 with Drive 1 present.
+
+Throughout this document, drive selection always refers to the state of the
+DRV bit, and the position of the Drive 0/Drive 1 jumper or switch.
+
+7.2 I/O Register Descriptions
+
+Communication to or from the drive is through an I/O Register that routes the
+input or output data to or from registers (selected) by a code on signals from
+the host (CS1FX-, CS3FX-, DA2, DA1, DA0, DIOR- and DIOW-).
+
+The Command Block Registers are used for sending commands to the drive or
+posting status from the drive.
+
+The Control Block Registers are used for drive control and to post alternate
+status.
+
+Table 7-1 lists these registers and the addresses that select them.
+
+Logic conventions are: A = signal asserted
+ N = signal negated
+ x = does not matter which it is
+
+ TABLE 7-1: I/O PORT FUNCTIONS/SELECTION ADDRESSES
+ +-------------------------------+-----------------------------------------+
+ | Addresses | Functions |
+ |CS1FX-|CS3FX-| DA2 | DA1 | DA0 | READ (DIOR-) | WRITE (DIOW-) |
+ +------+------+-----+-----+-----+---------------------+-------------------+
+ | Control Block Registers |
+ +------+------+-----+-----+-----+---------------------+-------------------+
+ | N | N | x | x | x | Data Bus High Imped | Not used |
+ | N | A | 0 | x | X | Data Bus High Imped | Not used |
+ | N | A | 1 | 0 | x | Data Bus High Imped | Not used |
+ | N | A | 1 | 1 | 0 | Alternate Status | Device Control |
+ | N | A | 1 | 1 | 1 | Drive Address | Not used |
+ +------+------+-----+-----+-----+---------------------+-------------------+
+ | Command Block Registers |
+ +------+------+-----+-----+-----+---------------------+-------------------+
+ | A | N | 0 | 0 | 0 | Data | Data |
+ | A | N | 0 | 0 | 1 | Error Register | Features |
+ | A | N | 0 | 1 | 0 | Sector Count | Sector Count |
+ | A | N | 0 | 1 | 1 | Sector Number | Sector Number |
+ | A | N | 1 | 0 | 0 | Cylinder Low | Cylinder Low |
+ | A | N | 1 | 0 | 1 | Cylinder High | Cylinder High |
+ | A | N | 1 | 1 | 0 | Drive/Head | Drive/Head |
+ | A | N | 1 | 1 | 1 | Status | Command |
+ | A | A | x | x | x | Invalid Address | Invalid Address |
+ +------+------+-----+-----+-----+---------------------+-------------------+
+
+7.2.1 Alternate Status Register
+
+This register contains the same information as the Status Register in the
+command block. The only difference being that reading this register does not
+imply interrupt acknowledge or clear a pending interrupt.
+
+ 7 6 5 4 3 2 1 0
+ +-------+-------+-------+-------+-------+-------+-------+-------+
+ | BSY | DRDY | DWF | DSC | DRQ | CORR | IDX | ERR |
+ +-------+-------+-------+-------+-------+-------+-------+-------+
+
+See 7.2.13 for definitions of the bits in this register.
+
+7.2.2 Command Register
+
+This register contains the command code being sent to the drive. Command
+execution begins immediately after this register is written. The executable
+commands, the command codes, and the necessary parameters for each command are
+listed in Table 9-1.
+
+7.2.3 Cylinder High Register
+
+This register contains the high order bits of the starting cylinder address
+for any disk access. At the end of the command, this register is updated to
+reflect the current cylinder number. The most significant bits of the cylinder
+address shall be loaded into the cylinder high Register.
+
+..rm102
+ NOTE: Prior to the introduction of this standard, only the lower 2 bits of
+ this register were valid, limiting cylinder address to 10 bits i.e.
+ 1,024 cylinders.
+
+7.2.4 Cylinder Low Register
+
+This register contains the low order 8 bits of the starting cylinder address
+for any disk access. At the end of the command, this register is updated to
+reflect the current cylinder number.
+
+7.2.5 Data Register
+
+This 16-bit register is used to transfer data blocks between the device data
+buffer and the host. It is also the register through which sector information
+is transferred on a Format command. Data transfers may be either PIO or DMA.
+
+7.2.6 Device Control Register
+
+The bits in this register are as follows:
+
+ 7 6 5 4 3 2 1 0
+ +-------+-------+-------+-------+-------+-------+-------+-------+
+ | x | x | x | x | 1 | SRST | nIEN | 0 |
+ +-------+-------+-------+-------+-------+-------+-------+-------+
+
+ - SRST is the host software reset bit. The drive is held reset when this bit
+ is set. If two disk drives are daisy chained on the interface, this bit
+ resets both simultaneously. Drive 1 is not required to execute the DASP-
+ handshake procedure.
+ - nIEN is the enable bit for the drive interrupt to the host. When nIEN=0,
+ and the drive is selected, INTRQ shall be enabled through a tri-state
+ buffer. When nIEN=1, or the drive is not selected, the INTRQ signal shall
+ be in a high impedance state.
+
+7.2.7 Drive Address Register
+
+This register contains the inverted drive select and head select addresses of
+the currently selected drive. The bits in this register are as follows:
+
+ 7 6 5 4 3 2 1 0
+ +-------+-------+-------+-------+-------+-------+-------+-------+
+ | HiZ | nWTG | nHS3 | nHS2 | nHS1 | nHS0 | nDS1 | nDS0 |
+ +-------+-------+-------+-------+-------+-------+-------+-------+
+
+ - HiZ shall always be in a high impedance state.
+ - nWTG is the Write Gate bit. When writing to the disk drive is in progress,
+ nWTG=0.
+ - nHS3 through nHS0 are the one's complement of the binary coded address of
+ the currently selected head. For example, if nHS3 through nHS0 are 1100b,
+ respectively, head 3 is selected. nHS3 is the most significant bit.
+ - nDS1 is the drive select bit for drive 1. When drive 1 is selected and
+ active, nDS1=0.
+ - nDS0 is the drive select bit for drive 0. When drive 0 is selected and
+ active, nDS0=0.
+
+..rm102
+ NOTE: Care should be used when interpreting these bits, as they do not
+ always represent the expected status of drive operations at the
+ instant the status was put into this register. This is because of the
+ use of cacheing, translate mode and the Drive 0/Drive 1 concept with
+ each drive having its own embedded controller.
+
+7.2.8 Drive/Head Register
+
+This register contains the drive and head numbers. The contents of this
+register define the number of heads minus 1, when executing an Initialize
+Drive Parameters command.
+
+ 7 6 5 4 3 2 1 0
+ +-------+-------+-------+-------+-------+-------+-------+-------+
+ | 1 | 0 | 1 | DRV | HS3 | HS2 | HS1 | HS0 |
+ +-------+-------+-------+-------+-------+-------+-------+-------+
+
+ - DRV is the binary encoded drive select number. When DRV=0, Drive 0 is
+ selected. When DRV=1, Drive 1 is selected.
+ - HS3 through HS0 contain the binary coded address of the head to be selected
+ e.g. if HS3 through HS0 are 0011b, respectively, head 3 will be selected.
+ HS3 is the most significant bit. At command completion, this register is
+ updated to reflect the currently selected head.
+
+7.2.9 Error Register
+
+This register contains status from the last command executed by the drive or a
+Diagnostic Code.
+
+At the completion of any command except Execute Drive Diagnostic, the contents
+of this register are valid when ERR=1 in the Status Register.
+
+Following a power on, a reset, or completion of an Execute Drive Diagnostic
+command, this register contains a Diagnostic Code (see Table 9-2).
+
+ 7 6 5 4 3 2 1 0
+ +-------+-------+-------+-------+-------+-------+-------+-------+
+ | BBK | UNC | 0 | IDNF | 0 | ABRT | TK0NF | AMNF |
+ +-------+-------+-------+-------+-------+-------+-------+-------+
+
+ - BBK (Bad Block Detected) indicates a bad block mark was detected in the
+ requested sector's ID field.
+ - UNC (Uncorrectable Data Error) indicates an uncorrectable data error has
+ been encountered.
+ - IDNF (ID Not Found) indicates the requested sector's ID field could not be
+ found.
+ - ABRT (Aborted Command) indicates the requested command has been aborted due
+ to a drive status error (Not Ready, Write Fault, etc.) or because the
+ command code is invalid.
+ - TK0NF (Track 0 Not Found) indicates track 0 has not been found during a
+ Recalibrate command.
+ - AMNF (Address Mark Not Found) indicates the data address mark has not been
+ found after finding the correct ID field.
+ - Unused bits are cleared to zero.
+
+7.2.10 Features Register
+
+This register is command specific and may be used to enable and disable
+features of the interface e.g. by the Set Features Command to enable and
+disable cacheing.
+
+This register may be ignored by some drives.
+
+Some hosts, based on definitions prior to the completion of this standard, set
+values in this register to designate a recommended Write Precompensation
+Cylinder value.
+
+7.2.11 Sector Count Register
+
+This register contains the number of sectors of data requested to be
+transferred on a read or write operation between the host and the drive. If
+the value in this register is zero, a count of 256 sectors is specified.
+
+If this register is zero at command completion, the command was successful. If
+not successfully completed, the register contains the number of sectors which
+need to be transferred in order to complete the request.
+
+The contents of this register may be defined otherwise on some commands e.g.
+Initialize Drive Parameters, Format Track or Write Same commands.
+
+7.2.12 Sector Number Register
+
+This register contains the starting sector number for any disk data access for
+the subsequent command. The sector number may be from 1 to the maximum number
+of sectors per track.
+
+See the command descriptions for contents of the register at command
+completion (whether successful or unsuccessful).
+
+..Typically, when a read or write command completes successfully, the value
+..in the register is the last sector number accessed modulo the number of
+..sectors per track. Typically, if a command does not complete successfully,
+..the register contains the sector number at which an error occurred on a
+..multiple sector transfer.
+..
+7.2.13 Status Register
+
+This register contains the drive status. The contents of this register are
+updated at the completion of each command. When BSY is cleared, the other bits
+in this register shall be valid within 400 nsec. If BSY=1, no other bits in
+this register are valid. If the host reads this register when an interrupt is
+pending, it is considered to be the interrupt acknowledge. Any pending
+interrupt is cleared whenever this register is read.
+
+..rm102
+ NOTE: If Drive 1 is not detected as being present, Drive 0 clears the Drive
+ 1 Status Register to 00h (indicating that the drive is Not Ready).
+
+ 7 6 5 4 3 2 1 0
+ +-------+-------+-------+-------+-------+-------+-------+-------+
+ | BSY | DRDY | DWF | DSC | DRQ | CORR | IDX | ERR |
+ +-------+-------+-------+-------+-------+-------+-------+-------+
+
+ - BSY (Busy) is set whenever the drive has access to the Command Block
+ Registers. The host should not access the Command Block Register when
+ BSY=1. When BSY=1, a read of any Command Block Register shall return the
+ contents of the Status Register. This bit is set by the drive (which may be
+ able to respond at times when the media cannot be accessed) under the
+ following circumstances:
+ a) within 400 nsec after the negation of RESET- or after SRST has been set
+ in the Device Control Register. Following acceptance of a reset it is
+ recommended that BSY be set for no longer than 30 seconds by Drive 1 and
+ no longer than 31 seconds by Drive 0.
+ b) within 400 nsec of a host write of the Command Register with a Read,
+ Read Long, Read Buffer, Seek, Recalibrate, Initialize Drive Parameters,
+ Read Verify, Identify Drive, or Execute Drive Diagnostic command.
+ c) within 5 usecs following transfer of 512 bytes of data during execution
+ of a Write, Format Track, or Write Buffer command, or 512 bytes of data
+ and the appropriate number of ECC bytes during the execution of a Write
+ Long command.
+ - DRDY (Drive Ready) indicates that the drive is capable of responding to a
+ command. When there is an error, this bit is not changed until the Status
+ Register is read by the host, at which time the bit again indicates the
+ current readiness of the drive. This bit shall be cleared at power on and
+ remain cleared until the drive is ready to accept a command.
+ - DWF (Drive Write Fault) indicates the current write fault status. When an
+ error occurs, this bit shall not be changed until the Status Register is
+ read by the host, at which time the bit again indicates the current write
+ fault status.
+ - DSC (Drive Seek Complete) indicates that the drive heads are settled over a
+ track. When an error occurs, this bit shall not be changed until the Status
+ Register is read by the host, at which time the bit again indicates the
+ current Seek Complete status.
+ - DRQ (Data Request) indicates that the drive is ready to transfer a word or
+ byte of data between the host and the drive.
+ - CORR (Corrected Data) indicates that a correctable data error was
+ encountered and the data has been corrected. This condition does not
+ terminate a data transfer.
+ - IDX (Index) is set once per disk revolution.
+ - ERR (Error) indicates that an error occurred during execution of the
+ previous command. The bits in the Error Register have additional
+ information regarding the cause of the error.
+
diff --git a/sys/doc/ata/ata-8 b/sys/doc/ata/ata-8
new file mode 100644
index 000000000000..f651b6b49326
--- /dev/null
+++ b/sys/doc/ata/ata-8
@@ -0,0 +1,143 @@
+8. Programming Requirements
+
+8.1 Reset Response
+
+A reset is accepted within 400 nsec after the negation of RESET- or within 400
+nsec after SRST has been set in the Device Control Register.
+
+When the drive is reset by RESET-, Drive 1 shall indicate it is present by
+asserting DASP- within 400 msec, and DASP- shall remain asserted for 30
+seconds or until Drive 1 accepts the first command. See also 6.3.4 and 6.3.13.
+
+When the drive is reset by SRST, the drive shall set BSY=1.
+
+See also 7.2.6.
+
+When a reset is accepted, and with BSY set:
+
+ a) Both drives perform any necessary hardware initialization
+ b) Both drives clear any previously programmed drive parameters
+ c) Both drives may revert to the default condition
+ d) Both drives load the Command Block Registers with their default values
+ e) If a hardware reset, Drive 0 waits for DASP- to be asserted by Drive 1
+ f) If operational, Drive 1 asserts DASP-
+ g) Drive 0 waits for PDIAG- to be asserted if Drive 1 asserts DASP-
+ h) If operational, Drive 1 clears BSY
+ i) If operational, Drive 1 asserts PDIAG-
+ j) Drive 0 clears BSY
+
+No interrupt is generated when initialization is complete.
+
+The default values for the Command Block Registers if no self-tests are
+performed or if no errors occurred are:
+
+ Error = 01h Cylinder Low = 00h
+ Sector Count = 01h Cylinder High = 00h
+ Sector Number = 01h Drive/Head = 00h
+
+The Error Register shall contain a Diagnostic Code (see Table 9.2) if a self-
+test is performed.
+
+Following any reset, the host should issue an Initialize Drive Parameters
+command to ensure the drive is initialized as desired.
+
+There are three types of reset in ATA. The following is a suggested method of
+classifying reset actions:
+
+ - Power On Reset: the drive executes a series of electrical circuitry
+ diagnostics, spins up the HDA, tests speed and other mechanical
+ parametrics, and sets default values.
+ - Hardware Reset: the drive executes a series of electrical circuitry
+ diagnostics, and resets to default values.
+ - Software Reset: the drive resets the interface circuitry to default values.
+
+8.2 Translate Mode
+
+The cylinder, head and sector geometry of the drive as presented to the host
+may differ from the actual physical geometry. Translate mode is an optional
+and device specific means of mapping between the two.
+
+8.3 Power Conditions
+
+Optional power commands permit the host to modify the behavior of the drive in
+a manner which reduces the power required to operate.
+
+ TABLE 8-1: POWER CONDITIONS
+ +----------+----+----+----+------------------+-----+
+ | Mode |SRST| BSY|DRDY| Interface Active |Media|
+ +----------+----+----+----+------------------+-----+
+ | Sleep | 1 | x | x | No | 0 |
+ | | | | | | |
+ | Standby | x | 0 | 1 | Yes | 0 |
+ | | | | | | |
+ | Idle | x | 0 | 1 | Yes | 1 |
+ | | | | | | |
+ | Active | x | x | x | Yes | 1 |
+ +----------+----+----+----+------------------+-----+
+ | 1 = Active 0 = Inactive |
+ +--------------------------------------------------+
+
+The lowest power consumption occurs in Sleep mode. When in Sleep mode, the
+drive needs a Software Reset to be activated (see 9.18). The time to respond
+could be as long as 30 seconds or more.
+
+In Standby mode the drive interface is capable of accepting commands, but as
+the media is not immediately accessible, it could take the drive as long as 30
+seconds or more to respond.
+
+In Idle mode the drive is capable of responding immediately to media access
+requests. A drive in Idle mode may take longer to complete the execution of a
+command because it may have to activate some circuitry.
+
+In Active mode the drive is capable of responding immediately to media access
+requests, and commands complete execution in the shortest possible time.
+
+Ready is not a power condition. A drive may post ready at the interface even
+though the media may not be accessible.
+
+See specific power-related commands.
+
+8.4 Error Posting
+
+The errors that are valid for each command are defined in Table 8-1. It is not
+a requirement that all valid conditions be implemented. See 7.2.9 and 7.2.13
+for the definition of the Error Register and Status Register bits.
+
+ TABLE 8-2: REGISTER CONTENTS
+ +----------------------------+---------------------+
+ | Error Register | Status Register |
+ |BBK|UNC|IDNF|ABRT|TK0NF|AMNF|DRDY|DWF|DSC|CORR|ERR|
+ +------------------------+---+---+----+----+-----+----+----+---+---+----+---+
+ | Check Power Mode | | | | V | | | V | V | V | | V |
+ | Execute Drive Diags | See 9.2 | | | | | V |
+ | Format Track | | | V | V | | | V | V | V | | V |
+ | Identify Drive | | | | V | | | V | V | V | | V |
+ | Idle | | | | V | | | V | V | V | | V |
+ | Idle Immediate | | | | V | | | V | V | V | | V |
+ | Initialize Drive Parms | | | | | | | V | V | V | | |
+ | Recalibrate | | | | V | V | | V | V | V | | V |
+ | Read Buffer | | | | V | | | V | V | V | | V |
+ | Read DMA | V | V | V | V | | V | V | V | V | V | V |
+ | Read Long | V | V | V | V | | V | V | V | V | V | V |
+ | Read Multiple | V | V | V | V | | V | V | V | V | V | V |
+ | Read Sector(s) | V | V | V | V | | V | V | V | V | V | V |
+ | Read Verify Sector(s) | V | V | V | V | | V | V | V | V | V | V |
+ | Seek | | | V | V | | | V | V | V | | V |
+ | Set Features | | | | V | | | V | V | V | | V |
+ | Set Multiple Mode | | | | V | | | V | V | V | | V |
+ | Sleep | | | | V | | | V | V | V | | V |
+ | Standby | | | | V | | | V | V | V | | V |
+ | Standby Immediate | | | | V | | | V | V | V | | V |
+ | Write Buffer | | | | V | | | V | V | V | | V |
+ | Write DMA | V | | V | V | | | V | V | V | | V |
+ | Write Long | V | | V | V | | | V | V | V | | V |
+ | Write Multiple | V | | V | V | | | V | V | V | | V |
+ | Write Same | V | | V | V | | | V | V | V | | V |
+ | Write Sector(s) | V | | V | V | | | V | V | V | | V |
+ | Write Verify | V | V | V | V | | V | V | V | V | V | V |
+ +------------------------+---+---+----+----+-----+----+----+---+---+----+---+
+ | Invalid Command Code | | | | V | | | V | V | V | | V |
+ +------------------------+---+---+----+----+-----+----+----+---+---+----+---+
+ | V = valid on this command |
+ +---------------------------------------------------------------------------+
+
diff --git a/sys/doc/ata/ata-9 b/sys/doc/ata/ata-9
new file mode 100644
index 000000000000..4cd3f6684989
--- /dev/null
+++ b/sys/doc/ata/ata-9
@@ -0,0 +1,721 @@
+9. Command Descriptions
+
+Commands are issued to the drive by loading the pertinent registers in the
+command block with the needed parameters, and then writing the command code to
+the Command Register.
+
+The manner in which a command is accepted varies. There are three classes
+(see Table 9-1) of command acceptance, all predicated on the fact that to
+receive a command, BSY=0:
+
+ - Upon receipt of a Class 1 command, the drive sets BSY within 400 nsec.
+ - Upon receipt of a Class 2 command, the drive sets BSY within 400 nsec, sets
+ up the sector buffer for a write operation, sets DRQ within 700 usec, and
+ clears BSY within 400 nsec of setting DRQ.
+ - Upon receipt of a Class 3 command, the drive sets BSY within 400 nsec, sets
+ up the sector buffer for a write operation, sets DRQ within 20 msec, and
+ clears BSY within 400 nsec of setting DRQ.
+
+..rm102
+ NOTE: DRQ may be set so quickly on Class 2 and Class 3 that the BSY
+ transition is too short for BSY=1 to be recognized.
+
+The drive shall implement all mandatory commands as identified by an M, and
+may implement the optional commands identified by an O, in Table 9-1. V
+indicates a Vendor Specific command code.
+
+ TABLE 9-1: COMMAND CODES AND PARAMETERS
+ +-------+-------------------+
+ +-----+ |Command| Parameters Used |
+ |Class| | Code |FR SC SN CY DH |
+ +-----+----------------------------------+---+-------+---+---+---+---+---+
+ | 1 | Check Power Mode | O |98h E5h| | y | | | D |
+ | 1 | Execute Drive Diagnostic | M | 90h | | | | | D*|
+ | 2 | Format Track | M | 50h | * | y | | y | y |
+ | 1 | Identify Drive | O | ECh | | | | | D |
+ | 1 | Idle | O |97h E3h| | y | | | D |
+ | 1 | Idle Immediate | O |95h E1h| | | | | D |
+ | 1 | Initialize Drive Parameters | M | 91h | | y | | | y |
+ | 1 | Recalibrate | M | 1xh | | | | | D |
+ | 1 | Read Buffer | O | E4h | | | | | D |
+ | 1 | Read DMA (w/retry) | O | C8h | | y | y | y | y |
+ | 1 | Read DMA (w/o retry) | O | C9h | | y | y | y | y |
+ | 1 | Read Multiple | O | C4h | | y | y | y | y |
+ | 1 | Read Sector(s) (w/retry) | M | 20 | | y | y | y | y |
+ | 1 | Read Sector(s) (w/o retry) | M | 21 | | y | y | y | y |
+ | 1 | Read Long (w/retry) See 9.13 | M | 22 | | y | y | y | y |
+ | 1 | Read Long (w/o retry) See 9.13 | M | 23 | | y | y | y | y |
+ | 1 | Read Verify Sector(s) (w/retry) | M | 40 | | y | y | y | y |
+ | 1 | Read Verify Sector(s) (w/o retry)| M | 41 | | y | y | y | y |
+ | 1 | Seek | M | 7xh | | | y | y | y |
+ | 1 | Set Features | O | EFh | y | | | | D |
+ | 1 | Set Multiple Mode | O | C6h | | y | | | D |
+ | 1 | Set Sleep Mode | O |99h E6h| | | | | D |
+ | 1 | Standby | O |96h E2h| | y | | | D |
+ | 1 | Standby Immediate | O |94h E0h| | | | | D |
+ | 2 | Write Buffer | O | E8h | | | | | D |
+ | 3 | Write DMA (w/retry) | O | CAh | | y | y | y | y |
+ | 3 | Write DMA (w/o retry) | O | CBh | | y | y | y | y |
+ | 3 | Write Multiple | O | C5h | * | y | y | y | y |
+ | 3 | Write Same | O | E9h | y | y | y | y | y |
+ | 2 | Write Sector(s) (w/retry) | M | 30 | * | y | y | y | y |
+ | 2 | Write Sector(s) (w/o retry) | M | 31 | * | y | y | y | y |
+ | 2 | Write Sector(s) (w/retry) | M | 32 | * | y | y | y | y |
+ | 2 | Write Sector(s) (w/o retry) | M | 33 | * | y | y | y | y |
+ | 3 | Write Verify | O | 3Ch | * | y | y | y | y |
+ | | Vendor Unique | V | 9Ah | | | | | |
+ | | Vendor Unique | V | C0-C3h| | | | | |
+ | | Vendor Unique | V | 8xh | | | | | |
+ | | Vendor Unique | V |F5h-FFh| | | | | |
+ | | EATA Standard (CAM/89-004) | O |F0h-F4h| | | | | |
+ | | Reserved: All remaining codes | | | | | | | |
+ +-----+----------------------------------+---+-------+---+---+---+---+---+
+ | | CY = Cylinder Registers SC = Sector Count Register |
+ | | DH = Drive/Head Register SN = Sector Number Register |
+ | | FR = Features Register (see command descriptions for use) |
+.. | | |
+.. | | M = Mandatory O = Optional V = Vendor Specific |
+ | | y - the register contains a valid parameter for this command. |
+ | | For the Drive/Head Register, y means both the drive and |
+ | | head parameters are used. |
+ | | D - only the drive parameter is valid and not the head parameter.|
+ | | D* - Addressed to Drive 0 but both drives execute it. |
+ | | * - Maintained for compatibility (see 7.2.9) |
+ +-----+------------------------------------------------------------------+
+
+9.1 Check Power Mode
+
+This command checks the power mode.
+
+If the drive is in, going to, or recovering from the Standby Mode the drive
+shall set BSY, set the Sector Count Register to 00h, clear BSY, and generate
+an interrupt.
+
+If the drive is in the Idle Mode, the drive shall set BSY, set the Sector
+Count Register to FFh, clear BSY, and generate an interrupt.
+
+9.2 Execute Drive Diagnostic
+
+This command shall perform the internal diagnostic tests implemented by the
+drive. See also 6.3.4 and 6.3.13. The DRV bit is ignored. Both drives, if
+present, shall execute this command.
+
+If Drive 1 is present:
+
+ - Drive 0 waits up to 5 seconds for Drive 1 to assert PDIAG-.
+ - If Drive 1 has not asserted PDIAG-, indicating a failure, Drive 0 shall
+ append 80h to its own diagnostic status.
+ - Both drives shall execute diagnostics.
+ - If Drive 1 diagnostic failure is detected when Drive 0 status is read,
+ Drive 1 status is obtained by setting the DRV bit, and reading status.
+
+If there is no Drive 1 present:
+
+ - Drive 0 posts only its own diagnostic results.
+ - Drive 0 clears BSY, and generates an interrupt.
+
+The Diagnostic Code written to the Error Register is a unique 8-bit code as
+shown in Table 9-2, and not as the single bit flags defined in 7.2.9.
+
+..Table 9-2 details the codes and the corresponding explanations.
+If Drive 1 fails diagnostics, Drive 0 "ORs" 80h with its own status and loads
+that code into the Error Register. If Drive 1 passes diagnostics or there is
+no Drive 1 connected, Drive 0 "ORs" 00h with its own status and loads that
+code into the Error Register.
+
+ TABLE 9-2: DIAGNOSTIC CODES
+ +-------+
+ | Code |
+ +-------+----------------------------------+
+ | 01h | No error detected |
+ | 02h | Formatter device error |
+ | 03h | Sector buffer error |
+ | 04h | ECC circuitry error |
+ | 05h | Controlling microprocessor error |
+ | 8xh | Drive 1 failed |
+ +-------+----------------------------------+
+
+9.3 Format Track
+
+The implementation of the Format Track command is vendor specific. The actions
+may be a physical reformatting of a track, initializing the data field
+contents to some value, or doing nothing.
+
+The Sector Count Register contains the number of sectors per track.
+
+The track address is specified in the Cylinder High and Cylinder Low
+Registers, and the number of sectors is specified in the Sector Count
+Register. When the command is accepted, the drive sets the DRQ bit and waits
+for the host to fill the sector buffer. When the sector buffer is full, the
+drive clears DRQ, sets BSY and begins command execution.
+
+The contents of the sector buffer shall not be written to the media, and may
+be either ignored or interpreted as follows:
+
+ DD15 ---- DD0 DD15 ---- DD0
+ +------+------+ +------+------+--------------------------+
+ | First|Desc- | | Last |Desc- | Remainder of buffer |
+ |Sector|riptor| : : : : : : |Sector|riptor| filled with zeros |
+ +------+------+ +------+------+--------------------------+
+
+One 16-bit word represents each sector, the words being contiguous from the
+start of a sector. Any words remaining in the buffer after the representation
+of the last sector are filled with zeros. DD15-8 contain the sector number. If
+an interleave is specified, the words appear in the same sequence as they
+appear on the track. DD7-0 contain a descriptor value defined as follows:
+
+ 00h - Format sector as good
+ 20h - Unassign the alternate location for this sector
+ 40h - Assign this sector to an alternate location
+ 80h - Format sector as bad
+
+..rm102
+ NOTE: Some users of the ATA drive expect the operating system partition
+ table to be erased on a Format command. It is recommended that a drive
+ which does not perform a physical format of the track, write a data
+ pattern of all zeros to the sectors which have been specified by the
+ Format Track command.
+
+..rm102
+ NOTE: It is recommended that implementors resassign data blocks which show
+ repeated errors.
+
+9.4 Identify Drive
+
+The Identify Drive command enables the host to receive parameter information
+from the drive. When the command is issued, the drive sets BSY, stores the
+required parameter information in the sector buffer, sets DRQ, and generates
+an interrupt. The host then reads the information out of the sector buffer.
+The parameter words in the buffer have the arrangement and meanings defined in
+Table 9-3. All reserved bits or words shall be zero.
+
+ +-------+ TABLE 9-3: IDENTIFY DRIVE INFORMATION
+ | Word |
+ +-------+------------------------------------------------------------------+
+ | 0 | General configuration bit-significant information: |
+ | | 15 0 reserved for non-magnetic drives |
+ | | 14 1=format speed tolerance gap required |
+ | | 13 1=track offset option available |
+ | | 12 1=data strobe offset option available |
+ | | 11 1=rotational speed tolerance is > 0.5% |
+ | | 10 1=disk transfer rate > 10 Mbs |
+ | | 9 1=disk transfer rate > 5Mbs but <= 10Mbs |
+ | | 8 1=disk transfer rate <= 5Mbs |
+ | | 7 0 reserved for removable cartridge drive |
+ | | 6 1=fixed drive |
+ | | 5 1=spindle motor control option implemented |
+ | | 4 1=head switch time > 15 usec |
+ | | 3 1=not MFM encoded |
+ | | 2 1=soft sectored |
+ | | 1 1=hard sectored |
+ | | 0 0=reserved |
+ | 1 | Number of fixed cylinders |
+ | 2 | reserved |
+ | 3 | Number of heads |
+ | 4 | Number of unformatted bytes per track |
+ | 5 | Number of unformatted bytes per sector |
+ | 6 | Number of sectors per track |
+ | 7-9 | Vendor Unique |
+ | 10-19 | Serial number (20 ASCII characters, 0000h=not specified) |
+ | 20 | Buffer type |
+ | 21 | Buffer size in 512 byte increments (0000h=not specified) |
+ | 22 | # of ECC bytes passed on Read/Write Long cmds (0000h=not spec'd) |
+ | 23-26 | Firmware revision (8 ASCII characters, 0000h=not specified) |
+ | 27-46 | Model number (40 ASCII characters, 0000h=not specified) |
+ | 47 | 0000h = Read/Write Multiple commands not implemented |
+ | | x = number of sectors that can be transferred per interrupt |
+ | | on Read and Write Multiple commands |
+ | 48 | 0000h = cannot perform doubleword I/O |
+ | | 0001h = can perform doubleword I/O |
+ | 49 | Capabilities |
+ | | 15-9 0=reserved |
+ | | 8 1=DMA Supported |
+ | | 7-0 Vendor Unique |
+ | 50 | reserved |
+ | 51 | PIO data transfer cycle timing mode |
+ | 52 | DMA data transfer cycle timing mode |
+ | 53-127| reserved |
+ |128-159| Vendor Unique |
+ |160-255| reserved |
+ +-------+------------------------------------------------------------------+
+
+The fields described in 9.4.1 through 9.4.5 are not affected by the Initialize
+Drive Parameters command.
+
+9.4.1 Number of fixed cylinders
+
+The number of translated cylinders in the default translation mode.
+
+9.4.2 Number of heads
+
+The number of translated heads in the default translation mode.
+
+9.4.3 Number of unformatted bytes per track
+
+The number of unformatted bytes per translated track in the default
+translation mode.
+
+9.4.4 Number of unformatted bytes per sector
+
+The number of unformatted bytes per sector in the default translation mode.
+
+9.4.5 Number of sectors per track
+
+The number of sectors per track in the default translation mode.
+
+9.4.6 Serial Number
+
+The contents of this field are right justified and padded with spaces (20h).
+
+9.4.7 Buffer Type
+
+The contents of the field are determined by the manufacturer.
+
+ 0000h = not specified.
+ 0001h = a single ported single sector buffer which is not capable of
+ simultaneous data transfers to or from the host and the disk.
+ 0002h = a dual ported multi-sector buffer capable of simultaneous data
+ transfers to or from the host and the disk.
+ 0003h = a dual ported multi-sector buffer capable of simultaneous transfers
+ with a read cacheing capability.
+ 0004-FFFFh = reserved
+
+These codes are typically not used by the operating system, however, they are
+useful for diagnostic programs which perform initialization routines e.g. a
+different interleave may be desirable for 0001h vs 0002h or 0003h.
+
+9.4.8 Firmware Revision
+
+The contents of this field are left justified and padded with spaces (20h).
+
+9.4.9 Model Number
+
+The contents of this field are left justified and padded with spaces (20h).
+
+9.4.10 PIO data transfer cycle timing mode
+
+The PIO transfer timing for each ATA device falls into categories which have
+unique parametric timing specifications. To determine the proper device timing
+category, compare the Cycle Time specified in Figure 11-1 with the contents of
+this field. The value returned should fall into one of the categories
+specified in Figure 11-1, and if it does not, then Mode 0 shall be used to
+serve as the default timing.
+
+9.4.11 DMA data transfer cycle timing mode
+
+The DMA transfer timing for each ATA device falls into categories which have
+unique parametric timing specifications. To determine the proper device timing
+category, compare the Cycle Time specified in Figure 11-3 with the contents of
+this field. The value returned should fall into one of the categories
+specified in Figure 11-3, and if it does not, then Mode 0 shall be used to
+serve as the default timing.
+
+9.5 Idle
+
+This command causes the drive to set BSY, enter the Idle Mode, clear BSY, and
+generate an interrupt. The interrupt is generated even though the drive may
+not have fully transitioned to Idle Mode.
+
+If the drive is already spinning, the spinup sequence is not executed.
+
+If the Sector Count Register is non-zero then the automatic power down
+sequence shall be enabled and the timer begins counting down immediately. If
+the Sector Count Register is zero then the automatic power down sequence shall
+be disabled.
+
+9.6 Idle Immediate
+
+This command causes the drive to set BSY, enter the Idle Mode, clear BSY, and
+generate an interrupt. The interrupt is generated even though the drive may
+not have fully transitioned to Idle Mode.
+
+9.7 Initialize Drive Parameters
+
+..This command enables the host to control certain drive parameters. Some
+..parameters are standard while others are vendor specific.
+This command enables the host to set the number of sectors per track and the
+number of heads minus 1, per cylinder. Upon receipt of the command, the drive
+sets BSY, saves the parameters, clears BSY, and generates an interrupt.
+
+The only two register values used by this command are the Sector Count
+Register which specifies the number of sectors per track, and the Drive/Head
+Register which specifies the number of heads minus 1. The DRV bit designates
+these values to Drive 0 or Drive 1, as appropriate.
+
+The sector count and head values are not checked for validity by this command.
+If they are invalid, no error will be posted until an illegal access is made
+by some other command.
+
+9.8 Recalibrate
+
+This command moves the read/write heads from anywhere on the disk to cylinder
+0. Upon receipt of the command, the drive sets BSY and issues a seek to
+cylinder zero. The drive then waits for the seek to complete before updating
+status, clearing BSY and generating an interrupt.
+
+If the drive cannot reach cylinder 0, a Track Not Found error is posted.
+
+9.9 Read Buffer
+
+The Read Buffer command enables the host to read the current contents of the
+drive's sector buffer. When this command is issued, the drive sets BSY, sets
+up the sector buffer for a read operation, sets DRQ, clears BSY, and generates
+an interrupt. The host then reads up to 512 bytes of data from the buffer.
+
+The Read Buffer and Write Buffer commands shall be synchronized such that
+sequential Write Buffer and Read Buffer commands access the same 512 bytes
+within the buffer.
+
+9.10 Read DMA
+
+This command executes in a similar manner to the Read Sectors command except
+for the following:
+
+ - the host initializes a slave-DMA channel prior to issuing the command
+ - data transfers are qualified by DMARQ and are performed by the slave-DMA
+ channel
+ - the drive issues only one interrupt per command to indicate that data
+ transfer has terminated and status is available.
+
+Any error encountered during execution of a Read DMA command results in the
+termination of data transfer at the sector where the error was detected. The
+sector in error is not transferred. The drive generates an interrupt to
+indicate that data transfer has terminated and status is available. The error
+posting is the same as that of the Read Sectors command.
+
+9.11 Read Long
+
+The Read Long command performs similarly to the Read Sectors command except
+that it returns the data and the ECC bytes contained in the data field of the
+desired sector. During a Read Long command, the drive does not check the ECC
+bytes to determine if there has been a data error. Only single sector read
+long operations are supported.
+
+The transfer of the ECC bytes shall be 8-bits wide.
+
+9.12 Read Multiple Command
+
+The Read Multiple command performs similarly to the Read Sectors command.
+Interrupts are not generated on every sector, but on the transfer of a block
+which contains the number of sectors defined by a Set Multiple command.
+
+Command execution is identical to the Read Sectors operation except that the
+number of sectors defined by a Set Multiple command are transferred without
+intervening interrupts. DRQ qualification of the transfer is required only at
+the start of the data block, not on each sector.
+
+The block count of sectors to be transferred without intervening interrupts is
+programmed by the Set Multiple Mode command, which shall be executed prior to
+the Read Multiple command.
+
+When the Read Multiple command is issued, the Sector Count Register contains
+the number of sectors (not the number of blocks or the block count) requested.
+
+If the number of requested sectors is not evenly divisible by the block count,
+as many full blocks as possible are transferred, followed by a final, partial
+block transfer. The partial block transfer shall be for n sectors, where
+
+ n = (sector count) - modulo (block count)
+
+If the Read Multiple command is attempted before the Set Multiple Mode command
+has been executed or when Read Multiple commands are disabled, the Read
+Multiple operation shall be rejected with an Aborted Command error.
+
+Disk errors encountered during Read Multiple commands are posted at the
+beginning of the block or partial block transfer, but DRQ is still set and the
+data transfer shall take place as it normally would, including transfer of
+corrupted data, if any.
+
+The contents of the Command Block Registers following the transfer of a data
+block which had a sector in error are undefined. The host should retry the
+transfer as individual requests to obtain valid error information.
+
+Subsequent blocks or partial blocks are transferred only if the error was a
+correctable data error. All other errors cause the command to stop after
+transfer of the block which contained the error. Interrupts are generated when
+DRQ is set at the beginning of each block or partial block.
+
+..The error reporting is the same as that on a Read Sectors command.
+..
+9.13 Read Sector(s)
+
+This command reads from 1 to 256 sectors as specified in the Sector Count
+register. A sector count of 0 requests 256 sectors. The transfer begins at the
+sector specified in the Sector Number Register. See 10.1 for the DRQ, IRQ and
+BSY protocol on data transfers.
+
+If the drive is not already on the desired track, an implied seek is
+performed. Once at the desired track, the drive searches for the appropriate
+ID field.
+
+If retries are disabled and two index pulses have occurred without error free
+reading of the requested ID, an ID Not Found error is posted.
+
+If retries are enabled, up to a vendor specific number of attempts may be made
+to read the requested ID before posting an error.
+
+If the ID is read correctly, the data address mark shall be recognized within
+a specified number of bytes, or the Address Mark Not Found error is posted.
+
+..Once the data address mark is found, the data field is read into the sector
+..buffer, error bits are set if an error was encountered, DRQ is set, and an
+..interrupt is generated.
+..
+DRQ is always set regardless of the presence or absence of an error condition
+at the end of the sector.
+
+At command completion, the Command Block Registers contain the cylinder, head,
+and sector number of the last sector read.
+
+If an error occurs, the read terminates at the sector where the error
+occurred. The Command Block Registers contain the cylinder, head, and sector
+number of the sector where the error occurred.
+
+The flawed data is pending in the sector buffer.
+
+9.14 Read Verify Sector(s)
+
+This command is identical to the Read Sectors command, except that DRQ is
+never set, and no data is transferred to the host. See 10.3 for protocol.
+..When the command is accepted, the drive sets BSY.
+
+When the requested sectors have been verified, the drive clears BSY and
+generates an interrupt. Upon command completion, the Command Block Registers
+contain the cylinder, head, and sector number of the last sector verified.
+
+If an error occurs, the verify terminates at the sector where the error
+occurs. The Command Block Registers contain the cylinder, head, and sector
+number of the sector where the error occurred. The Sector Count Register shall
+contain the number of sectors not yet verified.
+
+9.15 Seek
+
+This command initiates a seek to the track and selects the head specified in
+the command block. The drive need not be formatted for a seek to execute
+properly. See 10.3 for protocol. The drive shall not set DSC=1 until the
+action of seeking has completed. The drive may return the interrupt before the
+seek is completed.
+
+If another command is issued to the drive while a seek is being executed, the
+drive sets BSY=1, waits for the seek to complete, and then begins execution of
+the command.
+
+..The Sector Number Register is used to translate between perceived and real
+..geometry.
+..
+9.16 Set Features
+
+This command is used by the host to establish the following parameters which
+affect the execution of certain drive features:
+
+ 44h Vendor unique length of ECC on Read Long/Write Long commands
+ 55h Disable read look-ahead feature
+ AAh Enable read look-ahead feature
+ BBh 4 bytes of ECC apply on Read Long/Write Long commands
+
+See 10.3 for protocol. If the value in the register is not supported or is
+invalid, the drive posts an Aborted Command error.
+
+At power on, or after a software or hardware reset, the default mode is read
+look-ahead enabled and 4 bytes of ECC.
+
+9.17 Set Multiple Mode
+
+This command enables the drive to perform Read and Write Multiple operations
+and establishes the block count for these commands. See 10.3 for protocol.
+
+The Sector Count Register is loaded with the number of sectors per block.
+Drives shall support block sizes of 2, 4, 8, and 16 sectors, if their buffer
+size is at least 8,192 bytes, and may also support other block sizes. Upon
+receipt of the command, the drive sets BSY=1 and checks the Sector Count
+Register.
+
+If the Sector Count Register contains a valid value and the block count is
+supported, the value is loaded for all subsequent Read Multiple and Write
+Multiple commands and execution of those commands is enabled. If a block count
+is not supported, an Aborted Command error is posted, and Read Multiple and
+Write Multiple commands are disabled.
+
+If the Sector Count Register contains 0 when the command is issued, Read and
+Write Multiple commands are disabled.
+
+At power on, or after a hardware or software reset, the default mode is Read
+and Write Multiple disabled.
+
+9.18 Sleep
+
+This command is the only way to cause the drive to enter Sleep Mode. The drive
+is spun down, and when it is stopped, BSY is cleared, an interrupt is
+generated, and the interface becomes inactive.
+
+The only way to recover from Sleep mode without a reset or power on, is for
+the host to issue a software reset.
+
+A drive shall not power on in Sleep Mode nor remain in Sleep Mode following a
+reset sequence. If the drive is already spun down, the spin down sequence is
+not executed.
+
+9.19 Standby
+
+This command causes the drive to enter the Standby Mode. See 10.3 for
+protocol. The drive may return the interrupt before the transition to Standby
+Mode is completed.
+
+If the drive is already spun down, the spin down sequence is not executed.
+
+If the Sector Count Register is non-zero then the automatic power down
+sequence shall be enabled and the timer will begin counting down when the
+drive returns to Idle mode. If the Sector Count Register is zero then the
+automatic power down sequence shall be disabled.
+
+9.20 Standby Immediate
+
+This command causes the drive to enter the Standby Mode. See 10.3 for
+protocol. The drive may return the interrupt before the transition to Standby
+Mode is completed.
+
+If the drive is already spun down, the spin down sequence is not executed.
+
+9.21 Write Buffer
+
+This command enables the host to overwrite the contents of the drive's sector
+buffer with any data pattern desired. See 10.2 for protocol.
+
+The Read Buffer and Write Buffer commands shall be synchronized within the
+drive such that sequential Write Buffer and Read Buffer commands access the
+same 512 bytes within the buffer.
+
+9.22 Write DMA
+
+This command executes in a similar manner to Write Sectors except for the
+following:
+
+ - the host initializes a slave-DMA channel prior to issuing the command
+ - data transfers are qualified by DMARQ and are performed by the slave-DMA
+ channel
+ - the drive issues only one interrupt per command to indicate that data
+ transfer has terminated and status is available.
+
+Any error encountered during Write DMA execution results in the termination of
+data transfer. The drive issues an interrupt to indicate that data transfer
+has terminated and status is available in the Error Register. The error
+posting is the same as that of the Write Sectors command.
+
+9.23 Write Multiple Command
+
+This command is similar to the Write Sectors command. The drive sets BSY
+within 400 nsec of accepting the command, and interrupts are not presented on
+each sector but on the transfer of a block which contains the number of
+sectors defined by Set Multiple.
+
+Command execution is identical to the Write Sectors operation except that the
+number of sectors defined by the Set Multiple command are transferred without
+intervening interrupts. DRQ qualification of the transfer is required only at
+the start of the data block, not on each sector.
+
+The block count of sectors to be transferred without intervening interrupts is
+programmed by the Set Multiple Mode command, which shall be executed prior to
+the Read Multiple command.
+
+When the Write Multiple command is issued, the Sector Count Register contains
+the number of sectors (not the number of blocks or the block count) requested.
+
+If the number of requested sectors is not evenly divisible by the block count,
+as many full blocks as possible are transferred, followed by a final, partial
+block transfer. The partial block transfer is for n sectors, where
+
+ n = (sector count) - modulo (block count)
+
+If the Write Multiple command is attempted before the Set Multiple Mode
+command has been executed or when Write Multiple commands are disabled, the
+Write Multiple operation shall be rejected with an aborted command error.
+
+Disk errors encountered during Write Multiple commands are posted after the
+attempted disk write of the block or partial block transferred. The Write
+command ends with the sector in error, even if it was in the middle of a
+block. Subsequent blocks are not transferred in the event of an error.
+Interrupts are generated when DRQ is set at the beginning of each block or
+partial block.
+
+..The Command Block Registers contain the cylinder, head, and sector number of
+..the sector where the error occurred and the Sector Count Register contains the
+..residual of sectors that need to be transferred for successful completion of
+..the command e.g. each block has 4 sectors, a request for 8 sectors is issued,
+..and an error occurs on the third sector. The Sector Count Register contains 6
+..and the address is that of the third sector.
+..
+The contents of the Command Block Registers following the transfer of a data
+block which had a sector in error are undefined. The host should retry the
+transfer as individual requests to obtain valid error information.
+
+9.24 Write Same
+
+This command executes in a similar manner to Write Sectors except that only
+one sector of data is transferred. The contents of the sector are written to
+the medium one or more times.
+
+NOTE: The Write Same command allows for initialization of part or all of the
+medium to the specified data with a single command.
+
+If the Features Register is 22h, the drive shall write that part of the medium
+specified by the sector count, sector number, cylinder and drive/head
+registers. If the Features Register contains DDh, the drive shall initialize
+all the user accessible medium. If the register contains a value other than
+22h or DDh, the command shall be rejected with an aborted command error.
+
+The drive issues an interrupt to indicate that the command is complete. Any
+error encountered during execution results in the termination of the write
+operation. Status is available in the Error Register if an error occurs. The
+error posting is the same as that of the Write Sectors command.
+
+9.25 Write Long
+
+This command is similar to the Write Sectors command except that it writes the
+data and the ECC bytes directly from the sector buffer; the drive does not
+generate the ECC bytes itself. Only single sector Write Long operations are
+supported.
+
+The transfer of the ECC bytes shall be 8-bits wide.
+
+9.26 Write Sector(s)
+
+This command writes from 1 to 256 sectors as specified in the Sector Count
+Register (a sector count of zero requests 256 sectors), beginning at the
+specified sector. See 10.1 for the DRQ, IRQ and BSY protocol on data
+transfers.
+
+..When this command is accepted, the drive sets DRQ and waits
+..for the host to fill the sector buffer with the data to be written. No
+..interrupt is generated to start the first buffer fill operation. Once the
+..buffer is full, the drive clears DRQ, sets BSY and begins command execution.
+..
+If the drive is not already on the desired track, an implied seek is
+performed. Once at the desired track, the drive searches for the appropriate
+ID field.
+
+If retries are disabled and two index pulses have occurred without error free
+reading of the requested ID, an ID Not Found error is posted.
+
+If retries are enabled, up to a vendor specific number of attempts may be made
+to read the requested ID before posting an error.
+
+If the ID is read correctly, the data loaded in the buffer is written to the
+data field of the sector, followed by the ECC bytes. Upon command completion,
+the Command Block Registers contain the cylinder, head, and sector number of
+the last sector written.
+
+If an error occurs during a write of more than one sector, writing terminates
+at the sector where the error occurs. The Command Block Registers contain the
+cylinder, head, and sector number of the sector where the error occurred. The
+host may then read the command block to determine what error has occurred, and
+on which sector.
+
+9.27 Write Verify
+
+This command is similar to the Write Sectors command, except that each sector
+is verified immediately after being written. The verify operation is a read
+without transfer and a check for data errors. Any errors encountered during
+the verify operation are posted. Multiple sector write verify commands write
+all the requested sectors and then verify all the requested sectors before
+generating the final interrupt.
+
diff --git a/sys/doc/ata/ata-apx b/sys/doc/ata/ata-apx
new file mode 100644
index 000000000000..cd8981c58eab
--- /dev/null
+++ b/sys/doc/ata/ata-apx
@@ -0,0 +1,426 @@
+Annex A: Diagnostic and Reset Considerations
+ (informative).
+
+This annex describes the following timing relationships during:
+
+ a) Power On and Hardware Resets
+ - One drive
+ - Two drives
+ b) Software Reset
+ - One drive
+ - Two drives
+ c) Diagnostic Command Execution
+ - One drive
+ - Two drives
+ - Two drives - Drive1 failed
+
+The timing assumes the following:
+
+ o DASP- is asserted by Drive1 and received by Drive0 at power-on or
+ hardware reset to indicate the presence of Drive1. At all other times it
+ is asserted by Drive0 and Drive1 to indicate when a drive is active.
+ o PDIAG- is asserted by Drive1 and detected by Drive0. It is used by
+ Drive1 to indicate to Drive0 that it has completed diagnostics and is
+ ready to accept commands from the Host (BSY bit is cleared). This does not
+ indicate that the drive is ready, only that it can accept commands. This
+ line may remain asserted until the next reset occurs or an Execute
+ Diagnostic command is received.
+ o Unless indicated otherwise, all times are relative to the event that
+ triggers the operation (RESET-, SRST=1, Execute Diagnostic Command).
+
+A.1 Power On and Hardware Resets
+
+A.1.1 Power On and Hardware Resets - One Drive
+
+ - Host asserts RESET- for a minimum of 25 usec.
+ - Drive0 sets BSY within 400 nsecs after RESET- is negated.
+ - Drive0 negates DASP- within 1 msec after RESET- negated.
+ - Drive0 performs hardware initialization
+ - Drive0 may revert to its default condition
+ - Drive0 waits 1 msec then samples for at least 450 msec for DASP- to be
+ asserted from Drive1.
+ - Drive0 clears BSY when ready to accept commands (within 31 seconds).
+
+A.1.2 Power On and Hardware Resets - Two Drives
+
+ - Host asserts RESET- for a minimum of 25 usec.
+ - Drive0 and Drive1 set BSY within 400 nsec after RESET- negated.
+ - DASP- is negated within 1 msec after RESET- is negated.
+
+A.1.2.1 Drive1
+
+ - Drive1 negates PDIAG- before asserting DASP-.
+ - Drive1 asserts DASP- within 400 msecs after RESET- (to show presence).
+ - Drive1 performs hardware initialization and executes its internal
+ diagnostics.
+ - Drive1 may revert to its default condition
+ - Drive1 posts diagnostic results to the Error Register
+ - Drive1 clears BSY when ready to accept commands.
+ - Drive1 asserts PDIAG- to indicate that it is ready to accept commands
+ (within 30 seconds from RESET-).
+ - Drive1 negates DASP- after the first command is received or negates DASP-
+ if no command is received within 30 seconds after RESET-.
+
+A.1.2.2 Drive0
+
+ - Drive0 performs hardware initialization and executes its internal
+ diagnostics.
+ - Drive0 may revert to its default condition
+ - Drive0 posts diagnostic results to the Error Register
+ - After 1 msec, Drive0 waits at least 450 msec for DASP- to be asserted
+ (from Drive1). If DASP- is not asserted, no Drive1 is present (see POWER-
+ ON RESET - One Driveoperation).
+ - Drive0 waits up to 31 seconds for Drive1 to assert PDIAG-. If PDIAG- is
+ not asserted, Drive0 sets Bit7=1 in the Error Register.
+ - Drive0 clears BSY when ready to accept commands (within 31 seconds).
+
+A.2 Software Reset
+
+A.2.1 Software Reset - One Drive
+
+ - Host sets SRST=1 in the Device Control Register.
+.. - Drive0 waits for SRST to be cleared by Host.
+.. - Drive0 sets BSY within 400 nsec after SRST=0.
+ - Drive0 sets BSY within 400 nsec after detecting that SRST=1.
+ - Drive0 performs hardware initialization and executes its internal
+ diagnostics.
+ - Drive0 may revert to its default condition.
+ - Drive0 posts diagnostic results to the Error Register.
+ - Drive0 clears BSY when ready to accept commands (within 31 seconds).
+
+A.2.2 Software Reset - Two Drives
+
+ - Host sets SRST=1 in the Device Control Register.
+.. - Drives wait for host to clear SRST.
+.. - Drive0 and Drive1 set BSY within 400 nsec after SRST=0.
+ - Drive0 and Drive1 set BSY within 400 nsec after detecting that SRST=1.
+ - Drive0 and Drive1 perform hardware initialization.
+ - Drive0 and Drive1 may revert to their default condition.
+
+A.2.2.1 Drive1
+
+ - Drive1 negates PDIAG- within 1 msec.
+ - Drive1 clears BSY when ready to accept commands.
+ - Drive1 asserts PDIAG- to indicate that it is ready to accept commands
+ (within 30 seconds).
+
+A.2.2.2 Drive0
+
+ - Drive0 waits up to 31 seconds for Drive1 to assert PDIAG-.
+ - Drive0 clears BSY when ready to accept commands (within 31 seconds).
+
+A.3 Diagnostic Command Execution
+
+A.3.1 Diagnostic Command Execution - One Drive(Passed)
+
+ - Drive0 sets BSY within 400 nsec after the Execute Diagnostic command was
+ received.
+ - Drive0 performs hardware initialization and internal diagnostics.
+ - Drive0 resets Command Block registers to default condition.
+ - Drive0 posts diagnostic results to the Error Register
+ - Drive0 clears BSY when ready to accept commands (within 6 seconds).
+
+A.3.2 Diagnostic Command - Two Drives (Passed)
+
+ - Drive0 and Drive1 set BSY within 400 nsec after the Execute Diagnostic
+ command was received.
+
+A.3.2.1 Drive1
+
+ - Drive1 negates PDIAG- within 1 msec after command received.
+ - Drive1 performs hardware initialization and internal diagnostics.
+ - Drive1 resets the Command Block registers to their default condition.
+ - Drive1 posts diagnostic results to the Error Register
+ - Drive1 clears BSY when ready to accept commands.
+ - Drive1 asserts PDIAG- to indicate that it is ready to accept commands
+ (within 5 seconds).
+
+A.3.2.2 Drive0
+
+ - Drive0 performs hardware initialization and internal diagnostics.
+ - Drive0 resets the Command Block registers to their default condition.
+ - Drive0 waits up to <5 seconds for Drive1 to assert PDIAG-.
+ - Drive0 posts diagnostic results to the Error Register
+ - Drive0 clears BSY when ready to accept commands (within 6 seconds).
+
+A.3.3 Diagnostic Command Execution - One Drive(Failed)
+
+ - Drive0 sets BSY within 400 nsec after Diagnostic command received.
+ - Drive0 performs hardware initialization and internal diagnostics.
+ - Drive0 resets Command Block registers to default condition.
+ - Drive0 posts a Diagnostic Code to the Error Register indicating a failure.
+ - Drive0 clears BSY when ready to accept commands (within 6 seconds)
+
+A.3.4 Diagnostic Command Execution - Two Drives (Drive1 Failed)
+
+ - Drive0 and Drive1 set BSY within 400 nsec after Diagnostic command
+ received.
+
+A.3.4.1 Drive1
+
+ - Drive1 negates PDIAG- within 1 msec after command received.
+ - Drive1 performs hardware initialization and internal diagnostics.
+ - Drive1 resets the Command Block registers to their default condition.
+ - Drive1 posts a Diagnostic Code to the Error Register indicating failure.
+ - Drive1 clears BSY.
+ - Drive1 does not assert PDIAG-, indicating that it failed diagnostics.
+
+A.3.4.2 Drive0
+
+ - Drive0 performs hardware initialization and internal diagnostics.
+ - Drive0 resets the Command Block registers to their default condition.
+ - Drive0 waits 6 seconds for Drive1 to assert PDIAG- but PDIAG- is not
+ asserted by Drive1.
+ - Drive0 posts a Diagnostic Code to the Error Register setting Bit7=1 to
+ indicate that Drive1 failed diagnostics.
+ - Drive0 clears BSY when ready to accept commands (within 6 seconds).
+
+..rm102
+ NOTE: The 6 seconds referenced above is a host-oriented value.
+
+Annex B: Diagnostic and Reset Considerations
+ (informative).
+
+B.1 Power on and hardware reset (RESET-)
+
+DASP- is read by Drive0 to determine if Drive1 is present. If Drive1 is
+present Drive0 will read PDIAG- to determine when it is valid to clear BSY
+and whether Drive1 has powered on or reset without error, otherwise Drive0
+clears BSY whenever it is ready to accept commands. Drive 0 may assert DASP-
+to indicate drive activity.
+
+B.2 Software reset
+
+If Drive1 is present Drive0 will read PDIAG- to determine when it is valid
+to clear BSY and whether Drive1 has reset without any errors, otherwise
+Drive 0 will simply reset and clear BSY. DASP- is asserted by Drive0 (and
+Drive1 if it is present) in order to indicate drive active.
+
+B.3 DriveDiagnostic Command
+
+If Drive1 is present, Drive0 will read PDIAG- to determine when it is valid
+to clear BSY and if Drive1 passed or failed the Execute DriveDiagnostic
+command, otherwise Drive0 will simply execute its diagnostics and then clear
+BSY. DASP- is asserted by Drive0 (and Drive1 if it is present) in order to
+indicate the drive is active.
+
+B.4 Truth Table
+
+In all the above cases: Power on, RESET-, software reset, and the Execute
+DriveDiagnostics command the Drive0 Error Register is calculated as follows:
+
+ Drive1 PDIAG- Drive0 Error
+ Present? Asserted? Passed Register
+
+ Yes Yes Yes 01h
+ Yes Yes No 0xh
+ Yes No Yes 81h
+ Yes No No 8xh
+ No (not read) Yes 01h
+ No (not read) No 0xh
+
+Where x indicates the appropriate Diagnostic Code for the Power on, RESET-,
+software reset, or drivediagnostics error.
+
+B.5 Power On or Hardware Reset Algorithm
+
+ 1) Power on or hardware reset
+ 2) The hardware should automatically do the following:
+ a) Set up the hardware to post both Drive0 and Drive1 status
+ b) Set the Drive0 Status Register to 80h (set BSY and clear
+ all the other status bits)
+ c) Set the Drive1 Status Register to 80h (set BSY and clear all
+ the other status bits)
+ 3) Read the single Drive0/Drive1 jumper and note its state
+ 4) Perform any remaining time critical hardware initialization including
+ starting the spin up of the disk if needed
+ 5) If Drive1
+ a) Negate the PDIAG- signal
+ b) Set up PDIAG- as an output
+ c) Assert the DASP- output
+ d) Set up DASP- as an output if necessary
+ e) Set up the hardware so it posts Drive1 status only and
+ continue to post 80h for Drive1 status
+ NOTE: all this must happen within 400 msec after power on or RESET-
+ If Drive0
+ a) Set up PDIAG- as an input
+ b) Release DASP- and set up DASP- as an input
+ c) Test DASP- for 450 msec or until DASP- is asserted by Drive1
+ d) If DASP- is asserted within 450 msec
+ i) Note that Drive1 is present
+ ii) Set up the hardware so it posts Drive0 status only
+ and continue to post 80h for the Drive0 status
+ If DASP- is not asserted within 450 msec
+ i) note that Drive1 is not present
+ e) Assert DASP- to indicate drive activity
+ 6) Complete all the hardware initialization needed to get the drive ready,
+ including:
+ a) Set the Sector Count Register to 01h
+ b) Set the Sector Number Register to 01h
+ c) Set the Cylinder Low Register to 00h
+ d) Set the Cylinder High Register to 00h
+ e) Set the Drive/Head Register to 00h
+ 7) If Drive1 and power on, or RESET- is valid
+ a) Set the Error Register to Diagnostic Code 01h
+ b) Set the Drive1 Status Register to 00h
+ c) Assert PDIAG-
+ NOTE: All this must happen within 5 seconds of power on or the
+ negation of RESET-
+ If Drive1 and power on or RESET- bad
+ a) Set the Error Register to the appropriate Diagnostic Code
+ b) Set the Drive1 Status Register to 00h
+ NOTE: All this must happen within 5 seconds of power on or the
+ negation of RESET-
+ If Drive0, power on or RESET- valid, and a Drive1 is present
+ a) Test PDIAG- for 6 seconds or until PDIAG- is asserted by Drive1
+ b) If PDIAG- is asserted within 6 seconds
+ i) Set the Error Register to Diagnostic Code 01h
+ c) If PDIAG- is not asserted within 6 seconds
+ i) Set the Error Register to 81h
+ d) Set the Drive0 Status Register to 00h
+ If Drive0, power on or RESET- bad, and a Drive1 is present
+ a) Test PDIAG- for 6 seconds or until PDIAG- is asserted by
+ Drive1
+ b) If PDIAG- is asserted within 6 seconds
+ i) Set the Error Register to the appropriate Diagnostic Code
+ c) If PDIAG- is not asserted within 6 seconds
+ i) Set the Error Register to 80h + the appropriate code
+ d) Set the Drive0 Status Register to 00h
+ If Drive0, power on or RESET- valid, and no Drive1 is present
+ a) Set the Error Register to Diagnostic Code 01h
+ b) Set the Drive1 Status Register to 00h
+ c) Set the Drive0 Status Register to 00h
+ If Drive0, power on or RESET- bad, and no Drive1 is present
+ a) Set the Error Register to the appropriate Diagnostic Code
+ b) Set the Drive1 Status Register to 00h
+ c) Set the Drive0 Status Register to 00h
+ 8) Finish spin up if needed
+ 9) If Drive1
+ a) Set the Drive1 Status Register to 50h
+ b) Negate DASP- if a command is not received within 30 seconds
+ If Drive0 and a Drive1 is present
+ a) Set the Drive0 Status Register to 50h
+ b) Negate DASP-
+ If Drive0 and no Drive1 is present
+ a) Leave the Drive1 Status Register 00h
+ b) Set the Drive0 Status Register to 50h
+ c) Negate DASP-
+
+B.6 Software Reset Algorithm
+
+ 1) The software reset bit is set
+ 2) If Drive1
+ a) The hardware should set BUSY in the Drive1 Status Register
+ b) Negate the PDIAG- signal
+ NOTE: this must happen within 1 msec of the software reset
+ If Drive0 and Drive1 is present
+ a) The hardware should set BUSY in the Drive0 Status Register
+ If Drive0 and there is no Drive1 the hardware should:
+ a) Set BUSY in the Drive0 Status Register
+ b) Set the Drive1 Status Register to 80h
+ 3) Assert DASP-
+ 4) Finish all the hardware initialization needed to place the drive in reset
+ 5) Wait for the software reset bit to clear
+ 6) Finish all hardware initialization needed to get the drive ready
+ to receive any type of command from the host including:
+ a) Set the Sector Count Register to 01h
+ b) Set the Sector Number Register to 01h
+ c) Set the Cylinder Low Register to 00h
+ d) Set the Cylinder High Register to 00h
+ e) Set the Drive/Head Register to 00h
+ 7) If Drive1 and reset valid
+ a) Set the Error Register to Diagnostic Code 01h
+ b) Set the Drive1 Status Register to 50h
+ c) Assert PDIAG-
+ NOTE: All this must happen within 5 seconds of the clearing of
+ the software reset bit
+ If Drive1 and reset bad
+ a) Set the Error Register to the appropriate Diagnostic Code
+ b) Set the Drive1 Status Register to 50h
+ NOTE: All this must happen within 5 seconds of the clearing of
+ the software reset bit
+ If Drive0, reset valid, and a Drive1 is present
+ a) Test PDIAG- for 6 seconds or until PDIAG- is asserted by
+ Drive1
+ b) If PDIAG- is asserted within 6 seconds
+ i) Set the Error Register to Diagnostic Code 01h
+ c) If PDIAG- is not asserted within 6 seconds
+ i) Set the Error Register to 81h
+ d) Set the Drive0 Status Register to 50h
+ If Drive0, reset bad, and a Drive1 is present
+ a) Test PDIAG- for 31 seconds or until PDIAG- is asserted by
+ Drive1
+ b) If PDIAG- is asserted within 31 seconds
+ i) Set the Error Register to the appropriate Diagnostic Code
+ c) If PDIAG- is not asserted within 31 seconds
+ i) Set the Error Register to 80h + the appropriate code
+ d) Set the Drive0 Status Register to 50h
+ If Drive0, reset valid, and no Drive1 is present
+ a) Set the Error Register to Diagnostic Code 01h
+ b) Set the Drive1 Status Register to 00h
+ c) Set the Drive0 Status Register to 50h
+ If Drive0, reset bad, and no Drive1 is present
+ a) Set the Error Register to the appropriate Diagnostic Code
+ b) Set the Drive1 Status Register to 00h
+ c) Set the Drive0 Status Register to 50h
+
+B.7 Diagnostic Command Algorithm
+
+ 1) The diagnostics command is received
+ 2) If Drive1
+ a) The hardware should set BUSY in the Drive1 Status Register
+ b) Negate the PDIAG- signal
+ NOTE: this must happen within 1 msec after command acceptance
+ If Drive0 and Drive1 is present
+ a) The hardware should set BUSY in the Drive0 Status Register
+ If Drive0 and there is no Drive1 the hardware should
+ a) Set BUSY in the Drive0 Status Register
+ b) Set BUSY in the Drive1 Status Register
+ 3) Assert DASP-
+ 4) Perform all the drive diagnostics and note their results
+ 5) Finish all the hardware initialization needed to get the drive ready
+ to receive any type of command from the host including:
+ a) Set the Sector Count Register to 01h
+ b) Set the Sector Number Register to 01h
+ c) Set the Cylinder Low Register to 00h
+ d) Set the Cylinder High Register to 00h
+ e) Set the Drive/Head Register to 00h
+ 6) If Drive1 and passed
+ a) Set the Error Register to Diagnostic Code 01h
+ b) Set the Drive1 status to 50h
+ c) Assert PDIAG-
+ NOTE: All this must happen within 5 seconds of the acceptance
+ of the diagnostic command
+ If Drive1 and did not pass
+ a) Set the Error Register to the appropriate Diagnostic Code
+ b) Set the Drive1 status to 50h
+ NOTE: All this must happen within 5 seconds of the acceptance
+ of the diagnostic command
+ If Drive0, passed, and a Drive1 is present
+ a) Test PDIAG- for 6 seconds or until PDIAG- is asserted by
+ Drive1
+ b) If PDIAG- is asserted within 6 seconds
+ i) Set the Error Register to Diagnostic Code 01h
+ c) If PDIAG- is not asserted within 6 seconds
+ i) Set the Error Register to 81h
+ d) Set the Drive0 status to 50h
+ e) Issue interrupt to the host
+ If Drive0, did not pass, and a Drive1 is present
+ a) Test PDIAG- for 6 seconds or until PDIAG- is asserted by Drive1
+ b) If PDIAG- is asserted within 6 seconds
+ i) Set the Error Register to the appropriate Diagnostic Code
+ c) If PDIAG- is not asserted within seconds
+ i) Set the Error Register to 80h + the appropriate code
+ d) Set the Drive0 Status Register to 50h
+ e) Issue interrupt to the host
+ If Drive0, passed, and no Drive1 is present
+ a) Set the Error Register to Diagnostic Code 01h
+ b) Set the Drive1 Status Register to 00h
+ c) Set the Drive0 Status Register to 50h
+ d) Issue interrupt to the host
+ If Drive0, did not pass, and no Drive1 is present
+ a) Set the Error Register to the appropriate Diagnostic Code
+ b) Set the Drive1 Status Register to 00h
+ c) Set the Drive0 Status Register to 50h
+ d) Issue interrupt to the host
+
diff --git a/sys/doc/ata/ata-prt b/sys/doc/ata/ata-prt
new file mode 100644
index 000000000000..546510bcf6a0
--- /dev/null
+++ b/sys/doc/ata/ata-prt
@@ -0,0 +1,174 @@
+Copies of this proposal may be purchased from: CAM/89-002
+CAM Committee 408-867-6630
+14426 Black Walnut Ct, Saratoga CA 95070
+
+ working document of the
+ CAM (Common Access Method Committee)
+
+ draft proposal
+
+ ATA (AT Attachment)
+
+ Rev 2.1 June 11, 1990
+
+ABSTRACT: This standard defines mechanical, electrical, and functional
+requirements for attaching small computers employing an AT Bus with
+intelligent peripheral devices. The resulting interface provides a common
+interface specification for systems manufacturers, system integrators,
+controller manufacturers, and suppliers of intelligent disk drives.
+
+
+CAUTION: This is a preliminary draft of the proposed standard. It is subject
+to change without notice, at the sole discretion of the CAM Committee. It is
+likely that some sections may change significantly, and most sections will
+change to some extent in the course of further development of this draft
+standard. This draft is distributed solely for the purpose of review and
+comment, and it should not be used as a design document without assuming the
+risk of an early implementation.
+
+COPYRIGHT NOTICE: This draft standard is based upon product specifications of
+contributing members, these documents may be copyrighted by the individual
+companies. This draft standard may be reproduced without further permission,
+for the purpose of review and comment or for the purpose of including in an
+appropriate product specification provided the risk of early implementation is
+assumed. All other rights are reserved.
+
+
+POINTS OF CONTACT:
+
+ I. Dal Allan (CAM Committee Chairman)
+ ENDL
+ 14426 Black Walnut Court
+ Saratoga, CA 95070
+ (408) 867-6630
+
+
+
+If changes from the prior revision of this document are included, they may
+be identified by:
+
+ - change bars at the side of each paragraph or
+ - printed in bold or
+ - printed in italics or
+ - underscored in the text.
+
+The specific technique used will depend on the software used to detect the
+differences and the printer used to print the document.
+
+In the event that deleted text is identified by an overstrike, the Table of
+Contents will not be accurate.
+
+An electronic copy of this document is available from the CAM Committee
+(408-867-6630).
+
+This document has been prepared according to the style guide of the ISO
+(International Organization of Standards).
+
+
+If this document was printed in a 2-up form directly from the printer, NOTEs
+had to be adjusted to fit into a half-page, which may have resulted in an
+imperfect representation of the format within the NOTE. This is most likely
+to occur if a series of NOTEs are mixed in without any line separation.
+
+
+
+
+
+
+
+
+.. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+.. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+.. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+..
+.. Please look this revision over carefully. Larry and I have reviewed
+.. this document for editorial consistency.
+.. This is close to the final step in having a standards document.
+.. Please pay special attention to references, because any renumbering
+.. may mean a few boo-boos crept in. 
+..
+.. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+.. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+.. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+..
+.. EXPOSITORY REMARKS
+..
+..
+..
+..
+..
+..
+..
+..
+..I S O
+..
+..INTERNATIONAL ORGANIZATION FOR STANDARDIZATION
+..
+..
+..
+..
+..
+..
+.. Information Processing Systems --
+..
+.. Common Access Method AT Attachment
+..
+..
+..
+..
+..
+..
+..
+.. +-----------------------------------------+
+.. | +-------------------------------------+ |
+.. | | | |
+.. | | ISO 10***:198x | |
+.. | | | |
+.. | | | |
+.. | | | |
+.. | +-------------------------------------+ |
+.. +-----------------------------------------+
+..
+..
+..
+..
+..
+..
+..
+..
+.. Technical Editor: I. Dal Allan
+.. ENDL
+.. 14426 Black Walnut Court
+.. Saratoga
+.. CA 95070
+..
+.. Ph: 408-867-6630
+.. Fx: 408-867-2115
+.. Tx: 650-250-1752
+..
+..
+..foCommon Access Method AT Attachment
+..dm Merging ata-1 .dif
+..fi ata-1 .dif
+..dm Merging ata-2 .dif
+..fi ata-2 .dif
+..dm Merging ata-3 .dif
+..fi ata-3 .dif
+..dm Merging ata-4 .dif
+..fi ata-4 .dif
+..dm Merging ata-5 .dif
+..fi ata-5 .dif
+..dm Merging ata-6 .dif
+..fi ata-6 .dif
+..dm Merging ata-7 .dif
+..fi ata-7 .dif
+..dm Merging ata-8 .dif
+..fi ata-8 .dif
+..dm Merging ata-9 .dif
+..fi ata-9 .dif
+..dm Merging ata-10 .dif
+..fi ata-10 .dif
+..dm Merging ata-11 .dif
+..fi ata-11 .dif
+..dm Merging ata-apx .dif
+..fi ata-apx .dif
diff --git a/sys/doc/ata/ata-toc b/sys/doc/ata/ata-toc
new file mode 100644
index 000000000000..1866f7677596
--- /dev/null
+++ b/sys/doc/ata/ata-toc
@@ -0,0 +1,159 @@
+ TABLE OF CONTENTS
+
+ 1. Scope 1
+ 1.1 Description of Clauses 1
+
+ 2. References 1
+ 3. General Description 1
+ 3.1 Structure 2
+
+ 4. Definitions and Conventions 2
+ 4.1 Definitions 2
+ 4.2 Conventions 2
+
+ 5. Interface Cabling Requirements 3
+ 5.1 Configuration 3
+ 5.2 Addressing Considerations 4
+ 5.3 DC Cable and Connector 4
+ 5.3.1 4-Pin Power 4
+ 5.3.2 3-Pin Power 5
+ 5.3.3 Device Grounding 5
+
+ 5.4 I/O Connector 5
+ 5.5 I/O Cable 6
+
+ 6. Physical Interface 6
+ 6.1 Signal Conventions 6
+ 6.2 Signal Summary 7
+ 6.3 Signal Descriptions 9
+ 6.3.1 CS1FX- (Drive chip Select 0) 9
+ 6.3.2 CS3FX- (Drive chip Select 1) 9
+ 6.3.3 DA0-2 (Drive Address Bus) 10
+ 6.3.4 DASP- (Drive Active/Drive 1 Present) 10
+ 6.3.5 DD0-DD15 (Drive Data Bus) 10
+ 6.3.6 DIOR- (Drive I/O Read) 10
+ 6.3.7 DIOW- (Drive I/O Write) 10
+ 6.3.8 DMACK- (DMA Acknowledge) (Optional) 10
+ 6.3.9 DMARQ (DMA Request) (Optional) 11
+ 6.3.10 INTRQ (Drive Interrupt) 11
+ 6.3.11 IOCS16- (Drive 16-bit I/O) 11
+ 6.3.12 IORDY (I/O Channel Ready) (Optional) 12
+ 6.3.13 PDIAG- (Passed Diagnostics) 12
+ 6.3.14 RESET- (Drive Reset) 12
+ 6.3.15 SPSYNC (Spindle Synchronization) (Optional) 12
+
+ 7. Logical Interface 13
+ 7.1 General 13
+ 7.1.1 Bit Conventions 13
+ 7.1.2 Environment 13
+
+ 7.2 I/O Register Descriptions 14
+ 7.2.1 Alternate Status Register 14
+ 7.2.2 Command Register 15
+ 7.2.3 Cylinder High Register 15
+ 7.2.4 Cylinder Low Register 15
+ 7.2.5 Data Register 15
+ 7.2.6 Device Control Register 15
+ 7.2.7 Drive Address Register 16
+ 7.2.8 Drive/Head Register 16
+ 7.2.9 Error Register 16
+ 7.2.10 Features Register 17
+ 7.2.11 Sector Count Register 17
+ 7.2.12 Sector Number Register 17
+ 7.2.13 Status Register 18
+
+ 8. Programming Requirements 19
+ 8.1 Reset Response 19
+ 8.2 Translate Mode 19
+ 8.3 Power Conditions 20
+ 8.4 Error Posting 20
+
+ 9. Command Descriptions 21
+ 9.1 Check Power Mode 24
+ 9.2 Execute Drive Diagnostic 24
+ 9.3 Format Track 24
+ 9.4 Identify Drive 25
+ 9.4.1 Number of fixed cylinders 26
+ 9.4.2 Number of heads 27
+ 9.4.3 Number of unformatted bytes per track 27
+ 9.4.4 Number of unformatted bytes per sector 27
+ 9.4.5 Number of sectors per track 27
+ 9.4.6 Serial Number 27
+ 9.4.7 Buffer Type 27
+ 9.4.8 Firmware Revision 27
+ 9.4.9 Model Number 27
+ 9.4.10 PIO data transfer cycle timing mode 27
+ 9.4.11 DMA data transfer cycle timing mode 28
+
+ 9.5 Idle 28
+ 9.6 Idle Immediate 28
+ 9.7 Initialize Drive Parameters 28
+ 9.8 Recalibrate 28
+ 9.9 Read Buffer 28
+ 9.10 Read DMA 29
+ 9.11 Read Long 29
+ 9.12 Read Multiple Command 29
+ 9.13 Read Sector(s) 30
+ 9.14 Read Verify Sector(s) 30
+ 9.15 Seek 31
+ 9.16 Set Features 31
+ 9.17 Set Multiple Mode 31
+ 9.18 Sleep 32
+ 9.19 Standby 32
+ 9.20 Standby Immediate 32
+ 9.21 Write Buffer 32
+ 9.22 Write DMA 32
+ 9.23 Write Multiple Command 33
+ 9.24 Write Same 33
+ 9.25 Write Long 34
+ 9.26 Write Sector(s) 34
+ 9.27 Write Verify 34
+
+ 10. Protocol Overview 35
+ 10.1 PIO Data In Commands 35
+ 10.1.1 PIO Read Command 35
+ 10.1.2 PIO Read Aborted Command 36
+
+ 10.2 PIO Data Out Commands 36
+ 10.2.1 PIO Write Command 36
+ 10.2.2 PIO Write Aborted Command 37
+
+ 10.3 Non-Data Commands 37
+ 10.4 Miscellaneous Commands 37
+ 10.5 DMA Data Transfer Commands (Optional) 37
+ 10.5.1 Normal DMA Transfer 38
+ 10.5.2 Aborted DMA Transfer 38
+ 10.5.3 Aborted DMA Command 38
+
+ 11. Timing 39
+ 11.1 Deskewing 39
+ 11.2 Symbols 39
+ 11.3 Terms 39
+ 11.4 Data Transfers 40
+ 11.5 Power On and Hard Reset 42
+
+ FIGURES
+
+ FIGURE 5-1: ATA INTERFACE TO EMBEDDED BUS PERIPHERALS 3
+ FIGURE 5-2: HOST BUS ADAPTER AND PERIPHERAL DEVICES 4
+ FIGURE 5-3: ATA INTERFACE TO CONTROLLER AND PERIPHERAL DEVICES 4
+ FIGURE 5-4: 40-PIN CONNECTOR MOUNTING 6
+ FIGURE 11-1: PIO DATA TRANSFER TO/FROM DRIVE 40
+ FIGURE 11-2: IORDY TIMING REQUIRMENTS 41
+ FIGURE 11-3: DMA DATA TRANSFER 41
+ FIGURE 11-4 RESET SEQUENCE 42
+
+ TABLES
+
+ TABLE 5-1: DC INTERFACE 5
+ TABLE 5-2: DC INTERFACE 5
+ TABLE 5-3: CABLE PARAMETERS 6
+ TABLE 6-1: INTERFACE SIGNALS 8
+ TABLE 6-2: INTERFACE SIGNALS DESCRIPTION 9
+ TABLE 7-1: I/O PORT FUNCTIONS/SELECTION ADDRESSES 14
+ TABLE 8-1: POWER CONDITIONS 20
+ TABLE 8-2: REGISTER CONTENTS 21
+ TABLE 9-1: COMMAND CODES AND PARAMETERS 23
+ TABLE 9-2: DIAGNOSTIC CODES 24
+
+
diff --git a/sys/doc/ed.relnotes b/sys/doc/ed.relnotes
new file mode 100644
index 000000000000..c46c26124f8f
--- /dev/null
+++ b/sys/doc/ed.relnotes
@@ -0,0 +1,174 @@
+
+ Release Notes for 'ed' Device Driver
+ David Greenman, 24-May-1993
+ ------------------------------------
+
+Last updated: 22-November-1993
+
+INTRODUCTION
+------------
+ The 'ed' device driver is a new, high performance device driver supporting
+the Western Digital/SMC 80x3 series (including 'EtherCard PLUS' 'Elite16' and
+'Ultra'), the 3Com 3c503 (both 8 and 16 bit versions), and the Novell NE1000/
+NE2000. All of the ethernet controllers use the DS8390, 83C690, or 83C790
+Network Interface Controller (NIC). The differences between the boards are in
+their memory capacity, bus width (8/16 bits), special logic (asic) used to
+configure the board, and the host access method to the NIC memory (shared or
+programmed I/O). Every effort has been made to conform to the manufactures'
+specifications for the NIC and asic. This includes both normal operation and
+error recovery.
+
+PERFORMANCE
+-----------
+
+transmit
+--------
+ The 8390 doesn't provide a mechanism for chained write buffers, so it is
+very important for maximum performance to queue the next packet for
+transmission as soon as the current one has completed. On boards with 16k or
+more of memory, the NIC memory is divided in a way that allows enough space
+for two full size packets to be buffered for transmission. When sufficient
+data is available for transmission, a packet is copied into the NIC memory,
+the transmission is started, and then an additional packet is copied into the
+NIC memory (to a different memory area). As soon as the first packet has
+completed, transmission of a second packet can then be started immediately.
+This results in nearly the highest performance possible from ethernet.
+
+Packets go out on the 'wire' with the following format:
+
+preamble dest-addr src-addr type data FCS intr-frame
+64bits 48bits 48bits 16bits 1500bytes 32bits 96bits
+
+ With 10Mbits/sec, each bit is 100ns in duration. All of the above fields,
+except for data are of fixed length. With full sized packets (1500 bytes), the
+maximum unidirectional data rate can be calculated as: 6.4us + 4.8us + 4.8us +
+1.6us + 1200us + 3.2us + 9.6us = 1230.4us/packet = 812.74382 packets/second =
+1219115.7 (1190k) bytes/second. With TCP, there is a 40 byte overhead for the
+IP and TCP headers, so there is only 1460 bytes of data per packet. This
+reduces the maximum data rate to 1186606 bytes/second. With TCP, there will
+also be periodic acknowledgments which will reduce this figure somewhat both
+because of the additional traffic in the reverse direction and because of the
+occasional collisions that this will cause. Despite this, the data rate has
+still been consistantly measured at 1125000 (~1100k) bytes/second through a TCP
+socket. In these tests, the TCP window was set to 16384 bytes. With UDP, there
+is less overhead for the headers, and with 1472 bytes of data per packet, a
+data rate of 1196358.9 (1168k) bytes/sec is possible. UDP performance hasn't
+been precisely measured with this device driver, but less precise tests show
+this to be true (measured at around 1135k/second).
+
+receive
+-------
+ The 8390 implements an NIC memory ring-buffer to store incoming packets.
+The 8bit boards (8003, 3c503, and NE1000) usually have only 8k bytes of shared
+memory. This is only enough room for about 4 full size (1500 byte) packets.
+This can sometimes be a problem, especially on the original WD8003E and 3c503.
+This is because these boards' NIC memory access speed is also quite slow
+compared to newer 16bit boards - typically less than 1MB/second. The additional
+overhead of this slow memory access, and the fact that there is only room for 4
+full-sized packets means that the ring-buffer will occassionally overflow. When
+this happens, the board must be reset to avoid a lockup problem in early
+revision 8390's. Resetting the board will cause all of the data in the ring-
+buffer to be lost - requiring it to be re-transmitted/received...slowing things
+even further. Because of these problems, maximum throughput on boards of this
+type is only about 400-600k per second. The 16bit boards, however, have 16k of
+memory as well as much faster memory access speed. Typical memory access speed
+on these boards is about 1.7-4MB/second (with the Novell NE2000 being the
+slowest and the SMC 8013 being the fastest). These boards generally have no
+problems keeping up with full ethernet speed. The only problem I've seen with
+these boards is related to the (slow) performance of the BSD Net/2 malloc code
+when additional mbufs must be added to the pool. This can sometimes increase
+the total time to remove a packet enough for a ring-buffer overflow to occur.
+This tends to be highly transient, and quite rare on fast machines. I've only
+seen this problem when doing tests with large amounts of UDP traffic without
+any acknowledgments (uni-directional). Again, this has been very rare.
+
+ All of the above tests were done using a 486DX2/66, 486DX/33, 386DX/40,
+8-9Mhz ISA bus, using FreeBSD 1.0. TCP tests were done with the 'ttcp'
+performance test utility, and also with FTP client/server. UDP tests were done
+with a modified version of ttcp (to work around a bug in the BSD Net/2 UDP
+code related to queue depth), and also with NFS.
+
+KERNEL INSTALLATION
+-------------------
+ (Note that this driver comes standard in FreeBSD 1.0, NetBSD 0.9, and 386BSD
+0.2, and therefore doesn't require installation)
+ To 'install' this driver, the files if_ed.c and if_edreg.h must be copied
+into the i386/isa kernel source directory and the following line must be
+added into the file i386/conf/files.i386:
+
+i386/isa/if_ed.c optional ed device-driver
+
+ To build a kernel that includes this driver, first comment out any 'we',
+'ec', or 'ne' devices in your kernel config file. Then, add a line similar to
+the following (modify to match your cards configuration):
+
+device ed0 at isa? port 0x300 net irq 10 iomem 0xcc000 vector edintr
+
+ Note that the 'iosiz' option is not needed because the driver automatically
+figures this out. However, if you have problems with this, it can be specified
+to force the use of the size you specify.
+ The iomem 0xcc000 option is not need for NE1000/NE2000 boards because they
+use programmed I/O rather than shared memory to access the NIC's memory.
+ On 3Com boards, the tranceiver must be enabled in software (there is no
+hardware default). In this driver, this is controlled using the "LLC0" link-
+level control flag. The default for this flag can be set in your kernel config
+file by specifying 'flags 0x01' in the 'ed' device specification line (this
+is necessary for diskless support). Otherwise, the tranceiver is easily enabled
+and disabled with a command like "ifconfig ed0 -llc0" to enable the tranceiver
+or "ifconfig ed0 llc0" to disable it; this assumes that you have the modified
+ifconfig(8) that originally appeared in the 386BSD patchkit. To specify the
+'flags' option, use a line similar to:
+
+device ed0 at isa? port 0x300 net irq 10 flags 0x01 iomem 0xcc000 vector edintr
+
+ Flags can be similarly specified to force 8 or 16bit mode, and disabling
+the use of transmitter double buffering. The various supported flag values
+are:
+
+ Disable tranceiver 0x01
+ Force 8 bit mode 0x02
+ Force 16 bit mode 0x04
+ Disable multi TX buffering 0x08
+
+ To use multiple flags, simply add the values together. Note that these
+numbers are in hexadecimal. If the 'Force 8 bit' and 'Force 16 bit' flags are
+both specified, the 8 bit flag has precedence.
+ The use of the above flags should only be necessary under exceptional
+conditions where the probe routine incorrectly determines the board type (such
+is the case with Compex boards, which require the 16bit flag and an iosiz
+16384), or where the high performance of the transmitter causes problems with
+other vendors hardware.
+
+
+KNOWN PROBLEMS
+--------------
+
+1) Early revision DS8390B chips have problems. They lock-up whenever the
+ receive ring-buffer overflows. They occassionally switch the byte order
+ of the length field in the packet ring header (several different causes
+ of this related to an off-by-one byte alignment) - resulting in "NIC
+ memory corrupt - invalid length NNNNN" messages. The board is reset
+ whenever these problems occur, but otherwise there is no problem with
+ recovering from these conditions.
+2) 16bit boards that use shared memory can conflict with 8bit BIOSes, BIOS
+ extensions (like the VGA), and 8bit devices with shared memory (again
+ like the VGA, or perhaps a second ethernet board). There is a work-
+ around for this in the driver, however. The problem is that the
+ ethernet board stays in 16bit mode, asserting its '16bit' signal on
+ the ISA bus. This signal is shared by other devices/ROMs in the same
+ 128K memory segment as the ethernet card - causing the CPU to read the
+ 8bit ROMs as if they were 16bit wide. The work-around involves setting
+ the host access to the shared memory to 16bits only when the memory is
+ actually accessed, and setting it back to 8bit mode all other times.
+ Without this work-around, the machine will hang whenever a reboot is
+ attempted. This work-around also allows the board to co-exist with
+ other 8bit devices that have shared memory. This has only been
+ implemented for SMC/WD boards, but I haven't seen this problem with
+ 3Com boards (i.e. if you have a 3Com board, you might experiance the
+ above problem - I haven't specifically tested for it).
+3) The NIC memory access to 3Com and Novell boards is much slower than it is on
+ SMC boards; it's less than 1MB on 8bit boards and less than 2MB/second
+ on the 16bit boards. This can lead to ring-buffer overruns resulting in
+ additional lost data during heavy network traffic.
+
+$Id: ed.relnotes,v 1.1 1994/03/30 20:36:33 wollman Exp $
diff --git a/sys/doc/memory-test.doc b/sys/doc/memory-test.doc
new file mode 100644
index 000000000000..cda44f7f1a48
--- /dev/null
+++ b/sys/doc/memory-test.doc
@@ -0,0 +1,40 @@
+Message-Id: <199403270118.RAA00584@corbin.Root.COM>
+From: David Greenman <davidg@root.com>
+To: "Jordan K. Hubbard" <jkh@whisker.hubbard.ie>
+Cc: csgr@alpha.ru.ac.za, freebsd-hackers@freefall.cdrom.com
+Subject: Re: Boune Buffers : Crash and Burn ^&%$&&^%
+Date: Sat, 26 Mar 1994 17:18:04 -0800
+
+>Ummm. I suppose it would be stupid to wonder whether or not this is good
+>memory you just stuck in there? :-) It does raise the point: David - what
+>does your memory test do when it finds memory errors?
+
+ The order of events is like this:
+
+1) Determine amount of memory by looking at CMOS.
+2) Do memory test of this memory, starting at the highest address and going
+backwards.
+3) If a bad page is found, TRUNCATE the physical memory to end just before
+this page. Continue until all memory is tested.
+
+ So all memory past the lowest bad page is ignored. The number of pages that
+were chopped are then reported as # of "bad pages" when the memory information
+is printed. If there aren't any, then nothing is printed.
+ The rationale for not constructing a bit mask and weeding out just the
+pages that test bad is a flimsy one - doing so would have required moving the
+memory test into the machine independant portion of the VM system, and would
+have required much trickier coding. Since the main purpose of this was to
+verify that what the CMOS was telling us was correct, and also to identify
+when there is bad memory, trying to make the best of it when there really is
+some bad memory didn't seem important to me. ..but hey, if somebody wants to
+recode it, I won't complain. :-)
+ The problem that Terry eluded to, but didn't state, is where you test memory
+for the purpose of determining how much you have. This is problematic because
+many memory controllers will generate a fatal NMI when you 'test' non-existant
+memory (i.e. the parity check fails, and the condition is handled less than
+gracefully), and can also happen with some memory controllers that do strange
+address wrapping in the non-existant memory area. Compaq machines are alledged
+to be suseptable to one of these two problems.
+
+-DG
+
diff --git a/sys/doc/options.doc b/sys/doc/options.doc
new file mode 100644
index 000000000000..178eaf0b3c59
--- /dev/null
+++ b/sys/doc/options.doc
@@ -0,0 +1,682 @@
+$Id: options.doc,v 1.10 1994/06/28 14:00:21 jkh Exp $
+
+ This file documents the configuration options available in the
+FreeBSD operating system.
+
+ Copyright (C) 1993, 1994, Garrett A. Wollman. All rights reserved.
+
+ Redistribution and use in source and printed forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice and this list of conditions.
+ 2. Redistributions in printed form must reproduce the above copyright
+ notice, this list of conditions and the following notice of
+ authorship.
+
+ Trademarks are property of their respective owners.
+
+FreeBSD Configuration Options
+*****************************
+
+ This document describes kernel configuration options relevant to the
+FreeBSD operating system between versions 1.1 and 1.2. It is intended
+for readers who already have a general understanding of the process of
+configuring a BSD kernel and wish to get a general overview of the
+meaning of various configuration options. This document covers
+configurable options and pseudo-devices; it is intended that devices may
+be added at a later date.
+
+Options for Subsystems
+**********************
+
+ This chapter discusses options controlling the inclusion of various
+subsystems in FreeBSD. These include things like filesystems,
+networking modules, and whatnot. Remember that options containing
+underscores must be quoted.
+
+`pseudo-device bpfilter NUMBER'
+ The `bpfilter' pseudo-device is the Berkeley Packet Filter,
+ developed by Lawrence Berkeley Labs and based on an earlier packet
+ filter from Stanford. See the `bpf' manual page for more details.
+ The NUMBER given is the maximum number of simultaneous users
+ permitted. (NB: in previous version of BPF, the NUMBER had to be
+ greater than the number of interfaces; this space is now
+ dynamically allocated so this requirement is no longer present.)
+
+`options CCITT'
+ The `CCITT' option enables support for the ITU-T X.25(1980)
+ network-layer protocol. Nobody we know has a direct X.25
+ connection to anything, so this code has never been tested.
+
+ This option will likely be removed in a future release of FreeBSD.
+
+`options "COMPAT_42"'
+ This option is used to disable UDP checksumming. Under ordinary
+ circumstances it should never ever ever be defined; however, if
+ you are stuck trying to communicate with an old 4.2BSD machine, or
+ one running something derived from 4.2 like SunOS 3.5 or Ultrix
+ 2.0, this may be necessary in order to successfully receive UDP
+ packets.
+
+ This option will be replaced by run-time configuration in a future
+ release of FreeBSD.
+
+`options "COMPAT_43"'
+ This option controls a whole host of features, mostly relating to
+ system-call compatibilty with 4.3BSD. At the present time, it
+ should not be turned off, as many utilities and library routines
+ still depend on these obsolescent system calls being present. At
+ some future date, this will probably be split up into two separate
+ options, one for binary compatibility and one for the old but
+ useful system calls.
+
+`options "COMPAT_102"'
+ This option, which is not yet implemented, will control whether
+ certain entry points which were system calls in FreeBSD 1.0.2 but
+ have been replaced with library routines, are supported in the
+ kernel for backwards compatiblity.
+
+`options "DIRECTED_BROADCAST"'
+ If this option is enabled, the kernel will support sending IP
+ broadcast packets to subnets other than the one that the machine
+ is on, and when forwarding will accept such packets. That is to
+ say, if your host lives on subnets `132.198.3' and `132.198.4',
+ and the `132.198.3' side receives a packet addressed to
+ `132.198.4.255', it will forward the packet as a broadcast on that
+ subnet.
+
+ This option will likely be replaced by run-time configuration in a
+ future release of FreeBSD.
+
+`options "DISKLABEL_UNPROTECTED"'
+ This options disables the checks which normally protects the
+ disklabel from being overwritten. This allows dd of=/dev/rwd0d
+ if=file bs=8k to restore an diskimage.
+
+`pseudo-device ether'
+ This pseudo-device provides link-layer support for Ethernet device
+ drivers. It is mandatory for all systems which include Ethernet or
+ Ethernet-like devices, such as `ed', `ie', and `is'. This code is
+ due for a redesign.
+
+`options EON'
+`pseudo-device eon'
+ The `eon' network interface supports the ISO 8473
+ Connectionless-Mode Network Protocol, tunnelled through IP version
+ 4. `eon' interfaces are created automatically once initially
+ configured by adding ISO routes with IP destinations. At present,
+ both the pseudo-device and option declaration are necessary.
+
+ This option will likely be removed in a future release of FreeBSD.
+
+`options FIFO'
+ This option enables support for System V- and POSIX-style named
+ pipes or fifos.
+
+`options GATEWAY'
+`options IPFORWARDING=VALUE'
+`options IPSENDREDIRECTS=VALUE'
+ These three options control whether FreeBSD's IP forwarding
+ functions are enabled. Technically speaking, because FreeBSD does
+ not meet the standards set out in the "Router Requirements"
+ document (RFC 1009), these should not be enabled, but sometimes it
+ is necessary to enable this function. The `GATEWAY' option turns
+ on `IPFORWARDING', and also controls the sizing of certain system
+ tables. The `IPFORWARDING' option controls the initial value of
+ the `ipforwarding' kernel variable (default 1 if `GATEWAY'
+ defined, 0 otherwise), which controls whether packets are acutally
+ forwarded or not; VALUE should be either `0' or `1'.
+ `IPSENDREDIRECTS' controls the initial value of the
+ `ipsendredirects' variable (default is one, but should be changed
+ to zero); its VALUE should also be either `0' or `1'.
+
+ This option will be replaced by run-time configuration in a future
+ release of FreeBSD.
+
+`options INET'
+ This option controls the inclusion of the Internet protocol suite,
+ including IP version 4, TCP, UDP, and ICMP. Support for IP
+ multicast, IP next generation, and IGMP will be provided at a
+ future date. It is not recommended to even attempt to generate a
+ system with this option turned off, as many parts of the system
+ depend on Internet networking in important and subtle ways.
+
+`options ISO'
+`options TPIP'
+ These options control the inclusion of ISO OSI networking
+ protocols. The TPIP option includes just enough support to run
+ ISO Transport Protocol class 4 over IP, supporing the
+ `SOCK_SEQPACKET' abstraction. The ISO option includes support for
+ CLNP, TP class 0, ISO 9542 ESIS, and IEEE 802.2 logical link
+ control class 0 (for CLNP only).
+
+ This option will likely be removed in a future release of FreeBSD.
+
+`options ISOFS'
+ The `ISOFS' option enables kernel support for the ISO 9660 CD-ROM
+ filesystem, including RockRidge extensions.
+
+`options "ISO_X25ESIS"'
+ This option controls whether ISO 9542 ESIS is run over ITU-T X.25
+ link layers. This requires the `CCITT' option to be enabled as
+ well.
+
+ This option will likely be removed in a future release of FreeBSD.
+
+`options KTRACE'
+ This option enables the tracing of several classes of internal
+ kernel events. See the `ktrace' command for more details.
+ Recommended.
+
+`pseudo-device log'
+ The `log' pseudo-device provides kernel support to send kernel
+ messages to `syslog'. It is mandatory.
+
+`pseudo-device loop'
+ The `loop' pseudo-device provides the trivial network interface.
+ It is required when any networking options are enabled.
+
+`options MACHVMCOMPAT'
+ This option enables a Mach-compatible interface to the virtual
+ memory subsystem, supporting system calls `vm_allocate',
+ `vm_deallocate', `vm_inherit', and `vm_protect'. (Given the
+ nature of the VM system, it is impossible to support a Mach-style
+ `vm_region' call, and in every case the `map' argument is ignored
+ and replaced with the calling process's own map.)
+
+`options MFS'
+ This option enables support for the memory filesystem, an in-core
+ filesystem which lives in the swap area. Using MFS as a `/tmp'
+ filesystem can dramatically increase the speed of
+ temporary-space-intensive operations such as compilations. See the
+ `mount_mfs' manual page for more details.
+
+`options MULTICAST'
+ Enable multicast support for things like vat, nv, etc.
+
+`options MROUTING'
+ Enable multicast routing support (generally goes hand-in-hand with
+ the above). See also mrouted(1).
+
+`options NFS'
+ The `NFS' option enables support for Sun's Network File System.
+ (Also called "Nightmare" or "Not a"....) This presently includes
+ both client- and server-side kernelized NFS support; it may in the
+ future be broken into separate options. This NFS implmentation
+ comes to BSD courtesy of Rick Macklem of the University of Guelph,
+ and is not derived from Sun licensed source code. As a result,
+ there are sometimes interoperability problems where the published
+ specification is vague, and this option supports several new and
+ useful features compared to Sun's. See the `mount' manual page
+ for more details.
+
+`options NS'
+`options NSIP'
+ `NS' controls the inclusion of support for the Xerox Network
+ Service protocol family. At the present time, it is not known
+ whether this code even works; testers are welcome. The `NSIP'
+ option enables encapsulation of XNS IDP over IP.
+
+ These options will likely be removed in a future release of
+ FreeBSD.
+
+`options "PANIC_REBOOT_WAIT_TIME=TIME"'
+ This option controls how long the system waits after a panic
+ before it reboots. If a TIME of zero is specified, it reboots
+ immediately; otherwise, TIME is the number of seconds to wait
+ before rebooting. If, during the waiting period, a key is hit on
+ the console, the countdown stops and the system will wait for the
+ user to copy down the panic message and hit another key before
+ rebooting.
+
+`options PCFS'
+ This option controls support for mounting MS-DOS disks and disk
+ partitions under FreeBSD. The `pcfs' manual page is presently very
+ bogus.
+
+`pseudo-device ppp NUMBER'
+ The `ppp' pseudo-device provides support for the Internet
+ Point-to-Point protocol (RFC 1351 et seq), implemented as a line
+ discipline over standard serial links. NUMBER should be the
+ number of simultaneous PPP interfaces which will be configured.
+
+`pseudo-device pty NUMBER'
+ This pseudo-device provides support for pseudo-ttys, which are
+ required for `rlogin', `telnet', and `xterm' to operate correctly;
+ NUMBER should be set to the total number of these programs you
+ expect to have running at any given time. Because pty's are not
+ as yet dynamically allocated, and the underlying structures are
+ large, it is best to keep this value as small as feasible, until
+ this deficiency is remedied.
+
+`options QUOTA'
+ The `QUOTA' option enables support for disk quotas. Note that NFS
+ quota support is not available.
+
+`pseudo-device sl NUMBER'
+ This pseudo-device provides support for the Serial Line Internet
+ Protocol (RFC 1055), implemented as a line discipline over standard
+ serial links. It includes support for Van Jacobson header
+ compression. NUMBER should be the number of simultaneous SLIP
+ interfaces which will be configured. See also the `slattach'
+ manual page.
+
+`options SYSVSHM'
+`options SYSVSEM'
+`options SYSVMSG'
+`options SHMMAXPGS=VALUE'
+ The `SYSVSHM' option enables kernel-side emulation of System
+ V-compatible shared memory. The `SHMMAXPGS' option (default 64
+ pages or 256K) determines the maximum amount of shared memory
+ available under this mechanism. The `SYSVSEM' option provides
+ emulation of System V-compatible semaphores, and likewise
+ `SYSVMSG' for message queues.
+
+`options "TCP_COMPAT_42"'
+ This option controls the perpetuation of several bugs inherited
+ from the 4.2BSD implementation of TCP. It should only be defined
+ in the circumstances outlined for `COMPAT_42', above.
+
+ This option will likely be replaced by run-time configuration in a
+ future release of FreeBSD.
+
+`pseudo-device tun'
+ The `tun' driver provides a network interface which is attached to
+ a character device. In this way, a user-mode program can grab
+ packets out of the networking system, fiddle with them or move
+ them around, and pass stuff packets back up into the kernel. It
+ is not known if this device either compiles or operates correctly,
+ although it was believed to do both at some time in the past.
+
+`options UCONSOLE'
+ This option allows any old user to grab kernel output away from the
+ console and send it to the tty of their choice. It presents an
+ incredile security hole for some systems, but is necessary in
+ order to allow programs like `xconsole' to operate.
+
+`options XSERVER'
+ This obsolescent option enables support in the `pc' console driver
+ for certain operations required by the XFree86 server.
+
+Performace and Debugging Options
+********************************
+
+ The following options are provided for system performace
+optimization. Note that kernel profiling is supported via the `-p'
+option to the `config' command; for more information see the `config'
+manual page.
+
+`psuedo-device ddb'
+ This option enables the `ddb' debugger, taken from Mach. See the
+ `ddb' and `dbsym' manual pages for more information on the use of
+ this debugger.
+
+`options DIAGNOSTIC'
+`options NAMEI_DIAGNOSTIC'
+`options PARANOID'
+ These debugging options reduce performace. They are intended to
+ enable certain internal consistency checks which are not supposed
+ to fail during correct operation, and so are normally disabled for
+ performace reasons.
+
+`options FASTLINKS'
+ The `FASTLINKS' option enables the creation of symbolic links whose
+ target names reside entirely within the i-node of the link, when
+ possible. This results in faster access for those links which are
+ short enough (in practice, most of them). All kernels can read
+ such links, but only `FASTLINKS' kernels will create them, for
+ compatibility with older kernels lacking such support.
+
+`options ICMPPRINTFS'
+ This option is defined to allow debugging of ICMP ("Internet
+ Control Message Protocol") packets in the kernel. When defined
+ and the `icmpprintfs' kernel variable (default false) is set to
+ true, ICMP packets will be printed out to the console when
+ received. Note that it is probably better to use `tcpdump' for
+ this kind of debugging.
+
+`options KGDB'
+ The `KGDB' option enables certain bits of kernel code which will
+ eventually be able to talk to a remote copy of the `gdb' debugger
+ over a serial connection. The present code does not work, but
+ users are invited to hack on it and contribute the changes back to
+ the FreeBSD team.
+
+`options MAXMEM=SIZE'
+ The `MAXMEM' option controls how much memory the kernel will
+ recognize on bootup, specified in kilobytes. This may be useful
+ for dealing with certain broken attachment busses (or the adapters
+ thereon) which are unable to deal with memory beyond a certain
+ address.
+
+`options SUBNETSARELOCAL'
+ This option controls whether the TCP system believes that machines
+ on other subnets of your network are considered to be "local" to
+ your host. For most systems, this option should be on (the
+ default); if you are directly connected to a class A network,
+ however, then it may need to be turned off. (This is true of
+ networks like the MILNET.)
+
+`options "SYMTAB_SPACE=VALUE"'
+ This obsolescent option controls the amount of space that will be
+ statically allocated in the debugger source code to hold the kernel
+ symbol table that `dbsym' sticks there. Eventually this will be
+ dynamically allocated at load time. The default VALUE is 63000
+ bytes.
+
+`options "UPDATE_INTERVAL=VALUE"'
+ This option controls the wait time between successive `sync'
+ operations run by the `update' system process (pid 3). This option
+ will be replaced by run-time configuration in a future release of
+ FreeBSD.
+
+`options DUMMY_NOPS'
+ This option controls the use of real Nops for bus operations.
+ This might break on older systems so should be used with care.
+
+Device Options
+**************
+
+ There are different device selections available depending on the
+type of bus present in your computer. We will cover generic FreeBSD
+devices, ISA-bus devices, and EISA-bus devices. A separate section
+describes the devices available in the SCSI subsystem.
+
+Generic Devices and Options
+===========================
+
+ The following devices and options are available in all FreeBSD
+configurations. In addition to these devices, a selection of ISA
+devices (*note ISA::.) is required in order to generate a workable
+system.
+
+`machine "i386"'
+ This mandatory declaration informs the `config' program that you
+ are using an i386 or compatible CPU, and enables the selection of
+ all the other devices listed here.
+
+`cpu "I386_CPU"'
+`cpu "I486_CPU"'
+ These two options control which specific CPUs will be supported by
+ the generated kernel. If the kernel detects that it is not
+ running on a CPU for which support was enabled, it will panic
+ quickly upon startup. If you do not expect to need to run your
+ kernel on an i386 or similar CPU, leaving out that support can
+ increase virtual memory system performance.
+
+`options "MATH_EMULATE"'
+ When this option is defined, the math coprocessor emulator is
+ compiled into the kernel. When it is not defined and the
+ coprocessor is absent, programs which use floating-point
+ operations are automatically killed.
+
+`device npx0 at isa? port "IO_NPX" irq 13 vector npxintr'
+ The `npx' device provides support for the i387 numeric coprocessor
+ and the floating-point portions of the i486 CPU. This will
+ eventually be fixed to not require ISA to be configured.
+
+`pseudo-device speaker'
+ The `speaker' pseudo-device provides support for rudimentary access
+ to the PC's speaker via `/dev/spkr'. It provides a
+ character-device interface which interprets `PLAY' strings similar
+ to IBM PC Advanced BASIC, as well as an `ioctl' interface with more
+ fine-grained control. See the `spkr' manual page for more
+ information.
+
+ISA-bus Devices and Options
+===========================
+
+ The following options are specific to ISA-bus devices and systems.
+Since the EISA bus is backwards-compatible with the ISA bus, all these
+options also apply to EISA systems. The same goes for VESA Local Bus
+(VL-Bus) systems.
+
+`controller isa0'
+ This *mandatory* declaration must precede any other devices listed
+ in this section. It provides the basic support for the ISA-bus
+ glue logic, including DMA and autoconfiguration.
+
+`controller aha0 at isa? port "IO_AHA0" bio irq 11 drq 5 vector ahaintr'
+`options "TUNE_1542"'
+ The `aha' device supports the Adaptec 154x series of SCSI
+ controllers, and attempts to support other vendors' controllers
+ which claim compatibility with the Adaptec 1542, such as the
+ BusLogic 545. This device is included in the `GENERICAH'
+ distribution kernel. The `scbus' device (*note SCSI::.) is a
+ prerequisite for this device.
+
+ Some older versions of this code would attempt to set the
+ controller's bus access speed to the fastest possible without
+ losing data; we have found that this makes the driver unusable for
+ some users. If you wish to enable this optimization, or if you
+ suspect that your SCSI transfers are running slower than they
+ should, then you can use the `TUNE_1542' option to enable
+ bus-timing detection.
+
+`controller bt0 at isa? port "IO_BT0" bio irq 12 vector btintr'
+ This device supports the Bustek 742 SCSI controller. It is
+ included in the `GENERICBT' distribution kernel; the `scbus' device
+ (*note SCSI::.) is a prerequisite.
+
+`options ALLOW_CONFLICT_IOADDR'
+ Allow devices on the ISA bus to share conflicting IO address
+ spaces. This is generally an error, though things like PS/2 mouse
+ drivers which are implemented seperately from the keyboard driver
+ will require this option to be set. Note that this is almost
+ always sub-optimal, and the current PS/2 mouse driver will, in
+ fact, frequently fight with the keyboard if you try to use them
+ concurrently. Needing this option enabled is a sure sign that you
+ need to consider a different design for your driver.
+
+`options ALLOW_CONFLICT_IRQ'
+ Allow devices on the ISA bus to share conflicting IRQ's. This is
+ often necessary for multiport serial cards which have several
+ devices at the same IRQ. Enable this only with caution!
+
+`options COM_MULTIPORT'
+ This option enables support in the `sio' serial driver for certain
+ multi-port serial boards.
+
+`device ed0 at isa? port 0x280 net irq 5 iomem 0xd8000 vector edintr'
+`device ed1 at isa? port 0x300 net irq 5 iomem 0xd8000 vector edintr'
+ The `ed' network interface driver provides support for the Western
+ Digital/SMC 80x3 series, the 3Com 3c503, and Novell NE1000 and
+ NE2000 series of Ethernet controllers. It automatically detects
+ differences among the various versions of these controllers and
+ adapts appropriately. The `ed1' line shown is for the Novell
+ boards; the `ed0' line is appropriate for all other supported
+ controllers. (The Novell controllers cannot be configured to use
+ port 0x280.)
+
+`controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr'
+`disk fd0 at fdc0 drive 0'
+`disk fd1 at fdc0 drive 1'
+`tape ft0 at fdc0 drive 2'
+ The `fdc' driver provides support for the standard PC floppy-disk
+ controller. The `fd' sub-driver supports 3.5- and 5.25-inch
+ floppy disks in the standard 360KB, 720KB, 1200KB, 1440KB, and
+ 2880KB formats, as well as a number of other formats not supported
+ by DOS. The `ft' driver is available for QIC-80 "floppy tape"
+ support. The drivers support formatting of both tapes and disks.
+ This driver is substantially improved from that shipped in
+ previous releases of FreeBSD.
+
+`device ie0 at isa? port 0x360 net irq 7 iomem 0xd0000 vector ieintr'
+ This network interface driver provides support for the AT&T
+ StarLAN 10 and EN100 family of controllers. Note that the
+ configuration specified here is not the default configuration, but
+ one which attempts to deal with the conflicts that arise in more
+ modern systems. (It is expected that this driver will be expanded
+ in the future to support other similar cards in the manner of
+ `ed'.)
+
+`device is0 at isa? port 0x280 net irq 10 drq 7 vector isintr'
+ The `is' network interface driver supports the Isolan 4141-0 and
+ Isolink 4110 Ethernet controllers.
+
+`device lpt0 at isa? port "IO_LPT1" tty'
+`device lpt0 at isa? port "IO_LPT1" tty irq 7 vector lptintr'
+`device lpt0 at isa? port ? tty irq 7 vector lptintr'
+`device lpt0 at isa? port ? tty'
+ The `lpt' driver provides support for the parallel printer driver
+ accessed as `/dev/lptN' (N=0, 1, ...). The current version of
+ this driver provides support for either polled or interrupt-driven
+ ports, a unification of the `lpt' and `lpa' drivers from FreeBSD
+ 1.1.
+
+ The first and second examples show explicit selection of a port
+ address. If the port is not specified, as in the third and fourth
+ examples, the driver defaults to whatever address the BIOS printer
+ driver would have used. The second and third examples select
+ interrupt-driven I/O; if polled mode is specified, as in the first
+ and fourth examples, it is impossible to enable interrupt-driven
+ access at run time.
+
+ If you receive "ISA strayintr 7" messages correlated with the use
+ of the polled mode of `lpt', chances are that your controller
+ supports interrupt-driven operation, and you should switch to that
+ mode.
+
+`device mcd0 at isa? port 0x300 bio irq 10 vector mcdintr'
+ This device provides support for the Mitsumi non-SCSI CD-ROM drive.
+ Performance is known to be quite slow.
+
+`device pc0 at isa? port "IO_KBD" tty irq 1 vector pcrint'
+`device sc0 at isa? port "IO_KBD" tty irq 1 vector scintr'
+`options NCONS=VALUE'
+`options COMCONSOLE'
+ The `pc' and `sc' devices provide support for the system display
+ and keyboard, which is the default console. There might actually
+ be documentation somewhere for both of these. The `sc' device
+ requires the `NCONS' option to be defined to some value; it
+ represents the number of virtual consoles to be provided by the
+ driver; a reasonable value is 8. One of `pc' or `sc' is presently
+ required unless `COMCONSOLE' is enabled, in which case a serial
+ port is made into the console.
+
+`device psm0 at isa? port "IO_KBD" tty irq 12 vector psmintr'
+ This driver provides support for the IBM-style PS/2 mouse now
+ popular on many PCs. This driver shares an address with the
+ console driver and therefore requires that the option
+ `ALLOW_CONFLICT_IOADDR' also be set. It is also important that
+ the console driver (`pc' or `sc') *preceed* this driver in your
+ kernel configuration file in order to get priority. All in all,
+ this driver is a hack and should really be integrated into the
+ console driver itself, evidence of which can be easily seen when
+ trying to use the mouse and keyboard at the same time in X (try
+ it). Volunteers willing to clean this up and do it properly are
+ most welcome!
+
+`device sio0 at isa? port "IO_COM1" tty irq 4 vector siointr'
+`device sio1 at isa? port "IO_COM2" tty irq 3 vector siointr'
+`device sio2 at isa? port "IO_COM3" tty irq 5 vector siointr'
+`device sio3 at isa? port "IO_COM4" tty irq 9 vector siointr'
+ The `sio' driver provides support for high-speed serial
+ communications using the standard 8250, 16450, and 16550 UART
+ chips. It provides a standard tty interface for these devices as
+ `/dev/ttyUNIT', and, when enabled with the `comcontrol' program, a
+ call-out capability as `/dev/cuaUNIT' (UNIT is two digits,
+ zero-padded in both cases). Certain multi-port systems are also
+ supported.
+
+`device uha0 at isa? port "IO_UHA0" bio irq 14 drq 5 vector uhaintr'
+ This device supports the Ultrastor 14F and related SCSI
+ controllers. It is included in the `GENERICBT' distribution
+ kernel, and requires `scbus' (*note SCSI::.) as a prerequisite.
+ The Ultrastor 24F is not supported.
+
+`controller wdc0 at isa? port "IO_WD1" bio irq 14 vector wdintr'
+`disk wd0 at wdc0 drive 0'
+`disk wd1 at wdc0 drive 1'
+ The `wd' device supports standard ST-506, RLL, ESDI, and IDE hard
+ disks, as controlled by the Western Digital WD100x series of
+ controllers (and compatible hardware). This version is
+ substantially improved from that provided in FreeBSD 1.0.
+
+`device wt0 at isa? port 0x300 bio irq 5 drq 1 vector wtintr'
+ This driver supports Archive QIC-02 and Wangtek QIC-02 and QIC-36
+ cartridge tape controllers.
+
+`device ze0 at isa? port 0x300 net irq 5 iomem 0xd8000 vector zeintr'
+ This driver supports certain PCMCIA ethernet cards. It was
+ originally written for the IBM Credit Card Adapter and has also
+ been tested with the National Semi `InfoMover' PCMCIA card.
+
+EISA-bus Devices and Options
+============================
+
+ There is presently only one EISA-specific device driver.
+
+`controller ahb0 at isa? bio irq 11 vector ahbintr'
+ The `ahb' driver provides support for the Adaptec AHA-174x series
+ of SCSI controllers. This controller is included in the
+ `GENERICAH' distribution kernel, and requires the `scbus' driver
+ (*note SCSI::.) as a prerequisite.
+
+Micro Channel Devices and Options
+=================================
+
+ We don't support Micro Channel right now. Anyone interested in
+working on Micro Channel support should send mail to
+`FreeBSD-Questions@freefall.cdrom.com' for information on how to help.
+
+PCI Devices and Options
+=======================
+
+ We don't support PCI, either. Anyone interested in working on PCI
+support should send mail to `FreeBSD-Questions@freefall.cdrom.com' for
+information on how to help.
+
+The SCSI Subsystem
+==================
+
+ The SCSI subsystem consists of a set of adaptor-specific driver
+routines, which were described in the previous sections, and the generic
+SCSI device drivers, which handle the standardized interactions with
+devices on the SCSI bus.
+
+`device cd0'
+ The `cd' device provides support for CD-ROM drives. Only one `cd'
+ device need be configured, as the driver automatically allocates
+ units for each CD-ROM drive found. Playing of audio CDs is also
+ supported, on drives which support it, through `ioctl' calls.
+ Support for retrieval of CD audio over the SCSI bus is not
+ presently available.
+
+`device ch0'
+ The `ch' driver supports SCSI media changers; this may include
+ tape, removable disk, and CD changers. One `ch' device should be
+ configured for each changer you expect to support.
+
+`device scbus0'
+ This driver forms the core of the SCSI subsystem. It provides the
+ device-independent routines that manage SCSI transactions, keep
+ track of attached devices, and act as glue between
+ SCSI-device-specific drivers and system-specific host adaptors.
+ This device is *mandatory* for all SCSI systems.
+
+`device sd0'
+ The `sd' driver provides access to non-removable SCSI disks. One
+ `sd' device should be defined for each disk you expect to have
+ simultaneously connected to the system.
+
+`device st0'
+ The `st' driver supports generic SCSI tape drives. One `st'
+ device should be defined for each tape drive you wish to access.
+ See the `st' manual page for information about how to manipulate
+ the parameters of this device.
+
+`device uk0'
+ The `uk' driver provides an attachment point for all otherwise
+ unrecognized SCSI devices. You can't actually do anything with
+ such a device, except perhaps send it an inquiry command using the
+ `scsi' program (q.v.).
+
+Internal Use Only
+*****************
+
+ Eventually, this chapter will document some of the kernel manifest
+constants which are not defines, but which can be tweaked in various
+header files.
+
diff --git a/sys/doc/options.texi b/sys/doc/options.texi
new file mode 100644
index 000000000000..7df30b8b442b
--- /dev/null
+++ b/sys/doc/options.texi
@@ -0,0 +1,1074 @@
+\input texinfo @c -*- texinfo -*-
+@c -----------------------------------------------------------------------
+@c Thus spoke the elders in days long gone by:
+@c How to edit: use an existing entry as template, keep the file sorted
+@c using the most keyword-ish thing. When done, make sure /usr/gnu/bin
+@c is in your path, run "make" and THEN "cvs commit".
+@c -----------------------------------------------------------------------
+@c %**start of header
+@setfilename options.info
+@settitle Configuration Options for FreeBSD
+@c @setchapternewpage odd
+@c function index is option/pseudo/device names; concept is everything
+@c else
+@syncodeindex fn cp
+@finalout
+@c %**end of header
+
+@ifinfo
+$Id: options.texi,v 1.11 1994/06/28 06:10:40 jkh Exp $
+
+This file documents the configuration options available in the FreeBSD
+operating system.
+
+@display
+Copyright @copyright{} 1993, 1994, Garrett A. Wollman. All rights reserved.
+
+Redistribution and use in source and printed forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice and this list of conditions.
+2. Redistributions in printed form must reproduce the above copyright
+ notice, this list of conditions and the following notice of
+ authorship.
+
+Trademarks are property of their respective owners.
+@end display
+@end ifinfo
+
+@titlepage
+@title Configuration Options in FreeBSD
+@subtitle for FreeBSD 1.1.5
+@author Garrett A. Wollman
+@author FreeBSD Project
+
+@page
+@vskip 0pt plus 1filll
+
+i386, i387, and i486 are trademarks of Intel Corporation. SunOS is a
+registered trademark and NFS is a trademark of Sun Microsystems, Inc.
+Ultrix is a registered trademark of Digital Equipment Corporation.
+Xerox is a registered trademark and XNS is a trademark of Xerox
+Corporation. VESA is a trademark of the Video Electronics Standards
+Association. System V is a registered trademark of Novell Corporation.
+All other trademarks are property of their respective owners. FreeBSD
+is nobody's trademark, and damn proud of it.
+
+Copyright @copyright{} 1993, 1994, Garrett A. Wollman. All rights reserved.
+
+Redistribution and use in source and printed forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+@enumerate
+@item
+Redistributions of source code must retain the above copyright
+notice and this list of conditions.
+
+@item
+Redistributions in printed form must reproduce the above copyright
+notice, this list of conditions and the preceding notice of
+authorship.
+@end enumerate
+@end titlepage
+
+@node Top, Subsystems, (dir), (dir)
+@top FreeBSD Configuration Options
+
+This document describes kernel configuration options relevant to the
+FreeBSD operating system between versions 1.1 and 1.2. It is intended
+for readers who already have a general understanding of the process of
+configuring a BSD kernel and wish to get a general overview of the
+meaning of various configuration options. This document covers
+configurable options and pseudo-devices; it is intended that devices may
+be added at a later date.
+
+@menu
+* Subsystems:: Controlling subsystems.
+* Performance:: Performance enhancement.
+* Devices:: Device-control options.
+* Internals:: Non-user-serviceable parts.
+
+* Index:: General Index.
+@end menu
+
+@node Subsystems, Performance, Top, Top
+@c node,next,prev,up
+
+@chapter Options for Subsystems
+
+This chapter discusses options controlling the inclusion of various
+subsystems in FreeBSD. These include things like filesystems,
+networking modules, and whatnot. Remember that options containing
+underscores must be quoted.
+
+@table @code
+@item pseudo-device bpfilter @var{number}
+@findex bpfilter
+@cindex Berkeley packet filter
+@cindex Network interfaces
+The @samp{bpfilter} pseudo-device is the Berkeley Packet Filter,
+developed by Lawrence Berkeley Labs and based on an earlier packet
+filter from Stanford. See the @samp{bpf} manual page for more details.
+The @var{number} given is the maximum number of simultaneous users
+permitted. (NB: in previous version of BPF, the @var{number} had to be
+greater than the number of interfaces; this space is now dynamically
+allocated so this requirement is no longer present.)
+
+@item options CCITT
+@findex CCITT
+@cindex X.25
+@cindex Networking domains
+The @samp{CCITT} option enables support for the ITU-T X.25(1980)
+network-layer protocol. Nobody we know has a direct X.25 connection to
+anything, so this code has never been tested.
+
+This option will likely be removed in a future release of FreeBSD.
+
+@item options "COMPAT_42"
+@findex COMPAT_42
+@cindex UDP Checksums
+@cindex Checksums, UDP
+@cindex 4.2 Compatibility
+@cindex Compatibility options
+This option is used to disable UDP checksumming. Under ordinary
+circumstances it should never ever ever be defined; however, if you are
+stuck trying to communicate with an old 4.2BSD machine, or one running
+something derived from 4.2 like SunOS 3.5 or Ultrix 2.0, this may be
+necessary in order to successfully receive UDP packets.
+
+This option will be replaced by run-time configuration in a future
+release of FreeBSD.
+
+@item options "COMPAT_43"
+@findex COMPAT_43
+@cindex 4.3 Compatibility
+@cindex Compatibility options
+This option controls a whole host of features, mostly relating to
+system-call compatibilty with 4.3BSD. At the present time, it should
+not be turned off, as many utilities and library routines still depend
+on these obsolescent system calls being present. At some future date,
+this will probably be split up into two separate options, one for binary
+compatibility and one for the old but useful system calls.
+
+@item options "COMPAT_102"
+@findex COMPAT_102
+@cindex FreeBSD 1.0.2 compatibility
+@cindex 1.0.2 Compatibility
+@cindex Compatibility options
+This option, which is not yet implemented, will control whether certain
+entry points which were system calls in FreeBSD 1.0.2 but have been
+replaced with library routines, are supported in the kernel for
+backwards compatiblity.
+
+@item options "DIRECTED_BROADCAST"
+@findex DIRECTED_BROADCAST
+@cindex IP
+@cindex UDP
+If this option is enabled, the kernel will support sending IP broadcast
+packets to subnets other than the one that the machine is on, and when
+forwarding will accept such packets. That is to say, if your host lives
+on subnets @samp{132.198.3} and @samp{132.198.4}, and the
+@samp{132.198.3} side receives a packet addressed to
+@samp{132.198.4.255}, it will forward the packet as a broadcast on that
+subnet.
+
+This option will likely be replaced by run-time configuration in a
+future release of FreeBSD.
+
+@item options "DISKLABEL_UNPROTECTED"
+@findex DISKLABEL_UNPROTECTED
+@cindex disk
+@cindex disklabel
+@cindex rawdisk
+This options disables the checks which normally protects the disklabel from
+being overwritten. This allows dd of=/dev/rwd0d if=file bs=8k to restore
+an diskimage.
+
+@item pseudo-device ether
+@findex ether
+@cindex Ethernet
+@cindex Network interfaces
+This pseudo-device provides link-layer support for Ethernet device
+drivers. It is mandatory for all systems which include Ethernet or
+Ethernet-like devices, such as @samp{ed}, @samp{ie}, and @samp{is}.
+This code is due for a redesign.
+
+@item options EON
+@itemx pseudo-device eon
+@findex EON
+@cindex ISO 8473 CLNP
+@cindex Network interfaces
+The @samp{eon} network interface supports the ISO 8473
+Connectionless-Mode Network Protocol, tunnelled through IP version 4.
+@samp{eon} interfaces are created automatically once initially
+configured by adding ISO routes with IP destinations. At present, both
+the pseudo-device and option declaration are necessary.
+
+This option will likely be removed in a future release of FreeBSD.
+
+@item options FIFO
+@findex FIFO
+@cindex Named pipes
+This option enables support for System V-- and POSIX-style named pipes
+or fifos.
+
+@item options GATEWAY
+@itemx options IPFORWARDING=@var{value}
+@itemx options IPSENDREDIRECTS=@var{value}
+@findex GATEWAY
+@findex IPFORWARDING
+@findex IPSENDREDIRECTS
+@cindex ICMP
+@cindex IP
+@cindex Network parameters
+These three options control whether FreeBSD's IP forwarding functions
+are enabled. Technically speaking, because FreeBSD does not meet the
+standards set out in the ``Router Requirements'' document (RFC 1009),
+these should not be enabled, but sometimes it is necessary to enable
+this function. The @samp{GATEWAY} option turns on @samp{IPFORWARDING},
+and also controls the sizing of certain system tables. The
+@samp{IPFORWARDING} option controls the initial value of the
+@samp{ipforwarding} kernel variable (default 1 if @samp{GATEWAY}
+defined, 0 otherwise), which controls whether packets are acutally
+forwarded or not; @var{value} should be either @samp{0} or @samp{1}.
+@samp{IPSENDREDIRECTS} controls the initial value of the
+@samp{ipsendredirects} variable (default is one, but should be changed
+to zero); its @var{value} should also be either @samp{0} or @samp{1}.
+
+This option will be replaced by run-time configuration in a future
+release of FreeBSD.
+
+@item options INET
+@findex INET
+@cindex IP
+@cindex TCP
+@cindex UDP
+@cindex ICMP
+@cindex Networking domains
+This option controls the inclusion of the Internet protocol suite,
+including IP version 4, TCP, UDP, and ICMP. Support for IP multicast,
+IP next generation, and IGMP will be provided at a future date. It is
+not recommended to even attempt to generate a system with this option
+turned off, as many parts of the system depend on Internet networking in
+important and subtle ways.
+
+@item options ISO
+@itemx options TPIP
+@findex ISO
+@findex TPIP
+@cindex ISO 8473 CLNP
+@cindex ISO TP4
+@cindex ISO TP0
+@cindex ISO 9542 ESIS
+@cindex IEEE 802.2 LLC
+@cindex Networking domains
+These options control the inclusion of ISO OSI networking protocols.
+The TPIP option includes just enough support to run ISO Transport
+Protocol class 4 over IP, supporing the @samp{SOCK_SEQPACKET}
+abstraction. The ISO option includes support for CLNP, TP class 0,
+ISO 9542 ESIS, and IEEE 802.2 logical link control class 0 (for CLNP
+only).
+
+This option will likely be removed in a future release of FreeBSD.
+
+@item options ISOFS
+@findex ISOFS
+@cindex ISO 9660 filesystem
+@cindex CD-ROM
+@cindex Rock Ridge filesystem
+@cindex Filesystems
+The @samp{ISOFS} option enables kernel support for the ISO 9660 CD-ROM
+filesystem, including RockRidge extensions.
+
+@item options "ISO_X25ESIS"
+@findex ISO_X25ESIS
+@cindex ISO 9542 ESIS
+@cindex X.25
+This option controls whether ISO 9542 ESIS is run over ITU-T X.25 link
+layers. This requires the @samp{CCITT} option to be enabled as well.
+
+This option will likely be removed in a future release of FreeBSD.
+
+@item options KTRACE
+@findex KTRACE
+@cindex Kernel tracing
+This option enables the tracing of several classes of internal kernel
+events. See the @samp{ktrace} command for more details. Recommended.
+
+@item pseudo-device log
+@findex log
+@cindex Kernel message logging
+The @samp{log} pseudo-device provides kernel support to send kernel
+messages to @samp{syslog}. It is mandatory.
+
+@item pseudo-device loop
+@findex loop
+@cindex Network interfaces
+The @samp{loop} pseudo-device provides the trivial network interface.
+It is required when any networking options are enabled.
+
+@item options MACHVMCOMPAT
+@findex MACHVMCOMPAT
+@cindex Mach virtual memory
+This option enables a Mach-compatible interface to the virtual memory
+subsystem, supporting system calls @samp{vm_allocate},
+@samp{vm_deallocate}, @samp{vm_inherit}, and @samp{vm_protect}.
+(Given the nature of the VM system, it is impossible to support a
+Mach-style @samp{vm_region} call, and in every case the `map' argument
+is ignored and replaced with the calling process's own map.)
+
+@item options MFS
+@findex MFS
+@cindex Memory filesystem
+@cindex Filesystems
+This option enables support for the memory filesystem, an in-core
+filesystem which lives in the swap area. Using MFS as a @file{/tmp}
+filesystem can dramatically increase the speed of
+temporary-space-intensive operations such as compilations. See the
+@samp{mount_mfs} manual page for more details.
+
+@item options MULTICAST
+@findex MULTICAST
+@cindex Multicast IP
+@cindex Networking
+Enable multicast support for things like vat, nv, etc.
+
+
+@item options MROUTING
+@findex MROUTING
+@cindex Multicast Routing
+@cindex Networking
+Enable multicast routing support (generally goes hand-in-hand with the
+above). See also mrouted(1).
+
+@item options NFS
+@findex NFS
+@cindex Network File System
+@cindex Filesystems
+The @samp{NFS} option enables support for Sun's Network File System.
+(Also called ``Nightmare'' or ``Not a''@dots{}.) This presently includes
+both client-- and server-side kernelized NFS support; it may in the
+future be broken into separate options. This NFS implmentation comes to
+BSD courtesy of Rick Macklem of the University of Guelph, and is not
+derived from Sun licensed source code. As a result, there are sometimes
+interoperability problems where the published specification is vague,
+and this option supports several new and useful features compared to
+Sun's. See the @samp{mount} manual page for more details.
+
+@item options NS
+@itemx options NSIP
+@findex NS
+@findex NSIP
+@cindex Xerox Network System
+@cindex XNS IDP
+@cindex XNS SPP
+@cindex Network interfaces
+@samp{NS} controls the inclusion of support for the Xerox Network
+Service protocol family. At the present time, it is not known whether
+this code even works; testers are welcome. The @samp{NSIP} option
+enables encapsulation of XNS IDP over IP.
+
+These options will likely be removed in a future release of FreeBSD.
+
+@item options "PANIC_REBOOT_WAIT_TIME=@var{time}"
+@findex PANIC_REBOOT_WAIT_TIME
+@cindex Kernel panics
+This option controls how long the system waits after a panic before it
+reboots. If a @var{time} of zero is specified, it reboots immediately;
+otherwise, @var{time} is the number of seconds to wait before rebooting.
+If, during the waiting period, a key is hit on the console, the
+countdown stops and the system will wait for the user to copy down the
+panic message and hit another key before rebooting.
+
+@item options PCFS
+@findex PCFS
+@cindex MS-DOS filesystem
+@cindex Filesystems
+This option controls support for mounting MS-DOS disks and disk
+partitions under FreeBSD. The @samp{pcfs} manual page is presently very
+bogus.
+
+@item pseudo-device ppp @var{number}
+@findex ppp
+@cindex Point-To-Point Protocol
+@cindex Network interfaces
+The @samp{ppp} pseudo-device provides support for the Internet
+Point-to-Point protocol (RFC 1351 @i{et seq}), implemented as a line
+discipline over standard serial links. @var{number} should be the
+number of simultaneous PPP interfaces which will be configured.
+
+@item pseudo-device pty @var{number}
+@findex pty
+@cindex Pseudo-terminals
+This pseudo-device provides support for pseudo-ttys, which are required
+for @samp{rlogin}, @samp{telnet}, and @samp{xterm} to operate correctly;
+@var{number} should be set to the total number of these programs you
+expect to have running at any given time. Because pty's are not as yet
+dynamically allocated, and the underlying structures are large, it is
+best to keep this value as small as feasible, until this deficiency is
+remedied.
+
+@item options QUOTA
+@findex QUOTA
+@cindex Disk quotas
+@cindex Filesystems
+The @samp{QUOTA} option enables support for disk quotas. Note that NFS
+quota support is not available.
+
+@item pseudo-device sl @var{number}
+@findex sl
+@cindex Serial Line Internet Protocol
+@cindex SLIP
+@cindex CSLIP
+@cindex IP
+@cindex Network interfaces
+This pseudo-device provides support for the Serial Line Internet
+Protocol (RFC 1055), implemented as a line discipline over standard
+serial links. It includes support for Van Jacobson header compression.
+@var{number} should be the number of simultaneous SLIP interfaces which
+will be configured. See also the @samp{slattach} manual page.
+
+@item options SYSVSHM
+@item options SYSVSEM
+@item options SYSVMSG
+@itemx options SHMMAXPGS=@var{value}
+@findex SYSVSHM
+@findex SYSVSEM
+@findex SYSVMSG
+@findex SHMMAXPGS
+@cindex System V shared memory
+@cindex System V semaphores
+@cindex System V message queues
+@cindex System V IPC
+@cindex Shared memory, System V
+@cindex Semaphores, System V
+@cindex Message queues, System V
+@cindex IPC, System V
+The @samp{SYSVSHM} option enables kernel-side emulation of System
+V-compatible shared memory. The @samp{SHMMAXPGS} option (default 64
+pages or 256K) determines the maximum amount of shared memory available
+under this mechanism. The @samp{SYSVSEM} option provides emulation of
+System V-compatible semaphores, and likewise @samp{SYSVMSG} for message
+queues.
+
+@item options "TCP_COMPAT_42"
+@findex TCP_COMPAT_42
+@cindex 4.2 Compatibility
+@cindex Compatibility options
+@cindex TCP
+This option controls the perpetuation of several bugs inherited from the
+4.2BSD implementation of TCP. It should only be defined in the
+circumstances outlined for @samp{COMPAT_42}, above.
+
+This option will likely be replaced by run-time configuration in a
+future release of FreeBSD.
+
+@item pseudo-device tun
+@findex tun
+@cindex Network interfaces
+The @samp{tun} driver provides a network interface which is attached to
+a character device. In this way, a user-mode program can grab packets
+out of the networking system, fiddle with them or move them around, and
+pass stuff packets back up into the kernel. It is not known if this
+device either compiles or operates correctly, although it was believed
+to do both at some time in the past.
+
+@item options UCONSOLE
+@findex UCONSOLE
+@cindex Console redirection
+This option allows any old user to grab kernel output away from the
+console and send it to the tty of their choice. It presents an
+incredile security hole for some systems, but is necessary in order to
+allow programs like @samp{xconsole} to operate.
+
+@item options XSERVER
+@findex XSERVER
+@cindex X Window System
+This obsolescent option enables support in the @samp{pc} console
+driver for certain operations required by the XFree86 server.
+@end table
+
+@node Performance, Devices, Subsystems, Top
+@c node,next,prev,up
+
+@chapter Performace and Debugging Options
+
+The following options are provided for system performace optimization.
+Note that kernel profiling is supported via the @samp{-p} option to the
+@samp{config} command; for more information see the @samp{config} manual
+page.
+
+@table @code
+@item psuedo-device ddb
+@findex ddb
+@cindex Kernel debugger
+@cindex Debugger, kernel
+This option enables the @samp{ddb} debugger, taken from Mach. See the
+@samp{ddb} and @samp{dbsym} manual pages for more information on the use
+of this debugger.
+
+@item options DIAGNOSTIC
+@itemx options NAMEI_DIAGNOSTIC
+@itemx options PARANOID
+@findex DIAGNOSTIC
+@findex NAMEI_DIAGNOSTIC
+@findex PARANOID
+@cindex Debugging options
+These debugging options reduce performace. They are intended to enable
+certain internal consistency checks which are not supposed to fail
+during correct operation, and so are normally disabled for performace
+reasons.
+
+@item options FASTLINKS
+@findex FASTLINKS
+@cindex Symbolic links
+@cindex Filesystems
+The @samp{FASTLINKS} option enables the creation of symbolic links whose
+target names reside entirely within the i-node of the link, when
+possible. This results in faster access for those links which are short
+enough (in practice, most of them). All kernels can read such links,
+but only @samp{FASTLINKS} kernels will create them, for compatibility
+with older kernels lacking such support.
+
+@item options ICMPPRINTFS
+@findex ICMPPRINTFS
+@cindex Debugging options
+@cindex ICMP
+This option is defined to allow debugging of ICMP (@dfn{Internet Control
+Message Protocol}) packets in the kernel. When defined and the
+@samp{icmpprintfs} kernel variable (default false) is set to true, ICMP
+packets will be printed out to the console when received. Note that it
+is probably better to use @samp{tcpdump} for this kind of debugging.
+
+@item options KGDB
+@findex KGDB
+@cindex Kernel debugger
+@cindex Debugger, kernel
+@cindex Remote debugging
+The @samp{KGDB} option enables certain bits of kernel code which will
+eventually be able to talk to a remote copy of the @samp{gdb} debugger
+over a serial connection. The present code does not work, but users are
+invited to hack on it and contribute the changes back to the FreeBSD
+team.
+
+@item options MAXMEM=@var{size}
+@findex MAXMEM
+The @samp{MAXMEM} option controls how much memory the kernel will
+recognize on bootup, specified in kilobytes. This may be useful for
+dealing with certain broken attachment busses (or the adapters thereon)
+which are unable to deal with memory beyond a certain address.
+
+@item options SUBNETSARELOCAL
+@findex SUBNETSARELOCAL
+@cindex TCP
+@cindex Network parameters
+This option controls whether the TCP system believes that machines on
+other subnets of your network are considered to be ``local'' to your
+host. For most systems, this option should be on (the default); if you
+are directly connected to a class A network, however, then it may need
+to be turned off. (This is true of networks like the MILNET.)
+
+@item options "SYMTAB_SPACE=@var{value}"
+@findex SYMTAB_SPACE
+@cindex Debugger, kernel
+@cindex Kernel debugger
+This obsolescent option controls the amount of space that will be
+statically allocated in the debugger source code to hold the kernel
+symbol table that @samp{dbsym} sticks there. Eventually this will be
+dynamically allocated at load time. The default @var{value} is 63000
+bytes.
+
+@item options "UPDATE_INTERVAL=@var{value}"
+@findex UPDATE_INTERVAL
+@cindex Update process
+This option controls the wait time between successive @samp{sync}
+operations run by the @samp{update} system process (pid 3). This option
+will be replaced by run-time configuration in a future release of
+FreeBSD.
+
+@item options DUMMY_NOPS
+@findex DUMMY_NOPS
+@cindex Fast i/o bus operations
+This option controls the use of real Nops for bus operations.
+This might break on older systems so should be used with care.
+
+@end table
+
+@node Devices, Internals, Performance, Top
+
+@chapter Device Options
+
+There are different device selections available depending on the type of
+bus present in your computer. We will cover generic FreeBSD devices,
+ISA-bus devices, and EISA-bus devices. A separate section describes the
+devices available in the SCSI subsystem.
+
+@menu
+* Generic:: Devices available in all FreeBSD systems.
+* ISA:: Devices specific to the ISA bus.
+* EISA:: Devices specific to the EISA bus.
+* MCA:: No support for Micro Channel, yet.
+* PCI:: No support for PCI, yet.
+* SCSI:: The SCSI subsystem.
+@end menu
+
+@node Generic, ISA,, Devices
+@section Generic Devices and Options
+
+The following devices and options are available in all FreeBSD
+configurations. In addition to these devices, a selection of ISA
+devices (@pxref{ISA}) is required in order to generate a workable
+system.
+
+@table @code
+@item machine "i386"
+@findex i386
+This mandatory declaration informs the @samp{config} program that you
+are using an i386 or compatible CPU, and enables the selection of all
+the other devices listed here.
+
+@item cpu "I386_CPU"
+@itemx cpu "I486_CPU"
+@findex I386_CPU
+@findex I486_CPU
+These two options control which specific CPUs will be supported by the
+generated kernel. If the kernel detects that it is not running on a CPU
+for which support was enabled, it will panic quickly upon startup. If
+you do not expect to need to run your kernel on an i386 or similar CPU,
+leaving out that support can increase virtual memory system performance.
+
+@item options "MATH_EMULATE"
+@findex MATH_EMULATE
+@cindex Floating-point emulator
+@cindex i387
+When this option is defined, the math coprocessor emulator is compiled
+into the kernel. When it is not defined and the coprocessor is absent,
+programs which use floating-point operations are automatically killed.
+
+@item device npx0 at isa? port "IO_NPX" irq 13 vector npxintr
+@findex npx
+@cindex i386
+The @samp{npx} device provides support for the i387 numeric coprocessor
+and the floating-point portions of the i486 CPU. This will eventually
+be fixed to not require ISA to be configured.
+
+@item pseudo-device speaker
+@findex speaker
+The @samp{speaker} pseudo-device provides support for rudimentary access
+to the PC's speaker via @file{/dev/spkr}. It provides a
+character-device interface which interprets @samp{PLAY} strings similar
+to IBM PC Advanced BASIC, as well as an @samp{ioctl} interface with more
+fine-grained control. See the @samp{spkr} manual page for more
+information.
+@end table
+
+@node ISA, EISA, Generic, Devices
+@section ISA-bus Devices and Options
+
+The following options are specific to ISA-bus devices and systems.
+Since the EISA bus is backwards-compatible with the ISA bus, all these
+options also apply to EISA systems. The same goes for VESA Local Bus
+(VL-Bus) systems.
+
+@table @code
+@item controller isa0
+@findex isa
+This @strong{mandatory} declaration must precede any other devices
+listed in this section. It provides the basic support for the ISA-bus
+glue logic, including DMA and autoconfiguration.
+
+@item controller aha0 at isa? port "IO_AHA0" bio irq 11 drq 5 vector ahaintr
+@item options "TUNE_1542"
+@findex aha
+@findex TUNE_1542
+@cindex Adaptec 154x
+@cindex SCSI host adaptors
+The @samp{aha} device supports the Adaptec 154x series of SCSI
+controllers, and attempts to support other vendors' controllers which
+claim compatibility with the Adaptec 1542, such as the BusLogic 545.
+This device is included in the @samp{GENERICAH} distribution kernel.
+The @samp{scbus} device (@pxref{SCSI}) is a prerequisite for this
+device.
+
+Some older versions of this code would attempt to set the controller's
+bus access speed to the fastest possible without losing data; we have
+found that this makes the driver unusable for some users. If you wish
+to enable this optimization, or if you suspect that your SCSI transfers
+are running slower than they should, then you can use the @samp{TUNE_1542}
+option to enable bus-timing detection.
+
+@item controller bt0 at isa? port "IO_BT0" bio irq 12 vector btintr
+@findex bt
+@cindex Bustek 742
+@cindex SCSI host adaptors
+This device supports the Bustek 742 SCSI controller. It is included in
+the @samp{GENERICBT} distribution kernel; the @samp{scbus} device
+(@pxref{SCSI}) is a prerequisite.
+
+@item options ALLOW_CONFLICT_IOADDR
+@findex ALLOW_CONFLICT_IOADDR
+@cindex Allow IO Address Conflict
+@cindex ISA device management
+Allow devices on the ISA bus to share conflicting IO address spaces.
+This is generally an error, though things like PS/2 mouse drivers which
+are implemented seperately from the keyboard driver will require this
+option to be set. Note that this is almost always sub-optimal, and the
+current PS/2 mouse driver will, in fact, frequently fight with the
+keyboard if you try to use them concurrently. Needing this option
+enabled is a sure sign that you need to consider a different design for
+your driver.
+
+@item options ALLOW_CONFLICT_IRQ
+@findex ALLOW_CONFLICT_IRQ
+@cindex Allow IRQ Conflict
+@cindex ISA device management
+
+Allow devices on the ISA bus to share conflicting IRQ's. This is often
+necessary for multiport serial cards which have several devices at the
+same IRQ. Enable this only with caution!
+
+@item options COM_MULTIPORT
+@findex COM_MULTIPORT
+@cindex Multi-port serial boards
+@cindex Serial ports
+This option enables support in the @samp{sio} serial driver for certain
+multi-port serial boards.
+
+@item device ed0 at isa? port 0x280 net irq 5 iomem 0xd8000 vector edintr
+@itemx device ed1 at isa? port 0x300 net irq 5 iomem 0xd8000 vector edintr
+@findex ed
+@cindex Western Digital 80x3
+@cindex 3Com 3C503
+@cindex Novel NE1000/NE2000
+@cindex Network interfaces
+@cindex Ethernet
+The @samp{ed} network interface driver provides support for the Western
+Digital/SMC 80x3 series, the 3Com 3c503, and Novell NE1000 and NE2000
+series of Ethernet controllers. It automatically detects differences
+among the various versions of these controllers and adapts
+appropriately. The @samp{ed1} line shown is for the Novell boards; the
+@samp{ed0} line is appropriate for all other supported controllers.
+(The Novell controllers cannot be configured to use port 0x280.)
+
+@item controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr
+@itemx disk fd0 at fdc0 drive 0
+@itemx disk fd1 at fdc0 drive 1
+@itemx tape ft0 at fdc0 drive 2
+@findex fd
+@findex ft
+@cindex Floppy disk
+@cindex Floppy tape
+@cindex QIC-80
+@cindex Tape drives
+@cindex Cartridge tape drives
+@cindex Quarter-Inch-Cartridge (QIC) tape drives
+@cindex Disk drives
+The @samp{fdc} driver provides support for the standard PC floppy-disk
+controller. The @samp{fd} sub-driver supports 3.5-- and 5.25-inch
+floppy disks in the standard 360KB, 720KB, 1200KB, 1440KB, and 2880KB
+formats, as well as a number of other formats not supported by DOS. The
+@samp{ft} driver is available for QIC-80 ``floppy tape'' support.
+The drivers support formatting of both tapes and disks. This driver is
+substantially improved from that shipped in previous releases of
+FreeBSD.
+
+@item device ie0 at isa? port 0x360 net irq 7 iomem 0xd0000 vector ieintr
+@findex ie
+@cindex AT&T EN100
+@cindex AT&T StarLAN 10
+@cindex Network interfaces
+@cindex Ethernet
+@cindex StarLAN
+This network interface driver provides support for the AT&T StarLAN 10
+and EN100 family of controllers. Note that the configuration specified
+here is not the default configuration, but one which attempts to deal
+with the conflicts that arise in more modern systems. (It is expected
+that this driver will be expanded in the future to support other similar
+cards in the manner of @samp{ed}.)
+
+@item device is0 at isa? port 0x280 net irq 10 drq 7 vector isintr
+@findex is
+@cindex Isolan 4141-0
+@cindex Isolink 4110
+@cindex Ethernet
+@cindex Network interfaces
+The @samp{is} network interface driver supports the Isolan 4141-0 and
+Isolink 4110 Ethernet controllers.
+
+@c @item device ix0 at isa? port 0x320 net irq 10 iomem 0xd0000 iosiz 32768 \
+@c @itemx vector ixintr
+@c @findex ix
+@c @cindex Intel EtherEXPRESS
+@c @cindex Ethernet
+@c @cindex Network interfaces
+@c This device is known to exist, but is not presently in the FreeBSD
+@c source tree. When it is made available, this information will be
+@c updated.
+
+@item device lpt0 at isa? port "IO_LPT1" tty
+@itemx device lpt0 at isa? port "IO_LPT1" tty irq 7 vector lptintr
+@itemx device lpt0 at isa? port ? tty irq 7 vector lptintr
+@itemx device lpt0 at isa? port ? tty
+@findex lpa
+@findex lpt
+@cindex Parallel printers
+
+The @samp{lpt} driver provides support for the parallel printer driver
+accessed as @file{/dev/lpt@var{N}} (@var{N}=0, 1, @dots{}). The current
+version of this driver provides support for either polled or
+interrupt-driven ports, a unification of the @samp{lpt} and @samp{lpa}
+drivers from FreeBSD 1.1.
+
+The first and second examples show explicit selection of a port address.
+If the port is not specified, as in the third and fourth examples, the
+driver defaults to whatever address the BIOS printer driver would have
+used. The second and third examples select interrupt-driven I/O; if
+polled mode is specified, as in the first and fourth examples, it is
+impossible to enable interrupt-driven access at run time.
+
+If you receive ``ISA strayintr 7'' messages correlated with the use of
+the polled mode of @samp{lpt}, chances are that your controller supports
+interrupt-driven operation, and you should switch to that mode.
+
+
+@item device mcd0 at isa? port 0x300 bio irq 10 vector mcdintr
+@findex mcd
+@cindex Mitsumi CD-ROM
+@cindex CD-ROM
+This device provides support for the Mitsumi non-SCSI CD-ROM drive.
+Performance is known to be quite slow.
+
+@c mse, anyone?
+
+@item device pc0 at isa? port "IO_KBD" tty irq 1 vector pcrint
+@itemx device sc0 at isa? port "IO_KBD" tty irq 1 vector scintr
+@itemx options NCONS=@var{value}
+@itemx options COMCONSOLE
+@findex pc
+@findex sc
+@findex NCONS
+@findex COMCONSOLE
+@cindex Console devices
+@cindex pccons
+@cindex Syscons
+@cindex Virtual consoles
+@cindex X Window System
+The @samp{pc} and @samp{sc} devices provide support for the system
+display and keyboard, which is the default console. There might
+actually be documentation somewhere for both of these. The @samp{sc}
+device requires the @samp{NCONS} option to be defined to some value; it
+represents the number of virtual consoles to be provided by the driver;
+a reasonable value is 8. One of @samp{pc} or @samp{sc} is presently
+required unless @samp{COMCONSOLE} is enabled, in which case a serial
+port is made into the console.
+
+@item device psm0 at isa? port "IO_KBD" tty irq 12 vector psmintr
+@findex psm
+@cindex PS/2 mouse
+@cindex Mouse
+This driver provides support for the IBM-style PS/2 mouse now popular
+on many PCs. This driver shares an address with the console driver
+and therefore requires that the option @samp{ALLOW_CONFLICT_IOADDR}
+also be set. It is also important that the console driver
+(@samp{pc} or @samp{sc}) *preceed* this driver in your kernel configuration
+file in order to get priority. All in all, this driver is a hack and
+should really be integrated into the console driver itself, evidence of
+which can be easily seen when trying to use the mouse and keyboard at the
+same time in X (try it). Volunteers willing to clean this up and do it
+properly are most welcome!
+
+@c sb, anyone?
+
+@item device sio0 at isa? port "IO_COM1" tty irq 4 vector siointr
+@itemx device sio1 at isa? port "IO_COM2" tty irq 3 vector siointr
+@itemx device sio2 at isa? port "IO_COM3" tty irq 5 vector siointr
+@itemx device sio3 at isa? port "IO_COM4" tty irq 9 vector siointr
+@findex sio
+@cindex Serial ports
+@cindex National 8250/16450/16550
+@cindex Bi-directional serial ports
+@cindex Multi-port serial boards
+The @samp{sio} driver provides support for high-speed serial
+communications using the standard 8250, 16450, and 16550 UART chips. It
+provides a standard tty interface for these devices as
+@file{/dev/tty@var{unit}}, and, when enabled with the @samp{comcontrol}
+program, a call-out capability as @file{/dev/cua@var{unit}} (@var{unit}
+is two digits, zero-padded in both cases). Certain multi-port systems
+are also supported.
+
+@item device uha0 at isa? port "IO_UHA0" bio irq 14 drq 5 vector uhaintr
+@findex uha
+@cindex Ultrastor 14F
+@cindex Ultrastor 34F
+@cindex SCSI host adaptors
+This device supports the Ultrastor 14F and related SCSI controllers. It
+is included in the @samp{GENERICBT} distribution kernel, and requires
+@samp{scbus} (@pxref{SCSI}) as a prerequisite. The Ultrastor 24F is not
+supported.
+
+@item controller wdc0 at isa? port "IO_WD1" bio irq 14 vector wdintr
+@itemx disk wd0 at wdc0 drive 0
+@itemx disk wd1 at wdc0 drive 1
+@findex wd
+@cindex Western Digital WD100x
+@cindex ST-506 hard disks
+@cindex RLL hard disks
+@cindex ESDI hard disks
+@cindex IDE hard disks
+@cindex Disk drives
+The @samp{wd} device supports standard ST-506, RLL, ESDI, and IDE hard
+disks, as controlled by the Western Digital WD100x series of controllers
+(and compatible hardware). This version is substantially improved from
+that provided in FreeBSD 1.0.
+
+@item device wt0 at isa? port 0x300 bio irq 5 drq 1 vector wtintr
+@findex wt
+@cindex Archive QIC-02
+@cindex Wangtek QIC-02
+@cindex Cartridge tape drives
+@cindex QIC-02
+@cindex QIC-36
+@cindex Tape drives
+@cindex Quarter-Inch-Cartridge (QIC) tape drives
+This driver supports Archive QIC-02 and Wangtek QIC-02 and QIC-36
+cartridge tape controllers.
+
+@item device ze0 at isa? port 0x300 net irq 5 iomem 0xd8000 vector zeintr
+@findex ze
+@cindex Ethernet
+@cindex Network Interfaces
+@cindex PCMCIA
+@cindex PCMCIA Ethernet Cards
+This driver supports certain PCMCIA ethernet cards. It was originally
+written for the IBM Credit Card Adapter and has also been tested
+with the National Semi `InfoMover' PCMCIA card.
+@end table
+
+@node EISA, MCA, ISA, Devices
+@section EISA-bus Devices and Options
+
+There is presently only one EISA-specific device driver.
+
+@table @code
+@item controller ahb0 at isa? bio irq 11 vector ahbintr
+@findex ahb
+@cindex Adaptec 174x
+@cindex SCSI host adaptors
+The @samp{ahb} driver provides support for the Adaptec AHA-174x series
+of SCSI controllers. This controller is included in the
+@samp{GENERICAH} distribution kernel, and requires the @samp{scbus}
+driver (@pxref{SCSI}) as a prerequisite.
+@end table
+
+@node MCA, PCI, EISA, Devices
+@section Micro Channel Devices and Options
+
+@cindex Micro Channel Architecture
+We don't support Micro Channel right now. Anyone interested in working
+on Micro Channel support should send mail to
+@samp{FreeBSD-Questions@@freefall.cdrom.com} for information on how to
+help.
+
+@node PCI, SCSI, MCA, Devices
+@section PCI Devices and Options
+
+@cindex PCI
+We don't support PCI, either. Anyone interested in working on PCI
+support should send mail to @samp{FreeBSD-Questions@@freefall.cdrom.com}
+for information on how to help.
+
+@node SCSI,, PCI, Devices
+@section The SCSI Subsystem
+
+The SCSI subsystem consists of a set of adaptor-specific driver
+routines, which were described in the previous sections, and the generic
+SCSI device drivers, which handle the standardized interactions with
+devices on the SCSI bus.
+
+@c devices: cd, ch, scbus, sd, sg, st
+
+@table @code
+@item device cd0
+@findex cd
+@cindex CD-ROM
+@cindex SCSI devices
+The @samp{cd} device provides support for CD-ROM drives. Only one
+@samp{cd} device need be configured, as the driver automatically
+allocates units for each CD-ROM drive found. Playing of audio CDs is
+also supported, on drives which support it, through @code{ioctl} calls.
+Support for retrieval of CD audio over the SCSI bus is not presently
+available.
+
+@item device ch0
+@findex ch
+@cindex Media changers
+@cindex SCSI devices
+The @samp{ch} driver supports SCSI media changers; this may include
+tape, removable disk, and CD changers. One @samp{ch} device should be
+configured for each changer you expect to support.
+
+@item device scbus0
+@findex scbus
+@cindex SCSI bus management
+This driver forms the core of the SCSI subsystem. It provides the
+device-independent routines that manage SCSI transactions, keep track of
+attached devices, and act as glue between SCSI-device-specific drivers
+and system-specific host adaptors. This device is @emph{mandatory} for
+all SCSI systems.
+
+@item device sd0
+@findex sd
+@cindex SCSI devices
+@cindex Disk drives
+The @samp{sd} driver provides access to non-removable SCSI disks. One
+@samp{sd} device should be defined for each disk you expect to have
+simultaneously connected to the system.
+
+@c @item device sg0
+@c @findex sg
+@c @cindex SCSI devices
+@c @cindex Generic SCSI
+@c @cindex Unsupported SCSI devices
+@c This driver provides support for development of user-mode drivers and
+@c other programs which access the SCSI bus directly. One @samp{sg} device
+@c should be defined for each @emph{host adaptor} you have installed in
+@c your system.
+
+@item device st0
+@findex st
+@cindex SCSI devices
+@cindex Tape drives
+@cindex Quarter-Inch-Cartridge (QIC) tape drives
+The @samp{st} driver supports generic SCSI tape drives. One @samp{st}
+device should be defined for each tape drive you wish to access. See
+the @samp{st} manual page for information about how to manipulate the
+parameters of this device.
+
+@item device uk0
+@findex uk
+@cindex SCSI devices
+@cindex Unknown SCSI devices
+The @samp{uk} driver provides an attachment point for all otherwise
+unrecognized SCSI devices. You can't actually do anything with such a
+device, except perhaps send it an inquiry command using the @samp{scsi}
+program (q.v.).
+@end table
+
+@node Internals, Index, Devices, Top
+
+@chapter Internal Use Only
+
+Eventually, this chapter will document some of the kernel manifest
+constants which are not defines, but which can be tweaked in various
+header files.
+
+@node Index,, Internals, Top
+@appendix General Index
+
+Items in @code{typewriter} font are option or device names.
+
+@printindex cp
+
+@bye
diff --git a/sys/doc/seagate.doc b/sys/doc/seagate.doc
new file mode 100644
index 000000000000..b22f2c9bca4e
--- /dev/null
+++ b/sys/doc/seagate.doc
@@ -0,0 +1,125 @@
+This is a low level driver for Seagate ST01/02, Future Domain TMC-885, TMC-950
+SCSI host adapter that uses Julian Elishers SCSI code.
+
+This driver is the result of looking at code written by the following people:
+
+ Drew Eckhardt
+ Julian Elischer
+ Glen Overby
+ Gary Close
+
+Special thank to
+
+ Robert Knier
+
+that made the fast blind transfer routines, and also helped with debugging.
+
+I am very grateful to these people.
+
+
+Operating system requirements:
+
+This driver uses the latest version of Julian Elischers scsi code, available
+at FreeBSD.cdrom.com in the file called newscsi3.tar.gz. The driver has been
+tested on FreeBSD 1.1-BETA, FreeBSD 1.0.2, 386bsd 0.1. I don't know if will
+work with NetBSD. (I hope it will.)
+
+
+The hardware:
+
+The ST01/02, and Future Domain 950 are very simple SCSI controllers. They are
+not busmastering, so the processor must do all transfers a la IDE. They support
+blind transfer by adding wait states (up to a certain limit). Interrupt is
+generated for reconnect and parity errors (maybe also for some other events).
+
+The card consists of one command port that writes to scsi control lines, reads
+status lines, and a data port that read/writes to the 8 data lines. The address
+decoding gives both data and control ports large memory areas to a single
+port. This is used by the code.
+
+The ST01/02 differs from the FD950 in memory address location and SCSI id.
+
+Probing for the card:
+
+A card is recognized by comparing the BIOS signature with known signatures. A
+new card may not be recognized if the BIOS signature has changed. Please send
+new signatures to me.
+
+Driver function:
+
+A scsi command is sent to scsi_cmd function. The command is either placed in
+the queue or an retryable message is returned. The routine may wait for
+completion of the command depending on the supplied flags. A timer is started
+for every command placed in the queue. The commands are added in the order they
+are received. There is a possiblity to make all REQUEST SENSE commands be
+queued before all other commands, but I dont think it is a good thing (Linux
+do however use this).
+
+The card is mostly controlled by the sea_main function. It is called by
+scsi_cmd, the interrupt routine, and the timeout routine. The sea_main routine
+runs as long there are something to do (transfer data, issue queued commands,
+and handle reconnected commands).
+
+The data transfers may be done in two different ways: Blind and polled
+transfers. They differ in the way the driver does it handshaking with the
+target. During a blind transfer, the driver code blindly transfers a block
+of data without checking for changed phase. During polled transfers, the
+phase is checked between every character transfered. The polled transfers
+are always used for status information and command transfers.
+
+Because the card does not use dma in any way, there is no need to handle
+physical addresses. There is no problem with the isa-bus address limit of
+16MB, making bounce-buffers unnecessary.
+
+The data structures:
+
+Every card has a sea_data structure keeping the queues of commands waiting to
+be issued, and commands currently disconnected. The type of card (Seagate or
+Future Domain), data and control port addresses, scsi id, busy flags for all
+possible targets, and interrupt vector for the card.
+
+Every scsi command to be issued are stored in a sea_scb structure. It contains
+a flag describing status/error of the command, current data buffer position,
+and number of bytes remaining to be transfered.
+
+
+INSTALLATION
+
+1) Alter defines in /sys/i386/isa/seagate.c if you don't
+ want to use blind transfers and/or disconnects. Please note that
+ interrupts must be enabled on the board if disconnects are used.
+2) Create a new config file in /sys/i386/conf containing defines for Julian's
+ scsi code (see GENERICAH or GENERICBT). Replace the aha or bt controller
+ with:
+ controller sea0 at isa? bio irq 5 iomem 0xC8000 iosiz 0x2000 vector seaintr
+3) config, make depend, make, cp, shutdown -r
+
+You should now have a working kernel booted.
+
+I have tested the code on the following hardware: 386DX 24MHz 8MB AMI BIOS,
+Maxtor 7120A IDE, Seagate ST02, Maxtor LXT340S scsi disk, SONY CDU-8003 cdrom,
+(short test with) WANGTEK 6200HS DAT drive.
+
+
+PROBLEMS
+
+I have had problems getting the ST02 boot using FreeBSD boot floppies. I think
+is some problem with BIOS calls not working. It is unfortunately impossible to
+disconnect the ST02 floppy controller.
+
+I have had problems getting the driver to talk to a 40 MB Seagate disk. I
+don't have access to it any more, so I can't do any more checking on it.
+
+NOTE: The ST02 creates its own description of the disk attached. This is not
+the same as the disk says. This translation problem may cause problems when
+sharing a disk between both DOS and BSD. It is however not impossible.
+
+
+/Kent
+
+
+Kent Palmkvist
+kentp@isy.liu.se
+
+
+$Id: seagate.doc,v 1.1 1994/06/28 15:47:12 jkh Exp $
diff --git a/sys/doc/sound.doc b/sys/doc/sound.doc
new file mode 100644
index 000000000000..0c2f10034287
--- /dev/null
+++ b/sys/doc/sound.doc
@@ -0,0 +1,80 @@
+NOTE! Check that there is no #define EXCLUDE_<cardname> lines for
+ the cards you are configuring in the sound/local.h. Otherwise
+ the low level driver for the card is not compiled in the kernel.
+You may add one or more of the following depending on what you do NOT
+want compiled into your kernel. Only use the options for which you
+do NOT have a card to support it, or if you do not want a particular
+functionality.
+
+ options EXCLUDE_AUDIO # NO digital audio support
+ options EXCLUDE_SEQUENCER # NO sequencer support
+ options "EXCLUDE_MPU401" # NO MPU401 support
+ options EXCLUDE_GUS # NO GUS support
+ options EXCLUDE_GUS_IODETECT # NO GUS io detection
+ options EXCLUDE_SB # NO SB support
+ options EXCLUDE_SB_EMULATION # NO PAS SB emulation support
+ options EXCLUDE_SBPRO # NO SB Pro support
+ options "EXCLUDE_SB16" # NO SB 16 support
+ options "EXCLUDE_YM3812" # NO AdLib support
+ options "EXCLUDE_OPL3" # NO OPL3 chip support
+ options EXCLUDE_PAS # NO Pro Audio Studio support
+ options EXCLUDE_PRO_MIDI # NO PAS MIDI support
+ options EXCLUDE_CHIP_MIDI # NO MIDI chip support
+ options EXCLUDE_MIDI # NO MIDI support whatsoever
+
+To enable sound card support, you need to uncomment and add one or more of
+the following lines to your kernel configuration file according to the
+directions below:
+
+#device snd5 at isa? port 0x330 irq 6 vector mpuintr
+#device snd4 at isa? port 0x220 irq 15 drq 6 vector gusintr
+#device snd3 at isa? port 0x388 irq 10 drq 6 vector pasintr
+#device snd2 at isa? port 0x220 irq 7 drq 1 vector sbintr
+#device snd6 at isa? port 0x220 irq 7 drq 5 vector sbintr
+#device snd7 at isa? port 0x300
+#device snd1 at isa? port 0x388
+
+Note for PAS user: you should change snd1 line to
+#device snd1 at isa? port 0x38a
+(next stereo port) to avoid conflict with snd3
+
+ Unit numbers are:
+ 1 for Yamaha FM synth
+ 2 for SB/SB Pro DSP
+ 3 for PAS PCM and Midi
+ 4 for GUS
+ 5 for MPU-401 (there is separate driver for the SB16)
+ 6 for SB16 (DSP)
+ 7 for SB16 Midi (MPU-401 emulation)
+
+ If you have ProAudioSpectrum, uncomment units 3, 2 and 1
+ If you have SoundBlaster 1.0 to 2.0 or SB Pro, uncomment 2 and 1.
+ If you have SoundBlaster 16, uncomment 2, 1, 6 and 7.
+ (use the same IRQ for the cards 2, 6 and 7. The DMA of the
+ card 2 is the 8 bit one and the DMA of the card 6 is the 16 bit one.
+ the port address of the card 7 is the Midi I/O address of the SB16.
+ If you have GravisUltrasound, uncomment 4
+ If you have MPU-401, uncomment 5
+
+NOTE: The MPU-401 driver may or may not work, and is unfortunately
+unverifiable since no one I know has one. If you can test this,
+please let me know! Also note that you will have to change these
+settings if your soundcard is set for a non-standard address or IRQ.
+Please check your documentation (or verify with any provided DOS utilities
+that may have come with your card) and set the IRQ or address fields
+accordingly.
+
+Also: Some systems with the OPTI chipset will require you to #define
+BROKEN_BUS_CLOCK in /sys/i386/sound/pas2_card.c. Symptoms are that
+you will hear a lot of clicking and popping sounds, like a geiger counter,
+coming out of the PAS even when is not playing anything.
+
+Probing problems: Since the SB16 uses the same IRQ and addresses for
+the different drivers, some of the snd dirvers will not be probed because
+the kernel thinks there is a conflict. Until a real solution is implemented,
+to get all the snd drivers to work, immediately return(0) to the haveseen()
+call in /sys/i386/isa/isa.c on your local copy. (Warning: doing this
+will bypass checks for ALL drivers, so be careful)
+
+ - Jordan Hubbard (jkh@freefall.cdrom.com)
+ - Steven Wallace (swallace@freefall.cdrom.com)
diff --git a/sys/doc/vm_layout.doc b/sys/doc/vm_layout.doc
new file mode 100644
index 000000000000..6b95bcaf85d6
--- /dev/null
+++ b/sys/doc/vm_layout.doc
@@ -0,0 +1,32 @@
+Physical Memory Layout:
+
+NOT YET DONE
+
+
+
+Virtual Memory Layout:
+
+Page Table Directories, and how they relate to the vm address space
+Note: PTDI stands for Page Table Directory Index.
+
+PTDI Address pmap.h/param.h Calculation to locate it in vm space
+--------------------------------------------------------------------------------
+ FFFFF000 APTD APTmap + (APTDPTDI * NBPG)
+ FFC00000 APTmap APTDPTDI << PDRSHIFT
+3FF FFC00000 APTDPTDI #define (NPTEPG-1)
+ FFBFFFFF KERNEND ((KPTDI+NKPDE) << PDRSHIFT) - 1
+3FD FF400000 .
+3FC FF000000 .
+3FB FEC00000 .
+3FA FE800000 .
+3F9 FE400000 .
+ FE000000 KERNBASE KPTDI << PDRSHIFT
+3F8 FE000000 KPTDI #define (APTDPTDI-NKPDE)
+ FDFF8000 Sysmap PTmap + (KPTDI * NBPG)
+ FDFF7FF8 APTpde PTD + (APTDPTDI * sizeof(pde))
+ FDFF7FDC PTDpde PTD + (PTDPTDI * sizeof(pde))
+ FDFF7000 PTD PTmap + (PTDPTDI * NBPG)
+ FDC00000 PTmap PTDPTDI << PDRSHIFT
+3F7 FDC00000 PTDPTDI #define (KPTDI-1)
+
+$Id: vm_layout.doc,v 1.1 1994/03/30 20:36:36 wollman Exp $
diff --git a/sys/doc/wt.doc b/sys/doc/wt.doc
new file mode 100644
index 000000000000..1e9f1bafec8a
--- /dev/null
+++ b/sys/doc/wt.doc
@@ -0,0 +1,77 @@
+This is the streamer tape driver for 386bsd and FreeBSD, which
+supports Wangtek and Archive compatible QIC-02/QIC-36 controllers.
+It was developed as a replacement of the old Wangtek tape driver from CMU.
+
+In comparison with the CMU driver, this version has the following enhancements:
+1) Support for Archive SC402 and SC499 tape controllers added.
+2) Support for up to three tape controllers on the same machine.
+3) Support for BSD-style ioctls MTIOCGET, MTIOCTOP.
+ Mt command now works adequately with this driver.
+2) Asynchronous REWIND and FSF operations, close() will not wait
+ until they finish. The next open() will wait for it instead.
+4) Use of WTQICMD ioctl is limited to ERASE and RETENS operations.
+ This prevents the user from locking the tape driver by strange
+ tape operations.
+5) Tape density switching added.
+6) The status of the process, blocked on the tape operation,
+ is displayed at the WCHAN column of the `ps' command as:
+
+ wtread reading data from the tape
+ wtwrite writing data to the tape
+ wtrfm reading the tape marker
+ wtwfm writing the tape marker
+ wtrew rewinding the tape
+ wterase doing WTQICMD ERASE operation
+ wtretens doing WTQICMD RETENS operation
+ wtorew doing MTIOCTOP REW/OFFL operation
+ wtorfm doing MTIOCTOP FSF operation
+ wtowfm doing MTIOCTOP WEOF operation
+
+7) It's possible to use the tape with "default density",
+ useful for devices which don't support density switching
+ or do automatic format determination.
+8) Some controllers support only 1024 block length.
+ Setting WT_BSIZE bit in device minor number turns on this mode.
+
+Minor number structure:
+ 0bfffuuu
+Fields:
+ uuu - Unit number. It's possible to install
+ up to three tape controllers on the same machine,
+ using DRQs 1..3. Hence, unit number can lie
+ in range 0..2.
+ fff - Tape format number:
+ 0 - /dev/rwt0 - default density (auto select)
+ 1 - /dev/rwt0a - QIC 11 (obsolete)
+ 2 - /dev/rwt0b - QIC 24 (60 megabytes)
+ 3 - /dev/rwt0c - QIC 120 (120 megabytes)
+ 4 - /dev/rwt0d - QIC 150 (150 megabytes)
+ 5 - /dev/rwt0e - QIC 300 (300 megabytes?)
+ 6 - /dev/rwt0f - QIC 600 (600 megabytes?)
+ b - Long block size flag. With this bit set,
+ the driver will perform all i/o operations
+ with the controller using 1024-byte
+ blocks, instead of 512 ones.
+ Some controllers need it (CMS for example).
+ If you Wangtek controller does not stream well,
+ you can try to use /dev/rWt0 device instead
+ of /dev/rwt0 (uncomment needed lines in /dev/MAKEDEV
+ to create it).
+
+Block interface (writing blocks less than 2048 bytes) is not functioning
+pwoperly. Use raw interface instead.
+
+Thanks to all who helped to test it on the following hardware:
+
+Controller Drive Volume Interface Thanks to
+---------------------------------------------------------------------------
+Archive SC-499 Archive 2150L 150 Meg QIC-02 KIAE
+CMS? ? 150 Meg QIC-02 KIAE
+Everex EV 831/833 ? ? QIC-36 Joergen Haegg
+Wangtek ASSY Wangtek 60 Meg QIC-02 Ken Whedbee
+Tecmar QT150i? Wangtek 5150EQ ? QIC-02? Marko Teiste
+? Wangtek 5099EK 60 Meg QIC-36 Robert Shien
+Archive SC400S ? 60 Meg ? Warren Toomey
+
+Sergey Ryzhkov, Serge Vakulenko
+E-mail: <sir@kiae.su>, <vak@zebub.msk.su>