U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [RFC v2 0/2] rng: Provide a RNG based on the RISC-V Zkr ISA extension
@ 2023-10-29  8:45 Heinrich Schuchardt
  2023-10-29  8:45 ` [RFC v2 1/2] riscv: allow resume after exception Heinrich Schuchardt
  2023-10-29  8:45 ` [RFC v2 2/2] rng: Provide a RNG based on the RISC-V Zkr ISA extension Heinrich Schuchardt
  0 siblings, 2 replies; 12+ messages in thread
From: Heinrich Schuchardt @ 2023-10-29  8:45 UTC (permalink / raw)
  To: Rick Chen, Leo
  Cc: Sughosh Ganu, Anup Patel, Kautuk Consul, Chanho Park, u-boot,
	Heinrich Schuchardt

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.

If the seed CSR readable, is not determinable by S-mode without risking
an exception. For safe driver probing allow to resume via a longjmp
after an exception.

As the driver depends on mseccfg.sseed=1 we should wait with merging the
driver until a decision has been taken in the RISC-V PRS TG on prescribing
this.

Heinrich Schuchardt (2):
  riscv: allow resume after exception
  rng: Provide a RNG based on the RISC-V Zkr ISA extension

 arch/riscv/lib/interrupts.c |  13 ++++
 drivers/rng/Kconfig         |   8 +++
 drivers/rng/Makefile        |   1 +
 drivers/rng/riscv_zkr_rng.c | 116 ++++++++++++++++++++++++++++++++++++
 include/interrupt.h         |  22 +++++++
 5 files changed, 160 insertions(+)
 create mode 100644 drivers/rng/riscv_zkr_rng.c
 create mode 100644 include/interrupt.h

-- 
2.40.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-10-31 15:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-29  8:45 [RFC v2 0/2] rng: Provide a RNG based on the RISC-V Zkr ISA extension Heinrich Schuchardt
2023-10-29  8:45 ` [RFC v2 1/2] riscv: allow resume after exception Heinrich Schuchardt
2023-10-30  8:24   ` Leo Liang
2023-10-31  7:53   ` Xiang W
2023-10-31 12:09     ` Heinrich Schuchardt
2023-10-31 15:19       ` Xiang W
2023-10-29  8:45 ` [RFC v2 2/2] rng: Provide a RNG based on the RISC-V Zkr ISA extension Heinrich Schuchardt
2023-10-30  8:25   ` Leo Liang
2023-10-31  6:16   ` merle w
2023-10-31  6:38     ` Heinrich Schuchardt
2023-10-31  6:43     ` Leo Liang
2023-10-31  7:55       ` Xiang W

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox