diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-08-22 09:14:56 +0200 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-08-24 16:37:53 +0200 |
commit | fa63753f86ccf912d2553934ee6aec787030fa8a (patch) | |
tree | 0c2b2f42c7911b8fb6bc220d80bec5ef7838df6e /lib | |
parent | c06867d7f8f64606a16ce45e8ac07fdc3ace4f13 (diff) |
efi_selftest: substitute ResetSystem() by do_reset()
If ResetSystem() is not implemented at runtime, call do_reset() after
test completion.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_selftest/efi_selftest.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/efi_selftest/efi_selftest.c b/lib/efi_selftest/efi_selftest.c index 5b01610eca..6eec8ae2a7 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"); |