Date: Thu, 19 Nov 1998 11:27:54 +0100 From: "D. Rock" <rock@cs.uni-sb.de> To: Robert Nordier <rnordier@nordier.com> Cc: freebsd-current@FreeBSD.ORG Subject: Re: /boot/loader & comconsole Message-ID: <3653F2AA.D3A7CA29@cs.uni-sb.de> References: <199811190902.LAA03790@ceia.nordier.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3653F2AA.D3A7CA29>