Handle cua (dialout) at the same manner as tty, i.e. print
[unix-history] / share / man / man4 / man4.i386 / sio.4
CommitLineData
52ac9c69
RG
1.\" Copyright (c) 1990, 1991 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" the Systems Programming Group of the University of Utah Computer
6.\" Science Department.
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\" notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\" notice, this list of conditions and the following disclaimer in the
14.\" documentation and/or other materials provided with the distribution.
15.\" 3. All advertising materials mentioning features or use of this software
16.\" must display the following acknowledgement:
17.\" This product includes software developed by the University of
18.\" California, Berkeley and its contributors.
19.\" 4. Neither the name of the University nor the names of its contributors
20.\" may be used to endorse or promote products derived from this software
21.\" without specific prior written permission.
22.\"
23.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33.\" SUCH DAMAGE.
34.\"
35.\" from: @(#)dca.4 5.2 (Berkeley) 3/27/91
36.\" from: com.4,v 1.1 1993/08/06 11:19:07 cgd Exp
63ec8d43 37.\" $Id: sio.4,v 1.1 1993/08/28 12:41:23 rgrimes Exp $
52ac9c69 38.\"
63ec8d43 39.Dd February 9, 1994
52ac9c69
RG
40.Dt SIO 4 i386
41.Os FreeBSD
42.Sh NAME
43.Nm sio
44.Nd
63ec8d43 45fast interrupt driven asynchronous serial communications interface
52ac9c69 46.Sh SYNOPSIS
63ec8d43 47For standard ports:
52ac9c69
RG
48.Cd "device sio0 at isa? port" \&"IO_COM1\&" tty irq 4 vector siointr
49.Cd "device sio1 at isa? port" \&"IO_COM2\&" tty irq 3 vector siointr
50.Cd "device sio2 at isa? port" \&"IO_COM3\&" tty irq 5 vector siointr
51.Cd "device sio3 at isa? port" \&"IO_COM4\&" tty irq 9 vector siointr
63ec8d43
AC
52.sp
53For multiport cards:
54.Cd "options" \&"COM_MULTIPORT\&"
55.Cd "device sio4 at isa? port 0x2a0 tty irq 12 vector siointr flags 0x401"
56.Cd "device sio5 at isa? port 0x2a8 tty vector siointr flags 0x401"
57.Cd "device sio6 at isa? port 0x2b0 tty vector siointr flags 0x401"
58.Cd "device sio7 at isa? port 0x2b8 tty vector siointr flags 0x401"
59.sp
60For bidirectional use of ports:
61.Cd "options" \&"COM_BIDIR\&"
62.sp
63For control FIFO trigger:
64.Cd "options" \&"FIFO_TRIGGER=FIFO_TRIGGER_14\&"
65.sp
66Use 0x02 bit in flags field to disable FIFO on specified port.
52ac9c69
RG
67.Sh DESCRIPTION
68The
69.Nm sio
63ec8d43 70driver provides support for NS8250-, NS16450-, NS16550 and NS16550A-based
52ac9c69
RG
71.Tn EIA
72.Tn RS-232C
73.Pf ( Tn CCITT
63ec8d43 74.Tn V.24 )
52ac9c69 75communications interfaces. The NS8250 and NS16450 have single character
63ec8d43 76buffers, the NS16550A has a 16 character FIFO buffer.
52ac9c69
RG
77.Pp
78Input and output for each line may set to one of following baud rates;
7950, 75, 110, 134.5, 150, 300, 600, 1200, 1800, 2400, 4800, 9600,
63ec8d43
AC
8019200, 38400, 57600, or 115200. Your hardware may limit your baud
81rate choices.
82.Pp
83For multiport cards the
84.Nm flags
85keyword in the kernel configuration file determines which port of
86your multiport card is the master device, and whether the
87port is part of a multiport card. The master device is the port with
88the shared interrupt register.
89All ports of a multiport card report
90pending interrupts using this single register.
91.Pp
92In the synopsis the
93.Nm flags 0x401
94means that the 4th port (sio4) is the master
95device (so the MSB of the flags), and that the ports are part of a
96multiport card (the LSB of the flags, actually only the LS
97.Nm bit
98).
99F.e. if you have only two standard ports in addition to multiport
100card, this
101.Nm flags
102will be
103.Nm 0x201 .
104.Pp
105Which port is the master device depends on the card type. Consult
106the hardware documentation of your card.
107If you are shure, that your master device fully compatible with
108standard port, you can ommit
109.Nm flags
110field from master device description line.
111.Pp
112Serial ports controlled by the
113.Nm sio
114driver can be used for both dialin and dialout. Use
115.Xr comcontrol 8
116to enable/disable bidirectional use of the
117.Nm sio
118ports. The minor number of the dialout
119port is 128 higher than that of the corresponding dialin port. Use
120.Xr stty 1
121to enable or disable modem control as required by your setup.
52ac9c69
RG
122.Sh FILES
123.Bl -tag -width Pa
63ec8d43
AC
124.It Pa /dev/tty0? for dialin
125.It Pa /dev/cua0? for dialout
52ac9c69
RG
126.El
127.Sh DIAGNOSTICS
128.Bl -diag
129.It sio%d: silo overflow.
130The single-character input
131.Dq silo
132has overflowed and incoming data has been lost.
133.\".It com%d: weird interrupt: %x.
134.\"The device has generated an unexpected interrupt
135.\"with the code listed.
136.El
137.Sh SEE ALSO
63ec8d43
AC
138.Xr tty 4 ,
139.Xr comcontrol 8 ,
140.Xr stty 1 .
52ac9c69
RG
141.Sh HISTORY
142The
143.Nm
144driver is derived from the
145.Nm HP9000/300
146.Nm dca
147driver and is
148.Ud
149.Sh BUGS
63ec8d43
AC
150Data loss is not near as likely on busy systems
151but they still can occur at very high baud rates on slow systems. The
152use of NS16550A's helps lot to handle high baud rates.
52ac9c69
RG
153.Pp
154The constants which define the locations
63ec8d43 155of the various serial ports are holdovers from
52ac9c69 156.Nm DOS .
63ec8d43
AC
157As shown, hex addresses can be used instead.
158.Pp
159As usual, you get what you pay for; cheap NS16550 clones generally don't work.
160.Pp
161The multiport example has been successfully tested with an AST/4 card, your
162mileage may vary however.
52ac9c69 163.Pp
63ec8d43 164This man page can not replace the Ultimate Doc(tm): the source.