bugGNU GRUB - Bugs: bug #42996, grub_exit to EFI firmware broken...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

Submitter:  Mark Salter <msalter>
Submitted:  Fri 15 Aug 2014 04:26:11 PM UTC
   
 
Category:  None Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  Fixed Privacy:  Public
Assigned to:  None Originator Name:  Mark Salter
Open/Closed:  Closed Release:  Git master
Release:  Reproducibility:  Intermittent
Planned Release:  None

Fri 12 Jun 2015 10:10:38 AM UTC, comment #1: 

Applied. Thanks!

Andrei Borzenkov <arvidjaar>
Group Member
Fri 15 Aug 2014 04:26:11 PM UTC, original submission:  

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.

Mark Salter <msalter>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #31906:  Fix-exit-EFI-firmware.patch added by msalter (2KiB - text/x-patch - Fix return to EFI for arm/aarch64 machines)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by arvidjaar (Posted a comment)
  • -email is unavailable- added by msalter (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-06-12 arvidjaar StatusNone Fixed
        Open/ClosedOpen Closed
    2014-08-15 msalter Attached File- Added Fix-exit-EFI-firmware.patch, #31906

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code