[U-Boot] [PATCH v3 4/7] efi_loader: load saved non-volatile variables at init
AKASHI Takahiro
takahiro.akashi at linaro.org
Tue Jun 4 06:52:08 UTC 2019
Data cache will be read in from persistent storage after (re)boot
to restore UEFI non-volatile variables.
Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
---
lib/efi_loader/efi_setup.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/efi_loader/efi_setup.c b/lib/efi_loader/efi_setup.c
index 8691d686d29d..45d6aca051f3 100644
--- a/lib/efi_loader/efi_setup.c
+++ b/lib/efi_loader/efi_setup.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <bootm.h>
#include <efi_loader.h>
+#include <environment.h>
#define OBJ_LIST_NOT_INITIALIZED 1
@@ -102,6 +103,11 @@ efi_status_t efi_init_obj_list(void)
/* On ARM switch from EL3 or secure mode to EL2 or non-secure mode */
switch_to_non_secure_mode();
+#ifdef CONFIG_EFI_VARIABLE_USE_ENV
+ /* Load non-volatile variables */
+ env_efi_load();
+#endif
+
/* Define supported languages */
ret = efi_init_platform_lang();
if (ret != EFI_SUCCESS)
--
2.21.0
More information about the U-Boot
mailing list