Skip site navigation (1)Skip section navigation (2)
Date:      17 Dec 2002 13:22:38 -0800
From:      John Merryweather Cooper <john_m_cooper@yahoo.com>
To:        Peter Jeremy <peter.jeremy@alcatel.com.au>
Cc:        John Baldwin <jhb@freebsd.org>, "M. Warner Losh" <imp@bsdimp.com>, cvs-all@freebsd.org, cvs-committers@freebsd.org
Subject:   Re: cvs commit: src/sys/boot/i386/boot2 boot2.c
Message-ID:  <1040160158.20854.29.camel@pc016247.reshall.uidaho.edu>
In-Reply-To: <20021217202351.GO15322@gsmx07.alcatel.com.au>
References:  <20021217.103409.105683273.imp@bsdimp.com> <XFMail.20021217124038.jhb@FreeBSD.org> <20021217202351.GO15322@gsmx07.alcatel.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2002-12-17 at 12:23, Peter Jeremy wrote:
> On 2002-Dec-17 12:40:38 -0500, John Baldwin <jhb@FreeBSD.ORG> wrote:
> >We could shave a lot of room off of boot2 by having it be a real-mode
> >application instead of a protected mode one.  This would allow us to
> >ditch all of BTX.  However, we would either need to use a C compiler
> >that can generate real-mode code (gcc can't AFAIK) or we need to
> >write it all in assembly.  I'd really like to avoid the latter if at
> >all possible.  Any chance that gcc might could be tweaked to add a
> >real-mode target?
> 
> 80x86 real mode (16-bit) is significantly different to 32-bit mode -
> the addressing modes are almost completely different for starters.
> Supporting real-mode and generating decent compact code in particular
> is going to require significantly more than a simple 'tweak' to gcc.
> 
> The i386 backend definitely provides a good starting point for a
> real-mode backend, but it's not immediately clear whether real-mode
> would be better implemented as a new backend (which means building
> a new gcc cross compiler just to compile boot2) or as a patch to
> the i386 backend (which would bloat and slow down the main system
> compiler).
> 
> Probably the easiest way to play with a real-mode boot2 would be
> to install something like ports/devel/bcc - the code quality isn't
> as good as gcc[*] but should allow you to check the feasibility of
> the project.
> 
> [*] This isn't a slur on bde - a _lot_ more effort has gone into gcc.
> 
> Peter

Well, a real-mode boot2 would certainly give devel/bcc a chance to
develop.  Along those lines, the Open Watcom project now has it's
development sources online, and the Open Watcom compiler, descended from
the Watcom commercial compiler, is now online.  See

http://www.openwatcom.org/license_info/open_watcom_lic.html

Since this compiler already has 286 real mode capability (an essential
function since OS/2 device drivers mostly have 286 protect-mode code and
OS2KRNL starts up as a 286 real mode program which then hands off . .
.), these sources maybe of interest.  My brief reading of the license
indicates that it would not crimp a FreeBSD-style project very much
(although it would be difficult for an FSF project to swallow).

jmc
-- 
John Merryweather Cooper <john_m_cooper@yahoo.com>
University of Idaho


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1040160158.20854.29.camel>