How does pre memory C code work on K8.

Eric W. Biederman ebiederman at
Fri Mar 12 11:28:01 CET 2004

maillists at writes:

> Something has been troubling me for some time which is how the code manages
> to run before the memory controllers are configured. The assembler I can see
> has no accesses to memory, but the C code does, is their some magic gcc
> switch that makes it be entirely register based?

Unfortunately gcc's architecture does not appear to have the necessary
support so I wrote romcc to do this.
> It's troubled me for a while one the memories up then I'm more than happy
> but before that I'm a little bemused.

It is also possible to store data in the dcache if you can reliably
lock in cache blocks.  Your code still needs to run out of NOR flash.
The PowerPC supports this.  On x86 I have not seen any publicly
documented and supported way to do this yet...  I have done it and
liked the results so much I implemented romcc.


More information about the coreboot mailing list