]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add retry loop around GetMemoryMap call to fix fragmentation bug
authorbcran <bcran@FreeBSD.org>
Wed, 6 Mar 2019 05:39:40 +0000 (05:39 +0000)
committerbcran <bcran@FreeBSD.org>
Wed, 6 Mar 2019 05:39:40 +0000 (05:39 +0000)
commit8347d20afe0a177b2b8ddadbf432a98fff1f556c
tree6dcce17c6e090289b79e78f72e3f2904d8ba171b
parentd06387205a635288ab73b183975bf82e8b6b5675
Add retry loop around GetMemoryMap call to fix fragmentation bug

The call to BS->AllocatePages can cause the memory map to become framented,
causing BS->GetMemoryMap to return EFI_BUFFER_TOO_SMALL more than once. For
example this can happen on the MinnowBoard Turbot, causing the boot to stop
with an error. Avoid this by calling GetMemoryMap in a loop.

Reviewed by: imp, tsoome, kevans
Differential Revision: https://reviews.freebsd.org/D19341
stand/efi/loader/bootinfo.c
stand/efi/loader/copy.c