[U-Boot-Custodians] SPL / TPL
yamada.masahiro at socionext.com
Tue Oct 8 16:49:01 UTC 2019
On Wed, Oct 9, 2019 at 12:31 AM Bin Meng <bmeng.cn at gmail.com> wrote:
> Simon is on vacation, hence I hoped to get the clarification from
> other maintainers.
> As I see in U-Boot currently only NXP PowerPC uses TPL in the NAND
> configurations, and some ARM boards use TPL.
> It looks in x86 we are using TPL in a different boot flow and this
> confused me a lot in the past.
> In x86 we expect TPL to load SPL then U-Boot proper. (TPL => SPL =>
> U-Boot proper)
> However in README.TPL, it says TPL is the 3rd program loader, to be
> loaded by SPL. So if my read is correct, the expected boot flow is SPL
> => TPL => U-Boot proper.
> I believe only one boot flow is the correct way. So which one is correct?
When the TPL support was first developed,
it worked as SPL -> TPL -> U-Boot proper.
SPL is a short of Secondary Program Loader,
and TPL was Tertiary Program Loader.
For the platforms using this 3 stage bootstrap,
its SPL is really small (and implemented in a rather ad-hoc way)
and its TPL tends to be as large as the SPL of other non-TPL platforms.
I noticed some problems in the SPL framework
because TPL corresponds to SPL of the 2-stage-boot platforms.
As a result, we end up with duplicating SPL configuraion
like CONFIG_SPL_FOO, CONFIG_SPL_BAR,
to CONFIG_TPL_FOO, CONFIG_TPL_BAR.
I pointed out TPL -> SPL -> U-Boot proper
would make more sense.
TPL (let's say Tiny Program Loader) is a really small
implementation for that platform,
and SPL can re-use the common SPL framework.
This requires flipping the boot order.
I do not know how much consensus we got,
or documented somewhere, though.
> U-Boot-Custodians mailing list
> U-Boot-Custodians at lists.denx.de
More information about the U-Boot-Custodians