From: "Jan Beulich" Subject: Re: [PATCH RFC 1/7] xen/x86: Add mbd.h header file Date: Tue, 09 Sep 2014 15:28:27 +0100 Message-ID: <540F2AAB0200007800032C1C@mail.emea.novell.com> 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> <20140909133939.GR3459@olila.local.net-space.pl> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XRMPJ-0003L4-4i for xen-devel@lists.xenproject.org; Tue, 09 Sep 2014 14:28:33 +0000 In-Reply-To: <20140909133939.GR3459@olila.local.net-space.pl> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Daniel Kiper 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 09.09.14 at 15:39, wrote: > 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. Wasn't your proposal to make this an abstraction? If so, what does the (current) data source have to do with the types here? Jan