]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commitdiff
Devfn number for the PIIX3 southbridge, by Aurelien Jarno.
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 10 Jan 2007 16:23:41 +0000 (16:23 +0000)
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 10 Jan 2007 16:23:41 +0000 (16:23 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2315 c046a42c-6fe2-441c-8c8c-71466251a162

hw/pc.c
hw/piix_pci.c
vl.h

diff --git a/hw/pc.c b/hw/pc.c
index 408a9fb24727ec5162b0cb3271a0e1a321da23c9..73f7609ae9b8b051ad0287b20d6e168f107af527 100644 (file)
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -599,7 +599,7 @@ static void pc_init1(int ram_size, int vga_ram_size, int boot_device,
 
     if (pci_enabled) {
         pci_bus = i440fx_init(&i440fx_state);
-        piix3_devfn = piix3_init(pci_bus);
+        piix3_devfn = piix3_init(pci_bus, -1);
     } else {
         pci_bus = NULL;
     }
index 1557694470737bd0cb9669bf9ccf0754e95e060c..9b3e7533b8c8b67c3c6d2bedbc46b589ea71dd8d 100644 (file)
@@ -196,7 +196,7 @@ PCIBus *i440fx_init(PCIDevice **pi440fx_state)
 
 /* PIIX3 PCI to ISA bridge */
 
-static PCIDevice *piix3_dev;
+PCIDevice *piix3_dev;
 
 /* just used for simpler irq handling. */
 #define PCI_IRQ_WORDS   ((PCI_DEVICES_MAX + 31) / 32)
@@ -273,13 +273,13 @@ static int piix_load(QEMUFile* f, void *opaque, int version_id)
     return pci_device_load(d, f);
 }
 
-int piix3_init(PCIBus *bus)
+int piix3_init(PCIBus *bus, int devfn)
 {
     PCIDevice *d;
     uint8_t *pci_conf;
 
     d = pci_register_device(bus, "PIIX3", sizeof(PCIDevice),
-                                    -1, NULL, NULL);
+                                    devfn, NULL, NULL);
     register_savevm("PIIX3", 0, 2, piix_save, piix_load, d);
 
     piix3_dev = d;
diff --git a/vl.h b/vl.h
index 8667ba8f335b7f4c7654dc1059b5e300188b8ad8..b1be8c23e7f8f8f40a3ae21a4a1ee5979a7991c3 100644 (file)
--- a/vl.h
+++ b/vl.h
@@ -821,7 +821,7 @@ PCIBus *pci_vpb_init(void *pic, int irq, int realview);
 /* piix_pci.c */
 PCIBus *i440fx_init(PCIDevice **pi440fx_state);
 void i440fx_set_smm(PCIDevice *d, int val);
-int piix3_init(PCIBus *bus);
+int piix3_init(PCIBus *bus, int devfn);
 void i440fx_init_memory_mappings(PCIDevice *d);
 
 /* openpic.c */