6396 remove SVM
[unleashed.git] / usr / src / man / man7d / zs.7d
blob690935cca8db0cbc1e1cbe1bd36bf22f2779f84d
1 '\" te
2 .\" Copyright (c) 2009, Sun Microsystems, Inc.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
4 .\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
5 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH ZS 7D "April 9, 2016"
7 .SH NAME
8 zs \- Zilog 8530 SCC serial communications driver
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <fcntl.h>
13 .fi
15 .LP
16 .nf
17 #include <sys/termios.h>
18 .fi
20 .LP
21 .nf
22 open("/dev/term/\fIn\fR", \fImode\fR);
23 .fi
25 .LP
26 .nf
27 open("/dev/tty\fIn\fR", \fImode\fR);
28 .fi
30 .LP
31 .nf
32 open("/dev/cua/\fIn\fR", \fImode\fR);
33 .fi
35 .SH DESCRIPTION
36 .LP
37 The Zilog 8530 provides two serial input/output channels capable of supporting
38 a variety of communication protocols.  A typical system uses two or more of
39 these devices to implement essential functions, including RS-423 ports (which
40 also support most RS-232 equipment), and the console keyboard and mouse
41 devices.
42 .sp
43 .LP
44 The \fBzs\fR module is a loadable STREAMS driver that provides basic support
45 for the Zilog 8530 hardware and basic asynchronous communication support. The
46 driver supports the \fBtermio\fR(7I) device control functions specified by
47 flags in the \fBc_cflag\fR word of the \fBtermios\fR structure and by the
48 \fBIGNBRK,\fR \fBIGNPAR,\fR \fBPARMRK,\fR or \fBINPCK\fR flags in the
49 \fBc_iflag\fR word. All other \fBtermio\fR(7I) functions must be performed by
50 \fBSTREAMS\fR modules pushed atop the driver. When a device is opened, the
51 \fBldterm\fR(7M) and \fBttcompat\fR(7M) \fBSTREAMS\fR modules are automatically
52 pushed on top of the stream, providing the standard \fBtermio\fR(7I) interface.
53 .sp
54 .LP
55 The character-special devices \fB/dev/term/a\fR and \fB/dev/term/b\fR are used
56 to access the two serial ports on the \fBCPU\fR board.
57 .sp
58 .LP
59 Valid name space entries are \fB/dev/cua/\fR[\fIa-z\fR],
60 \fB/dev/term/\fR[\fIa-z\fR] and \fB/dev/tty\fR[\fIa-z\fR]. The number of
61 entries used in a name space are machine dependent.
62 .sp
63 .LP
64 To allow a single tty line to be connected to a modem and used for both
65 incoming and outgoing calls, a special feature is available that is controlled
66 by the minor device number. By accessing character-special devices with names
67 of the form  \fB/dev/cua/\fR[\fIn\fR], it is possible to open a port without
68 the \fBCarrier Detect\fR signal being asserted, either through hardware or an
69 equivalent software mechanism.  These devices are commonly known as dial-out
70 lines.
71 .sp
72 .LP
73 Once a \fB/dev/cua/\fR[\fIn\fR] line is opened, the corresponding tty line
74 cannot be opened until the \fB/dev/cua/\fR\fIn\fR line is closed. A blocking
75 open will wait until the \fB/dev/cua/\fR[\fIn\fR] line is closed (which will
76 drop \fBData Terminal Ready\fR, and \fBCarrier Detect\fR) and carrier is
77 detected again. A non-blocking open will return an error. If the tty line has
78 been opened successfully (usually only when carrier is recognized on the modem)
79 , the corresponding \fB/dev/cua/\fR[\fIn\fR] line cannot be opened. This allows
80 a modem to be attached to \fB/dev/term/\fR[\fIn\fR] (renamed from
81 \fB/dev/tty\fR[\fIn\fR]) and used for dial-in (by enabling the line for login
82 in \fB/etc/inittab\fR) and also used for dial-out (by \fBtip\fR(1) or
83 \fBuucp\fR(1C)) as \fB/dev/cua/\fR[\fIn\fR] when no one is logged in on the
84 line.
85 .LP
86 Note -
87 .sp
88 .RS 2
89 This module is affected by the setting of specific eeprom variables. For
90 information on parameters that are persistent across reboots, see the
91 \fBeeprom\fR(1M) man page.
92 .RE
93 .SH IOCTLS
94 .LP
95 The \fBzs\fR module supports the standard set of \fBtermio ioctl\fR(\|) calls.
96 .sp
97 .LP
98 If the \fBCRTSCTS\fR flag in the \fBc_cflag\fR field is set, output will be
99 generated only if \fBCTS\fR is high; if \fBCTS\fR is low, output will be
100 frozen. If the \fBCRTSCTS\fR flag is clear, the state of \fBCTS\fR has no
101 effect.
104 If the \fBCRTSXOFF\fR flag in the  \fBc_cflag\fR field is set, input will be
105 received only if \fBRTS\fR is high; if \fBRTS\fR is low, input will be frozen.
106 If the  \fBCRTSXOFF\fR flag is clear, the state of  \fBRTS\fR has no effect.
109 The \fBtermios\fR \fBCRTSCTS\fR (respectively  \fBCRTSXOFF)\fR flag and
110 \fBtermiox\fR \fBCTSXON\fR (respectively \fBRTSXOFF)\fR can be used
111 interchangeably.
114 Breaks can be generated by the \fBTCSBRK,\fR \fBTIOCSBRK,\fR and \fBTIOCCBRK
115 ioctl\fR(\|) calls.
118 The state of the \fBDCD,\fR \fBCTS,\fR \fBRTS,\fR and \fBDTR\fR interface
119 signals may be queried through the use of the \fBTIOCM_CAR,\fR \fBTIOCM_CTS,\fR
120 \fBTIOCM_RTS,\fR and \fBTIOCM_DTR\fR arguments to the \fBTIOCMGET ioctl\fR
121 command, respectively.  Due to hardware limitations, only the \fBRTS\fR and
122 \fBDTR\fR signals may be set through their respective arguments to the
123 \fBTIOCMSET,\fR \fBTIOCMBIS,\fR and \fBTIOCMBIC ioctl\fR commands.
126 The input and output line speeds may be set to any of the speeds supported by
127 \fBtermio\fR. The input and output line speeds cannot be set independently; for
128 example, when you set the output speed, the input speed is automatically
129 set to the same speed.
132 When the driver is used to service the serial console port, it supports a BREAK
133 condition that allows the system to enter the debugger or the monitor. The
134 BREAK condition is generated by hardware and it is usually enabled by default.
135 A BREAK condition originating from erroneous electrical signals cannot be
136 distinguished from one deliberately sent by remote DCE. The Alternate Break
137 sequence can be used to remedy this.
140 Due to a risk of incorrect sequence interpretation, SLIP and certain other
141 binary protocols should not be run over the serial console port when Alternate
142 Break sequence is in effect. Although PPP is a binary protocol, it is able to
143 avoid these sequences using the ACCM feature in \fIRFC 1662\fR. For Solaris PPP
144 4.0, you do this by adding the following line to the \fB/etc/ppp/options\fR
145 file (or other configuration files used for the connection; see \fBpppd\fR(1M)
146 for details):
148 .in +2
150 asyncmap  0x00002000
152 .in -2
156 By default, the Alternate Break sequence is three characters: carriage return,
157 tilde and control-B (CR ~ CTRL-B), but may be changed by the driver. For more
158 information on breaking (entering the debugger or monitor), see \fBkbd\fR(1)
159 and \fBkb\fR(7M).
160 .SH ERRORS
162 An \fBopen\fR will fail under the following conditions:
164 .ne 2
166 \fB\fBENXIO\fR\fR
168 .RS 9n
169 The unit being opened does not exist.
173 .ne 2
175 \fB\fBEBUSY\fR\fR
177 .RS 9n
178 The dial-out device is being opened and the dial-in device is already open, or
179 the dial-in device is being opened with a no-delay open and the dial-out device
180 is already open.
184 .ne 2
186 \fB\fBEBUSY\fR\fR
188 .RS 9n
189 The port is in use by another serial protocol.
193 .ne 2
195 \fB\fBEBUSY\fR\fR
197 .RS 9n
198 The unit has been marked as exclusive-use by another process with a \fBTIOCEXCL
199 ioctl\fR(\|) call.
203 .ne 2
205 \fB\fBEINTR\fR\fR
207 .RS 9n
208 The open was interrupted by the delivery of a signal.
211 .SH FILES
212 .ne 2
214 \fB\fB/dev/cua/\fR[\fIa-z\fR]\fR
216 .RS 19n
217 dial-out tty lines
221 .ne 2
223 \fB\fB/dev/term/\fR[\fIa-z\fR]\fR
225 .RS 19n
226 dial-in tty lines
230 .ne 2
232 \fB\fB/dev/tty\fR[\fIa-z\fR]\fR
234 .RS 19n
235 binary compatibility package device names
238 .SH ATTRIBUTES
240 See \fBattributes\fR(5) for descriptions of the following attributes:
245 box;
246 c | c
247 l | l .
248 ATTRIBUTE TYPE  ATTRIBUTE VALUE
250 Architecture    SPARC
253 .SH SEE ALSO
255 \fBeeprom\fR(1M), \fBkadb\fR(1M), \fBtip\fR(1), \fBcu\fR(1C), \fBuucp\fR(1C),
256 \fBports\fR(1M), \fBpppd\fR(1M), \fBioctl\fR(2), \fBopen\fR(2),
257 \fBattributes\fR(5), \fBzsh\fR(7D), \fBtermio\fR(7I), \fBkb\fR(7M),
258 \fBldterm\fR(7M), \fBttcompat\fR(7M)
259 .SH DIAGNOSTICS
260 .ne 2
262 \fB\fBzs\fR\fIn\fR\fB\|: silo overflow.\fR\fR
264 .sp .6
265 .RS 4n
266 The Zilog 8530 character input silo overflowed before it could be serviced.
270 .ne 2
272 \fB\fBzs\fR\fIn\fR\fB\|: ring buffer overflow.\fR\fR
274 .sp .6
275 .RS 4n
276 The driver's character input ring buffer overflowed before it could be
277 serviced.