[U-Boot-Users] [Q] memtest doubt

Guennadi Liakhovetski g.liakhovetski at gmx.de
Thu Feb 7 15:58:12 CET 2008


On Thu, 7 Feb 2008, Jerry Van Baren wrote:

> Your original question/concept still used the name "addr_mask" which caused
> confusion on my part.

Ahhh, that's just a variable name:-)

> It really should be a length, not a mask.

Of course.

> Illustrating
> with a hand-generated patch, what I am now hearing is the following change:
> 
> - 		addr_mask = ((ulong)end - (ulong)start)/sizeof(vu_long);
> + 		len = ((ulong)end - (ulong)start)/sizeof(vu_long);
>  ...
> - 		for (offset = 1; (offset & addr_mask) != 0; offset <<= 1) {
> + 		for (offset = 1; offset < len; offset <<= 1) {
>  			start[offset] = pattern;
>  		}
> 
> That makes sense to me.

Exactly. If everyone agrees, I'll try not to forget to cook up a patch.

Thanks
Guennadi
---
Guennadi Liakhovetski




More information about the U-Boot mailing list