From patchwork Thu Jul 23 05:16:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fu Wei Fu X-Patchwork-Id: 51375 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by patches.linaro.org (Postfix) with ESMTPS id 3481B20323 for ; Thu, 23 Jul 2015 05:17:40 +0000 (UTC) Received: by laah7 with SMTP id h7sf37641827laa.2 for ; Wed, 22 Jul 2015 22:17:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:reply-to:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:content-type:content-transfer-encoding:errors-to :sender:x-original-sender:x-original-authentication-results :mailing-list; bh=sgi5SoVt7uH5p7BFzgMsk7lt8LubdClxBBPMX47F9mw=; b=HtMwYwEa0yMQKT1BdZ6ZWnrHsKqUowvi/jCqtcStlnP+hdZhP2GFpFI0dWdqZ+Oq4z h7XGgTAxL6xyRvthlZ3YpO91Ey9Bj/LC2jAqH0OucDR5MqYIHL5sAyqJ+znR2D1c1niy gqtGxULJRzmvPBs1W7MQM3kqhcUDdMsn5hwaWuxvcNCmQFQtHZY+ZLklcBx76RqfB52F sl2KMLrFK1JgQsu0cTa3Z8ISbTNhvcK+Ytbt5U32FezWtu+nT/iBAY9+JcpUz9mP0WPj sAXH4DGuLxzEhcCU+FyUz5uzDJcvPmyUTnaOI8aNdCgUzjXsKLUdIW5JWO+gCCkyTeUn Z79Q== X-Gm-Message-State: ALoCoQmkSnLasLJVOj5nx7/jYp3Qi7UD9ZSfdjGpNKjIkM8/6maT3RIC6ljmkry2BFdoaRojgVG1 X-Received: by 10.152.1.105 with SMTP id 9mr2841554lal.3.1437628659207; Wed, 22 Jul 2015 22:17:39 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.129 with SMTP id s1ls201608las.89.gmail; Wed, 22 Jul 2015 22:17:39 -0700 (PDT) X-Received: by 10.112.209.106 with SMTP id ml10mr5648987lbc.112.1437628658992; Wed, 22 Jul 2015 22:17:38 -0700 (PDT) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id iz3si3062578lbc.174.2015.07.22.22.17.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Jul 2015 22:17:38 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by lagw2 with SMTP id w2so150362035lag.3 for ; Wed, 22 Jul 2015 22:17:38 -0700 (PDT) X-Received: by 10.152.203.134 with SMTP id kq6mr5750811lac.106.1437628658752; Wed, 22 Jul 2015 22:17:38 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp324632lba; Wed, 22 Jul 2015 22:17:38 -0700 (PDT) X-Received: by 10.180.104.8 with SMTP id ga8mr48797941wib.5.1437628658126; Wed, 22 Jul 2015 22:17:38 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id cj8si7315314wib.94.2015.07.22.22.17.37 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 22 Jul 2015 22:17:38 -0700 (PDT) Received-SPF: pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:39524 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZI8sy-0003Iz-Qy for patch@linaro.org; Thu, 23 Jul 2015 01:17:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60515) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZI8sg-0003Ea-Oy for grub-devel@gnu.org; Thu, 23 Jul 2015 01:17:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZI8sd-0002ev-F6 for grub-devel@gnu.org; Thu, 23 Jul 2015 01:17:18 -0400 Received: from mail-pd0-f174.google.com ([209.85.192.174]:36202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZI8sd-0002en-A5 for grub-devel@gnu.org; Thu, 23 Jul 2015 01:17:15 -0400 Received: by pdjr16 with SMTP id r16so153525543pdj.3 for ; Wed, 22 Jul 2015 22:17:14 -0700 (PDT) X-Received: by 10.70.129.102 with SMTP id nv6mr14465339pdb.55.1437628634752; Wed, 22 Jul 2015 22:17:14 -0700 (PDT) Received: from localhost.localdomain (li400-65.members.linode.com. [106.187.50.65]) by smtp.googlemail.com with ESMTPSA id ti10sm6364677pab.20.2015.07.22.22.17.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Jul 2015 22:17:14 -0700 (PDT) From: fu.wei@linaro.org To: grub-devel@gnu.org, arvidjaar@gmail.com, phcoder@gmail.com Subject: [PATCH v3 1/4] arm64: Add and export some accessor functions for xen boot Date: Thu, 23 Jul 2015 13:16:20 +0800 Message-Id: <1437628583-23667-2-git-send-email-fu.wei@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1437628583-23667-1-git-send-email-fu.wei@linaro.org> References: <=fu.wei@linaro.org> <1437628583-23667-1-git-send-email-fu.wei@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.192.174 Cc: xen-devel@lists.xensource.com, Ian.Campbell@citrix.com, stefano.stabellini@eu.citrix.com, jcm@redhat.com, leif.lindholm@linaro.org, ryan.harkin@linaro.org, linaro-uefi@lists.linaro.org, Fu Wei X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: grub-devel-bounces+patch=linaro.org@gnu.org Sender: grub-devel-bounces+patch=linaro.org@gnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: fu.wei@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Fu Wei Add accessor functions of "loaded" flag in grub-core/loader/arm64/linux.c. Export accessor functions of "loaded" flag and grub_linux_get_fdt function in include/grub/arm64/linux.h. Purpose: Reuse the existing code of devicetree in linux module. Signed-off-by: Fu Wei --- grub-core/loader/arm64/linux.c | 13 +++++++++++++ include/grub/arm64/linux.h | 6 +++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c index 987f5b9..cf6026e 100644 --- a/grub-core/loader/arm64/linux.c +++ b/grub-core/loader/arm64/linux.c @@ -48,6 +48,19 @@ static grub_addr_t initrd_end; static void *loaded_fdt; static void *fdt; +/* The accessor functions for "loaded" flag */ +int +grub_linux_get_loaded (void) +{ + return loaded; +} + +void +grub_linux_set_loaded (int loaded_flag) +{ + loaded = loaded_flag; +} + static void * get_firmware_fdt (void) { diff --git a/include/grub/arm64/linux.h b/include/grub/arm64/linux.h index 65796d9..20058f3 100644 --- a/include/grub/arm64/linux.h +++ b/include/grub/arm64/linux.h @@ -43,10 +43,14 @@ struct grub_arm64_linux_kernel_header }; /* Declare the functions for getting dtb and checking/booting image */ -void *grub_linux_get_fdt (void); grub_err_t grub_arm64_uefi_check_image (struct grub_arm64_linux_kernel_header *lh); grub_err_t grub_arm64_uefi_boot_image (grub_addr_t addr, grub_size_t size, char *args); +/* Export the accessor functions for gettin dtb and "loaded" flag */ +void EXPORT_FUNC (*grub_linux_get_fdt) (void); +int EXPORT_FUNC (grub_linux_get_loaded) (void); +void EXPORT_FUNC (grub_linux_set_loaded) (int loaded_flag); + #endif /* ! GRUB_LINUX_CPU_HEADER */