Page MenuHomeFreeBSD

arm64: add a spin-table implementation for Apple Silicon
ClosedPublic

Authored by kevans on Mar 24 2022, 4:09 PM.
Tags
None
Referenced Files
F150435223: D34661.id112307.diff
Wed, Apr 1, 5:14 AM
Unknown Object (File)
Sat, Mar 28, 8:01 PM
Unknown Object (File)
Mon, Mar 23, 4:58 AM
Unknown Object (File)
Fri, Mar 20, 5:40 AM
Unknown Object (File)
Thu, Mar 19, 8:39 AM
Unknown Object (File)
Thu, Mar 19, 1:58 AM
Unknown Object (File)
Feb 8 2026, 11:46 AM
Unknown Object (File)
Feb 8 2026, 8:05 AM

Details

Summary

The M1 has no EL3, so we're limited to a spin-table implementation if we
want to eventually use bhyve on it. Implement spin-table now, but note
that we still prefer PSCI where possible.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 44882
Build 41770: arc lint + arc unit

Event Timeline

This seems to work, at least, in the sense that we proceed with boot so the other cores must have made it into init_secondary(). We're not quite at AP release, though.

I can confirm this is doing the right thing, at least on this hardware; I now get to mountroot past AP release after fixing some other bits with the interrupt controller.

With rG866beaa0aa95 this has successfully booted a Raspberry Pi 4 both with our armstub8* that does PSCI and with the upstream stock armstub8*, and we use this actively on M1 WIP as well.

sys/arm64/arm64/mp_machdep.c
519

Will apply this pre-commit

mmel added inline comments.
sys/arm64/arm64/mp_machdep.c
522

I think we should do a full(system) DSB before the SEV (although it seems a bit paranoid, I know). Rest looks OK for me.

Toss in a barrier prior to wakeup; perhaps paranoid, but it seems like a
reasonable concern

This revision is now accepted and ready to land.Oct 28 2022, 8:30 PM