The handle of a loaded image is the value of the handle
member of the loaded image info object and not the
address of the loaded image info.
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
dcache_disable(); /* flush cache before switch to EL2 */
/* Move into EL2 and keep running there */
dcache_disable(); /* flush cache before switch to EL2 */
/* Move into EL2 and keep running there */
- armv8_switch_to_el2((ulong)entry, (ulong)&loaded_image_info,
+ armv8_switch_to_el2((ulong)entry,
+ (ulong)&loaded_image_info_obj.handle,
(ulong)&systab, 0, (ulong)efi_run_in_el2,
ES_TO_AARCH64);
(ulong)&systab, 0, (ulong)efi_run_in_el2,
ES_TO_AARCH64);
- ret = efi_do_enter(&loaded_image_info, &systab, entry);
+ ret = efi_do_enter(loaded_image_info_obj.handle, &systab, entry);
exit:
/* image has returned, loaded-image obj goes *poof*: */
exit:
/* image has returned, loaded-image obj goes *poof*: */
/* Transfer environment variable efi_selftest as load options */
set_load_options(&loaded_image_info, "efi_selftest");
/* Execute the test */
/* Transfer environment variable efi_selftest as load options */
set_load_options(&loaded_image_info, "efi_selftest");
/* Execute the test */
- r = efi_selftest(&loaded_image_info, &systab);
+ r = efi_selftest(loaded_image_info_obj.handle, &systab);
efi_restore_gd();
free(loaded_image_info.load_options);
list_del(&loaded_image_info_obj.link);
efi_restore_gd();
free(loaded_image_info.load_options);
list_del(&loaded_image_info_obj.link);
info->system_table = &systab;
info->parent_handle = parent_image;
info->system_table = &systab;
info->parent_handle = parent_image;
+ *image_handle = obj->handle;
return EFI_EXIT(EFI_SUCCESS);
}
return EFI_EXIT(EFI_SUCCESS);
}