tools: arm: improve placement of initial modules.
authorIan Campbell <ian.campbell@citrix.com>
Wed, 9 Apr 2014 11:51:14 +0000 (12:51 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 10 Apr 2014 11:13:24 +0000 (12:13 +0100)
commit6f4ff742a5caa411397fc38233f818e64a0c541c
tree3f549da7e37cdd98dbe60a3339381b9e21d2879b
parente5545fb6d0dc5e2c48b2e450d18246d9bc1ae35b
tools: arm: improve placement of initial modules.

314c9815e2f5 "tools: implement initial ramdisk support for ARM." broke starting
guests with <= 128 MB ram by placing the boot modules (dtb and initrd)
immediately after the kernel in this case, running the risk of them being
overwritten. Instead place the modules at the end of RAM, as the hypervisor
does for dom0.

The hypervisor also falls back to placing things before the kernel as a last
resort before failing, so add that here too.

Tested with the Debian installer initrd and guests of 96MB, 128MB, 256MB and
1GB. All work, also tested with 64MB but the installer doesn't run with so
little RAM (but our placement of the initrd is correct).

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Julien Grall <julien.grall@linaro.org>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxc/xc_dom_arm.c