From patchwork Wed Sep 10 19:06:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 285 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757531200; bh=uIQJqh5MgeicwC2Lc7MS8lwD7VxrgsHLU0BTY1Sw+AQ=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=wSIwmxf950exc71JsGP2Jl/NRADFNvmemGyzDC5kjdvvyEMqQIPHEZhXs4COCggtA 3vVhUzmRCZytroqm3p9A1yNBeQRraKJsC3KNIEfrC3wgIiXd3N/Tp4NIQdfXLVeMzk JDdVv1uviIMEvNFALOMQKlkCeZNv/zm0Zecu7NwC9WVTh9OBKqdsHNBQ+XybVxmmEd PJuDCg9/yIDneriWAwsuRIzuNqRBwc7AtXoMpvmWnHl1tQGhqr1QUeT+jQlO6+rBB2 mXmdb2pv+YnXtu7YRB5VEAeJBYMy8uLZatsE6G+drOtU9XhFDJQrSFbedGfQo1fDeY 3PuwUnRwG98BA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 514C867ABE for ; Wed, 10 Sep 2025 13:06:40 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id LH5xafKj7R0O for ; Wed, 10 Sep 2025 13:06:40 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757531200; bh=uIQJqh5MgeicwC2Lc7MS8lwD7VxrgsHLU0BTY1Sw+AQ=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=wSIwmxf950exc71JsGP2Jl/NRADFNvmemGyzDC5kjdvvyEMqQIPHEZhXs4COCggtA 3vVhUzmRCZytroqm3p9A1yNBeQRraKJsC3KNIEfrC3wgIiXd3N/Tp4NIQdfXLVeMzk JDdVv1uviIMEvNFALOMQKlkCeZNv/zm0Zecu7NwC9WVTh9OBKqdsHNBQ+XybVxmmEd PJuDCg9/yIDneriWAwsuRIzuNqRBwc7AtXoMpvmWnHl1tQGhqr1QUeT+jQlO6+rBB2 mXmdb2pv+YnXtu7YRB5VEAeJBYMy8uLZatsE6G+drOtU9XhFDJQrSFbedGfQo1fDeY 3PuwUnRwG98BA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 392E267ABD for ; Wed, 10 Sep 2025 13:06:40 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757531198; bh=xqIM3AwHnO20cyhFmonWeW7SP/rV3LcGlRfxO/fMXP0=; h=From:To:Cc:Subject:Date:From; b=F394r9GHhfb6VQagaquvKwbrPwrmYWJhLimv+oj2Kcof4G2A/HSZ6To6Kh7CWjGmM c2bt/k3YlNYDK1PETCbtfN+wCcAJJFcPBLQvPet51wfSfdf4rUr5IUPuHGLfZKKDId M6Z5KzkGSD8iYS4K3E34B93orvuAnqJ4/JYB8DYi3Bi4LOTBF/tdTwSa4j2NdCbuyY P63uecLjBFqrwiaap22/KJEODXYJt2O42IVnpy4yIOX2BzmojAYNwR2+kgGSptN+b+ BY8acVt8vZhqpcSdfqSnBXxITMK6H6jzu8MlTWtIuaPxuISrsMqM0HwEXgGBqbuKs8 Fgi/iJS9l7mRg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1D27667A2E; Wed, 10 Sep 2025 13:06:38 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id 25qCtO9igdWA; Wed, 10 Sep 2025 13:06:38 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757531194; bh=1JMeEU1he9/dKg7sJjMD+ufOwNwwKRy1OQVgWraLY2E=; h=From:To:Cc:Subject:Date:From; b=flU/YD6UKohJQRPIHaV/NBgV0iodKJUk2Cue1kXDuwxZ4i6qSR5RBFj4Ioup8keFP YdFSpGTr4xADuk88sO1xkVndpBYslYy41Zo1YVkOdxyN3tRir8sjXVwneSaScIMErr m5CdfkXdB/vWqMJhVyeWDLHDGlkOUlVmcDUSClW/fACfQnvhz0cth+61mcMQscodb5 UAHy6RxwEKcX6IKP39bL3YepQdIyCMdB55/mE/QXKAxhPbYChUfP+timjpKmAgLCZI eUw/eQQ86jdZZ1JD6E/T0OReKws0t8UsxFdRHNxEyOvUvd1jslGc8D3ablD0C+fcyA 3neDMwrHHDhJA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id C6AE36789C; Wed, 10 Sep 2025 13:06:33 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Wed, 10 Sep 2025 13:06:16 -0600 Message-ID: <20250910190619.2507730-1-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: SIFXAYAEMAXBTAOAY5LUVRXTRVUHMYXD X-Message-ID-Hash: SIFXAYAEMAXBTAOAY5LUVRXTRVUHMYXD X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 1/2] Revert "sandbox: Avoid mon_len being larger than available RAM" List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass This fix turns out to be insufficient in the corner case where mon_len is smaller than available, emulated RAM but large enough that there isn't enough left. This reverts commit 88b810e241e7d1ccdf1d7329339cf5d5d9cef474. Signed-off-by: Simon Glass --- common/board_f.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index ef8b0ff7ef1..e23134a8403 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -464,11 +464,7 @@ static int reserve_uboot(void) * reserve memory for U-Boot code, data & bss * round down to next 4 kB limit */ - if (IS_ENABLED(CONFIG_SANDBOX) && gd->mon_len > gd->relocaddr) - log_debug("Cannot reserve space for U-Boot\n"); - else - gd->relocaddr -= gd->mon_len; - + gd->relocaddr -= gd->mon_len; gd->relocaddr &= ~(4096 - 1); #if defined(CONFIG_E500) || defined(CONFIG_MIPS) /* round down to next 64 kB limit so that IVPR stays aligned */