[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] early printk support for microblaze
Jivin John Williams lays it down ...
> Yasushi SHOJI wrote:
> >
> >if you apply the patch it produce boot log like the above. note that
> >the top part of boot log is duplicated. The reason I said was that I
> >misunderstood what CON_PRINTBUFFER is for.
> >
> >it might be better to redirect early printk's out put to debug uart if
> >the platform has one. what do you think?
>
> OK, i'm slowly catching up! Sorry, I'd never heard of early printk
> before - but a google search suggests it's a capability to use printk()
> before the kernel calls console_init(), is that right?
>
> What I don't understand, is why it is necessary? Any printk() output
> that is sent before calling console_init() gets buffered, and is output
> eventually.
>
> Or should pre-console_init() printk's be output immediately, in case the
> kernel hangs/crashes before console_init()?
Early printk is (from what I have seen) a hack for debugging new
platforms that do not make it that far through the boot for
CON_PRINTBUFFER to kick in.
It's always a bit messy IMO.
What you probably want is a config option. If EARLY_PRINTK is set,
don't set CON_PRINTBUFFER and have the two work it out so that you do
not get the output twice.
The "sh" platform has this arrangement, even though I use "sh" every
day I still haven't used the EARLY_PRINTK support :-) I usually call
a debug specific putc routine if I need early print outs, because when
I need early I usually need it in head.S. This also saves messing up
the serial driver ;-)
Cheers,
Davidm
--
David McCullough, davidm@snapgear.com Ph:+61 7 34352815 http://www.SnapGear.com
Custom Embedded Solutions + Security Fx:+61 7 38913630 http://www.uCdot.org
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/