[coreboot] locking...

Myles Watson mylesgw at gmail.com
Fri Jun 19 18:13:02 CEST 2009


> as we move into the multicore world, messages get harder and harder to
> read when they are interspersed byte-wise. I propose to add optional
> locking to printk.
This should only matter for the time during RAM, right?  Is it a larger
issue?

> However, this locking has to work when some CPUs are in CAR and others
> are in RAM. And that's the big problem.
Yuck.

> AFAICS we can't simply use atomic normal memory acceses since the CPUs
> in CAR won't see that. Atomic register modifications are not possible
> across processors AFAICS.
> The only idea I have is abusing some MMIO chipset/CPU space which is
> usable as scratch space. In theory, that should work. But do CPUs or
> chipsets have such MMIO areas?
They do.  It's hard to know if someone is already (ab)using them, though.

> Of course, I'm aware that locking (if possible at all) will be highly
> CPU/chipset dependent, but even if we can make locking work on only a
> subset of platforms, it is still a lot better than nothing.
Are you thinking of putting it in the ops of the cpu device?  I guess that
only works after CAR.

Another option would be to only let the BSP print messages by default.  That
would clean up most people's logs most of the time.

Thanks,
Myles





More information about the coreboot mailing list