summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2018-12-26 13:28:09 +0100
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2019-02-16 15:42:20 +0100
commitf69d63fae281ba98c3d063097cf4e95d17f3754d (patch)
tree5788ca3b88e41bfc754a5a8b7102903d4c00bd99 /cmd
parent8f7e2b2980a2d964db60a19a5d2ef8532caddf7d (diff)
downloadu-boot-f69d63fae281ba98c3d063097cf4e95d17f3754d.tar.gz
efi_loader: use efi_start_image() for bootefi
Remove the duplicate code in efi_do_enter() and use efi_start_image() to start the image invoked by the bootefi command. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/bootefi.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index 7f9913c0ee..a2d38256e9 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -133,20 +133,6 @@ done:
return ret;
}
-static efi_status_t efi_do_enter(
- efi_handle_t image_handle, struct efi_system_table *st,
- EFIAPI efi_status_t (*entry)(
- efi_handle_t image_handle,
- struct efi_system_table *st))
-{
- efi_status_t ret = EFI_LOAD_ERROR;
-
- if (entry)
- ret = entry(image_handle, st);
- st->boottime->exit(image_handle, ret, 0, NULL);
- return ret;
-}
-
/*
* efi_carve_out_dt_rsv() - Carve out DT reserved memory ranges
*
@@ -315,13 +301,7 @@ static efi_status_t do_bootefi_exec(void *efi,
/* Call our payload! */
debug("%s: Jumping to 0x%p\n", __func__, image_obj->entry);
-
- if (setjmp(&image_obj->exit_jmp)) {
- ret = image_obj->exit_status;
- goto err_prepare;
- }
-
- ret = efi_do_enter(&image_obj->header, &systab, image_obj->entry);
+ ret = EFI_CALL(efi_start_image(&image_obj->header, NULL, NULL));
err_prepare:
/* image has returned, loaded-image obj goes *poof*: */