hps(7)
NAME
hps − HPS serial communications controller
SYNOPSIS
Configuration file entry:
device hps0 at vba0 csr 0xe0140000 vector hpsintr
through
device hps7 at vba0 csr 0xe015c000 vector hpsintr
DESCRIPTION
The Systech HPS (High Performance Serial) controller provides 16 asynchronous ports and an optional Centronics parallel interface. Each asynchronous line attached to the HPS controller behaves as described in tty(7). Baud rates up through 38,400 are supported. Parallel ports utilize a subset of the same ioctl(2) values as do the asynchronous ports. The controller also supports a high performance real-time mode which eliminates much of the CX/UX tty driver overhead.
Each HPS controller uses a single entry in the system control block for command/response interrupts. These entries start at 0xc0 for the first controller’s interrupts and continue through 0xc7.
DRIVER MODES
Processes which communicate to serial devices through the HPS serial interface can utilize either of two different modes. These are user selectable by setting the c_line line discipline field to either TTYDISC or RTDISC on ioctl(2) calls made to the device (refer to termios(7) or termio(7)). These values are defined via
#include <sys/tty.h>
Modes can vary between ports on the same HPS controller.
Standard tty Mode
When the c_line field is set to TTYDISC, normal tty mode applies. All functions defined in termios(7), termio(7) and sgtty(7) are supported on this controller.
Real-Time Mode
The real-time mode provides a low-overhead method of communcating with serial ports. This mode is selected by setting the c_line field to a value of RTDISC and bypasses much of the normal CX/UX terminal device overhead. While the full set of ioctl commands used on tty devices is available, the number of individual options available in this mode is greatly reduced. CX/UX asynchronous I/O is supported as defined by the aread(2), awrite(2) and acancel(2) system calls.
Referring to the termios(7) documentation, the following values are supported for fields in the termios structure supplied on ioctl(2) calls. Other values are ignored.
c_cc values (control characters) for VINTR, VQUIT, VEOF, VEOL, VSTART, and VSTOP. c_iflag values (input modes) of IGNBRK, BRKINT, IGNPAR, PARMRK, INPCK, ISTRIP, IXON, IXANY, and IXOFF. c_lflag values (local modes) of ISIG, TOSTOP, NOFLSH, and a greatly restricted subset of ICANON (see below). All c_cflag values (control modes) are supported (baud rate, character size, etc). All c_oflag values (output modes) are ignored. The function of ’canonical’ mode is reduced from that defined in termios(7) when the interface is in the real-time mode. In particular, when ICANON is set, input lines are delimited by the EOL and EOF characters. Other canonical processing is disabled, including erase and kill functions. When ICANON is not set, the values of MIN and TIME apply as described in termios(7). A read will not be satisfied until at least MIN characters have been received or the timeout value TIME has expired. Note that values for TIME are meaningless when using aread(2) and awrite(2) calls and are ignored.
All read(2) and aread(2) calls made in the real-time mode are satisfied when any of the following conditions are met:
O_NDELAY mode has been set for the file. In this case, the reads will complete immediately with any data available at that time copied into the user buffer. The user-specified byte count has been copied into the buffer. ICANON mode is not set, and MIN characters have been copied into the user buffer. ICANON mode is not set on a read call, and the TIME value expires as per operation defined in termios(7). (Not applicable on aread(2) calls.) ICANON mode is set, and either the EOL or EOF character has been copied into the user buffer.
COMMANDS
The following ioctl commands are accepted in both tty and real-time modes. Refer to the termios(7) documentation for detailed descriptions of their operation.
TC_PX_GETATTRGet parameters.
TC_PX_SETATTRSet parameters.
TC_PX_SETATTRDWait and set parameters.
TC_PX_SETATTRFFlush and set parameters.
TC_PX_BREAKSend break.
TC_PX_FLOWStart/stop control.
TC_PX_FLUSHFlush input/output queues.
TC_PX_DRAINDrain output.
TC_PX_GETPGRPGet process group ID.
TC_PX_SETPGRPSet process group ID.
TIOCGSIDGet session ID.
FIOGETOWNGet process group ID.
FIONBIOSet/clear non-blocking mode.
FIONREADReturn available character count in tty mode only.
FIOSETOWNSet process group ID.
TCGETRAWQGet raw queue character count.
TCSETRAWQSet raw queue character count.
TCGETMAXRAWQGet maximum raw queue character count.
FILES
/dev/tty[0-7][0-f]Normal character device interface
/dev/lp[0-7]For the Centronics parallel port
/dev/hps[0-7]For the download/command interface
SEE ALSO
termios(7), termio(7), hpsload(1M).
CX/UX Programmer’s Guide.
CX/UX Administrator’s Reference