public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 00/15] efi_loader: Add support for logging to a buffer
@ 2024-10-28 12:47 Simon Glass
  2024-10-28 12:47 ` [PATCH 01/15] log: Add a new category for tests Simon Glass
                   ` (15 more replies)
  0 siblings, 16 replies; 40+ messages in thread
From: Simon Glass @ 2024-10-28 12:47 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Ilias Apalodimas, Tom Rini, Heinrich Schuchardt, Simon Glass,
	AKASHI Takahiro, Caleb Connolly, Dmitry Rokosov, Emil Kronborg,
	Etienne Carriere, Francis Laniel, Hou Zhiqiang, Igor Prusov,
	Jonathan Humphreys, Levi Yun, Marek Vasut, Masahisa Kojima,
	Mattijs Korpershoek, Maxim Moskalets, Michal Simek,
	Neil Armstrong, Oliver Gaskell, Patrick Rudolph, Quentin Schulz,
	Raymond Mao, Robert Marko, Sam Protsenko, Sean Anderson,
	Sebastian Reichel, Sughosh Ganu, Sumit Garg,
	Thomas Weißschuh, Vincent Stehlé, Wei Ming Chen

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


^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2024-12-02 12:35 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2024-11-20 20:05                 ` Heinrich Schuchardt
2024-11-21  2:19                   ` Simon Glass
2024-12-02  0:12                     ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox