[U-Boot] [PATCH] common/memsize.c: fix endless loop when saving

Hannes Schmelzer hannes at schmelzer.or.at
Wed Feb 10 07:25:37 CET 2016


On 02/09/2016 06:55 PM, Eddy Petrișor wrote:
> 2016-02-09 19:41 GMT+02:00 Eddy Petrișor <eddy.petrisor at nxp.com>:
>> When cnt reaches 0, any shift operation will keep cnt=0, so the condition
>> `cnt >= 0` doesn't make sense.
>>
>> To fix this endless loop, we drop the useless condition and simply break the
>> loop when cnt reaches 0.
> This should fix the endless issue introduced by the previous patch
> 8e7cba048baae68ee0916a8f52b4304277328d5e
>
> Hannes, can you confirm that with this patch the reported size is
> correct and the boot is normal again?
> I initially thought the size might be incorret due to some buggy HW I
> have (it has some unstable DDR settings, which lead to incorrect
> reports on my side initially).
Hi Eddy,
the board does boot with this patch.
But the reported memsize is wrong.
1GiB instead 256MiB.

So we need some v2 to get rid.

best regards,
Hannes



More information about the U-Boot mailing list