freebsd_amp_hwpstate/sys/modules/armv8_rng
Andrew Turner 9eecef0521 Add an Armv8 rndr random number provider
Armv8.5 adds an optional random number generator. This is implemented
as two special registers one to read a random number, the other to
re-seed the entropy pool before reading a random number. Both registers
will set the condition flags to tell the caller they can't produce a
random number in a reasonable amount of time.

Without a signal to reseed the entropy pool use the latter register
to provide random numbers to the kernel pool. If at a later time we
had a way to tell the provider if it needs to reseed or not we could
use the former.

On an Amazon AWS Graviton3 VM this never failed, however this may not
be the case on low end CPUs so retry reading the random number 10 times
before returning an error.

Reviewed by:	imp, delphij (csprng)
Sponsored by:	The FreeBSD Foundation
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D35411
2023-11-15 18:05:08 +00:00
..
Makefile