
22 Jan
2025
22 Jan
'25
10 p.m.
On Wed, 11 Dec 2024 21:51:04 +0100, Ronald Wahl wrote:
The get_timer function returns an unsigned long which may be calculated from the ARM system counter. This counter is reset only on a cold reset. U-boot divides this counter down to a 1000 Hz counter that will cross the 32bit barrier after a bit more than 49 days. Assigning the value to an unsigned int will truncate it on 64bit systems. Passing this truncated value back to the get_timer function will return a very large value that is certainly larger than the timeout and so will go down the error path and besides stopping U-Boot will lead to messages like
[...]
Applied to u-boot/master, thanks!
--
Tom