[coreboot] Relocable payloads

Rudolf Marek r.marek at assembler.cz
Sun Feb 28 10:33:36 CET 2010

>> But lets make sure we gain from it in the end...
>> Relocating coreboot_ram would safe us two 1MB sized memcpy on the 
>> resume path, so we would safe at least 200 microseconds of boot time 
>> in the case we're resuming. (assuming memory is 6.4G/s, DDR2-800 aka 
>> PC2-6400)  .... 0.2milliseconds of 400+... worth the complexity?
> minus the time added needed by the linker for the linking..

Is this WB?

> How does linking go with lzma?

The linker is called in c_start.o and it is reloc.c "stolen" from memtest86. It 
is a part of the resulting image.

> - do the relocations require more RAM? How much?

They do, i think it is just few kilobytes

> - can the sections and relocations be lzma'ed together? or are they 
> separate files in CBFS?

so far I packed resulting image to one text section, just to be able to load it 
with the stage loader.

Oh and it does work, I made a mistake not to link it to addr 0, but the dynamic 
loader is doing its own relocation so it got twice big addresses.

Now if only I could fix AMD CAR. I think Stephan is right that dynamic loader 
might add more complexity. It took me less time to get it working, then fixing 
the AMD K8 CAR to handle the resume copy properly :)

Anyway, I proved that we can have it, nice result too (at least for me ;)

I will try to fix the AMD CAR somehow now to make resume/suspend work again.


More information about the coreboot mailing list