From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 14 10:08:14 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 13CB116A4CE; Sun, 14 Nov 2004 10:08:14 +0000 (GMT) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 309AD43D1F; Sun, 14 Nov 2004 10:08:13 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from localhost (rocky.ip.net.ua [82.193.96.2]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id iAEA85qn088497; Sun, 14 Nov 2004 12:08:05 +0200 (EET) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua ([82.193.96.10]) by localhost (rocky.ipnet [82.193.96.2]) (amavisd-new, port 10024) with LMTP id 67672-05; Sun, 14 Nov 2004 12:08:04 +0200 (EET) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id iAEA84dQ088494 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 14 Nov 2004 12:08:04 +0200 (EET) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.1/8.13.1) id iAEA85HP085032; Sun, 14 Nov 2004 12:08:05 +0200 (EET) (envelope-from ru) Date: Sun, 14 Nov 2004 12:08:05 +0200 From: Ruslan Ermilov To: "David O'Brien" , John Baldwin Message-ID: <20041114100805.GF84553@ip.net.ua> References: <20041114083914.B43BC43D1D@mx1.FreeBSD.org> <20041114093850.GE84553@ip.net.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="iAL9S67WQOXgEPD9" Content-Disposition: inline In-Reply-To: <20041114093850.GE84553@ip.net.ua> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at ip.net.ua cc: freebsd-hackers@FreeBSD.org Subject: Re: boot serial console speed X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2004 10:08:14 -0000 --iAL9S67WQOXgEPD9 Content-Type: multipart/mixed; boundary="i3lJ51RuaGWuFYNw" Content-Disposition: inline --i3lJ51RuaGWuFYNw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 14, 2004 at 11:38:50AM +0200, Ruslan Ermilov wrote: > On Sun, Nov 14, 2004 at 10:39:13AM +0200, Danny Braniss wrote: > > what's the magic encantation to set the console to 38400? > > btw, i solved my problem by just commenting out that part of the code, > > since i rely on the bios setting it. > >=20 > > from src/sys/boot/i386/boot0/Makefile: > >=20 > > # Comm settings for boot0sio. 0xE3 =3D> 9600 8-N-1 > > # XXX: We should create a build-tool or something to convert BOOT_CONSO= LE_SPEED > > # and BOOT_COMCONSOLE_PORT into the correct values to define on the bui= ld > > # command line > > BOOT_BOOT0_COMCONSOLE_SPEED?=3D 0xE3 > >=20 > This is the value passed in the AL register to the Int 14/AH=3D00h > BIOS function: >=20 > http://www.ctyme.com/intr/rb-0811.htm >=20 > : Bit(s) Description (Table 00300) > : 7-5 data rate (110,150,300,600,1200,2400,4800,9600 bps) > : 4-3 parity (00 or 10 =3D none, 01 =3D odd, 11 =3D even) > : 2 stop bits (set =3D 2, clear =3D 1) > : 1-0 data bits (00 =3D 5, 01 =3D 6, 10 =3D 7, 11 =3D 8) >=20 > 0xE3 =3D 111-00-0-11 =3D 9600 bps, no parity, 1 stop bit, 8 data bits >=20 > But I think it's not possible to set it to anything above 9600 bps > using this BIOS call. >=20 Attached is the patch that converts supported BOOT_COMCONSOLE_SPEED values into corresponding BOOT_BOOT0_COMCONSOLE_SPEED. Unsupported BOOT_COMCONSOLE_VALUES cause the boot0sio console speed to be set to 9600. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --i3lJ51RuaGWuFYNw Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p Content-Transfer-Encoding: quoted-printable Index: Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/boot/i386/boot0/Makefile,v retrieving revision 1.30 diff -u -r1.30 Makefile --- Makefile 27 Aug 2004 00:18:03 -0000 1.30 +++ Makefile 14 Nov 2004 10:04:36 -0000 @@ -21,11 +21,34 @@ # unless you are glutton for punishment. BOOT_BOOT0_ORG?=3D 0x600 =20 -# Comm settings for boot0sio. 0xE3 =3D> 9600 8-N-1 -# XXX: We should create a build-tool or something to convert BOOT_CONSOLE_= SPEED -# and BOOT_COMCONSOLE_PORT into the correct values to define on the build -# command line -BOOT_BOOT0_COMCONSOLE_SPEED?=3D 0xE3 +# Comm settings for boot0sio. +# Bit(s) Description +# 7-5 data rate (110,150,300,600,1200,2400,4800,9600 bps) +# 4-3 parity (00 or 10 =3D none, 01 =3D odd, 11 =3D even) +# 2 stop bits (set =3D 2, clear =3D 1) +# 1-0 data bits (00 =3D 5, 01 =3D 6, 10 =3D 7, 11 =3D 8) +.if !defined(BOOT_BOOT0_COMCONSOLE_SPEED) +BOOT_COMCONSOLE_SPEED?=3D 9600 +.if ${BOOT_COMCONSOLE_SPEED} =3D=3D 9600 +BOOT_BOOT0_COMCONSOLE_SPEED=3D "7 << 5 + 3" +.elif ${BOOT_COMCONSOLE_SPEED} =3D=3D 4800 +BOOT_BOOT0_COMCONSOLE_SPEED=3D "6 << 5 + 3" +.elif ${BOOT_COMCONSOLE_SPEED} =3D=3D 2400 +BOOT_BOOT0_COMCONSOLE_SPEED=3D "5 << 5 + 3" +.elif ${BOOT_COMCONSOLE_SPEED} =3D=3D 1200 +BOOT_BOOT0_COMCONSOLE_SPEED=3D "4 << 5 + 3" +.elif ${BOOT_COMCONSOLE_SPEED} =3D=3D 600 +BOOT_BOOT0_COMCONSOLE_SPEED=3D "3 << 5 + 3" +.elif ${BOOT_COMCONSOLE_SPEED} =3D=3D 300 +BOOT_BOOT0_COMCONSOLE_SPEED=3D "2 << 5 + 3" +.elif ${BOOT_COMCONSOLE_SPEED} =3D=3D 150 +BOOT_BOOT0_COMCONSOLE_SPEED=3D "1 << 5 + 3" +.elif ${BOOT_COMCONSOLE_SPEED} =3D=3D 110 +BOOT_BOOT0_COMCONSOLE_SPEED=3D "0 << 5 + 3" +.else +BOOT_BOOT0_COMCONSOLE_SPEED=3D "7 << 5 + 3" +.endif +.endif =20 CFLAGS+=3D-DFLAGS=3D${BOOT_BOOT0_FLAGS} \ -DTICKS=3D${BOOT_BOOT0_TICKS} \ --i3lJ51RuaGWuFYNw-- --iAL9S67WQOXgEPD9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBly6FqRfpzJluFF4RAmPrAJ0XHq1Tq8uO3Og+LNfQtCF2BHpuiQCgk5YQ xh0FdkKIZEj2Ppluf8/k1do= =2NFN -----END PGP SIGNATURE----- --iAL9S67WQOXgEPD9--