From: Heinrich Schuchardt Date: Mon, 18 Jun 2018 15:23:02 +0000 (+0200) Subject: efi_loader: efi_allocate_pages is too restrictive X-Git-Tag: v2018.09-rc1~2^2~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aa909462d01866354f4cd4534db5f571c2cf1fbb;p=platform%2Fkernel%2Fu-boot.git efi_loader: efi_allocate_pages is too restrictive When running on the sandbox the stack is not necessarily at a higher memory address than the highest free memory. There is no reason why the checking of the highest memory address should be more restrictive for EFI_ALLOCATE_ANY_PAGES than for EFI_ALLOCATE_MAX_ADDRESS. Signed-off-by: Heinrich Schuchardt [agraf: use -1ULL instead] Signed-off-by: Alexander Graf --- diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c index ec66af9..ce29bcc 100644 --- a/lib/efi_loader/efi_memory.c +++ b/lib/efi_loader/efi_memory.c @@ -295,7 +295,7 @@ efi_status_t efi_allocate_pages(int type, int memory_type, switch (type) { case EFI_ALLOCATE_ANY_PAGES: /* Any page */ - addr = efi_find_free_memory(len, gd->start_addr_sp); + addr = efi_find_free_memory(len, -1ULL); if (!addr) { r = EFI_NOT_FOUND; break;