URL: <http://savannah.gnu.org/bugs/?42996>
Summary: grub_exit to EFI firmware broken for arm/aarch64 Project: GNU GRUB Submitted by: msalter Submitted on: Fri 15 Aug 2014 04:26:11 PM GMT Category: None Severity: Major Priority: 5 - Normal Item Group: Software Error Status: None Privacy: Public Assigned to: None Originator Name: Mark Salter Originator Email: msal...@redhat.com Open/Closed: Open Discussion Lock: Any Release: Release: Git master Reproducibility: Intermittent Planned Release: None _______________________________________________________ Details: For arm/aarch64 EFI, grub2 sets up a periodic timer event with a callback. However, when returning to firmware via grub_exit(), the timer event is left active. This leads to a crash in the firmware. This is easily seen by: 1) Hit 'c' at grub menu to enter grub shell 2) Enter 'exit' The firmware crash is not consistent. It relies on timing and whether or not firmware is reusing memory previously used by grub. There are two parts to a potential fix. One is that grub_machine_fini() for arm has a typo where GRUB_EFI_TIMER_PERIODIC is passed to SetTimer rather than GRUB_EFI_TIMER_CANCEL. I think this is harmless because a subsequent CloseEvent will remove the event anyway. However, grub_machine_fini() never gets called in the EFI grub_exit() path. I think the fix is to call grub_machine_fini() from grub_exit() and let grub_machine_fini() call grub_efi_fini(). Patch attached. _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Fri 15 Aug 2014 04:26:11 PM GMT Name: Fix-exit-EFI-firmware.patch Size: 2kB By: msalter Fix return to EFI for arm/aarch64 machines <http://savannah.gnu.org/bugs/download.php?file_id=31906> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?42996> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-grub mailing list Bug-grub@gnu.org https://lists.gnu.org/mailman/listinfo/bug-grub