From owner-freebsd-current Thu Nov 19 02:26:33 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA12537 for freebsd-current-outgoing; Thu, 19 Nov 1998 02:26:33 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from uni-sb.de (uni-sb.de [134.96.252.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA12532 for ; Thu, 19 Nov 1998 02:26:31 -0800 (PST) (envelope-from rock@cs.uni-sb.de) Received: from cs.uni-sb.de (cs.uni-sb.de [134.96.252.31]) by uni-sb.de (8.9.0/1998052000) with ESMTP id LAA22068; Thu, 19 Nov 1998 11:25:55 +0100 (CET) Received: from cs.uni-sb.de (acc2-200.telip.uni-sb.de [134.96.112.200]) by cs.uni-sb.de (8.9.0/1998060300) with ESMTP id LAA23551; Thu, 19 Nov 1998 11:25:52 +0100 (CET) Message-ID: <3653F2AA.D3A7CA29@cs.uni-sb.de> Date: Thu, 19 Nov 1998 11:27:54 +0100 From: "D. Rock" X-Mailer: Mozilla 4.5 [de] (Win98; U) X-Accept-Language: de MIME-Version: 1.0 To: Robert Nordier CC: freebsd-current@FreeBSD.ORG Subject: Re: /boot/loader & comconsole References: <199811190902.LAA03790@ceia.nordier.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Robert Nordier schrieb: [...] > One difference between boot loader and the old/new boot blocks, is > that boot loader uses PC BIOS services (int 0x14) for comms; both > lots of boot blocks do direct port I/O, instead. > > The trouble with using the BIOS is that the int 0x14 services (which > tend to be used only to talk to serial printers under DOS) expect to > do hardware handshaking. Using the BIOS for configuring the serial ports gives you also only 9600 bps. I usually ran the comconsole at 19200 bps. But the original BIOS int 0x14 services seem only support up to 9600 bps. I did a small patch on the bootblocks, so that it uses the "extended communication port control" service. I don't know if good ole 386 BIOS implement this routine, but it works on my machine (I think it was introduced with the PS/2 PCs). With this service I could go up to 19200 bps (wow! but my terminal can't do more, though). I haven't noticed any problems, but now my console is twice as fast (I sometimes even do some work on the terminal) Below is the small patch Daniel Index: i386/boot2/Makefile =================================================================== RCS file: /data/cvs/src/sys/boot/i386/boot2/Makefile,v retrieving revision 1.10 diff -c -r1.10 Makefile *** Makefile 1998/11/08 15:36:34 1.10 --- Makefile 1998/11/08 20:05:28 *************** *** 13,19 **** B2SIOPRT?= 0x3f8 B2SIOFMT?= 0x3 ! B2SIODIV?= 0xc .if exists(${.OBJDIR}/../btx) BTX= ${.OBJDIR}/../btx --- 13,19 ---- B2SIOPRT?= 0x3f8 B2SIOFMT?= 0x3 ! B2SIODIV?= 0x6 .if exists(${.OBJDIR}/../btx) BTX= ${.OBJDIR}/../btx Index: i386/libi386/comconsole.c =================================================================== RCS file: /data/cvs/src/sys/boot/i386/libi386/comconsole.c,v retrieving revision 1.4 diff -c -r1.4 comconsole.c *** comconsole.c 1998/10/11 10:05:13 1.4 --- comconsole.c 1998/10/24 22:10:20 *************** *** 70,76 **** comc_started = 1; v86.ctl = 0; v86.addr = 0x14; ! v86.eax = 0xe3; /* 9600N81 */ v86.edx = BIOS_COMPORT; /* XXX take as arg, or use env var? */ v86int(); --- 70,78 ---- comc_started = 1; v86.ctl = 0; v86.addr = 0x14; ! v86.eax = 0x400; /* Extended communication port control */ ! v86.ebx = 0; /* N1 */ ! v86.ecx = 0x308; /* 19200bps, 8bits */ v86.edx = BIOS_COMPORT; /* XXX take as arg, or use env var? */ v86int(); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message