From patchwork Wed Jun 17 02:55:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 242555 List-Id: U-Boot discussion From: takahiro.akashi at linaro.org (AKASHI Takahiro) Date: Wed, 17 Jun 2020 11:55:04 +0900 Subject: [PATCH v2 06/17] efi_loader: add option to initialise EFI subsystem early In-Reply-To: <20200617025515.23585-1-takahiro.akashi@linaro.org> References: <20200617025515.23585-1-takahiro.akashi@linaro.org> Message-ID: <20200617025515.23585-7-takahiro.akashi@linaro.org> 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 --- common/board_r.c | 6 ++++++ lib/efi_loader/Kconfig | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/common/board_r.c b/common/board_r.c index fa57fa9b6993..dcb8c6f79d2f 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -68,6 +68,9 @@ #if defined(CONFIG_GPIO_HOG) #include #endif +#ifdef CONFIG_EFI_SETUP_EARLY +#include +#endif DECLARE_GLOBAL_DATA_PTR; @@ -858,6 +861,9 @@ static init_fnc_t init_sequence_r[] = { #endif #if defined(CONFIG_M68K) && defined(CONFIG_BLOCK_CACHE) blkcache_init, +#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 aad37b715505..37034894870e 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -25,6 +25,10 @@ config EFI_LOADER if EFI_LOADER +config EFI_SETUP_EARLY + bool + default n + config EFI_GET_TIME bool "GetTime() runtime service" depends on DM_RTC