tianocore / edk2

EDK II
https://github.com/tianocore/tianocore.github.io/wiki/EDK-II
Other
4.58k stars 2.47k forks source link

Add RISC-V Drng Zkr extension support #5802

Closed dhaval-rivos closed 2 months ago

dhaval-rivos commented 3 months ago

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.

vlsunil commented 3 months ago

@dhaval-rivos : Can you please get the CI passing?

dhaval-rivos commented 3 months ago

@dhaval-rivos : Can you please get the CI passing?

Done.

dhaval-rivos commented 2 months ago

@vlsunil