From: lupe@ukw.uucp (Lupe Christoph)
Newsgroups: comp.protocols.ppp
Subject: Re: sun serial >38400
Date: 6 Jan 93 21:39:27 GMT
Organization: cic

searsk@med.ge.com (Kevin D. Sears) writes:

>In article <1992Dec31.162852.2315@hugis.nbg.sub.org>,
>hugibaz@hugis.nbg.sub.org (Ingo Kraupa) wrote:
>> 
>> A few months ago someone posted that there is a patch to get higher bps-rates
>> than 38.4kbps on a sun sparcstation. I told this to a friend, and he asked
>> me if I can get this patch for him. I forgot the person, but I'm sure he
>> posted to this group.  Any hint would be very appreciated.
>> 
>> -Ingo
>Sun Consulting sales a high speed patch but it is pricy. Alternatives is to
>get a serial port board from CoSystems(or any other 3rd party company)
>which supports higher speed drivers with their product. The latter solution
>is supposed to be cheaper.

>Who: Kevin D. Sears-searsk@med.ge.com
>What: System and Network Admin(a.k.a "Sr. Maintenance Droid")
>Where: GE Medical Systems
>Disclaimer: I know nothing for sure but I sure try hard!

Here it is:

From: schneck@Physik.TU-Muenchen.DE (Bernhard Schneck)
Newsgroups: comp.sys.sun.admin
Subject: Re: v32bis modems @ 14,400 bps on desktop Sparcs
Date: 6 Jul 92 11:10:19 GMT
Organization: Leibniz-Rechenzentrum, Muenchen (Germany)
Content-Length: 2355
Status: RO
X-Lines: 70

cheeks@edsr.eds.com (Mark Costlow) writes:

>Could you be more specific about how you did this?

The following is from two postings from wolfgang@wsrcc.com (Wolfgang S.
Rupprecht) and adrie@ica.philips.nl (Adrie Koolen):

The serial (rs232 / 422) controller in the SparcStation 1, 1+ and IPC is
a Zilog Z8530, driven at 4915200 Hz. The baud-rate depends on a divisor
register, which is calculated as follows:

	divisor = 4915200 / (2 * baud_rate * 16) - 2;
or
	baud_rate = 4915200 / ((divisor + 2) * 2 * 16)

So:     divisor		baud_rate
	510		300
	62		2400
	14		9600
	6		19200
	2		38400
	1		51200
	0		76800

Now take at a look at the zs_speeds table in your /vmunix:

# adb -k /vmunix /dev/mem
physmem 27f4
zs_speeds/16d
_zs_speeds:
_zs_speeds:     0       3070    2046    1394    1140    1022    766     510
		254     126     83      62      30      14      6       2
$q

These are the divisors which are loaded into the Z8530 when you request
a certain baud rate (the first entry is used for B0 == HANGUP which is
handled by special code).  All you have to do is change one of these
fields to the value you want:

# adb -w -k /vmunix /dev/mem
physmem 27f4
zs_speeds+2/w 0
_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
$q

Now the entry for B50 will load 0 into the divisor register, thus you get
76.8kbaud if you use 'stty 50'.

The adb commands as shown above will only change the running kernel (ie.
/dev/mem), the speed table will be restored to the original at the next
reboot.  You can use "?" to change the table in /vmunix itself, so it
will survive reboots, or you can change /usr/kvm/sys/sun4c/OBJ/zs_async.o
to get the modified table into newly built kernels (be sure to save a copy
of the original).

As always, be careful when tinkering with your /vmunix.  Your mileage may
vary.  I don't know anything, so you can hold me responsible for nothing.
I can't speak for myself most of the time, so I can't speak for my
employer, either.

\Bernhard.
--
Bernhard Schneck        Internet: Bernhard.Schneck@Physik.TU-Muenchen.DE
TU Muenchen Physik
8046 Garching           "There is no problem so big that it cannot be
Germany                 run away from"                  Illusions, Richard Bach

-- 
| ...!unido!ukw!lupe  (German EUNet, "bang")     |  Disclaimer:            |
| lupe@ukw.UUCP       (German EUNet, domain)     |  This is an unofficial  |
| suninfo!alanya!lupe (Sun Germany)              |  opinion of Christoph & |
| Res non sunt complicanda praeter necessitatem. |  Imschweiler Consulting |
Newsgroups: comp.protocols.ppp