[coreboot] Strange corruption with printk

Myles Watson mylesgw at gmail.com
Tue Mar 9 17:42:42 CET 2010

> >>> The memory copy is not inline asm (will lead to subtle
> >>> corruption), the memory copy and the stack switching are not in one
> >>> inline asm block (gcc is free to insert arbitrary code in between),
> and
> >>> the stack is switched in the middle of a function (gcc may use some
> >>> non-clobbered regs to access the old stack, or simply die).
> >>>
> I fixed that with recent patch. Is it what you checked?
I thought I had updated since then, but it turns out that I hadn't.  One of
these days I'll look into why the build strings never update.
> Myles, please check
> 1) If it does work without my patch ;)
No strange characters :)  It makes it fail more reliably later, which is
good.  I'll go back to debugging that.

> 2) Add the
> static void set_init_ram_access_uc(void)
> {
> 	set_var_mtrr(0, 0x00000000, CONFIG_RAMTOP, MTRR_TYPE_UNCACHED);
> }
> And call the set_init_ram_access_uc instead of set_init_ram_access and
> call
> again set_init_ram_access after the copy.
I'll look at that too.


More information about the coreboot mailing list