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 46410C001DE for ; Mon, 31 Jul 2023 20:45:07 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 19AFB86941; Mon, 31 Jul 2023 22:45:05 +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="FRcX0PXB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 61057868F1; Mon, 31 Jul 2023 22:45:03 +0200 (CEST) Received: from mail-yb1-xb2b.google.com (mail-yb1-xb2b.google.com [IPv6:2607:f8b0:4864:20::b2b]) (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 A429686988 for ; Mon, 31 Jul 2023 22:44:58 +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-yb1-xb2b.google.com with SMTP id 3f1490d57ef6-d0728058651so5191873276.1 for ; Mon, 31 Jul 2023 13:44:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1690836297; x=1691441097; 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=aU2scqxIDf2a0ucqD/4qQffNVMXeNtV0mgyq569geXo=; b=FRcX0PXBnJXlW908EC8qt0HMTII8Igpfl90+94UD/h+Z3e57L4LRH0Vf3fvI/Hs6cw uZufptBl0aPxw+tazM8dAIaYWp08dLxMLt99+uIydPl+JKAsYyBBiW1fb0eQurHGFq8s LEbkHLnC2cqVQ9eiPewSNgK1KgNa5F6LAWCQY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690836297; x=1691441097; 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=aU2scqxIDf2a0ucqD/4qQffNVMXeNtV0mgyq569geXo=; b=Oe3QnS7nmezPnLOvstFd7yhMcJXKCOuVFMIxDEhhQiAIc75XP2A1gThJt4DaurWr1m SBmrJlsYs4fFI3M05iyZBkET17cPtVkWTPnkokc+kRWgbn1FEflEqi7R9U01Ncv7E9fi beRqb5hpy0FjUdlfq9aJlrOzBE5Y+j96LIeVmBnT2yT9I4g0IbDFyQTKoY+9jXcJP5+U q6aDef8JowKpPGCYS78Z5jpns1srywT9KPbS42aNTWAvQWP1E6nhED876ZomLeayfMd2 tG3+YyhJMiKiQN/sVLeMHx5RnKQVfjR/N2iQwpmHN6LqT+OHDFSxpBw1dnFnOUVUp4Cf sByw== X-Gm-Message-State: ABy/qLbbr+mrjoNoe/adpA3SVuYkr3uKDwBE4nV9Wc0cqlzsfjbAKkay yxM76CKK+Nw9/uG7y4gDsztmrw== X-Google-Smtp-Source: APBJJlEU47+ALaRytDxaHVaCBqnVbJXeJWKdO3fR8WDVtMmgjAydKrZFMVpSyQFxjFKttdbZw1jn4g== X-Received: by 2002:a0d:c501:0:b0:56d:43cb:da98 with SMTP id h1-20020a0dc501000000b0056d43cbda98mr14220620ywd.29.1690836297188; Mon, 31 Jul 2023 13:44:57 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-7e50-54e3-e9cb-536d.res6.spectrum.com. [2603:6081:7b00:6400:7e50:54e3:e9cb:536d]) by smtp.gmail.com with ESMTPSA id t64-20020a814643000000b0058605521e6esm1674052ywa.125.2023.07.31.13.44.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jul 2023 13:44:56 -0700 (PDT) Date: Mon, 31 Jul 2023 16:44:54 -0400 From: Tom Rini To: Simon Glass Cc: U-Boot Mailing List , Bin Meng , Nikhil M Jain , Anatolij Gustschin , Devarsh Thakkar , Michal Suchanek , Ovidiu Panait , Pali =?iso-8859-1?Q?Roh=E1r?= , Rasmus Villemoes , Stefan Roese Subject: Re: [PATCH v3 5/9] board_f: Fix corruption of relocaddr Message-ID: <20230731204454.GG3630934@bill-the-cat> References: <20230731160008.82342-5-sjg@chromium.org> <20230731193212.GE3630934@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="WpCIo/SxnSCyefux" 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.8 at phobos.denx.de X-Virus-Status: Clean --WpCIo/SxnSCyefux Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 31, 2023 at 02:37:04PM -0600, Simon Glass wrote: > Hi Tom, >=20 > On Mon, 31 Jul 2023 at 13:32, Tom Rini wrote: > > > > On Mon, Jul 31, 2023 at 09:59:56AM -0600, Simon Glass wrote: > > > > > When the video framebuffer comes from the bloblist, we should not cha= nge > > > relocaddr to this address, since it interfers with the normal memory > > > allocation. > > > > > > This fixes a boot loop in qemu-x86_64 > > > > > > Signed-off-by: Simon Glass > > > Fixes: 5bc610a7d9d ("common: board_f: Pass frame buffer info from SPL= to u-boot") > > > Suggested-by: Nikhil M Jain > > > --- > > > > > > Changes in v3: > > > - Reword the Kconfig help as suggested > > > > > > Changes in v2: > > > - Add a Kconfig as the suggested conditional did not work > > > > > > common/board_f.c | 3 ++- > > > drivers/video/Kconfig | 9 +++++++++ > > > 2 files changed, 11 insertions(+), 1 deletion(-) > > > > > > diff --git a/common/board_f.c b/common/board_f.c > > > index 7d2c380e91e..5173d0a0c2d 100644 > > > --- a/common/board_f.c > > > +++ b/common/board_f.c > > > @@ -419,7 +419,8 @@ static int reserve_video(void) > > > if (!ho) > > > return log_msg_ret("blf", -ENOENT); > > > video_reserve_from_bloblist(ho); > > > - gd->relocaddr =3D ho->fb; > > > + if (IS_ENABLED(CONFIG_VIDEO_RESERVE_SPL)) > > > + gd->relocaddr =3D ho->fb; > > > } else if (CONFIG_IS_ENABLED(VIDEO)) { > > > ulong addr; > > > int ret; > > > diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig > > > index b41dc60cec5..f2e56204d52 100644 > > > --- a/drivers/video/Kconfig > > > +++ b/drivers/video/Kconfig > > > @@ -1106,6 +1106,15 @@ config SPL_VIDEO_REMOVE > > > if this option is enabled video driver will be removed at th= e end of > > > SPL stage, beforeloading the next stage. > > > > > > +config VIDEO_RESERVE_SPL > > > + bool > > > + help > > > + This adjusts reserve_video() to redirect memory reservation w= hen it > > > + sees a video handoff blob (BLOBLISTT_U_BOOT_VIDEO). This avoi= ds the > > > + memory used for framebuffer from being allocated by U-Boot pr= oper, > > > + thus preventing any further memory reservations done by U-Boo= t proper > > > + from overwriting the framebuffer. > > > + > > > if SPL_SPLASH_SCREEN > > > > > > config SPL_SPLASH_SCREEN_ALIGN > > > > Nothing selects this and it's not offered as a choice, so now we've just > > broken the original case? >=20 > Yes, I should have mentioned that. I'm not sure which board(s) need > this option selected. >=20 > Devarsh, do you know? And shouldn't this just be part of the normal flow when we have SPL_BLOBLIST && BLOBLIST, and not need a new symbol? I feel like I'm missing something here. --=20 Tom --WpCIo/SxnSCyefux Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmTIHT0ACgkQFHw5/5Y0 tyy5jAv+I8sbd6Ud35laUJRgvLSRF5JLMJ4L7iOuI1XJr3ML0C7APK60YGAWfbam 6GX+rqyhv5lxYzGHy/hGrbYnwaJdzlnLLTYq2DRGtERxGAb/56tDOeXGuyp0n9Po /9uXMTmiCCnbG+hc2UrS7f+sKROAcOaw2Xt+Sb4tu3xf07dNvBJS1mm/kK3t4Oc6 Oaw6qmX1o+/RvWqQ4w5W9zL68IBaZZ+NaiY29Lo0toQpglgAlFA+knoTogIfT61i cKRSkwc2BylceEfcfCei+ait7o478bcCRGm4iY7QUnbq4V2eDQMqXTrE7Q6v1Yy3 bX/wsneB08tYlKFbNim+qMT7QAkX5FiKmblSK/IGqIAC9pldbSo9hUHS4DrcIhGx xm6i+Qf3CQ5RHqV84waPh0BtlLPyzkgLdMc5hFbYidIf5YoPEcSWQru00lx+WREx DR1zsutbQF2IXiUR2jkHDfaYpnIRAvwdsRm73ohI+QZ10rjlY9V+j4lyzvv3Zxy/ smx8tYdM =C1CS -----END PGP SIGNATURE----- --WpCIo/SxnSCyefux--