From patchwork Mon Sep 12 09:43:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 9326055 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8254560231 for ; Mon, 12 Sep 2016 09:46:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 72E7828C8E for ; Mon, 12 Sep 2016 09:46:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6773928CB2; Mon, 12 Sep 2016 09:46:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E1DE628C8E for ; Mon, 12 Sep 2016 09:46:12 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bjNmf-00077A-SA; Mon, 12 Sep 2016 09:44:13 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bjNme-000771-Ez for xen-devel@lists.xen.org; Mon, 12 Sep 2016 09:44:12 +0000 Received: from [85.158.137.68] by server-13.bemta-3.messagelabs.com id 35/DA-06162-BE876D75; Mon, 12 Sep 2016 09:44:11 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprBIsWRWlGSWpSXmKPExsVyMfTAEd3XFdf CDdb28Fks+biYxYHR4+ju30wBjFGsmXlJ+RUJrBmHrixhLegUqDj74QdjA+Nj7i5GLg4hgYmM EivetjJ2MXJysAhcYpE4u4wbxJYQeMcisel4CIQdI9G09wczhF0pMeN/JxuILSSgIjF3Uw8jx KDpTBLTd8wGG8QmoCZx5P1MIJsDqMFY4vnNHJCwiIChxO7Ti1hBbGYBS4nzGz6yg9jCAtYSXy b3skPcoCrxcm4HmM0r4CAx9f1fRoi9chLXZ05nmsDIv4CRYRWjRnFqUVlqka6RkV5SUWZ6Rkl uYmaOrqGBsV5uanFxYnpqTmJSsV5yfu4mRmD41DMwMO5gnHrC7xCjJAeTkihvkuC1cCG+pPyU yozE4oz4otKc1OJDjDIcHEoSvEvLgXKCRanpqRVpmTnAQIZJS3DwKInwHgBJ8xYXJOYWZ6ZDp E4xGnNs+X1tLRPHtqn31jIJseTl56VKifP6gpQKgJRmlObBDYJF2CVGWSlhXkYGBgYhnoLUot zMElT5V4ziHIxKwrzHQKbwZOaVwO17BXQKE9ApT7deBjmlJBEhJdXAGFnQcyUmZ5n5i8eZT7f lSs5w/VqQu/mEn9g+qQOzYnjMDt97Ey/Ku/P8u0devucZyl/1VLHna1lXeeV+Cj4x0X750u9b noh9e5h0IoHNZ+/kzd/F715cZ/TtRraU/dK6io/HfWdWM25+c2L5Oq3ZMpevWz2dfUTXJLLs5 j32ZwUKe/zuic9pN1ViKc5INNRiLipOBABxOX7cqwIAAA== X-Env-Sender: van.freenix@gmail.com X-Msg-Ref: server-4.tower-31.messagelabs.com!1473673449!5327843!1 X-Originating-IP: [209.85.192.196] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 34987 invoked from network); 12 Sep 2016 09:44:11 -0000 Received: from mail-pf0-f196.google.com (HELO mail-pf0-f196.google.com) (209.85.192.196) by server-4.tower-31.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 12 Sep 2016 09:44:11 -0000 Received: by mail-pf0-f196.google.com with SMTP id 128so7861800pfb.0 for ; Mon, 12 Sep 2016 02:44:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=JQFxIyn2VhXKb2xb3Zb19wtPSG3PWkf8iuzxx6Soqfk=; b=Ksu9L+gzwjcdFQh6dXNBzbEuxAVGoDorKeX6/H9wARcwUajsyPkL9ojGQVBPbTW01n 3/ucVM5l6vD5vBv1jJ7g4OuGK+TVMAQiDUXxAD9+vMUV2WClDceejJpYEeImAGbzIjbu Dr/fbCYe9QxlOceoPCbgjMsw1XDvA1RIo5AyfFQbfRGh885U3pbnIuPn2zvGIGOgYrHS fsKrypDya2CNfUKf/FFehXC4ruuRCLMNMzXjymdL8uvlykPCX522RqUjRQN49j5lnfV9 KpVk7E9ISgiRY+mDPfme9cDIaY6y8owLBt+cULZkJjLzbCygsaYDgAl6PtJxf6fqH2jp uK9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=JQFxIyn2VhXKb2xb3Zb19wtPSG3PWkf8iuzxx6Soqfk=; b=HeoIm8fZWsdhkLW7iKuJVIZ3m8jq0Oe7jtgpN7+uL3uEFHTWwzK1eWAY30DEdE3evS VSrJdqPdbOSFHdrJG6bvMkd2vZgYwySnzEoYKQlS+R3QZb24lLcaEXAlIq6DjhkFtaS9 knXtYBCNxrerS99dFpmH1NLHyTFIbmT5TszhrAr2cCbXCjSXYy942WcNEhneLvNgOK2y +idq78SRkq+jWfqKkooE808dtlf2OV/ADbabVQ04zsfMNHETCYg7E8P332hrOK7DbaQh Tnh+1UmvJRfX68F4ZDDGAWwkBCLDMSZZhI/+te7i8l38+nIoczfEIdm3tGBbEXGK6hRW oQbQ== X-Gm-Message-State: AE9vXwOM+cVbqfojPb02M8ozfPBVRn6OuORpv5qJTzuPntZOvwtRM8zaQzAhX2GXkWrh+g== X-Received: by 10.98.86.154 with SMTP id h26mr32013505pfj.22.1473673449409; Mon, 12 Sep 2016 02:44:09 -0700 (PDT) Received: from linux-u7w5.ap.freescale.net (gate-zmy3.freescale.com. [192.88.167.1]) by smtp.gmail.com with ESMTPSA id p73sm12036204pfj.35.2016.09.12.02.44.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Sep 2016 02:44:08 -0700 (PDT) From: Peng Fan X-Google-Original-From: Peng Fan To: julien.grall@arm.com, sstabellini@kernel.org Date: Mon, 12 Sep 2016 17:43:52 +0800 Message-Id: <1473673432-11728-1-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.6.6 Cc: Peng Fan , xen-devel@lists.xen.org Subject: [Xen-devel] [PATCH V3] xen/arm: arm64: Update the Image header X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP According to Linux Kernel, Documentation/arm64/booting.txt " When image_size is zero, a bootloader should attempt to keep as much memory as possible free for use by the kernel immediately after the end of the kernel image. The amount of space required will vary depending on selected features, and is effectively unbound. " This will consumes some memory and time, for example, When booting xen from U-Boot, U-Boot will use the image size info. Because this information is lacked in XEN image,U-Boot assume the image size is 16MB to memmove, which will cost lots time on simulation platform. The flags field is also filled with value 0xA, Bit3(physical placement): 1 Bit2-1(Page size): 1 Bit0(endianness): 0 Signed-off-by: Peng Fan Cc: Julien Grall Cc: Stefano Stabellini --- V3: Drop the image.h macros.h from Linux, included in V2. Only update image size and flags entry. offset was kept 0 as before. Only little endian supported. V2: According to Linux Kernel, a2c1d73b94ed49 "arm64: Update the Image header", included unneccessary stuff. xen/arch/arm/arm64/head.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S index 91e2817..2cd3699 100644 --- a/xen/arch/arm/arm64/head.S +++ b/xen/arch/arm/arm64/head.S @@ -115,8 +115,8 @@ efi_head: add x13, x18, #0x16 b real_start /* branch to kernel start */ .quad 0 /* Image load offset from start of RAM */ - .quad 0 /* reserved */ - .quad 0 /* reserved */ + .quad _end - start /* Effective size of kernel image, little-endian */ + .quad 0xa /* Informative flags(Physical placement 1, 4KB, LE), little-endian */ .quad 0 /* reserved */ .quad 0 /* reserved */ .quad 0 /* reserved */