Subject: Re: How to change serial baud rate on already installed bootblocks
To: Job Hanssen <job.hanssen@xs4all.nl>
From: Job Hanssen <job.hanssen@xs4all.nl>
List: port-i386
Date: 09/03/2007 09:11:45
David Laight schreef:
> On Sun, Sep 02, 2007 at 10:05:14PM +0200, Job Hanssen wrote:
>> Issueing
>> installboot -o console=com0,speed=115200 /dev/rwd0a /usr/mdec/bootxx_ffsv1
>> doesn't raise any complaints, but after rebooting, nothing appears to have 
>> changed. I still need to set the baud rate of the terminal-emulation to 
>> 38400 to 'unscramble' the console-output.
>>
>> Any ideas?
> 
> If you look at offset 0x410 in /usr/mdec/bootxx_ffsv1 or the disk partition
> You should see the baud rate, default is 80 25 (0x2580 == 9600),
> 38400 is 0x9600 and 115200 would be 0x1c200.
> 
> If those values are set correctly, but the initial kernel output is at
> the wrong speed, then maybe the rate is capped - or the the serial
> driver you have (for some reason) objects to the higher rates...
> 
> 	David

The output seems to confirm that writing the new bootblock went fine indeed:

testbak# hexdump -x -s0x418 -n4 /usr/mdec/bootxx_ffsv1
0000418    2580    0000
000041c

testbak# hexdump -x -s0x418 -n4 /dev/rwd0a
0000418    c200    0001
000041c

Any idea as to where to look next?

I really can't imagine that it's a hardware limitation (Dell Optiplex G1 - Intel 
Pentium II (686-class), 448.90 MHz), 'though I may be wrong of course:
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
...
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com0: console
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo

This is running a stock NetBSD 3.0 GENERIC kernel:
NetBSD 3.0 (GENERIC) #0: Mon Dec 19 01:04:02 UTC 2005
builds@works.netbsd.org:/home/builds/ab/netbsd-3-0-RELEASE/i386/200512182024Z-obj/home/builds/ab/netbsd-3-0-RELEASE/src/sys/arch/i386/compile/GENERIC

Regards,

Job Hanssen