aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2017-10-18 18:13:09 +0200
committerAlexander Graf <agraf@suse.de>2017-12-01 13:22:55 +0100
commitf972dc14011115371d9e5681262a9ed180a5d686 (patch)
treefe12db9456f0f0d26fc346479de7cb30078e763c /cmd
parent3eb0841be730b0ca38f37ee9d17b252e0a73c19b (diff)
downloadu-boot-f972dc14011115371d9e5681262a9ed180a5d686.zip
u-boot-f972dc14011115371d9e5681262a9ed180a5d686.tar.gz
u-boot-f972dc14011115371d9e5681262a9ed180a5d686.tar.bz2
efi_selftest: provide a dummy device path
Currently we pass bootefi_device_path and bootefi_image_path as device and image path without initializing them. They may carry values from previous calls to bootefi. With the patch the variables are initialized valid dummy values. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/bootefi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index 43ecdb9..4935173 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -299,6 +299,12 @@ static int do_bootefi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
struct efi_loaded_image loaded_image_info = {};
struct efi_object loaded_image_info_obj = {};
+ /* Construct a dummy device path. */
+ bootefi_device_path = efi_dp_from_mem(EFI_RESERVED_MEMORY_TYPE,
+ (uintptr_t)&efi_selftest,
+ (uintptr_t)&efi_selftest);
+ bootefi_image_path = efi_dp_from_file(NULL, 0, "\\selftest");
+
efi_setup_loaded_image(&loaded_image_info,
&loaded_image_info_obj,
bootefi_device_path, bootefi_image_path);