From patchwork Tue May 2 07:06:26 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: 9707483 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 966A360245 for ; Tue, 2 May 2017 07:09:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 87EDF2815E for ; Tue, 2 May 2017 07:09:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7C8CA283BA; Tue, 2 May 2017 07:09:12 +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 259BB2815E for ; Tue, 2 May 2017 07:09: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 1d5Rth-0001hE-KH; Tue, 02 May 2017 07:06:57 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d5Rtg-0001gu-Jf for xen-devel@lists.xensource.com; Tue, 02 May 2017 07:06:56 +0000 Received: from [85.158.137.68] by server-9.bemta-3.messagelabs.com id 31/D4-01997-F0038095; Tue, 02 May 2017 07:06:55 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprCIsWRWlGSWpSXmKPExsVysWW7jC6/AUe kwffz4hb3prxnd2D02N63iz2AMYo1My8pvyKBNWPNinfMBd2CFW827GVsYNzI18XIxSEkMJtJ 4sHiS+xdjJwcLAL2En1rL7GB2IwCZRKfmx9A2dkSEz+eYoKosZO4cPMQC0TzdkaJjsPNjCAJN gFxiTOdX1lBbBGBMIkX71+zgRQxC1xmlPg0cTtYkbBAvMS9noksEJNUJf5c/QwW5xUwk2j/+w LsCk4Bc4mV3e/ABgkBxVdt+8UMYksIaEs0nP/JCjJUQqCPUWLC3ONsExgFFjAyrGJUL04tKks t0jXUSyrKTM8oyU3MzNE1NDDWy00tLk5MT81JTCrWS87P3cQIDC0GINjBuPyj0yFGSQ4mJVFe 9VfskUJ8SfkplRmJxRnxRaU5qcWHGGU4OJQkeF/pcUQKCRalpqdWpGXmAIMcJi3BwaMkwsuqD 5TmLS5IzC3OTIdInWJUlBLnVQVJCIAkMkrz4NpgkXWJUVZKmJcR6BAhnoLUotzMElT5V4ziHI xKwrw3QLbzZOaVwE1/BbSYCWhxsyzY4pJEhJRUA6Pf7R89Z6Tzdm0/l60hGpWumqR55eekuF0 nl/rXKO1M9M444V3TkuGl8sxm7iyBu4tSG9/f8kjUe7Oh9dAyuY/ak9ZqMSj3fNOa+YT32NeK 5/9PJu5m+//RekJn8N1psep3S/cceSTG3G7tKj1f5knq+/XP1NW0HuxaOsF4kvd3jrIU0evvt YOUWIozEg21mIuKEwEuStIfpwIAAA== X-Env-Sender: fu.wei@linaro.org X-Msg-Ref: server-16.tower-31.messagelabs.com!1493708813!90669005!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 23274 invoked from network); 2 May 2017 07:06:55 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by server-16.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 2 May 2017 07:06:55 -0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 03FF9C49A5; Tue, 2 May 2017 07:06:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 03FF9C49A5 DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 03FF9C49A5 Received: from Rei-Ayanami.localdomain.com (ovpn-8-44.pek2.redhat.com [10.72.8.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2BD7A7D940; Tue, 2 May 2017 07:06:45 +0000 (UTC) From: fu.wei@linaro.org To: dkiper@net-space.pl, grub-devel@gnu.org, arvidjaar@gmail.com, phcoder@gmail.com Date: Tue, 2 May 2017 15:06:26 +0800 Message-Id: <20170502070627.11389-3-fu.wei@linaro.org> In-Reply-To: <20170502070627.11389-1-fu.wei@linaro.org> References: <20170502070627.11389-1-fu.wei@linaro.org> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 02 May 2017 07:06:53 +0000 (UTC) Cc: xen-devel@lists.xensource.com, Ian.Campbell@citrix.com, jcm@redhat.com, leif.lindholm@linaro.org, julien.grall@arm.com, sstabellini@kernel.org, linaro-uefi@lists.linaro.org, Fu Wei Subject: [Xen-devel] [PATCH v7 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 | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in index c48af94..9777719 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,13 @@ 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 + if [ "x$machine" != xaarch64 ]; 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