xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Tim Deegan <tim@xen.org>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Anthony Perard <anthony.perard@citrix.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Ian Campbell <Ian.Campbell@citrix.com>
Subject: Re: [PATCH v3] xen/arm: build as zImage
Date: Tue, 27 Nov 2012 14:31:21 +0000	[thread overview]
Message-ID: <20121127143121.GC51942@ocelot.phlegethon.org> (raw)
In-Reply-To: <alpine.DEB.2.02.1211271240250.5310@kaball.uk.xensource.com>

At 12:42 +0000 on 27 Nov (1354020121), Stefano Stabellini wrote:
> On Tue, 27 Nov 2012, Stefano Stabellini wrote:
> > +	.word (_end - _start)        /* zImage end address */
> 
> Actually the assembler has problems digesting this expression.
> This patch actually compiles:
> 
> ---
> 
> xen/arm: build as zImage
> 
> The zImage format is extremely simple: it only consists of a magic
> number and 2 addresses in a specific position (see
> http://www.simtec.co.uk/products/SWLINUX/files/booting_article.html#d0e309).
> 
> Some bootloaders expect a zImage; considering that it doesn't cost us
> much to build Xen compatible with the format, make it so.
> 
> Changes in v3:
> - pass the correct size;
> - go back to the original no-ops plus branch for consistency with Linux.
> 
> Changes in v2:
> - code style;
> - pass 0 a start address.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> 
> diff --git a/xen/arch/arm/head.S b/xen/arch/arm/head.S
> index 25c4cfe..6cb5d1b 100644
> --- a/xen/arch/arm/head.S
> +++ b/xen/arch/arm/head.S
> @@ -22,6 +22,8 @@
>  #include <asm/processor-ca15.h>
>  #include <asm/asm_defns.h>
>  
> +#define ZIMAGE_MAGIC_NUMBER 0x016f2818
> +
>  #define PT_PT  0xe7f /* nG=1, AF=1, SH=10, AP=01, NS=1, ATTR=111, T=1, P=1 */
>  #define PT_MEM 0xe7d /* nG=1, AF=1, SH=10, AP=01, NS=1, ATTR=111, T=0, P=1 */
>  #define PT_DEV 0xe71 /* nG=1, AF=1, SH=10, AP=01, NS=1, ATTR=100, T=0, P=1 */
> @@ -52,6 +54,22 @@
>  	 * or the initial pagetable code below will need adjustment. */
>  	.global start
>  start:
> +
> +	/* zImage magic header, see:
> +	 * http://www.simtec.co.uk/products/SWLINUX/files/booting_article.html#d0e309
> +	 */
> +	.rept 7
> +	mov   r0, r0
> +	.endr
> +	mov   r0, r0

OK, with this changed to a .rept 8 and the singleton removed,
Acked-by: Tim Deegan <tim@xen.org>

> +	b     past_zImage
> +
> +	.word ZIMAGE_MAGIC_NUMBER    /* Magic numbers to help the loader */
> +	.word 0x00000000             /* absolute load/run zImage address or
> +	                              * 0 for PiC */
> +	.word (_end - start)         /* zImage end address */
> +
> +past_zImage:
>  	cpsid aif                    /* Disable all interrupts */
>  
>  	/* Save the bootloader arguments in less-clobberable registers */
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

  reply	other threads:[~2012-11-27 14:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27 12:15 [PATCH v3] xen/arm: build as zImage Stefano Stabellini
2012-11-27 12:42 ` Stefano Stabellini
2012-11-27 14:31   ` Tim Deegan [this message]
2012-11-29 11:29     ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121127143121.GC51942@ocelot.phlegethon.org \
    --to=tim@xen.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).