roadmap BUILT

159. A real hardware entropy source: the JH7110's TRNG

The entropy service from milestone 56 (secrets, credentials, and the entropy to make them safe) has a virtio-rng backend, which exists in QEMU and not on the VisionFive 2 the tree boots. The StarFive JH7110's TRNG is the real-hardware source, and this milestone drives it.

The driver's own logic can be written and host-tested without silicon; whether it actually produces usable entropy, and at what rate, can only be verified by reading real bits off a real TRNG.

Where it stands

Built. On 2026-09-04 a confined userspace driver on radon, the StarFive VisionFive 2 (JH7110, riscv64), served TRNG bytes to a client through a capability that names no device. It did so on two boots, and the first draw differed across them. On 2026-09-16 milestone 306 (time the hw-entropy step) measured it at 955,223 bytes/s on the board. What stays open is a decision rather than work: whether these bytes need a health test before anything security-shaped trusts them.

Getting there took four lanes and three bench runs. Each is told in full in an appendix:

Why this is the same shape of gap as 53 and 157

Milestones 53 (network and storage on real silicon) and 157 (real display output on the board: U-Boot's simple-framebuffer handoff) both exist because virtio only carries an emulator's paravirtual devices, and real hardware has none. Entropy is the same story one subsystem over. entropy_service, from milestone 56 (secrets, credentials, and the entropy to make them safe), speaks to a VirtualIo capability, proven end to end in QEMU. Until this milestone it had never run against real hardware, because nothing here had a driver for the JH7110's TRNG.

What was built

It served, 2026-09-04, and the experiment is run

The success line printed. Two boots of radon, transcript at target/board/radon-2026-09-04-trng-success.log:

hw entropy : JH7110 TRNG at 0x1600c000 served 32+32 bytes to a client through a capability
             that names no device; first draw 3faa07e1.., second differs;
             STAT after init 0x00040308 (256-bit: all eight RAND words are the answer)

Four things had to be true at once, and each was fixed separately:

It is a measurement rather than an anecdote, which is what the bench procedure asks for. Two boots, and the first draw differs across them:

boot first draw second draw
1 3faa07e1 differs
2 731191ba differs

So the device is reseeded per boot rather than returning a constant baked into silicon or a stale register file. Each boot's two draws differ from each other, so the pool is genuinely refilled between them.

And the one question no documentation could settle is answered. STAT after init 0x00040308 reports 256-bit mode, so all eight RAND words are the answer and no byte-count correction is owed. It is a build-time silicon parameter; the lane that wrote MODE.R256 recorded that one bench line would close it, and it did.

What it establishes for fatal risk 6, and what it does not

Risk 6 is a capability-confined userspace driver cannot drive real hardware at real speed, and it has three parts:

Nothing here says the driver is fast, and the block should not be quoted as if it did.

What is still open

BUGS

Follow-on

What this does not decide

The stopgap question of §120 (a QEMU-only virtio-rng stopgap for the interactive boot) is separate and not reopened by this milestone. Whether the interactive boot should grant any entropy source (virtio-rng or this driver) before there is a real customer for interactive login is §120's call, declined for now. Building this driver does not require revisiting that. Landing it does not by itself grant it to the boot path.

What it unblocks

The real-hardware half of milestone 56's own claim: an entropy service this tree can trust on the board it actually ships to, not only in QEMU. Downstream of that, whenever §120's stopgap question is revisited with a real customer, the answer can be "real hardware entropy," not only "QEMU's virtio-rng."

Index row

Surfaced while investigating milestone 49's boot-wiring fork (DECISIONS §120): the entropy service (milestone 56) only has a virtio-rng backend, which does not exist on real silicon. A confined userspace driver drove the TRNG on radon on 2026-09-04 and a client got real, differing bytes through a capability naming no device, which is fatal risk 6's "drives real hardware" half. The tour still printed FAILED, because its success line asked for 32 bytes down a protocol carrying 8 and was unreachable on any device. Fixed, with the bring-up steps upstream has and this driver lacked, and the success line then printed on two boots of radon the same day.