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:
@@ -946,7 +946,7 @@ static inline void image_set_name(struct legacy_img_hdr *hdr, const char *name)
|
||||
int image_check_hcrc(const struct legacy_img_hdr *hdr);
|
||||
int image_check_dcrc(const struct legacy_img_hdr *hdr);
|
||||
#ifndef USE_HOSTCC
|
||||
ulong env_get_bootm_low(void);
|
||||
phys_addr_t env_get_bootm_low(void);
|
||||
phys_size_t env_get_bootm_size(void);
|
||||
phys_size_t env_get_bootm_mapsize(void);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user