[coreboot] [RFC] Here we go... the SLOF biosemu for coreboot-v3

Pattrick Hueper phueper at hueper.net
Sat Dec 13 14:44:27 CET 2008

On Sat, Dec 13, 2008 at 5:41 AM, Peter Stuge <peter at stuge.se> wrote:
> Pattrick Hueper wrote:
> However, x86emu only really emulates real mode AFAIK, and not all
> option ROMs stick to that. They could assume that protected mode is
> available and enable it during their run. Have you looked into
> handling this also in biosemu? Have you seen this behavior in any
> option ROMs? Have you already done extensive testing?
The code is used in the YDL Powerstation as part of SLOF, it is
however, only executed for VGA Option ROMs, i.e. PCI Class 0x03
devices. Several graphics cards have been reported to be running with
the latest SLOF code. I think it should succesfully initialise most
graphics cards available as long as the initialisation happens in real

I have done testing with an UltraIDE Controller  the code did
intialise the controller and PIO mode was working, i wanted to get DMA
mode working through the interrupt handlers but didnt succeed and got
moved to other projects before finishing.
It also started executing a PXE Option ROM of a Gigabit Ethernet
Controller (cant remember which one it was) but some parts of the PXE
stack were missing.

I have never had an option ROM that tried to switch to protected mode,
it wouldnt succeed with the x86emu anyway. However, e.g. the Graphics
cards VBE calls are available in real and protected mode and they run
perfectly in real mode, getting VGA info, detecting monitor EDIC data
and switching framebuffer modes is all implemented in the vbe.c file
and works in real mode.

I have also heard, that Benjamin Herrenschmidt is using the code in a
user mode application, i think for initialisation of VGA cards in
development of AMD Graphics Card Drivers for PPC Linux.

So i think the code is pretty well tested at least for VGA cards in
non-x86 platforms, and it has proven to me, that it can be extended
for other Option ROMs. Though the code for IDE and Ethernet
Controllers has not been open sourced and it needs to be developed

I still think, that for x86 coreboot vm86 and seabios might be the
better solution, but i thought that v3 was designed to be portable to
other platforms, and for those i think the biosemu code can help, but
probably not provide all functionality of seabios.

Also, i am not sure wether the code should be moved to a payload, at
least not a standalone payload... if for example the code initialises
a IDE controller, it would still need some other payload (or coreboot)
to read a bootloader from the disk and start that...

Cheers, Pattrick

More information about the coreboot mailing list