Received: from list by lists.gnu.org with archive (Exim 4.71) id 1YbSwg-0005Bf-Mc for mharc-grub-devel@gnu.org; Fri, 27 Mar 2015 08:01:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59335) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbSwY-0004xz-Pz for grub-devel@gnu.org; Fri, 27 Mar 2015 08:01:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbSwQ-0007W8-LO for grub-devel@gnu.org; Fri, 27 Mar 2015 08:00:54 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:20510) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbSwQ-0007Vt-5c for grub-devel@gnu.org; Fri, 27 Mar 2015 08:00:46 -0400 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t2RC0aIN028988 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 27 Mar 2015 12:00:36 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t2RC0Z4u017806 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 27 Mar 2015 12:00:35 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t2RC0Y1Y007296; Fri, 27 Mar 2015 12:00:34 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 05:00:34 -0700 Date: Fri, 27 Mar 2015 13:00:27 +0100 From: Daniel Kiper To: Jan Beulich Subject: Re: [PATCH 16/18] efi: create efi_exit_boot() Message-ID: <20150327120027.GH8294@olila.local.net-space.pl> References: <1422640462-28103-1-git-send-email-daniel.kiper@oracle.com> <1422640462-28103-17-git-send-email-daniel.kiper@oracle.com> <54F4A1CB0200007800065453@mail.emea.novell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54F4A1CB0200007800065453@mail.emea.novell.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: aserv0022.oracle.com [141.146.126.234] 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 12:01:01 -0000 On Mon, Mar 02, 2015 at 04:45:47PM +0000, Jan Beulich wrote: > >>> On 30.01.15 at 18:54, wrote: > > ..which gets memory map and calls ExitBootServices(). We need this > > to support multiboot2 protocol on EFI platforms. > > Patches from 9 up to here all make sense on the basis that patch 18 > does and assuming that you really need all this code moved out to > separate functions. How much different is efi_multiboot2() introduced > in #18 from what is left of efi_start() at this point? I.e. is splitting out More or less efi_multiboot2() does not parse command line and do not load modules itself as efi_start() does. > all of this code really needed? I think that it is worth doing. First of all efi_start() is huge and its analysis is very difficult right now. So, splitting code into smaller chunks will improve readability a lot (I am still thinking about extracting command line parser and module loader from efi_start() even if both functions will be used only in efi_start(); this way we will have very simple functions doing one thing easy to understand). Additionally, we create pieces which are very easy to reuse in efi_multiboot2() which is very simple and again easy for analysis. Potentially we can reuse efi_start() in multiboot2 case. However, I prefer to have separate function because this way it is clear that multiboot2 case is different thing then native EFI loader stuff. Additionally, efi_start() is architecture independent and efi_multiboot2() is x86 only and it should live in x86 files. > If it is, please don't title all these patches "create ..." but "split out > ..." or some such - you don't really create the code. Similarly the > second sentence above is too imprecise for my taste - "we want to > re-use this code to support ..." would seem more to the point. OK. Daniel