Skip to contentSkip to conversation

xen: arm: use new 64-bit zImage magic numbers for Xen binary

PATCH In review Ian Campbell 2 participants 4 messages Sep 25, 2013 – Sep 26, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: arm: use new 64-bit zImage magic numbers for Xen binary

Upstream commit 4370eec05a88 "arm64: Expand arm64 image header" ended up changing the zImage magic (which was actually the initial branch instructio encoding!). The new header has a proper magic number at a fixed location.

Switch Xen itself to using this format. Neither the bootwrapper nor the models care about this header themselves and real bootloaders are not widely used, so now is as good a time as any to switch (as upstream have proven)

---
 xen/arch/arm/arm64/head.S |    8 ++++++++
 1 file changed, 8 insertions(+)
xen/arch/arm/arm64/head.S +8 -0
index 1d04efc..5ffe4f4 100644
@@ -108,6 +108,14 @@ start:
         .quad   0                    /* Image load offset from start of RAM */
         .quad   0                    /* reserved */
         .quad   0                    /* reserved */
+        .quad   0                    /* reserved */
+        .quad   0                    /* reserved */
+        .quad   0                    /* reserved */
+        .byte   0x41                 /* Magic number, "ARM\x64" */
+        .byte   0x52
+        .byte   0x4d
+        .byte   0x64
+        .word   0                    /* reserved */
 
 real_start:
         msr   DAIFSet, 0xf           /* Disable all interrupts */
Signature · 1 line
1.7.10.4
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Ian Campbell

Upstream commit 4370eec05a88 "arm64: Expand arm64 image header" ended up changing the zImage magic (which was actually the initial branch instructio encoding!). The new header has a proper magic number at a fixed location.

Switch Xen itself to using this format. Neither the bootwrapper nor the models care about this header themselves and real bootloaders are not widely used, so now is as good a time as any to switch (as upstream have proven)

By 'upstream' here, you mean Linux?

Quoted 1 line
#2 lore raw
Quoted 10 lines · Tim Deegan
Quoted 7 lines · Ian Campbell

Upstream commit 4370eec05a88 "arm64: Expand arm64 image header" ended up changing the zImage magic (which was actually the initial branch instructio encoding!). The new header has a proper magic number at a fixed location.

Switch Xen itself to using this format. Neither the bootwrapper nor the models care about this header themselves and real bootloaders are not widely used, so now is as good a time as any to switch (as upstream have proven)

By 'upstream' here, you mean Linux?

Yes.

Quoted 3 lines
Quoted 1 line

Thanks.

author Applied
#3 lore raw
In reply to Tim Deegan
Quoted 9 lines · Tim Deegan
Quoted 7 lines · Ian Campbell

Upstream commit 4370eec05a88 "arm64: Expand arm64 image header" ended up changing the zImage magic (which was actually the initial branch instructio encoding!). The new header has a proper magic number at a fixed location.

Switch Xen itself to using this format. Neither the bootwrapper nor the models care about this header themselves and real bootloaders are not widely used, so now is as good a time as any to switch (as upstream have proven)

Quoted 5 lines

By 'upstream' here, you mean Linux?

Quoted 1 line

Applied, thanks.