[U-Boot-Custodians] SPL / TPL
bmeng.cn at gmail.com
Wed Oct 9 03:14:04 UTC 2019
On Wed, Oct 9, 2019 at 12:50 AM Masahiro Yamada
<yamada.masahiro at socionext.com> wrote:
> Hi Bin,
> On Wed, Oct 9, 2019 at 12:31 AM Bin Meng <bmeng.cn at gmail.com> wrote:
> > Hi,
> > 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.
Thank you very much for the information. This clears my confusion.
> 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.
I think you wanted to say "TPL 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.
It looks to me that we never get in agreement as we have the document
README.TPL describes one boot flow and some other platforms implement
More information about the U-Boot-Custodians