From owner-freebsd-current@FreeBSD.ORG Sun Jan 4 21:50:35 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E057116A4CE for ; Sun, 4 Jan 2004 21:50:35 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id E79D643D3F for ; Sun, 4 Jan 2004 21:50:33 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3p2/8.8.7) with ESMTP id QAA12352; Mon, 5 Jan 2004 16:50:15 +1100 Date: Mon, 5 Jan 2004 16:50:13 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Bruce M Simpson In-Reply-To: <20040105003803.GB59922@saboteur.dek.spc.org> Message-ID: <20040105162219.A3687@gamplex.bde.org> References: <20040103233044.N17367@root.org> <20040104.003330.54786488.imp@bsdimp.com> <20040104.164103.03383403.imp@bsdimp.com> <20040105003803.GB59922@saboteur.dek.spc.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: current@freebsd.org cc: nate@root.org Subject: Re: Serial console only works after reboot? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2004 05:50:36 -0000 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