From b8496cced856ff411f1eb2e4eff20f5abe7080b0 Mon Sep 17 00:00:00 2001 From: Iwo Mergler Date: Sun, 9 Sep 2012 20:16:58 +0000 Subject: [PATCH] memsize: Fix for bug in memory sizing code 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 --- common/memsize.c | 1 + 1 file changed, 1 insertion(+) 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! */ -- 2.7.4