Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 1 | From 5fec641015f8f1ca80f55f05b5e1f67653321303 Mon Sep 17 00:00:00 2001 |
| 2 | From: Vishnu Banavath <vishnu.banavath@arm.com> |
| 3 | Date: Fri, 17 Dec 2021 19:49:02 +0000 |
| 4 | Subject: [PATCH 22/27] efi_loader: populate ESRT table if EFI_ESRT config |
| 5 | option is set |
| 6 | |
| 7 | This change is to call efi_esrt_populate function if CONFIG_EFI_ESRT |
| 8 | is set. This will populte esrt table with firmware image info |
| 9 | |
| 10 | Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com> |
| 11 | Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> |
| 12 | --- |
| 13 | lib/efi_loader/efi_capsule.c | 7 +++++++ |
| 14 | 1 file changed, 7 insertions(+) |
| 15 | |
| 16 | diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c |
| 17 | index 939040d2755e..790d2ba8fe19 100644 |
| 18 | --- a/lib/efi_loader/efi_capsule.c |
| 19 | +++ b/lib/efi_loader/efi_capsule.c |
| 20 | @@ -676,6 +676,13 @@ efi_status_t __efi_runtime EFIAPI efi_update_capsule( |
| 21 | ret = EFI_SUCCESS; |
| 22 | } |
| 23 | |
| 24 | + if (IS_ENABLED(CONFIG_EFI_ESRT)) { |
| 25 | + /* Rebuild the ESRT to reflect any updated FW images. */ |
| 26 | + ret = efi_esrt_populate(); |
| 27 | + if (ret != EFI_SUCCESS) |
| 28 | + log_warning("EFI Capsule: failed to update ESRT\n"); |
| 29 | + } |
| 30 | + |
| 31 | goto out; |
| 32 | #endif |
| 33 | |
| 34 | -- |
| 35 | 2.30.2 |
| 36 | |