From owner-freebsd-current@FreeBSD.ORG Sun Jan 4 19:49:08 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 B049F16A4CE for ; Sun, 4 Jan 2004 19:49:08 -0800 (PST) Received: from www.ambrisko.com (adsl-64-174-51-42.dsl.snfc21.pacbell.net [64.174.51.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 94D0C43D2F for ; Sun, 4 Jan 2004 19:49:07 -0800 (PST) (envelope-from ambrisko@ambrisko.com) Received: from ambrisko.com (localhost [127.0.0.1]) by www.ambrisko.com (8.12.9p2/8.12.9) with ESMTP id i053n7ni036933; Sun, 4 Jan 2004 19:49:07 -0800 (PST) (envelope-from ambrisko@ambrisko.com) Received: (from ambrisko@localhost) by ambrisko.com (8.12.9p2/8.12.9/Submit) id i053n7j0036932; Sun, 4 Jan 2004 19:49:07 -0800 (PST) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <200401050349.i053n7j0036932@ambrisko.com> In-Reply-To: <20040103184934.V16815@root.org> To: Nate Lawson Date: Sun, 4 Jan 2004 19:49:07 -0800 (PST) X-Mailer: ELM [version 2.4ME+ PL94b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII 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: Mon, 05 Jan 2004 03:49:08 -0000 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? | | sio0 port 0x3f8-0x3ff irq 4 on acpi0 | sio0: type 16550A I use this patch on a lot of systems to force it to CONSPEED and not try to auto-detect what the prior boot-loaders etc. had set it up. In my case a lot of the time nothing ever set the port up and it gets random junk the messes up the speed etc. Index: sio.c =================================================================== RCS file: /cvs/src/sys/dev/sio/sio.c,v retrieving revision 1.417 diff -c -r1.417 sio.c *** sio.c 24 Dec 2003 04:11:10 -0000 1.417 --- sio.c 5 Jan 2004 03:46:27 -0000 *************** *** 2832,2838 **** --- 2832,2841 ---- /* XXX there should be more sanity checking. */ if (divisor == 0) return (CONSPEED); + /* DJA return (rclk / (16UL * divisor)); + */ + return (CONSPEED); } #endif Doug A.