Re: Zephyr SMP support for Arm MCUs


Carlo Caione
 

On 21/06/2022 01:25, Keith Morgan via lists.zephyrproject.org wrote:
I am interested in Zephyr SMP support for the Arm M class of microcontrollers [1]. It’s not clear from the Zephyr SMP documentation [2] which architectures Zephyr currently supports, but I’ve gathered from other links that ARC, RISC-V and ARM A class are supported – possibly others as well.
According to a thread on this list back in October of 2020 [3], “to fully implement SMP you'll need per-cpu variables, IPIs, some extra arch_* APIs implemented, etc.”
It sounds like a porting guide did not exist back then. Is there by chance now a porting guide for SMP that I could follow? If not, could somebody provide a little more guidance as to how to get started?
There is no guide still (AFAIK), but [1] could be a good starting point.

But there are some prerequisites and low-hanging fruits that you could work on before tackling the task as a whole. For example cortex-M doesn't support CONFIG_USE_SWITCH that is needed to support SMP (but you can still use that in !SMP).

So I guess that should be the really first step for you, the rest can follow.

Cheers!

[1] https://docs.zephyrproject.org/latest/kernel/services/smp/smp.html
[2] https://docs.zephyrproject.org/latest/kconfig.html#CONFIG_USE_SWITCH

--
Carlo Caione

Join devel@lists.zephyrproject.org to automatically receive all group messages.