[RFC PATCH v1] lib: rsa: introduce RSA_SOFTWARE_EXP_TINY
Simon Glass
sjg at chromium.org
Thu May 6 01:37:31 CEST 2021
Hi Igor,
On Wed, 5 May 2021 at 06:58, Igor Opaniuk <igor.opaniuk at foundries.io> wrote:
>
> Hi Simon,
>
> On Thu, Apr 29, 2021 at 7:10 PM Simon Glass <sjg at chromium.org> wrote:
> >
> > Hi Igor,
> >
> > On Fri, 16 Apr 2021 at 01:10, Igor Opaniuk <igor.opaniuk at foundries.io> wrote:
> > >
> > > From: Igor Opaniuk <igor.opaniuk at foundries.io>
> > >
> > > Introduce RSA_SOFTWARE_EXP_TINY Kconfig option, which does not require
> > > DM to be enabled. This can be handy on devices, where SPL + signed
> > > U-Boot FIT image setup is used, where it isn't possible to enable SPL_DM
> > > mainly due to SRAM size constraits.
> > >
> > > For example, on iMX8MM with this option enabled and SPL_DM disabled
> > > it's possible to save almost 11Kb:
> >
> > That seems a lot...do you have OF_PLATDATA enabled?
> Nope, it's not enabled.
I think you should look at that first. It is likely to give a much
larger benefit.
> I've managed to get these numbers when experimenting with NXP U-Boot fork,
> which is based on 2020.04.
>
> I also checked a while ago iMX6ULL mainline U-Boot with this patch, and size
> decrease was around 4-5 Kb, which basically is also not bad (considering 64Kb
> SPL size limitation for this SoC).
OK I see, but if we did this with every subsystem won't we end up with
chaos? There will be cases where driver model is impossible, but with
64KB (which I assume you mean) I would hope that we could avoid it.
>
> >
> > >
> > > With RSA_SOFTWARE_EXP_TINY enabled:
> > > spl/u-boot-spl-nodtb.bin 99824
> > >
> > > Without:
> > > spl/u-boot-spl-nodtb.bin 111088
> > >
> > > Signed-off-by: Igor Opaniuk <igor.opaniuk at foundries.io>
> > > ---
> > >
> > > lib/rsa/Kconfig | 11 ++++++++++-
> > > lib/rsa/rsa-verify.c | 8 ++++----
> > > 2 files changed, 14 insertions(+), 5 deletions(-)
Regards,
Simon
More information about the U-Boot
mailing list