aboutsummaryrefslogtreecommitdiff
path: root/hw/pc.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2006-05-13 16:11:23 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2006-05-13 16:11:23 +0000
commit502a53952d574717bdb626b651b16cadacab46f4 (patch)
tree100d2c38f587f82fd2d683a4544960ab422f8038 /hw/pc.c
parent4aa4253115255d79fe510ba15a68dad8f4ba4499 (diff)
Rearrange PCI host emulation code.
Add ARM PCI emulation. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1916 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pc.c')
-rw-r--r--hw/pc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/hw/pc.c b/hw/pc.c
index b9bfd83a57..642af5e2b5 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -611,6 +611,7 @@ static void pc_init1(int ram_size, int vga_ram_size, int boot_device,
unsigned long bios_offset, vga_bios_offset;
int bios_size, isa_bios_size;
PCIBus *pci_bus;
+ int piix3_devfn;
CPUState *env;
NICInfo *nd;
@@ -741,7 +742,7 @@ static void pc_init1(int ram_size, int vga_ram_size, int boot_device,
if (pci_enabled) {
pci_bus = i440fx_init();
- piix3_init(pci_bus);
+ piix3_devfn = piix3_init(pci_bus);
} else {
pci_bus = NULL;
}
@@ -813,7 +814,7 @@ static void pc_init1(int ram_size, int vga_ram_size, int boot_device,
}
if (pci_enabled) {
- pci_piix3_ide_init(pci_bus, bs_table);
+ pci_piix3_ide_init(pci_bus, bs_table, piix3_devfn + 1);
} else {
for(i = 0; i < 2; i++) {
isa_ide_init(ide_iobase[i], ide_iobase2[i], ide_irq[i],
@@ -832,12 +833,12 @@ static void pc_init1(int ram_size, int vga_ram_size, int boot_device,
cmos_init(ram_size, boot_device, bs_table);
if (pci_enabled && usb_enabled) {
- usb_uhci_init(pci_bus, usb_root_ports);
+ usb_uhci_init(pci_bus, usb_root_ports, piix3_devfn + 2);
usb_attach(usb_root_ports[0], vm_usb_hub);
}
if (pci_enabled && acpi_enabled) {
- piix4_pm_init(pci_bus);
+ piix4_pm_init(pci_bus, piix3_devfn + 3);
}
/* must be done after all PCI devices are instanciated */
/* XXX: should be done in the Bochs BIOS */