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

Submitted by:  Mark Salter <msalter>
Submitted on:  Fri 15 Aug 2014 04:26:11 PM UTC  
 
Category: NoneSeverity: Major
Priority: 5 - NormalItem Group: Software Error
Status: FixedPrivacy: Public
Assigned to: NoneOriginator Name: Mark Salter
Open/Closed: ClosedRelease: 
Release: Git masterReproducibility: Intermittent
Planned Release: None

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

Applied. Thanks!

Andrei Borzenkov <arvidjaar>
Project 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>

 

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
  • -unavailable- added by arvidjaar (Posted a comment)
  • -unavailable- added by msalter (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 12 Jun 2015 10:10:38 AM UTCarvidjaarStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Fri 15 Aug 2014 04:26:11 PM UTCmsalterAttached File-=>Added Fix-exit-EFI-firmware.patch, #31906

    Back to the top


    Powered by Savane 3.1-cleanup1