Skip to content
Snippets Groups Projects
Commit 7aca68ca authored by Heinrich Schuchardt's avatar Heinrich Schuchardt Committed by Alexander Graf
Browse files

efi_loader: reenable selftest


ad503ffe9c6 efi_loader: refactor boot device and loaded_image handling
leads to an error when building with CONFIG_CMD_BOOTEFI_SELFTEST=y
This patch fixes the problem.

Fixes: ad503ffe9c6 efi_loader: refactor boot device and loaded_image handling
Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: default avatarRob Clark <robdclark@gmail.com>
Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
parent 3a45bc7f
No related branches found
No related tags found
No related merge requests found
...@@ -273,6 +273,12 @@ static int do_bootefi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) ...@@ -273,6 +273,12 @@ static int do_bootefi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#endif #endif
#ifdef CONFIG_CMD_BOOTEFI_SELFTEST #ifdef CONFIG_CMD_BOOTEFI_SELFTEST
if (!strcmp(argv[1], "selftest")) { if (!strcmp(argv[1], "selftest")) {
struct efi_loaded_image loaded_image_info = {};
struct efi_object loaded_image_info_obj = {};
efi_setup_loaded_image(&loaded_image_info,
&loaded_image_info_obj,
bootefi_device_path, bootefi_image_path);
/* /*
* gd lives in a fixed register which may get clobbered while we * gd lives in a fixed register which may get clobbered while we
* execute the payload. So save it here and restore it on every * execute the payload. So save it here and restore it on every
...@@ -282,8 +288,6 @@ static int do_bootefi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) ...@@ -282,8 +288,6 @@ static int do_bootefi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
/* Initialize and populate EFI object list */ /* Initialize and populate EFI object list */
if (!efi_obj_list_initalized) if (!efi_obj_list_initalized)
efi_init_obj_list(); efi_init_obj_list();
loaded_image_info.device_handle = bootefi_device_path;
loaded_image_info.file_path = bootefi_image_path;
return efi_selftest(&loaded_image_info, &systab); return efi_selftest(&loaded_image_info, &systab);
} else } else
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment