All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Simon Glass <sjg@chromium.org>
Cc: "U-Boot Mailing List" <u-boot@lists.denx.de>,
	"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
	"AKASHI Takahiro" <akashi.tkhro@gmail.com>,
	"Caleb Connolly" <caleb.connolly@linaro.org>,
	"Dmitry Rokosov" <ddrokosov@salutedevices.com>,
	"Emil Kronborg" <emil.kronborg@protonmail.com>,
	"Etienne Carriere" <etienne.carriere@foss.st.com>,
	"Francis Laniel" <francis.laniel@amarulasolutions.com>,
	"Hou Zhiqiang" <Zhiqiang.Hou@nxp.com>,
	"Igor Prusov" <ivprusov@salutedevices.com>,
	"Jonathan Humphreys" <j-humphreys@ti.com>,
	"Levi Yun" <yeoreum.yun@arm.com>, "Marek Vasut" <marex@denx.de>,
	"Masahisa Kojima" <kojima.masahisa@socionext.com>,
	"Mattijs Korpershoek" <mkorpershoek@baylibre.com>,
	"Maxim Moskalets" <maximmosk4@gmail.com>,
	"Michal Simek" <michal.simek@amd.com>,
	"Neil Armstrong" <neil.armstrong@linaro.org>,
	"Oliver Gaskell" <Oliver.Gaskell@analog.com>,
	"Patrick Rudolph" <patrick.rudolph@9elements.com>,
	"Quentin Schulz" <quentin.schulz@cherry.de>,
	"Raymond Mao" <raymond.mao@linaro.org>,
	"Robert Marko" <robert.marko@sartura.hr>,
	"Sam Protsenko" <semen.protsenko@linaro.org>,
	"Sean Anderson" <seanga2@gmail.com>,
	"Sebastian Reichel" <sebastian.reichel@collabora.com>,
	"Sughosh Ganu" <sughosh.ganu@linaro.org>,
	"Sumit Garg" <sumit.garg@linaro.org>,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	"Vincent Stehlé" <vincent.stehle@arm.com>,
	"Wei Ming Chen" <jj251510319013@gmail.com>
Subject: Re: [PATCH 00/15] efi_loader: Add support for logging to a buffer
Date: Wed, 20 Nov 2024 12:06:33 -0600	[thread overview]
Message-ID: <20241120180633.GE3600562@bill-the-cat> (raw)
In-Reply-To: <CAC_iWj+g1nMA1DrWjguP=YiQhKOmyGKyu233Eb6Zjcv0x4yatA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3159 bytes --]

On Wed, Nov 20, 2024 at 05:55:18PM +0200, Ilias Apalodimas wrote:
> Hi Simon,
> 
> On Wed, 20 Nov 2024 at 17:37, Simon Glass <sjg@chromium.org> wrote:
> >
> > HI Ilias,
> >
> > On Fri, 1 Nov 2024 at 05:32, Ilias Apalodimas
> > <ilias.apalodimas@linaro.org> wrote:
> > >
> > > Hi Simon,
> > >
> > > On Thu, 31 Oct 2024 at 20:02, Simon Glass <sjg@chromium.org> wrote:
> > > >
> > > > Hi Ilias,
> > > >
> > > > On Tue, 29 Oct 2024 at 19:32, Ilias Apalodimas
> > > > <ilias.apalodimas@linaro.org> wrote:
> > > > >
> > > > > On Tue, 29 Oct 2024 at 17:45, Simon Glass <sjg@chromium.org> wrote:
> > > > > >
> > > > > > Hi Ilias,
> > > > > >
> > > > > > On Tue, 29 Oct 2024 at 10:58, Ilias Apalodimas
> > > > > > <ilias.apalodimas@linaro.org> wrote:
> > > > > > >
> > > > > > > Hi Simon,
> > > > > > >
> > > > > > > On Mon, 28 Oct 2024 at 14:48, Simon Glass <sjg@chromium.org> wrote:
> > > > > > > >
> > > > > > > > It is a bit of a pain to log EFI boot-services calls at present. The
> > > > > > > > output goes to the console so cannot easily be inspected later. Also it
> > > > > > > > would be useful to be able to store the log and review it later, perhaps
> > > > > > > > after something has gone wrong.
> > > > > > > >
> > > > > > > > This series makes a start on implementing a log-to-buffer feature. It
> > > > > > > > provides a simple 'efidebug log' command to inspect the buffer. For now,
> > > > > > > > only memory allocations are logged.
> > > > > > >
> > > > > > > Why is this problem specific to EFI and no U-Boot in general? Do we
> > > > > > > have a similar machinery for malloc()?
> > > > > >
> > > > > > Mostly because an app can make EFI calls and we want to know what they
> > > > > > are, e.g. to debug them and figure out what might be wrong when
> > > > > > something doesn't boot.
> > > > >
> > > > > EFI_PRINT() has been proven pretty useful for this. I don't personally
> > > > > see the point of adding ~1300 lines of code to replace a print.
> > > > > What would make more sense is teach EFI_PRINT to log errors in a buffer.
> > > >
> > > > Is that a NAK? Please be clear if you are reviewing the code or just
> > > > rejecting the whole idea.
> > >
> > > For the idea, no. But I don't think what's implemented here is what we want.
> > >
> > > To track what EFI services are called, we already have EFI_ENTRY and EFI_EXIT.
> > > Why don't we instead, add a logging service (and we already have
> > > ftrace iirc) and plug it in the macros above?
> > > That would make more sense not to mention way less code.
> >
> > I am wanting to programmatically log and manage what EFI_LOADER does,
> > so that bootstd can present a high-level view of what is going on,
> > e.g. which protocols are used, how much memory is allocated and where.
> > So this is not just about logging text output.
> 
> Why the EFI_LOADER only? Bootstd is supposed to cover more cases, so
> why not a generic framework for all boot commands?

