diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2015-12-17 17:11:33 +0000 |
---|---|---|
committer | abiesheuvel <abiesheuvel@Edk2> | 2015-12-17 17:11:33 +0000 |
commit | f7de74afdd99831254a43c3d51047fd046a9894e (patch) | |
tree | 2f0a1430badd05cead1fb0c7f23f0e2d97b005ef /ArmVirtPkg/ArmVirtXen.fdf | |
parent | 40082598411d9bbe6b1d5b2c64d3d2ac59b1fecc (diff) | |
download | edk2-f7de74afdd99831254a43c3d51047fd046a9894e.tar.gz |
ArmVirtPkg/ArmVirtXen: add ARM support
This adds ARM support to the ArmVirtXen platform. As is the case for
AARCH64, the ARM port adheres to the ARM Linux boot protocol, i.e.,
it expects the address of a DTB describing the platform to be passed
in r2, and relocates itself at runtime to the actual load time memory
offset.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19333 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmVirtPkg/ArmVirtXen.fdf')
-rw-r--r-- | ArmVirtPkg/ArmVirtXen.fdf | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/ArmVirtPkg/ArmVirtXen.fdf b/ArmVirtPkg/ArmVirtXen.fdf index 729014753f..d7d4612de2 100644 --- a/ArmVirtPkg/ArmVirtXen.fdf +++ b/ArmVirtPkg/ArmVirtXen.fdf @@ -53,11 +53,12 @@ NumBlocks = 0x200 #
# Implement the Linux kernel header layout so that the Xen loader will identify
-# it as something bootable, and execute it with a FDT pointer in x0. This area
-# will be reused to store a copy of the FDT so round it up to 8 KB.
+# it as something bootable, and execute it with a FDT pointer in x0 or r2.
+# This area will be reused to store a copy of the FDT so round it up to 8 KB.
#
0x00000000|0x00002000
DATA = {
+!if $(ARCH) == AARCH64
0x01, 0x00, 0x00, 0x10, # code0: adr x1, .
0xff, 0x07, 0x00, 0x14, # code1: b 0x2000
0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, # text_offset: 512 KB
@@ -68,6 +69,22 @@ DATA = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # res4
0x41, 0x52, 0x4d, 0x64, # magic: "ARM\x64"
0x00, 0x00, 0x00, 0x00 # res5
+!else
+ 0x08, 0x10, 0x4f, 0xe2, # adr r1, .
+ 0x02, 0x00, 0xa0, 0xe1, # mov r0, r2 (DTB)
+ 0x00, 0x00, 0xa0, 0xe1, # nop
+ 0x00, 0x00, 0xa0, 0xe1, # nop
+ 0x00, 0x00, 0xa0, 0xe1, # nop
+ 0x00, 0x00, 0xa0, 0xe1, # nop
+ 0x00, 0x00, 0xa0, 0xe1, # nop
+ 0x00, 0x00, 0xa0, 0xe1, # nop
+
+ 0xf6, 0x07, 0x00, 0xea, # b 0x2000
+ 0x18, 0x28, 0x6f, 0x01, # magic
+ 0x00, 0x00, 0x00, 0x00, # start
+ 0x00, 0x00, 0x20, 0x00, # image size: 2 MB
+ 0x01, 0x02, 0x03, 0x04 # endiannness flag
+!endif
}
0x00002000|0x001fe000
|