Page MenuHomeFreeBSD

Add support for SMP on arm64.
ClosedPublic

Authored by andrew on Jul 8 2015, 5:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 26, 6:03 AM
Unknown Object (File)
Fri, Apr 26, 6:03 AM
Unknown Object (File)
Dec 26 2023, 5:10 PM
Unknown Object (File)
Dec 20 2023, 12:30 AM
Unknown Object (File)
Nov 21 2023, 5:37 PM
Unknown Object (File)
Nov 12 2023, 2:27 AM
Unknown Object (File)
Nov 11 2023, 8:07 AM
Unknown Object (File)
Nov 9 2023, 8:06 AM
Subscribers

Details

Summary

Add support for SMP. This uses the FDT data to find the CPUs to start
on, and psci to start them. I expect ACPI support to be added later.

This has been tested on qemu with 2 cpus as that is the current value
of MAXCPUS.

Partially based on a patch from Robin Randhawa from ARM.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

andrew retitled this revision from to Add support for SMP on arm64..
andrew updated this object.
andrew edited the test plan for this revision. (Show Details)
andrew added reviewers: zbb, imp, wma_semihalf.com.
andrew added a subscriber: emaste.

The Semihalf 48 core SMP testing is on a branch which started from (a version of) this change. I will defer to @zbb and @wma_semihalf.com for specific details and comment, but it seems reasonable to me to commit this change once reviewed and have Semihalf add the additional changes as separate commits to svn HEAD.

sys/arm64/include/smp.h
43 ↗(On Diff #6784)

Should we make it ARM64TODO?

That would be great if you could commit this patch "as is". We have few fixes to mp_machdep/locore which are currently rebased against your version. Avoiding merges of post-review fixes will let us save a lot of time...
I will send all our patches once it's pushed. Thanks in advance.

Do note that this patch has been reworked than the version on GitHub. We now start the CPUs earlier in the boot process so they will be running when we wish to release them.

wma_semihalf.com edited edge metadata.

I did notice it's cleaned up (and it's got the annoying DO_AST printf changed to ktr). However, the places where I expect merge conflicts are the same. We had to change stack calculation, sequence in init_secondary, fix the KSTACK_PAGES variable (it does not correspond to the one set in kernconf here)... these are the one from the top of my head.
I'm good with this patch, please commit.

This revision is now accepted and ready to land.Jul 8 2015, 5:42 PM
This revision was automatically updated to reflect the committed changes.