From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: "Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
"Tom Rini" <trini@konsulko.com>,
"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
"Simon Glass" <sjg@chromium.org>,
"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: [PATCH 00/15] efi_loader: Add support for logging to a buffer
Date: Mon, 28 Oct 2024 13:47:51 +0100 [thread overview]
Message-ID: <20241028124815.47262-1-sjg@chromium.org> (raw)
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.
This feature makes it possible to add tests to check which EFI calls are
made by U-Boot itself. It may also make it easier to figure out what is
needed for booting Windows.
Some patches to help with debugging sandbox memory-mapping are included,
but for now EFI's use of mapping is not adjusted.
Simon Glass (15):
log: Add a new category for tests
test: Allow saving and restoring the bloblist
bloblist: test: Mark tests with UTF_BLOBLIST
sandbox: Convert sb command to use new macro
doc: sandbox: Add docs for the sb command
sandbox: Add a way to show the sandbox memory-mapping
sandbox: Fix comment for nomap_sysmem() function
lmb: Drop extra 16KB of stack space
efi_loader: Fix free in ..._media_device_boot_option()
efi_loader: Add support for logging EFI calls
efi_loader: Create the log on startup
efi_loader: Add a command to show the EFI log
test: efi_loader: Add a simple test for the EFI log
efi_loader: Use the log with memory-related functions
efi_loader: Add documentation for the EFI log
MAINTAINERS | 7 +
arch/sandbox/cpu/cpu.c | 13 +
arch/sandbox/include/asm/cpu.h | 3 +
arch/sandbox/include/asm/io.h | 2 +-
cmd/efidebug.c | 53 +++-
cmd/sb.c | 42 ++--
common/log.c | 1 +
configs/sandbox_defconfig | 3 +
doc/develop/uefi/uefi.rst | 22 ++
doc/usage/cmd/efidebug.rst | 109 ++++++++
doc/usage/cmd/sb.rst | 79 ++++++
doc/usage/index.rst | 2 +
include/bloblist.h | 1 +
include/efi.h | 1 +
include/efi_log.h | 316 +++++++++++++++++++++++
include/log.h | 2 +
include/test/test.h | 3 +
lib/efi_loader/Kconfig | 19 ++
lib/efi_loader/Makefile | 1 +
lib/efi_loader/efi_bootmgr.c | 3 +-
lib/efi_loader/efi_log.c | 444 +++++++++++++++++++++++++++++++++
lib/efi_loader/efi_memory.c | 119 ++++++---
lib/efi_loader/efi_setup.c | 7 +
lib/lmb.c | 2 -
test/common/bloblist.c | 28 +--
test/lib/Makefile | 1 +
test/lib/efi_log.c | 93 +++++++
test/test-main.c | 13 +
28 files changed, 1305 insertions(+), 84 deletions(-)
create mode 100644 doc/usage/cmd/efidebug.rst
create mode 100644 doc/usage/cmd/sb.rst
create mode 100644 include/efi_log.h
create mode 100644 lib/efi_loader/efi_log.c
create mode 100644 test/lib/efi_log.c
--
2.43.0
next reply other threads:[~2024-10-28 13:32 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-28 12:47 Simon Glass [this message]
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
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=20241028124815.47262-1-sjg@chromium.org \
--to=sjg@chromium.org \
--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=sughosh.ganu@linaro.org \
--cc=sumit.garg@linaro.org \
--cc=thomas.weissschuh@linutronix.de \
--cc=trini@konsulko.com \
--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.