aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut+renesas@mailbox.org>2024-03-26 23:13:11 +0100
committerTom Rini <trini@konsulko.com>2024-04-11 09:38:57 -0600
commita4df06e41fa29ebc2b31b15ae229b2273af69fa6 (patch)
tree16252c9d012f367b0b660d4ad5224eff48a733f1 /include
parentd545fe3b82ca319f699abb40f59f7ab5f8116de5 (diff)
downloadu-boot-a4df06e41fa29ebc2b31b15ae229b2273af69fa6.zip
u-boot-a4df06e41fa29ebc2b31b15ae229b2273af69fa6.tar.gz
u-boot-a4df06e41fa29ebc2b31b15ae229b2273af69fa6.tar.bz2
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>
Diffstat (limited to 'include')
-rw-r--r--include/image.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/image.h b/include/image.h
index 21de70f..acffd17 100644
--- a/include/image.h
+++ b/include/image.h
@@ -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