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 44A50C4332F for ; Tue, 13 Dec 2022 16:27:26 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0A41F84FBF; Tue, 13 Dec 2022 17:27:24 +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="qzLGusAW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CA78185061; Tue, 13 Dec 2022 17:27:22 +0100 (CET) Received: from mail-vs1-xe2f.google.com (mail-vs1-xe2f.google.com [IPv6:2607:f8b0:4864:20::e2f]) (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 03C3F84EA1 for ; Tue, 13 Dec 2022 17:27:20 +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-vs1-xe2f.google.com with SMTP id 128so15129972vsz.12 for ; Tue, 13 Dec 2022 08:27:19 -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=9Fs4KpHY9ET24m5RIQYJjdKB4ZgAwrDi4sfTsY5620U=; b=qzLGusAW4lC5Nfs8mO7GtbkmVxgMjPX1Qb0xWKrP31nr0aJVNZv9J1xwegkkfyp9PQ QnyfmUVexfyIqkzTJEyteiq/toq26zAdQTGBaJq/GGNGMEIkWm2Cg19nWq1WAE/ID2Hn DdfNhjY9lqxmm0xG9pSvs5XfVhln+ijpNHwrY= 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=9Fs4KpHY9ET24m5RIQYJjdKB4ZgAwrDi4sfTsY5620U=; b=w1XWF1FJMgAONHhjMVutMFOchI7iO036YR26vgRbaX1w/OC8Fq14Q+406HDbsBZveo CNdwm/HhfqWI53wxO0F/MLAdpcWSW1RC/htiOJcQVjg3Lj8hTi57kQEWKuy7MjBUOAT/ EVdNPlvGY1Jzm4YCNini8PoY+Zg6v2yqmSUvJWJ60+0lNs1LlrdSvfsLl8bjve8iaZ+n ZvRstijDXAGCoXghETlsRXOGB5/Y8948O7ydxV3LHVYzHzqW6v9J8owAxfglYT6gLS0Z ki6YNv5LkmFCkJglCyuytU7lDnPf9FdQGcuegm4gwTsIosOKY+eZdB11KYmIioecUBNc +DWA== X-Gm-Message-State: ANoB5pmVOzzZkHALlmCwj8ReiDOSZxdn0FH/1f0XPCwYvHiJWQneivNz 74hSrLPRHDrS3yRI3CXk08TiDQ== X-Google-Smtp-Source: AA0mqf60802y9LikRSTzbNARXsXuY00Eynvb0RMIopWwFJxpLFlifw4q3ckeIPsF+V3A7CwyKvSYQQ== X-Received: by 2002:a67:fc89:0:b0:3b2:f668:4d8c with SMTP id x9-20020a67fc89000000b003b2f6684d8cmr11326770vsp.27.1670948838742; Tue, 13 Dec 2022 08:27:18 -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 j21-20020a05620a289500b006cf19068261sm7800867qkp.116.2022.12.13.08.27.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Dec 2022 08:27:18 -0800 (PST) Date: Tue, 13 Dec 2022 11:27:16 -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: <20221213162716.GY3787616@bill-the-cat> References: <20221207062334.21292-1-rick@andestech.com> <1162c5df-dcfc-0908-1d07-32145e3a6aaa@gmail.com> <20221212155207.GW3787616@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="8qb+3UqkCLRb0k5+" 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 --8qb+3UqkCLRb0k5+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 ca= lled > > > > fastboot in-tree (the Android-derived protocol) and there's a Micro= soft > > > > technology called fastboot (some kind of hibernation). "OS Boot" is= n't > > > > very specific either, since we (almost always) boot an OS. Maybe "E= agle > > > > 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 booti= ng > > > > > process (i.e. Normal Boot) does in the beginning. Instead of jump= ing > > > > > 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 > > > > > --- > > > > > 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 binm= an? > > > > > > I have saw this config, but it does't support SPL_RAM but only for fi= lesystem > > > 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_.." >=20 > For SPL_RAM purpose, > it is just an output name to distinguish normal boot (u-boot.itb) and > fast boot (linux.itb) indeed. >=20 > 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, >=20 > I will fall back on the earlier changes and move > SPL_OPENSBI_OS_BOOT and SPL_OPENSBI_FIT_NAME to arch/riscv/Kconfig. >=20 > > please make sure that 'make htmldocs' is happy with your documentation > > changes as I think I see some spacing problems in 4/4. >=20 > Sorry about the spacing problems. I will check it. OK, thanks. --=20 Tom --8qb+3UqkCLRb0k5+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmOYp+QACgkQFHw5/5Y0 tywQZQv9FkzJYWhitsLp/3nub8TxjXfy+Xlayy0+YRAN2v8NdXHCrRUsd2wn56V/ KHt+0P8bDA9a1xhF08qmRRpDE9owl7xe0HkCkLrYk8lwffQDprgNxcD+Ow6R8uaX 2/VbJpUA1UL8YLBm6+ZPKm9P84h94/BdvIBf5t+bF4cQoofGOrCRNmHwcCVaDOMo YyaEc7twMqJT4wsxl0y6F3osmhgdo/pqkiyQP3cRyhz/V+4audGOnoHp576o4FoS LWMhTbfl8ZxrmceBVfheYpl9SnAelxt13E7nkSJrp/N4pqWzKvPYmSRTTe1/mfgF YxTeT15w4vrKyYiYD6XFmgzjdO7Ikj38P4vmFY9hDsQuc32wBf69uvwBULOmjRqm 4gBNN4STMFOxizU7Uyu2szHNUXtd/OaRGgjrfhGBmpoF6vl7oBzc28iK0IfJR5+g Imyzhy3aXKR67UY72koHhcHnLTIVaQaTZJK3hYGQSyUgTkivwhApd1xsLGLO6D7o HICYni2L =DMD6 -----END PGP SIGNATURE----- --8qb+3UqkCLRb0k5+--