Skip to content

Add SMP support#205

Open
thejpster wants to merge 3 commits into
rust-embedded:mainfrom
thejpster:add-smp-support
Open

Add SMP support#205
thejpster wants to merge 3 commits into
rust-embedded:mainfrom
thejpster:add-smp-support

Conversation

@thejpster

Copy link
Copy Markdown
Contributor

Integrates SMP support into aarch32-rt. Now the default start-up routines (for Armv7-R, Armv7-A and Armv8-R) check MPIDR and do normal start-up on Core 0, and park any secondary core.

To get the secondary cores to work, you have to replace the park routine (_asm_secondary_core_park) with one that waits for a reliable signal from Core 0 (like a hardware register, not definitely not a RAM location because RAM has random contents) and then returns. After that, stacks are initialised and the core ends up in kmain_secondary.

This is a breaking change, but I think it makes SMP examples much easier to write. So much so, the mps3-an536-smp example folder has gone - they've been folded into the normal mps3-an536 examples because they are now so similar.

Also means we can collapse the mps3-an536-smp example back into
mps3-an536, because we don't need special start-up routines any more
(the presence of a custom `_default_start` before meant we weren't
testing the supplied `_default_start` routine, so we had to split the
example up).
You cannot check the stack contents of Core 1 on Core 0 when the MPU
is enabled. So, now I set a flag and make sure not to do that for that
particular test.
I copied from this example and got confused when it didn't work. Now
it's fixed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant