[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 5/8] arm: remove the hack for loading vmlinux images



On Tue, 2012-02-28 at 16:54 +0000, David Vrabel wrote:
> From: David Vrabel <david.vrabel@xxxxxxxxxx>
> 
> Don't adjust the RAM location/size when loading an ELF for dom0.  It
> was vmlinux specific and no longer needed because Linux can be loaded
> from a zImage.

I'm a bit confused, aren't kernel_try_zimage_prepare and
kernel_try_elf_prepare two different methods for loading the kernel? If
the adjustment is needed for vmlinux how does the fact that you could
load via zImage allow you to remove that adjustment in the vmlinux case?

Could we consider removing support for loading an ELF file entirely?

> 
> This also makes preparing the device tree for dom0 easier.
> 
> Signed-off-by: David Vrabel <david.vrabel@xxxxxxxxxx>
> ---
>  xen/arch/arm/kernel.c |   11 ++---------
>  1 files changed, 2 insertions(+), 9 deletions(-)
> 
> diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c
> index 71a204d..dd757e5 100644
> --- a/xen/arch/arm/kernel.c
> +++ b/xen/arch/arm/kernel.c
> @@ -91,7 +91,6 @@ static void kernel_zimage_load(struct kernel_info *info)
>  
>  /**
>   * Check the image is a zImage and return the load address and length
> - * (FIXME: including any appended DTB).
>   */
>  static int kernel_try_zimage_prepare(struct kernel_info *info)
>  {
> @@ -117,8 +116,6 @@ static int kernel_try_zimage_prepare(struct kernel_info 
> *info)
>          end += be32_to_cpu(dtb_hdr.total_size);
>      }
>  
> -    /* FIXME: get RAM location from appended DTB (if there is one)? */
> -
>      /*
>       * If start is zero, the zImage is position independent -- load it
>       * at 32k from start of RAM.
> @@ -166,13 +163,9 @@ static int kernel_try_elf_prepare(struct kernel_info 
> *info)
>          return rc;
>  
>      /*
> -     * FIXME: can the ELF header be used to find the physical address
> -     * to load the image to?  Instead of making virt == phys by
> -     * relocating the guest's RAM.
> +     * TODO: can the ELF header be used to find the physical address
> +     * to load the image to?  Instead of assuming virt == phys.
>       */
> -    info->ram_start = 0xc0000000;
> -    info->ram_end   = 0xc8000000;
> -
>      info->entry = info->elf.parms.virt_entry;
>      info->load = kernel_elf_load;
>  



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.