From patchwork Wed Feb 24 18:01:39 2016 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: 8410861 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A9638C0553 for ; Wed, 24 Feb 2016 18:04:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E274A20274 for ; Wed, 24 Feb 2016 18:04:54 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0EAEF20270 for ; Wed, 24 Feb 2016 18:04:54 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aYdlN-0006ah-5I; Wed, 24 Feb 2016 18:02:13 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aYdlL-0006aa-Nz for xen-devel@lists.xensource.com; Wed, 24 Feb 2016 18:02:11 +0000 Received: from [193.109.254.147] by server-1.bemta-14.messagelabs.com id 4E/F8-02901-320FDC65; Wed, 24 Feb 2016 18:02:11 +0000 X-Env-Sender: fu.wei@linaro.org X-Msg-Ref: server-4.tower-27.messagelabs.com!1456336929!25522578!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: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 51502 invoked from network); 24 Feb 2016 18:02:10 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by server-4.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 24 Feb 2016 18:02:10 -0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 8EE5563140; Wed, 24 Feb 2016 18:02:08 +0000 (UTC) Received: from magi-f22.redhat.com (vpn1-5-9.pek2.redhat.com [10.72.5.9]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1OI1o56031440; Wed, 24 Feb 2016 13:02:01 -0500 From: fu.wei@linaro.org To: grub-devel@gnu.org, arvidjaar@gmail.com, phcoder@gmail.com Date: Thu, 25 Feb 2016 02:01:39 +0800 Message-Id: <1456336901-25708-2-git-send-email-fu.wei@linaro.org> In-Reply-To: <1456336901-25708-1-git-send-email-fu.wei@linaro.org> References: <1456336901-25708-1-git-send-email-fu.wei@linaro.org> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 24 Feb 2016 18:02:08 +0000 (UTC) Cc: xen-devel@lists.xensource.com, Ian.Campbell@citrix.com, jcm@redhat.com, julien.grall@linaro.org, leif.lindholm@linaro.org, linaro-uefi@lists.linaro.org, Fu Wei Subject: [Xen-devel] [PATCH 1/3] arm64: add grub_xen_boot env to indicate that we have xen_* commands X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fu Wei Signed-off-by: Fu Wei --- grub-core/loader/arm64/xen_boot.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c index 8ae43d7..ef03111 100644 --- a/grub-core/loader/arm64/xen_boot.c +++ b/grub-core/loader/arm64/xen_boot.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -490,10 +491,17 @@ GRUB_MOD_INIT (xen_boot) grub_register_command ("xen_module", grub_cmd_xen_module, 0, N_("Load a xen module.")); my_mod = mod; + +/* setup a env to indicate that + * we have xen_* commands. + */ + grub_env_set ("grub_xen_boot", "y"); + grub_env_export ("grub_xen_boot"); } GRUB_MOD_FINI (xen_boot) { grub_unregister_command (cmd_xen_hypervisor); grub_unregister_command (cmd_xen_module); + grub_env_unset ("grub_xen_boot"); }