[PATCH v2 00/17] efi_loader: non-volatile and runtime variables

Heinrich Schuchardt xypron.glpk at gmx.de
Tue Jul 7 05:11:43 CEST 2020


Up to now UEFI variables where stored in U-Boot environment variables.
Saving UEFI variables was not possible without saving the U-Boot
environment variables.

With this patch series file ubootefi.var in the EFI system partition is
used for saving UEFI variables.

Furthermore the UEFI variables are exposed for reading at runtime.

v2:
	Rebase the series to consider OP-TEE based variables and
	authenticated variables.
	Do not enable SetVariable() at runtime as we cannot persist
	non-volatile variables at runtime.
	Display read-only attribute in printenv -e.

Heinrich Schuchardt (17):
  efi_loader: prepare for read only OP-TEE variables
  efi_loader: display RO attribute in printenv -e
  efi_loader: separate UEFI variable API from implemementation
  efi_loader: OsIndicationsSupported, PlatformLangCodes
  efi_loader: simplify boot manager
  efi_loader: keep attributes in efi_set_variable_int
  efi_loader: value of VendorKeys
  efi_loader: read-only AuditMode and DeployedMode
  efi_loader: secure boot flag
  efi_loader: UEFI variable persistence
  efi_loader: export efi_convert_pointer()
  efi_loader: optional pointer for ConvertPointer
  efi_loader: new function efi_memcpy_runtime()
  efi_loader: memory buffer for variables
  efi_loader: use memory based variable storage
  efi_loader: enable UEFI variables at runtime
  efi_selftest: adjust runtime test for variables

 cmd/nvedit_efi.c                              |  24 +-
 doc/api/efi.rst                               |   2 +
 include/efi_api.h                             |   2 +
 include/efi_loader.h                          |   6 +
 include/efi_variable.h                        | 198 +++++
 lib/efi_loader/Kconfig                        |   8 +
 lib/efi_loader/Makefile                       |   3 +
 lib/efi_loader/efi_bootmgr.c                  |  28 +-
 lib/efi_loader/efi_runtime.c                  |  35 +-
 lib/efi_loader/efi_setup.c                    |  59 +-
 lib/efi_loader/efi_var_common.c               | 140 +++
 lib/efi_loader/efi_var_file.c                 | 239 +++++
 lib/efi_loader/efi_var_mem.c                  | 266 ++++++
 lib/efi_loader/efi_variable.c                 | 823 ++++--------------
 lib/efi_loader/efi_variable_tee.c             | 130 +--
 .../efi_selftest_variables_runtime.c          |  13 +-
 16 files changed, 1154 insertions(+), 822 deletions(-)
 create mode 100644 include/efi_variable.h
 create mode 100644 lib/efi_loader/efi_var_common.c
 create mode 100644 lib/efi_loader/efi_var_file.c
 create mode 100644 lib/efi_loader/efi_var_mem.c

--
2.27.0



More information about the U-Boot mailing list