[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen: arm: rename 32-bit specific zImage field offset constants
commit 767b17557f5ff37073ab23bb36ae353a0579c611 Author: Ian Campbell <ian.campbell@xxxxxxxxxx> AuthorDate: Mon Jul 29 13:20:51 2013 +0100 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Mon Jul 29 16:54:49 2013 +0100 xen: arm: rename 32-bit specific zImage field offset constants This will help avoid confusion when 64-bit Image support is added. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> --- xen/arch/arm/kernel.c | 28 ++++++++++++++-------------- 1 files changed, 14 insertions(+), 14 deletions(-) diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c index 3953f0f..641b1f0 100644 --- a/xen/arch/arm/kernel.c +++ b/xen/arch/arm/kernel.c @@ -20,12 +20,12 @@ #define KERNEL_FLASH_ADDRESS 0x00000000UL #define KERNEL_FLASH_SIZE 0x00800000UL -#define ZIMAGE_MAGIC_OFFSET 0x24 -#define ZIMAGE_START_OFFSET 0x28 -#define ZIMAGE_END_OFFSET 0x2c -#define ZIMAGE_HEADER_LEN 0x30 +#define ZIMAGE32_MAGIC_OFFSET 0x24 +#define ZIMAGE32_START_OFFSET 0x28 +#define ZIMAGE32_END_OFFSET 0x2c +#define ZIMAGE32_HEADER_LEN 0x30 -#define ZIMAGE_MAGIC 0x016f2818 +#define ZIMAGE32_MAGIC 0x016f2818 struct minimal_dtb_header { uint32_t magic; @@ -115,26 +115,26 @@ static void kernel_zimage_load(struct kernel_info *info) } } -/** - * Check the image is a zImage and return the load address and length +/* + * Check if the image is a 32-bit zImage and setup kernel_info */ -static int kernel_try_zimage_prepare(struct kernel_info *info, +static int kernel_try_zimage32_prepare(struct kernel_info *info, paddr_t addr, paddr_t size) { - uint32_t zimage[ZIMAGE_HEADER_LEN/4]; + uint32_t zimage[ZIMAGE32_HEADER_LEN/4]; uint32_t start, end; struct minimal_dtb_header dtb_hdr; - if ( size < ZIMAGE_HEADER_LEN ) + if ( size < ZIMAGE32_HEADER_LEN ) return -EINVAL; copy_from_paddr(zimage, addr, sizeof(zimage), DEV_SHARED); - if (zimage[ZIMAGE_MAGIC_OFFSET/4] != ZIMAGE_MAGIC) + if (zimage[ZIMAGE32_MAGIC_OFFSET/4] != ZIMAGE32_MAGIC) return -EINVAL; - start = zimage[ZIMAGE_START_OFFSET/4]; - end = zimage[ZIMAGE_END_OFFSET/4]; + start = zimage[ZIMAGE32_START_OFFSET/4]; + end = zimage[ZIMAGE32_END_OFFSET/4]; if ( (end - start) > size ) return -EINVAL; @@ -254,7 +254,7 @@ int kernel_prepare(struct kernel_info *info) info->load_attr = BUFFERABLE; } - rc = kernel_try_zimage_prepare(info, start, size); + rc = kernel_try_zimage32_prepare(info, start, size); if (rc < 0) rc = kernel_try_elf_prepare(info, start, size); -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |