[coreboot] locking...

Stefan Reinauer stepan at coresystems.de
Sat Jun 20 02:17:07 CEST 2009

Carl-Daniel Hailfinger wrote:
> do_printk is defined in src/arch/i386/lib/printk_init.c as almost
> identical function, but without console_tx_flush and without locking. If
> only one CPU uses the lockless variant, we lose.
This is the version that was intended to be used when CONFIG_USE_INIT is

Does the _flush actually do much? I had the impression that we flush
after each character anyways, but I'm no terminal expert.

Other than that, we could unify those versions by just defining an empty
(for now) version of the spinlock functions in raminit stage. Then think
about where we can place our locking for those platforms that need it
this early...?

> A quick test abuild with #error inserted in the lockless function shows
> we indeed use it for every freaking x86 target.
> That explains the supermicro/h8dme intertwined printk messages Ward is
> seeing.
They're from ram init stage afaict ...

> Besides that, do we know where static spinlock_t console_lock is placed?

grep console_lock *.map
coreboot_ram.map:00122058 d console_lock
smm.map:000a13fc t console_lock

(raminit stage symbols are in coreboot.map)


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/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866

More information about the coreboot mailing list