On Tue, Dec 13, 2022 at 10:06:50AM +0800, Rick Chen wrote: > > 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 <r...@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_.." > > For SPL_RAM purpose, > it is just an output name to distinguish normal boot (u-boot.itb) and > fast boot (linux.itb) indeed. > > But for SPL_OPENSBI_OS_BOOT && SPL_MMC && SPL_FAT this combination, > it can help to load linux.itb automatically from SD card.
What part of the world is looking for the file named by SPL_FS_LOAD_PAYLOAD_NAME ? (and this is related to what I just sent out, asking about the boot flow) > > option, but should be under arch/riscv/Kconfig somewhere, since it's > > changing the general riscv binman.dtsi file. And on a related note, > > I will fall back on the earlier changes and move > SPL_OPENSBI_OS_BOOT and SPL_OPENSBI_FIT_NAME to arch/riscv/Kconfig. > > > please make sure that 'make htmldocs' is happy with your documentation > > changes as I think I see some spacing problems in 4/4. > > Sorry about the spacing problems. I will check it. OK, thanks. -- Tom
signature.asc
Description: PGP signature