Commit 5425a2164c99de50ac79e29cdd2cafbc3aafd2f4
1 parent
3299908c
Fix Sparc32 device save methods
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2657 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
3 changed files
with
17 additions
and
3 deletions
hw/esp.c
... | ... | @@ -507,15 +507,21 @@ static void esp_save(QEMUFile *f, void *opaque) |
507 | 507 | qemu_put_be32s(f, &s->ti_rptr); |
508 | 508 | qemu_put_be32s(f, &s->ti_wptr); |
509 | 509 | qemu_put_buffer(f, s->ti_buf, TI_BUFSZ); |
510 | + qemu_put_be32s(f, &s->sense); | |
510 | 511 | qemu_put_be32s(f, &s->dma); |
512 | + qemu_put_buffer(f, s->cmdbuf, TI_BUFSZ); | |
513 | + qemu_put_be32s(f, &s->cmdlen); | |
514 | + qemu_put_be32s(f, &s->do_cmd); | |
515 | + qemu_put_be32s(f, &s->dma_left); | |
516 | + // There should be no transfers in progress, so dma_counter is not saved | |
511 | 517 | } |
512 | 518 | |
513 | 519 | static int esp_load(QEMUFile *f, void *opaque, int version_id) |
514 | 520 | { |
515 | 521 | ESPState *s = opaque; |
516 | 522 | |
517 | - if (version_id != 2) | |
518 | - return -EINVAL; // Cannot emulate 1 | |
523 | + if (version_id != 3) | |
524 | + return -EINVAL; // Cannot emulate 2 | |
519 | 525 | |
520 | 526 | qemu_get_buffer(f, s->rregs, ESP_MAXREG); |
521 | 527 | qemu_get_buffer(f, s->wregs, ESP_MAXREG); |
... | ... | @@ -523,7 +529,12 @@ static int esp_load(QEMUFile *f, void *opaque, int version_id) |
523 | 529 | qemu_get_be32s(f, &s->ti_rptr); |
524 | 530 | qemu_get_be32s(f, &s->ti_wptr); |
525 | 531 | qemu_get_buffer(f, s->ti_buf, TI_BUFSZ); |
532 | + qemu_get_be32s(f, &s->sense); | |
526 | 533 | qemu_get_be32s(f, &s->dma); |
534 | + qemu_get_buffer(f, s->cmdbuf, TI_BUFSZ); | |
535 | + qemu_get_be32s(f, &s->cmdlen); | |
536 | + qemu_get_be32s(f, &s->do_cmd); | |
537 | + qemu_get_be32s(f, &s->dma_left); | |
527 | 538 | |
528 | 539 | return 0; |
529 | 540 | } |
... | ... | @@ -568,7 +579,7 @@ void *esp_init(BlockDriverState **bd, uint32_t espaddr, void *dma_opaque) |
568 | 579 | |
569 | 580 | esp_reset(s); |
570 | 581 | |
571 | - register_savevm("esp", espaddr, 2, esp_save, esp_load, s); | |
582 | + register_savevm("esp", espaddr, 3, esp_save, esp_load, s); | |
572 | 583 | qemu_register_reset(esp_reset, s); |
573 | 584 | |
574 | 585 | return s; | ... | ... |
hw/slavio_serial.c
... | ... | @@ -688,6 +688,7 @@ void slavio_serial_ms_kbd_init(int base, qemu_irq irq) |
688 | 688 | |
689 | 689 | qemu_add_mouse_event_handler(sunmouse_event, &s->chn[0], 0, "QEMU Sun Mouse"); |
690 | 690 | qemu_add_kbd_event_handler(sunkbd_event, &s->chn[1]); |
691 | + register_savevm("slavio_serial_mouse", base, 2, slavio_serial_save, slavio_serial_load, s); | |
691 | 692 | qemu_register_reset(slavio_serial_reset, s); |
692 | 693 | slavio_serial_reset(s); |
693 | 694 | } | ... | ... |
hw/tcx.c