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

Re: [Xen-devel] [PATCH v3] xen: arm: introduce uImage probe function for Dom0



On Thu, 2014-08-21 at 12:48 +0300, Oleksandr Dmytryshyn wrote:
> Patch adds a possibility to boot dom0 kernel from uImage.
> This is needed to improve boot-time. Comparing to zImage,
> uImage is not packed, therefore we can save time needed
> to unpack.
> 
> uImage header format:
> http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=include/image.h
> 
> Signed-off-by: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@xxxxxxxxxxxxxxx>

Mostly looks good, a few minor things.

> +/*
> + * Uimage CPU Architecture Codes
> + */

I think we can get away with only defining the two arm ones here.

> +    start = be32_to_cpu(uimage.load);
> +    len = be32_to_cpu(uimage.size);
> +
> +    if ( len > size )

Does len include the header? (IOW do you need to subtract sizeof(uimage)
from something?)

> +    info->entry = info->zimage.start;
> +    info->load = kernel_zimage_load;
> +
> +#ifdef CONFIG_ARM_64
> +    if ( uimage->arch == IH_ARCH_ARM )
> +        info->type = DOMAIN_32BIT;
> +    else if ( uimage->arch == IH_ARCH_ARM64 )
> +        info->type = DOMAIN_64BIT;
> +    else

Use switch() rather than a cascade of else if please.

Ian.


_______________________________________________
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®.