]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commit
efi: fix allocation problems if ExitBootServices() fails
authorRoss Lagerwall <ross.lagerwall@citrix.com>
Tue, 2 Jun 2015 11:44:24 +0000 (13:44 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 2 Jun 2015 11:44:24 +0000 (13:44 +0200)
commit8a753b3f1cf5e4714974196df9517849bf174324
tree8bcfdccdb6852f6f1979383d53f3aee19ed94140
parent376bbbabbda607d2039b8f839f15ff02721597d2
efi: fix allocation problems if ExitBootServices() fails

If calling ExitBootServices() fails, the required memory map size may
have increased. When initially allocating the memory map, allocate a
slightly larger buffer (by an arbitrary 8 entries) to fix this.

The ARM code path was already allocating a larger buffer than required,
so this moves the code to be common for all architectures.

This was seen on the following machine when using the iscsidxe UEFI
driver. The machine would consistently fail the first call to
ExitBootServices().
System Information
        Manufacturer: Supermicro
        Product Name: X10SLE-F/HF
BIOS Information
        Vendor: American Megatrends Inc.
        Version: 2.00
        Release Date: 04/24/2014

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roy Franz <roy.franz@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/efi/efi-boot.h
xen/arch/x86/efi/efi-boot.h
xen/common/efi/boot.c