On Tue, Aug 29, 2017 at 06:00:35PM +0200, Alexander Graf wrote:
When we exit grub, we don't free all the memory that we allocated earlier
for our heap region. This can cause problems with setups where you try
to descend the boot order using "exit" entries, such as PXE -> HD boot
scenarios.
Signed-off-by: Alexander Graf <address@hidden>
Really happy to see this, but repeating a comment here from irc:
This deals with the biggest problem with returning to UEFI - GRUB
allocates 25% of available RAM, which before this patch we don't
release. However, various operations may allocate EFI memory directly,
and those allocations are not currently being tracked.
If further allocations could be tracked from
grub_efi_allocate_pages_real, these could be unwound in
_memory_fini(). Those can safely be allocated from the heap.