summaryrefslogtreecommitdiff
path: root/fs/ubifs
diff options
context:
space:
mode:
authorBen Dooks <ben.dooks@sifive.com>2023-06-06 09:23:28 +0100
committerHeiko Schocher <hs@denx.de>2023-06-06 10:37:25 +0200
commitb46cec41664f35c689385c70c76d274a059c7251 (patch)
treefcc975cdb0063a87e9e0c53b83857e829286ca60 /fs/ubifs
parent26659d426548d1c395ef878c3b820e53a6e3b346 (diff)
downloadu-boot-b46cec41664f35c689385c70c76d274a059c7251.tar.gz
u-boot-b46cec41664f35c689385c70c76d274a059c7251.tar.bz2
u-boot-b46cec41664f35c689385c70c76d274a059c7251.zip
ubifs: allow loading to above 4GiB
The ubifsload command is truncating any address above 4GiB as it casts this address to an u32, instead of using an unsigned long which most of the other load commands do. Change this to an unsigned long to allow loading into high memory for boards which use these areas. Fixes the following error: => ubifsload 0x2100000000 /boot/Image.lzma Loading file '/boot/Image.lzma' to addr 0x00000000... Unhandled exception: Store/AMO access fault Signed-off-by: Ben Dooks <ben.dooks@sifive.com> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Diffstat (limited to 'fs/ubifs')
-rw-r--r--fs/ubifs/ubifs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index d3026e3101..609bdbf603 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -925,12 +925,12 @@ void ubifs_close(void)
}
/* Compat wrappers for common/cmd_ubifs.c */
-int ubifs_load(char *filename, u32 addr, u32 size)
+int ubifs_load(char *filename, unsigned long addr, u32 size)
{
loff_t actread;
int err;
- printf("Loading file '%s' to addr 0x%08x...\n", filename, addr);
+ printf("Loading file '%s' to addr 0x%08lx...\n", filename, addr);
err = ubifs_read(filename, (void *)(uintptr_t)addr, 0, size, &actread);
if (err == 0) {