Supporting extension ROMs and beyond...

SONE Takeshi ts1 at cma.co.jp
Fri Aug 8 03:48:01 CEST 2003


On Thu, Aug 07, 2003 at 03:17:26PM -0600, Eric W. Biederman wrote:
> Adam Agnew <agnew at cs.umd.edu> writes:
> > No one really wants LinuxBIOS to support legacy BIOS services. However,
> > the need for them keeps creeping in (I believe Ron plans to add int15 to
> > have better support for some vga roms). In the meantime, with a little
> > hacking you can probably get LinuxBIOS working with Bochs BIOS to do the
> > same job. Please see freebios/util/ADLO, it currently works for booting
> > Windows 2000 on SiS630 boards with LinuxBIOS and you probably only need
> > to make a few changes in loader.S to get it to work on your board too.
> 
> Given that Bochs BIOS aka ADLO works.  That is solution for supporting
> binary only x86 options roms.
> 
> Nothing I have seen requires these things to be up terribly early, and without
> source we can't bring them up early anyway.
> 
> Other directions similar directions are OpenBIOS for Open firmware support.
> And at some point we might even do EFI support.
> 
> However none of this will get into the core of LinuxBIOS, they will all be
> separate ELF loadable components like etherboot.
> 
> The project will still work on them, but they are not components of the core.

I thought I would get comments like this.

So, we need an external program that provides legacy BIOS compatibility,
like ADLO.

However, using Bochs BIOS as a base does not look very good idea to me.
Adding more code to such a fragile piece of code is almost impossible to
me.
It's already broken in many ways when dealing with real hardware, for 
instance, IDE detection is wrong, it tries to probe device
presence by writing and reading registers without checking
BSY bit cleared. It's violation of ATA spec and that's why one of
my drive is not detcted while spinning up. Bochs BIOS is all written
this way since Bochs' emulated hard drives never spin up.
Also, Bochs BIOS is providing deep level of compatibility, such as
hardcoded entry points, and I guess they are unneeded to support
option ROMs (and loading modern OS), they only contribute to make it
hard to maintain.

OTOH, current VGABIOS support in LinuxBIOS can be extended
in a lot cleaner way, since it's 32-bit GCC code.

So, my suggestion is to move the legacy BIOS support of LinuxBIOS to
a new standalone ELF executable, and extend it to support general PCI
option ROMs, and optionally IPL from first drive.

> The really fun prospect is to put general option ROM support into ADLO and
> have Etherboot as an Option ROM implementing the network boot support.

Last time I tried ADLO->Etherboot worked. ADLO reserves 64KB
for VGABIOS but my VGABIOS is 48KB and ide_disk.zrom is just 16KB
so it was easy to have it there. Bochs BIOS already has code to find
and call option ROMs when they are on memory already.

--
Takeshi



More information about the coreboot mailing list