From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 05 Sep 2023 10:12:56 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qdRBB-004jP4-B9 for lore@lore.pengutronix.de; Tue, 05 Sep 2023 10:12:56 +0200 Received: from bombadil.infradead.org ([2607:7c80:54:3::133]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qdRB9-0008OF-Cp for lore@pengutronix.de; Tue, 05 Sep 2023 10:12:55 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=r6Ok2FNfDiiD/cliwzo3SFLGd2IG5DDB53REUgUFK9o=; b=Rg6MyBMDj/YbI7naCDr7RHw6zx A5t+J0O9DkzeG+FfeNy1UJV/XZCmco2KzgZxhgua/efcx1iF1caamuNDFdENZcvWppHf0Rbsx7IHE ZJObt+OSvlRYN7J89bAUQ+t4WRDctT3oo4tfsXF1ThVSCCuXPIZQu9pNaVUyWEeXpePmASbMHnLKQ X2fDYb3/iIN7dqxrspoiU3uXYS0Cm3XTKg9HSL5RWt8F6KTgGtNemmpNiwpDPD+Fuij+SlAdJfhr7 H23FaeUXG45x2eJs4uTGM78xnYWA9G+Jm/ZDgNLVEcJI/OtirSwIsLzwFtk2tacUGdguerPOFafKC 8/kgO6zg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qdR9z-005V6r-2i; Tue, 05 Sep 2023 08:11:43 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qdR9w-005V68-2V for barebox@lists.infradead.org; Tue, 05 Sep 2023 08:11:42 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qdR9v-0007hQ-JJ; Tue, 05 Sep 2023 10:11:39 +0200 Received: from [2a0a:edc0:2:b01:1d::c0] (helo=ptx.whiteo.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qdR9v-0045Bk-6f; Tue, 05 Sep 2023 10:11:39 +0200 Received: from mfe by ptx.whiteo.stw.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1qdR9v-001WUh-0x; Tue, 05 Sep 2023 10:11:39 +0200 Date: Tue, 5 Sep 2023 10:11:39 +0200 From: Marco Felsch To: Sascha Hauer Cc: barebox@lists.infradead.org Message-ID: <20230905081139.pqgoysreycs23k3s@pengutronix.de> References: <20230831144724.3424405-1-m.felsch@pengutronix.de> <20230904100257.GF189379@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230904100257.GF189379@pengutronix.de> User-Agent: NeoMutt/20180716 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230905_011140_809755_D8510BFC X-CRM114-Status: GOOD ( 25.12 ) X-BeenThere: barebox@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "barebox" X-SA-Exim-Connect-IP: 2607:7c80:54:3::133 X-SA-Exim-Mail-From: barebox-bounces+lore=pengutronix.de@lists.infradead.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-5.0 required=4.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Subject: Re: [PATCH v2] ARM: i.MX8M: esdctl: split memory banks for devices with >4G X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on metis.whiteo.stw.pengutronix.de) On 23-09-04, Sascha Hauer wrote: > Hi Marco, > > On Thu, Aug 31, 2023 at 04:47:24PM +0200, Marco Felsch wrote: > > At the moment the whole available memory is added to one single memory > > bank "ram0". This can cause barebox chainload issues on devices with a > > huge amount of memory like the i.MX8MP-EVK which has 6G of RAM if the > > barebox pbl binary is to large. > > > > The reason for this issues is that memory_bank_first_find_space() > > returns the memory area with the largest amount of free space on the > > first memory bank. So in case of Debix SOM-A 8G and i.MX8MP-EVK 6G this > > is the area crossing the 4G boundary. This cause the barebox pbl code to > > trigger a MMU exception once the early MMU gets enabled which is > > configured for sizes <=4G. > > > > Split the memory space into two memory banks: "ram0" and "ram1" to fix > > this issue. > > In the long run we'll need a proper solution for this. I think this Of course but I didn't wanted to step into this hole ;) > patch is fine for now, but please add a comment why we are doing this. > Otherwise we might remove this superfluous code at some point. Sure, I will add a comment. Regards, Marco > > Sascha > > -- > Pengutronix e.K. | | > Steuerwalder Str. 21 | http://www.pengutronix.de/ | > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | >