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 76800So, 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 2This 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.
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/11for 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.