summaryrefslogtreecommitdiff
path: root/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0014-efi_loader-populate-ESRT-table-if-EFI_ESRT-config-op.patch
blob: c0b3fa82a4ad527a322fcafc421546eb80c0fe84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From bb0eb602d3697384318cac90605259aa7fb21c9b Mon Sep 17 00:00:00 2001
From: Vishnu Banavath <vishnu.banavath@arm.com>
Date: Fri, 17 Dec 2021 19:49:02 +0000
Subject: [PATCH 14/33] efi_loader: populate ESRT table if EFI_ESRT config
 option is set

This change is to call efi_esrt_populate function if CONFIG_EFI_ESRT
is set. This will populte esrt table with firmware image info

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Upstream-Status: Pending [Not submitted to upstream yet]
---
 lib/efi_loader/efi_capsule.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c
index 5314f529b4..6a06605ad9 100644
--- a/lib/efi_loader/efi_capsule.c
+++ b/lib/efi_loader/efi_capsule.c
@@ -874,6 +874,13 @@ efi_status_t __efi_runtime EFIAPI efi_update_capsule(
 			ret = EFI_SUCCESS;
 		}
 
+		if (IS_ENABLED(CONFIG_EFI_ESRT)) {
+			/* Rebuild the ESRT to reflect any updated FW images. */
+			ret = efi_esrt_populate();
+	               if (ret != EFI_SUCCESS)
+				log_warning("EFI Capsule: failed to update ESRT\n");
+	       }
+
 		goto out;
 #endif
 
-- 
2.25.1