Revision 532847e4
b/hw/grackle_pci.c | ||
---|---|---|
57 | 57 |
qemu_set_irq(pic[irq_num + 0x15], level); |
58 | 58 |
} |
59 | 59 |
|
60 |
static void pci_grackle_save(QEMUFile* f, void *opaque) |
|
61 |
{ |
|
62 |
PCIDevice *d = opaque; |
|
63 |
|
|
64 |
pci_device_save(d, f); |
|
65 |
} |
|
66 |
|
|
67 |
static int pci_grackle_load(QEMUFile* f, void *opaque, int version_id) |
|
68 |
{ |
|
69 |
PCIDevice *d = opaque; |
|
70 |
|
|
71 |
if (version_id != 1) |
|
72 |
return -EINVAL; |
|
73 |
|
|
74 |
return pci_device_load(d, f); |
|
75 |
} |
|
76 |
|
|
77 | 60 |
static void pci_grackle_reset(void *opaque) |
78 | 61 |
{ |
79 | 62 |
} |
... | ... | |
115 | 98 |
sysbus_init_mmio(dev, 0x1000, pci_mem_config); |
116 | 99 |
sysbus_init_mmio(dev, 0x1000, pci_mem_data); |
117 | 100 |
|
118 |
register_savevm(&dev->qdev, "grackle", 0, 1, pci_grackle_save, |
|
119 |
pci_grackle_load, &s->host_state); |
|
120 | 101 |
qemu_register_reset(pci_grackle_reset, &s->host_state); |
121 | 102 |
return 0; |
122 | 103 |
} |
Also available in: Unified diff