more on PROM linux
Mike Bilow
mikebw at bilow.bilow.uu.ids.net
Tue Aug 13 15:12:00 EDT 1996
Robert Luoma wrote in a message to Mike Bilow:
RL> I have not gotten any response from my previous queries, but I
RL> shall try to rephrase my question (about putting Linux in ROM
RL> and booting to RAMDISK).
RL> So, at least to start, I am trying to figure out how much of
RL> the BIOS Linux needs; I am thinking of popping out the BIOS and
RL> having the system make a jump to the kernel.
RL> I think the BIOS starts at 0xfffff0 (FFFFF:0000?), but I do not
RL> think that between "640K" and "1Meg", any chunk is large enough
RL> to hold the kernel. I guess I could try "bank-switching"
RL> (window-moving?/page-select?) scheme where I pull out the
RL> kernel in smaller pieces and load it into "memory". Has anyone
RL> tried this with linux?
RL> Also, the BIOS does things like power-on self test, interrupt
RL> handling, initialization of the verious ports and such. How
RL> much of this do I need?
I can tell you pretty much anything you want to know about the boot process.
Putting Linux is ROM has been looked at, but replacing the BIOS would be a bad
approach. You need all of the POST, since that does a lot of hardware setup
that will be specific to your motherboard hardware and which would be hard to
replicate for this reason.
Fortunately, all BIOS ROMs provide for their own extension by looking for a
starting signature on each 2 KB boundary beginning with the C000h segment, and
this is a well documented and reliable mechanism. All VGA or better video
cards and all bootable SCSI controllers depend upon some variation of this
system. This allows you to put some ROM code on the bus which would will be
hooked by the main BIOS ROM and executed early on.
While it would be theoretically possible to boot an operating system directly,
it would probably require extensive modification to the code. The GNU compiler
does have some special provisions for generating ROMable code, but there is no
provision for using this in the Linux kernel as far as I know.
The easiest way to boot from ROM is therefore to build a ROM extension that
fakes a disk volume, and then to stash the largely unmodified operating system
code onto this fake disk volume. You can buy off-the-shelf ROM cards that do
this, although they are not cheap. The original ROM BIOS in a lot of the
high-end newer motherboards supports booting from CD-ROM using an ISO9660
filesystem, and this kind of thing would be easy to add to Linux.
-- Mike
More information about the Discuss
mailing list