Skip to contentSkip to conversation

Fix for qemu with latest Bochs BIOS

Qemu-devel Volker Ruppert 1 participant 1 message Jan 16, 2005

lore
Share & tools
lore
#0 lore raw

Hi all!

Some people tried to use qemu and the latest Bochs BIOS from CVS without success. The reason for the failure is the modified PCI IRQ routing table and the PCI IRQ initialization. The small patch below fixes the problem (tested with WinNT 4.0 SP6).

The reason for the modified pirq routing table is the USB controller of the PIIX3 chipset. According to the specs it uses the INTD pin hardwired to PIRQD. To implement this, I had to place the PIIX3 at entry #1 of the routing table. I removed the i440FX PMC/DBX from the table, since it doesn't use an IRQ line. The devices connected to slots are using now the entries #2 to #6.

If the patch works in all cases you can also remove the temporary pci irq initialization code.

hw/pci.c  2004-12-24 20:10:50.000000000 +0100 renamed from home/volker/qemu/hw/pci.c  2004-10-09 23:25:21.000000000 +0200 +0 -0
diff -urN /home/volker/qemu/hw/pci.c ./hw/pci.c
@@ -494,7 +494,7 @@

 static inline int pci_slot_get_pirq(PCIDevice *pci_dev, int irq_num) {
     int slot_addend;
-    slot_addend = (pci_dev->devfn >> 3);
+    slot_addend = (pci_dev->devfn >> 3) - 1;
     return (irq_num + slot_addend) & 3;
 }

--
Bye

Volker

P.S.: The latest Bochs BIOS also implements some missing PS/2 mouse functions. Now it is possible to implement wheel mouse support. In Bochs the wheel works now in the Win98 guest.