Re: [PATCHv3] x86: EFI stub support for large memory maps

From: Matt Fleming
Date: Wed Sep 25 2013 - 08:58:58 EST


On Sun, 22 Sep, at 07:59:08PM, Linn Crosetto wrote:
> This patch fixes a problem with EFI memory maps larger than 128 entries
> when booting using the EFI stub, which results in overflowing e820_map
> in boot_params and an eventual halt when checking the map size in
> sanitize_e820_map().
>
> If the number of map entries is greater than what can fit in e820_map,
> add the extra entries to the setup_data list using type SETUP_E820_EXT.
> These extra entries are then picked up when the setup_data list is
> parsed in parse_e820_ext().
>
> Signed-off-by: Linn Crosetto <linn@xxxxxx>
> ---
> Changes from v2:
> * Removed unnecessary optimization in alloc_e820ext() (Matt Fleming)
> * Fixed a bug where an incorrect buffer size may be passed to
> get_memory_map when jumping to get_map
>
> arch/x86/boot/compressed/eboot.c | 239 +++++++++++++++++++++++++++------------
> 1 file changed, 167 insertions(+), 72 deletions(-)

Thanks Linn. I applied this to the 'next' branch at,

git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git

but it required a bit of massaging to apply on top of the changes
already there. Could you confirm that my changes are OK? I've included
the modified commit below.

---