From owner-cvs-all Tue Dec 17 12:24:31 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A18737B401; Tue, 17 Dec 2002 12:24:30 -0800 (PST) Received: from alcanet.com.au (mail3.alcanet.com.au [208.178.117.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id C8E5F43ED8; Tue, 17 Dec 2002 12:24:27 -0800 (PST) (envelope-from peter.jeremy@alcatel.com.au) Received: from sydsmtp01.alcatel.com.au (IDENT:root@localhost.localdomain [127.0.0.1]) by alcanet.com.au (8.12.4/8.12.4/Alcanet1.3) with ESMTP id gBHKNtrG006378; Wed, 18 Dec 2002 07:23:55 +1100 Received: from gsmx07.alcatel.com.au ([139.188.20.247]) by sydsmtp01.alcatel.com.au (Lotus Domino Release 5.0.11) with ESMTP id 2002121807235311:15454 ; Wed, 18 Dec 2002 07:23:53 +1100 Received: from gsmx07.alcatel.com.au (localhost [127.0.0.1]) by gsmx07.alcatel.com.au (8.12.5/8.12.5) with ESMTP id gBHKNqA9050840; Wed, 18 Dec 2002 07:23:52 +1100 (EST) (envelope-from peter.jeremy@alcatel.com.au) Received: (from jeremyp@localhost) by gsmx07.alcatel.com.au (8.12.5/8.12.5/Submit) id gBHKNqpg050839; Wed, 18 Dec 2002 07:23:52 +1100 (EST) (envelope-from peter.jeremy@alcatel.com.au) Date: Wed, 18 Dec 2002 07:23:52 +1100 From: Peter Jeremy To: John Baldwin Cc: "M. Warner Losh" , 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> Mail-Followup-To: John Baldwin , "M. Warner Losh" , cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG References: <20021217.103409.105683273.imp@bsdimp.com> Mime-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.4i X-MIMETrack: Itemize by SMTP Server on SYDSMTP01/AlcatelAustralia(Release 5.0.11 |July 24, 2002) at 18/12/2002 07:23:53 AM, Serialize by Router on SYDSMTP01/AlcatelAustralia(Release 5.0.11 |July 24, 2002) at 18/12/2002 07:23:55 AM, Serialize complete at 18/12/2002 07:23:55 AM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2002-Dec-17 12:40:38 -0500, John Baldwin 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