Linux 4.8 no longer boots, as it runs out of descriptor space. Readding the mapping allows reuse, and the next AllocatePool will likely not add a new mapping.
Also fix some small issues found while debugging. v2, updated: efi_loader: Fix memory map size check to avoid out-of-bounds access - (Hopefully) clarified commit message efi_loader: Track size of pool allocations to allow freeing - rebased on top of 'efi_loader: Fix crash on 32-bit systems' - assert correct address in efi_free_pool - use EFI_PAGE_MASK instead of 0xfff, EFI_PAGE_SHIFT likewise v3, added: efi_loader: Move efi_allocate_pool implementation to efi_memory.c v3, updated: efi_loader: Fix memory map size check to avoid out-of-bounds access - set descriptor_size/_version even if EFI_BUFFER_TOO_SMALL efi_loader: Track size of pool allocations to allow freeing - use a struct instead of pointer arithmetic, add some comments Stefan Brüns (7): efi_loader: Update description of internal efi_mem_carve_out efi_loader: Fix memory map size check to avoid out-of-bounds access efi_loader: Move efi_allocate_pool implementation to efi_memory.c efi_loader: Track size of pool allocations to allow freeing efi_loader: Readd freed pages to memory pool efi_loader: Keep memory mapping sorted when splitting an entry efi_loader: Do not leak memory when unlinking a mapping include/efi_loader.h | 7 +++- lib/efi_loader/efi_boottime.c | 17 ++++---- lib/efi_loader/efi_memory.c | 92 +++++++++++++++++++++++++++++++++++++------ 3 files changed, 95 insertions(+), 21 deletions(-) -- 2.10.0 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot