From patchwork Tue Apr 19 15:32:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 91996 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A82AFB6FE8 for ; Wed, 20 Apr 2011 01:32:50 +1000 (EST) Received: from localhost ([::1]:50485 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCCv0-0007Qy-GE for incoming@patchwork.ozlabs.org; Tue, 19 Apr 2011 11:32:46 -0400 Received: from eggs.gnu.org ([140.186.70.92]:50725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCCus-0007Qg-Vz for qemu-devel@nongnu.org; Tue, 19 Apr 2011 11:32:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCCus-0003kG-68 for qemu-devel@nongnu.org; Tue, 19 Apr 2011 11:32:38 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:52405) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCCur-0003kA-TG for qemu-devel@nongnu.org; Tue, 19 Apr 2011 11:32:38 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1QCCuo-00085W-Vl; Tue, 19 Apr 2011 16:32:34 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Tue, 19 Apr 2011 16:32:34 +0100 Message-Id: <1303227154-31067-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 81.2.115.146 Cc: patches@linaro.org Subject: [Qemu-devel] [PATCH] hw/arm_boot.c: move initrd load address up to accommodate large kernels X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Newer kernels are large enough that they can overlap the address where qemu places the initrd. Move the initrd up so that there is enough space for the kernel again. Unfortunately it's not possible to automatically determine the size of the kernel if it is compressed, so this is the best we can do. Signed-off-by: Peter Maydell --- I think a variant of this patch was posted some time last year but didn't attract any comment. Anyway, bumping up the arbitrary initrd load address is a bit ugly but does at least let large kernels boot, and corresponds to what you'd do on real hardware (ie change the load address in your u-boot script)... If anybody has a better solution then I'm happy to implement it; otherwise I think this patch should be committed. hw/arm_boot.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/arm_boot.c b/hw/arm_boot.c index 41e99d1..bfac982 100644 --- a/hw/arm_boot.c +++ b/hw/arm_boot.c @@ -15,7 +15,7 @@ #define KERNEL_ARGS_ADDR 0x100 #define KERNEL_LOAD_ADDR 0x00010000 -#define INITRD_LOAD_ADDR 0x00800000 +#define INITRD_LOAD_ADDR 0x00d00000 /* The worlds second smallest bootloader. Set r0-r2, then jump to kernel. */ static uint32_t bootloader[] = {