]> xenbits.xensource.com Git - people/aperard/xen-arm.git/commitdiff
xen/arm: build as zImage
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 29 Nov 2012 11:28:17 +0000 (11:28 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 29 Nov 2012 11:28:17 +0000 (11:28 +0000)
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.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- switch from 7*nop + nop to just 8*nop ]
Committed-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/head.S

index 0d77ee6537b8f68cb76bd6b9eeffa29cf7683802..8e2e2845b8c8d53734f24700757dbc296a939bce 100644 (file)
@@ -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 */
         * 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 8
+       mov   r0, r0
+       .endr
+       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 */