summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2017-09-20 20:54:58 (GMT)
committerAlexander Graf <agraf@suse.de>2017-09-20 21:34:41 (GMT)
commit7aca68ca06b8a96cb71f690e24f990281e402be8 (patch)
tree071d15fadf40a24e14124d0f3067d5f6e116d5ab /cmd
parent3a45bc7faa5f93513369fc4447db2c379c19b2ca (diff)
downloadu-boot-7aca68ca06b8a96cb71f690e24f990281e402be8.tar.xz
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: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/bootefi.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index 1e2dbcc..e0a6573 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -273,6 +273,12 @@ static int do_bootefi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#endif
#ifdef CONFIG_CMD_BOOTEFI_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
* 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[])
/* Initialize and populate EFI object list */
if (!efi_obj_list_initalized)
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);
} else
#endif