devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Lübbe" <jlu@pengutronix.de>
To: Rob Herring <robh@kernel.org>, Simon Glass <sjg@chromium.org>
Cc: Peter Robinson <pbrobinson@gmail.com>,
	Tom Rini <trini@konsulko.com>,
	U-Boot Mailing List <u-boot@lists.denx.de>,
	devicetree@vger.kernel.org,
	Architecture Mailman List <boot-architecture@lists.linaro.org>
Subject: Re: [PATCH] schemas: Add schema for firmware logs
Date: Tue, 07 Feb 2023 12:56:22 +0100	[thread overview]
Message-ID: <24dba2278350ea222251be80f6aade104c2319ce.camel@pengutronix.de> (raw)
In-Reply-To: <CAL_JsqLW3GkXtr0oD28XB3MNK36Vjjzb10MhWFh85-MfN2oc3Q@mail.gmail.com>

On Mon, 2023-02-06 at 17:32 -0600, Rob Herring wrote:
> +boot-architecture
> 
> On Mon, Feb 6, 2023 at 3:25 PM Simon Glass <sjg@chromium.org> wrote:
> > 
> > Hi Rob,
> > 
> > On Mon, 6 Feb 2023 at 10:15, Rob Herring <robh@kernel.org> wrote:
> > > 
> > > On Sat, Feb 4, 2023 at 6:04 AM Simon Glass <sjg@chromium.org> wrote:
> > > > 
> > > > Hi Peter,
> > > > 
> > > > On Sat, 4 Feb 2023 at 02:36, Peter Robinson <pbrobinson@gmail.com>
> > > > wrote:
> > > > > 
> > > > > Hi Simon,
> > > > > 
> > > > > Does it make sense to devise something that is compatible with the
> > > > > kernel's pstore [1] mechanism?
> > > > 
> > > > Possibly...can you please be a little more specific?
> > > 
> > > Peter is talking about the same thing I suggested on IRC.
> > > 
> > > pstore == ramoops
> > 
> > Oh, I only looked at the DT binding as I thought that was what you
> > were talking about on irc.
> 
> The binding is called ramoops as it's for the RAM backend for pstore.
> 
> My suggestion was either using/extending ramoops or following its
> design as a reserved memory region. All you would need to extend the
> ramoops binding is a new property to define the size of your data.
> 
> > For pstore, isn't the point that Linux wants to save stuff to allow
> > debugging or collection on reboot? What does that have to do with
> > console logs from firmware? That seems like a different thing. Or are
> > you suggesting that we add a pstore driver into U-Boot? It is quite a
> > lot of code, including compression, etc. It might be easier for Linux
> > to write the data into pstore when it starts up?
> 
> Originally ramoops was just what you described. It has grown to
> multiple backends and types of records (hence the rename to pstore).
> If you just add a new subsection within the pstore region, then I
> think the existing kernel infrastructure will support reading it from
> userspace. Maybe new types have to be explicitly supported, IDK.
> 
> U-boot being able to read pstore wouldn't be a terrible feature to
> have anyways if your boot crashes before anything else is up to get
> the output. Note I'd guess the ram backend doesn't do compression as
> supporting slightly corrupted ram is a feature which wouldn't work.

This is basically how it works in Barebox. It can display the pstore contents
after a kernel crash and also (optionally) log to the pstore/ramooms console
log. Slight RAM corruption can be handled by using error correcting codes.

It's not perfect, of course, but still very useful.

Regards,
Jan

> I think any new DT binding is premature and pstore/ramoops was just a
> suggestion to consider. This needs wider consideration of how to
> handle all the various (boot) firmware logs. I've added the
> boot-architecture list for a bit more visibility.

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  parent reply	other threads:[~2023-02-07 11:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-04  0:19 [PATCH] schemas: Add schema for firmware logs Simon Glass
2023-02-04  9:35 ` Peter Robinson
2023-02-04 12:04   ` Simon Glass
2023-02-06 17:14     ` Rob Herring
2023-02-06 21:25       ` Simon Glass
2023-02-06 23:32         ` Rob Herring
2023-02-06 23:56           ` Simon Glass
2023-02-07 11:56           ` Jan Lübbe [this message]
2023-02-07 13:38             ` Simon Glass
2023-02-07 15:38               ` Jan Lübbe
2023-02-07 18:39                 ` Simon Glass
2023-02-08  8:14                   ` Jan Lübbe
2023-02-09 18:05                     ` Simon Glass
2023-02-10  9:12                       ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24dba2278350ea222251be80f6aade104c2319ce.camel@pengutronix.de \
    --to=jlu@pengutronix.de \
    --cc=boot-architecture@lists.linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=pbrobinson@gmail.com \
    --cc=robh@kernel.org \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).