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 D2825C54EBD for ; Fri, 6 Jan 2023 21:14:21 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 34558853FD; Fri, 6 Jan 2023 22:14:19 +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="FQrl/EIh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0EE2A853EB; Fri, 6 Jan 2023 22:14:17 +0100 (CET) Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) (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 333B6853FD for ; Fri, 6 Jan 2023 22:14:13 +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-qt1-x82d.google.com with SMTP id z12so3191888qtv.5 for ; Fri, 06 Jan 2023 13:14:13 -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=dhQvc7irrXiz6ZKs0NZOeeUe8Az35s8ZpPapp05NoZA=; b=FQrl/EIhDCnIF5xE443Z6+dY/3K16NJMwf76GaI70cT9OKUkv3Inbd5bYESrR0Sqw5 UuUvqopGYqigJnYcLQgquJy/V5Sn4Q3x1TN2zQAG6qO55SGC3qlWmo0htS67xeuePXXl GD9m15sM+JsPKzcy+oZPlc0R1zn+tCr5ZaLZI= 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=dhQvc7irrXiz6ZKs0NZOeeUe8Az35s8ZpPapp05NoZA=; b=k7Yv1NcelDsZntTzgFg7ss1UmGKDYSEvPaVfcI18p2n/G5zKKVPxWxBVI2ROphA/FR oY4A4hmjkTtm3i/deHrxbSc1DYPKjLy7qYdAL5xntjK9kO4O4TaPmQotHCGZH0VaqXxk 9jB/0cm1naZUBNzcB049Ye8m7KQbLjK9uX5bu5XeBFSklSP2D8RRGtt1zbsYBw2JnOBk Z8fDfh99enMOrcg1fqJJfGbHzOzsfXbl3A7WiqnAQ92tu17p0FI5x4Xt/euTicCWWMDj EH12F4D1NXcugsZ3NiXmpUnTji9jQ++mEbl+1ymtZmIjw74w3rtjgLmUK3+WsClsCQoF kf5g== X-Gm-Message-State: AFqh2kpAeAh6Qex5XLrGBNBfVTNzwWT3/Uvxz+bORar9ZhIhz4WQ3ni9 oFSYX7jU3PpAfNfH2hWkqlISFIpOOPmu7HxFqZM= X-Google-Smtp-Source: AMrXdXuIhd8bWfvlFpIXC6gTMLbympSHKGPsSeNvOTYAVHzkjUSJWkOyT0PD6YvPXDcockLbCXz8Zw== X-Received: by 2002:a05:622a:244c:b0:3a8:e9e:e194 with SMTP id bl12-20020a05622a244c00b003a80e9ee194mr76016789qtb.40.1673039651730; Fri, 06 Jan 2023 13:14:11 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-9162-adb5-1773-34c0.res6.spectrum.com. [2603:6081:7b00:6400:9162:adb5:1773:34c0]) by smtp.gmail.com with ESMTPSA id bi1-20020a05620a318100b006fb0e638f12sm1119263qkb.4.2023.01.06.13.14.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Jan 2023 13:14:10 -0800 (PST) Date: Fri, 6 Jan 2023 16:14:08 -0500 From: Tom Rini To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: u-boot@lists.denx.de, Marek Vasut , Patrick Delaunay Subject: Re: [PATCH] Revert "common/memsize.c: Fix get_effective_memsize() to check for overflow" Message-ID: <20230106211408.GH3787616@bill-the-cat> References: <20230106155143.4025812-1-trini@konsulko.com> <20230106164543.3gtq73flpoocg7mc@pali> <20230106172524.GE3787616@bill-the-cat> <20230106202256.bvjwcfsjbhzsfgrh@pali> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xaVQ9NW/WO+LjJDB" Content-Disposition: inline In-Reply-To: <20230106202256.bvjwcfsjbhzsfgrh@pali> 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 --xaVQ9NW/WO+LjJDB Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 06, 2023 at 09:22:56PM +0100, Pali Roh=E1r wrote: > On Friday 06 January 2023 12:25:24 Tom Rini wrote: > > On Fri, Jan 06, 2023 at 05:45:43PM +0100, Pali Roh=E1r wrote: > > > On Friday 06 January 2023 10:51:43 Tom Rini wrote: > > > > This reverts commit 777aaaa706bcfe08c284aed06886db7d482af3f8. > > > >=20 > > > > The changes to this generic function, which is intended to help with > > > > 32bit platforms with large amounts of memory has unintended side ef= fects > > > > (which in turn lead to boot failures) on other platforms which were > > > > previously functional. > > >=20 > > > As mentioned previously, unfortunately this revert breaks 32-bit u-bo= ot > > > on 36-bit mpc85xx boards with 32-bit e500v2 cores and 4GB DDR module. > > >=20 > > > Which platforms currently have broken u-boot without this revert? The > > > only one which was reported is stm32mp but for it there different > > > workaround patch waiting in the queue. > >=20 > > Are you able to test on one of these PowerPC platforms currently? As > > the stm32 problem shows, not everything is getting tested frequently > > enough, so how many other cases are lurking out there. And, I think > > overall issue is that the overflow check-and-change you introduce here > > should just be in the CONFIG_MAX_MEM_MAPPED=3D=3Dtrue case. As that's = the > > case you're dealing with, yes? >=20 > I was planning to do big retest again after all powerpc patches are > reviewed and merged... Yes, but can you test one of them now, to see if my idea works? > Anyway, if the issue here is with ram_size and its reduction was needed > for mpc85xx (at the time of introduction of that patch), what about > putting mpc85xx ifdef around ram_size reduction? For arm boards it would > have same behavior as revert of that commit and for mpc85xx it would be > no change. >=20 > I agree that this code needs to be revisited, together with ram_top > issue and also code which fills DDR banks. Because really mapped memory > for u-boot and real size of DDR are two different things here. The issue here is that we see two now (given Fabio's reminder about another thread I had forgotten) of unintended consequences, on 32bit platforms trying to normally have 2GB of memory, which does not require special treatment. --=20 Tom --xaVQ9NW/WO+LjJDB Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmO4jxkACgkQFHw5/5Y0 tyzZXAv/Sxb0HiYY46BymXgNJX8eIQBU3JWTJXZPeGT2FXKfMhbR7R8BXXiEPi1Y yQKdWD84hYwmcxWRAZOoCTg1sV+MS+5cnnA8uLaQz1k0A75jIH0RDVmaMBWpDkWN My6+haU6/SkO+pkWQ/j3c9x8TkekhAuKIIyWMIAkhFUQQFCRJ0PwVHOsn0waZ+DY XGqSnTd91LedD1jJa2S6nBq8G8ZgUtJ5kX91YN3ZpYlwFwIwRwDGw/5JfUkhmC7J 3eTpcfuevUE85p4TJ37/chvWJY5/m6mSmOmbVcjt79ydX1dMPBxqjwm+K7OhYvV5 uTF5pK93hpX5TnlpD4gN/F4Py6CZdqSK7Mgx035Cnb5jcPh4ZzaR+Sww7mro412j yCp+SGz3THjCOsw6idujNrEfV7bfoMUw4Ed0Dcl+TMd6hxXzduqkGfuNlEaUBW2u R4N70mbb1qUciPNNo0OoAVlUJ260mTcXcITGTzlKSBMc0GfiSk0PWeVvcpGmX/11 /ahLCLGO =njid -----END PGP SIGNATURE----- --xaVQ9NW/WO+LjJDB--