Dear Tim,

In message <4fb2c002.5030...@am.sony.com> you wrote:
> Support same log buffer or tracing buffer in both bootloader and kernel
> 
> ; Summary: Support same log buffer or tracing buffer in both bootloader and 
> kernel
> ; Proposer: Tim Bird - Sony Network Entertainment
> 
> == Description ==
> It would be nice to share log buffer or trace buffers between the bootloader 
> and the kernel,
> so that either log messages or trace events (respectively) could be coalesced 
> from both sources in a
> unified view.

This has been a standard feature in U-Boot for many years.  

The corresponding Linux code is also available; see for example
https://lkml.org/lkml/2009/1/21/250
and commit 212f61c in git://git.denx.de/linux-denx.git

The code has recently been resubmitted by Heiko Schocher, and as far
as I can tell it is supposed to hit mainline any time soon.

> It appears that U-boot uses a log-buffer format similar to the Linux kernel.

Not only similar, but identical (which is intentional).

> Note that this is useful for on-box analysis (using 'dmesg' locally, and 
> getting both
> bootloader and kernel messages).  It  is obvious that someone with a serial 
> console

It actually works round-trip: i. e. you can see in U-Boot the last
log messages of the previously running kernel, which may be helpful if
messages were written to the log buffer, but the kernel crashed before
these could be processed otherwise.  And as long as you don't clear
the log buffer, you can still read these messages in Linux after
rebooting (assuming sane hardware which does not lose memory content
during a warmboot - U-Boot takes care to preserve this information
during a reboot).

> Handling trace events in a coalesced fashion is a whole other issue.
...
> * Does u-boot support any tracing code similar to ftrace?

No, U-Boot does not support any such feature (yet).

> == Scope ==
> Unknown

Scope should be small.  As mentioned, the patches are queued.

> == Contractor Candidates ==
> No one so far.

I would recommend Heiko Schocher here, who has been working on this in
several iterations before, and who submitted the most recent set of
patches.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Man is the best computer we can put aboard a spacecraft ...  and  the
only one that can be mass produced with unskilled labor.
                                                  - Wernher von Braun
_______________________________________________
Celinux-dev mailing list
Celinux-dev@lists.celinuxforum.org
https://lists.celinuxforum.org/mailman/listinfo/celinux-dev

Reply via email to