diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-30 19:01:19 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-30 19:01:19 +0000 |
commit | 9b64997f464bcef06739e9c81a927bf48c375255 (patch) | |
tree | 1802fa7d6d89fc071e4e9101eb3b4d832a230035 /hw/grackle_pci.c | |
parent | ac0df51d7b3e0a76923a03efa2cfdec4b9f65ef5 (diff) | |
download | qemu-9b64997f464bcef06739e9c81a927bf48c375255.zip qemu-9b64997f464bcef06739e9c81a927bf48c375255.tar.gz qemu-9b64997f464bcef06739e9c81a927bf48c375255.tar.bz2 |
VM load/save support for PPC devices
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6142 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/grackle_pci.c')
-rw-r--r-- | hw/grackle_pci.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/hw/grackle_pci.c b/hw/grackle_pci.c index 9cedb0e..f875e5d 100644 --- a/hw/grackle_pci.c +++ b/hw/grackle_pci.c @@ -105,6 +105,23 @@ static void pci_grackle_set_irq(qemu_irq *pic, int irq_num, int level) qemu_set_irq(pic[irq_num + 0x15], level); } +static void pci_grackle_save(QEMUFile* f, void *opaque) +{ + PCIDevice *d = opaque; + + pci_device_save(d, f); +} + +static int pci_grackle_load(QEMUFile* f, void *opaque, int version_id) +{ + PCIDevice *d = opaque; + + if (version_id != 1) + return -EINVAL; + + return pci_device_load(d, f); +} + static void pci_grackle_reset(void *opaque) { } @@ -164,6 +181,7 @@ PCIBus *pci_grackle_init(uint32_t base, qemu_irq *pic) d->config[0x26] = 0x00; // prefetchable_memory_limit d->config[0x27] = 0x85; #endif + register_savevm("grackle", 0, 1, pci_grackle_save, pci_grackle_load, d); qemu_register_reset(pci_grackle_reset, d); pci_grackle_reset(d); |