mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
image: fix getenv_bootm_size() function
Currently, this function returns wrong size if "bootm_low" is defined, but "bootm_size" is not. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
b57843e688
commit
9c11135ce0
1 changed files with 2 additions and 2 deletions
|
@ -472,9 +472,9 @@ phys_size_t getenv_bootm_size(void)
|
|||
|
||||
|
||||
#if defined(CONFIG_ARM) && defined(CONFIG_NR_DRAM_BANKS)
|
||||
return gd->bd->bi_dram[0].size - tmp;
|
||||
return gd->bd->bi_dram[0].size - (tmp - gd->bd->bi_dram[0].start);
|
||||
#else
|
||||
return gd->bd->bi_memsize - tmp;
|
||||
return gd->bd->bi_memsize - (tmp - gd->bd->bi_memstart);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue