qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] sam460ex: Fix PCI interrupts with multiple devi


From: Sebastian Bauer
Subject: Re: [Qemu-devel] [PATCH] sam460ex: Fix PCI interrupts with multiple devices
Date: Tue, 31 Jul 2018 23:55:02 +0200
User-agent: Roundcube Webmail/1.3.6

Am 2018-07-31 13:08, schrieb BALATON Zoltan:
The four interrupts of the PCI bus are connected to the same UIC pin
on the real Sam460ex. Evidence for this can be found in the UBoot
source for the Sam460ex in the Sam460ex.c file where
PCI_INTERRUPT_LINE is written. Change the ppc440_pcix model to behave
more like this.

This fixes the problem that can be observed when adding further PCI
cards that got their interrupt rotated to other interrupts than PCI
INT A. In particular, the bug was observed with an additional OHCI PCI
card or an ES1370 sound device.
[...]
diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c
index 0999efc..9c77183 100644
--- a/hw/ppc/sam460ex.c
+++ b/hw/ppc/sam460ex.c
@@ -515,10 +515,8 @@ static void sam460ex_init(MachineState *machine)

     /* PCI bus */
     ppc460ex_pcie_init(env);
-    /* FIXME: is this correct? */
-    dev = sysbus_create_varargs("ppc440-pcix-host", 0xc0ec00000,
- uic[1][0], uic[1][20], uic[1][21], uic[1][22],
-                                NULL);
+ /* All PCI irqs are connected to the same UIC pin (cf. UBoot source) */ + dev = sysbus_create_simple("ppc440-pcix-host", 0xc0ec00000, uic[1][0]);
     pci_bus = (PCIBus *)qdev_get_child_bus(dev, "pci.0");
     if (!pci_bus) {
         error_report("couldn't create PCI controller!");

I'm fine with that change. I tested it with an additional OHCI controller on an emulated SAM machine under guest AmigaOS and it works.

Tested-by: Sebastian Bauer <address@hidden>

Better usage of QOM etc. can IMO be done at a later time point as this fixes an unpleasant bug and any side change will just increase the probability to introduce new bugs.

Bye
Sebastian



reply via email to

[Prev in Thread] Current Thread [Next in Thread]