Hi Simon,

On Sun, Aug 25, 2024 at 6:07 AM Simon Glass <s...@chromium.org> wrote:
>
> Hi,
>
> We have the term 'SPL', which has a dual meaning. It is both a
> particular phase of U-Boot (the one that loads U-Boot proper) and a
> generic name for any pre-proper phase.

ZBL or ZSBL: Zeroth Stage Boot Loader (usually in MaskROM)

SPL: Secondary Program Loader is what gets loaded by ZSBL and jump
code execution to next

Everything after SPL seems like an invention of naming, and yes it is confusing!

>
> You can see that in a few areas, but for example CONFIG_SPL_BUILD is
> enabled for TPL and VPL builds, not just SPL.
>
> I propose to rename the generic term from SPL to xPL (meaning any PL
> phase), leaving SPL to just refer to the phase before U-Boot proper.
>
> The symbol would be CONFIG_XPL but in documentation we would talk of
> xPL, with a lower-case X, so it is more obvious that it refers to any
> phase.
>
> What do you think?
>
> Regards,
> Simon

Secondary / Tertiary / Verifying / U-Boot from documentation:

https://docs.u-boot.org/en/latest/usage/spl_boot.html

... does not add much clarity to what these programs do, excepting
"verifying" which is at least saying what it does.

When code execution is transferred to U-Boot (as SPL from ZSBL) then
it is simply U-Boot Program if you need a short acronym: UP UBP UPRG
UPGM UBPG

Add to this the descriptive short word name modifier of what that
U-Boot Program does:

TINY
VERIFY
SETUP
MAIN

Taking for example UP and TINY we would have UP_TINY UP_VERIFY UP_SETUP UP_MAIN

Any of these would be the SPL if they are loaded by the ZSBL, simple
enough. Also keeping the same mnemonic first letter to what it is
already now for making it less disruptive.

My comment then is that if you want it to be less confusing we should
get away from "SPL" (x)PL naming so it looks nothing like ZSBL or SPL
acronym. Also I observe that U-Boot code base norms are unnecessarily
cryptic and weirdly abbreviated descriptions in the guise of "reducing
code size" at the expense of readability... and it is welcome to me if
you can improve this with _less_ cryptic naming and descriptions.
Sorry "xPL" is more cryptic than it is now and keeps the overloading
of the "SPL" terminology which is the cause of confusion.

-E

Reply via email to