\r
#\r
# Implement the Linux kernel header layout so that the Xen loader will identify\r
-# it as something bootable, and execute it with a FDT pointer in x0. This area\r
-# will be reused to store a copy of the FDT so round it up to 8 KB.\r
+# it as something bootable, and execute it with a FDT pointer in x0 or r2.\r
+# This area will be reused to store a copy of the FDT so round it up to 8 KB.\r
#\r
0x00000000|0x00002000\r
DATA = {\r
+!if $(ARCH) == AARCH64\r
0x01, 0x00, 0x00, 0x10, # code0: adr x1, .\r
0xff, 0x07, 0x00, 0x14, # code1: b 0x2000\r
0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, # text_offset: 512 KB\r
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res4\r
0x41, 0x52, 0x4d, 0x64, # magic: "ARM\x64"\r
0x00, 0x00, 0x00, 0x00 # res5\r
+!else\r
+ 0x08, 0x10, 0x4f, 0xe2, # adr r1, .\r
+ 0x02, 0x00, 0xa0, 0xe1, # mov r0, r2 (DTB)\r
+ 0x00, 0x00, 0xa0, 0xe1, # nop\r
+ 0x00, 0x00, 0xa0, 0xe1, # nop\r
+ 0x00, 0x00, 0xa0, 0xe1, # nop\r
+ 0x00, 0x00, 0xa0, 0xe1, # nop\r
+ 0x00, 0x00, 0xa0, 0xe1, # nop\r
+ 0x00, 0x00, 0xa0, 0xe1, # nop\r
+\r
+ 0xf6, 0x07, 0x00, 0xea, # b 0x2000\r
+ 0x18, 0x28, 0x6f, 0x01, # magic\r
+ 0x00, 0x00, 0x00, 0x00, # start\r
+ 0x00, 0x00, 0x20, 0x00, # image size: 2 MB\r
+ 0x01, 0x02, 0x03, 0x04 # endiannness flag\r
+!endif\r
}\r
\r
0x00002000|0x001fe000\r