[Concept,00/18] efi: Improve integration of the app with a Shim environment

Message ID 20250902152158.2285264-1-sjg@u-boot.org
Headers
Series efi: Improve integration of the app with a Shim environment |

Message

Simon Glass Sept. 2, 2025, 3:21 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

This series collects together various small fixes and improvements which
make it easier to use the U-Boot EFI app in a bootflow which includes
Shim:

- 'Reset' back to the caller (e.g. EDK2)
- Machine reset using cold and warm reset
- Reset and enter the firmware UI
- Shim command now supports persistent debug
- Bootmenu shows the real media for each bootflow rather than just 'efi'


Simon Glass (18):
  efi: Correct calculate_paths() when an image is used
  efi: doc: Mention some EFI commands in the app documentation
  efi: Allow inclusion of EFI-runtime headers
  efi: Set the log category throughout lib/efi_client/
  efi_loader: Drop unnecessary efi_dp_str()
  efi: Move loaded-image, fs and device-path GUIDs to common
  boot: Move obtaining the label into a common file
  boot: Use the new label finder in bootflow_menu_add()
  boot: Drop an unwanted blank line in distro_efi_boot()
  efidebug: doc: Indent the media output correctly
  efidebug: Support sorting with efidebug memmap
  efi: doc: Add documentation for about efidebug boot
  efi: Use the console mux by default with the EFI app
  shim: Add a flag to make the setting persistent
  sysreset: Support a hot reset
  efi: app: Support proper reset options
  sysreset: Add SYSRESET_TO_FIRMWARE_UI with reset -u support
  sysreset: Add -c flag for explicit cold reset

 boot/bootflow.c                     |  27 +++++
 boot/bootflow_menu.c                |   7 +-
 boot/bootmeth_efi.c                 |   1 -
 cmd/boot.c                          |   2 +
 cmd/bootflow.c                      |  16 +--
 cmd/efidebug.c                      |  58 +++++++++-
 cmd/shim.c                          |  21 +++-
 doc/develop/uefi/u-boot_on_efi.rst  |   9 ++
 doc/usage/cmd/efidebug.rst          | 171 ++++++++++++++++++++++++++--
 doc/usage/cmd/reset.rst             |  12 +-
 doc/usage/cmd/shim.rst              |  16 ++-
 drivers/sysreset/sysreset-uclass.c  |  18 ++-
 drivers/sysreset/sysreset_sandbox.c |   2 +
 include/bootflow.h                  |   8 ++
 include/efi.h                       |  11 ++
 include/efi_loader.h                |   6 -
 include/sysreset.h                  |   5 +
 lib/efi/run.c                       |   2 +-
 lib/efi_client/Kconfig              |   1 +
 lib/efi_client/app_run.c            |   2 +
 lib/efi_client/efi.c                |   2 +
 lib/efi_client/efi_app.c            |  43 ++++++-
 lib/efi_client/efi_info.c           |   2 +
 lib/efi_client/efi_vars.c           |   2 +
 lib/efi_client/sdram.c              |   2 +
 lib/efi_client/stub.c               |   2 +
 lib/efi_client/stub_arm64.c         |   1 +
 lib/efi_client/stub_x86.c           |   2 +
 lib/efi_client/sync_dt.c            |   2 +
 test/boot/bootflow.c                |   4 +-
 test/dm/sysreset.c                  |   4 +
 31 files changed, 403 insertions(+), 58 deletions(-)