summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-01-09 17:38:26 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-01-09 17:38:26 +0100
commitcc843dadfd757e1b6e081afd90caec784f740542 (patch)
treeae3ae700efd83375ec332657a5badff5a35f9826 /arch
parentf5b8ea7cadeef27817675102bc1ad101d6def9b5 (diff)
parent75889a2900fbbd10ce2212661ed6c4d6a697d483 (diff)
downloadbarebox-cc843dadfd757e1b6e081afd90caec784f740542.tar.gz
barebox-cc843dadfd757e1b6e081afd90caec784f740542.tar.xz
Merge branch 'for-next/efi'
Diffstat (limited to 'arch')
-rw-r--r--arch/efi/efi/efi.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/arch/efi/efi/efi.c b/arch/efi/efi/efi.c
index 7de8ec82e8..c1efe1d8ae 100644
--- a/arch/efi/efi/efi.c
+++ b/arch/efi/efi/efi.c
@@ -248,7 +248,7 @@ console_initcall(efi_console_init);
void reset_cpu(unsigned long addr)
{
- BS->exit(efi_parent_image, EFI_SUCCESS, 0, NULL);
+ RT->reset_system(EFI_RESET_WARM, EFI_SUCCESS, 0, NULL);
while(1);
}
@@ -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