[U-Boot] [PATCH v3 00/11] efi_loader: error handling cmd/bootefi.c

Heinrich Schuchardt xypron.glpk at gmx.de
Sat Mar 3 14:28:53 UTC 2018


This patch series is focused on providing error checking during the
initialization of the EFI subsystem.

If any of the registrations routines fails bootefi is not executed.
As currently the registration attempt cannot be unroled any further
bootefi call will fail.

Passing a devicetree to bootefi selftest is enabled and a unit test is
supplied.

This patch series implements some of the ideas of Simon's patch series
	efi: Enable basic sandbox support for EFI loader
	https://lists.denx.de/pipermail/u-boot/2018-February/320845.html
and replaces his patches
	efi: Update efi_smbios_register() to return error code
	efi: Move the init check inside efi_init_obj_list()
	efi: Add error checking for efi_init_obj_list()

The differences are:

Simon's patch series only checks the failure of some initialization
routines while this patch series checks all initialization routines called
in the initialization stage of the EFI subsystem.

Simon's patch series detects an error but does not save the error state.
So the next call of the bootefi command will duplicate handles. With the
current patch series bootefi will return an error with any further call after
a failed initialization.

Simon's patch series does not contain passing a devicetree to bootefi
selftest.

v3
	rebase a patch
	mention fdt address in online help for bootefi selftest
v2
	put existing and new patches into a patch series

Heinrich Schuchardt (11):
  efi_loader: efi_smbios_register should have a return value
  efi_loader: return efi_status_t from efi_gop_register
  efi_loader: return efi_status_t from efi_net_register
  efi_loader: consistently return efi_status_t efi_watchdog_register
  efi_loader: simplify calling efi_init_obj_list
  efi_loader: exit status for efi_reset_system_init
  efi_loader: efi_get_time_init should return status code
  efi_loader: do_bootefi_exec should always return an EFI status code
  efi_loader: check initialization of EFI subsystem is successful
  efi_loader: support device tree for bootefi selftest
  efi_selftest: check installation of the device tree

 arch/arm/cpu/armv8/fsl-layerscape/cpu.c |   4 +-
 arch/arm/mach-bcm283x/reset.c           |   4 +-
 cmd/bootefi.c                           | 186 +++++++++++++++++++------------
 include/efi_loader.h                    |  23 ++--
 lib/efi_loader/efi_boottime.c           |   2 +
 lib/efi_loader/efi_gop.c                |  34 ++++--
 lib/efi_loader/efi_net.c                |  24 ++--
 lib/efi_loader/efi_runtime.c            |  18 ++-
 lib/efi_loader/efi_smbios.c             |  23 ++--
 lib/efi_loader/efi_watchdog.c           |   4 +-
 lib/efi_selftest/Makefile               |   1 +
 lib/efi_selftest/efi_selftest_fdt.c     | 188 ++++++++++++++++++++++++++++++++
 test/py/tests/test_efi_selftest.py      |  14 +++
 13 files changed, 405 insertions(+), 120 deletions(-)
 create mode 100644 lib/efi_selftest/efi_selftest_fdt.c

-- 
2.14.2



More information about the U-Boot mailing list