From mboxrd@z Thu Jan 1 00:00:00 1970 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 D8476C433EF for ; Tue, 19 Apr 2022 20:30:40 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 53BF883B4D; Tue, 19 Apr 2022 22:30:38 +0200 (CEST) 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="h03Y+p7A"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1809983B63; Tue, 19 Apr 2022 22:30:37 +0200 (CEST) Received: from mail-qv1-xf2d.google.com (mail-qv1-xf2d.google.com [IPv6:2607:f8b0:4864:20::f2d]) (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 6078983B3C for ; Tue, 19 Apr 2022 22:30:33 +0200 (CEST) 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-qv1-xf2d.google.com with SMTP id dw17so2520678qvb.9 for ; Tue, 19 Apr 2022 13:30:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=buca+Ms8gFK6rAyJLRKTPvqJmNx9PEkMJKyoVah6+os=; b=h03Y+p7AOZ6c4fRwQo6hJ0dNJ6+WTihjNYhjV7UY2lYam/JU5hH2SVS0r65RrlZKBO 8oGd8DwjL0z9rOim8BBfL1vBKCsMPRnFkn7t6q9OJR9e9wom76xw/MdUA4SGC3yfKDJX DO71TopJsntRePyMF1Qi0i/9ccKSpO0Z7EhLY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=buca+Ms8gFK6rAyJLRKTPvqJmNx9PEkMJKyoVah6+os=; b=xxltoN5AWlGXU2Kcku29FUYP0BEZTmYqRFbbUkO3w/bKm6mfcvChuZwODHJy7DGJkX NnkTuo+iPhksUyqQY343ztMY8LG2ptzlsxZAq+zwGIft9xPPpAOvn1/qEFkcJ+F6n3uo 7n91MPa8dbPdlsUoDXUQrUE2E0VlqqlIi86zfINr6yWV2uoYa3ntoMPkwRAhLZysKEKH aOFU6RJmFFVQ6eFfEbF5vqMe3E4l6EAFhMrDcQRjiUI1UnHicygrVVlcP9jUU/5HNs98 PObFXiiVNTz4mTo8K87yMAvp4kBvb9fINkX4WV6R7vg2NEEzws0QRn68lBnHposbzd6Z rLRA== X-Gm-Message-State: AOAM531Bqmk1gL4D9YZA4CjaC9ovwpGMlRvnIG2jO1niwBT2nOzsZAXO jI3Pg1uRS2KracO9kgR2lSJB9Q== X-Google-Smtp-Source: ABdhPJy34TPCu0qhyJBT14YLJ9e2pggdiLUpR0pwkTn6sKr+ophLZG6+dX9uoDc10+gB2RKkl6lMNg== X-Received: by 2002:ad4:5ccc:0:b0:446:6bf1:42fb with SMTP id iu12-20020ad45ccc000000b004466bf142fbmr5651502qvb.117.1650400232057; Tue, 19 Apr 2022 13:30:32 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-2ef0-5dff-fedb-a8ba.res6.spectrum.com. [2603:6081:7b01:cbda:2ef0:5dff:fedb:a8ba]) by smtp.gmail.com with ESMTPSA id y15-20020a05620a09cf00b0069c80404de6sm468486qky.31.2022.04.19.13.30.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Apr 2022 13:30:31 -0700 (PDT) Date: Tue, 19 Apr 2022 16:30:29 -0400 From: Tom Rini To: Nathan Barrett-Morrison Cc: u-boot@lists.denx.de Subject: Re: Falcon Mode Support For Uncompressed Kernel Images Message-ID: <20220419203029.GA177037@bill-the-cat> References: <20220131151124.GN7515@bill-the-cat> <20220131153554.GV7515@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="0OAP2g/MAC+5xKAE" 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.5 at phobos.denx.de X-Virus-Status: Clean --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 02, 2022 at 04:53:11PM -0500, Nathan Barrett-Morrison wrote: > Hi Tom, >=20 > I've attached version 2 of the patch. I believe this should adhere more > closely to your suggestions. >=20 > Keep in mind, CONFIG_IS_ENABLED will not work for checking > CMD_BOOTI/CMD_BOOTZ in this case, as there is no CONFIG_SPL_CMD_BOOTx. S= o, > I'm just directly checking if it's defined instead. >=20 > I verified both CONFIG_IS_ENABLED() and IS_ENABLED() did not work. >=20 > Sincerely, > Nathan >=20 > On Mon, Jan 31, 2022 at 10:35 AM Tom Rini wrote: >=20 > > On Mon, Jan 31, 2022 at 10:23:58AM -0500, Nathan Barrett-Morrison wrote: > > > > > Hi Tom, > > > > > > Yea, I'm not sure if uncompressed ARM32 would work, but I don't belie= ve > > it > > > was ever working to begin with... as bootz_setup is being called right > > now > > > ( @ > > https://source.denx.de/u-boot/u-boot/-/blob/master/common/spl/spl.c#L366 > > > ) > > > > > > My intent was for SPL_OS_BOOT_UNCOMPRESSED to only be used for platfo= rms > > > which need booti_setup (ARM64, ...). > > > > > > So... I could add a dependency on ARM64 in the config option or I cou= ld > > > remove the option altogether and let the booti_setup fail and fallbac= k to > > > bootz_setup. Would either of those work for you? > > > > The code and logic overall needs a bit of refactoring to support > > "booti", "bootz" and also FIT images. I believe FIT images are how > > anyone doing falcon mode on arm64 has worked thus far. booti/bootz > > should only be an option when CMD_BOOTI/Z is set, and FIT should depend > > on SPL_LOAD_FIT already. > > > > -- > > Tom > > > From 5d37f2a930e7cb3455b6ec925ec6e67b40d4c022 Mon Sep 17 00:00:00 2001 > From: Nathan Barrett Morrison > Date: Wed, 2 Feb 2022 15:05:18 -0500 > Subject: [PATCH v2] Add in the ability to load and boot an uncompressed k= ernel > image during the Falcon Mode boot sequence. >=20 > This is required for architectures which do not support compressed kernel= images (i.e. ARM64). This is only used while not booting via FIT image. >=20 > Signed-off-by: Nathan Barrett-Morrison > Cc: Tom Rini > --- > Changes for v2: > - Remove original SPL_OS_BOOT_UNCOMPRESSED option and check via CMD_BO= OTI and CMD_BOOTZ instead >=20 > arch/arm/lib/Makefile | 5 ++++- > common/spl/spl.c | 21 +++++++++++++++++++++ > 2 files changed, 25 insertions(+), 1 deletion(-) >=20 > diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile > index c48e1f622d..57e49f69f7 100644 > --- a/arch/arm/lib/Makefile > +++ b/arch/arm/lib/Makefile > @@ -36,7 +36,10 @@ obj-$(CONFIG_CMD_BOOTZ) +=3D bootm.o zimage.o > obj-$(CONFIG_SYS_L2_PL310) +=3D cache-pl310.o > else > obj-$(CONFIG_$(SPL_TPL_)FRAMEWORK) +=3D spl.o > -obj-$(CONFIG_SPL_FRAMEWORK) +=3D zimage.o > +ifdef CONFIG_SPL_FRAMEWORK > +obj-$(CONFIG_CMD_BOOTI) +=3D image.o > +obj-$(CONFIG_CMD_BOOTZ) +=3D zimage.o > +endif > obj-$(CONFIG_OF_LIBFDT) +=3D bootm-fdt.o > endif > ifdef CONFIG_ARM64 > diff --git a/common/spl/spl.c b/common/spl/spl.c > index f51d1f3205..1f6b3f1ac8 100644 > --- a/common/spl/spl.c > +++ b/common/spl/spl.c > @@ -104,6 +104,11 @@ int __weak bootz_setup(ulong image, ulong *start, ul= ong *end) > { > return 1; > } > + > +int __weak booti_setup(ulong image, ulong *relocated_addr, ulong *size, = bool force_reloc) > +{ > + return 1; > +} > #endif > =20 > /* Weak default function for arch/board-specific fixups to the spl_image= _info */ > @@ -354,6 +359,21 @@ int spl_parse_image_header(struct spl_image_info *sp= l_image, > #endif > =20 > #if CONFIG_IS_ENABLED(OS_BOOT) > +#if defined(CMD_BOOTI) > + ulong start, size; > + > + if (!booti_setup((ulong)header, &start, &size, 0)) { > + spl_image->name =3D "Linux"; > + spl_image->os =3D IH_OS_LINUX; > + spl_image->load_addr =3D start; > + spl_image->entry_point =3D start; > + spl_image->size =3D size; > + debug(SPL_TPL_PROMPT > + "payload Image, load addr: 0x%lx size: %d\n", > + spl_image->load_addr, spl_image->size); > + return 0; > + } > +#elif defined(CMD_BOOTZ) > ulong start, end; > =20 > if (!bootz_setup((ulong)header, &start, &end)) { > @@ -367,6 +387,7 @@ int spl_parse_image_header(struct spl_image_info *spl= _image, > spl_image->load_addr, spl_image->size); > return 0; > } > +#endif > #endif > =20 > if (!spl_parse_board_header(spl_image, (const void *)header, sizeof(*h= eader))) Sorry for the late response. Attached patches aren't picked up by patchwork. I think this looks OK, but can you please re-send it directly rather than as attachment? Thanks. --=20 Tom --0OAP2g/MAC+5xKAE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmJfG+IACgkQFHw5/5Y0 tyyf3gv/brVnPhvHkg6qGf9Wtjb0JEsAuEQYguz5E+HHC/gQbDVuDZznlxWaOUpU 0+2NIXSV8APH2aeP8dRJDz2H+IwEs5YMSrz2IZ8Di/zVgwO9gkmt7jFYf9VUw/A4 Bl84aMKUeV/zGYztHIdssf6MroPDXT2Th32QRWghrH0LH0mMhV2mnEaGGJ9FFAW+ /aooZD/PKbjcu43WH2bJHHUPvIM8t6vXK9AyULKxqmYs9uZmuo5bLtEo0Xx3XqkJ MdU6fxoMCtsx70dbji2bsXAiSQHInSCphQ7rgcR360moNJup56HQVQ3xTjgI9ntZ Daq1f1YKMGy5EYNgUtJPIWEo15kXyEKrc13NlChpJi8M/FkaKzBNVknXVTrtesvM rRZpLDt9sQ+nakwF57tCHIyLKqVnFpOsrEhuEJbFiJko2et0uMxmW+ou6+Wuk2mB r+b2lbJpw8MiQs21pb8o8OT7DIUHxTc5/tFkugpyQfxwxJeacUhZW9eSnm9Q8+mX DPhh15vi =LRN/ -----END PGP SIGNATURE----- --0OAP2g/MAC+5xKAE--