Daniel Samson
5940864958
test the trampoline is inert (zeroed + NX) when dormant
...
Adds paging.isExecutable and arch.trampolinePage; the smp case now asserts the frame is zeroed and non-executable after bring-up. Teeth-checked against a no-op disarm.
2026-07-08 13:46:53 +01:00
Daniel Samson
91f2cfa17b
add smp-retry test for the AP wake retry path
...
Test hook forces the first wake to fail; the case asserts every core still comes online. Verified it fails when retry is disabled.
2026-07-08 13:41:14 +01:00
Daniel Samson
debe815a5c
keep the AP trampoline inert between wakes, and retry failed cores
...
Arm the low frame (copy blob, make executable) only while a core climbs, then zero it and restore RW+NX; the frame stays reserved so cores can be re-woken. startSecondary is one re-runnable attempt; boot retries a non-responding core 3x. Validated the retry path by forcing a first-attempt failure.
2026-07-08 13:32:34 +01:00
Daniel Samson
dba3939a0f
add an SMP lock-stress test case
...
Four pairs push 400k sequenced messages through small channels; checks FIFO order and cross-core execution. Verified to fail with the lock disabled.
2026-07-08 12:45:02 +01:00
Daniel Samson
43afe6bf2e
schedule tasks across all cores
...
Per-core GDT/TSS and AP scheduler entry; fix AP SSE + single_threaded.
2026-07-08 12:35:30 +01:00
Daniel Samson
ed7f542006
wake application processors to long mode
...
INIT-SIPI-SIPI plus a self-relocating real-mode trampoline.
2026-07-08 12:35:30 +01:00
Daniel Samson
36c29d2d6d
move the running task into per-CPU state
...
PerCpu.current via the GS base; ready queues stay global.
2026-07-08 12:35:30 +01:00
Daniel Samson
941ab091db
add a big kernel lock for SMP
...
Guards the scheduler and IPC; held across the context switch.
2026-07-08 12:35:30 +01:00
Daniel Samson
cf7c6df41c
enumerate usable CPU cores from the MADT
...
Keep each Local APIC's id and expose platform.cpus().
2026-07-08 12:35:30 +01:00
Daniel Samson
26d2f5259c
document the multi-sink logging model
2026-07-08 10:41:47 +01:00
Daniel Samson
cb63d2e31b
add multi-sink diagnostic log; make framebuffer optional
2026-07-08 10:40:22 +01:00
Daniel Samson
7d3417fe86
refactor kernel to use device platform discovery
2026-07-08 10:06:46 +01:00
Daniel Samson
2ee898a91e
add device platform module with ACPI support
2026-07-08 09:23:41 +01:00
Daniel Samson
53a33a7332
fix debug typos
2026-07-05 19:07:22 +01:00
Daniel Samson
3f17ebf175
rename sched to scheduler
2026-07-05 19:03:07 +01:00
Daniel Samson
50f3610768
Update build to run qemu on MacOS
2026-07-03 16:43:00 +01:00