Commit 8f1c91d801b56fa68a0c297e0405edf6a22c0586

Authored by ths
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
@@ -599,7 +599,7 @@ static void pc_init1(int ram_size, int vga_ram_size, int boot_device, @@ -599,7 +599,7 @@ static void pc_init1(int ram_size, int vga_ram_size, int boot_device,
599 599
600 if (pci_enabled) { 600 if (pci_enabled) {
601 pci_bus = i440fx_init(&i440fx_state); 601 pci_bus = i440fx_init(&i440fx_state);
602 - piix3_devfn = piix3_init(pci_bus); 602 + piix3_devfn = piix3_init(pci_bus, -1);
603 } else { 603 } else {
604 pci_bus = NULL; 604 pci_bus = NULL;
605 } 605 }
hw/piix_pci.c
@@ -196,7 +196,7 @@ PCIBus *i440fx_init(PCIDevice **pi440fx_state) @@ -196,7 +196,7 @@ PCIBus *i440fx_init(PCIDevice **pi440fx_state)
196 196
197 /* PIIX3 PCI to ISA bridge */ 197 /* PIIX3 PCI to ISA bridge */
198 198
199 -static PCIDevice *piix3_dev; 199 +PCIDevice *piix3_dev;
200 200
201 /* just used for simpler irq handling. */ 201 /* just used for simpler irq handling. */
202 #define PCI_IRQ_WORDS ((PCI_DEVICES_MAX + 31) / 32) 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,13 +273,13 @@ static int piix_load(QEMUFile* f, void *opaque, int version_id)
273 return pci_device_load(d, f); 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 PCIDevice *d; 278 PCIDevice *d;
279 uint8_t *pci_conf; 279 uint8_t *pci_conf;
280 280
281 d = pci_register_device(bus, "PIIX3", sizeof(PCIDevice), 281 d = pci_register_device(bus, "PIIX3", sizeof(PCIDevice),
282 - -1, NULL, NULL); 282 + devfn, NULL, NULL);
283 register_savevm("PIIX3", 0, 2, piix_save, piix_load, d); 283 register_savevm("PIIX3", 0, 2, piix_save, piix_load, d);
284 284
285 piix3_dev = d; 285 piix3_dev = d;
@@ -821,7 +821,7 @@ PCIBus *pci_vpb_init(void *pic, int irq, int realview); @@ -821,7 +821,7 @@ PCIBus *pci_vpb_init(void *pic, int irq, int realview);
821 /* piix_pci.c */ 821 /* piix_pci.c */
822 PCIBus *i440fx_init(PCIDevice **pi440fx_state); 822 PCIBus *i440fx_init(PCIDevice **pi440fx_state);
823 void i440fx_set_smm(PCIDevice *d, int val); 823 void i440fx_set_smm(PCIDevice *d, int val);
824 -int piix3_init(PCIBus *bus); 824 +int piix3_init(PCIBus *bus, int devfn);
825 void i440fx_init_memory_mappings(PCIDevice *d); 825 void i440fx_init_memory_mappings(PCIDevice *d);
826 826
827 /* openpic.c */ 827 /* openpic.c */