[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is the ppc440 "bamboo" board in QEMU still of any use?
From: |
Greg Kurz |
Subject: |
Re: Is the ppc440 "bamboo" board in QEMU still of any use? |
Date: |
Thu, 14 Oct 2021 17:35:28 +0200 |
On Thu, 14 Oct 2021 17:26:53 +0200
Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
> On 10/14/21 13:29, Cédric Le Goater wrote:
> > On 10/14/21 12:34, Christophe Leroy wrote:
>
> >> I have the following change in QEMU to be able to run the bamboo,
> >> found it some time ago via google (can't remember where):
> >>
> >> diff --git a/hw/ppc/ppc4xx_pci.c b/hw/ppc/ppc4xx_pci.c
> >> index 8147ba6f94..600e89e791 100644
> >> --- a/hw/ppc/ppc4xx_pci.c
> >> +++ b/hw/ppc/ppc4xx_pci.c
> >> @@ -246,7 +246,7 @@ static int ppc4xx_pci_map_irq(PCIDevice *pci_dev,
> >> int irq_num)
> >>
> >> trace_ppc4xx_pci_map_irq(pci_dev->devfn, irq_num, slot);
> >>
> >> - return slot - 1;
> >> + return slot ? slot - 1 : slot;
> >> }
> >>
> >> static void ppc4xx_pci_set_irq(void *opaque, int irq_num, int level)
> >
> > could you try to use :
> >
> > static inline int ppce500_pci_map_irq_slot(int devno, int irq_num)
> > {
> > return (devno + irq_num) % 4;
> > }
>
> Is this pci_swizzle()?
>
Yes :-)