This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Arm Really Should Standardize An SMC Interface For Hardware Random Number Generators

Intel and AMD have added RDRAND a long time ago. IBM added the (awesomely named) DARN instruction to POWER9.

What do we have on AArch64? A mess. Ad-hoc drivers for specific RNGs, specified in device trees and (OMG) ACPI tables with device tree pieces in them.

Some vendors, instead of providing RNG device descriptions, have started using Secure Monitor Calls. This is a better interface for the OS. It's pretty much "just an instruction" like RDRAND, except instead of a hardcoded ISA instruction it's some parameters to the smc instruction. Since SMC handlers are implemented in firmware/software, this does not require new silicon like an RDRAND type ISA instruction might.

But this is still a bunch of vendor-specific calls.

Arm did an amazing job standardizing the interrupt controller, timer, watchdog, serial console, etc. Can we get a similarly standardized SMCCC call for getting entropy?

As a FreeBSD contributor, I would much prefer having to write one "Generic SMCCC RNG" driver than individual "Amazon RNG", "NXP RNG" etc.!

TF-A even already includes some RNG drivers (e.g. RPi3) by the way..