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 Fu X-Patchwork-Id: 99758 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp1038043qge; Sun, 14 May 2017 00:44:59 -0700 (PDT) X-Received: by 10.36.98.21 with SMTP id d21mr303828itc.78.1494747899094; Sun, 14 May 2017 00:44:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494747899; cv=none; d=google.com; s=arc-20160816; b=A5FQ7UCnQt/UWLX4Huai7AcDpKEpjQDd8uQ65QnO09roH2SWfIziesgUMqvV2C0MsP ZIQfIaKIYHVlQmZaFtgPIeZiE0HO5MakNwQUvx/LQ6fE35vOgyvjf6Ow2fLHweAt82z/ vc9HBj2ZAmQYNAHSAMNxMuegLOqH0hp6Kui3iFPd5Dt2wHn/hrg8rZ5iaCzgPKrGpbg+ ox24qQodwJ9GKu768iyHca1cXTE9u8w6kZqLtvq7gFfqiVfbwbZktsYbhguno5DfAaz4 LUIz0FBAmUOJ8XXSqSA2w4PnwnvOI7IkrhVAkx39HNnmrg+mc0RClqgIltPbiuqT3UsV +2bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-filter:dmarc-filter:delivered-to :arc-authentication-results; bh=W7fEw20jg9Hpits15QtpLtxqQBVzgbdyUy4gwJkqUc4=; b=b7tHLPt5k8YRQU8/JL5SL7Vm9DV8NgE7h+9vxFr/FrVxOYQNTylqQxrhTt7BGZriiM viE9GEHkWxqT6WYzYgH2LZpbjYOZSNWA/d5dpA/g1s+5N1z4FMP1pZT8V1RnSZ3RSNUJ ozrdkeWBrhydbeOvqYf3v4ZbA68AgWlGSmahB2p767qvRziZtT6q+wswih8J9PqOXnG3 xfDbC5+vWiKPrsTRkmurKG4BZ/OEbEHsRJ1uoHxrlzSitaP997vPri9j2s5fx30LXdbK AdMbCeHvgPCUKbTO1+hpYd7Z+wA5y03cDHv9WNri12RxxWixwUPRuwOyCUPq95mKMeQF 38pg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id e93si6575914itd.56.2017.05.14.00.44.58; Sun, 14 May 2017 00:44:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id A368B609ED; Sun, 14 May 2017 07:44:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 3BDB9609F2; Sun, 14 May 2017 07:44:42 +0000 (UTC) X-Original-To: linaro-uefi@lists.linaro.org Delivered-To: linaro-uefi@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 7FF99609F2; Sun, 14 May 2017 07:44:39 +0000 (UTC) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by lists.linaro.org (Postfix) with ESMTPS id 3199B60816 for ; Sun, 14 May 2017 07:44:31 +0000 (UTC) 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, julien.grall@arm.com, sstabellini@kernel.org, linaro-uefi@lists.linaro.org Subject: [Linaro-uefi] [PATCH v8 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64 X-BeenThere: linaro-uefi@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "For discussions about Linaro-related UEFI development. Not a substitute for edk2-devel." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linaro-uefi-bounces@lists.linaro.org Sender: "Linaro-uefi" 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