bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #42996] grub_exit to EFI firmware broken for arm/aarch64


From: Mark Salter
Subject: [bug #42996] grub_exit to EFI firmware broken for arm/aarch64
Date: Fri, 15 Aug 2014 16:26:12 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0

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: address@hidden
             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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]