[LinuxBIOS] LInuxBIOSv3 - Reset and CAR code

Stefan Reinauer stepan at coresystems.de
Fri May 18 23:56:26 CEST 2007


* Juergen Beisert <juergen127 at kreuzholzen.de> [070518 20:53]:
> currently I'm trying to understand how it works in assembly until C starts. 
> Could we divide the stage0_i586.S file into its three parts? Resetvector, 
> Jump to protected mode and the CAR code? Maybe it would be easier to 
> understand and to maintain.

If you look in the history of linuxbiosv3 (ie via linuxbios.org/viewvc)
you will find that that is the way I implemented it. While this worked
fine with new binutils and compiler, some old toolchains terribly broke
this when you start to change small things. It was very fragile.

So we changed it. Now it is exactly as fragile, but it is one fragile
mess, not three of them.

> With my GeodeGX1 systems I cannot use the mtrr registers to get some memory 
> from the cache. To replace it a complete new file would be required. Maybe it 
> would be better to support different methods how to get CAR and link them on 
> demand?

The overhead of the reset vector and switching to protected mode before
you enable CAR is 17 instructions (roughly). While you could factor that
out, it is at the border between moving the complexity from one side (1
big file) to the other (composing several files and watching the code
flow) and the philosophic unseemliness of having to duplicate 17
instructions per cpu type.

I don't really like the way it is done at the moment, working around
weird bugs instead of fixing them, and I do quite some ironing out of
the weird hacks in "lar".
We're not a toolchain project, so we probably have to live with it ;)

Stefan


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




More information about the coreboot mailing list