From patchwork Thu Mar 8 11:50:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Engraf X-Patchwork-Id: 883082 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sysgo.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zxplV4Kx0z9rxs for ; Thu, 8 Mar 2018 22:52:06 +1100 (AEDT) Received: from localhost ([::1]:38275 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etu5c-00021d-HZ for incoming@patchwork.ozlabs.org; Thu, 08 Mar 2018 06:52:04 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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, PPCE500Params *params) } cur_base = loadaddr + payload_size; + if (cur_base < (32 * 1024 * 1024)) { + /* u-boot occupies memory up to 32MB, so load blobs above */ + cur_base = (32 * 1024 * 1024); + } /* 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, PPCE500Params *params) cur_base += kernel_size; } - if (cur_base < (32 * 1024 * 1024)) { - /* u-boot occupies memory up to 32MB, so load blobs above */ - cur_base = (32 * 1024 * 1024); - } - /* Load initrd. */ if (machine->initrd_filename) { initrd_base = (cur_base + INITRD_LOAD_PAD) & ~INITRD_PAD_MASK;