From patchwork Mon Jun 30 14:05:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 32742 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f72.google.com (mail-yh0-f72.google.com [209.85.213.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D91D5203C0 for ; Mon, 30 Jun 2014 14:07:44 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id f10sf18679511yha.3 for ; Mon, 30 Jun 2014 07:07:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:cc:subject :precedence:list-id:list-unsubscribe:list-post:list-help :list-subscribe:mime-version:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive :content-type:content-transfer-encoding; bh=bz5W1FGMO22IH40jP99zoxtfJ650ZPzXwDU73lCeZ14=; b=SJG+3kdkPHArZuyPtYmUa2XYy2xtNkUXY/BI4uAPolsGhfi/NIA5yWJW9OY3U4fr5F rkp980tyli9tiMJTSK/3FO61Q+KyQQJBHjzaNhIbaT1h+KMOIfjDsZwnYpNNpZnCZW74 57wniV516dSPp6TdH44cecJCL60AIB533Gz0pQ7y/yKfa7am2VINX4WxuKj0c7m4dHNy a2lBZgzSNTHk8TKuopAAiumtubLOMRSa3a85ebhozNQA8jvz9YhNEPgHjfLIYzpL6mYC 0t7ErgU191LuT/eguCo0E0pPyaaY9xBBKWs0BoxXjYj/oqESXyg4epsxhfoAs8vHP52m Ja7w== X-Gm-Message-State: ALoCoQnieGhs0Xl0DvxbdSm67ENqRsSvplvlvKIF1Jd0PpgwW1N2351MjNf4yTLbqEJlGo0VdNJ4 X-Received: by 10.52.146.133 with SMTP id tc5mr19087967vdb.6.1404137263249; Mon, 30 Jun 2014 07:07:43 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.16.173 with SMTP id 42ls1486709qgb.62.gmail; Mon, 30 Jun 2014 07:07:43 -0700 (PDT) X-Received: by 10.52.24.68 with SMTP id s4mr3015851vdf.37.1404137263105; Mon, 30 Jun 2014 07:07:43 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id dl7si1752019veb.85.2014.06.30.07.07.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 30 Jun 2014 07:07:43 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.175 as permitted sender) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id jx11so8114093veb.6 for ; Mon, 30 Jun 2014 07:07:43 -0700 (PDT) X-Received: by 10.58.12.73 with SMTP id w9mr300587veb.13.1404137262974; Mon, 30 Jun 2014 07:07:42 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp142247vcb; Mon, 30 Jun 2014 07:07:41 -0700 (PDT) X-Received: by 10.224.44.6 with SMTP id y6mr59762975qae.47.1404137261426; Mon, 30 Jun 2014 07:07:41 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id p2si8824090qah.58.2014.06.30.07.07.40 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 30 Jun 2014 07:07:41 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X1cCx-0000tb-I9; Mon, 30 Jun 2014 14:05:23 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X1cCw-0000tW-5u for xen-devel@lists.xenproject.org; Mon, 30 Jun 2014 14:05:22 +0000 Received: from [85.158.143.35:41938] by server-2.bemta-4.messagelabs.com id BC/BD-06539-1AE61B35; Mon, 30 Jun 2014 14:05:21 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-14.tower-21.messagelabs.com!1404137120!14857053!1 X-Originating-IP: [209.85.212.172] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 14724 invoked from network); 30 Jun 2014 14:05:20 -0000 Received: from mail-wi0-f172.google.com (HELO mail-wi0-f172.google.com) (209.85.212.172) by server-14.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 30 Jun 2014 14:05:20 -0000 Received: by mail-wi0-f172.google.com with SMTP id hi2so6123444wib.17 for ; Mon, 30 Jun 2014 07:05:20 -0700 (PDT) X-Received: by 10.194.10.36 with SMTP id f4mr43563879wjb.61.1404137120281; Mon, 30 Jun 2014 07:05:20 -0700 (PDT) Received: from belegaer.uk.xensource.com ([185.25.64.249]) by mx.google.com with ESMTPSA id ek3sm41566309wjd.17.2014.06.30.07.05.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Jun 2014 07:05:19 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Mon, 30 Jun 2014 15:05:13 +0100 Message-Id: <1404137113-25101-1-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 Cc: stefano.stabellini@citrix.com, Julien Grall , tim@xen.org, ian.campbell@citrix.com Subject: [Xen-devel] [PATCH] libxc: arm: Load the zImage to the rambase address + 2MB X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: Currently libxc is loading the kernel zImage at rambase + 32KB (0x8000). Kernel are usually using 1MB (or 2MB) mapping for the early page table. If the kernel doesn't relocate itself this would require to virtual address starting at 0xXXXX8000. This is not part of the zImage protocol, but a convenience for Linux after the decompressor stage. Linux is able to load at any address in the memory and it will relocate itself to respect it own constraint. Load the zImage at rambase address + 2MB to make life easier for other kernel (such as FreeBSD, Mini-OS). FWIW, this is already the case for DOM0. Signed-off-by: Julien Grall --- This patch is candidate for backporting. Xen 4.4 is suitable to boot any guest OS, but without this patch it will require some modification in the guest kernel. Hence, with this patch DOM0 and the guest will have the same requirement for booting. --- tools/libxc/xc_dom_armzimageloader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxc/xc_dom_armzimageloader.c b/tools/libxc/xc_dom_armzimageloader.c index 2b28781..2cf95a5 100644 --- a/tools/libxc/xc_dom_armzimageloader.c +++ b/tools/libxc/xc_dom_armzimageloader.c @@ -87,7 +87,7 @@ static int xc_dom_parse_zimage32_kernel(struct xc_dom_image *dom) zimage = (uint32_t *)dom->kernel_blob; /* Do not load kernel at the very first RAM address */ - v_start = rambase + 0x8000; + v_start = rambase + 0x200000; if ( dom->kernel_size > UINT64_MAX - v_start ) {