blob: 3cedaa7a2d83233ecf0302eb725a436f2a3d2e57 [file] [log] [blame]
Patrick Williams8dd68482022-10-04 07:57:18 -05001From 720e5ada733b0f7b019baaec57d74603a9dff67e 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 Williams8dd68482022-10-04 07:57:18 -05004Subject: [PATCH 22/26] efi_loader: populate ESRT table if EFI_ESRT config
Patrick Williams92b42cb2022-09-03 06:53:57 -05005 option is set
6
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 Williams8dd68482022-10-04 07:57:18 -050018index 5db9d30d53..65e2fc8296 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 Williams8dd68482022-10-04 07:57:18 -050021@@ -668,6 +668,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
35--
Patrick Williams8dd68482022-10-04 07:57:18 -0500362.17.1
Patrick Williams92b42cb2022-09-03 06:53:57 -050037