Summary: Sun serial port sensitivity

From: Richard Hudson (hudsor@noppnfs0.nopunx.gs.com)
Date: Tue Sep 20 1994 - 17:45:04 CDT


I asked how to make a Sun serial port less sensitive to detecting
"break" conditions (when using a serial port for a console, a break
is equivalent to <L1><A>).

The responses were either:
        1 patch the kernel to ignore the break
        2 put a resistor between pins 2 & 7 of the DB25 connector

Thanks to Glenn Newell (glenn@rockie.nsc.com) and Ben Tucker
(<ben@agora.rdrop.com).

Richard Hudson
hudsor@fw.gs.com

******************************************************************

Details:

Solution #1 -- patch the kernel to ignore the break:

The keyboard break (L1-A on sun keyboards or the Break-key on a terminal)
is catched in the routine "montrap". This routine is defined in locore.o;
it is called in kbd.o and zs_async.o. You may replace it with your own
routine in the kernel. BTW: extensive kernel patching is for experts only!

It is much easier to patch this routine to ignore the break completely;
this even helps against unplugging the keyboard (which still breaks
into the monitor, even if you remap L1-A!!!):

Sun4, SunOS 4.1.X:

#adb -k -w /vmunix /dev/mem
montrap+4/W1000000
montrap+4?W1000000
montrap+c/W1000000
montrap+c?W1000000
$q
--------------------------------------------------
Sun3, SunOS 4.1.1:

#adb -k -w /vmunix /dev/mem
montrap/w4e75
montrap?w4e75
$q

Peter

--
-------------------------------------------------------------------
Peter Koch, Universitaet Kaiserslautern (AG Haerder, Raum 36/318)
Postfach 3049, 67653 Kaiserslautern (Germany)
------------------   koch@informatik.uni-kl.de   ------------------

******************************************************************

Solution #2 -- put a resistor between pins 2 & 7 of the DB25 connector:

Every Sun system must have a console. With no monitor, the default is for ttya to act as console. The "break" signal causes drop into monitor mode from a serial console (see console(4) man page; note that no mapping is done to l1-a. It's just that l1-a is the abort signal for a monitor console and "break" is the abort signal for a serial port console).

Might be able to solve problem by adding a resistor as described below.

Found that Sun-3/280s crash when the console is either powered off, or its rs232 plug disconnected. The console tty interface is biased such that, received data goes from MARK to SPACE when one of these events occurs, making the system think that BREAK has been hit, ergo the crash.

This is more than a nuisance, since it is necessary to connect several 3/280s to a single console through an ABCD switch. This can't be done until a way to prevent system from crashing when the switch is used is found.

The fix/workaround has been around for some time:

Systems that don't have a full-time console are an invitation for trouble. A Sun display on one of the servers with a window tip'ed to the console port of each of the others is a better alternative, though it does make one machine rather critical. Halting the CPU results because a line going open looks to the Sun CPU zs hardware the same as a BREAK. This also happens if the console terminal is unplugged from the AC or turned off, even though the RS-232 cable stays connected. An easy hardware workaround to this problem: tty | port | 2 ---------------- \ on sun | \ | 3 ------x--------- > to customers equipment | | / | 7 ---------------- / | | | | | | | | | | 4.7k resistor, 1/4 watt | | | | | | 25 -----x | Be sure the resistor is attached at the Sun CPU connector, not the terminal end or switchbox end of the cable. This fix will help ALL ttys attached to Sun CPU serial ports (ttya/b), either for consoles or ordinary login terminals. It stops runaway getty/login on open lines or lines where the terminal is turned off.

To see all the output from several terminal lines on one terminal:

A multiport switch with the same requirements was needed . The workaround to see output from each system on the console takes the chance of multiple systems transmitting at the same time and garbling the output.

*********************************************************************** SUN OUTPUT TO TERMINAL tty | Diode (THEN TIE THIS LINE TOGETHER(NOT SWITCHED)) port | 2 -----------|<|---x-- \ on sun | | \ | 3 ---------------- | > to customers equipment | | / | 7 ---------------- | / | | | | | | | | | | 4.7k resistor, 1/4 watt | | | (ONLY NECESSARY ON ONE SYSTEM) | | | 25 ---------------- | *********************************************************************** SUN INPUT FROM TERMINAL

tty | port | 2 ---------------- \ on su | \ | 3 ------x--------- (FROM SWITCH) > to customers equipment | | / | 7 ---------------- / | | | | | | | | | | 4.7k resistor, 1/4 watt | | | | | | 25 -----x |

***********************************************************************



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:10 CDT