[PATCH v4 0/5] FMP versioning support

Masahisa Kojima masahisa.kojima at linaro.org
Thu Mar 23 12:09:00 CET 2023


Firmware version management is not implemented in the current
FMP implementation. This series aims to add the versioning support
in FMP.

EDK II reference implementation utilizes the FMP Payload Header
inserted right before the capsule payload. With this series,
U-Boot also follows the EDK II implementation.

Currently, there is no way to know the current running firmware
version through the EFI interface. FMP->GetImageInfo() returns
always 0 for the version number. So a user can not know that
expected firmware is running after the capsule update.

With this series applied, version number can be specified
in the capsule file generation with mkeficapsule tool, then
user can know the running firmware version through
FMP->GetImageInfo() and ESRT.

Note that this series does not mandate the FMP Payload Header,
compatible with boards that are already using the existing
U-Boot FMP implementation.
If no FMP Payload Header is found in the capsule file, fw_version,
lowest supported version, last attempt version and last attempt
status is set to 0 and this is the same behavior as existing FMP
implementation.

Major Changes in v4:
- add python-based test

Major Changes in v3:
- exclude CONFIG_FWU_MULTI_BANK_UPDATE case

Masahisa Kojima (5):
  efi_loader: store firmware version into FmpState variable
  efi_loader: versioning support in GetImageInfo
  efi_loader: check lowest supported version in capsule update
  mkeficapsule: add FMP Payload Header
  test/py: efi_capsule: test for FMP versioning

 doc/mkeficapsule.1                            |  16 +
 lib/efi_loader/efi_firmware.c                 | 328 ++++++++++++++++--
 test/py/tests/test_efi_capsule/conftest.py    |  58 ++++
 .../test_capsule_firmware_fit.py              | 187 ++++++++++
 .../test_capsule_firmware_raw.py              | 199 +++++++++++
 .../test_capsule_firmware_signed_fit.py       | 159 +++++++++
 .../test_capsule_firmware_signed_raw.py       | 169 +++++++++
 tools/eficapsule.h                            |  31 ++
 tools/mkeficapsule.c                          |  51 ++-
 9 files changed, 1161 insertions(+), 37 deletions(-)

-- 
2.17.1



More information about the U-Boot mailing list