|
|
0dc71c |
From a919488cc979e1c4f5bd468bb97c6e9562af0e5a Mon Sep 17 00:00:00 2001
|
|
|
0dc71c |
From: Fedora Ninjas <grub2-owner@fedoraproject.org>
|
|
|
0dc71c |
Date: Fri, 15 Aug 2014 11:29:22 -0400
|
|
|
0dc71c |
Subject: [PATCH] Fix exit back to EFI firmware
|
|
|
0dc71c |
|
|
|
0dc71c |
Arm/AArch64 machines set up a timer event which is not getting
|
|
|
0dc71c |
canceled when returning to firmware. This is because grub_exit()
|
|
|
0dc71c |
calls grub_efi_fini() instead of grub_machine_fini(). The latter
|
|
|
0dc71c |
will shutdown the timer (and other machine-specific things) as
|
|
|
0dc71c |
well as make the call to grub_efi_fini().
|
|
|
0dc71c |
---
|
|
|
0dc71c |
grub-core/kern/arm/efi/init.c | 2 +-
|
|
|
0dc71c |
grub-core/kern/efi/efi.c | 3 ++-
|
|
|
0dc71c |
2 files changed, 3 insertions(+), 2 deletions(-)
|
|
|
0dc71c |
|
|
|
0dc71c |
diff --git a/grub-core/kern/arm/efi/init.c b/grub-core/kern/arm/efi/init.c
|
|
|
0dc71c |
index 0c17d83..06df60e 100644
|
|
|
0dc71c |
--- a/grub-core/kern/arm/efi/init.c
|
|
|
0dc71c |
+++ b/grub-core/kern/arm/efi/init.c
|
|
|
0dc71c |
@@ -67,7 +67,7 @@ grub_machine_fini (int flags)
|
|
|
0dc71c |
|
|
|
0dc71c |
b = grub_efi_system_table->boot_services;
|
|
|
0dc71c |
|
|
|
0dc71c |
- efi_call_3 (b->set_timer, tmr_evt, GRUB_EFI_TIMER_PERIODIC, 0);
|
|
|
0dc71c |
+ efi_call_3 (b->set_timer, tmr_evt, GRUB_EFI_TIMER_CANCEL, 0);
|
|
|
0dc71c |
efi_call_1 (b->close_event, tmr_evt);
|
|
|
0dc71c |
|
|
|
0dc71c |
grub_efi_fini ();
|
|
|
0dc71c |
diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
|
|
|
0dc71c |
index 394e9fd..1e96754 100644
|
|
|
0dc71c |
--- a/grub-core/kern/efi/efi.c
|
|
|
0dc71c |
+++ b/grub-core/kern/efi/efi.c
|
|
|
0dc71c |
@@ -27,6 +27,7 @@
|
|
|
0dc71c |
#include <grub/term.h>
|
|
|
0dc71c |
#include <grub/kernel.h>
|
|
|
0dc71c |
#include <grub/mm.h>
|
|
|
0dc71c |
+#include <grub/loader.h>
|
|
|
0dc71c |
|
|
|
0dc71c |
/* The handle of GRUB itself. Filled in by the startup code. */
|
|
|
0dc71c |
grub_efi_handle_t grub_efi_image_handle;
|
|
|
0dc71c |
@@ -156,7 +157,7 @@ grub_efi_get_loaded_image (grub_efi_handle_t image_handle)
|
|
|
0dc71c |
void
|
|
|
0dc71c |
grub_exit (void)
|
|
|
0dc71c |
{
|
|
|
0dc71c |
- grub_efi_fini ();
|
|
|
0dc71c |
+ grub_machine_fini (GRUB_LOADER_FLAG_NORETURN);
|
|
|
0dc71c |
efi_call_4 (grub_efi_system_table->boot_services->exit,
|
|
|
0dc71c |
grub_efi_image_handle, GRUB_EFI_LOAD_ERROR, 0, 0);
|
|
|
0dc71c |
for (;;) ;
|
|
|
0dc71c |
--
|
|
|
0dc71c |
1.9.3
|
|
|
0dc71c |
|