hw/arm/boot: fix direct kernel boot with initrd
commitb48b0640093764f06ae63b5df515d16fc2e26013
authorAndrew Jones <drjones@redhat.com>
Mon, 1 Jul 2019 16:26:14 +0000 (1 17:26 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 1 Jul 2019 16:28:59 +0000 (1 17:28 +0100)
tree5eabc03c44a17d5d5a1fa7adba986dfca7c74897
parentae9108f8f0746ce64d02afb1a216153a50926132
hw/arm/boot: fix direct kernel boot with initrd

Fix the condition used to check whether the initrd fits
into RAM; in some cases if an initrd was also passed on
the command line we would get an error stating that it
was too big to fit into RAM after the kernel. Despite the
error the loader continued anyway, though, so also add an
exit(1) when the initrd is actually too big.

Fixes: 852dc64d665f ("hw/arm/boot: Diagnose layouts that put initrd or
DTB off the end of RAM")
Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20190618125844.4863-1-drjones@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/boot.c