Received: from list by lists.gnu.org with archive (Exim 4.71) id 1YbTbH-0005em-AV for mharc-grub-devel@gnu.org; Fri, 27 Mar 2015 08:42:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbTbA-0005ee-JW for grub-devel@gnu.org; Fri, 27 Mar 2015 08:42:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbTb5-0007cS-Vl for grub-devel@gnu.org; Fri, 27 Mar 2015 08:42:52 -0400 Received: from mail.emea.novell.com ([130.57.118.101]:42156) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbTb5-0007cK-Nb for grub-devel@gnu.org; Fri, 27 Mar 2015 08:42:47 -0400 Received: from EMEA1-MTA by mail.emea.novell.com with Novell_GroupWise; Fri, 27 Mar 2015 12:42:46 +0000 Message-Id: <55155E55020000780006E887@mail.emea.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.0.1 Date: Fri, 27 Mar 2015 12:42:45 +0000 From: "Jan Beulich" To: "Daniel Kiper" Subject: Re: [PATCH 04/18] xen/x86: add multiboot2 protocol support References: <1422640462-28103-1-git-send-email-daniel.kiper@oracle.com> <1422640462-28103-5-git-send-email-daniel.kiper@oracle.com> <54E76992020000780006222F@mail.emea.novell.com> <20150327105636.GE8294@olila.local.net-space.pl> <55154AFA020000780006E771@mail.emea.novell.com> <20150327122218.GJ8294@olila.local.net-space.pl> In-Reply-To: <20150327122218.GJ8294@olila.local.net-space.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 130.57.118.101 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:42:57 -0000 >>> On 27.03.15 at 13:22, wrote: > On Fri, Mar 27, 2015 at 11:20:10AM +0000, Jan Beulich wrote: >> >>> On 27.03.15 at 11:56, wrote: >> > On Fri, Feb 20, 2015 at 04:06:26PM +0000, Jan Beulich wrote: >> >> >>> On 30.01.15 at 18:54, wrote: >> >> > @@ -31,7 +38,16 @@ asm ( >> >> > ); >> >> > >> >> > typedef unsigned int u32; >> >> > +typedef unsigned long long u64; >> >> > + >> >> > +#include "../../../include/xen/compiler.h" >> >> >> >> Why? >> > >> > static multiboot_info_t __used *reloc(void *mbi_in, u32 mb_magic) >> > Because of this ------> ^^^^^^ >> >> And what keeps you from leaving out the "static", making the >> __used unnecessary? >=20 > This func is clearly static. Why do not mark it as is and use __used. > What is wrong with that? #include-s of the above kind generally indicate badness, so we should try to limit them to the absolute minimum. >> >> > + >> >> > +typedef struct { >> >> > + u32 type; >> >> > + u32 size; >> >> > + u32 mem_lower; >> >> > + u32 mem_upper; >> >> > +} multiboot2_tag_basic_meminfo_t; >> >> > + >> >> > +typedef struct __packed { >> >> >> >> Why __packed when all the others aren't? >> > >> > Ha! This thing was taken from GRUB2 source. >> > I was asking this question myself many times. >> > I have not found real explanation for this >> > but if you wish I can dive into code and >> > try to find one (if it exists). >> >> Or even better just drop the __packed. >=20 > Should not we be in line with GRUB2 source? > Even it sounds strange. Anyway, I will check > GRUB2 source and maybe we can also remove __packed > from it. This way everything will be OK. Now that's the right course of action. Jan