Date: Mon, 5 Jan 2004 16:50:13 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: Bruce M Simpson <bms@spc.org> Cc: nate@root.org Subject: Re: Serial console only works after reboot? Message-ID: <20040105162219.A3687@gamplex.bde.org> In-Reply-To: <20040105003803.GB59922@saboteur.dek.spc.org> References: <20040103233044.N17367@root.org> <20040104.003330.54786488.imp@bsdimp.com> <20040104.164103.03383403.imp@bsdimp.com> <20040105003803.GB59922@saboteur.dek.spc.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 5 Jan 2004, Bruce M Simpson wrote: > On Sun, Jan 04, 2004 at 04:41:03PM -0700, M. Warner Losh wrote: > > Somewhere along the way, it gets set to 115200. Maybe it is > > initialized to 115200 by the boot blocks? I think once there's a > > divisor programmed into the serial port, the kernel console code > > doesn't change it. I could be wrong about this, however.... sio always uses the current divisor iff: - the kernel was booted with RB_SERIAL, and - the current divisor is nonzero. A divisor of 0 "can't happen", but is most likely after a cold boot when everything neglects to set the divisor (since the contents of the divisor registers is undefined after 8250-16x50 reset). However, anything that sets RB_SERIAL should set the divisor. sio cannot check that the port that it reads the divisor on is the same one that the boot program set RB_SERIAL on. > Try installing boot0sio as your boot manager. It specifically requests 9600 > 8-N-1 via BIOS calls. However this does mean that boot selection has to > happen over COM1. It should use BOOT_COMCONSOLE_PORT and BOOT_CONSOLE_SPEED like boot2 does. These are standard -- see make.conf(5). boot2 doesn't use the BIOS, so BOOT_COMCONSOLE_PORT can be a port not understood by the BIOS. boot0sio would have problems with this, and mapping BOOT_COMCONSOLE_PORT to a BIOS port number might take more code than fits. boot2 also supports setting the character format (B2SIOFMT macro), but this is nonstandard and not supported by the sio console. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040105162219.A3687>