aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/fsl-imx25.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-07-24 17:56:12 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-07-24 17:59:28 +0100
commiteda40cc1686162dcd92a97debcbb0df74269651f (patch)
tree63689cd47e863be69a43b5b04a33a19eef22a560 /hw/arm/fsl-imx25.c
parente4256c3cbf7eefebc0bc6e1f472c47c6dd20b996 (diff)
downloadqemu-eda40cc1686162dcd92a97debcbb0df74269651f.zip
qemu-eda40cc1686162dcd92a97debcbb0df74269651f.tar.gz
qemu-eda40cc1686162dcd92a97debcbb0df74269651f.tar.bz2
fsl_imx*: Migrate ROM contents
The fsl-imx* boards accidentally forgot to register the ROM memory regions for migration. This used to require a manual step of calling vmstate_register_ram(), but following commits 1cfe48c1ce21..b08199c6fbea194 we can use memory_region_init_rom() to have it do the migration for us. This is a migration break, but the migration code currently does not handle the case of having two RAM regions which were not registered for migration, and so prior to this commit a migration load would always fail with: "qemu-system-arm: Length mismatch: 0x4000 in != 0x18000: Invalid argument" NB: migration appears at this point to be broken for this board anyway -- it succeeds but the destination hangs; probably some device in the system does not yet support migration. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1500309775-18361-1-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'hw/arm/fsl-imx25.c')
-rw-r--r--hw/arm/fsl-imx25.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c
index 8cff3c1..3b97ece 100644
--- a/hw/arm/fsl-imx25.c
+++ b/hw/arm/fsl-imx25.c
@@ -249,7 +249,7 @@ static void fsl_imx25_realize(DeviceState *dev, Error **errp)
}
/* initialize 2 x 16 KB ROM */
- memory_region_init_rom_nomigrate(&s->rom[0], NULL,
+ memory_region_init_rom(&s->rom[0], NULL,
"imx25.rom0", FSL_IMX25_ROM0_SIZE, &err);
if (err) {
error_propagate(errp, err);
@@ -257,7 +257,7 @@ static void fsl_imx25_realize(DeviceState *dev, Error **errp)
}
memory_region_add_subregion(get_system_memory(), FSL_IMX25_ROM0_ADDR,
&s->rom[0]);
- memory_region_init_rom_nomigrate(&s->rom[1], NULL,
+ memory_region_init_rom(&s->rom[1], NULL,
"imx25.rom1", FSL_IMX25_ROM1_SIZE, &err);
if (err) {
error_propagate(errp, err);