
30 Oct
2023
30 Oct
'23
9:25 a.m.
On Sun, Oct 29, 2023 at 09:45:33AM +0100, Heinrich Schuchardt wrote:
The Zkr ISA extension (ratified Nov 2021) introduced the seed CSR. It provides an interface to a physical entropy source.
A RNG driver based on the seed CSR is provided. It depends on mseccfg.sseed being set in the SBI firmware.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
v2: Resume after exception if seed CSR cannot be read.
drivers/rng/Kconfig | 8 +++ drivers/rng/Makefile | 1 + drivers/rng/riscv_zkr_rng.c | 116 ++++++++++++++++++++++++++++++++++++ 3 files changed, 125 insertions(+) create mode 100644 drivers/rng/riscv_zkr_rng.c
Reviewed-by: Leo Yu-Chi Liang ycliang@andestech.com