[PATCH 2/3] crypto/fsl: Introduce SPL_FSL_CAAM_RNG

Tim Harvey tharvey at gateworks.com
Fri Apr 26 02:16:57 CEST 2024


On Thu, Apr 25, 2024 at 4:03 PM Marek Vasut <marex at denx.de> wrote:
>
> Add SPL variant of SPL_FSL_CAAM_RNG so that the SPL_FSL_CAAM_RNG can
> be disabled in SPL if necessary. This may be necessary due to e.g.
> size constraints of the SPL.
>
> Signed-off-by: Marek Vasut <marex at denx.de>
> ---
> Cc: Angelo Dureghello <angelo at kernel-space.org>
> Cc: Emanuele Ghidoli <emanuele.ghidoli at toradex.com>
> Cc: Fabio Estevam <festevam at gmail.com>
> Cc: Gaurav Jain <gaurav.jain at nxp.com>
> Cc: Heinrich Schuchardt <xypron.glpk at gmx.de>
> Cc: Marek Vasut <marex at denx.de>
> Cc: Michal Simek <michal.simek at amd.com>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Stefan Roese <sr at denx.de>
> Cc: Sughosh Ganu <sughosh.ganu at linaro.org>
> Cc: Svyatoslav Ryhel <clamor95 at gmail.com>
> Cc: Tim Harvey <tharvey at gateworks.com>
> Cc: Tom Rini <trini at konsulko.com>
> Cc: u-boot at lists.denx.de
> ---
>  drivers/crypto/fsl/Kconfig  | 7 +++++++
>  drivers/crypto/fsl/Makefile | 2 +-
>  2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/fsl/Kconfig b/drivers/crypto/fsl/Kconfig
> index 294e1c8a44e..9f58731bb67 100644
> --- a/drivers/crypto/fsl/Kconfig
> +++ b/drivers/crypto/fsl/Kconfig
> @@ -78,6 +78,13 @@ config FSL_CAAM_RNG
>           using the prediction resistance flag which means the DRGB is
>           reseeded from the TRNG every time random data is generated.
>
> +config SPL_FSL_CAAM_RNG
> +       bool "Enable CAAM Random Number Generator support in SPL"
> +       depends on SPL_DM_RNG
> +       help
> +         This option is an SPL-variant of the FSL_CAAM_RNG option.
> +         See the help of FSL_CAAM_RNG for details.
> +
>  endif
>
>  config FSL_DCP_RNG
> diff --git a/drivers/crypto/fsl/Makefile b/drivers/crypto/fsl/Makefile
> index 7a2543e16cc..4fbce519a0b 100644
> --- a/drivers/crypto/fsl/Makefile
> +++ b/drivers/crypto/fsl/Makefile
> @@ -6,6 +6,6 @@ obj-y += sec.o
>  obj-$(CONFIG_FSL_CAAM) += jr.o fsl_hash.o jobdesc.o error.o
>  obj-$(CONFIG_CMD_BLOB)$(CONFIG_IMX_CAAM_DEK_ENCAP) += fsl_blob.o
>  obj-$(CONFIG_RSA_FREESCALE_EXP) += fsl_rsa.o
> -obj-$(CONFIG_FSL_CAAM_RNG) += rng.o
> +obj-$(CONFIG_$(SPL_TPL_)FSL_CAAM_RNG) += rng.o
>  obj-$(CONFIG_FSL_DCP_RNG) += dcp_rng.o
>  obj-$(CONFIG_FSL_MFGPROT) += fsl_mfgprot.o
> --
> 2.43.0
>

Marek,

Thanks - this series does solve the issue I am seeing in the SPL when
enabling DM_RNG. Is this going to cause an issue for people who expect
it to be currently enabled and now have to manually enable it?

Best Regards,

Tim


More information about the U-Boot mailing list