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 B31D0C001DF for ; Thu, 3 Aug 2023 13:13:46 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E169F86AB7; Thu, 3 Aug 2023 15:13:44 +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="Qm7bU0cd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3653386903; Thu, 3 Aug 2023 15:13:44 +0200 (CEST) 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 74A3B86839 for ; Thu, 3 Aug 2023 15:13:41 +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-x1130.google.com with SMTP id 00721157ae682-583f99641adso10071047b3.2 for ; Thu, 03 Aug 2023 06:13:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1691068420; x=1691673220; 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=88jS2o+rBKFISizq0o1Tr6yETkuYuP/fZKGs7pnrTPw=; b=Qm7bU0cdP2WhzvVzOBUeq8xq4w4EBLe1A5YFBF8Sq/9bg8C0M4yXT5YySyyJABHYDe qRQ8HhTbzN4hczv69lYpGtqQobxtSexpWdQ8CxOoB+tunTOMQt2fKsLq8sJdZZ3YZA6O O7WjxrciQ9kqJUNYCFJEfnXNadxB5TSb1emkA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691068420; x=1691673220; 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=88jS2o+rBKFISizq0o1Tr6yETkuYuP/fZKGs7pnrTPw=; b=F/qFpZRPxRaAhYVVbpVciclYAc+Oat40o71sFrKqmzXwUmxbtsRnWsyTUTzF3LRiir 8KBis/PYpKhtlndBUmWm0UkJ8e8kjj7B5qnR0dMFnGT8ItSIK9voXfuu+S4jbFqiqblR N0eEt8lcQrbDE3/lp8y5406ws4Zs6kTs/PTBUU9YrRXd0H4d/8EznKMKWvGvqf+6b4+V APim651Qs+GpE5PUc5ywB3dSQvHReXIK//5TooifoYxqF8ySkfopTbQuj5/jbVt5hUUW 9FzlWQpM4xz9o02M5+pAKK5qaDIk92BLrCq0W5eTtMWE8MVfjWFMf5R1NOS1nGd3av51 9h7g== X-Gm-Message-State: ABy/qLZ+VJwgyM9zQ1rtTP2XdTxwBOTv4Fwr5eUNU/klasD2lSfw4XAr kx307ciKXLnWZvYD7DkdXtW12g== X-Google-Smtp-Source: APBJJlEMz5gxT2FZ4JHVzhwBCstvMQWLAVYa6UMy6FKUEmmPoqTFaoHlP3j/iy+QJuqjHsdG5AQ7dg== X-Received: by 2002:a25:69c6:0:b0:d06:4ab1:672 with SMTP id e189-20020a2569c6000000b00d064ab10672mr16307952ybc.4.1691068420164; Thu, 03 Aug 2023 06:13:40 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-68ac-3ac0-af0b-6541.res6.spectrum.com. [2603:6081:7b00:6400:68ac:3ac0:af0b:6541]) by smtp.gmail.com with ESMTPSA id t70-20020a0dea49000000b00583b144fe51sm5289141ywe.118.2023.08.03.06.13.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Aug 2023 06:13:39 -0700 (PDT) Date: Thu, 3 Aug 2023 09:13:37 -0400 From: Tom Rini To: Bin Meng Cc: Simon Glass , U-Boot Mailing List , 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: <20230803131337.GN3630934@bill-the-cat> References: <20230731160008.82342-5-sjg@chromium.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="QehOI+10gzt6iKEQ" 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 --QehOI+10gzt6iKEQ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 03, 2023 at 07:03:47PM +0800, Bin Meng wrote: > On Thu, Aug 3, 2023 at 6:37=E2=80=AFPM Bin Meng wrot= e: > > > > On Tue, Aug 1, 2023 at 12:00=E2=80=AFAM 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 > > > > typo: interferes > > > > > 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 = the end of > > > SPL stage, beforeloading the next stage. > > > > > > +config VIDEO_RESERVE_SPL > > > + bool > > > + help > > > + This adjusts reserve_video() to redirect memory reservation= when it > > > + sees a video handoff blob (BLOBLISTT_U_BOOT_VIDEO). This av= oids the > > > + memory used for framebuffer from being allocated by U-Boot = proper, > > > + thus preventing any further memory reservations done by U-B= oot proper > > > + from overwriting the framebuffer. > > > + > > > if SPL_SPLASH_SCREEN > > > > > > config SPL_SPLASH_SCREEN_ALIGN > > > > Reviewed-by: Bin Meng >=20 > applied to u-boot-x86, thanks! This isn't the right path, we need to test: https://patchwork.ozlabs.org/project/uboot/patch/20230801140414.76216-1-dev= arsht@ti.com/ --=20 Tom --QehOI+10gzt6iKEQ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmTLp/4ACgkQFHw5/5Y0 tyxECQwApCzhBNjo+EV0WX5vSuv1//X+CbZNr/HdNY6zoQWcU3qyxZkADPVvd4CH WqTEG+ypGvZkdQEhj7x/cmn0HDpJeuw3dw+fjn43RIqOgT1kKOG4kB0dRAIgZDpR ImqpI6aLi8ChWDr0l0AQ1kpE2SOdWUvKd5LXU6F6NFmYXysVPJoMIR9ron9QHjZN Vi1EKWi2EusW8Z2zGObnp+oYcOhxjPFSK4u+KLjtiuJ/0540NNuknG58K07L381c VW6HawNYJa+b18+GfdCRKyMowRYjDAhvcP3oI3bk8PNQn6u8a0vPOhYbLKZO99sX Ml5q9Ym44w3QhbtD6OK5Riyb3lGi3X2hzCSEz7An7HfEJnIcu7BUGxFx6xUuIujt Xi8NJQWXLqIy23Xkf7HpdpwSG8fwUDyYWKV8RPdjmT2uNFV3M/oTlIKBQLkAgFVQ C8w6v5mXhvuyhcOLDZ6nbvvtRBWH6xh7YYIfEAeY/Ur5FW5Bj9AIpBecwVH/r/kw CXHsY04Y =f+yB -----END PGP SIGNATURE----- --QehOI+10gzt6iKEQ--