diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-04-13 19:24:07 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-04-13 19:24:07 +0000 |
commit | 5425a2164c99de50ac79e29cdd2cafbc3aafd2f4 (patch) | |
tree | 4091e7c7627a58982b8d69caa9b9f95d2c77a6ae /hw | |
parent | 3299908c834fd1699f59638dd36eba187963a694 (diff) |
Fix Sparc32 device save methods
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2657 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r-- | hw/esp.c | 17 | ||||
-rw-r--r-- | hw/slavio_serial.c | 1 | ||||
-rw-r--r-- | hw/tcx.c | 2 |
3 files changed, 17 insertions, 3 deletions
@@ -507,15 +507,21 @@ static void esp_save(QEMUFile *f, void *opaque) qemu_put_be32s(f, &s->ti_rptr); qemu_put_be32s(f, &s->ti_wptr); qemu_put_buffer(f, s->ti_buf, TI_BUFSZ); + qemu_put_be32s(f, &s->sense); qemu_put_be32s(f, &s->dma); + qemu_put_buffer(f, s->cmdbuf, TI_BUFSZ); + qemu_put_be32s(f, &s->cmdlen); + qemu_put_be32s(f, &s->do_cmd); + qemu_put_be32s(f, &s->dma_left); + // There should be no transfers in progress, so dma_counter is not saved } static int esp_load(QEMUFile *f, void *opaque, int version_id) { ESPState *s = opaque; - if (version_id != 2) - return -EINVAL; // Cannot emulate 1 + if (version_id != 3) + return -EINVAL; // Cannot emulate 2 qemu_get_buffer(f, s->rregs, ESP_MAXREG); qemu_get_buffer(f, s->wregs, ESP_MAXREG); @@ -523,7 +529,12 @@ static int esp_load(QEMUFile *f, void *opaque, int version_id) qemu_get_be32s(f, &s->ti_rptr); qemu_get_be32s(f, &s->ti_wptr); qemu_get_buffer(f, s->ti_buf, TI_BUFSZ); + qemu_get_be32s(f, &s->sense); qemu_get_be32s(f, &s->dma); + qemu_get_buffer(f, s->cmdbuf, TI_BUFSZ); + qemu_get_be32s(f, &s->cmdlen); + qemu_get_be32s(f, &s->do_cmd); + qemu_get_be32s(f, &s->dma_left); return 0; } @@ -568,7 +579,7 @@ void *esp_init(BlockDriverState **bd, uint32_t espaddr, void *dma_opaque) esp_reset(s); - register_savevm("esp", espaddr, 2, esp_save, esp_load, s); + register_savevm("esp", espaddr, 3, esp_save, esp_load, s); qemu_register_reset(esp_reset, s); return s; diff --git a/hw/slavio_serial.c b/hw/slavio_serial.c index 2ca3eed65a..1656292512 100644 --- a/hw/slavio_serial.c +++ b/hw/slavio_serial.c @@ -688,6 +688,7 @@ void slavio_serial_ms_kbd_init(int base, qemu_irq irq) qemu_add_mouse_event_handler(sunmouse_event, &s->chn[0], 0, "QEMU Sun Mouse"); qemu_add_kbd_event_handler(sunkbd_event, &s->chn[1]); + register_savevm("slavio_serial_mouse", base, 2, slavio_serial_save, slavio_serial_load, s); qemu_register_reset(slavio_serial_reset, s); slavio_serial_reset(s); } @@ -243,6 +243,8 @@ static int tcx_load(QEMUFile *f, void *opaque, int version_id) qemu_get_8s(f, &s->dac_index); qemu_get_8s(f, &s->dac_state); update_palette_entries(s, 0, 256); + tcx_invalidate_display(s); + return 0; } |