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