From owner-freebsd-current Thu Nov 26 00:56:43 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA10462 for freebsd-current-outgoing; Thu, 26 Nov 1998 00:56:43 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from ceia.nordier.com (m1-1-dbn.dial-up.net [196.34.155.1]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA10456 for ; Thu, 26 Nov 1998 00:56:23 -0800 (PST) (envelope-from rnordier@nordier.com) Received: (from rnordier@localhost) by ceia.nordier.com (8.8.7/8.6.12) id KAA22086; Thu, 26 Nov 1998 10:53:38 +0200 (SAT) From: Robert Nordier Message-Id: <199811260853.KAA22086@ceia.nordier.com> Subject: Re: boot0, was /boot/loader what to set rootdev to? In-Reply-To: <199811260225.KAA21774@hsw.generalresources.com> from Christopher Hall at "Nov 26, 98 10:25:33 am" To: hsw@acm.org Date: Thu, 26 Nov 1998 10:53:30 +0200 (SAT) Cc: rnordier@nordier.com, mike@smith.net.au, freebsd-current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Christopher Hall wrote: > > In message <199811251047.MAA15178@ceia.nordier.com>, Robert Nordier writes: > > >There's currently no way, though. The boot/loader, with Forth > >itself, runs in userland (i386 protected mode ring 3). So you'd > >have to add a BTX syscall, at least, in addition to the Forth code. > > I looked at BTX code and found system call, so it would have to invoke > the 'exit' switch back to real mode code. Then instead of INT 0x19 > would use BIOS disk services to load the selected boot block. > The the drive/partition to load would be passed in a register to system > call. Finally jump to the loaded boot block. > > For this to work after switching back to real mode, the machine state > must the same as the just booted condition. i.e. Are all the bios > vectors set back to normal? The bios vectors themselves are not currently altered. The interrupt vector offsets (of the PICs) are changed for protected mode, but are reprogrammed on re-entry into real address mode. BTX doesn't itself mess with the A20 line, but this is usually done in the boot blocks, so you may have to undo this, by way of the keyboard controller. I think it may just be easier to handle all of this by modifying the booteasy or boot0 sources, though, if neither of them meet your needs "as is". The first PC partition almost invariable begins on cylinder 0, head 1, so (as others have already mentioned) a number of boot managers exist which require no otherwise-usable space. -- Robert Nordier To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message