[DNX#2006040142000973] Réf . : Re: [U-Boot-Users] get_ram_size bug and ask [...]

DENX Support System support at denx.de
Sat Apr 1 00:50:07 CEST 2006


Hello list,

inside the automatic U-Boot patch tracking system a new ticket
[DNX#2006040142000973] was created:

<snip>
> Hi Wolfgang,
> 
> it seems the code I have was modified.
> I look in the original cvs version and it seems that the base address 
> isn't restored either.
> 
> 
>       [...]
>         addr = base;
>         save[i] = *addr; <-- save value at base address
>         *addr = 0; <--- modify it.
> 
>         if ((val = *addr) != 0) {
>                 <--- error case : restore all values
>             [...]
>         }
> 
>         <-- we forget to restore the value and start to restore value 
> @base+1 with save[i-1].
> 
>         for (cnt = 1; cnt < maxsize / sizeof (long); cnt <<= 1) {
>                 addr = base + cnt;      /* pointer arith! */
>                 val = *addr;
>                 *addr = save[--i];
>                 if (val != ~cnt) {
>                         size = cnt * sizeof (long);
>                         /* Restore the original data before leaving the 
> function.
>                          */
>                         for (cnt <<= 1; cnt < maxsize / sizeof (long);
> cnt 
> <<= 1) {
>                                 addr  = base + cnt;
>                                 *addr = save[--i];
>                         }
>                         return (size);
>                 }
>         }
> 
> 
> regards,
> 
> Matthieu
</snip>

Your U-Boot support team




More information about the U-Boot mailing list