From patchwork Sun May 14 07:43:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: fu.wei@linaro.org X-Patchwork-Id: 9725561 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 C56F5601E7 for ; Sun, 14 May 2017 07:47:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B80712811E for ; Sun, 14 May 2017 07:47:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ACBB5283F5; Sun, 14 May 2017 07:47:23 +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.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED 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 60332283FD for ; Sun, 14 May 2017 07:47:23 +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 1d9oCh-0000gb-3I; Sun, 14 May 2017 07:44:35 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9oCf-0000gK-K7 for xen-devel@lists.xensource.com; Sun, 14 May 2017 07:44:33 +0000 Received: from [85.158.139.211] by server-17.bemta-5.messagelabs.com id 8A/D7-19466-0EA08195; Sun, 14 May 2017 07:44:32 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprKIsWRWlGSWpSXmKPExsVysWW7jO4DLol Ig4edIhb3prxnd2D02N63iz2AMYo1My8pvyKBNaPhwgPmgpWCFWvnXGBpYDzB18XIxSEkMJtJ 4t++s+xdjJwcLAL2Eq2rzzGD2IwCZRKfmx+wQdjZEhM/nmKCqLGT+N22nxmieTujRNv9fWBFb ALiEmc6v7KC2CICYRIv3r9mAyliFrjMKPH4/z2whLBAvMSX2buZISapShxZMxtsKq+AmUTnpg tgcU4Bc4nu/sVgcSGgePfqV2C2hIC2xOPT0xlBhkoI9DFKvLp5l3ECo8ACRoZVjBrFqUVlqUW 6hgZ6SUWZ6RkluYmZOUCeqV5uanFxYnpqTmJSsV5yfu4mRmBwMQDBDsY1U50PMUpyMCmJ8rq+ FI8U4kvKT6nMSCzOiC8qzUktPsQow8GhJMG7iVMiUkiwKDU9tSItMwcY5jBpCQ4eJRHeGSBp3 uKCxNzizHSI1ClGRSlx3n8gCQGQREZpHlwbLLYuMcpKCfMyAh0ixFOQWpSbWYIq/4pRnINRSZ h3IsgUnsy8Erjpr4AWMwEtDgO5mbe4JBEhJdXA2HOHwevr1SVrXr/72Zj2siDBI/lArfXu1Gx toYfG6xMNhe5PTvvy5t/J3cY5zuvVDrKVX34aZ3Q40Enqy04R5lOHb5kvmPv1aHTuVavFDftO Oso+Luu1XR50j+czX8Kv999lDz1JaPjGdnzppf/uC13bpE+cnn7GN+FSnKGanCXzmturW59kb VViKc5INNRiLipOBADlQN6NqAIAAA== X-Env-Sender: fu.wei@linaro.org X-Msg-Ref: server-9.tower-206.messagelabs.com!1494747870!98171417!1 X-Originating-IP: [209.132.183.28] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMjA5LjEzMi4xODMuMjggPT4gNTQwNjQ=\n X-StarScan-Received: X-StarScan-Version: 9.4.12; banners=-,-,- X-VirusChecked: Checked Received: (qmail 65460 invoked from network); 14 May 2017 07:44:32 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by server-9.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 14 May 2017 07:44:32 -0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0672D811A7; Sun, 14 May 2017 07:44:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0672D811A7 DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0672D811A7 Received: from Rei-Ayanami.localdomain.com (vpn1-4-19.pek2.redhat.com [10.72.4.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id 15FC017140; Sun, 14 May 2017 07:44:21 +0000 (UTC) From: fu.wei@linaro.org To: dkiper@net-space.pl, grub-devel@gnu.org, arvidjaar@gmail.com, phcoder@gmail.com Date: Sun, 14 May 2017 15:43:46 +0800 Message-Id: <20170514074347.18787-3-fu.wei@linaro.org> In-Reply-To: <20170514074347.18787-1-fu.wei@linaro.org> References: <20170514074347.18787-1-fu.wei@linaro.org> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Sun, 14 May 2017 07:44:30 +0000 (UTC) Cc: xen-devel@lists.xensource.com, jcm@redhat.com, ian.campbell@docker.com, leif.lindholm@linaro.org, julien.grall@arm.com, sstabellini@kernel.org, linaro-uefi@lists.linaro.org, Fu Wei Subject: [Xen-devel] [PATCH v8 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64 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 From: Fu Wei This patch adds the support of xen_boot command for aarch64: xen_hypervisor xen_module These two commands are only for aarch64, since it has its own protocol and commands to boot xen hypervisor and Dom0, but not multiboot. For other architectures, they are still using multiboot and module commands. Signed-off-by: Fu Wei --- util/grub.d/20_linux_xen.in | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in index c48af94..c002fc9 100644 --- a/util/grub.d/20_linux_xen.in +++ b/util/grub.d/20_linux_xen.in @@ -122,16 +122,16 @@ linux_entry () else xen_rm_opts="no-real-mode edd=off" fi - multiboot ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} \${xen_rm_opts} + ${xen_loader} ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} \${xen_rm_opts} echo '$(echo "$lmessage" | grub_quote)' - module ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args} + ${module_loader} ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args} EOF if test -n "${initrd}" ; then # TRANSLATORS: ramdisk isn't identifier. Should be translated. message="$(gettext_printf "Loading initial ramdisk ...")" sed "s/^/$submenu_indentation/" << EOF echo '$(echo "$message" | grub_quote)' - module --nounzip ${rel_dirname}/${initrd} + ${module_loader} --nounzip ${rel_dirname}/${initrd} EOF fi sed "s/^/$submenu_indentation/" << EOF @@ -206,6 +206,14 @@ while [ "x${xen_list}" != "x" ] ; do if [ "x$is_top_level" != xtrue ]; then echo " submenu '$(gettext_printf "Xen hypervisor, version %s" "${xen_version}" | grub_quote)' \$menuentry_id_option 'xen-hypervisor-$xen_version-$boot_device_id' {" fi + $grub_file --is-arm64-efi $current_xen + if [ $? -ne 0 ]; then + xen_loader="multiboot" + module_loader="module" + else + xen_loader="xen_hypervisor" + module_loader="xen_module" + fi while [ "x$list" != "x" ] ; do linux=`version_find_latest $list` gettext_printf "Found linux image: %s\n" "$linux" >&2