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 0E47EC4332F for ; Mon, 12 Dec 2022 15:52:17 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 58A4F85207; Mon, 12 Dec 2022 16:52:15 +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="DoCE11AX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BD2F88539F; Mon, 12 Dec 2022 16:52:13 +0100 (CET) Received: from mail-yw1-x1130.google.com (mail-yw1-x1130.google.com [IPv6:2607:f8b0:4864:20::1130]) (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 C773D85094 for ; Mon, 12 Dec 2022 16:52:10 +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-yw1-x1130.google.com with SMTP id 00721157ae682-3f15a6f72d0so152209957b3.1 for ; Mon, 12 Dec 2022 07:52:10 -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=IVuDjxoErldPlVGwq5Hp6iM8zwuy1bxM5VadB8RvZSQ=; b=DoCE11AX2xQ+mXKhJe9H+fRO5DubxL0ppYYUoZXB6QXNa+jANmpB4b3l+N6tFr7KKf Fnc7K6y0tvO093eolVGeaDq2Y1x2tIuPsncmR9QhIEuNbc2hyE7rjNxbA5GJncBdp3V5 339vWRLxzPdg8CreBAqmSkfqJiVdnBKfYj2hc= 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=IVuDjxoErldPlVGwq5Hp6iM8zwuy1bxM5VadB8RvZSQ=; b=dNJFhSlCh7fqgD2Tl2c1bNDjIN56tAhkLKfel/usVL/on+QJiygzLFqQ5pc+DUaXsV KCo+x5G2ewqYQaOS8KWQHfYNkFGcWKe7uE5uupJWPmOzGOvM1ShYdcsdGTaLlSyCBKAA 2gxttosMgLjSQ3K7J5iuT90WB3Zenva1fiTilszw1N/z/ryF5u9727SrWhWL9ARFad7K czpgcFTpVkvqr0kvOuWscaQTSc2CCYSDVXjkbHVHDgYgjUzVB0RcbtXCieOmwcDiFI2k iKhBS6qFR5eMZhrihHLku7teK+lgn5JpWHO3wso4J+qTRqvWtMGN/5gYFvqbvfrJRkWt rAaQ== X-Gm-Message-State: ANoB5pmSoioHqIUY0AFAowLQtYMzHD1yNoQeKdKQynpB/6bW/w/9EU0C M3QVPcb5P6GpJ2/nOUuEg/V16A== X-Google-Smtp-Source: AA0mqf5ZIPtubAJtf11dgeq7jtD5EQakSDqT6gXljm57466Ja5+3GbqNYU2jRfRb03Et1koIXSZkIQ== X-Received: by 2002:a81:1c4e:0:b0:36c:9b7c:f9f3 with SMTP id c75-20020a811c4e000000b0036c9b7cf9f3mr15162128ywc.0.1670860329388; Mon, 12 Dec 2022 07:52:09 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-8c5e-02dc-44a6-fa90.res6.spectrum.com. [2603:6081:7b00:6400:8c5e:2dc:44a6:fa90]) by smtp.gmail.com with ESMTPSA id q52-20020a05620a2a7400b006f7ee901674sm6132486qkp.2.2022.12.12.07.52.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 07:52:09 -0800 (PST) Date: Mon, 12 Dec 2022 10:52:07 -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: <20221212155207.GW3787616@bill-the-cat> References: <20221207062334.21292-1-rick@andestech.com> <1162c5df-dcfc-0908-1d07-32145e3a6aaa@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="YGrcBfXR8nYqbkS+" 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 --YGrcBfXR8nYqbkS+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > > > > (Is this substantially different from falcon mode anyway?) >=20 > Please see the explanations to Tom. >=20 > > > > > 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 > > > --- > > > 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? >=20 > OK, I will move some messages here from commit messages. >=20 > > > > > + > > > +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? >=20 > I have saw this config, but it does't support SPL_RAM but only for filesy= stem > That is why I don't leverage it. >=20 > I can prepare a patch as below if no other concerns: >=20 > 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. --=20 Tom --YGrcBfXR8nYqbkS+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmOXTicACgkQFHw5/5Y0 tyx+pQwAkjGR+3AtZlswU2wYJJGgpaLYMDAsr4pAF+KVAnSPfbR/j6lUXj3epszX snYlCTnYkEL3w8gb2h4CP/OXPqhmqKB6MCud8s+vAKFQgHQCeaFSbK8b8QaGRuha NYYLgHpHydRZmfjhTnCoI3lOaEUUfi+4hAVgnrW3B3CoZC6XHInWsfQ8NDLxdjBq 9MrndMsPJgiU+GO0x2ya++X3OGNjRHqV1XvxbT9ieS6CwC76zsSTWf6rY0TF9TI4 WZy43SU00CjSmJnbtv8n1BVlihnZ3HJqhXKlnD5DBX0xrGl2rhvfY9nlau+gun0i fEfpctQfEKOs4V641a0CVq3b9b13Dl3FTPN9RnnZvENHCtCxbKwm5BV49hyIy/7i QhCruOWKo4fZ+nE4AOv5sO/WgK7CGoAZn/tOAoYkn73Jn8/IpCrMmK2LkGJjlNYa CWfqRBLVkiBDTPEGBg9KreqE/f+E7HJvDLp2Jb5MXx2P+BZr/zo2O1ye+lEN30Te 37Xh9TZE =N1xm -----END PGP SIGNATURE----- --YGrcBfXR8nYqbkS+--