Skip to content
Unverified Commit 10243401 authored by Samuel Ortiz's avatar Samuel Ortiz Committed by Palmer Dabbelt
Browse files

RISC-V: Implement archrandom when Zkr is available



The Zkr extension is ratified and provides 16 bits of entropy seed when
reading the SEED CSR.

We can implement arch_get_random_seed_longs() by doing multiple csrrw to
that CSR and filling an unsigned long with valid entropy bits.

Acked-by: default avatarConor Dooley <conor.dooley@microchip.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@rivosinc.com>
Signed-off-by: default avatarClément Léger <cleger@rivosinc.com>
Link: https://lore.kernel.org/r/20231130111704.1319081-1-cleger@rivosinc.com
Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parent 55ca8d7a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment