[LinuxBIOS] Geode SC22000

Stefan Reinauer stepan at coresystems.de
Sat Apr 1 12:18:58 CEST 2006

* Per Hallsmark <perh at t2data.se> [060331 14:16]:
> The LB base is svn ver 2171, I've got a 71K big patch for it.
> How do I contribute it to LB tree?
Just send an "svn diff" as an attachment to this list.

> Q1: The source code files often include source files again instead
> of like building object modules that are later linked together.
> Why something like this? It seems odd to me as an perhaps oldschool
> C programmer.
That's done in the romcc compiled code. The reason is that you can only
know how the code looks like as a whole, the single parts look pretty
different depending on the register pressure. Remember: This code is
compiled to assembler code that does not use _any_ memory but runs in
registers only.

> Q2: Why does the LB project need a special compiler?
> I've done numberous of firmware stuff and ordinary gnu tools have a
> good job so far.
> Must admit though that these hasn't been x86 which of course has it
> special boot mode, but there exist "standard" tools for that as well.
> (RPM package dev86 for example)
It does not _need_ one. The thing is, we don't want to write ram
initialization code for complex systems (such as the amd64) in assembler
but instead in more readable and understandable C code.
Since, consequentially, there is no RAM during RAM initialization, you
need to make sure the code fits into registers only.

No other C compiler except romcc does that.

Some platforms also allow you to do cache as ram, which uses the cpu
cache as a small amount of "fake ram". The advantage is: When this works
you can use gcc, which compiles faster and results in much smaller code.

We're trying to do this on all systems where it works reliably, but
LinuxBIOS is a burned child with respect to CAR (as we usually call
cache as ram) because the needed mechanisms changed per minor cpu
revision on intel systems a while ago which made the whole thing
reaaally fragile.

> Q3: Documentation...
> I was perhaps a bit optimistic when I thought the LB port should
> take one week, it was more like one month :-)
> But more documentation could help here a lot, or are there docs
> outside of linuxbios.org I've missed? Any work in progress here
> or can I contribute to it somehow?

There's Ron's great article on porting to the sc520 and I've written a
paper on AMD64 porting a whole while ago. Both should be linked in on
linuxbios.org though. 

More (formal) documentation is really needed though, indeed.


coresystems GmbH · Brahmsstr. 16 · D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 · Fax: +49 761 7664613
Email: info at coresystems.de  · http://www.coresystems.de/

More information about the coreboot mailing list