Andrew Geissler | ea144b03 | 2023-01-27 16:03:57 -0600 | [diff] [blame^] | 1 | From 41a2c8bb23e587e9abe7b8bc62db1a93c0e5d841 Mon Sep 17 00:00:00 2001 |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 2 | From: Vishnu Banavath <vishnu.banavath@arm.com> |
| 3 | Date: Fri, 17 Dec 2021 19:49:02 +0000 |
Andrew Geissler | ea144b03 | 2023-01-27 16:03:57 -0600 | [diff] [blame^] | 4 | Subject: [PATCH 16/25] efi_loader: populate ESRT table if EFI_ESRT config |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 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> |
Patrick Williams | 8dd6848 | 2022-10-04 07:57:18 -0500 | [diff] [blame] | 12 | Upstream-Status: Pending [Not submitted to upstream yet] |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 13 | --- |
| 14 | lib/efi_loader/efi_capsule.c | 7 +++++++ |
| 15 | 1 file changed, 7 insertions(+) |
| 16 | |
| 17 | diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c |
Andrew Geissler | ea144b03 | 2023-01-27 16:03:57 -0600 | [diff] [blame^] | 18 | index 0eee3c2d4c..94dc0dfe3d 100644 |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 19 | --- a/lib/efi_loader/efi_capsule.c |
| 20 | +++ b/lib/efi_loader/efi_capsule.c |
Patrick Williams | 8dd6848 | 2022-10-04 07:57:18 -0500 | [diff] [blame] | 21 | @@ -668,6 +668,13 @@ efi_status_t __efi_runtime EFIAPI efi_update_capsule( |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 22 | 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 Williams | 8dd6848 | 2022-10-04 07:57:18 -0500 | [diff] [blame] | 36 | 2.17.1 |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 37 | |