Commit 5bf12a78 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt 💬

efi_selftest: restore gd before do_reset()

Before calling do_reset() in the EFI selftest we must restore the global
data pointer.

Fixes: fa63753f ("efi_selftest: substitute ResetSystem() by do_reset()")
Signed-off-by: Heinrich Schuchardt's avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
parent d68d7f47
......@@ -311,11 +311,13 @@ efi_status_t EFIAPI efi_selftest(efi_handle_t image_handle,
efi_st_printf("Preparing for reset. Press any key...\n");
efi_st_get_key();
if (IS_ENABLED(CONFIG_EFI_HAVE_RUNTIME_RESET))
if (IS_ENABLED(CONFIG_EFI_HAVE_RUNTIME_RESET)) {
runtime->reset_system(EFI_RESET_WARM, EFI_NOT_READY,
sizeof(reset_message), reset_message);
else
} else {
efi_restore_gd();
do_reset(NULL, 0, 0, NULL);
}
efi_st_printf("\n");
efi_st_error("Reset failed\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment