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 53AAFC00528 for ; Mon, 31 Jul 2023 21:07:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B7161868F1; Mon, 31 Jul 2023 23:06: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=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="q+JzQb0P"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E0263865F4; Mon, 31 Jul 2023 23:06:51 +0200 (CEST) Received: from mail-yw1-x112a.google.com (mail-yw1-x112a.google.com [IPv6:2607:f8b0:4864:20::112a]) (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 8490B86A57 for ; Mon, 31 Jul 2023 23:06:46 +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-yw1-x112a.google.com with SMTP id 00721157ae682-583ae4818c8so57056917b3.3 for ; Mon, 31 Jul 2023 14:06:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1690837605; x=1691442405; 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=havHSXa9xKcT+WWSlZgwSsz8LtpJMe+KBP2XlmLd4Fw=; b=q+JzQb0P2L+7DkNFeWMd8OclusxorVEffya9AE5SXNdr6y1TYxzwW10q/nrnFhyBUA HauEkZAAv3270vgAX0dTn5i5AWk87zgJxxJRvkC1F1/3tAmjatxe278pWeIpfDVBcf// osw6RQKc3bPxUXJVnSPr8gOzlto+m3vFab1n8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690837605; x=1691442405; 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=havHSXa9xKcT+WWSlZgwSsz8LtpJMe+KBP2XlmLd4Fw=; b=OOcALS/T0a0CYjo/Ov8g8o3gqNufGuZuBfqh6dCQSOunxJp7eKI0KuYwXGTq9tHDsK ANdXKsGusoQFKbVV+cPG2BPZErMWeLUTxiHjKlqHxiYkKakVckEsyxJCYxe6C8H9V9hN GbZZXA1LqXUgYHIml51hNOLJllDFgR1nur5jBc06+heVfMWaYNNVgJG/e+T0r2xE1/EB 12dw4mBfofcbFnAnhwzqjCmvZJPbqou58BhvM7zs8yNaYxwvcA/+hv8uWo8mZIfoBQLN Do0do6oZOqAGwIcZauRpAydkHLhFgclEHfNWBaX3zHRGyWu8UhwVJAzeWE3mZcn1BunZ bnTQ== X-Gm-Message-State: ABy/qLZeSrQopUQ7EnIjCddkhRyE7+g9LXphYcTjsg3HR8jzUJqQPGxZ tW/0OSkC6XgnDV/e+RbEqJu5gQ== X-Google-Smtp-Source: APBJJlGy0hufIaSpEWHcAW20NHdmH/+TSBeAUIJ+ZN20wh6cOZ68uyRqbLX5BA3Ubs6RpBFvzgJJjg== X-Received: by 2002:a81:728b:0:b0:577:3b66:70b with SMTP id n133-20020a81728b000000b005773b66070bmr14197526ywc.47.1690837605264; Mon, 31 Jul 2023 14:06:45 -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 n16-20020a819c50000000b00576cd8f9770sm3188420ywa.146.2023.07.31.14.06.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jul 2023 14:06:44 -0700 (PDT) Date: Mon, 31 Jul 2023 17:06:42 -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: <20230731210642.GI3630934@bill-the-cat> References: <20230731160008.82342-5-sjg@chromium.org> <20230731193212.GE3630934@bill-the-cat> <20230731204454.GG3630934@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bvU+KIcWpTv5JTNE" 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 --bvU+KIcWpTv5JTNE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 31, 2023 at 02:49:06PM -0600, Simon Glass wrote: > Hi Tom, >=20 > On Mon, 31 Jul 2023 at 14:45, Tom Rini wrote: > > > > On Mon, Jul 31, 2023 at 02:37:04PM -0600, Simon Glass wrote: > > > Hi Tom, > > > > > > 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= change > > > > > relocaddr to this address, since it interfers with the normal mem= ory > > > > > 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 a= t the end of > > > > > SPL stage, beforeloading the next stage. > > > > > > > > > > +config VIDEO_RESERVE_SPL > > > > > + bool > > > > > + help > > > > > + This adjusts reserve_video() to redirect memory reservati= on when it > > > > > + sees a video handoff blob (BLOBLISTT_U_BOOT_VIDEO). This = avoids the > > > > > + memory used for framebuffer from being allocated by U-Boo= t proper, > > > > > + thus preventing any further memory reservations done by U= -Boot 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? > > > > > > Yes, I should have mentioned that. I'm not sure which board(s) need > > > this option selected. > > > > > > 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 > Most of the discussion was on the v1 patch. >=20 > https://patchwork.ozlabs.org/project/uboot/patch/20230724145210.304917-5-= sjg@chromium.org/ OK, yeah. It seems like something more needs to be done then since "don't flicker the screen" is pretty much always the case if we have splash screen / video set up in SPL. Perhaps the case where that's not true should just be treated as the uncommon one, so we can do the ram_top suggestion normally? --=20 Tom --bvU+KIcWpTv5JTNE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmTIIlgACgkQFHw5/5Y0 tyx/Xgv/XllGHBB9akqUp1vQwes4IZwvxsIeSN7la6ShD8MZHqCKiWIplEEYMtml 6eZQhK9H/Elye7ZkAHdY4Rqd41gnsDb3tcJIuyGG+3iKWVC63mX1J7U4uCftQVSL tLSsx5XOP1bPFC9d1D0eeEkA13/pOn3sclRRvLptWftR3cEavREeyoTmqK0OqLQ7 Xrtmdj+kJ405cZO1dnwwz8HgNJRscKPKxpIV9OGq0t/cS9bbDa3/oxNvi58FhKVN vua+hX+sYbR5eLbOkLMubBmsRxJ+ZkFjN6dgX6/i3viWqh1LhwyxSmcSVSIfyyax +Ki68a6i2RbfVRcik4IV8zahz5N8DiI0cn6mZZPcWZn3m2zZE8J+8zjIki6HS7nu yjZLPu4XFOgCQPxW6wpbI9g45uxdu954t6OHKpzEmICuiuMZX8fXlcZoEgciD6vV PAjYA3wRxV3w9beGlxZ9lsruhGo/LXG62+131hZxLCJ8IsbKeuGNDtiGyG8GIXCE w3yPOdt+ =rpKv -----END PGP SIGNATURE----- --bvU+KIcWpTv5JTNE--