On Tue, Jul 31, 2018 at 11:55:02PM +0200, Sebastian Bauer wrote: > 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 > > 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. Thanks, applied to ppc-for-3.0. I hope to send a pull request for that today. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson