From owner-freebsd-hackers Wed Jul 28 13:52:50 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from m2-36-dbn.dial-up.net (m2-36-dbn.dial-up.net [196.34.155.100]) by hub.freebsd.org (Postfix) with ESMTP id 124D315511 for ; Wed, 28 Jul 1999 13:52:41 -0700 (PDT) (envelope-from rnordier@nordier.com) Received: (from rnordier@localhost) by ceia.nordier.com (8.8.7/8.6.12) id WAA20811; Wed, 28 Jul 1999 22:50:42 +0200 (SAST) From: Robert Nordier Message-Id: <199907282050.WAA20811@ceia.nordier.com> Subject: Re: Including isa/isareg.h in sys/i386/boot/biosboot/serial.S In-Reply-To: <19990728153811.A39313@kilt.nothing-going-on.org> from Nik Clayton at "Jul 28, 1999 03:38:12 pm" To: nik@nothing-going-on.demon.co.uk (Nik Clayton) Date: Wed, 28 Jul 1999 22:50:40 +0200 (SAST) Cc: hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > In the kernel config file you can use symbolic names for the various > COM ports, IO_COM1, IO_COM2, and so on. > > These seem be defined in sys/isa/isareg.h. > > If you want to configure FreeBSD to boot from a serial console you have > to set BOOT_COMCONSOLE_PORT in /etc/make.conf -- you can't use the > defines here, you have to use 0x3F8, 0x2F8, and so on. > > As far as I can tell, BOOT_COMCONSOLE_PORT eventually gets passed down > to sys/i386/boot/biosboot/serial.S. > > So, why not apply the following trivial patch to serial.S, so that > /etc/make.conf can instead contain > > BOOT_COMCONSOLE_PORT= IO_COM2 > > which is just slightly friendlier? I'm not what you'd call a kernel > hacker, so this might be a stupid idea. . . The sys/i386/boot/biosboot code is going away shortly. The corresponding non-legacy code is sys/boot/i386/boot2, though there are various other places in the new boot code this is used as well: kgzldr and libi386, for the i386. A suggestion similar to yours was discussed off the lists around seven months ago, but the majority view was that the perceived advantages didn't completely justify the required changes and potential confusion. Since the boot code works with the BIOS, the early binding of COM2 to 0x2f8 is probably not justified. COM2 could -- and maybe should -- mean "the port BIOS is using for COM2" which may be something quite different than 0x2f8. There's actually a fairly loose coupling between the kernel and the boot code, and making use of kernel configuration conventions, where the semantics may end up being just slightly different, is probably a less useful idea than it seems. -- Robert Nordier To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message