Autonomous-mode rung, 9th past P45. User said “do the integration let’s boot a kernel once we have linux i want freebsd”. So pivoted from architectural correctness to integration push.
P53 closes three of the four P52-era holes that block Linux boot:
- 4 MiB megapages. Linux maps the kernel direct map with these. Without them: every kernel access page-faults.
- sfence.vma decoded. Linux issues this after every mapping change. Without it: illegal-instr at boot.
- AMO ops through the walker. Linux uses amoadd.w in the spinlock fast path. Without translation: wrong PA, broken atomics.
The remaining hole is instruction-fetch translation. We
sidestep that by planning to identity-map the kernel
(PA == VA for kernel code).
PASS at 5,297,364 clocks. ~50k clocks over P52, all from the two new probe sequences.
Quick implementation notes
- sfence.vma is genuinely a no-op for us — no TLB to flush. The decode is just there to keep it from being illegal-instr.
- Megapage PA construction uses the L1 PTE’s PPN[1] field combined with the VA’s VPN[0]+offset. PPN[0] of the megapage PTE must be zero (alignment); we trap if not.
- AMO routing is the most invasive piece. Each AMO branch in S_EXECUTE now checks translation_active; if active, it goes through the walker; the walker’s success paths dispatch back to S_AMO_LOAD (for AMO RMW) or S_MEM (LR/SC).
What’s left for booting
The architectural part is essentially done. What remains is platform shape:
- CLINT-style timer at the standard SiFive MMIO base (mtime at 0x0200_BFF8, mtimecmp at 0x0200_4000). Stock Linux drivers find these without DTS contortions.
- PLIC-shaped external interrupt controller. Maybe skippable for first boot if no interrupts.
- Larger external memory. 256 KiB → 16+ MiB. Even a microscopic Linux is way bigger than 256 KiB.
- Minimal SBI implementation. Linux runs in S-mode and uses ECALL_FROM_S to call M-mode firmware for things like console output and timer setup.
- Device tree blob. Linux needs to know the platform layout.
These are integration rungs. None require new RTL — they’re testbench / firmware / boot-image work. P54+ will tackle them.
Wart count
Same one (P46 sext.b auto-emit hang).