mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-16 18:04:48 +00:00

Add True Random Number Generator (TRNG) driver for Exynos chips. This implementation is heavily based on Linux kernel's counterpart [1]. It also follows upstream dt-bindings [2]. TRNG block is usually a part of SSS (Security Sub System) IP-core on Exynos chips. Because SSS access on Exynos850 is protected by TZPC (TrustZone Protection Control), it's not possible to read/write TRNG registers from U-Boot, as it's running in EL1 mode. Instead, the corresponding SMC calls should be used to make the secure software running in EL3 mode access it for us. Those SMC calls are handled by LDFW (Loadable Firmware), which has to be loaded first. For example, for E850-96 board it's done in its board_init(), so by the time RNG capabilities are needed the LDFW should be already loaded and TRNG should be functional. [1] drivers/char/hw_random/exynos-trng.c [2] dts/upstream/Bindings/rng/samsung,exynos5250-trng.yaml Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
136 lines
4 KiB
Text
136 lines
4 KiB
Text
config DM_RNG
|
|
bool "Driver support for Random Number Generator devices"
|
|
depends on DM
|
|
help
|
|
Enable driver model for random number generator(rng) devices.
|
|
This interface is used to initialise the rng device and to
|
|
read the random seed from the device.
|
|
|
|
config SPL_DM_RNG
|
|
bool "Driver support for Random Number Generator devices in SPL"
|
|
depends on SPL_DM
|
|
help
|
|
This option is an SPL-variant of the DM_RNG option.
|
|
See the help of DM_RNG for details.
|
|
|
|
if DM_RNG
|
|
|
|
config RNG_MESON
|
|
bool "Amlogic Meson Random Number Generator support"
|
|
depends on ARCH_MESON
|
|
default y
|
|
help
|
|
Enable support for hardware random number generator
|
|
of Amlogic Meson SoCs.
|
|
|
|
config RNG_SANDBOX
|
|
bool "Sandbox random number generator"
|
|
depends on SANDBOX
|
|
default y
|
|
help
|
|
Enable random number generator for sandbox. This is an
|
|
emulation of a rng device.
|
|
|
|
config RNG_MSM
|
|
bool "Qualcomm SoCs Random Number Generator support"
|
|
depends on DM_RNG
|
|
help
|
|
This driver provides support for the Random Number
|
|
Generator hardware found on Qualcomm SoCs.
|
|
|
|
config RNG_NPCM
|
|
bool "Nuvoton NPCM SoCs Random Number Generator support"
|
|
depends on DM_RNG
|
|
help
|
|
Enable random number generator on NPCM SoCs.
|
|
This unit can provide 750 to 1000 random bits per second
|
|
|
|
config RNG_OPTEE
|
|
bool "OP-TEE based Random Number Generator support"
|
|
depends on DM_RNG && OPTEE
|
|
default y if OPTEE_SERVICE_DISCOVERY
|
|
help
|
|
This driver provides support for the OP-TEE based Random Number
|
|
Generator on ARM SoCs where hardware entropy sources are not
|
|
accessible to normal world but reserved and used by the OP-TEE
|
|
to avoid the weakness of a software PRNG.
|
|
|
|
config RNG_RISCV_ZKR
|
|
bool "RISC-V Zkr random number generator"
|
|
depends on RISCV_SMODE
|
|
help
|
|
This driver provides a Random Number Generator based on the
|
|
Zkr RISC-V ISA extension which provides an interface to an
|
|
NIST SP 800-90B or BSI AIS-31 compliant physical entropy source.
|
|
|
|
config RNG_STM32
|
|
bool "Enable random number generator for STM32"
|
|
depends on ARCH_STM32 || ARCH_STM32MP
|
|
help
|
|
Enable STM32 rng driver.
|
|
|
|
config RNG_ROCKCHIP
|
|
bool "Enable random number generator for rockchip crypto rng"
|
|
depends on ARCH_ROCKCHIP && DM_RNG
|
|
help
|
|
Enable random number generator for rockchip. This driver
|
|
supports the rng module of crypto v1, crypto v2, and the
|
|
trng module of the rk3588 series.
|
|
|
|
config RNG_IPROC200
|
|
bool "Broadcom iProc RNG200 random number generator"
|
|
depends on DM_RNG
|
|
help
|
|
Enable random number generator for RPI4.
|
|
|
|
config RNG_SMCCC_TRNG
|
|
bool "Arm SMCCC TRNG interface"
|
|
depends on DM_RNG && ARM_PSCI_FW
|
|
default y if ARM_SMCCC_FEATURES
|
|
help
|
|
Enable random number generator for platforms that support Arm
|
|
SMCCC TRNG interface.
|
|
|
|
config RNG_ARM_RNDR
|
|
bool "Generic ARMv8.5 RNDR register"
|
|
depends on DM_RNG && ARM64
|
|
help
|
|
Use the ARMv8.5 RNDR register to provide random numbers.
|
|
|
|
config TPM_RNG
|
|
bool "Enable random number generator on TPM device"
|
|
depends on TPM
|
|
default y
|
|
help
|
|
The TPM device has an inbuilt random number generator
|
|
functionality. Enable random number generator on TPM
|
|
devices.
|
|
|
|
config RNG_JH7110
|
|
bool "StarFive JH7110 Random Number Generator support"
|
|
depends on DM_RNG && STARFIVE_JH7110
|
|
help
|
|
Enable True Random Number Generator in StarFive JH7110 SoCs.
|
|
|
|
config RNG_TURRIS_RWTM
|
|
bool "Turris Mox TRNG in Secure Processor"
|
|
depends on DM_RNG && ARMADA_3700
|
|
help
|
|
Use TRNG in Turris Mox Secure Processor Firmware. Can be used
|
|
on other Armada-3700 devices (like EspressoBin) if Secure
|
|
Firmware from CZ.NIC is used.
|
|
|
|
config RNG_EXYNOS
|
|
bool "Samsung Exynos True Random Number Generator support"
|
|
depends on DM_RNG
|
|
help
|
|
Enable support for True Random Number Generator (TRNG) available on
|
|
Exynos SoCs.
|
|
|
|
On some chips (like Exynos850) TRNG registers are protected with TZPC
|
|
(TrustZone Protection Control). For such chips the driver provides an
|
|
implementation based on SMC calls to EL3 monitor program. In that
|
|
case the LDFW (Loadable Firmware) has to be loaded first, as it
|
|
actually implements TRNG SMC calls.
|
|
|
|
endif
|