efi_loader: Handle memory overflows
authorAndreas Färber <afaerber@suse.de>
Wed, 13 Apr 2016 12:04:38 +0000 (14:04 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 18 Apr 2016 21:11:44 +0000 (17:11 -0400)
commitdede284d1ce9f9d9e79a5114fe7eb814fec07679
tree0f848f40edaebab76bb7e57861d58494671d51c6
parentbd716dd03d8f22fe91924e43f4d1f69733570e60
efi_loader: Handle memory overflows

jetson-tk1 has 2 GB of RAM at 0x80000000, causing gd->ram_top to be zero.
Handle this by either avoiding ram_top or by using the same type as
ram_top to reverse the overflow effect.

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Alexander Graf <agraf@suse.de>
lib/efi_loader/efi_memory.c