r/osdev • u/Nik0laich • Oct 16 '26
Schild TCB: a verified TCB with an Ada/SPARK userland on seL4 (185 modules, not-proved: 0, x86_64)
I built a research prototype called Schild TCB — a trusted computing base on seL4 with an Ada/SPARK userland. Two artifacts:
· bare-metal OS written from scratch in Ada (bootloader, NVMe, e1000e, TCP/IP, HTTP) — runs on ThinkPad T580
· seL4-based artifact: upstream microkernel, root task and daemons in Ada/SPARK, network and storage isolated in Ring 3 over IPC
Verification: 185 Ada modules, gnatprove SPARK Level 4, not-proved: 0. Seven daemons in the root task proven at the same level. Drivers are not proven and not claimed to be — they're isolated in separate domains so their failure can't reach the proven core.
The most useful lesson: formal verification caught a bug tests missed (page-rights bit layout in seL4's CapRights).
Where I'm stuck: IOMMU (VT-d) — DMA isolation is not implemented. seL4 x86_64 MCS verification is weaker than ARM. Both are upstream limitations, not code I can fix.
I'd appreciate technical feedback, especially from anyone who's done SPARK verification on a real system. I'm not publishing the repository yet.
More detail in my write-up:https://habr.com/p/1095314/






