public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Subject: [PATCH] Fix for bug in memory sizing code
@ 2012-09-10  6:16 Iwo Mergler
  2012-09-18 19:06 ` Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Iwo Mergler @ 2012-09-10  6:16 UTC (permalink / raw)
  To: u-boot


The original memory sizing code in get_ram_size clobbers the word
at the base address, but forgets to restore it.

Signed-off-by: Iwo Mergler <Iwo.Mergler@netcommwireless.com>
---
 common/memsize.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/common/memsize.c b/common/memsize.c
index 963e4f3..74cf075 100644
--- a/common/memsize.c
+++ b/common/memsize.c
@@ -73,6 +73,7 @@ long get_ram_size(long *base, long maxsize)
 		}
 		return (0);
 	}
+	*addr = save[i];
 
 	for (cnt = 1; cnt < maxsize / sizeof (long); cnt <<= 1) {
 		addr = base + cnt;	/* pointer arith! */
-- 
1.7.4.4

______________________________________________________________________
This communication contains information which may be confidential or privileged. The information is intended solely for the use of the individual or entity named above.  If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited.  If you have received this communication in error, please notify me by telephone immediately.
______________________________________________________________________

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

end of thread, other threads:[~2012-09-21 15:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-10  6:16 [U-Boot] Subject: [PATCH] Fix for bug in memory sizing code Iwo Mergler
2012-09-18 19:06 ` Tom Rini
2012-09-21 11:15   ` Gerlando Falauto
2012-09-21 15:16     ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox