Scope 49 adds multiprocessor detection and hooks for future TLB management without scheduling work on application processors yet.
smp::init() runs during kernel::init():
- Reads CPU count from ACPI or CPUID bring-up probes
- Records application processors as parked (not started)
- Exposes TLB flush helpers for future cross-CPU invalidation
Boot smoke:
See [VALIDATION_GATES.md](VALIDATION_GATES.md) for gate serial lines.
Scope 31 binds CR3 on preemptive context switch on the bootstrap processor only. Scope 49 does not migrate runnable tasks to APs.
python scripts/gate/run.py --gate dynamic_runtime --timeout 180Scope 59 increments per-CPU enqueue counters when the BSP scheduler preempts. Application processors remain parked; this is accounting only, not work migration.
Boot smoke:
See [VALIDATION_GATES.md](VALIDATION_GATES.md) for gate serial lines.
smp::request_tlb_shootdown() records shootdown requests and completions per online CPU, then flushes the local TLB on the BSP. Munmap and demand-map paths call this helper instead of flushing silently.
Boot smoke:
See [VALIDATION_GATES.md](VALIDATION_GATES.md) for gate serial lines.
When more than one CPU is reported, smp::init() increments ap_idle_ticks to represent parked application processors in an idle state. This is accounting only; APs do not run the scheduler yet.
Boot smoke:
See [VALIDATION_GATES.md](VALIDATION_GATES.md) for gate serial lines.
request_tlb_shootdown() records logical IPI send/ack counters (ipi_shootdown_sent, ipi_shootdown_acked) for all online CPUs, then flushes the BSP TLB. Munmap (scope 73) calls this helper after PTE changes.
Boot smoke:
See [VALIDATION_GATES.md](VALIDATION_GATES.md) for gate serial lines.
ap_idle_trampoline() is the minimal AP entry stub: it accounts AP_TRAMPOLINE_ENTERED and bumps ap_idle_ticks. A real hlt loop is deferred until ACPI AP startup exists (halting on the BSP during smp::init() would freeze QEMU bring-up).
Boot smoke:
See [VALIDATION_GATES.md](VALIDATION_GATES.md) for gate serial lines.
request_tlb_shootdown() increments LAPIC_IPI_SEND for each logical IPI target (cpus - 1) in addition to the existing shootdown and ack counters. This is accounting only; no LAPIC ICR MMIO is programmed yet.
Boot smoke:
See [VALIDATION_GATES.md](VALIDATION_GATES.md) for gate serial lines.
When the BSP runqueue is empty (CPU0_READY == 0) but CPU1 has work, try_work_steal() increments WORK_STEAL_ATTEMPTS and logically dequeues from CPU1 (WORK_STEALS). This is accounting only; tasks are not migrated.
Boot smoke:
See [VALIDATION_GATES.md](VALIDATION_GATES.md) for gate serial lines.
enqueue_ap_runnable() enqueues on CPU1 when CPU_COUNT > 1 and increments AP_RUNNABLE_ENQUEUED. Application processors remain parked; no AP scheduler loop or BSP hlt in smp::init().
Boot smoke:
See [VALIDATION_GATES.md](VALIDATION_GATES.md) for gate serial lines.
lapic_icr_send_stub() records an ICR-low write in LAPIC_ICR_WRITES using a discard slot instead of programming real LAPIC MMIO at 0xfee0_0300 (which can hang QEMU bring-up tests). request_tlb_shootdown() still only bumps LAPIC_IPI_SEND counters.
Boot smoke:
See [VALIDATION_GATES.md](VALIDATION_GATES.md) for gate serial lines.
- LAPIC timer per CPU, IPI reschedule, and real runnable work on APs
- Real AP trampolines and ACPI MADT-driven AP startup
- Real LAPIC ICR low/high MMIO for inter-processor interrupts
- Full work-stealing runqueues with task migration