RTEMS | bsps/powerpc/psim: The CPU counter frequency overflows (#5725)
Sebastian Huber (@sebhub)
gitlab at rtems.org
Mon Aug 24 01:41:59 UTC 2026
Issue created by Sebastian Huber: https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5725
`_CPU_Counter_frequency()` returns `bsp_clicks_per_usec * 1000000`. The BSP
sets `bsp_clicks_per_usec` to `BSP_bus_frequency`, which it states in kHz, so
the product is 10^10 and does not fit in the `uint32_t` return type. The value
wraps to 1410065408.
The clock driver installs the same time base register as a timecounter of
10 MHz, so the two descriptions of one register disagree by a factor of 141.
`ttest01` compares a tick to time round trip and reads 1.099999999 where it
expects 1.100000000. `rtems_bsp_delay()` reads the same variable and spins 1000
times too long.
Found while running the full test suite on eleven simulators. This description
was created with Claude Code assistance.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5725
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/sent_notifications/5-e9cvwieg762c8zzpso0n5gok0-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260824/00a072e0/attachment.htm>
More information about the bugs
mailing list