diff mbox series

Kconfig: Don't use RSA_FREESCALE_EXP on MX7ULP

Message ID 20210825135651.77629-1-oleksandr.suvorov@foundries.io
State Changes Requested
Delegated to: Tom Rini
Headers show
Series Kconfig: Don't use RSA_FREESCALE_EXP on MX7ULP | expand

Commit Message

Oleksandr Suvorov Aug. 25, 2021, 1:56 p.m. UTC
From: Ricardo Salveti <ricardo@foundries.io>

The CAAM on IMX7ULP doesn't support public key hardware acceleration
(PKHA), as in other NXP parts. Disable RSA_FREESCALE_EXP for IMX7ULP
too.

Fixed: f4e9ff7135 ("Kconfig: Don't use RSA_FREESCALE_EXP on IMX")
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
---

 lib/rsa/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini Aug. 25, 2021, 2:13 p.m. UTC | #1
On Wed, Aug 25, 2021 at 04:56:51PM +0300, Oleksandr Suvorov wrote:

> From: Ricardo Salveti <ricardo@foundries.io>
> 
> The CAAM on IMX7ULP doesn't support public key hardware acceleration
> (PKHA), as in other NXP parts. Disable RSA_FREESCALE_EXP for IMX7ULP
> too.
> 
> Fixed: f4e9ff7135 ("Kconfig: Don't use RSA_FREESCALE_EXP on IMX")
> Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
> Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
> ---
> 
>  lib/rsa/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/rsa/Kconfig b/lib/rsa/Kconfig
> index a90d67e5a8..55e17596f0 100644
> --- a/lib/rsa/Kconfig
> +++ b/lib/rsa/Kconfig
> @@ -1,6 +1,6 @@
>  config RSA
>  	bool "Use RSA Library"
> -	select RSA_FREESCALE_EXP if FSL_CAAM && !ARCH_MX7 && !ARCH_MX6 && !ARCH_MX5
> +	select RSA_FREESCALE_EXP if FSL_CAAM && !ARCH_MX7 && !ARCH_MX7ULP && !ARCH_MX6 && !ARCH_MX5
>  	select RSA_SOFTWARE_EXP if !RSA_FREESCALE_EXP
>  	help
>  	  RSA support. This enables the RSA algorithm used for FIT image

What iMX families does this work on?  I think we need to look at fixing
the logic to be a bit more restrictive to start with, instead of opting
families out.
Oleksandr Suvorov Aug. 28, 2021, 7:39 a.m. UTC | #2
On Wed, Aug 25, 2021 at 5:13 PM Tom Rini <trini@konsulko.com> wrote:
>
> On Wed, Aug 25, 2021 at 04:56:51PM +0300, Oleksandr Suvorov wrote:
>
> > From: Ricardo Salveti <ricardo@foundries.io>
> >
> > The CAAM on IMX7ULP doesn't support public key hardware acceleration
> > (PKHA), as in other NXP parts. Disable RSA_FREESCALE_EXP for IMX7ULP
> > too.
> >
> > Fixed: f4e9ff7135 ("Kconfig: Don't use RSA_FREESCALE_EXP on IMX")
> > Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
> > Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
> > ---
> >
> >  lib/rsa/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/lib/rsa/Kconfig b/lib/rsa/Kconfig
> > index a90d67e5a8..55e17596f0 100644
> > --- a/lib/rsa/Kconfig
> > +++ b/lib/rsa/Kconfig
> > @@ -1,6 +1,6 @@
> >  config RSA
> >       bool "Use RSA Library"
> > -     select RSA_FREESCALE_EXP if FSL_CAAM && !ARCH_MX7 && !ARCH_MX6 && !ARCH_MX5
> > +     select RSA_FREESCALE_EXP if FSL_CAAM && !ARCH_MX7 && !ARCH_MX7ULP && !ARCH_MX6 && !ARCH_MX5
> >       select RSA_SOFTWARE_EXP if !RSA_FREESCALE_EXP
> >       help
> >         RSA support. This enables the RSA algorithm used for FIT image
>
> What iMX families does this work on?  I think we need to look at fixing
> the logic to be a bit more restrictive to start with, instead of opting
> families out.

Frankly, I dunno. We fix what doesn't work. Investigating all imx families
and reworking everything around would take much more time and can't be done
right now.
Anyway, thanks for your question, I rechecked the patch and improved it.
The v2 is coming.
>
> --
> Tom



--
Best regards,

Oleksandr Suvorov
Software Engineer
W: www.foundries.io
diff mbox series

Patch

diff --git a/lib/rsa/Kconfig b/lib/rsa/Kconfig
index a90d67e5a8..55e17596f0 100644
--- a/lib/rsa/Kconfig
+++ b/lib/rsa/Kconfig
@@ -1,6 +1,6 @@ 
 config RSA
 	bool "Use RSA Library"
-	select RSA_FREESCALE_EXP if FSL_CAAM && !ARCH_MX7 && !ARCH_MX6 && !ARCH_MX5
+	select RSA_FREESCALE_EXP if FSL_CAAM && !ARCH_MX7 && !ARCH_MX7ULP && !ARCH_MX6 && !ARCH_MX5
 	select RSA_SOFTWARE_EXP if !RSA_FREESCALE_EXP
 	help
 	  RSA support. This enables the RSA algorithm used for FIT image