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