summaryrefslogtreecommitdiff
path: root/cmd/bootefi.c
diff options
context:
space:
mode:
authorAKASHI Takahiro <takahiro.akashi@linaro.org>2019-04-19 12:22:32 +0900
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2019-04-23 00:37:28 +0200
commitcc999d58e305d9dd8987fd154d592e93c8cfe3ee (patch)
treeeec521207cf1827c5bcf437099d03c3fec3e91dd /cmd/bootefi.c
parent3fc2b16335721520c0c6e3f57235efa98f0519f0 (diff)
downloadu-boot-cc999d58e305d9dd8987fd154d592e93c8cfe3ee.tar.gz
u-boot-cc999d58e305d9dd8987fd154d592e93c8cfe3ee.tar.bz2
u-boot-cc999d58e305d9dd8987fd154d592e93c8cfe3ee.zip
cmd: bootefi: move do_bootefi_bootmgr_exec() forward
This is a preparatory patch for reworking do_bootefi() in later patch. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'cmd/bootefi.c')
-rw-r--r--cmd/bootefi.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index c73175e0ed..985ad48fde 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -329,6 +329,27 @@ err_add_protocol:
return ret;
}
+static int do_bootefi_bootmgr_exec(void)
+{
+ struct efi_device_path *device_path, *file_path;
+ void *addr;
+ efi_status_t r;
+
+ addr = efi_bootmgr_load(&device_path, &file_path);
+ if (!addr)
+ return 1;
+
+ printf("## Starting EFI application at %p ...\n", addr);
+ r = do_bootefi_exec(addr, device_path, file_path);
+ printf("## Application terminated, r = %lu\n",
+ r & ~EFI_ERROR_MASK);
+
+ if (r != EFI_SUCCESS)
+ return 1;
+
+ return 0;
+}
+
#ifdef CONFIG_CMD_BOOTEFI_SELFTEST
static efi_status_t bootefi_run_prepare(const char *load_options_path,
struct efi_device_path *device_path,
@@ -452,27 +473,6 @@ static int do_efi_selftest(const char *fdt_opt)
}
#endif /* CONFIG_CMD_BOOTEFI_SELFTEST */
-static int do_bootefi_bootmgr_exec(void)
-{
- struct efi_device_path *device_path, *file_path;
- void *addr;
- efi_status_t r;
-
- addr = efi_bootmgr_load(&device_path, &file_path);
- if (!addr)
- return 1;
-
- printf("## Starting EFI application at %p ...\n", addr);
- r = do_bootefi_exec(addr, device_path, file_path);
- printf("## Application terminated, r = %lu\n",
- r & ~EFI_ERROR_MASK);
-
- if (r != EFI_SUCCESS)
- return 1;
-
- return 0;
-}
-
/* Interpreter command to boot an arbitrary EFI image from memory */
static int do_bootefi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{