c-d.hailfinger.devel.2006 at gmx.net
Sat Jun 20 02:57:17 CEST 2009
On 20.06.2009 02:39, ron minnich wrote:
> On Fri, Jun 19, 2009 at 4:46 PM, 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.
> it's very useful. It can be used in the rom/CAR code before consoles
> really work.
Hm. AFAICS both versions have the same console requirements and just
differ in locking (if you ignore the _flush no-op).
> This kind of thing is common. Just about all OSes have a "printk
> before printk" function.
True, but our console requirements for both versions are pretty minimal
and I think we showed in v3 that a one-size-fits-all printk can work fine.
> So be careful. I use this one already in qemu.
Since the spinlock seems to live outside the CAR area, locking will
break for any processor not having working RAM access. The solution is
v3-style global variables as outlined in my other mail.
>>> (we should just rename this to printk and use it the v3 way instead of
>>> the printk_<loglevel> layers on top, but that's orthogonal, too)
>> Yes please!
> one thing at a time. That is on a list, but let's focus on this thread.
Agreed. Besides that, such a conversion would allow me to use Coccinelle
again, so I'll probably try to do that myself once I have time.
More information about the coreboot