[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #36532] boot in EFI mode (x86_64) fails on some systems
From: |
stuart hayes |
Subject: |
[bug #36532] boot in EFI mode (x86_64) fails on some systems |
Date: |
Wed, 23 May 2012 19:33:11 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 |
URL:
<http://savannah.gnu.org/bugs/?36532>
Summary: boot in EFI mode (x86_64) fails on some systems
Project: GNU GRUB
Submitted by: stuart_hayes
Submitted on: Wed 23 May 2012 07:33:10 PM GMT
Category: Booting
Severity: Major
Priority: 5 - Normal
Item Group: Software Error
Status: None
Privacy: Public
Assigned to: None
Originator Name: stuart_hayes
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release:
Release: other
Reproducibility: Every Time
Planned Release: None
_______________________________________________________
Details:
Grub v 1.99 is failing to boot on certain systems in EFI mode.
This was discovered on some Dell 12G server systems (the PowerEdge R720, for
example), using Ubuntu 12.04, but the issue was reproduced with vanilla grub
1.99. Some systems will boot under certain circumstances (I have one R720
that will boot if I hit "F11" to go into a UEFI boot menu and then boot, but
not if the system tries to boot with no manual intervention), other systems
will not boot at all.
The problem is that grub2 is failing to get the EFI memory map in
grub-core/loader/i386/linux.c, when it calls grub_efi_finish_boot_services(),
because the buffer it allocated for the EFI memory map earlier in
allocate_pages() (in the same file) is not big enough. (The EFI memory map
has grown considerably--like 50000 bytes or so--between the time that the
efi_mmap_buf was set up in allocate_pages() and the time it is used in
grub_efi_finish_boot_services()).
When allocate_pages() runs, it really has no way to know how large the EFI
memory map will be when it needs that buffer. Also, the EFI memory map does
not need to be at an address under 1MB, either.
I've made a patch that modifies allocate_pages() so that it no longer
allocates a buffer for the EFI memory map. Instead, the buffer is allocated
right before the call to grub_efi_finish_boot_services() in grub-linux_boot(),
and it tries to put it at the top of memory (or just below the initrd, if one
is loaded).
I have verified that this fixes the issue on my systems.
I'm attaching the patch.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Wed 23 May 2012 07:33:10 PM GMT Name:
grub-1.99-upstream_efimm_late_malloc_3.patch Size: 6kB By: stuart_hayes
patch to allocate EFI mmap buffer later
<http://savannah.gnu.org/bugs/download.php?file_id=25912>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?36532>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #36532] boot in EFI mode (x86_64) fails on some systems,
stuart hayes <=