diff options
author | Leo Yan <leo.yan@arm.com> | 2024-07-09 17:23:09 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-07-18 07:40:30 -0600 |
commit | 51ebe8cd6a53102ca80881fa9eb2ae653bf9cb08 (patch) | |
tree | b8f487a5d72982d3868dc45e3f6a387d02c529a7 | |
parent | f6503fad0c97c6daa33ae7a290520ac4418cf386 (diff) |
driver: rng: Do not check ARM_SMCCC_TRNG_VERSION
As described in the document SMC Calling Convention (ARM DEN 0028 1.5 F),
section 7 "Arm Architecture Calls", the SMC call SMCCC_ARCH_FEATURES is
not expected to support the function ID ARM_SMCCC_TRNG_VERSION. Trusted
Firmware-A follows up the specification in its implementation.
This commit removes the invocation to avoid the failure - which is a
wrong calling in U-boot. The later code invokes ARM_SMCCC_TRNG_VERSION
for retrieving the TRNG version, except it can read back the version
number, it also can be used to detect whether the TRNG is supported or
not.
Signed-off-by: Leo Yan <leo.yan@arm.com>
Reviewed-by: Weizhao Ouyang <o451686892@gmail.com>
-rw-r--r-- | drivers/rng/smccc_trng.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/rng/smccc_trng.c b/drivers/rng/smccc_trng.c index f59b80666b3..1da1affd8e8 100644 --- a/drivers/rng/smccc_trng.c +++ b/drivers/rng/smccc_trng.c @@ -135,10 +135,6 @@ static bool smccc_trng_is_supported(void (*invoke_fn)(unsigned long a0, unsigned { struct arm_smccc_res res; - (*invoke_fn)(ARM_SMCCC_ARCH_FEATURES, ARM_SMCCC_TRNG_VERSION, 0, 0, 0, 0, 0, 0, &res); - if (res.a0 == ARM_SMCCC_RET_NOT_SUPPORTED) - return false; - (*invoke_fn)(ARM_SMCCC_TRNG_VERSION, 0, 0, 0, 0, 0, 0, 0, &res); if (res.a0 & BIT(31)) return false; |