Open andrewboie opened 3 years ago
@ruuddw @abrodkin I remember this came up about SMP support for ARC MPU.
Hi @dcpleung,
This issue, marked as an Enhancement, was opened a while ago and did not get any traction. It was just assigned to you based on the labels. If you don't consider yourself the right person to address this issue, please re-assing it to the right person.
Please take a moment to review if the issue is still relevant to the project. If it is, please provide feedback and direction on how to move forward. If it is not, has already been addressed, is a duplicate, or is no longer relevant, please close it with a short comment explaining the reason.
@andrewboie you are also encouraged to help moving this issue forward by providing additional information and confirming this request/issue is still relevant to you.
Thanks!
Is your enhancement proposal related to a problem? Please describe. Moving a thread from one memory domain to another with SMP active is not as simple as de-configuring it from the old domain and applying the incoming domain's permissions. The thread must survive this operation if it is running on another CPU and its memory access is limited to its own stack or the intersection of the two domains.
I had to do some ugly stuff in
arch_mem_domain_add_thread()
andarch_mem_domain_remove_thread()
in https://github.com/zephyrproject-rtos/zephyr/pull/29411/.That PR adds a test for this scenario, at least.
Describe the solution you'd like Cleaner interfaces, perhaps maybe something along the lines of
k_mem_domain_add_thread() would hook into this.
arch_mem_domain_add_thread()
andarch_mem_domain_remove_thread()
would still exist, but only be called on thread creation/termination.