[U-Boot-Custodians] SPL / TPL

Tom Rini trini at konsulko.com
Fri Oct 11 03:17:03 UTC 2019


On Fri, Oct 11, 2019 at 12:10:53PM +0900, Masahiro Yamada wrote:
> On Fri, Oct 11, 2019 at 4:08 AM Tom Rini <trini at konsulko.com> wrote:
> >
> > On Thu, Oct 10, 2019 at 09:46:38AM +0200, Marek Vasut wrote:
> > > On 10/10/19 9:40 AM, Wolfgang Denk wrote:
> > > > Dear Masahiro,
> > > >
> > > > In message <CAK7LNAR45-6SEAeGyjT8o5jP=6iNcSP=A4pW2rQV9V_JfGTi0w at mail.gmail.com> you wrote:
> > > >>
> > > >> This discussion started from this patch:
> > > >> https://patchwork.ozlabs.org/patch/662396/
> > > >>
> > > >> It happened before the rockchip stuff.
> > > >
> > > > Yes, thanks for the link. Apparently I missed that discussion then :-(
> > > >
> > > > I still cannot see where this thinking that "SPL is big and has all
> > > > features" and "TPL is small" is coming from.  If someone has
> > > > implemented it in this way, then he did a major mistake.
> > >
> > > Note that back in the old OneNAND days, TPL was used as the 1 kiB tiny
> > > loader and that loaded the SPL. Even today, there are less features
> > > available for TPL than for SPL, although they are constantly being added
> > > to make these two things virtually identical. So I have a feeling that
> > > this situation naturally evolved that TPL is smaller than SPL and goes
> > > before SPL.
> > >
> > > Just out of curiosity, how many platforms are there that do
> > > SPL->TPL->U-Boot and how many do TPL->SPL->U-Boot ?
> >
> > This last point here is what I'm also wondering about.
> 
> 
> You can check that by building every board with CONFIG_TPL=y,
> and comparing the sizes between SPL and TPL.
> 
> 
> 
> For example, I built  evb-rk3229_defconfig, and got this:
> 
> $ arm-linux-gnueabihf-size   spl/u-boot-spl
>    text    data     bss     dec     hex filename
>   32818    1836      20   34674    8772 spl/u-boot-spl
> $ arm-linux-gnueabihf-size   tpl/u-boot-tpl
>    text    data     bss     dec     hex filename
>   19558    2516      76   22150    5686 tpl/u-boot-tpl
> 
> 
> TPL is smaller than SPL, so the rockchip platforms work
> in the boot order of TPL -> SPL -> U-Boot
> 
> 
> As for rockchip cases, TPL is smaller than SPL, but
> is not as small as 4KB.
> 
> Was the 3-stage bootstrap needed
> in the first place?

I believe the answer is yes, Rockchip (and a few other aarch64
platforms) have small and non-power-of-2 initial memory constraints.

Does TPL set things up enough such that it could load U-Boot itself is a
good question, and the role of ATF/etc may make that more complicated.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot-custodians/attachments/20191010/f84abf71/attachment-0001.sig>


More information about the U-Boot-Custodians mailing list