mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
lmb: change the return code on lmb_alloc_addr()
Ben reports a failure to boot the kernel on hardware that starts its physical memory from 0x0. The reason is that lmb_alloc_addr(), which is supposed to reserve a specific address, takes the address as the first argument, but then also returns the address for success or failure and treats 0 as a failure. Since we already know the address change the prototype to return an int. Reported-by: Ben Schneider <ben@bens.haus> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Tested-by: Ben Schneider <ben@bens.haus> Reviewed-by: Sughosh Ganu <sughosh.ganu@linaro.org>
This commit is contained in:
committed by
Tom Rini
parent
244e61fbb7
commit
67be24906f
@@ -491,8 +491,7 @@ efi_status_t efi_allocate_pages(enum efi_allocate_type type,
|
||||
return EFI_NOT_FOUND;
|
||||
|
||||
addr = map_to_sysmem((void *)(uintptr_t)*memory);
|
||||
addr = (u64)lmb_alloc_addr(addr, len, flags);
|
||||
if (!addr)
|
||||
if (lmb_alloc_addr(addr, len, flags))
|
||||
return EFI_NOT_FOUND;
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user