vexpress: Add support for the -bios flag to provide firmware
authorGrant Likely <grant.likely@linaro.org>
Mon, 9 Jun 2014 14:43:22 +0000 (15:43 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 9 Jun 2014 14:43:22 +0000 (15:43 +0100)
commit61e99241491c2d87af2a9751630e597a54ea7af8
tree190715f031acd15639c9aa5d37870337f95eddde
parent4a331bb33bdf112ba95470e5d6ea3561b049c280
vexpress: Add support for the -bios flag to provide firmware

Right now to run firmware inside the QEMU VExpress model requires
padding out the firmware image to the size of the virtual flash and
passing it in via the -pflash argument. If the firmware image is passed
without padding, then QEMU will fail. Also, when passed as a -pflash
argument, QEMU treats the file as persistent storage and will modify the
file.

The -bios flag provides the semantics that we want for providing a
firmware image. This patch maps the contents of the -bios file into the
address space at the boot flash location.

Tested with the vexpress-a15 model and the Tianocore port.

Signed-off-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Roy Franz <roy.franz@linaro.org>
[PMM: folded long line, removed stray \n from error message,
 use correct variable for printing image name, exit(1) rather than 0]
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/vexpress.c