From: Thomas Huth <thuth@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Cédric Le Goater" <clg@kaod.org>,
"Christophe Leroy" <christophe.leroy@csgroup.eu>,
"David Gibson" <david@gibson.dropbear.id.au>,
qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
"Greg Kurz" <groug@kaod.org>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
Alexander Graf <agraf@csgraf.de>,
hpoussin@reactos.org
Subject: Re: Is the ppc440 "bamboo" board in QEMU still of any use?
Date: Thu, 14 Oct 2021 17:37:21 +0200 [thread overview]
Message-ID: <25d90a22-63d9-6c15-5ee2-eadda449bcaf@redhat.com> (raw)
In-Reply-To: <836a36f7-936b-ec36-f8e8-472bcec3970f@redhat.com>
On 14/10/2021 17.26, Philippe Mathieu-Daudé 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()?
It's pci_swizzle, but I don't think that we should take irq_num into account
here. The comment right in front of the function says:
On Bamboo, all pins from each slot are tied to a single board IRQ
Similar comment in pc-bios/bamboo.dts:
Bamboo has all 4 IRQ pins tied together per slot
So the return value should only depend on the slot number.
Not sure how to properly fix this yet, though.
Thomas
PS: Found a working pre-compiled kernel for bamboo:
http://landley.net/aboriginal/downloads/binaries/system-image-powerpc-440fp.tar.gz
next prev parent reply other threads:[~2021-10-14 15:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-14 9:31 Is the ppc440 "bamboo" board in QEMU still of any use? Thomas Huth
2021-10-14 10:34 ` Christophe Leroy
2021-10-14 10:47 ` Christophe Leroy
2021-10-14 11:44 ` Mark Cave-Ayland
2021-10-14 12:57 ` BALATON Zoltan
2021-10-15 8:17 ` Thomas Huth
2021-10-14 11:29 ` Cédric Le Goater
2021-10-14 15:26 ` Philippe Mathieu-Daudé
2021-10-14 15:35 ` Greg Kurz
2021-10-14 15:37 ` Thomas Huth [this message]
2021-10-14 15:58 ` Mark Cave-Ayland
2021-10-15 6:09 ` Thomas Huth
2021-10-14 16:00 ` Cédric Le Goater
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=25d90a22-63d9-6c15-5ee2-eadda449bcaf@redhat.com \
--to=thuth@redhat.com \
--cc=agraf@csgraf.de \
--cc=christophe.leroy@c-s.fr \
--cc=christophe.leroy@csgroup.eu \
--cc=clg@kaod.org \
--cc=david@gibson.dropbear.id.au \
--cc=edgar.iglesias@gmail.com \
--cc=groug@kaod.org \
--cc=hpoussin@reactos.org \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).