All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [RFC PATCH v1] lib: rsa: introduce RSA_SOFTWARE_EXP_TINY
Date: Wed, 5 May 2021 17:37:31 -0600	[thread overview]
Message-ID: <CAPnjgZ17NEmaQRTZdd_SthF0mHhRncWb3e_W+xbo3dWjEYq_rQ@mail.gmail.com> (raw)
In-Reply-To: <CAL6CDMFdTvgrsohEWw7_YYe3vrVqW4cPkVnnAd4LF3rbC1SeTw@mail.gmail.com>

Hi Igor,

On Wed, 5 May 2021 at 06:58, Igor Opaniuk <igor.opaniuk@foundries.io> wrote:
>
> Hi Simon,
>
> On Thu, Apr 29, 2021 at 7:10 PM Simon Glass <sjg@chromium.org> wrote:
> >
> > Hi Igor,
> >
> > On Fri, 16 Apr 2021 at 01:10, Igor Opaniuk <igor.opaniuk@foundries.io> wrote:
> > >
> > > From: Igor Opaniuk <igor.opaniuk@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@foundries.io>
> > > ---
> > >
> > >  lib/rsa/Kconfig      | 11 ++++++++++-
> > >  lib/rsa/rsa-verify.c |  8 ++++----
> > >  2 files changed, 14 insertions(+), 5 deletions(-)

Regards,
Simon

      reply	other threads:[~2021-05-05 23:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-16  8:10 [RFC PATCH v1] lib: rsa: introduce RSA_SOFTWARE_EXP_TINY Igor Opaniuk
2021-04-29 16:09 ` Simon Glass
2021-05-05 12:58   ` Igor Opaniuk
2021-05-05 23:37     ` Simon Glass [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPnjgZ17NEmaQRTZdd_SthF0mHhRncWb3e_W+xbo3dWjEYq_rQ@mail.gmail.com \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.