Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1D423C4332F for ; Wed, 14 Dec 2022 01:54:51 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 42EB684FD4; Wed, 14 Dec 2022 02:54:49 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="Dupck3DY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5B78A8502B; Wed, 14 Dec 2022 02:54:47 +0100 (CET) Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7EF1E84F6B for ; Wed, 14 Dec 2022 02:54:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x835.google.com with SMTP id jr11so1453316qtb.7 for ; Tue, 13 Dec 2022 17:54:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=4Ptt7wTHwgkx7dYw5g4t+ZbMLmEOEZVH5TlGVmxtx/w=; b=Dupck3DYP3Zm68r1QqWYEeGdhDqqwRdCpDVog9bd7P6f0ngsiach7KLxr8N6+CzZ/M Z0g2xJAx2L2aX1W6yGlK0zofVl/TkNQE3kjSR0lQUeBI1CYpoBabpe8H78hBjICqUgXc oiTADUooj2Tvi1E/+QqpzpQuZsfMrPiWII/Ds= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=4Ptt7wTHwgkx7dYw5g4t+ZbMLmEOEZVH5TlGVmxtx/w=; b=QyCCJIxjbfUUtRtpJCh2tDzF4K9KDPxU0gQHsNhkykHPiXkYH+zT0+J09nXXWMix6N SW5PIrYJIX0GtZLgpVlgdtq7OloS/3hIndO9T3kA1/uk3nO0jF1kaMrknihqqUIo0cik kmt4w/1f2Iw3B43is9ETt3Kgv6Jsxmz7vWA6gAn4l7hmtCTw/6dr5CN8uRIMebq6NDYT g/Tc3uewELUq+hylwYj6nhpRSVhEY11B0XIovP2aWcwFj22CB8ImiIICUAlHFEehEiXZ A53q9QdP3x/CSHpxiH+qXXNJuwkg8SMrLOP5ej/+U4s0WspvLBm5bp4JCPtAgl9z89ld mROg== X-Gm-Message-State: ANoB5pmM7Moeqoy8icPFI2B1sWjxadO3U/KuBap8eTJKfHlgyO9aJhUa FiFd4KnQUs8ibciDbwTRn61AnV9DDsqs78R5Mhk= X-Google-Smtp-Source: AA0mqf4cFPOBzFMk+mIG7tY83b//DOy+G8p771/I0X0AWKRIN/T3wLXvhDhE8U3oGeFSnTWVw+vZQw== X-Received: by 2002:a05:622a:1b1c:b0:3a6:a205:741f with SMTP id bb28-20020a05622a1b1c00b003a6a205741fmr31484313qtb.32.1670982883059; Tue, 13 Dec 2022 17:54:43 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-09de-b540-f7da-b28e.res6.spectrum.com. [2603:6081:7b00:6400:9de:b540:f7da:b28e]) by smtp.gmail.com with ESMTPSA id x29-20020a05620a0b5d00b006fc40dafaa2sm9022550qkg.8.2022.12.13.17.54.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Dec 2022 17:54:42 -0800 (PST) Date: Tue, 13 Dec 2022 20:54:40 -0500 From: Tom Rini To: Rick Chen Cc: Sean Anderson , Rick Chen , ycliang@andestech.com, u-boot@lists.denx.de, sjg@chromium.org, xypron.glpk@gmx.de Subject: Re: [PATCH 1/4] riscv: spl: Introduce SPL_OPENSBI_OS_BOOT Message-ID: <20221214015440.GF3787616@bill-the-cat> References: <20221207062334.21292-1-rick@andestech.com> <1162c5df-dcfc-0908-1d07-32145e3a6aaa@gmail.com> <20221212155207.GW3787616@bill-the-cat> <20221213162716.GY3787616@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="80dYq6j0moCWVTvj" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean --80dYq6j0moCWVTvj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 14, 2022 at 08:49:03AM +0800, Rick Chen wrote: > Hi Tom, >=20 > > 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 somethin= g called > > > > > > fastboot in-tree (the Android-derived protocol) and there's a M= icrosoft > > > > > > technology called fastboot (some kind of hibernation). "OS Boot= " isn't > > > > > > very specific either, since we (almost always) boot an OS. Mayb= e "Eagle > > > > > > mode" by analogy to Falcon mode, which lets SPL directly boot a= n 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 inst= ead > > > > > > > of default u-boot.itb after compiling. It initializes memory = with > > > > > > > the U-Boot SPL at the first stage, just like what a regular b= ooting > > > > > > > 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 shor= ter > > > > > > > booting time. > > > > > > > > > > > > > > Signed-off-by: Rick Chen > > > > > > > --- > > > > > > > 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 her= e? > > > > > > > > > > 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 accordi= ngly. > > > > > > > > > > > > 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 fo= r 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 a= bout > > > > 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) >=20 > In the following commit, CONFIG_SPL_FS_LOAD_PAYLOAD_NAME has been > moved to Kconfig from ax25-ae350.h > That is why I try to add this change to load u-boot.itb or linux.itb > from SD card here >=20 > commit 4a11e34bc9c0f3818f3e847ac51c82d1c9bbb807 > Author: Tom Rini > Date: Fri May 13 17:12:35 2022 -0400 >=20 > Convert CONFIG_SPL_FS_LOAD_PAYLOAD_NAME et al to Kconfig >=20 > ... >=20 > +++ b/include/configs/ax25-ae350.h > @@ -11,10 +11,6 @@ > #define CONFIG_SPL_MAX_SIZE 0x00100000 > #define CONFIG_SPL_BSS_START_ADDR 0x04000000 > #define CONFIG_SPL_BSS_MAX_SIZE 0x00100000 > - > -#ifdef CONFIG_SPL_MMC > -#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.itb" > -#endif Yes, I made a best guess "what do I need to do to have zero size change" migration of that option, along with most others. So, sorry, my original question remains. In real world usage, what is using that name? The regular usage here is that SPL knows to read from FAT (or similar) that name as a hard-coded default. --=20 Tom --80dYq6j0moCWVTvj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmOZLN0ACgkQFHw5/5Y0 tyyksgwAtUeRRwJe6enxy6xzggesTEa9XHECPNxxDhDjlCH8CABpOzM2V6wQULmt GQ1M7aggqkNptFVbXgOkPBnSpW3aw7lhHK3I2DHd0rOFK4DqxiLGgDAH/c4uBttw q9OCxocAgxwnnC2ILA6QQdjvXk60+bgV3ICDX9HYoYZaGCzwDVGit/U3djjDEKdA vxS1NPTIBSoKoSxqRelYwZAyAKeD3wyk3bPcZAFrtNB2loc86K5EdDJq3b87vihg QzIhCHPglPi0Hz0Eszpkxak/WOTnYrxcOrkRnf/QWFPfA/2eWdIREqtIAyicudfY H5AeoAzCZsD8NWBM/a53l86O2yNNmz32/DMEilnFkb2dREHwC3dD77qxaYGfuIq+ 7Qx8hV8r0ie0iyCwScFNllJSYcsxVqJwZyt+2kGispaOtOmJwygrmw0YgcHPqL04 a3bda8wL+0fC1+EoVHK1JsXU4Zmx3ruxQLdAEbEgbCGAAUNQ9H9H/SFakqxOoXG3 hnq7UsB0 =4/6F -----END PGP SIGNATURE----- --80dYq6j0moCWVTvj--