The ratified RISC-V crypto scalar extensions provide entropy bits via the
seed CSR, as exposed by the Zkr extension. The Zkr extension is ratified
and provides 16 bits of entropy seed when reading the SEED CSR.
Guarded by a RISCV64 Feature PCD, 64-bit random numbers can be
accumulated from the seed CSR. This driver is based on the driver in
the Linux kernel.
Test: It was tested on a simulation platform that implements zkr extension. A debug array was printed of mIndex to confirm random values are displayed.
Need to enable BIT3 of PcdRiscVFeatureOverride PCD. By default on Virt platform it is disabled.
The ratified RISC-V crypto scalar extensions provide entropy bits via the seed CSR, as exposed by the Zkr extension. The Zkr extension is ratified and provides 16 bits of entropy seed when reading the SEED CSR. Guarded by a RISCV64 Feature PCD, 64-bit random numbers can be accumulated from the
seed
CSR. This driver is based on the driver in the Linux kernel.Test: It was tested on a simulation platform that implements zkr extension. A debug array was printed of mIndex to confirm random values are displayed.
Need to enable BIT3 of PcdRiscVFeatureOverride PCD. By default on Virt platform it is disabled.