[U-Boot-Users] get_ram_size bug and ask for comments

Hi,
the current get_ram_size algorithm doesn't restore the first word of the memory. Something like [1] should be done to prevent that.
Also is that possible to get some comment s on the algorithm ?
Why save2 is never used to restore values ?
Thanks
Matthieu
[1] --- ../../cvs/uboot/common/memsize.c 2006-03-01 10:37:06.000000000 +0100 +++ memsize.c 2006-03-24 14:41:07.116217000 +0100 @@ -60,6 +60,7 @@ } return (0); } + *addr = save[i];
for (cnt = 1024; cnt < maxsize / sizeof (long); cnt <<= 1) { addr = base + cnt; /* pointer arith! */

In message OF291FE20B.B68458E9-ONC125713B.0053FF65-C125713B.0054A1F2@sagem.com you wrote:
the current get_ram_size algorithm doesn't restore the first word of the memory. Something like [1] should be done to prevent that.
Ummm... which code base are you using? This does not look like any standard U-Boot code at all...
Also is that possible to get some comment s on the algorithm ?
Why save2 is never used to restore values ?
Please explain what code you are talking about.
The official U-Boot code has no variable "save2" at all, nor dies it have any such loop as this:
--- ../../cvs/uboot/common/memsize.c 2006-03-01 10:37:06.000000000 +++ memsize.c 2006-03-24 14:41:07.116217000 +0100 @@ -60,6 +60,7 @@ } return (0); }
*addr = save[i]; for (cnt = 1024; cnt < maxsize / sizeof (long); cnt <<= 1) {
---------------------^^^^
Best regards,
Wolfgang Denk
participants (2)
-
Matthieu CASTET
-
Wolfgang Denk