[coreboot] [PATCH] [sort of] multiplex console output from each core

xdrudis xdrudis at tinet.cat
Sun Jan 30 20:59:25 CET 2011

On Sun, Jan 30, 2011 at 08:32:58PM +0100, Stefan Reinauer wrote:
> * xdrudis <xdrudis at tinet.cat> [110130 15:46]:
> > On Sat, Jan 29, 2011 at 11:09:05AM +0100, xdrudis wrote:
> > > is what I have.  My board does not get to ramstage, so it might not
> > > work there. It works for my serial console but should work for net or
> > 
> > Ok, now I see it. It won't work with sprintf in ramstage. 
> It should not be needed in ram stage, as we have locking there.

Yes, it'd be mostly unneeded, but anyway the patch I sent does not 
disable it in ramstage. So it still causes sprintf to consume 
the double of bytes maybe beyond its buffers (and produce 
unreadable messages). The idea can work, the perl script may be
usable, but the patches to C should be redone from scratch. 

In fact I think there's some subtle breakage already in romstage.c,
since I didn't realise console_tx will check for \n to add \r and that
won't work with CONFIG_DEBUX_MUXED in that patch, although it won't be
noticed unless you have 16 cores (I think an \n from the 16th core
would produce a \n).

But continuing with the idea, the perl script might be changed to
detect some string in the input and stop demultiplexing. Sonner or
later coreboot may stop multiplexing or simply stop running and have
some other software writing to serial port, and it'd be nice if the
script would then simply copy the input unchanged (to all outputs if
it's not writing to stdout only ?).

More information about the coreboot mailing list