First real per-arch RNG backend, added to the v2.0.0 unified entry point in src/starkernel/rng/rng.c, #if-guarded to amd64: CPUID.01H:ECX[30] RDRAND detection + inline-asm rdrand draws feeding rdrand_fill() (whole-byte emission from the low end; a partial final draw is discarded -- throwing away entropy is always safe). Probe order honors the release policy: virtio-rng is tried first, so the QEMU path stays on virtio-rng unchanged; RDRAND is the fallback only real hardware (which has no virtio-rng device) reaches. QEMU-verified both ways on amd64: with virtio-rng present -> "rng: backend = virtio-rng" (unchanged); with virtio-rng absent and RDRAND exposed (-cpu max) -> "rng: backend = rdrand" + "entropy: ready" + Zuse attach confirmed. rdrand_fill()'s exact logic host-proven: fills 32-byte/16-byte buffers and yields differing draws run-to-run (non-deterministic). aarch64/riscv64 builds unaffected (guarded off). riscv64 Zkr and aarch64 peripheral-RNG backends remain parked for their real boards. FABRIC-3.md G.4 amd64 slice marked BUILT + QEMU-verified.
30 MiB
30 MiB
The file is too large to be shown.
View Raw