Higher Baud Rates

This software includes support for baud rates greater than 38400 in a few special circumstances.

Sun zs Ports

The zs ports on the Suns are capable of going faster than 38400. The divisor in the hardware timer chip is set so that
    baud_rate = 4915200 / ((divisor + 2) * 2 * 16)
Here are some example divisors
      Divisor	Baud Rate
	510	   300
	62	  2400
	14	  9600
	6	 19200
	2	 38400
	1	 51200
	0	 76800
So, there is a little room for going faster. Unfortunately, there is not a 57600 baud rate available. However, some modems can handle 76800 (such as the Telebit Worldblazer), and that can be set just as easily. By default, the "-DFASTSZ" flag is set in the Makefile.hw file. So, code will be compiled into the program that will recognize 76800 as a valid baud rate. Since all 16 table entries are used up, we must replace one of the unused baud rate divisors with a 0 divisor. I have never seen anyone use 50 baud devices. The code that recognizes 76800, uses the table entry for 50 baud.

In order to modify the kernel table for the zs divisors, use the following adb commands: (for Solaris 1.X, use /vmunix instead of /dev/ksyms)

    # adb -w -k /dev/ksyms /dev/mem
    zs_speeds/16d
    _zs_speeds:
    _zs_speeds:     0       3070    2046    1394    1140    1022    766     510
		    254     126     83      62      30      14      6       2
    zs_speeds+2/w0
    _zs_speeds+2:   0xbfe   =       0x0
    zs_speeds/16d
    _zs_speeds:
    _zs_speeds:     0       0       2046    1394    1140    1022    766     510
		    254     126     83      62      30      14      6       2
This modifies the in-memory copy only. To modify /vmunix, use ?w0. To modify for all future kernels, modify /usr/sys/`arch`/OBJ/zs_async.o under Solaris 1.X or /kernel/drv/zs under Solaris 2.X.

Central Data SCSIterminal Server Ports

We use SCSI-connected ports from
Central Data of Champaign, IL, USA (1-217-359-8010). We have used just about every model they have made from 2 to 16 ports. They are capable of all the normal baud rates, plus 57,600, 76,800, and 115,200 baud. Many V.32bis modems support 57600 baud, which is the theoretical baud rate maximum when using V.32bis + V.42bis compression. V.34 modems with V.42bis require 115,200 baud for maximum throughput.

To enable support for this device, edit the Makefile.hw file, and add the directive -DSTS to the HWSUPPORT definition. This is not defined by default.

The normal terminal driver designates 4 bits for speed, and all 16 possible speeds are already defined. So, Central Data has developed an ioctl which shifts the definition of all the baud rates down in the table, making room for a new higher baud rates. This is extremely kludgy, but actually works quite well for us. You can issue this ioctl once, then use B38400. This is simpler in that it does not require code changes. However, you can get into a situation where the baud extension factor is set incorrectly, and nothing works right. Instead, we have modified the code that handles baud rate in all the software to recognize 57,600, 115,200 and 230,400, and take appropriate action. This has been done in the dpd program. Using -DSTS in Makefile.hw will enable this support. If you want to enable dialins on this port, you will need to modify the ttymon or getty program or provide a wrapper program that will set the baud rate extension factor correctly. You may also want to update tip or cu, as necessary. We often set ports to be 57600 by telling ttymon that they are 38400, then running commands via /etc/rc2.d/S99stsbaudext. This file has lines like

	/opt/CDsts/cdstty baudext 1 < /dev/cua/11
for each port that has a non-standard baud rate. This seems to work reasonably well, and we don't have to modify ttymon to understand this oddity.

Some versions of the ct driver under Solaris 1.X will output an annoying message on the console anytime the baud extension factor is set. If you have this driver, then you can turn that off with the following adb commands:

    # adb -w -k /vmunix /dev/mem
    physmem fe9
    ctioctl+260/i
    _ctioctl+0x260: call    _printf
    /W1000000
    _ctioctl+0x260: 	0x0	=	0x1000000
    /i
    _ctioctl+0x260: nop
    $q
    #
If the module is compiled into the kernel, you can do the same adb commands with a ? instead of / and make the changes in the compiled kernel. For a dynamically loaded driver, this will not work since the address of printf does not get set until the driver is loaded. Relocating the nop instruction will not produce the desired effect.

Magma SBUS Serial Ports

Magma makes ports capable of going 56000, 57600, 64000, 76800, and 115200. This is implemented by reusing some of the lower baud rates definitions that are really never used in practice. If you set -DMAGMA in the Makefile.hw file, you can use the higher baud rates.

Kirk Smith / ks@acn.purdue.edu Last updated: 28 July 1995