From owner-freebsd-amd64@FreeBSD.ORG Fri Jun 3 09:32:01 2005 Return-Path: X-Original-To: freebsd-amd64@freebsd.org Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 86B5C16A41C for ; Fri, 3 Jun 2005 09:32:01 +0000 (GMT) (envelope-from mr.skoe@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3477343D53 for ; Fri, 3 Jun 2005 09:32:01 +0000 (GMT) (envelope-from mr.skoe@gmail.com) Received: by zproxy.gmail.com with SMTP id 12so888617nzp for ; Fri, 03 Jun 2005 02:32:00 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dAh9t85EZEDx83qBKpquW0PqiEDV0TF36lLDQ6hBPJWl5iWS0a3KGgnsTugDtwYOcFmD8eyMY+EF1PRaFGgH4RuhXZrT1ORWBIzHRJQek8l5fzH+vfmOqZYT3QweeP3bH0rBsnJKLt0qvwt0AX13paq2Bj7Ryo7OyDlB/9EFZLE= Received: by 10.36.222.74 with SMTP id u74mr721196nzg; Fri, 03 Jun 2005 02:32:00 -0700 (PDT) Received: by 10.36.5.2 with HTTP; Fri, 3 Jun 2005 02:32:00 -0700 (PDT) Message-ID: Date: Fri, 3 Jun 2005 19:32:00 +1000 From: Mathew Schofield To: freebsd-amd64@freebsd.org In-Reply-To: <200506030036.01929.peter@wemm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050531133608.J87922@fw.reifenberger.com> <200506011009.48460.peter@wemm.org> <429F8BC4.7010900@samsco.org> <200506030036.01929.peter@wemm.org> Subject: Re: 64bit loader X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mathew Schofield List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jun 2005 09:32:01 -0000 On 6/3/05, Peter Wemm wrote: > On Thursday 02 June 2005 03:44 pm, Scott Long wrote: > > Peter Wemm wrote: > > > On Tuesday 31 May 2005 01:56 pm, John Baldwin wrote: > > >>On Tuesday 31 May 2005 11:06 am, Michael Reifenberger wrote: > > >>>On Tue, 31 May 2005, David O'Brien wrote: > > >>>>Ha!! We can only have 1 sector worth of code in boot0. At this > > >>>>point we only have a few bytes of free code space. No where near > > >>>>enough to do the long mode switch. > > >>> > > >>>Sorry. I didnt meant boot0 but btx. I do know that boot0 is too > > >>>small. But btx is already switching to protected mode so it should > > >>>be possible to switch to 64bit mode too. > > >> > > >>Note that the loader uses the BIOS (via virtual 8086 mode) to do > > >> all the disk I/O, etc. Since long mode doesn't support vm86 mode, > > >> you'd end up with a loader that couldn't do any I/O to load the > > >> kernel, etc. unless you started including device drivers for all > > >> the different storage and networking hardware, etc. A 64-bit > > >> loader really isn't feasible unless your 64-bit machine includes > > >> firmware that you can use from 64-bit mode like EFI on ia64 or OFW > > >> on sparc. You probably want to stick with a 32-bit loader on amd64 > > >> for now. > > > > > > Yes, there are a lot of good reasons to do it the way it is done, > > > but this is the killer reason. We simply cannot do vm86 or bios > > > calls from a 64 bit loader, period. > > > > > > Other "good" reasons, besides the above: > > > * We don't need to maintain a seperate loader code base > > > * We can load test kernels with an existing loader on a > > > FreeBSD/i386 system (and run from a ramdisk or miniroot) > > > * We would need to maintain 32 bit code to do bios calls anyway, > > > even if we did switch between 32 bit and 64 bit mode on the fly. > > > If we have a complete 32 bit BTX environment, we get massive > > > complexity for little benefit. > > > > I'm trying to come up with a good joke about writing OFW-style > > drivers in 4th, but I'm having a hard time not cracking up too hard > > while I type =3D-D >=20 > Actually, we could embed a 64 bit linux kernel in there and use their > drivers in order to chain load the freebsd kernel.. That would solve > the bios problem. :-) That is the joke...Right? o_O --=20 This is a private letter and only the intended people may read this message. You may not store, quote or publish this document for any purposes. The data/information held within this message are for private use, and no one may disclose it. There are no guarentees that the information disclosed is accurate, or that the links/attached files will not be contaminated with Viruses. You use all links, and all attachments, at your own free will and thus risk. You have been warned.