9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Charles Perkins <chuck@memetech.do.not.spam.me.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] non-BIOS boot
Date: Fri, 31 May 2002 08:57:02 +0000	[thread overview]
Message-ID: <ogxJ8.9867$jP6.398968895@newssvr21.news.prodigy.com> (raw)
In-Reply-To: <8af692a6aa5a1270aab459dd5945364d@plan9.bell-labs.com>

Regarding the limitations of the PC boot process...

"David Gordon Hogan" <dhog@plan9.bell-labs.com> wrote in message
news:8af692a6aa5a1270aab459dd5945364d@plan9.bell-labs.com...
> > If you dont use the BIOS wouldn't you have to access
> > the disk via i/o ports? If so, you would have to adhere to
> > the SCSI/ATA standard rather than a more conformed interface
> > via int13? If you did have to adhere to the different standards
> > wouldnt that mean implementing the drivers in the MBR/PBS?
> > I think _I'm_ the one missing something :) Can you fill me
>
> Good luck fitting that code into the 512 bytes you have to play
> with in the MBR.
>
> The BIOS int13 call gives you enough to get the OS into memory,
> then you can run a _real_ driver, tailored to the OS, and not to
> the pre-Cambrian qualities of the BIOS.
>

You'd be suprised what a sufficently motivated person can do with 512 bytes.
I know for a fact that you can go all the way to protected mode and
(limited) paging using just the master boot record of an IDE hard drive,
because I've done it. Now that boot sector doesn't do anything other than
remap interrupts, enable A20, set up page tables, switch to protected mode
and set up a polling LBA page-in routine for the rest of memory... but hey,
after you've got that you can just let the rest of your kernel page itself
in in a lesiurely manner with no second stage boot loader or file system
grokker required.

I wrote the boot pager in an attempt to make an OS that has no file
system--just persistent virtual memory. All the boot loaders out there
pretty much expect to have a file system of one sort or another to load a
kernel image from, and using one of those  would have made moot the whole
point of the exercise. I've since changed my mind about the evils of
structure in secondary storage but the boot pager remains and it's (imo) a
pretty neat way to get your kernel running.

Anybody who cares to look at it can click on oiuboot.asm at www.memetech.com
and/or download a bochs/VMWare booting disk image of it (oiuboot.zip.)

Now I am not claiming that stuffing all this into 512 bytes is a good idea,
mind you. Merely that it is possible.

Chuck Perkins


  parent reply	other threads:[~2002-05-31  8:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-30 18:17 David Gordon Hogan
2002-05-31  8:56 ` Don
2002-05-31  8:57 ` Charles Perkins [this message]
2002-05-31 16:10   ` Ronald G Minnich
2002-06-05  9:54   ` Don
2002-06-05 15:23     ` Ronald G Minnich
2002-06-05  9:54   ` Douglas A. Gwyn
  -- strict thread matches above, loose matches on Subject: below --
2002-05-31 17:57 David Gordon Hogan
2002-05-27 17:47 rsc
2002-05-27  8:57 Don
2002-05-27 18:45 ` Ronald G Minnich
2002-05-29  8:47   ` Don
2002-05-29 13:50     ` Ronald G Minnich
2002-05-30  8:40       ` Don
2002-05-30 15:15         ` Ronald G Minnich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='ogxJ8.9867$jP6.398968895@newssvr21.news.prodigy.com' \
    --to=chuck@memetech.do.not.spam.me.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).