hw/arm/boot: Diagnose layouts that put initrd or DTB off the end of RAM
commit852dc64d665f89d8b54dd9aa7e36c3ff12bef775
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 16 May 2019 14:47:31 +0000 (16 15:47 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 17 Jun 2019 14:11:18 +0000 (17 15:11 +0100)
tree63b1caeb041967bf57ab9d88195c634c58f172e5
parente70af24b42190481e19c9adb727b97a0fc794ea8
hw/arm/boot: Diagnose layouts that put initrd or DTB off the end of RAM

We calculate the locations in memory where we want to put the
initrd and the DTB based on the size of the kernel, since they
come after it. Add some explicit checks that these aren't off the
end of RAM entirely.

(At the moment the way we calculate the initrd_start means that
it can't ever be off the end of RAM, but that will change with
the next commit.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Message-id: 20190516144733.32399-3-peter.maydell@linaro.org
hw/arm/boot.c