]> git.dujemihanovic.xyz Git - u-boot.git/commit
efi_loader: Don't allocate from memory holes
authorAlexander Graf <agraf@suse.de>
Fri, 27 May 2016 10:25:03 +0000 (12:25 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 6 Jun 2016 17:39:16 +0000 (13:39 -0400)
commit74c16acce30bb882ad5951829d8dafef8eea564c
tree18a4e5950d4b8f0b9971a46e037630a90914f2d3
parentedcef3ba1d2d5beb92fcd7df253e196e77ba174d
efi_loader: Don't allocate from memory holes

When a payload calls our memory allocator with the exact address hint, we
happily allocate memory from completely unpopulated regions. Payloads however
expect this to only succeed if they would be allocating from free conventional
memory.

This patch makes the logic behind those checks a bit more obvious and ensures
that we always allocate from known good free conventional memory regions if we
want to allocate ram.

Reported-by: Jonathan Gray <jsg@jsg.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
lib/efi_loader/efi_memory.c