mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
boot: fdt: Change type of env_get_bootm_low() to phys_addr_t
Change type of ulong env_get_bootm_low() to phys_addr_t env_get_bootm_low(). The PPC/LS systems already treat env_get_bootm_low() result as phys_addr_t, while the function itself still returns ulong. This is potentially dangerous on 64bit systems, where ulong might not be large enough to hold the content of "bootm_low" environment variable. Fix it by using phys_addr_t, similar to what env_get_bootm_size() does, which returns phys_size_t . Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
This commit is contained in:
@@ -242,13 +242,13 @@ static int boot_get_kernel(const char *addr_fit, struct bootm_headers *images,
|
||||
#ifdef CONFIG_LMB
|
||||
static void boot_start_lmb(struct bootm_headers *images)
|
||||
{
|
||||
ulong mem_start;
|
||||
phys_addr_t mem_start;
|
||||
phys_size_t mem_size;
|
||||
|
||||
mem_start = env_get_bootm_low();
|
||||
mem_size = env_get_bootm_size();
|
||||
|
||||
lmb_init_and_reserve_range(&images->lmb, (phys_addr_t)mem_start,
|
||||
lmb_init_and_reserve_range(&images->lmb, mem_start,
|
||||
mem_size, NULL);
|
||||
}
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user