]> git.proxmox.com Git - mirror_qemu.git/commit
hw/arm/boot: take Linux/arm64 TEXT_OFFSET header field into account
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 20 Apr 2017 16:32:28 +0000 (17:32 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 20 Apr 2017 16:39:17 +0000 (17:39 +0100)
commit68115ed5fc1915dc4d3244c99937c6667f5ec0e7
treebe3e6918ec23517f289c9ce420bdc0a7a7b973e2
parent64c8ed97cceabac4fafe17fca8d88ef08183f439
hw/arm/boot: take Linux/arm64 TEXT_OFFSET header field into account

The arm64 boot protocol stipulates that the kernel must be loaded
TEXT_OFFSET bytes beyond a 2 MB aligned base address, where TEXT_OFFSET
could be any 4 KB multiple between 0 and 2 MB, and whose value can be
found in the header of the Image file.

So after attempts to load the arm64 kernel image as an ELF file or as a
U-Boot image have failed (both of which have their own way of specifying
the load offset), try to determine the TEXT_OFFSET from the image after
loading it but before mapping it as a ROM mapping into the guest address
space.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1489414630-21609-1-git-send-email-ard.biesheuvel@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/boot.c