[PATCH 1/4] riscv: spl: Introduce SPL_OPENSBI_OS_BOOT

Tom Rini trini at konsulko.com
Mon Dec 12 16:52:07 CET 2022


On Mon, Dec 12, 2022 at 03:49:10PM +0800, Rick Chen wrote:
> > On 12/7/22 01:23, Rick Chen wrote:
> > > In RISC-V, it only provide normal mode booting currently.
> > > To speed up the booting process, here provide SPL_OPENSBI_OS_BOOT
> > > to achieve this feature which will be call Fast-Boot mode. By
> >
> > Can you name this something different. We already have something called
> > fastboot in-tree (the Android-derived protocol) and there's a Microsoft
> > technology called fastboot (some kind of hibernation). "OS Boot" isn't
> > very specific either, since we (almost always) boot an OS. Maybe "Eagle
> > mode" by analogy to Falcon mode, which lets SPL directly boot an OS.
> 
> I think fast boot is a behavior which shall be interpreted widely but
> not proprietary.
> Or maybe I can  rename it as RISC-V Fast Boot to distinguish them.
> 
> >
> > (Is this substantially different from falcon mode anyway?)
> 
> Please see the explanations to Tom.
> 
> >
> > > enabling SPL_OPENSBI_OS_BOOT, it will generate linux.itb instead
> > > of default u-boot.itb after compiling. It initializes memory with
> > > the U-Boot SPL at the first stage, just like what a regular booting
> > > process (i.e. Normal Boot) does in the beginning. Instead of jumping
> > > to the U-Boot proper from OpenSBI before booting Linux Kernel, the
> > > Fast Boot process jumps directly to Linux Kernel to gain shorter
> > > booting time.
> > >
> > > Signed-off-by: Rick Chen <rick at andestech.com>
> > > ---
> > >   common/spl/Kconfig       | 14 ++++++++++++++
> > >   common/spl/spl_fit.c     |  3 ++-
> > >   common/spl/spl_opensbi.c | 25 ++++++++++++-------------
> > >   3 files changed, 28 insertions(+), 14 deletions(-)
> > >
> > > diff --git a/common/spl/Kconfig b/common/spl/Kconfig
> > > index 05181bdba3..8805aba1b7 100644
> > > --- a/common/spl/Kconfig
> > > +++ b/common/spl/Kconfig
> > > @@ -1509,6 +1509,20 @@ config SPL_OPENSBI_SCRATCH_OPTIONS
> > >         Options passed to fw_dynamic, for example SBI_SCRATCH_NO_BOOT_PRINTS or
> > >         SBI_SCRATCH_DEBUG_PRINTS.
> > >
> > > +config SPL_OPENSBI_OS_BOOT
> >
> > Please use the same name for the config as for the description.
> >
> > > +     bool "openSBI Fast Boot"
> > > +     depends on SPL_OPENSBI
> > > +     help
> > > +       Enable this openSBI can jump to Linux Kernel directly.
> >
> > Can you put some of the explanation from the commit message here?
> 
> OK, I will move some messages here from commit messages.
> 
> >
> > > +
> > > +config SPL_OPENSBI_FIT_NAME
> > > +     string "SPL openSBI fit image name"
> > > +     depends on SPL_OPENSBI
> > > +     default "linux.itb" if SPL_OPENSBI_OS_BOOT
> > > +     default "u-boot.itb"
> > > +     help
> > > +       This will help to generate different fit name accordingly.
> >
> > Why not SPL_FS_LOAD_PAYLOAD_NAME?
> >
> > It looks like the code changes below do not use these configs. Can you
> > move them to the next patch so it is clearer that they are for binman?
> 
> I have saw this config, but it does't support SPL_RAM but only for filesystem
> That is why I don't leverage it.
> 
> I can prepare a patch as below if no other concerns:
> 
> config SPL_FS_LOAD_PAYLOAD_NAME
> string "File to load for U-Boot from the filesystem"
> depends on SPL_FS_EXT4 || SPL_FS_FAT || SPL_FS_SQUASHFS || SPL_RAM
> default "tispl.bin" if SYS_K3_SPL_ATF
> default "u-boot.itb" if SPL_LOAD_FIT
> default "linux.itb" if SPL_OPENSBI_OS_BOOT
> default "u-boot.img"
> help
>   Filename to read to load U-Boot when reading from filesystem.

But in the case you have it's for the output name, and not at all about
what's being loaded from a filesystem yes? This shouldn't be a "SPL_.."
option, but should be under arch/riscv/Kconfig somewhere, since it's
changing the general riscv binman.dtsi file. And on a related note,
please make sure that 'make htmldocs' is happy with your documentation
changes as I think I see some spacing problems in 4/4.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20221212/332080d4/attachment.sig>


More information about the U-Boot mailing list