Revision 1941d19c hw/pci.c
b/hw/pci.c | ||
---|---|---|
36 | 36 |
PCIDevice *devices[256]; |
37 | 37 |
}; |
38 | 38 |
|
39 |
static void pci_update_mappings(PCIDevice *d); |
|
40 |
|
|
39 | 41 |
target_phys_addr_t pci_mem_base; |
40 | 42 |
static int pci_irq_index; |
41 | 43 |
static PCIBus *first_bus; |
... | ... | |
56 | 58 |
return s->bus_num; |
57 | 59 |
} |
58 | 60 |
|
59 |
void generic_pci_save(QEMUFile* f, void *opaque)
|
|
61 |
void pci_device_save(PCIDevice *s, QEMUFile *f)
|
|
60 | 62 |
{ |
61 |
PCIDevice* s=(PCIDevice*)opaque; |
|
62 |
|
|
63 |
qemu_put_be32(f, 1); /* PCI device version */ |
|
63 | 64 |
qemu_put_buffer(f, s->config, 256); |
64 | 65 |
} |
65 | 66 |
|
66 |
int generic_pci_load(QEMUFile* f, void *opaque, int version_id)
|
|
67 |
int pci_device_load(PCIDevice *s, QEMUFile *f)
|
|
67 | 68 |
{ |
68 |
PCIDevice* s=(PCIDevice*)opaque;
|
|
69 |
|
|
69 |
uint32_t version_id;
|
|
70 |
version_id = qemu_get_be32(f); |
|
70 | 71 |
if (version_id != 1) |
71 | 72 |
return -EINVAL; |
72 |
|
|
73 | 73 |
qemu_get_buffer(f, s->config, 256); |
74 |
pci_update_mappings(s); |
|
74 | 75 |
return 0; |
75 | 76 |
} |
76 | 77 |
|
Also available in: Unified diff