enumerate usable CPU cores from the MADT

Keep each Local APIC's id and expose platform.cpus().
This commit is contained in:
Daniel Samson
2026-07-08 12:35:30 +01:00
parent 26d2f5259c
commit cf7c6df41c
4 changed files with 66 additions and 1 deletions
+4 -1
View File
@@ -114,7 +114,10 @@ active reconsideration in favour of resilience — see [vision.md](vision.md).)
Whatever the top goal, the *sequence* is the same and seL4 validates starting simple:
1. **Enumerate cores** — needs [device discovery](discovery.md) (ACPI MADT on x86,
device tree on ARM). SMP is a concrete consumer of that work.
device tree on ARM). SMP is a concrete consumer of that work. **Done on x86:** the
MADT parse records every usable Local APIC — with the `apic_id` an AP wake targets —
and `platform.cpus()` returns the list (see [discovery.md](discovery.md)). The boot
log reports the count; the ARM (device-tree) path still needs it.
2. **Wake the APs** — INIT–SIPI–SIPI on x86; PSCI/spin-tables on ARM. Each core brings
up its own tables, timer, and idle task.
3. **Start with a big kernel lock.** It's a legitimate first design, not a shortcut —