Skip to contentSkip to conversation

[6370] Fix NAND flash save/restore.

Qemu-devel Paul Brook 1 participant 1 message Jan 20, 2009

lore
Share & tools
lore

Paul Brook

author
#0 lore raw

Revision: 6370

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6370
Author:   pbrook
Date:     2009-01-20 04:15:47 +0000 (Tue, 20 Jan 2009)

Log Message:
-----------
Fix NAND flash save/restore.

Modified Paths:
--------------
trunk/hw/nand.c

Modified: trunk/hw/nand.c
===================================================================

hw/nand.c +3 -0
@@ -492,6 +492,9 @@
     if (pagesize)
         s->storage = (uint8_t *) memset(qemu_malloc(s->pages * pagesize),
                         0xff, s->pages * pagesize);
+    /* Give s->ioaddr a sane value in case we save state before it
+       is used.  */
+    s->ioaddr = s->io;
 
     register_savevm("nand", -1, 0, nand_save, nand_load, s);