From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: New Xen boot infrastructure proposal Date: Tue, 21 May 2013 13:43:08 +0100 Message-ID: <519B6BDC.6060202@citrix.com> References: <363082f7-72f9-41cc-a5b4-75ce235e6493@default> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <363082f7-72f9-41cc-a5b4-75ce235e6493@default> 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: xen-devel@lists.xensource.com, keir@xen.org, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, konrad.wilk@oracle.com, jbeulich@suse.com List-Id: xen-devel@lists.xenproject.org On 21/05/13 11:36, Daniel Kiper wrote: > Hey guys, > > Here are my thoughts about current Xen boot > infrastructure and some changes proposal. > It is linked with EFI development but not only. > > [...] It means > that at this stage it is worth to create completely new > boot structure which is not linked so tightly with any boot > protocol. It should contain all needed stuff, be architecture > independent as much as possible and easily extensible. It's not clear how a new set of structures like this fits the requirement to be easily extensible. Aren't you going to have the same problems if new fields need to be added? I would suggest considering a linear block of (type, length, data) tuples for each field. That way only the needed/applicable fields can be included, and Xen can easily skip over field it does not recognize or care about (so new fields can be added without breaking compatibility). > In cases when architecture depended things are required > there should be special substructure which would contain > all required stuff. More or less it should look like in x86 case: > > /* Xen Boot Info (XBI) module structure. */ > typedef struct { > u64 start; > u64 end; > char *cmdline; > } xbi_mod_t; > > /* Xen Boot Info Arch (XBIA) memory map structure. */ > typedef struct { > /* > * Amount of lower memory accordingly to The Multiboot > * Specification version 0.6.96. > */ > u32 lower; > /* > * Amount of upper memory accordingly to The Multiboot > * Specification version 0.6.96. > */ > u32 upper; > u32 map_size; > struct e820entry *e820map; > } xbia_mem_t; > > /* Xen Boot Info Arch (XBIA). */ > typedef struct { > EFI_SYSTEM_TABLE *efi_system_table; > u64 mps; /* Pointer to MPS. */ > u64 acpi; /* Pointer to ACPI RSDP. */ > u64 smbios; /* Pointer to SMBIOS. */ > xbia_mem_t mem; > struct xen_vga_console_info vga_console_info; > struct edd_info *edd_info; > } xbia_t; > > /* Main Xen Boot Info (XBI) structure. */ > typedef struct { > char *boot_loader_name; > char *cmdline; > u32 mods_count; > xbi_mod_t *mods; > xbia_t arch; > } xbi_t; David