Sfoglia il codice sorgente

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 <Iwo.Mergler@netcommwireless.com>
Iwo Mergler 12 anni fa
parent
commit
b8496cced8
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      common/memsize.c

+ 1 - 0
common/memsize.c

@@ -73,6 +73,7 @@ long get_ram_size(long *base, long maxsize)
 		}
 		}
 		return (0);
 		return (0);
 	}
 	}
+	*addr = save[i];
 
 
 	for (cnt = 1; cnt < maxsize / sizeof (long); cnt <<= 1) {
 	for (cnt = 1; cnt < maxsize / sizeof (long); cnt <<= 1) {
 		addr = base + cnt;	/* pointer arith! */
 		addr = base + cnt;	/* pointer arith! */