[U-Boot] [PATCH 6/7] configs: tinker: Enable SDRAM, SPL stack

Jagan Teki jagan at amarulasolutions.com
Wed Sep 18 05:25:32 UTC 2019


On Wed, Sep 18, 2019 at 10:36 AM Kever Yang <kever.yang at rock-chips.com> wrote:
>
>
> On 2019/9/17 下午2:10, Jagan Teki wrote:
> > SPL sets up SDRAM while in its board_init_f()
> > function, it is possible for the stack to move
> > there before board_init_r() is reached.
> >
> > So it is required to reserve the stack for SDRAM,
> > with a proper location and size otherwise any
> > operations during SPL handoff would leads to failure.
> >
> > On, this particular context tinker-rk3288 SPL is
> > failing to launch U-Boot proper on SDRAM due to
> > lack of stack.
>
> If no SPL_STACK_R, it should still use CONFIG_SPL_STACK when system
> init, right?

SPL_STACK vs SPL_STTACK_R would be different in their usage former is
used to setup the stack during early while calling board_init_f but
the later used to setup the stack (with DRAM base) while calling
board_init_r. if CONFIG_SPL_STACK_R is defined, then at this point the
stack and global_data are relocated to below CONFIG_SPL_STACK_R_ADDR.

CONFIG_SPL_STACK_R_ADDR - 0x80000 (this would be as part of sdram map)
CONFIG_SPL_STACK  - 0xff718000 (this address where SDRAM not been used)

Since the issue, is due to launch U-Boot proper from mmc, the stack
that SPL during that time was not set it up.

>
> It sounds like this should not cause failure if there no one touch the
> CONFIG_SPL_STACK area.

I remember while implementing TPL, on vyasa I do take care of this
STACK_R, so same been reused it for tinker.


More information about the U-Boot mailing list