From: AKASHI Takahiro Date: Thu, 29 Oct 2020 04:47:45 +0000 (+0900) Subject: efi_loader: add option to initialise EFI subsystem early X-Git-Url: http://git.dujemihanovic.xyz/img/sics.gif?a=commitdiff_plain;h=c57c9439548a58a0c1f0eb2ec7b5ab5d7b7fd801;p=u-boot.git efi_loader: add option to initialise EFI subsystem early If this option, CONFIG_EFI_SETUP_EARLY, is enabled, the initialisation of UEFI subsystem will be done as part of U-Boot initialisation. Please note that this option won't be enabled explicitly by users, instead, should be enabled implicitly by other configuration options. Specifically, this feature will be utilised in implementing capsule-on-disk feature. Signed-off-by: AKASHI Takahiro Reviewed-by: Heinrich Schuchardt --- diff --git a/common/board_r.c b/common/board_r.c index b9217b2e27..2212d981e5 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -73,6 +73,9 @@ #if defined(CONFIG_GPIO_HOG) #include #endif +#ifdef CONFIG_EFI_SETUP_EARLY +#include +#endif DECLARE_GLOBAL_DATA_PTR; @@ -889,6 +892,9 @@ static init_fnc_t init_sequence_r[] = { #endif #if defined(CONFIG_PRAM) initr_mem, +#endif +#ifdef CONFIG_EFI_SETUP_EARLY + (init_fnc_t)efi_init_obj_list, #endif run_main_loop, }; diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig index ab42f3ba75..075481428c 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -27,6 +27,10 @@ config EFI_LOADER if EFI_LOADER +config EFI_SETUP_EARLY + bool + default n + choice prompt "Store for non-volatile UEFI variables" default EFI_VARIABLE_FILE_STORE