RTEMS | bsps/sparc/leon3: Fix GPTIMER timer index logic (!514)

Matteo Concas (@matteo.concas) gitlab at rtems.org
Mon Jun 16 10:38:56 UTC 2025



Matteo Concas created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/514

Project:Branches: matteo.concas/rtems-gaisler:matteo/fix-mp-leon3 to rtems/rtos/rtems:main
Author:   Matteo Concas




## Summary

bsps/sparc/leon3: Fix GPTIMER timer index logic

The old logic would lead to an error when multiprocessing was enabled and `LEON3_GPTIMER_BASE` was defined due to `leon3_timer_core_index` being undefined.

The new logic fixes this and keeps the same intent:
 - If multiprocessing is not enabled, the timer index is 0
 - If multiprocessing is enabled and `LEON3_GPTIMER_BASE` is defined, the timer index is twice the CPU boot index
 - If multiprocessing is enabled and `LEON3_GPTIMER_BASE` is not defined, we fallback to the old logic using the GPTIMER core index.

 Close #5258


<!-- Default settings, if it is a dropdown it will set after submission -->

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/514
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250616/a1837cf6/attachment-0001.htm>


More information about the bugs mailing list