Page MenuHomeFreeBSD

Ensure the boot CPU is CPU 0 on arm64
ClosedPublic

Authored by andrew on Dec 7 2020, 1:05 PM.
Tags
None
Referenced Files
F168003018: D27497.id80404.diff
Tue, Aug 25, 8:59 PM
F167904868: D27497.id80407.diff
Tue, Aug 25, 9:03 AM
F167904781: D27497.id.diff
Tue, Aug 25, 9:03 AM
F167853953: D27497.id80406.diff
Tue, Aug 25, 12:48 AM
Unknown Object (File)
Wed, Aug 19, 11:31 AM
Unknown Object (File)
Wed, Aug 19, 11:31 AM
Unknown Object (File)
Wed, Aug 19, 11:31 AM
Unknown Object (File)
Wed, Aug 19, 11:31 AM
Subscribers

Details

Summary

We assume the boot CPU is always CPU 0 on arm64. To allow for this reserve
cpuid 0 for the boot CPU in the ACPI and FDT cases but otherwise start the
CPU as normal. We then check for the boot CPU in start_cpu and return as if
it was started.

While here extract the FDT CPU init code into a new function to simplify
cpu_mp_start and return FALSE from start_cpu when the CPU fails to start.

Diff Detail

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

Event Timeline

andrew requested review of this revision.Dec 7 2020, 1:05 PM

Simplify by only iterating once with CPU 0 being reserved

  • Use the correct ID in cpu_init_fdt
  • Copy a comment explaining why we don't increment the CPU ID to teh FDT code
  • Fix a typo in said comment
mmel added a subscriber: mmel.

Works for me and it's much better than my initial proposal.

This revision is now accepted and ready to land.Dec 7 2020, 4:37 PM
This revision was automatically updated to reflect the committed changes.