[U-Boot] [PATCH 1/3] rockchip: rk3399: add tpl support

Simon Glass sjg at chromium.org
Fri Apr 26 01:07:59 UTC 2019


Hi Heiko,

On Thu, 25 Apr 2019 at 03:00, Heiko Stuebner <heiko at sntech.de> wrote:
>
> Hi Simon,
>
> Am Donnerstag, 25. April 2019, 00:26:28 CEST schrieb Simon Glass:
> > On Thu, 18 Apr 2019 at 10:47, Heiko Stübner <heiko at sntech.de> wrote:
> > >
> > > Am Donnerstag, 18. April 2019, 08:35:49 CEST schrieb Philipp Tomsich:
> > > > Simon,
> > > >
> > > > > On 18.04.2019, at 06:32, Simon Glass <sjg at chromium.org> wrote:
> > > > >
> > > > > Hi Kever,
> > > > >
> > > > > On Mon, 1 Apr 2019 at 02:21, Kever Yang <kever.yang at rock-chips.com> wrote:
> > > > >>
> > > > >> Rockchip platform suppose to use TPL(run in SRAM) as dram init and
> > > > >> SPL(run in DDR SDRAM) as pre-loader, so that the SPL would not be
> > > > >> limited by SRAM size.
> > > > >> This patch add rk3399-board-tpl.c and its common configs.
> > > > >
> > > > > So this means that TPL inits SDRAM? That seems strange to me...why
> > > > > have SPL at all, then? What is SPL supported to do on RK3399
> > > > > platforms?
> > > >
> > > > For TPL->SPL implementation on Rockchip, we generally rely on the BootROM
> > > > to load the TPL stage (to SRAM) and the SPL stage (to the start of DRAM).  The
> > > > BootROM usually limits the size of the SPL stage, so we can’t use a full U-Boot
> > > > already.
> > > >
> > > > Even more constricting are the TPL size constraints (as this seems to have originally
> > > > only been intended to be size-optimized DRAM init code) on some devices.
> > >
> > > and maybe for a broader functionality description, something needs to
> > > load things like ATF via a FIT image from a mmc for example.
> > > (which needs FIT code and also real mmc drivers).
> > >
> > > And as we experienced on rk3288 as well recently, SRAM may be very well
> > > too small to accomplish that, so TPL needs to init the sdram separately
> > > to make room for the code needed to get ATF up and running, which must
> > > be done before jumping into proper uboot.
> >
> > I have to ask what the boot ROM is buying us? U-Boot TPL/SPL can load
> > programs itself without the boot ROM and its size limit. Why not just
> > stop using the boot ROM on these devices?
>
> The problem is more that the sram is to small to hold mmc + fit + everything
> else. So we need at least on some socs
>   bootrom -> tpl (in sram) -> sdram init -> bootrom -> spl (in ddr)
>         (1) -> load fit with u-boot and atf binaries -> jump to ATF -> jump to uboot
> or in falcon mode for vyasa for example
>         (2) -> load linux directly -> jump to Linux

But my understanding is that RK3399 has 192KB of SRAM. How much do you
need? That should be plenty for SPL?

Regards,
Simon


More information about the U-Boot mailing list