summaryrefslogtreecommitdiff
path: root/lib/efi_selftest/efi_selftest.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-08-24 17:28:18 -0400
committerTom Rini <trini@konsulko.com>2020-08-24 17:28:18 -0400
commit3c0cec035e5b06b638fb52ccd7383bbd5bcede35 (patch)
tree5dfb658a5a4376ab257dfccdbc51f2e301fd0256 /lib/efi_selftest/efi_selftest.c
parent1aa3966173fe92fa3c46638ee8eb8b8491f521d6 (diff)
parent2b3fbcb59f4174e455a6285eaddf1426ed3e76c5 (diff)
Merge tag 'efi-2020-10-rc3-3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for UEFI sub-system for efi-2020-10-rc3 (3) The following bug fixes are contained in this pull-request: * ResetSystem() should no hang if not implemented. * Device paths in Bootxxxx variables should be verified. * Use ':' as separator for command setenv -e -i instead of ','. * Correct comments for functions. * Update UEFI documentation.
Diffstat (limited to 'lib/efi_selftest/efi_selftest.c')
-rw-r--r--lib/efi_selftest/efi_selftest.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/efi_selftest/efi_selftest.c b/lib/efi_selftest/efi_selftest.c
index 5b01610eca1..6eec8ae2a7c 100644
--- a/lib/efi_selftest/efi_selftest.c
+++ b/lib/efi_selftest/efi_selftest.c
@@ -5,6 +5,7 @@
* Copyright (c) 2017 Heinrich Schuchardt <xypron.glpk@gmx.de>
*/
+#include <command.h>
#include <efi_selftest.h>
#include <vsprintf.h>
@@ -309,8 +310,13 @@ efi_status_t EFIAPI efi_selftest(efi_handle_t image_handle,
/* Reset system */
efi_st_printf("Preparing for reset. Press any key...\n");
efi_st_get_key();
- runtime->reset_system(EFI_RESET_WARM, EFI_NOT_READY,
- sizeof(reset_message), reset_message);
+
+ if (IS_ENABLED(CONFIG_EFI_HAVE_RUNTIME_RESET))
+ runtime->reset_system(EFI_RESET_WARM, EFI_NOT_READY,
+ sizeof(reset_message), reset_message);
+ else
+ do_reset(NULL, 0, 0, NULL);
+
efi_st_printf("\n");
efi_st_error("Reset failed\n");