Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Nov 1998 10:53:30 +0200 (SAT)
From:      Robert Nordier <rnordier@nordier.com>
To:        hsw@acm.org
Cc:        rnordier@nordier.com, mike@smith.net.au, freebsd-current@FreeBSD.ORG
Subject:   Re: boot0, was /boot/loader what to set rootdev to?
Message-ID:  <199811260853.KAA22086@ceia.nordier.com>
In-Reply-To: <199811260225.KAA21774@hsw.generalresources.com> from Christopher Hall at "Nov 26, 98 10:25:33 am"

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



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