Index: head/share/man/man4/intro.4 =================================================================== --- head/share/man/man4/intro.4 (revision 17761) +++ head/share/man/man4/intro.4 (revision 17762) @@ -1,175 +1,176 @@ .\" .\" Copyright (c) 1996 David E. O'Brien, Joerg Wunsch .\" .\" All rights reserved. .\" .\" Redistribution and use in source and binary 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, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $Id: intro.4,v 1.1 1996/01/21 14:01:49 joerg Exp $ +.\" $Id: intro.4,v 1.2 1996/02/11 22:37:26 mpp Exp $ .\" .Dd January 20, 1996 .Dt INTRO 4 .Os FreeBSD 2.1 .Sh NAME .Nm intro .Nd introduction to devices and device drivers .Sh DESCRIPTION This section contains information related to devices, device driver and miscellaneous hardware. .Ss The device abstraction Device is a term used mostly for hardware-related stuff that belongs to the system, like disks, printers, or a graphics display with its keyboard. There are also so-called .Em pseudo-devices where a device driver emulates the behaviour of a device in software without any particular underlying hardware. A typical example for the latter class is .Pa /dev/mem , a loophole where the physical memory can be accessed using the regular file access semantics. .Pp The device abstraction generally provides a common set of system calls layered on top of them, which are dispatched to the corresponding device driver by the upper layers of the kernel. The set of system calls available for devices is chosen from .Xr open 2 , .Xr close 2 , .Xr read 2 , .Xr write 2 , .Xr ioctl 2 , .Xr select 2 , and .Xr mmap 2 . Not all drivers implement all system calls, for example, calling .Xr mmap 2 on a terminal devices is likely to be not useful at all. .Ss Accessing Devices Most of the devices in a unix-like operating system are accessed through so-called .Em device nodes , sometimes also called .Em special files . They are usually located under the directory .Pa /dev in the file system hierarchy .Pq see also Xr hier 7 . .Pp Until .Xr devfs 5 is fully functional, each device node must be created statically and independently of the existence of the associated device driver, usually by running .Xr MAKEDEV 8 . .Pp Note that this could lead to an inconsistent state, where either there are device nodes that do not have a configured driver associated with them, or there may be drivers that have successfully probed for their devices, but cannot be accessed since the corresponding device node is still missing. In the first case, any attempt to reference the device through the device node will result in an error, returned by the upper layers of the kernel, usually .Ql ENXIO . In the second case, the device node needs to be created before the driver and its device will be usable. .Pp Some devices come in two flavors: .Em block and .Em character devices, or by a better name, buffered and unbuffered .Pq raw devices. The traditional names are reflected by the letters .Ql b and .Ql c as the file type identification in the output of .Ql ls -l . Buffered devices are being accessed through the buffer cache of the operating system, and they are solely intended to layer a file system on top of them. They are normally implemented for disks and disk-like devices only, for historical reasons also for tape devices. .Pp Raw devices are available for all drivers, including those that also implement a buffered device. For the latter group of devices, the differentiation is conventionally done by prepending the latter .Ql r to the path name of the device node, for example .Pa /dev/rsd0 denotes the raw device for the first SCSI disk, while .Pa /dev/sd0 is the corresponding device node for the buffered device. .Pp Unbuffered devices should be used for all actions that are not related to file system operations, even if the device in question is a disk device. This includes making backups of entire disk partitions, or to .Em raw floppy disks .Pq i.e. those used like tapes . .Pp Access restrictions to device nodes are usually subject of the regular file permissions of the device node entry, instead of being implied directly by the drivers in the kernel. .Ss Drivers without device nodes Drivers for network devices do not use device nodes in order to be accessed. Their selection is based on other decisions inside the kernel, and instead of calling .Xr open 2 , use of a network device is generally introduced by using the system call .Xr socket 2 . .Ss Configuring a driver into the kernel For each kernel, there is a configuration file that is used as a base to select the facilities and drivers for that kernel, and to tune several options. See .Xr config 8 for a detailed description of the files involved. The individual manual pages in this section provide a sample line for the configuration file in their synopsis portion. See also the sample config file .Pa /sys/i386/conf/LINT .Po for the .Em i386 architecture .Pc . .Sh SEE ALSO .Xr open 2 , .Xr close 2 , .Xr read 2 , .Xr write 2 , .Xr ioctl 2 , .Xr select 2 , .Xr mmap 2 , .Xr socket 2 , .Xr hier 7 , .Xr config 8 , .Xr MAKEDEV 8 , .Xr devfs 5 Pq not yet existent . .Sh AUTHORS This man page has been written by .if t J\(:org Wunsch .if n Joerg Wunsch with initial input by David E. O'Brien. .Sh HISTORY .Nm intro -appeared in FreeBSD 2.1. +appeared in +.Fx 2.1 . Index: head/share/man/man4/ipfirewall.4 =================================================================== --- head/share/man/man4/ipfirewall.4 (revision 17761) +++ head/share/man/man4/ipfirewall.4 (revision 17762) @@ -1,207 +1,209 @@ .Dd November 16, 1994 .Dt IPFIREWALL 4 .Os .Sh NAME .Nm ipfirewall, .Nm ipfw , .Nm ipaccounting , .Nm ipacct .Nd IP packet filter and traffic accounting. .Sh SYNOPSIS .Fd #include .Ft int .Fn setsockopt raw_socket IPPROTO_IP "ipfw/ipacct option" "struct ip | struct ipfw" size Ipfw options: IP_FW_ADD_BLK - add entry to blocking chain. IP_FW_ADD_FWD - add entry to forwarding chain. IP_FW_CHK_BLK - check ip packet against blocking chain. IP_FW_CHK_FWD - check ip packet against forwarding chain. IP_FW_DEL_BLK - delete entry from blocking chain. IP_FW_DEL_FWD - delete entry from forwarding chain. IP_FW_FLUSH - flush all blocking & forwarding chain entries. IP_FW_POLICY - define default ipfw policy. Ipacct options: IP_ACCT_ADD - add entry to accounting chain. IP_ACCT_DEL - delete entry from accounting chain. IP_ACCT_FLUSH - flush all accounting chain entries. IP_ACCT_ZERO - zero all accounting chain entries. Ipfw/ipacct entry structure: #define IP_FW_MAX_PORTS 10 struct ip_fw { struct ip_fw *next; struct in_addr src, dst; struct in_addr src_mask, dst_mask; u_short flags; u_short n_src_p, n_dst_p; u_short ports[IP_FW_MAX_PORTS]; u_long p_cnt,b_cnt; } Flags values for "flags" field: IP_FW_F_ALL - The entry should match all IP packets. IP_FW_F_TCP - The entry should match TCP packets. IP_FW_F_UDP - The entry should match UDP packets. IP_FW_F_ICMP - The entry should match ICMP packets. IP_FW_F_KIND - Mask value to separate protocol kind. IP_FW_F_ACCEPT - This entry is accepting ( see below ) IP_FW_F_SRNG - Source ports are range ( see below ) IP_FW_F_DRNG - Destination ports are range ( see below ) IP_FW_F_PRN - Print this entry ( see below ) IP_FW_F_BIDIR - This acct entry is bidirectional ( see below ) IP_FW_F_MASK - Mask to match all valid flag bits. Kernel symbols to kvm_nlist(): struct ip_fw *ip_fw_blk_chain - chain of forwarding entries. struct ip_fw *ip_fw_fwd_chain - chain of blocking entries. int ip_fw_policy - default policy. struct ip_fw *ip_acct_chain - chain of accounting entries. Options in the kernel configuration file: IPFIREWALL - enable ipfirewall. IPFIREWALL_VERBOSE - enable firewall output ( see below ) DEBUG_IPFIREWALL - enable extensive debugging output. IPACCT - enable ipaccounting. .Sh DESCRIPTION Ipfirewall (later ipfw) is a system facility,which allows filtering of incoming and/or forwarding packets on the protocol+source/destination address/ports base. Ipaccounting (later ipacct) is a system facility,which allows counting of incoming,outgoing and forwarding traffic by packet/byte count. .Pp Basic idea is that every packet checked against number of entries in several chains. There are 3 chains: Blocking - this chain defines whenever packet should be accepted ever for local delivery or for forwarding. Forwarding - this chain defines whenever packet should be accepted for forwarding only. Accounting - this chain defines types of packets , which should be .Pp Options to add/remove specific entries or to flush all entries described above. Value passed to .Fn setsockopt is a value of struct ip_fw for entry. If an entry is added, it checked by such rules that when we start searching chain for matching entry the first matching is the best match, [ or at least one of them :^) ]. That means: * First in chain entries with specific protocol and small ranges of src/dst addresses and ports. * Later go entries with wider ranges of ports and addresses. * Later entries matching every port for some address range. * Later universal entries matching any protocol. .Pp While deleting entry, every entry which is equal to that passed to .Fn setsockopt will be removed. Flush removes all entries. Each entry has several fields by which packets are matched: struct ip_fw *next - next entry in chain.(Set internally) struct in_addr src - source address to be matched. struct in_addr src_mask - source address mask. To match whole networks/subnets or address groups mask bits should be zeroed here and also in src_mask field. Valuable bits should be set in src_mask field. struct in_addr dst - destination address to be matched. struct in_addr dst_mask - destination address mask. u_short flags - flags field.See exact description of flags meaning in description later. u_short n_src_p - number of source ports in "ports" array. u_short n_dst_p - number of destination ports in "ports" array. u_short ports[] - ports array.Overall length currently defined to reasonable maximum - 10,and could be changed. The packet's src port can ever match one of ports[0] ... ports[--n_src_p] numbers,or if flag IP_FW_F_SRNG set take port[0] as bottom range value and ports[1] as top one.n_src_p should be set to 2 then.If n_src_p equal to 0 , every port match. The same rules apply to packet's dst port, except that it matched against ports[n_src_p] ... ... ports[n_src_p+n_dst_p--],or if IP_FW_F_DRNG set, range is ports[n_src_p] to ports[n_srcp++]. u_long p_cnt - packets count for ipacct entries. u_long b_cnt - bytes count for ipacct entries. Packet matching proceeds in the following manner: a) If packet entry protocol set to ALL, see c). b) If entry protocol set to TCP/UDP/ICMP and packet protocol different - no match, if packet protocol and entry protocol same - continue. c) If source address pattern does not equal to packets sources address masked with src_mask, or destination pattern not equal to packets destination address masked with dst_mask - no match. If they does and protocol set to ALL/ICMP - got match. If they does and protocol set to TCP/UDP - continue. d) If src port doesn't match or dst port doesn't match - all packet don't match. If they do - got match. .Pp In ipfw packet matched consequently against every chain entry. Search continues untill first matching entry found.If IP_FW_F_ACCEPT flag set - packet accepted. If it is not set - packet denied. If no matching entry found, all unmatched packets ever accepted or denied depending on global policy value. It can be set with IP_FW_POLICY raw socket option. The value for deny is 0, and 1 for accept. .Pp Entries can be added with IP_FW_F_PRN flag set.If kernel compiled with IPFIREWALL_VERBOSE option,packets matching this entries will be printed by kernel printf's. .Pp If some chain is empty,every packet accepted by this chain no matter what default policy is. .Pp To check whenever or not packet denied by some chain , checking options to setsockopt() can be issued. Then the argument is a buffer representing ip packet,thus it has to be struct ip + struct tcphdr . Then setsockopt() return value 0 on accept or another on deny. .Pp Ipaccounting entries added the same way as ipfw ones.Packet checked against all entries in chain and values of p_cnt and b_cnt in matching entries rised.p_cnt rises by 1 and b_cnt by ip_len value of ip packet. Thus all traffic size counted including IP headers. .Pp If IP_FW_F_BIDIR flag is set in accounting entry,packets counted are those which match entry in standard way along with packets which match entry while their source and destination addr/port pairs swapped. .Pp Zero option allows all accounting to be cleared. .Sh DIAGNOSTICS [EINVAL] The IP option field was improperly formed; an option field was shorter than the minimum value or longer than the option buffer provided.An structural error in ip_fw structure occurred (n_src_p+n_dst_p too big, ports set for ALL/ICMP protocols etc.) .Sh SEE ALSO .Xr setsockopt 2 , .Xr kvm_nlist 3 , .Xr kvm_read 3 , .Xr ip 4 .Sh BUGS The ipfw/ipacct facilities are new and, although serious bugs have been tracked, some less important ones are expected. .Pp This man page is mostly out of date and should be rewritten. .Sh HISTORY Ipfw facility has been initially written as package to BSDI by Daniel Boulet . - It has been heavily modified and ported to FreeBSD 2.0 + It has been heavily modified and ported to +.Fx 2.0 by Ugen J.S.Antsilevich - Ipacct facility written for FreeBSD 2.0 + Ipacct facility written for +.Fx 2.0 by Ugen J.S.Antsilevich Index: head/share/man/man4/joy.4 =================================================================== --- head/share/man/man4/joy.4 (revision 17761) +++ head/share/man/man4/joy.4 (revision 17762) @@ -1,89 +1,90 @@ .Dd January 23, 1995 .Dt JOY 4 .Sh NAME .Nm joy .Nd joystick device driver .Sh SYNOPSIS .Cd device joy0 at isa? port "IO_GAME" .Fd #include .Sh DESCRIPTION The joystick device driver allows applications to read the status of the PC joystick. .Pp This device may be opened by only one process at a time. .Pp The joystick status is get in an structure joystick via a read() call. The structure is defined in the header file as follows: .Pp .Bd -literal -offset indent struct joystick { int x; /* x position */ int y; /* y position */ int b1; /* button 1 status */ int b2; /* button 2 status */ }; .Ed .Pp Positions are typically in the range 0-2000. .Ss One line perl example: perl -e 'open(JOY,"/dev/joy0")||die;while(1) .br {sysread(JOY,$x,16);@j=unpack("iiii",$x);print "@j\\n";sleep(1);}' .Ss ioctl calls Several ioctl() calls are also available. They take an argument of type int * .Bl -tag -width JOY_SET_X_OFFSET .It Dv JOY_SETTIMEOUT Fa int *limit Set the time limit (in microseconds) for reading the joystick status. Setting a value too small may prevent to get correct values for the positions (which are then set to -2147483648), however this can be useful if one is only interested by the buttons status. .It Dv JOY_GETTIMEOUT Fa int *limit Get the time limit (in microseconds) used for reading the joystick status. .It Dv JOY_SET_X_OFFSET Fa int *offset Set the value to be added to the X position when reading the joystick status. .It Dv JOY_SET_Y_OFFSET Fa int *offset Set the value to be added to the Y position when reading the joystick status. .It Dv JOY_GET_X_OFFSET Fa int *offset Get the value which is added to the X position when reading the joystick status. .It Dv JOY_GET_Y_OFFSET Fa int *offset Get the value which is added to the Y position when reading the joystick status. .Sh TECHNICAL SPECIFICATIONS The pinout of the DB-15 connector is as follow: .Pp 1 XY1 (+5v) 2 Switch 1 3 X1 (potentiometer #1) 4 Switch 1 (GND) 5 Switch 2 (GND) 6 Y1 (potentiometer #2) 7 Switch 2 8 N.C. 9 XY2 (+5v) 10 Switch 4 11 X2 (potentiometer #3) 12 Switch 3&4 (GND) 13 Y2 (potentiometer #4) 14 Switch 3 15 N.C. .Pp Pots are normally 0-150k variable resistors (0-100k sometimes), and according to the IBM techref, the time is given by Time = 24.2e-6s + 0.011e-6s * R/Ohms .Sh FILES .Bl -tag -width /dev/joy? .It Pa /dev/joy? joystick device files .Sh AUTHOR Jean-Marc Zucconi .Sh HISTORY -The joystick driver appeared in FreeBSD 2.0.5. +The joystick driver appeared in +.Fx 2.0.5 . Index: head/share/man/man4/man4.i386/joy.4 =================================================================== --- head/share/man/man4/man4.i386/joy.4 (revision 17761) +++ head/share/man/man4/man4.i386/joy.4 (revision 17762) @@ -1,89 +1,90 @@ .Dd January 23, 1995 .Dt JOY 4 .Sh NAME .Nm joy .Nd joystick device driver .Sh SYNOPSIS .Cd device joy0 at isa? port "IO_GAME" .Fd #include .Sh DESCRIPTION The joystick device driver allows applications to read the status of the PC joystick. .Pp This device may be opened by only one process at a time. .Pp The joystick status is get in an structure joystick via a read() call. The structure is defined in the header file as follows: .Pp .Bd -literal -offset indent struct joystick { int x; /* x position */ int y; /* y position */ int b1; /* button 1 status */ int b2; /* button 2 status */ }; .Ed .Pp Positions are typically in the range 0-2000. .Ss One line perl example: perl -e 'open(JOY,"/dev/joy0")||die;while(1) .br {sysread(JOY,$x,16);@j=unpack("iiii",$x);print "@j\\n";sleep(1);}' .Ss ioctl calls Several ioctl() calls are also available. They take an argument of type int * .Bl -tag -width JOY_SET_X_OFFSET .It Dv JOY_SETTIMEOUT Fa int *limit Set the time limit (in microseconds) for reading the joystick status. Setting a value too small may prevent to get correct values for the positions (which are then set to -2147483648), however this can be useful if one is only interested by the buttons status. .It Dv JOY_GETTIMEOUT Fa int *limit Get the time limit (in microseconds) used for reading the joystick status. .It Dv JOY_SET_X_OFFSET Fa int *offset Set the value to be added to the X position when reading the joystick status. .It Dv JOY_SET_Y_OFFSET Fa int *offset Set the value to be added to the Y position when reading the joystick status. .It Dv JOY_GET_X_OFFSET Fa int *offset Get the value which is added to the X position when reading the joystick status. .It Dv JOY_GET_Y_OFFSET Fa int *offset Get the value which is added to the Y position when reading the joystick status. .Sh TECHNICAL SPECIFICATIONS The pinout of the DB-15 connector is as follow: .Pp 1 XY1 (+5v) 2 Switch 1 3 X1 (potentiometer #1) 4 Switch 1 (GND) 5 Switch 2 (GND) 6 Y1 (potentiometer #2) 7 Switch 2 8 N.C. 9 XY2 (+5v) 10 Switch 4 11 X2 (potentiometer #3) 12 Switch 3&4 (GND) 13 Y2 (potentiometer #4) 14 Switch 3 15 N.C. .Pp Pots are normally 0-150k variable resistors (0-100k sometimes), and according to the IBM techref, the time is given by Time = 24.2e-6s + 0.011e-6s * R/Ohms .Sh FILES .Bl -tag -width /dev/joy? .It Pa /dev/joy? joystick device files .Sh AUTHOR Jean-Marc Zucconi .Sh HISTORY -The joystick driver appeared in FreeBSD 2.0.5. +The joystick driver appeared in +.Fx 2.0.5 . Index: head/share/man/man4/man4.i386/matcd.4 =================================================================== --- head/share/man/man4/man4.i386/matcd.4 (revision 17761) +++ head/share/man/man4/man4.i386/matcd.4 (revision 17762) @@ -1,409 +1,410 @@ .\"Matsushita(Panasonic) / Creative CD-ROM Driver (matcd) .\"Authored by Frank Durda IV .\" .\"Program and Documentation are Copyright 1994, 1995 Frank Durda IV. .\"All rights reserved. .\" "FDIV" is a trademark of Frank Durda IV. .\" .\" .\"Redistribution and use in source and binary 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 positioned at the very beginning of this file without .\" modification, all copyright strings, all related programming .\" codes that display the copyright strings, this list of .\" conditions and the following disclaimer. .\"2. Redistributions in binary form must contain all copyright strings .\" and related programming code that display the copyright strings. .\"3. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in .\" the documentation and/or other materials provided with the .\" distribution. .\"4. All advertising materials mentioning features or use of this .\" software must display the following acknowledgement: .\" "The Matsushita/Panasonic CD-ROM driver was developed .\" by Frank Durda IV for use with "FreeBSD" and similar .\" operating systems." .\" "Similar operating systems" includes mainly non-profit oriented .\" systems for research and education, including but not restricted .\" to "NetBSD", "386BSD", and "Mach" (by CMU). The wording of the .\" acknowledgement (in electronic form or printed text) may not be .\" changed without permission from the author. .\"5. Absolutely no warranty of function, fitness or purpose is made .\" by the author Frank Durda IV. .\"6. Neither the name of the author nor the name "FreeBSD" may .\" be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" (The author can be reached at bsdmail@nemesis.lonestar.org) .\"7. The product containing this software must meet all of these .\" conditions even if it is unsupported, not a complete system .\" and/or does not contain compiled code. .\"8. These conditions will be in force for the full life of the .\" copyright. .\"9. If all the above conditions are met, modifications to other .\" parts of this file may be freely made, although any person .\" or persons making changes do not receive the right to add their .\" name or names to the copyright strings and notices in this .\" software. Persons making changes are encouraged to insert edit .\" history in matcd.c and to put your name and details of the .\" change there. .\"10. You must have prior written permission from the author to .\" deviate from these terms. .\" .\"Vendors who produce product(s) containing this code are encouraged .\"(but not required) to provide copies of the finished product(s) to .\"the author and to correspond with the author about development .\"activity relating to this code. Donations of development hardware .\"and/or software are also welcome. (This is one of the faster ways .\"to get a driver developed for a device.) .\" .\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPER(S) ``AS IS'' AND ANY .\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE DEVELOPER(S) BE .\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, .\" OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT .\" OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; .\" OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF .\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING .\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS .\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\"-------------------------------------------------------------------------- .\"Dedicated to: My family and Max, my Golden Retriever .\"-----No changes are allowed above this line------------------------------- .\" .\" Please note any documentation updates here including your name .\" and the date. .\"<2> Text brought in sync with changes made in versions 1(17) - 1(21) .\" Frank Durda IV 4-Jul-95 .\"<3> Text brought in sync with changes made in versions 1(22) - 1(25) .\" Frank Durda IV 24-Sep-95 .\" .Dd September 24th, 1995 .Dt MATCD 4 i386 .\"Synchronized to Version 1(25) of matcd.c -.Os FreeBSD 2.1 +.Os FreeBSD 2.0.5 .Sh NAME .Nm matcd .Nd Matsushita (Panasonic) CD-ROM driver .Sh SYNOPSIS .sp .Cd "controller matcd[0-4] at isa? port [?| addr]" .br .Cd "/dev/[r]matcd[0-15][a|c] .br .Cd "/dev/[r]matcdl[0-15][a|c] .sp .Sh DESCRIPTION The .Nm matcd driver controls the CR-562-x and CR-563-x CD-ROM drives made by Matsushita-Kotobuki Electronics Industries, or Matsushita for short. These CD-ROM drives have been sold under the Panasonic (which is a trade name for Matsushita), Creative Labs (omniCD) and Reveal names, and have been included in computers made by Tandy, AST, Packard Bell and many others. These drives connect to the PC ISA bus through a proprietary host interface. This interface can exist as a stand-alone ISA card, or can be included on a sound card. .Sh DRIVER CONFIGURATION The .Nm matcd driver supports up to four host interfaces with up to four drives on each interface. Audio activity may occur on all drives simultaneously. Data read operations are limited to one drive per host interface at any instant. To support multiple host interfaces, it is necessary to modify the entries in the kernel configuration file. Normally your system comes with the file \fI/usr/src/sys/i386/conf/GENERIC\fR. You should make a copy of this file and give it the name of your system. You can then edit the new file to include devices you want the system to support and delete the device entries that you don't want. In this file, you will find an entry like: controller matcd0 at isa? port ? bio To support two host interfaces, change the file so it reads: controller matcd0 at isa? port ? bio .br controller matcd1 at isa? port ? bio .br (If you want to support up to three or four host interfaces, add additional entries). .if n .bp .if t .sp Note that the kernel configuration does not need to be modified to support up to four drives on a single host interface. It is also not necessary to have four drives on a single interface before adding a second interface. By default, .Nm matcd searches for the CD-ROM host interface adapters by using a table of known I/O ports on Creative host adapters (see \fIoptions.h\fR). Although this is very flexible, it can cause problems when your system has other devices that are located at the I/O ports that .Nm matcd is checking for CD-ROM host interfaces. In addition, checking multiple locations can cause the boot process to take longer than it could. .if t .bp .if n .sp If you are having these problems, you can solve them by explicitly specifying where the CD-ROM host interfaces are located. For example, by default most SoundBlaster cards have the Matsushita CD-ROM host interface located at I/O port 0x230. (This is 0x10 above the I/O port for the audio section of the card.) If this is the case for your system, you could change where the kernel looks for the hardware by using the -c option at the kernel boot prompt. This will load the kernel and then give you the opportunity to change settings for any of the devices included the kernel. For example, to change the I/O port for .Nm matcd adapter zero to 0x340, you would type config> port matcd0c 0x340 If you recompile the kernel, you can change the entry in the kernel configuration file to specify a specific address by changing an entry like this: controller matcd0 at isa? port 0x230 bio With this change, the .Nm matcd driver will only look at I/O port 0x230 for the first CD-ROM host interface and will not disturb any other I/O ports. Once you have adjusted the kernel configuration file, it is necessary to configure and recompile the kernel, install it and reboot for the changes to take effect. .Sh SUPPORTED HARDWARE At this time, there are only two known drive models that work with the .Nm matcd driver: .Bl -tag -width CR-123-X -compact -offset indent .br .It Matsushita CR-562-x .br .It Matsushita CR-563-x .br .El Most resellers leave these original markings on the drives since the label also has the FCC, VDE, CSA and RU certification marks. Both of these drive models have motorized trays. There is also a custom version of these drives that does not have the volume control or headphone jack (seen on some Tandy computers), but this drive also works with .Nm matcd. The Matsushita CR-522-x and CR-523-x CD-ROM drive is not usable with .Nm matcd. The CR-522 and CR-523 can also be identified from the front as it requires a CD-caddy. Drives with IDE interfaces must use an IDE driver. The TEAC CD-55 4X CD-ROM drive also uses the Creative/Panasonic interface but the TEAC drive is \fInot\fR compatible with the Matsushita CR-56x drives. The TEAC drive cannot be used with .Nm matcd. .if t .sp .if n .bp The most common source of host interface adapters for the Panasonic drives are found in products from Creative Labs, including SoundBlaster sound cards. There are numerous models of SoundBlaster sound cards, and most of the newer cards provide the appropriate interface, sometimes labeled as the "Creative/Panasonic" interface. The following host interface adapters are known to work with the .Nm matcd driver: .Bl -tag -width LONGNAME -compact -offset indent .It Creative Sound Blaster Pro (SBPRO) (CT1330A) .It Creative Sound Blaster 16 (CT1730) .It Creative Sound Blaster 16 - cost-reduced (CT1740) .It Creative OmniCD upgrade kit adapter card - stand-alone CD (CT1810) .It Creative Sound Blaster 16 - 2-layer, cost-reduced (CT2230) .It Creative Sound Blaster 16 (Vibra16) - 2-layer, single-chip (CT2260) .It Creative Sound Blaster 16 Value (SB16) - 2-layer, cost-reduced (CT2770) .It Creative PhoneBlaster SB16 + Sierra 14.4K Voice/FAX/Data/Speakerphone modem combo (CT3100) .It Reveal (SC400) .El Caution: Some of these sound boards can be optionally manufactured to not include the Panasonic/Creative interface, so check the board before buying solely based on model number. This is by no means a complete list as Creative Labs and other vendors that produce sound cards with an identical Creative/Panasonic drive interface release new versions of their adapters all the time. In addition to Creative Labs adapters, adapters that are compatible with Media Vision, IBM and Lasermate adapters are also supported. However, these adapters use a wide range of I/O port addresses, so the driver must be reconfigured to locate these adapters. It is important to understand that some manufacturers have a different host interface implementation. If you have a board that won't communicate with the drives under MS-DOS using the genuine Creative Labs drivers, then .Nm matcd may not work with that host adapter. .br .if t .bp .if n .sp .Sh SUPPORTED OPERATIONS The .Nm matcd driver supports block and character access. Partition "a" returns 2048-byte User Data blocks from data CDs. Partition "c" returns the full 2352-byte Frames from any type of CD, including audio CDs. (Partition "c" cannot be "mounted" with cd9660 or other filesystem emulators.) No other partitions are supported. The .Nm matcdl devices work the same as the normal .Nm matcd devices except that the drive trays are locked and remain locked until all of the devs on that drive are closed. .if n .bp .if t .sp .Nm Matcd accepts numerous .Fn ioctl commands, including disk and functions related to CD-ROM audio and tray control features. The commands are: .sp .Bl -tag -width CDIOCREADSUBCHANNELXXX -compact -offset indent .It DIOCGDINFO get disklabel. .It DIOCGDPART get partition. .It DIOCWDINFO set update disk. .It DIOCSDINFO set disklabel. .It CDIOCREADSUBCHANNEL get sub-channel information on current status of disc playing. .It CDIOCREADTOCHEADER reads table of contents summary. .It CDIOCREADTOCENTRYS reads length and other track information. .It CDIOCPLAYTRACKS plays audio starting at a track/index and stopping at a track/index. .It CDIOCPLAYMSF plays audio starting at a particular time offset. .It CDIOCPAUSE pauses a playing disc. .It CDIOCRESUME resumes playing a previously paused disc. Ignored if the drive is already playing. .It CDIOCSTOP stops playing a disc. .It CDIOCEJECT opens the disc tray. .It CDIOCCLOSE closes the disc tray. .It CDIOCPREVENT blocks further attempts to open the drive door until all devices close or a CDIOCALLOW ioctl is issued. .It CDIOCALLOW unlocks the drive door if it was locked. This ioctl is rejected if any locking devices are open. .It CDIOCGETVOL returns the current volume settings of the drive. .It CDIOCSETVOL sets the volume settings of the drive. .It CDIOCSETSTEREO causes the left channel audio to be sent to the left channel output and the right channel audio is sent to the right channel output. This is the default state. .It CDIOCSETMUTE causes the audio output to be turned off. The drive continues to read the audio on the disc and that audio is discarded until the audio is turned back on. .It CDIOCSETLEFT causes the left channel audio to be sent to the left and right channel outputs. .It CDIOCSETRIGHT causes the right channel audio to be sent to the left and right channel outputs. .It CDIOCSETPATCH causes the audio to be routed as specified in the provided bit maps. .It CDIOCSETPITCH changes the playback speed of the audio to increase or decrease (as in Karaoke). .It CDIOCCAPABILITY report the capabilities of the drive and driver. .El .Pp The .Fn ioctl commands defined above are the only ones that the .Nm matcd driver supports. .bp .Sh FILES .Bl -tag -width /dev/(r)matcd0a_/dev/(r)matcdl0a -compact .It Pa /dev/[r]matcd0a /dev/[r]matcdl0a is used to access 2048-byte blocks of data on a CD-ROM disc that is recorded in the Mode 1 Form 1 format. .It Pa /dev/[r]matcd0c /dev/[r]matcdl0c is used to access 2352-byte frames on a CD-ROM disc recorded in any format. .It Pa /usr/src/sys/i386/isa/matcd/* Source code and compilation options for .Nm matcd. .El The file \fIoptions.h\fR contains all of the compilation options. By default, the driver is configured to run on the current version of FreeBSD. .Sh NOTES .Pp The Creative/Panasonic interface does not use interrupts or DMA although the drives themselves are capable of using both. If the disc tray is opened while one or more partitions are open, further I/O to all partitions on the drive will be rejected until all partitions are closed. There must be a drive on each host interface that is addressed as physical drive 0. If this isn't the case, the driver will be unable to find the host interface or any of the connected drives. Drives on a second host interface start are considered logical drives 4-7, 8-11 on the third interface and 12-15 on the fourth. The first drive on the second host interface is logical drive 4 regardless of how many drives are present on the first host interface. Host interfaces are numbered in the order they are declared in the kernel configuration file, or in the order they are found if the kernel configuration file uses "?" for the port address. Host interface numbers are always contiguous. .Sh SEE ALSO .Pa /usr/include/sys/cdio.h .Sh AUTHOR The driver and documentation was written by Frank Durda IV. .br Program and Documentation are Copyright 1994, 1995, All rights reserved. .Sh HISTORY The .Nm matcd -driver appeared in FreeBSD Release 2.0.5. +driver appeared in +.Fx 2.0.5 . 509253 Index: head/share/man/man4/man4.i386/mtio.4 =================================================================== --- head/share/man/man4/man4.i386/mtio.4 (revision 17761) +++ head/share/man/man4/man4.i386/mtio.4 (revision 17762) @@ -1,228 +1,229 @@ .\" Copyright (c) 1996 .\" Mike Pritchard . All rights reserved. .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" Redistribution and use in source and binary 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, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" @(#)mtio.4 8.1 (Berkeley) 6/5/93 .\" .Dd February 11, 1996 .Dt MTIO 4 i386 .Os FreeBSD 2.2 .Sh NAME .Nm mtio .Nd .Tn FreeBSD magtape interface .Sh DESCRIPTION The special files named .Pa /dev/[nr]st* refer to SCSI tape drives, which may be attached to the system. .Pa /dev/[nr]st*.ctl are control devices that can be used to issue ioctls to the SCSI tape driver to set parameters that are required to last beyond the unmounting of a tape. .Pp .Pp The rewind devices automatically rewind when the last requested read, write or seek has finished, or the end of the tape has been reached. The letter .Ql n is usually prepended to the name of the no-rewind devices. .Pp Tapes can be written with either fixed length records or variable length records. See .Xr st 4 for more information. Two end-of-file markers mark the end of a tape, and one end-of-file marker marks the end of a tape file. If the tape is not to be rewound it is positioned with the head in between the two tape marks, where the next write will over write the second end-of-file marker. .Pp All of the magtape devices may be manipulated with the .Xr mt 1 command. .Pp A number of .Xr ioctl 2 operations are available on raw magnetic tape. The following definitions are from .Aq Pa sys/mtio.h : .Bd -literal /* * Structures and definitions for mag tape io control commands */ /* structure for MTIOCTOP - mag tape op command */ struct mtop { short mt_op; /* operations defined below */ daddr_t mt_count; /* how many of them */ }; /* operations */ #define MTWEOF 0 /* write an end-of-file record */ #define MTFSF 1 /* forward space file */ #define MTBSF 2 /* backward space file */ #define MTFSR 3 /* forward space record */ #define MTBSR 4 /* backward space record */ #define MTREW 5 /* rewind */ #define MTOFFL 6 /* rewind and put the drive offline */ #define MTNOP 7 /* no operation, sets status only */ #define MTCACHE 8 /* enable controller cache */ #define MTNOCACHE 9 /* disable controller cache */ #if defined(__FreeBSD__) /* Set block size for device. If device is a variable size dev */ /* a non zero parameter will change the device to a fixed block size */ /* device with block size set to that of the parameter passed in. */ /* Resetting the block size to 0 will restore the device to a variable */ /* block size device. */ #define MTSETBSIZ 10 /* Set density values for device. They are defined in the SCSI II spec */ /* and range from 0 to 0x17. Sets the value for the opened mode only */ #define MTSETDNSTY 11 #define MTERASE 12 /* erase to EOM */ #define MTEOD 13 /* Space to EOM */ #define MTCOMP 14 /* select compression mode 0=off, 1=def */ #define MTRETENS 15 /* re-tension tape */ #endif /* structure for MTIOCGET - mag tape get status command */ struct mtget { short mt_type; /* type of magtape device */ /* the following two registers are grossly device dependent */ short mt_dsreg; /* ``drive status'' register */ short mt_erreg; /* ``error'' register */ /* end device-dependent registers */ short mt_resid; /* residual count */ #if defined (__FreeBSD__) daddr_t mt_blksiz; /* presently operating blocksize */ daddr_t mt_density; /* presently operating density */ daddr_t mt_comp; /* presently operating compression */ daddr_t mt_blksiz0; /* blocksize for mode 0 */ daddr_t mt_blksiz1; /* blocksize for mode 1 */ daddr_t mt_blksiz2; /* blocksize for mode 2 */ daddr_t mt_blksiz3; /* blocksize for mode 3 */ daddr_t mt_density0; /* density for mode 0 */ daddr_t mt_density1; /* density for mode 1 */ daddr_t mt_density2; /* density for mode 2 */ daddr_t mt_density3; /* density for mode 3 */ /* the following are not yet implemented */ u_char mt_comp0; /* compression type for mode 0 */ u_char mt_comp1; /* compression type for mode 1 */ u_char mt_comp2; /* compression type for mode 2 */ u_char mt_comp3; /* compression type for mode 3 */ #endif daddr_t mt_fileno; /* file number of current position */ daddr_t mt_blkno; /* block number of current position */ /* end not yet implemented */ }; /* * Constants for mt_type byte. These are the same * for controllers compatible with the types listed. */ #define MT_ISTS 0x01 /* TS-11 */ #define MT_ISHT 0x02 /* TM03 Massbus: TE16, TU45, TU77 */ #define MT_ISTM 0x03 /* TM11/TE10 Unibus */ #define MT_ISMT 0x04 /* TM78/TU78 Massbus */ #define MT_ISUT 0x05 /* SI TU-45 emulation on Unibus */ #define MT_ISCPC 0x06 /* SUN */ #define MT_ISAR 0x07 /* SUN */ #define MT_ISTMSCP 0x08 /* DEC TMSCP protocol (TU81, TK50) */ #define MT_ISCY 0x09 /* CCI Cipher */ #define MT_ISCT 0x0a /* HP 1/4 tape */ #define MT_ISFHP 0x0b /* HP 7980 1/2 tape */ #define MT_ISEXABYTE 0x0c /* Exabyte */ #define MT_ISEXA8200 0x0c /* Exabyte EXB-8200 */ #define MT_ISEXA8500 0x0d /* Exabyte EXB-8500 */ #define MT_ISVIPER1 0x0e /* Archive Viper-150 */ #define MT_ISPYTHON 0x0f /* Archive Python (DAT) */ #define MT_ISHPDAT 0x10 /* HP 35450A DAT drive */ #define MT_ISMFOUR 0x11 /* M4 Data 1/2 9track drive */ #define MT_ISTK50 0x12 /* DEC SCSI TK50 */ #define MT_ISMT02 0x13 /* Emulex MT02 SCSI tape controller */ /* mag tape io control commands */ #define MTIOCTOP _IOW('m', 1, struct mtop) /* do a mag tape op */ #define MTIOCGET _IOR('m', 2, struct mtget) /* get tape status */ #define MTIOCIEOT _IO('m', 3) /* ignore EOT error */ #define MTIOCEEOT _IO('m', 4) /* enable EOT error */ #ifndef KERNEL #define DEFTAPE "/dev/nrst0" #endif #ifdef KERNEL /* * minor device number */ #define T_UNIT 003 /* unit selection */ #define T_NOREWIND 004 /* no rewind on close */ #define T_DENSEL 030 /* density select */ #define T_800BPI 000 /* select 800 bpi */ #define T_1600BPI 010 /* select 1600 bpi */ #define T_6250BPI 020 /* select 6250 bpi */ #define T_BADBPI 030 /* undefined selection */ #endif #endif /* _SYS_MTIO_H_ */ .Ed .Pp .Sh FILES .Bl -tag -width /dev/[nr]st* -compact .It Pa /dev/[nr]st* .El .Sh SEE ALSO .Xr mt 1 , .Xr tar 1 , .Xr st 4 .Sh HISTORY The .Nm mtio manual appeared in .Bx 4.2 . -An i386 version first appeared in FreeBSD 2.2. +An i386 version first appeared in +.Fx 2.2 . .Sh BUGS The status should be returned in a device independent format. .Pp The special file naming should be redone in a more consistent and understandable manner. Index: head/share/man/man4/man4.i386/scd.4 =================================================================== --- head/share/man/man4/man4.i386/scd.4 (revision 17761) +++ head/share/man/man4/man4.i386/scd.4 (revision 17762) @@ -1,60 +1,61 @@ .\" .\" Copyright (c) 1995 Jordan K. Hubbard .\" All rights reserved. .\" .\" Redistribution and use in source and binary 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, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. The name of the author may not be used to endorse or promote products .\" derived from this software withough specific prior written permission .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" .Dd January 1, 1995 .Dt SCD 4 i386 -.Os FreeBSD 2.0 +.Os FreeBSD 2.0.5 .Sh NAME .Nm scd .Nd Sony CDU31/33 CD-ROM driver .Sh SYNOPSIS .sp .Cd "device scd0 at isa? port 0x230 bio" .sp .Sh DESCRIPTION The .Nm scd driver provides a data interface to the Sony CDU31 and CDU33A CD-ROM drives. The drive must be hooked to a Sony proprietary interface card or a compatible clone. .Sh FILES .Bl -tag -width /dev/[r]scd0a -compact .It Pa /dev/[r]scd0a accesses BSD partition on the disc. Normally, there is only one file system on a CDROM disc. .It Pa /dev/[r]scd0c accesses the raw device. .Sh SEE ALSO .Pa /sys/i386/isa/scd.c .Sh AUTHORS The driver was written by Mikael Hybsch with code contributed by Holger Veit and Brian Moore. .Sh HISTORY The .Nm scd -driver first appeared in FreeBSD 950210-SNAP. +driver first appeared in +.FX 2.0.5 . Index: head/share/man/man4/man4.i386/vx.4 =================================================================== --- head/share/man/man4/man4.i386/vx.4 (revision 17761) +++ head/share/man/man4/man4.i386/vx.4 (revision 17762) @@ -1,85 +1,87 @@ .\" .\" Copyright (c) 1996, Fred Gray .\" All rights reserved. .\" .\" Redistribution and use in source and binary 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, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by David Greenman. .\" 4. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .Dd January 15, 1996 .Dt VX 4 i386 .Os .Sh NAME .Nm vx .Nd PCI Ethernet device driver .Sh SYNOPSIS .Cd "device vx0 at pci? port? net irq? vector vxintr" .Cd "device vx1 at pci? port? net irq? vector vxintr" .Cd "device vx2 at pci? port? net irq? vector vxintr" .Sh DESCRIPTION The .Nm vx driver provides support for the 3Com 3c590 and 3c595 EtherLink III and Fast EtherLink III PCI Ethernet cards in 10 Mbps mode. .Sh DIAGNOSTICS .Bl -diag .It "vx%d: not configured; kernel is built for only %d devices." There are not enough devices in the kernel configuration file for the number of adapters present in the system. Add devices to the configuration file, rebuild the kernel, and reboot. .Pp All other diagnostics indicate either a hardware problem or a bug in the driver. .Sh CAVEATS Some early-revision 3c590 cards are defective and suffer from many receive overruns, which cause lost packets. The author has attempted to implement a test for it based on the information supplied by 3Com, but the test resulted mostly in spurious warnings. .Pp The performance of this driver is somewhat limited by the fact that it uses only polled-mode I/O and does not make use of the bus-mastering capability of the cards. .Sh BUGS The .Nm vx driver is known not to reset the adapter correctly following a warm boot on some systems. .Pp The .Nm vx driver has not been exhaustively tested with all the models of cards that it claims to support. .Sh HISTORY The .Nm vx -device driver first appeared in FreeBSD 2.1.0. It was derived from the +device driver first appeared in +.Fx 2.1 . +It was derived from the .Nm ep driver, from which it inheirits most of its limitations. .Sh AUTHOR The .Nm vx device driver and this manual page were written by Fred Gray (fgray@rice.edu), based on the work of Herb Peyerl and with the assistance of numerous others. Index: head/share/man/man4/mtio.4 =================================================================== --- head/share/man/man4/mtio.4 (revision 17761) +++ head/share/man/man4/mtio.4 (revision 17762) @@ -1,228 +1,229 @@ .\" Copyright (c) 1996 .\" Mike Pritchard . All rights reserved. .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" Redistribution and use in source and binary 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, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" @(#)mtio.4 8.1 (Berkeley) 6/5/93 .\" .Dd February 11, 1996 .Dt MTIO 4 i386 .Os FreeBSD 2.2 .Sh NAME .Nm mtio .Nd .Tn FreeBSD magtape interface .Sh DESCRIPTION The special files named .Pa /dev/[nr]st* refer to SCSI tape drives, which may be attached to the system. .Pa /dev/[nr]st*.ctl are control devices that can be used to issue ioctls to the SCSI tape driver to set parameters that are required to last beyond the unmounting of a tape. .Pp .Pp The rewind devices automatically rewind when the last requested read, write or seek has finished, or the end of the tape has been reached. The letter .Ql n is usually prepended to the name of the no-rewind devices. .Pp Tapes can be written with either fixed length records or variable length records. See .Xr st 4 for more information. Two end-of-file markers mark the end of a tape, and one end-of-file marker marks the end of a tape file. If the tape is not to be rewound it is positioned with the head in between the two tape marks, where the next write will over write the second end-of-file marker. .Pp All of the magtape devices may be manipulated with the .Xr mt 1 command. .Pp A number of .Xr ioctl 2 operations are available on raw magnetic tape. The following definitions are from .Aq Pa sys/mtio.h : .Bd -literal /* * Structures and definitions for mag tape io control commands */ /* structure for MTIOCTOP - mag tape op command */ struct mtop { short mt_op; /* operations defined below */ daddr_t mt_count; /* how many of them */ }; /* operations */ #define MTWEOF 0 /* write an end-of-file record */ #define MTFSF 1 /* forward space file */ #define MTBSF 2 /* backward space file */ #define MTFSR 3 /* forward space record */ #define MTBSR 4 /* backward space record */ #define MTREW 5 /* rewind */ #define MTOFFL 6 /* rewind and put the drive offline */ #define MTNOP 7 /* no operation, sets status only */ #define MTCACHE 8 /* enable controller cache */ #define MTNOCACHE 9 /* disable controller cache */ #if defined(__FreeBSD__) /* Set block size for device. If device is a variable size dev */ /* a non zero parameter will change the device to a fixed block size */ /* device with block size set to that of the parameter passed in. */ /* Resetting the block size to 0 will restore the device to a variable */ /* block size device. */ #define MTSETBSIZ 10 /* Set density values for device. They are defined in the SCSI II spec */ /* and range from 0 to 0x17. Sets the value for the opened mode only */ #define MTSETDNSTY 11 #define MTERASE 12 /* erase to EOM */ #define MTEOD 13 /* Space to EOM */ #define MTCOMP 14 /* select compression mode 0=off, 1=def */ #define MTRETENS 15 /* re-tension tape */ #endif /* structure for MTIOCGET - mag tape get status command */ struct mtget { short mt_type; /* type of magtape device */ /* the following two registers are grossly device dependent */ short mt_dsreg; /* ``drive status'' register */ short mt_erreg; /* ``error'' register */ /* end device-dependent registers */ short mt_resid; /* residual count */ #if defined (__FreeBSD__) daddr_t mt_blksiz; /* presently operating blocksize */ daddr_t mt_density; /* presently operating density */ daddr_t mt_comp; /* presently operating compression */ daddr_t mt_blksiz0; /* blocksize for mode 0 */ daddr_t mt_blksiz1; /* blocksize for mode 1 */ daddr_t mt_blksiz2; /* blocksize for mode 2 */ daddr_t mt_blksiz3; /* blocksize for mode 3 */ daddr_t mt_density0; /* density for mode 0 */ daddr_t mt_density1; /* density for mode 1 */ daddr_t mt_density2; /* density for mode 2 */ daddr_t mt_density3; /* density for mode 3 */ /* the following are not yet implemented */ u_char mt_comp0; /* compression type for mode 0 */ u_char mt_comp1; /* compression type for mode 1 */ u_char mt_comp2; /* compression type for mode 2 */ u_char mt_comp3; /* compression type for mode 3 */ #endif daddr_t mt_fileno; /* file number of current position */ daddr_t mt_blkno; /* block number of current position */ /* end not yet implemented */ }; /* * Constants for mt_type byte. These are the same * for controllers compatible with the types listed. */ #define MT_ISTS 0x01 /* TS-11 */ #define MT_ISHT 0x02 /* TM03 Massbus: TE16, TU45, TU77 */ #define MT_ISTM 0x03 /* TM11/TE10 Unibus */ #define MT_ISMT 0x04 /* TM78/TU78 Massbus */ #define MT_ISUT 0x05 /* SI TU-45 emulation on Unibus */ #define MT_ISCPC 0x06 /* SUN */ #define MT_ISAR 0x07 /* SUN */ #define MT_ISTMSCP 0x08 /* DEC TMSCP protocol (TU81, TK50) */ #define MT_ISCY 0x09 /* CCI Cipher */ #define MT_ISCT 0x0a /* HP 1/4 tape */ #define MT_ISFHP 0x0b /* HP 7980 1/2 tape */ #define MT_ISEXABYTE 0x0c /* Exabyte */ #define MT_ISEXA8200 0x0c /* Exabyte EXB-8200 */ #define MT_ISEXA8500 0x0d /* Exabyte EXB-8500 */ #define MT_ISVIPER1 0x0e /* Archive Viper-150 */ #define MT_ISPYTHON 0x0f /* Archive Python (DAT) */ #define MT_ISHPDAT 0x10 /* HP 35450A DAT drive */ #define MT_ISMFOUR 0x11 /* M4 Data 1/2 9track drive */ #define MT_ISTK50 0x12 /* DEC SCSI TK50 */ #define MT_ISMT02 0x13 /* Emulex MT02 SCSI tape controller */ /* mag tape io control commands */ #define MTIOCTOP _IOW('m', 1, struct mtop) /* do a mag tape op */ #define MTIOCGET _IOR('m', 2, struct mtget) /* get tape status */ #define MTIOCIEOT _IO('m', 3) /* ignore EOT error */ #define MTIOCEEOT _IO('m', 4) /* enable EOT error */ #ifndef KERNEL #define DEFTAPE "/dev/nrst0" #endif #ifdef KERNEL /* * minor device number */ #define T_UNIT 003 /* unit selection */ #define T_NOREWIND 004 /* no rewind on close */ #define T_DENSEL 030 /* density select */ #define T_800BPI 000 /* select 800 bpi */ #define T_1600BPI 010 /* select 1600 bpi */ #define T_6250BPI 020 /* select 6250 bpi */ #define T_BADBPI 030 /* undefined selection */ #endif #endif /* _SYS_MTIO_H_ */ .Ed .Pp .Sh FILES .Bl -tag -width /dev/[nr]st* -compact .It Pa /dev/[nr]st* .El .Sh SEE ALSO .Xr mt 1 , .Xr tar 1 , .Xr st 4 .Sh HISTORY The .Nm mtio manual appeared in .Bx 4.2 . -An i386 version first appeared in FreeBSD 2.2. +An i386 version first appeared in +.Fx 2.2 . .Sh BUGS The status should be returned in a device independent format. .Pp The special file naming should be redone in a more consistent and understandable manner. Index: head/share/man/man4/worm.4 =================================================================== --- head/share/man/man4/worm.4 (revision 17761) +++ head/share/man/man4/worm.4 (revision 17762) @@ -1,255 +1,256 @@ .\" .\" Copyright (C) 1996 .\" interface business GmbH .\" Tolkewitzer Strasse 49 .\" D-01277 Dresden .\" F.R. Germany .\" .\" All rights reserved. .\" .\" Written by Joerg Wunsch .\" .\" .\" Redistribution and use in source and binary 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, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY .\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT .\" OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR .\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF .\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE .\" USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $Id: worm.4,v 1.4 1996/04/08 04:18:08 mpp Exp $ +.\" $Id: worm.4,v 1.5 1996/06/23 18:27:12 joerg Exp $ .\" " .Dd January 27, 1996 .Dt WORM 4 .Os FreeBSD .Sh NAME .Nm worm .Nd write-once (CD-R) disk driver .Sh SYNOPSIS .Cd disk worm0 .Cd disk worm0 target 5 lun 0 .Sh DESCRIPTION The .Nm worm driver provides support for a .Em SCSI write-once device, in particular for a CD-R recording device. The driver attempts to abstract the dirty hardware work to a common API as good as possible. Due to the very special nature of CD-R devices and their handling requirements, this API applies some more constraints to the user than those of other disk-like devices. .Pp A CD is usually structured into sessions and tracks. Each track can hold a different type of data, basically either audio information, or CD-ROM data. In order to record a CD-R, the device must be told which kind of data is to be recorded, at which speed, etc. Once all tracks of a session have been written, the medium must finally be .Em fixated which basically means that the table of contents will be written, and the session is marked as usable. Optionally, a new session can be enabled at this time, or the disk can be entirely closed to prevent further writing. .Pp One particular feature of all existing CD-R recorders is that they require a constant data stream while the write channel is open. This usually requires some precautions like using a multiple-buffering filter to read the data from the disk, and/or running at real-time priority. .Pp There is no official standard for CD-R devices, so every vendor seems to implement his own set of controlling commands. Some vendors use rather similar command sets, while other devices behave entirely different. The driver has builtin knowledge about the odds and ends of some devices, which must then be selected first at run-time in order to make the driver operational at all. This builtin knowledge will be replaced by a loadable module scenario in the future. .Pp Due to the requirement of adjusting several parameters before actually being able to write some data to the CD-R, and due to the tight timing requirements when writing data, the driver distinguishes two different operation modes. When opening a file descriptor for a device belonging to the .Nm driver without write access, the driver does not enforce the tight timing that is needed to write data to the CD-R, but it allows for sending .Xr ioctl 2 commands to adjust parameters. Any number of ioctls can be performed on the device as long as the required sequence of actions is being maintained. The first thing that must be done is to select a set of quirks for the actual device. Then, the per-session parameters must be specified. Each track requires a set of per-track parameters finally. .Pp Once all preparations have been done, the device can be opened with write intent, at which point the driver starts to activate the time-critical handling, and is expecting any number of .Xr write 2 system calls that is required in order to transfer all the data to the device. Failure in providing these data in a timely fashion will render the current medium unusable. The device-specific sequence for telling that the current track is finally complete will be issued to the device when calling .Xr close 2 on the file descriptor that has been used to write the data. .Pp After this happened, things are no longer time-critical. Any number of further tracks can be written to the device. Finally, the session must be fixated by another ioctl. .Sh IOCTLS The following .Xr ioctl 2 calls apply to CD-R devices. Their declaration can be found in the header file .Pa . .Bl -tag -width WORMIOCQUIRKSELECT .It Dv WORMIOCQUIRKSELECT Select the set of quirk functions to use for this device. This is the only allowed action on a virgin device after booting. The argument structure takes a vendor and a model string, which are matched against the vendor and model strings of all quirk records that have been registered with the driver. Currently, the only known quirks must have been statically compiled into the driver. .Pp If the driver fails to match the vendor and model string against any known quirk record, the system call returns with an error, and the variable .Va errno will be set to .Er EINVAL . The system call argument is a pointer to a .Dv struct wormio_quirk_select . .It Dv WORMIOCPREPDISK This command selects several session-wide parameters in the driver. The argument structure, .Dv struct wormio_prepare_disk takes two integer values, .Dv dummy , and .Dv speed . By setting .Dv dummy to 1, the drive will be told to simulate all actions, without actually turning on the laser. It is mainly used to test the environment whether it could cope with the timing constraints, without risking a damaged medium. The parameter .Dv speed is device-dependent, where a speed value of one generally applies to audio disks, and a speed value of 2 (or more) is used for recording data. .It Dv WORMIOCPREPTRACK The two parameters .Dv audio and .Dv preemp are being passed as arguments in a .Dv struct wormio_prepare_track . Both are Boolean, i.e. can be either 0 or 1. If .Dv audio is set to 1, the next track will be recorded in audio format, with 2352 bytes per block. If .Dv preemp is also set to 1, the audio data are assumed to be recorded with preemphasis. If .Dv audio is 0, CD-ROM data with a block length of 2048 bytes are about to be written next. .It Dv WORMIOCFIXATION This closes the current session. The argument is a pointer to .Dv struct wormio_fixation , with the elements .Dv toc_type , an integer between 0 and 4, describing the table-of-contents type. See .Xr wormcontrol 8 for a list of useful values. Optionally, setting the field .Dv onp to 1 will cause the next session being opened, so further recording can be performed into the remaining space. If .Dv onp is 0, the disk will be closed once and for all. .El Specifying wrong argument values to the above ioctl command will cause the driver to return an error condition with .Va errno set to .Er EINVAL . Any attempt to perform something else then selecting a quirks record on a device where this has not been done yet will return an error of .Er ENXIO . .Pp In addition, the .Xr scsi 4 general ioctls may be used with the .Nm driver, but only against the control device. .Sh BUGS The driver is considered beta quality. There's still a lot of polishing required. .Pp Preparing the driver for a CD-R from another vendor will require you to understand the source code, be used to the SCSI-2 specification, hold a copy of the vendor's SCSI reference manual on your desk, and have a lot of patience and CD-R's. .Pp The driver should include all the functionality of the .Xr cd 4 driver. No strategy for implementing this kind of interaction has been designed yet. .Pp The first .Em Unit Attention conditition after a media change is often not yet caught, although the driver was designed to catch it. This can royally screw a user of the driver, thus make sure to manually catch it before actually starting a burn. This can be done for example with a dummy .Em Test Unit Ready command: .Bd -literal scsi -f /dev/rworm0.ctl -c "0 0 0 0 0 0" >/dev/null 2>&1 .Ed .Sh FILES .Bl -tag -width /dev/rworm[0-9].ctl -compact .It Pa /dev/rworm[0-9] device for ioctl's and to write a CD-R .It Pa /dev/rworm[0-9].ctl the control device, as being used by .Xr scsi 8 .El .Sh DIAGNOSTICS See above. .Sh SEE ALSO .Xr cd 4 , .Xr scsi 4 , .Xr scsi 8 , .Xr wormcontrol 8 , .Xr open 2 , .Xr ioctl 2 , .Xr write 2 , .Xr close 2 . .Sh AUTHORS The first skeleton for a .Nm driver has been written by Peter Dufault in May, 1995. The driver has then been improved and made actually usable at all by .ie t J\(:org Wunsch .el Joerg Wunsch in January, 1996. .Sh HISTORY The .Nm -driver appeared in FreeBSD 2.1. +driver appeared in +.Fx 2.1 . Index: head/share/man/man5/sysconfig.5 =================================================================== --- head/share/man/man5/sysconfig.5 (revision 17761) +++ head/share/man/man5/sysconfig.5 (revision 17762) @@ -1,363 +1,364 @@ .\" Copyright (c) 1995 .\" Jordan K. Hubbard .\" .\" Redistribution and use in source and binary 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, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: sysconfig.5,v 1.2 1996/01/30 13:51:41 mpp Exp $ +.\" $Id: sysconfig.5,v 1.3 1996/08/15 23:36:21 mpp Exp $ .\" .Dd December 18, 1995 .Dt SYSCONFIG 5 .Os FreeBSD 2.0.5 .Sh NAME .Nm sysconfig .Nd local configuration information. .Sh DESCRIPTION The file .Nm sysconfig contains descriptive information about the local host name, configuration details for any potential network interfaces and which services should be started up at system initial boot time. In new installations, the .Nm sysconfig file is generally initialized by the system installation utility: .Pa /stand/sysinstall . .Pp It is the duty of the system administrator to properly maintain this file as changes occur on the local host. .Sh FILES .Bl -tag -width /etc/sysconfig -compact .It Pa /etc/sysconfig .El .Sh DESCRIPTION The purpose of .Nm is not to run commands or perform system startup actions directly. Instead, it is included by the various generic startup scripts in .Pa /etc which conditionalize their internal actions according to the settings found there. .Pp The following list provides a name and short description for each variable you can set in the .Nm file: .Bl -tag -width Ar .It Ar keymap (str) If set to .Ar NO then no keymap is installed, otherwise the value is used to to install the keymap file in .Pa /usr/share/syscons/keymaps/value.kbd .It Ar keyrate (str) The keyboard repeat speed. Set to .Ar slow , .Ar normal , .Ar fast or .Ar NO if the default behavior is desired. .It Ar keychange (str) If not set to .Ar NO , attempt to program the function keys with the value. The value should be a single string of the form: .Ar \&" [ ]...\&" .It Ar cursor (str) Can be set to the value of .Ar normal , .Ar blink , .Ar destructive or .Ar NO to set the cursor behavior explicitly or chose the default behavior. .It Ar scrnmap (str) If set to .Ar NO then no screen map is installed, otherwise the value is used to install the screen map file in .Pa /usr/share/syscons/scrnmaps/value . .It Ar font8x16 (str) If set to .Ar NO then the default 8x16 font value is used for screen size requests, otherwise the value in .Pa /usr/share/syscons/fonts/value is used. .It Ar font8x14 (str) If set to .Ar NO then the default 8x14 font value is used for screen size requests, otherwise the value in .Pa /usr/share/syscons/fonts/value is used. .It Ar font8x8 (str) If set to .Ar NO then the default 8x8 font value is used for screen size requests, otherwise the value in .Pa /usr/share/syscons/fonts/value is used. .It Ar blanktime (int) If set to .Ar NO then the default screen blanking interval is used, otherwise it is set to .Ar value seconds. .It Ar hostname (str) The Fully Qualified Domain Name of your host on the network. This should almost certainly be set to something meaningful, even if you've no network connected. .It Ar defaultdomainname (str) The NIS domainname of your host, or .Ar NO if you're not running NIS. .It Ar tcp_extensions (bool) Set to .Ar YES by default, this enables certain TCP options as described by Internet RFCs 1323 and 1644. If you have problems with connections randomly hanging or other weird behavior of such nature, you might try setting this to .Ar NO and seeing if that helps. Some hardware/software out there is known to be broken with respect to these options. .It Ar network_interfaces (str) Set to the list of network interfaces to configure on this host. For example, if you had a loopback device (standard) and an SMC Elite Ultra NIC, you might have this set to .Ar \&"lo0 ed0\&" for the two interfaces. An ifconfig_\fIinterface\fR variable is also assumed to exist for each value of \fIinterface\fR. .It Ar static_routes (str) Set to the list of static routes you would like to add at system boot time. If not set to .Ar NO then for each whitespace separated element in the value, a route_\fIelement\fR variable is assumed to exist for each instance of \fIelement\fR, and will later be passed to a ``route add'' operation. .It Ar defaultrouter (str) If not set to .Ar NO then create a default route to this host name or IP address (use IP address value if you also require this router to get to a name server!) .It Ar routedflags (str) Set to the arguments you wish to invoke the .Xr routed 8 command with or .Ar NO if you do not wish to run routed. This command is generally only useful in networks where the active exchange of RIP information is encouraged. .It Ar timedflags (str) Set to the arguments you wish to invoke the .Xr timed 8 command with or .Ar NO if you do not wish to run timed. This command is intended for networks of machines where a consistent \&"network time\&" for all of them must be established. This is often useful in large NFS environments where time stamps on files are expected to be consistent network-wide. .It Ar xntpdflags (str) Set to the arguments you wish to invoke the .Xr xntpd 8 command with or .Ar NO if you do not wish to run xntpd. This command is intended for applications where more precise time synchronization is required. .It Ar ntpdate (str) Set to the arguments you wish to invoke the .Xr ntpdate 8 command with or .Ar NO if you do not wish to initialize the time with ntpdate. This command is intended to synchronize the system clock only .Ar once from some standard server. An option to set this up initially (from a list of known servers) is also provided by the .Pa /stand/sysinstall program when the system is first installed. .It Ar rwhod (bool) Set to .Ar YES if you want to run the .Xr rwhod 8 command. .It Ar sendmail_flags (str) Set to the arguments you wish to invoke the .Xr sendmail 8 command with or .Ar NO if you do not wish to run sendmail. This command should be run by any host wishing to send and receive electronic mail and is enabled by default. .It Ar amdflags (str) Set to the arguments you wish to invoke the .Xr amd 8 command with or .Ar NO if you do not wish to run amd. This command implements an `auto-mount' scheme using NFS and can help prevent the ``spaghetti mount'' problem often encountered in large computational clusters. Read the man page or see the .Xr info 1 section for AMD. .It Ar nfs_client (bool) Set to .Ar YES if this host will be an NFS client. .It Ar nfs_server (bool) Set to .Ar YES if this host will be an NFS server. Note: This also requires an .Xr exports 5 file. .It Ar nis_ypsetflags (str) Set to the arguments you wish to invoke the .Xr ypset 8 command with or .Ar NO if you do not wish to run NIS as a client. .It Ar nis_serverflags (str) Set to the arguments you wish to invoke the .Xr ypserv 8 command with or .Ar NO if you do not wish to run an NIS server. .It Ar namedflags (str) Set to the arguments you wish to invoke the .Xr named 8 command with or .Ar NO if you do not wish to run a name server (if you don't even know what this means, then you definitely don't). .It Ar pcnfsd (str) Set to the arguments you wish to invoke the .Xr pcnfsd 8 command with or .Ar NO if you do not wish to support ONC clients on DOS, OS/2, Macintosh, etc) machines. Note that enabling this currently also requires that you install the optional pcnfsd package. See the networking section of any reasonably recent package archive or the net subdirectory of the ports collection. .It Ar apache_httpd (bool) If set to .Ar YES then the .Ar "Apache web server" will be started at system initial boot time. Note that enabling this currently also requires that you install the optional apache WWW server package. See the net or www sections of any reasonably recent package archive or the www subdirectory of the ports collection. .It Ar xtend (bool) If set to .Ar YES then the X-10 power controller daemon (the .Xr xtend 8 command) will be started at system initial boot time. .It Ar dumpdev (str) If not set to .Ar NO then point kernel crash-dumps at the swap device specified as .Em value . .It Ar savecore (bool) Set to .Ar YES if you want kernel crash-dumps to go to .Ar dumpdev for later post-mortem diagnosis with the .Xr gdb 1 command's .Fl k flag. .It Ar kerberos_server (bool) Set to .Ar YES if you want to run a Kerberos authentication server. .It Ar gateway (bool) Set to .Ar YES if this host is expected to gateway packets between interfaces (e.g. serve as some sort of packet router). .It Ar gated (bool) Set to .Ar YES if you want to run the .Xr gated 8 route management system at system initial boot time. Note that enabling this currently also requires that you install the optional gated package. See the networking section of any reasonably recent package archive or the net subdirectory of the ports collection. .It Ar check_quotas (bool) Set to .Ar YES if you want to enable user disk quota checking via the .Xr quotacheck 8 command. .It Ar accounting (bool) Set to .Ar YES if you wish to enable system accounting through the .Xr accton 8 facility. .It Ar ibcs2 (bool) Set to .Ar YES if you wish to enable iBCS2 (SCO) binary emulation at system initial boot time. .Sh SEE ALSO .Xr accton 8 , .Xr amd 8 , .Xr exports 5 , .Xr gated 8 , .Xr gdb 1 , .Xr info 1 , .Xr named 8 , .Xr ntpdate 8 , .Xr pcnfsd 8 , .Xr quotacheck 8 , .Xr rc 8 , .Xr route 8 , .Xr routed 8 , .Xr rwhod 8 , .Xr sendmail 8 , .Xr timed 8 , .Xr xntpd 8 , .Xr xtend 8 , .Xr ypserv 8 , .Xr ypset 8 .Sh HISTORY The .Nm -file appeared in FreeBSD 2.0.5 +file appeared in +.Fx 2.0.5 . .Sh AUTHOR Jordan K. Hubbard. Index: head/share/man/man8/crash.8 =================================================================== --- head/share/man/man8/crash.8 (revision 17761) +++ head/share/man/man8/crash.8 (revision 17762) @@ -1,210 +1,211 @@ .\" FreeBSD version Copyright (c) 1996 .\" Mike Pritchard . All rights reserved. .\" .\" Adapted from share/man/man8/man8.hp300/crash.8 .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" Redistribution and use in source and binary 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, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" .Dd February 2, 1996 .Dt CRASH 8 i386 .Os FreeBSD .Sh NAME .Nm crash .Nd FreeBSD system failures .Sh DESCRIPTION This section explains a bit about system crashes and (very briefly) how to analyze crash dumps. .Pp When the system crashes voluntarily it prints a message of the form .Bd -ragged -offset indent panic: why i gave up the ghost .Ed .Pp on the console, and if dumps have been enabled (see .Xr dumpon 8 ) , takes a dump on a mass storage peripheral, and then invokes an automatic reboot procedure as described in .Xr reboot 8 . Unless some unexpected inconsistency is encountered in the state of the file systems due to hardware or software failure, the system will then resume multi-user operations. .Pp The system has a large number of internal consistency checks; if one of these fails, then it will panic with a very short message indicating which one failed. In many instances, this will be the name of the routine which detected the error, or a two-word description of the inconsistency. A full understanding of most panic messages requires perusal of the source code for the system. .Pp The most common cause of system failures is hardware failure, which can reflect itself in different ways. Here are the messages which are most likely, with some hints as to causes. Left unstated in all cases is the possibility that hardware or software error produced the message in some unexpected way. .Pp .Bl -tag -width Ds -compact .It Sy "cannot mount root" This panic message results from a failure to mount the root filesystem during the bootstrap process. Either the root filesystem has been corrupted, or the system is attempting to use the wrong device as root filesystem. Usually, an alternate copy of the system binary or an alternate root filesystem can be used to bring up the system to investigate. Most often this is done by the use of the boot floppy you used to install the system, and then using the "fixit" floppy. .Pp .It Sy "init: not found" This is not a panic message, as reboots are likely to be futile. Late in the bootstrap procedure, the system was unable to locate and execute the initialization process, .Xr init 8 . The root filesystem is incorrect or has been corrupted, or the mode or type of .Pa /sbin/init forbids execution or is totally missing. .Pp .Pp .It Sy "ffs_realloccg: bad optim" .It Sy "ffs_valloc: dup alloc" .It Sy "ffs_alloccgblk: cyl groups corrupted" .It Sy "ffs_alloccg: map corrupted" .It Sy "blkfree: freeing free block" .It Sy "blkfree: freeing free frag" .It Sy "ifree: freeing free inode" These panic messages are among those that may be produced when filesystem inconsistencies are detected. The problem generally results from a failure to repair damaged filesystems after a crash, hardware failures, or other condition that should not normally occur. A filesystem check will normally correct the problem. .Pp .It Sy "timeout table full" This really shouldn't be a panic, but until the data structure involved is made to be extensible, running out of entries causes a crash. If this happens, make the timeout table bigger. .Pp .\" .It Sy "trap type %d, code = %x, v = %x" .\" An unexpected trap has occurred within the system; the trap types are: .\" .Bl -column xxxx -offset indent .\" 0 bus error .\" 1 address error .\" 2 illegal instruction .\" 3 divide by zero .\" .No 4\t Em chk No instruction .\" .No 5\t Em trapv No instruction .\" 6 privileged instruction .\" 7 trace trap .\" 8 MMU fault .\" 9 simulated software interrupt .\" 10 format error .\" 11 FP coprocessor fault .\" 12 coprocessor fault .\" 13 simulated AST .\" .El .\" .Pp .\" The favorite trap type in system crashes is trap type 8, .\" indicating a wild reference. .\" ``code'' (hex) is the concatenation of the .\" MMU .\" status register .\" (see ) .\" in the high 16 bits and the 68020 special status word .\" (see the 68020 manual, page 6-17) .\" in the low 16. .\" ``v'' (hex) is the virtual address which caused the fault. .\" Additionally, the kernel will dump about a screenful of semi-useful .\" information. .\" ``pid'' (decimal) is the process id of the process running at the .\" time of the exception. .\" Note that if we panic in an interrupt routine, .\" this process may not be related to the panic. .\" ``ps'' (hex) is the 68020 processor status register ``ps''. .\" ``pc'' (hex) is the value of the program counter saved .\" on the hardware exception frame. .\" It may .\" .Em not .\" be the PC of the instruction causing the fault. .\" ``sfc'' and ``dfc'' (hex) are the 68020 source/destination function codes. .\" They should always be one. .\" ``p0'' and ``p1'' are the .\" VAX-like .\" region registers. .\" They are of the form: .\" .Pp .\" .Bd -ragged -offset indent .\" '@' .\" .Ed .\" .Pp .\" where both are in hex. .\" Following these values are a dump of the processor registers (hex). .\" Finally, is a dump of the stack (user/kernel) at the time of the offense. .\" .Pp .It Sy "init died (signal #, exit #)" The system initialization process has exited with the specified signal number and exit code. This is bad news, as no new users will then be able to log in. Rebooting is the only fix, so the system just does it right away. .Pp That completes the list of panic types you are likely to see. .Pp If the system has been configured to take crash dumps (see .Xr dumpon 8 ) , then when it crashes it will write (or at least attempt to write) an image of memory into the back end of the dump device, usually the same as the primary swap area. After the system is rebooted, the program .Xr savecore 8 runs and preserves a copy of this core image and the current system in a specified directory for later perusal. See .Xr savecore 8 for details. .Pp To analyze a dump you should begin by running .Xr gdb 1 with the .Fl k flag on the system load image and core dump. If the core image is the result of a panic, the panic message is printed. For more details consult the chapter on kernel debugging in the FreeBSD handbook (http://www.freebsd.org). .Sh SEE ALSO .Xr gdb 1 , .Xr dumpon 8 , .Xr savecore 8 , .Xr reboot 8 .Sh HISTORY A .Nm crash -man page first appeared in FreeBSD 2.2. +man page first appeared in +.Fx 2.2 . Index: head/share/man/man8/man8.alpha/crash.8 =================================================================== --- head/share/man/man8/man8.alpha/crash.8 (revision 17761) +++ head/share/man/man8/man8.alpha/crash.8 (revision 17762) @@ -1,210 +1,211 @@ .\" FreeBSD version Copyright (c) 1996 .\" Mike Pritchard . All rights reserved. .\" .\" Adapted from share/man/man8/man8.hp300/crash.8 .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" Redistribution and use in source and binary 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, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" .Dd February 2, 1996 .Dt CRASH 8 i386 .Os FreeBSD .Sh NAME .Nm crash .Nd FreeBSD system failures .Sh DESCRIPTION This section explains a bit about system crashes and (very briefly) how to analyze crash dumps. .Pp When the system crashes voluntarily it prints a message of the form .Bd -ragged -offset indent panic: why i gave up the ghost .Ed .Pp on the console, and if dumps have been enabled (see .Xr dumpon 8 ) , takes a dump on a mass storage peripheral, and then invokes an automatic reboot procedure as described in .Xr reboot 8 . Unless some unexpected inconsistency is encountered in the state of the file systems due to hardware or software failure, the system will then resume multi-user operations. .Pp The system has a large number of internal consistency checks; if one of these fails, then it will panic with a very short message indicating which one failed. In many instances, this will be the name of the routine which detected the error, or a two-word description of the inconsistency. A full understanding of most panic messages requires perusal of the source code for the system. .Pp The most common cause of system failures is hardware failure, which can reflect itself in different ways. Here are the messages which are most likely, with some hints as to causes. Left unstated in all cases is the possibility that hardware or software error produced the message in some unexpected way. .Pp .Bl -tag -width Ds -compact .It Sy "cannot mount root" This panic message results from a failure to mount the root filesystem during the bootstrap process. Either the root filesystem has been corrupted, or the system is attempting to use the wrong device as root filesystem. Usually, an alternate copy of the system binary or an alternate root filesystem can be used to bring up the system to investigate. Most often this is done by the use of the boot floppy you used to install the system, and then using the "fixit" floppy. .Pp .It Sy "init: not found" This is not a panic message, as reboots are likely to be futile. Late in the bootstrap procedure, the system was unable to locate and execute the initialization process, .Xr init 8 . The root filesystem is incorrect or has been corrupted, or the mode or type of .Pa /sbin/init forbids execution or is totally missing. .Pp .Pp .It Sy "ffs_realloccg: bad optim" .It Sy "ffs_valloc: dup alloc" .It Sy "ffs_alloccgblk: cyl groups corrupted" .It Sy "ffs_alloccg: map corrupted" .It Sy "blkfree: freeing free block" .It Sy "blkfree: freeing free frag" .It Sy "ifree: freeing free inode" These panic messages are among those that may be produced when filesystem inconsistencies are detected. The problem generally results from a failure to repair damaged filesystems after a crash, hardware failures, or other condition that should not normally occur. A filesystem check will normally correct the problem. .Pp .It Sy "timeout table full" This really shouldn't be a panic, but until the data structure involved is made to be extensible, running out of entries causes a crash. If this happens, make the timeout table bigger. .Pp .\" .It Sy "trap type %d, code = %x, v = %x" .\" An unexpected trap has occurred within the system; the trap types are: .\" .Bl -column xxxx -offset indent .\" 0 bus error .\" 1 address error .\" 2 illegal instruction .\" 3 divide by zero .\" .No 4\t Em chk No instruction .\" .No 5\t Em trapv No instruction .\" 6 privileged instruction .\" 7 trace trap .\" 8 MMU fault .\" 9 simulated software interrupt .\" 10 format error .\" 11 FP coprocessor fault .\" 12 coprocessor fault .\" 13 simulated AST .\" .El .\" .Pp .\" The favorite trap type in system crashes is trap type 8, .\" indicating a wild reference. .\" ``code'' (hex) is the concatenation of the .\" MMU .\" status register .\" (see ) .\" in the high 16 bits and the 68020 special status word .\" (see the 68020 manual, page 6-17) .\" in the low 16. .\" ``v'' (hex) is the virtual address which caused the fault. .\" Additionally, the kernel will dump about a screenful of semi-useful .\" information. .\" ``pid'' (decimal) is the process id of the process running at the .\" time of the exception. .\" Note that if we panic in an interrupt routine, .\" this process may not be related to the panic. .\" ``ps'' (hex) is the 68020 processor status register ``ps''. .\" ``pc'' (hex) is the value of the program counter saved .\" on the hardware exception frame. .\" It may .\" .Em not .\" be the PC of the instruction causing the fault. .\" ``sfc'' and ``dfc'' (hex) are the 68020 source/destination function codes. .\" They should always be one. .\" ``p0'' and ``p1'' are the .\" VAX-like .\" region registers. .\" They are of the form: .\" .Pp .\" .Bd -ragged -offset indent .\" '@' .\" .Ed .\" .Pp .\" where both are in hex. .\" Following these values are a dump of the processor registers (hex). .\" Finally, is a dump of the stack (user/kernel) at the time of the offense. .\" .Pp .It Sy "init died (signal #, exit #)" The system initialization process has exited with the specified signal number and exit code. This is bad news, as no new users will then be able to log in. Rebooting is the only fix, so the system just does it right away. .Pp That completes the list of panic types you are likely to see. .Pp If the system has been configured to take crash dumps (see .Xr dumpon 8 ) , then when it crashes it will write (or at least attempt to write) an image of memory into the back end of the dump device, usually the same as the primary swap area. After the system is rebooted, the program .Xr savecore 8 runs and preserves a copy of this core image and the current system in a specified directory for later perusal. See .Xr savecore 8 for details. .Pp To analyze a dump you should begin by running .Xr gdb 1 with the .Fl k flag on the system load image and core dump. If the core image is the result of a panic, the panic message is printed. For more details consult the chapter on kernel debugging in the FreeBSD handbook (http://www.freebsd.org). .Sh SEE ALSO .Xr gdb 1 , .Xr dumpon 8 , .Xr savecore 8 , .Xr reboot 8 .Sh HISTORY A .Nm crash -man page first appeared in FreeBSD 2.2. +man page first appeared in +.Fx 2.2 . Index: head/share/man/man8/man8.i386/crash.8 =================================================================== --- head/share/man/man8/man8.i386/crash.8 (revision 17761) +++ head/share/man/man8/man8.i386/crash.8 (revision 17762) @@ -1,210 +1,211 @@ .\" FreeBSD version Copyright (c) 1996 .\" Mike Pritchard . All rights reserved. .\" .\" Adapted from share/man/man8/man8.hp300/crash.8 .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" Redistribution and use in source and binary 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, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" .Dd February 2, 1996 .Dt CRASH 8 i386 .Os FreeBSD .Sh NAME .Nm crash .Nd FreeBSD system failures .Sh DESCRIPTION This section explains a bit about system crashes and (very briefly) how to analyze crash dumps. .Pp When the system crashes voluntarily it prints a message of the form .Bd -ragged -offset indent panic: why i gave up the ghost .Ed .Pp on the console, and if dumps have been enabled (see .Xr dumpon 8 ) , takes a dump on a mass storage peripheral, and then invokes an automatic reboot procedure as described in .Xr reboot 8 . Unless some unexpected inconsistency is encountered in the state of the file systems due to hardware or software failure, the system will then resume multi-user operations. .Pp The system has a large number of internal consistency checks; if one of these fails, then it will panic with a very short message indicating which one failed. In many instances, this will be the name of the routine which detected the error, or a two-word description of the inconsistency. A full understanding of most panic messages requires perusal of the source code for the system. .Pp The most common cause of system failures is hardware failure, which can reflect itself in different ways. Here are the messages which are most likely, with some hints as to causes. Left unstated in all cases is the possibility that hardware or software error produced the message in some unexpected way. .Pp .Bl -tag -width Ds -compact .It Sy "cannot mount root" This panic message results from a failure to mount the root filesystem during the bootstrap process. Either the root filesystem has been corrupted, or the system is attempting to use the wrong device as root filesystem. Usually, an alternate copy of the system binary or an alternate root filesystem can be used to bring up the system to investigate. Most often this is done by the use of the boot floppy you used to install the system, and then using the "fixit" floppy. .Pp .It Sy "init: not found" This is not a panic message, as reboots are likely to be futile. Late in the bootstrap procedure, the system was unable to locate and execute the initialization process, .Xr init 8 . The root filesystem is incorrect or has been corrupted, or the mode or type of .Pa /sbin/init forbids execution or is totally missing. .Pp .Pp .It Sy "ffs_realloccg: bad optim" .It Sy "ffs_valloc: dup alloc" .It Sy "ffs_alloccgblk: cyl groups corrupted" .It Sy "ffs_alloccg: map corrupted" .It Sy "blkfree: freeing free block" .It Sy "blkfree: freeing free frag" .It Sy "ifree: freeing free inode" These panic messages are among those that may be produced when filesystem inconsistencies are detected. The problem generally results from a failure to repair damaged filesystems after a crash, hardware failures, or other condition that should not normally occur. A filesystem check will normally correct the problem. .Pp .It Sy "timeout table full" This really shouldn't be a panic, but until the data structure involved is made to be extensible, running out of entries causes a crash. If this happens, make the timeout table bigger. .Pp .\" .It Sy "trap type %d, code = %x, v = %x" .\" An unexpected trap has occurred within the system; the trap types are: .\" .Bl -column xxxx -offset indent .\" 0 bus error .\" 1 address error .\" 2 illegal instruction .\" 3 divide by zero .\" .No 4\t Em chk No instruction .\" .No 5\t Em trapv No instruction .\" 6 privileged instruction .\" 7 trace trap .\" 8 MMU fault .\" 9 simulated software interrupt .\" 10 format error .\" 11 FP coprocessor fault .\" 12 coprocessor fault .\" 13 simulated AST .\" .El .\" .Pp .\" The favorite trap type in system crashes is trap type 8, .\" indicating a wild reference. .\" ``code'' (hex) is the concatenation of the .\" MMU .\" status register .\" (see ) .\" in the high 16 bits and the 68020 special status word .\" (see the 68020 manual, page 6-17) .\" in the low 16. .\" ``v'' (hex) is the virtual address which caused the fault. .\" Additionally, the kernel will dump about a screenful of semi-useful .\" information. .\" ``pid'' (decimal) is the process id of the process running at the .\" time of the exception. .\" Note that if we panic in an interrupt routine, .\" this process may not be related to the panic. .\" ``ps'' (hex) is the 68020 processor status register ``ps''. .\" ``pc'' (hex) is the value of the program counter saved .\" on the hardware exception frame. .\" It may .\" .Em not .\" be the PC of the instruction causing the fault. .\" ``sfc'' and ``dfc'' (hex) are the 68020 source/destination function codes. .\" They should always be one. .\" ``p0'' and ``p1'' are the .\" VAX-like .\" region registers. .\" They are of the form: .\" .Pp .\" .Bd -ragged -offset indent .\" '@' .\" .Ed .\" .Pp .\" where both are in hex. .\" Following these values are a dump of the processor registers (hex). .\" Finally, is a dump of the stack (user/kernel) at the time of the offense. .\" .Pp .It Sy "init died (signal #, exit #)" The system initialization process has exited with the specified signal number and exit code. This is bad news, as no new users will then be able to log in. Rebooting is the only fix, so the system just does it right away. .Pp That completes the list of panic types you are likely to see. .Pp If the system has been configured to take crash dumps (see .Xr dumpon 8 ) , then when it crashes it will write (or at least attempt to write) an image of memory into the back end of the dump device, usually the same as the primary swap area. After the system is rebooted, the program .Xr savecore 8 runs and preserves a copy of this core image and the current system in a specified directory for later perusal. See .Xr savecore 8 for details. .Pp To analyze a dump you should begin by running .Xr gdb 1 with the .Fl k flag on the system load image and core dump. If the core image is the result of a panic, the panic message is printed. For more details consult the chapter on kernel debugging in the FreeBSD handbook (http://www.freebsd.org). .Sh SEE ALSO .Xr gdb 1 , .Xr dumpon 8 , .Xr savecore 8 , .Xr reboot 8 .Sh HISTORY A .Nm crash -man page first appeared in FreeBSD 2.2. +man page first appeared in +.Fx 2.2 .