Revision 502a5395 hw/pc.c

b/hw/pc.c
611 611
    unsigned long bios_offset, vga_bios_offset;
612 612
    int bios_size, isa_bios_size;
613 613
    PCIBus *pci_bus;
614
    int piix3_devfn;
614 615
    CPUState *env;
615 616
    NICInfo *nd;
616 617

  
......
741 742

  
742 743
    if (pci_enabled) {
743 744
        pci_bus = i440fx_init();
744
        piix3_init(pci_bus);
745
        piix3_devfn = piix3_init(pci_bus);
745 746
    } else {
746 747
        pci_bus = NULL;
747 748
    }
......
813 814
    }
814 815

  
815 816
    if (pci_enabled) {
816
        pci_piix3_ide_init(pci_bus, bs_table);
817
        pci_piix3_ide_init(pci_bus, bs_table, piix3_devfn + 1);
817 818
    } else {
818 819
        for(i = 0; i < 2; i++) {
819 820
            isa_ide_init(ide_iobase[i], ide_iobase2[i], ide_irq[i],
......
832 833
    cmos_init(ram_size, boot_device, bs_table);
833 834

  
834 835
    if (pci_enabled && usb_enabled) {
835
        usb_uhci_init(pci_bus, usb_root_ports);
836
        usb_uhci_init(pci_bus, usb_root_ports, piix3_devfn + 2);
836 837
        usb_attach(usb_root_ports[0], vm_usb_hub);
837 838
    }
838 839

  
839 840
    if (pci_enabled && acpi_enabled) {
840
        piix4_pm_init(pci_bus);
841
        piix4_pm_init(pci_bus, piix3_devfn + 3);
841 842
    }
842 843
    /* must be done after all PCI devices are instanciated */
843 844
    /* XXX: should be done in the Bochs BIOS */

Also available in: Unified diff