summaryrefslogtreecommitdiffstats
path: root/arch/efi
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2014-12-08 14:42:30 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2014-12-09 09:59:09 +0100
commit23746e7e027689c22eaafaea27743b8756e7de8c (patch)
tree2f79c63d1c253752e102b40a8662fbdc52ce66c5 /arch/efi
parente4f3215be242c86080e0355b36a3d236b26db8fc (diff)
downloadbarebox-23746e7e027689c22eaafaea27743b8756e7de8c.tar.gz
barebox-23746e7e027689c22eaafaea27743b8756e7de8c.tar.xz
efi: move exit to EFI into own command
Adds a command to drop back into the calling EFI process. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/efi')
-rw-r--r--arch/efi/efi/efi.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/efi/efi/efi.c b/arch/efi/efi/efi.c
index af3fc4366..c1efe1d8a 100644
--- a/arch/efi/efi/efi.c
+++ b/arch/efi/efi/efi.c
@@ -341,3 +341,19 @@ efi_status_t efi_main(efi_handle_t image, efi_system_table_t *sys_table)
return EFI_SUCCESS;
}
+
+static int do_efiexit(int argc, char *argv[])
+{
+ return BS->exit(efi_parent_image, EFI_SUCCESS, 0, NULL);
+}
+
+BAREBOX_CMD_HELP_START(efiexit)
+BAREBOX_CMD_HELP_TEXT("Leave barebox and return to the calling EFI process\n")
+BAREBOX_CMD_HELP_END
+
+BAREBOX_CMD_START(efiexit)
+ .cmd = do_efiexit,
+ BAREBOX_CMD_DESC("Usage: efiexit")
+ BAREBOX_CMD_GROUP(CMD_GRP_MISC)
+ BAREBOX_CMD_HELP(cmd_efiexit_help)
+BAREBOX_CMD_END