From e53a3fe8b9b184731e569bbcd2da86c8cb5a7a3b Mon Sep 17 00:00:00 2001 From: Volodymyr Babchuk Date: Tue, 16 Jan 2024 22:35:00 +0200 Subject: [PATCH] plat: rcar-gen3: disable HWRNG by default Sometimes ROM code fails to provide random numbers, which leads to OP-TEE panic with "ROM_GetRndVector() returned error!" message. So far this behavior was observed only on M3 Ver.3.0, but it is unclear if other SoCs are affected. There is a workaround which retries and operation and this workaround seems to work, but again, it is unclear if this is the correct way to deal with the issue. So it is better to disable use of HWRNG by default, until we get clarification on those errors from Renesas. This patch moves HWRNG code under CFG_RCAR_GEN3_HWRNG option, so expert user still can try to use it. Signed-off-by: Volodymyr Babchuk --- core/arch/arm/plat-rcar/conf.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/arch/arm/plat-rcar/conf.mk b/core/arch/arm/plat-rcar/conf.mk index 0de4143dfed..c810dfeb838 100644 --- a/core/arch/arm/plat-rcar/conf.mk +++ b/core/arch/arm/plat-rcar/conf.mk @@ -24,12 +24,15 @@ CFG_TEE_RAM_VA_SIZE ?= 0x100000 supported-ta-targets = ta_arm64 ifeq ($(CFG_RCAR_GEN3), y) +CFG_DT ?= y +ifeq ($(CFG_RCAR_GEN3_HWRNG), y) +$(warning "Warning: Use of HWRNG can cause crashes on some Renesas SoCs") CFG_WITH_SOFTWARE_PRNG ?= n CFG_HWRNG_QUALITY ?= 1024 CFG_HWRNG_PTA ?= y -CFG_DT ?= y $(call force,CFG_RCAR_ROMAPI, y) endif +endif ifeq ($(CFG_RCAR_GEN4), y) # 1xx - for SCIFxx