linux/drivers/firmware/efi
Matt Fleming 43a9f69692 Revert "efi/libstub: Call get_memory_map() to obtain map and desc sizes"
This reverts commit d1a8d66b91.

Ard reported a boot failure when running UEFI under Qemu and Xen and
experimenting with various Tianocore build options,

 "As it turns out, when allocating room for the UEFI memory map using
  UEFI's AllocatePool (), it may result in two new memory map entries
  being created, for instance, when using Tianocore's preallocated region
  feature. For example, the following region

  0x00005ead5000-0x00005ebfffff [Conventional Memory|   |  |  |  |  |WB|WT|WC|UC]

  may be split like this

  0x00005ead5000-0x00005eae2fff [Conventional Memory|   |  |  |  |  |WB|WT|WC|UC]
  0x00005eae3000-0x00005eae4fff [Loader Data        |   |  |  |  |  |WB|WT|WC|UC]
  0x00005eae5000-0x00005ebfffff [Conventional Memory|   |  |  |  |  |WB|WT|WC|UC]

  if the preallocated Loader Data region was chosen to be right in the
  middle of the original free space.

  After patch d1a8d66b91 ("efi/libstub: Call get_memory_map() to
  obtain map and desc sizes"), this is not being dealt with correctly
  anymore, as the existing logic to allocate room for a single additional
  entry has become insufficient."

Mark requested to reinstate the old loop we had before commit
d1a8d66b91, which grows the memory map buffer until it's big enough to
hold the EFI memory map.

Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2015-02-18 11:38:13 +00:00
..
libstub Revert "efi/libstub: Call get_memory_map() to obtain map and desc sizes" 2015-02-18 11:38:13 +00:00
cper.c RAS/tracing: Use trace_seq_buffer_ptr() helper instead of open coded 2014-11-19 15:25:37 -05:00
efi-pstore.c efi-pstore: Fix an overflow on 32-bit builds 2014-06-27 07:30:32 +01:00
efi.c * Move efivarfs from the misc filesystem section to pseudo filesystem, 2015-01-29 19:16:40 +01:00
efivars.c efi: Rename efi_guid_unparse to efi_guid_to_str 2015-01-07 19:07:44 -08:00
Kconfig efi: Update the URLs for efibootmgr 2015-01-07 19:06:28 -08:00
Makefile efi/x86: Move x86 back to libstub 2014-11-11 22:23:11 +00:00
reboot.c x86/reboot: Add EFI reboot quirk for ACPI Hardware Reduced flag 2014-07-18 21:23:52 +01:00
runtime-map.c efi: Small leak on error in runtime map code 2015-01-20 15:50:25 +00:00
runtime-wrappers.c efi: Delete the in_nmi() conditional runtime locking 2014-10-03 18:41:03 +01:00
vars.c Merge branch 'next' into efi-next-merge 2014-10-03 22:15:56 +01:00