OSDN Git Service

hw/arm/boot: Increase compliance with kernel arm64 boot protocol
authorStewart Hildebrand <Stewart.Hildebrand@dornerworks.com>
Wed, 24 Oct 2018 06:50:18 +0000 (07:50 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Wed, 24 Oct 2018 06:51:36 +0000 (07:51 +0100)
commitea358872a6a2e136a6a2bc08649a079acb99b6a2
tree397e5863fc6ab10a97790df0dbf74391c89e8a7f
parent4be42f4013fa1a9df47b48aae5148767bed8e80c
hw/arm/boot: Increase compliance with kernel arm64 boot protocol

"The Image must be placed text_offset bytes from a 2MB aligned base
address anywhere in usable system RAM and called there."

For the virt board, we write our startup bootloader at the very
bottom of RAM, so that bit can't be used for the image. To avoid
overlap in case the image requests to be loaded at an offset
smaller than our bootloader, we increment the load offset to the
next 2MB.

This fixes a boot failure for Xen AArch64.

Signed-off-by: Stewart Hildebrand <stewart.hildebrand@dornerworks.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>
Message-id: b8a89518794b4436af0c151ed10de4fa@dornerworks.com
[PMM: Rephrased a comment a bit]
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/boot.c