Devices zs(7D)
NAME
zs - Zilog 8530 SC serial communications driver
SYNOPSIS
#include
#include
open("/dev/term/n", mode);
open("/dev/ttyn", mode);
open("/dev/cua/n", mode);
DESCRIPTION
The Zilog 8530 provides two serial input/output channels
capable of supporting a variety of communication protocols.
A typical system uses two or more of these devices to imple-
ment essential functions, including RS-423 ports (which also
support most RS-232 equipment), and the console keyboard and
mouse devices.
The zs module is a loadable STREAMS driver that provides
basic support for the Zilog 8530 hardware and basic asyn-
chronous communication support. The driver supports the
termio(7I) device control functions specified by flags in
the ccflag word of the termios structure and by the IGNBRK,
IGNPAR, PARMRK, or INPCK flags in the ciflag word. All
other termio(7I) functions must be performed by STREAMS
modules pushed atop the driver. When a device is opened, the
ldterm(7M) and ttcompat(7M) STREAMS modules are automati-
cally pushed on top of the stream, providing the standard
termio(7I) interface.
The character-special devices /dev/term/a and /dev/term/b
are used to access the two serial ports on the CPU board.
Valid name space entries are /dev/cua/[a-z], /dev/term/[a-z]
and /dev/tty[a-z]. The number of entries used in a name
space are machine dependent.
The /dev/tty[n] device names only exist if the SunOS 4.x
Binary Compatibility Package is installed. The /dev/tty[n]
SunOS 5.11 Last change: 9 Sep 2002 1
Devices zs(7D)
device names are created by the ucblinks command, which is
available only with the SunOS 4.x Binary Compatibility Pack-
age.
To allow a single tty line to be connected to a modem and
used for both incoming and outgoing calls, a special feature
is available that is controlled by the minor device number.
By accessing character-special devices with names of the
form /dev/cua/[n], it is possible to open a port without
the Carrier Detect signal being asserted, either through
hardware or an equivalent software mechanism. These devices
are commonly known as dial-out lines.
Once a /dev/cua/[n] line is opened, the corresponding tty
line cannot be opened until the /dev/cua/n line is closed. A
blocking open will wait until the /dev/cua/[n] line is
closed (which will drop Data Terminal Ready, and Carrier
Detect) and carrier is detected again. A non-blocking open
will return an error. If the tty line has been opened suc-
cessfully (usually only when carrier is recognized on the
modem) , the corresponding /dev/cua/[n] line cannot be
opened. This allows a modem to be attached to /dev/term/[n]
(renamed from /dev/tty[n]) and used for dial-in (by enabling
the line for login in /etc/inittab) and also used for dial-
out (by tip(1) or uucp(1C)) as /dev/cua/[n] when no one is
logged in on the line.
Note -
This module is affected by the setting of specific eeprom
variables. For information on parameters that are per-
sistent across reboots, see the eeprom(1M) man page.
IOCTLS
The zs module supports the standard set of termio ioctl()
calls.
If the CRTSCTS flag in the ccflag field is set, output will
be generated only if CTS is high; if CTS is low, output will
be frozen. If the CRTSCTS flag is clear, the state of CTS
has no effect.
If the CRTSXOF flag in the ccflag field is set, input
will be received only if RTS is high; if RTS is low, input
will be frozen. If the CRTSXOF flag is clear, the state of
RTS has no effect.
SunOS 5.11 Last change: 9 Sep 2002 2
Devices zs(7D)
The termios CRTSCTS (respectively CRTSXOF) flag and ter-
miox CTSXON (respectively RTSXOF) can be used interchange-
ably.
Breaks can be generated by the TCSBRK, TIOCSBRK, and
TIOCBRK ioctl() calls.
The state of the DCD, CTS, RTS, and DTR interface signals
may be queried through the use of the TIOCMCAR, TIOCMCTS,
TIOCMRTS, and TIOCMDTR arguments to the TIOCMGET ioctl
command, respectively. Due to hardware limitations, only
the RTS and DTR signals may be set through their respective
arguments to the TIOCMSET, TIOCMBIS, and TIOCMBIC ioctl com-
mands.
The input and output line speeds may be set to any of the
speeds supported by termio. The input and output line speeds
cannot be set independently; for example, when you set the
the output speed, the input speed is automatically set to
the same speed.
When the driver is used to service the serial console port,
it supports a BREAK condition that allows the system to
enter the debugger or the monitor. The BREAK condition is
generated by hardware and it is usually enabled by default.
A BREAK condition originating from erroneous electrical sig-
nals cannot be distinguished from one deliberately sent by
remote DCE. The Alternate Break sequence can be used to
remedy this.
Due to a risk of incorrect sequence interpretation, SLIP and
certain other binary protocols should not be run over the
serial console port when Alternate Break sequence is in
effect. Although P is a binary protocol, it is able to
avoid these sequences using the ACM feature in RFC 1662.
For Solaris P 4.0, you do this by adding the following
line to the /etc/ppp/options file (or other configuration
files used for the connection; see pppd(1M) for details):
asyncmap 0x00002000
By default, the Alternate Break sequence is three charac-
ters: carriage return, tilde and control-B (CR ~ CTRL-B),
but may be changed by the driver. For more information on
breaking (entering the debugger or monitor), see kbd(1) and
SunOS 5.11 Last change: 9 Sep 2002 3
Devices zs(7D)
kb(7M).
ERORS
An open will fail under the following conditions:
ENXIO The unit being opened does not exist.
EBUSY The dial-out device is being opened and the dial-in
device is already open, or the dial-in device is
being opened with a no-delay open and the dial-out
device is already open.
EBUSY The port is in use by another serial protocol.
EBUSY The unit has been marked as exclusive-use by
another process with a TIOCEXCL ioctl() call.
EINTR The open was interrupted by the delivery of a sig-
nal.
FILES
/dev/cua/[a-z] dial-out tty lines
/dev/term/[a-z] dial-in tty lines
/dev/tty[a-z] binary compatibility package device names
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Architecture SPARC
SEE ALSO
eeprom(1M), kadb(1M), tip(1), ucblinks(1B), cu(1C),
uucp(1C), ports(1M), pppd(1M), ioctl(2), open(2), attri-
butes(5), zsh(7D), termio(7I), kb(7M), ldterm(7M),
SunOS 5.11 Last change: 9 Sep 2002 4
Devices zs(7D)
ttcompat(7M)
DIAGNOSTICS
zsn: silo overflow.
The Zilog 8530 character input silo overflowed before it
could be serviced.
zsn: ring buffer overflow.
The driver's character input ring buffer overflowed
before it could be serviced.
SunOS 5.11 Last change: 9 Sep 2002 5
|