]> www.infradead.org Git - users/jedix/linux-maple.git/commit
hwrng: exynos - Add SMC based TRNG operation
authorSam Protsenko <semen.protsenko@linaro.org>
Thu, 20 Jun 2024 23:13:38 +0000 (18:13 -0500)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 28 Jun 2024 01:35:49 +0000 (11:35 +1000)
commit10bb6ac8f86f4b65ef8d227504868a61e0bcb148
treee7e402888b9f92bbf32c0028305c15d64b8bc29e
parente003d67067043488595f33f3a82230a4281686ca
hwrng: exynos - Add SMC based TRNG operation

On some Exynos chips like Exynos850 the access to Security Sub System
(SSS) registers is protected with TrustZone, and therefore only possible
from EL3 monitor software. The Linux kernel is running in EL1, so the
only way for the driver to obtain TRNG data is via SMC calls to EL3
monitor. Implement such SMC operation and use it when EXYNOS_SMC flag is
set in the corresponding chip driver data.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/exynos-trng.c