All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] image: fix getenv_bootm_size() function
@ 2015-12-18  5:17 Masahiro Yamada
  2016-01-08  3:33 ` Simon Glass
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Masahiro Yamada @ 2015-12-18  5:17 UTC (permalink / raw)
  To: u-boot

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>
---

 common/image.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/image.c b/common/image.c
index d63d9e0..f4a1dc8 100644
--- a/common/image.c
+++ b/common/image.c
@@ -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
 }
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-02-08 14:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-18  5:17 [U-Boot] [PATCH] image: fix getenv_bootm_size() function Masahiro Yamada
2016-01-08  3:33 ` Simon Glass
2016-01-14  5:50   ` Masahiro Yamada
2016-01-14 23:12     ` Simon Glass
2016-01-17  1:07       ` Masahiro Yamada
2016-01-19 18:07 ` [U-Boot] " Tom Rini
2016-02-08 14:01 ` [U-Boot] [PATCH] " Hannes Schmelzer
2016-02-08 14:11   ` Matthias Weißer
2016-02-08 14:16     ` Hannes Schmelzer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.