Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Dec 2002 07:23:52 +1100
From:      Peter Jeremy <peter.jeremy@alcatel.com.au>
To:        John Baldwin <jhb@FreeBSD.ORG>
Cc:        "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:  <20021217202351.GO15322@gsmx07.alcatel.com.au>
In-Reply-To: <XFMail.20021217124038.jhb@FreeBSD.org>
References:  <20021217.103409.105683273.imp@bsdimp.com> <XFMail.20021217124038.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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

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?20021217202351.GO15322>