blob: 31c19e141744c71048c9bf49b5100d0fd5e51e6d [file] [log] [blame]
Patrick Williams44b3caf2024-04-12 16:51:14 -05001From a368e6a94382bb88f3603107d14ff3af0fb4eaa2 Mon Sep 17 00:00:00 2001
Patrick Williams92b42cb2022-09-03 06:53:57 -05002From: Vishnu Banavath <vishnu.banavath@arm.com>
3Date: Fri, 17 Dec 2021 19:49:02 +0000
Patrick Williams44b3caf2024-04-12 16:51:14 -05004Subject: [PATCH] efi_loader: populate ESRT table if EFI_ESRT config option is
5 set
Patrick Williams92b42cb2022-09-03 06:53:57 -05006
7This change is to call efi_esrt_populate function if CONFIG_EFI_ESRT
8is set. This will populte esrt table with firmware image info
9
10Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
11Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Patrick Williams8dd68482022-10-04 07:57:18 -050012Upstream-Status: Pending [Not submitted to upstream yet]
Patrick Williams92b42cb2022-09-03 06:53:57 -050013---
14 lib/efi_loader/efi_capsule.c | 7 +++++++
15 1 file changed, 7 insertions(+)
16
17diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c
Patrick Williams2a254922023-08-11 09:48:11 -050018index 5314f529b4..6a06605ad9 100644
Patrick Williams92b42cb2022-09-03 06:53:57 -050019--- a/lib/efi_loader/efi_capsule.c
20+++ b/lib/efi_loader/efi_capsule.c
Patrick Williams2a254922023-08-11 09:48:11 -050021@@ -874,6 +874,13 @@ efi_status_t __efi_runtime EFIAPI efi_update_capsule(
Patrick Williams92b42cb2022-09-03 06:53:57 -050022 ret = EFI_SUCCESS;
23 }
24
25+ if (IS_ENABLED(CONFIG_EFI_ESRT)) {
26+ /* Rebuild the ESRT to reflect any updated FW images. */
27+ ret = efi_esrt_populate();
28+ if (ret != EFI_SUCCESS)
29+ log_warning("EFI Capsule: failed to update ESRT\n");
30+ }
31+
32 goto out;
33 #endif
34