[coreboot] [SeaBIOS] Data exchange between coreboot - seabios - option rom

Christian Gmeiner christian.gmeiner at gmail.com
Wed Aug 22 16:13:29 CEST 2012

2012/8/22 Kevin O'Connor <kevin at koconnor.net>:
> On Tue, Aug 21, 2012 at 04:57:56PM +0200, Christian Gmeiner wrote:
>> 2012/8/21 Christian Gmeiner <christian.gmeiner at gmail.com>:
>> > Hi all,
>> >
>> > my vacation is over and I need to look in some stuff deeper to finally
>> > get the combination coreboot/seabios fully working. The only missing part
>> > aside from a lot of testing is the video bios stuff. Here I am working on
>> > a patch series to extend seabios vga option rom to support flat panels.
>> >
>> > I would like to to use EPI (http://www.epi-standard.org/) for the description
>> > of the panels. Due EOL changes my target hardware supports different
>> > kind of flat panels (with different timings). I can detect what panel is used
>> > with the help of an i2c eeprom. So the normal CBFS will be extended by
>> > n EPI raw files. And here the troubles begins :)
>> >
>> > 1) Can I add symbolic links during runtime
>> >
>> > It would be fine if somewhere during the boot (coreboot or seabios) I
>> > can readout
>> > the needed bytes from the eeprom, decide which EPI file to use and create
>> > something line a symlink to the choosen one.
>> >
>> > panel.epi -> 640_480_panel_name.epi
> I don't know of anyway to do this.  The effort to implement this would
> probably be large.

yes that would take ages

>> As I found out this can be done via nvram. So coreboot set the filename of the
>> EPI file to use and seabios/... etc can simply use it.
> Using CMOS for passing temporary variables around is quite ugly.  I'd
> recommend against it.


>> > 2) Can I load a CBFS file in the option rom?
>> >
>> > The idea is to load the EPI raw file and provide it via VBE (vbe_104f15) BIOS
>> > call. So the geode lx option rom can read out the timing informations via VBE
>> > and setup the video mode.
> It's possible.  However, the vgabios currently runs in 16bit mode.
> Getting the existing CBFS code to run in 16bit mode would be a pain.
> Probably better to convert the vgabios init phase to jump into 32bit
> mode.  However, that is a bit of work.
>> It could also be possible to store the EPI data at a defined memory
>> area where the
>> option rom can simply check for existing identifiers and checksum.
> I'd recommend against that - magic areas of memory have been quite
> troublesome in the past.
>> Any hints are really welcome.
> I'm not sure I fully understand your requirements.  Will the board
> truly have different flat screens hooked up to it?  One can't simply

There are different screens (timing and resolution) connected to the device.

> compile the EPI info into the BIOS?  Also, if you have to interrogate
> the display via i2c, can you simply fully generate the EPI info in the
> vgabios at runtime?

After some time of hacking I came up with the following solution.

1) Reserve 128 byte in SeaVIDOEBIOS (between ROM haeder and entry points)
2) Add all needed epi files to cbfs
3) Add possibility to patch vbios during loading based on i2c content
- see http://review.coreboot.org/#/c/1478/
4) Extend vbios to make use of epi/edid data by writing a simple parser
5) Extend VBE
6) Extend geode code in vbios to make use of parsed epi/edid data

Here is the first result, which looks quite good.

Christian Gmeiner, MSc

More information about the coreboot mailing list