This feels similar to the point I've made elsewhere in this overarching
series, why not do this at existing common points in the code path?

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2024-11-20 20:41 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-28 12:47 [PATCH 00/15] efi_loader: Add support for logging to a buffer Simon Glass
2024-10-28 12:47 ` [PATCH 01/15] log: Add a new category for tests Simon Glass
2024-10-28 12:47 ` [PATCH 02/15] test: Allow saving and restoring the bloblist Simon Glass
2024-10-28 12:47 ` [PATCH 03/15] bloblist: test: Mark tests with UTF_BLOBLIST Simon Glass
2024-10-28 12:47 ` [PATCH 04/15] sandbox: Convert sb command to use new macro Simon Glass
2024-10-28 12:47 ` [PATCH 05/15] doc: sandbox: Add docs for the sb command Simon Glass
2024-11-03 23:24   ` Heinrich Schuchardt
2024-10-28 12:47 ` [PATCH 06/15] sandbox: Add a way to show the sandbox memory-mapping Simon Glass
2024-10-29  9:59   ` Ilias Apalodimas
2024-10-29 15:46     ` Simon Glass
2024-10-28 12:47 ` [PATCH 07/15] sandbox: Fix comment for nomap_sysmem() function Simon Glass
2024-10-28 12:47 ` [PATCH 08/15] lmb: Drop extra 16KB of stack space Simon Glass
2024-10-28 12:48 ` [PATCH 09/15] efi_loader: Fix free in ..._media_device_boot_option() Simon Glass
2024-10-29 10:01   ` Ilias Apalodimas
2024-10-29 15:45     ` Simon Glass
2024-10-29 22:13       ` Heinrich Schuchardt
2024-10-31 17:51         ` Simon Glass
2024-10-28 12:48 ` [PATCH 10/15] efi_loader: Add support for logging EFI calls Simon Glass
2024-10-29 11:44   ` Heinrich Schuchardt
2024-10-29 22:19   ` Heinrich Schuchardt
2024-10-31 18:01     ` Simon Glass
2024-10-31 22:30       ` Heinrich Schuchardt
2024-10-31 22:37         ` Tom Rini
2024-11-20 15:37           ` Simon Glass
2024-10-28 12:48 ` [PATCH 11/15] efi_loader: Create the log on startup Simon Glass
2024-10-28 12:48 ` [PATCH 12/15] efi_loader: Add a command to show the EFI log Simon Glass
2024-10-28 12:48 ` [PATCH 13/15] test: efi_loader: Add a simple test for " Simon Glass
2024-10-28 12:48 ` [PATCH 14/15] efi_loader: Use the log with memory-related functions Simon Glass
2024-10-28 12:48 ` [PATCH 15/15] efi_loader: Add documentation for the EFI log Simon Glass
2024-10-29  9:58 ` [PATCH 00/15] efi_loader: Add support for logging to a buffer Ilias Apalodimas
2024-10-29 15:45   ` Simon Glass
2024-10-29 18:31     ` Ilias Apalodimas
2024-10-31 18:01       ` Simon Glass
2024-11-01 11:31         ` Ilias Apalodimas
2024-11-20 15:37           ` Simon Glass
2024-11-20 15:55             ` Ilias Apalodimas
2024-11-20 18:06               ` Tom Rini [this message]
2024-11-20 20:05                 ` Heinrich Schuchardt
2024-11-21  2:19                   ` Simon Glass
2024-12-02  0:12                     ` Simon Glass

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=20241120180633.GE3600562@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=Oliver.Gaskell@analog.com \
    --cc=Zhiqiang.Hou@nxp.com \
    --cc=akashi.tkhro@gmail.com \
    --cc=caleb.connolly@linaro.org \
    --cc=ddrokosov@salutedevices.com \
    --cc=emil.kronborg@protonmail.com \
    --cc=etienne.carriere@foss.st.com \
    --cc=francis.laniel@amarulasolutions.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=ivprusov@salutedevices.com \
    --cc=j-humphreys@ti.com \
    --cc=jj251510319013@gmail.com \
    --cc=kojima.masahisa@socionext.com \
    --cc=marex@denx.de \
    --cc=maximmosk4@gmail.com \
    --cc=michal.simek@amd.com \
    --cc=mkorpershoek@baylibre.com \
    --cc=neil.armstrong@linaro.org \
    --cc=patrick.rudolph@9elements.com \
    --cc=quentin.schulz@cherry.de \
    --cc=raymond.mao@linaro.org \
    --cc=robert.marko@sartura.hr \
    --cc=seanga2@gmail.com \
    --cc=sebastian.reichel@collabora.com \
    --cc=semen.protsenko@linaro.org \
    --cc=sjg@chromium.org \
    --cc=sughosh.ganu@linaro.org \
    --cc=sumit.garg@linaro.org \
    --cc=thomas.weissschuh@linutronix.de \
    --cc=u-boot@lists.denx.de \
    --cc=vincent.stehle@arm.com \
    --cc=xypron.glpk@gmx.de \
    --cc=yeoreum.yun@arm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.