]> git.baikalelectronics.ru Git - uboot.git/commit
crypto/fsl: instantiate all rng state handles
authorLukas Auer <lukas.auer@aisec.fraunhofer.de>
Thu, 25 Jan 2018 13:11:17 +0000 (14:11 +0100)
committerYork Sun <york.sun@nxp.com>
Fri, 9 Feb 2018 16:34:34 +0000 (08:34 -0800)
commitfe5c634747b91d3cb951f6e5b7737118780b4514
treeaef79e6d053863156d99b82d2efeacaab7f7bace
parentf81c7719237df32e49870d75fa20ab6fa5774695
crypto/fsl: instantiate all rng state handles

Extend the instantiate_rng() function and the corresponding CAAM job
descriptor to instantiate all RNG state handles. This moves the RNG
instantiation code in line with the CAAM kernel driver.

Previously, only the first state handle was instantiated. The second
one was instantiated by the CAAM kernel driver. This works if the
kernel runs in secure mode, but fails in non-secure mode since the
kernel driver uses DEC0 directly instead of over the job ring
interface. Instantiating all RNG state handles in u-boot removes the
need for using DEC0 in the kernel driver, making it possible to use
the CAAM in non-secure mode.

Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: York Sun <york.sun@nxp.com>
drivers/crypto/fsl/jobdesc.c
drivers/crypto/fsl/jobdesc.h
drivers/crypto/fsl/jr.c
drivers/crypto/fsl/jr.h
include/fsl_sec.h