From nobody Mon May 6 17:07:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1520509964705998.2963559665878; Thu, 8 Mar 2018 03:52:44 -0800 (PST) Received: from localhost ([::1]:38278 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etu69-0002TG-1x for importer@patchew.org; Thu, 08 Mar 2018 06:52:37 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etu4W-0001WB-LE for qemu-devel@nongnu.org; Thu, 08 Mar 2018 06:50:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1etu4T-0001ii-Jy for qemu-devel@nongnu.org; Thu, 08 Mar 2018 06:50:56 -0500 Received: from mail.sysgo.com ([176.9.12.79]:60726) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1etu4T-0001gN-DS; Thu, 08 Mar 2018 06:50:53 -0500 From: David Engraf To: David Gibson Date: Thu, 8 Mar 2018 12:50:36 +0100 Message-Id: <20180308115036.23461-1-david.engraf@sysgo.com> X-Mailer: git-send-email 2.14.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 176.9.12.79 Subject: [Qemu-devel] [PATCH] PPC e500: Fix gap between u-boot and kernel X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Engraf , qemu-ppc@nongnu.org, Alexander Graf , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This patch moves the gap between u-boot and kernel at the correct location. Signed-off-by: David Engraf --- hw/ppc/e500.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 43c15d18c4..bdef2bddc6 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -1009,6 +1009,10 @@ void ppce500_init(MachineState *machine, PPCE500Para= ms *params) } =20 cur_base =3D loadaddr + payload_size; + if (cur_base < (32 * 1024 * 1024)) { + /* u-boot occupies memory up to 32MB, so load blobs above */ + cur_base =3D (32 * 1024 * 1024); + } =20 /* Load bare kernel only if no bios/u-boot has been provided */ if (machine->kernel_filename && !kernel_as_payload) { @@ -1025,11 +1029,6 @@ void ppce500_init(MachineState *machine, PPCE500Para= ms *params) cur_base +=3D kernel_size; } =20 - if (cur_base < (32 * 1024 * 1024)) { - /* u-boot occupies memory up to 32MB, so load blobs above */ - cur_base =3D (32 * 1024 * 1024); - } - /* Load initrd. */ if (machine->initrd_filename) { initrd_base =3D (cur_base + INITRD_LOAD_PAD) & ~INITRD_PAD_MASK; --=20 2.14.1