From: Daniel Kiper Subject: Re: [PATCH RFC 1/7] xen/x86: Add mbd.h header file Date: Tue, 9 Sep 2014 15:39:39 +0200 Message-ID: <20140909133939.GR3459@olila.local.net-space.pl> References: <1407539046-16910-1-git-send-email-daniel.kiper@oracle.com> <1407539046-16910-2-git-send-email-daniel.kiper@oracle.com> <53E8ADBB020000780002B0A6@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XRLeL-0006Co-1G for xen-devel@lists.xenproject.org; Tue, 09 Sep 2014 13:40:09 +0000 Content-Disposition: inline In-Reply-To: <53E8ADBB020000780002B0A6@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: keir@xen.org, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, roy.franz@linaro.org, ning.sun@intel.com, ross.philipson@citrix.com, xen-devel@lists.xenproject.org, qiaowei.ren@intel.com, richard.l.maliszewski@intel.com, gang.wei@intel.com, fu.wei@linaro.org List-Id: xen-devel@lists.xenproject.org On Mon, Aug 11, 2014 at 10:49:15AM +0100, Jan Beulich wrote: > >>> On 09.08.14 at 01:04, wrote: > > --- /dev/null > > +++ b/xen/include/asm-x86/mbd.h > > @@ -0,0 +1,70 @@ > > +/* > > + * Copyright (c) 2013, 2014 Oracle Co., Daniel Kiper > > + * > > + * This program is free software; you can redistribute it and/or modify > > + * it under the terms of the GNU General Public License as published by > > + * the Free Software Foundation; either version 2 of the License, or > > + * (at your option) any later version. > > + * > > + * This program is distributed in the hope that it will be useful, > > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > > + * GNU General Public License for more details. > > + * > > + * You should have received a copy of the GNU General Public License along > > + * with this program. If not, see . > > + */ > > + > > +#ifndef __MBD_H__ > > +#define __MBD_H__ > > + > > +/* Module type. */ > > +typedef struct { > > + u32 start; > > + u32 end; > > + > > + /* Pointer to a module command line. */ > > + u32 cmdline; > > + > > + /* If relocated != 0 then a given module was relocated. */ > > + u32 relocated; > > +} boot_module_t; > > + > > +/* > > + * MultiBoot Data (MBD) type. It is used to define variable which > > + * carry over data from multiboot protocol (any version) through > > + * Xen preloader stage. Later all or parts of this data is used > > + * to initialize Xen Boot Info (XBI) structure. > > + */ > > +typedef struct { > > + /* Pointer to boot loader name. */ > > + u32 boot_loader_name; > > + > > + /* Pointer to Xen command line. */ > > + u32 cmdline; > > + > > + /* > > + * Amount of lower memory (in KiB) accordingly to The Multiboot > > + * Specification version 0.6.96. > > + */ > > + u32 mem_lower; > > + > > + /* > > + * Amount of upper memory (in KiB) accordingly to The Multiboot > > + * Specification version 0.6.96. > > + */ > > + u32 mem_upper; > > + > > + /* Size (in bytes) of memory map provided by bootloader. */ > > + u32 mmap_size; > > + > > + /* Pointer to memory map provided by bootloader. */ > > + u32 mmap; > > + > > + /* Number of modules. */ > > + u32 mods_nr; > > + > > + /* Pointer to modules description (boot_module_t *). */ > > + u32 mods; > > +} mbd_t; > > +#endif /* __MBD_H__ */ > > For several of the fields I wonder whether u32 is really the right > data type (i.e. whether u64 wouldn't be more correct going > forward). All data which we get from multiboot[12] is u32. So, I think it does not make sense to use u64 here. Daniel