Received: from list by lists.gnu.org with archive (Exim 4.71) id 1YbUNm-0005XM-Cx for mharc-grub-devel@gnu.org; Fri, 27 Mar 2015 09:33:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbUNh-0005XE-75 for grub-devel@gnu.org; Fri, 27 Mar 2015 09:33:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbUNd-0000Sa-SD for grub-devel@gnu.org; Fri, 27 Mar 2015 09:33:01 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:37859) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbUNd-0000SO-MV for grub-devel@gnu.org; Fri, 27 Mar 2015 09:32:57 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t2RDWpBd011463 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 27 Mar 2015 13:32:51 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t2RDWlwl014591 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 27 Mar 2015 13:32:49 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t2RDWk1Z024841; Fri, 27 Mar 2015 13:32:47 GMT Received: from olila.local.net-space.pl (/10.175.231.232) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 27 Mar 2015 06:32:46 -0700 Date: Fri, 27 Mar 2015 14:32:28 +0100 From: Daniel Kiper To: Jan Beulich Subject: Re: [PATCH 05/18] efi: split efi_enabled to efi_platform and efi_loader Message-ID: <20150327133228.GN8294@olila.local.net-space.pl> References: <1422640462-28103-1-git-send-email-daniel.kiper@oracle.com> <1422640462-28103-6-git-send-email-daniel.kiper@oracle.com> <54E76C2F0200007800062262@mail.emea.novell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54E76C2F0200007800062262@mail.emea.novell.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 Cc: Juergen Gross , grub-devel@gnu.org, keir@xen.org, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, roy.franz@linaro.org, ning.sun@intel.com, david.vrabel@citrix.com, phcoder@gmail.com, xen-devel@lists.xenproject.org, qiaowei.ren@intel.com, richard.l.maliszewski@intel.com, gang.wei@intel.com, fu.wei@linaro.org X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 13:33:05 -0000 On Fri, Feb 20, 2015 at 04:17:35PM +0000, Jan Beulich wrote: > >>> On 30.01.15 at 18:54, wrote: > > We need more fine grained knowledge about EFI environment and check > > for EFI platform and EFI loader separately to properly support > > multiboot2 protocol. > > ... because of ... (i.e. I can't see from the description what the > separation is good for). Looking at the comments you placed > aside the variables doesn't help me either. > > > In general Xen loaded by this protocol uses > > memory mappings and loaded modules in simliar way to Xen loaded > > by multiboot (v1) protocol. Hence, split efi_enabled to efi_platform > > and efi_loader. > > And if I'm guessing things right, then introducing efi_loader but > leaving efi_enabled alone (only converting where needed) would efi_enabled is not fortunate name for new usage. Currently it means that Xen binary have or does not have EFI support build in. However, if we build in multiboot2 protocol into xen.gz then it means that it can ran on legacy BIOS or EFI platform. So, I think that we should rename efi_enabled to efi_platform because it will mean that Xen runs on EFI platform or not. efi_loader is used to differentiate between EFI native loader and multiboot2 protocol. > seem the right approach. [...] > > --- a/xen/include/xen/efi.h > > +++ b/xen/include/xen/efi.h > > @@ -5,7 +5,11 @@ > > #include > > #endif > > > > -extern const bool_t efi_enabled; > > +/* If true then Xen runs on EFI platform. */ > > +extern bool_t efi_platform; > > + > > +/* If true then Xen was loaded by native EFI loader as PE application. */ > > +extern bool_t efi_loader; > > I don't see why you're losing the constness. Both of them could be set during runtime. Please look above for more details. Daniel