efi_loader: versioning support in GetImageInfo
authorMasahisa Kojima <masahisa.kojima@linaro.org>
Wed, 7 Jun 2023 05:41:53 +0000 (14:41 +0900)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Thu, 8 Jun 2023 07:20:36 +0000 (09:20 +0200)
commit3cba9702d19cb34d26689b1c9180c03b0c73baf8
treefa666f66f83546dce6c4d9587b85eaf13fa8bb57
parentbfaa1fbc62669ac94415f9e36698c534bec29832
efi_loader: versioning support in GetImageInfo

Current FMP->GetImageInfo() always return 0 for the firmware
version, user can not identify which firmware version is currently
running through the EFI interface.

This commit reads the "FmpStateXXXX" EFI variable, then fills the
firmware version in FMP->GetImageInfo().

Now FMP->GetImageInfo() and ESRT have the meaningful version number.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
lib/efi_loader/efi_firmware.c