Commit 8f1c91d801b56fa68a0c297e0405edf6a22c0586
1 parent
abcebc7e
Devfn number for the PIIX3 southbridge, by Aurelien Jarno.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2315 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
3 changed files
with
5 additions
and
5 deletions
hw/pc.c
... | ... | @@ -599,7 +599,7 @@ static void pc_init1(int ram_size, int vga_ram_size, int boot_device, |
599 | 599 | |
600 | 600 | if (pci_enabled) { |
601 | 601 | pci_bus = i440fx_init(&i440fx_state); |
602 | - piix3_devfn = piix3_init(pci_bus); | |
602 | + piix3_devfn = piix3_init(pci_bus, -1); | |
603 | 603 | } else { |
604 | 604 | pci_bus = NULL; |
605 | 605 | } | ... | ... |
hw/piix_pci.c
... | ... | @@ -196,7 +196,7 @@ PCIBus *i440fx_init(PCIDevice **pi440fx_state) |
196 | 196 | |
197 | 197 | /* PIIX3 PCI to ISA bridge */ |
198 | 198 | |
199 | -static PCIDevice *piix3_dev; | |
199 | +PCIDevice *piix3_dev; | |
200 | 200 | |
201 | 201 | /* just used for simpler irq handling. */ |
202 | 202 | #define PCI_IRQ_WORDS ((PCI_DEVICES_MAX + 31) / 32) |
... | ... | @@ -273,13 +273,13 @@ static int piix_load(QEMUFile* f, void *opaque, int version_id) |
273 | 273 | return pci_device_load(d, f); |
274 | 274 | } |
275 | 275 | |
276 | -int piix3_init(PCIBus *bus) | |
276 | +int piix3_init(PCIBus *bus, int devfn) | |
277 | 277 | { |
278 | 278 | PCIDevice *d; |
279 | 279 | uint8_t *pci_conf; |
280 | 280 | |
281 | 281 | d = pci_register_device(bus, "PIIX3", sizeof(PCIDevice), |
282 | - -1, NULL, NULL); | |
282 | + devfn, NULL, NULL); | |
283 | 283 | register_savevm("PIIX3", 0, 2, piix_save, piix_load, d); |
284 | 284 | |
285 | 285 | piix3_dev = d; | ... | ... |
vl.h
... | ... | @@ -821,7 +821,7 @@ PCIBus *pci_vpb_init(void *pic, int irq, int realview); |
821 | 821 | /* piix_pci.c */ |
822 | 822 | PCIBus *i440fx_init(PCIDevice **pi440fx_state); |
823 | 823 | void i440fx_set_smm(PCIDevice *d, int val); |
824 | -int piix3_init(PCIBus *bus); | |
824 | +int piix3_init(PCIBus *bus, int devfn); | |
825 | 825 | void i440fx_init_memory_mappings(PCIDevice *d); |
826 | 826 | |
827 | 827 | /* openpic.c */ | ... | ... |