From owner-freebsd-current@FreeBSD.ORG Sun Jan 4 15:42:25 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 7B04A16A4F5 for ; Sun, 4 Jan 2004 15:42:24 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id A1CD043D9F for ; Sun, 4 Jan 2004 15:41:44 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.10/8.12.9) with ESMTP id i04NfWET027012; Sun, 4 Jan 2004 16:41:32 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 04 Jan 2004 16:41:03 -0700 (MST) Message-Id: <20040104.164103.03383403.imp@bsdimp.com> To: nate@root.org From: "M. Warner Losh" In-Reply-To: <20040104150929.Y19715@root.org> References: <20040103233044.N17367@root.org> <20040104.003330.54786488.imp@bsdimp.com> <20040104150929.Y19715@root.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: current@freebsd.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: Sun, 04 Jan 2004 23:42:25 -0000 In message: <20040104150929.Y19715@root.org> Nate Lawson writes: : On Sun, 4 Jan 2004, M. Warner Losh wrote: : > In message: <20040103233044.N17367@root.org> : > Nate Lawson writes: : > : On Sat, 3 Jan 2004, M. Warner Losh wrote: : > : > In message: <20040103184934.V16815@root.org> : > : > Nate Lawson writes: : > : > : I have a laptop (IBM T23) and use sio0 as my console/gdb port. One thing : > : > : I noticed is if I power up the laptop and boot -h, I get garbage out the : > : > : serial port. However, if I boot fully and then just warm reboot, the : > : > : serial console works fine. I'm only using 9600 bps. Ideas? : > : > : > : > weird. Is the garbage data at some different rate? : > : : > : Nope, checked everything from 1200 up to 38400, different garbage but : > : always garbage. This is with -current as of 2003/12/30, no patches. : > : > Try 115200. : : That works. Now the question is "why". Note that I have no "options : CONSPEED" so according to /sys/dev/sio/sioreg.h, it should default to 9600 : and indeed does, after a reboot. But not on a cold startup. 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.... Warner