qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* hw/ppc/virtex_ml507: Problem with CPU IRQ#3 (PPC40x_INPUT_CINT)
@ 2023-02-21 13:28 Philippe Mathieu-Daudé
  2023-02-21 18:36 ` Edgar E. Iglesias
  0 siblings, 1 reply; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-02-21 13:28 UTC (permalink / raw)
  To: Edgar E. Iglesias, QEMU Developers; +Cc: Cédric Le Goater, qemu-ppc

Hi Edgar,

The Xilinx Virtex ML507 model uses 2 different interrupt controllers:
- Universal Interrupt Controller
- Xilinx OPB Interrupt Controller
Both are connected to the same CPU IRQ line, IRQ#3 (PPC40x_INPUT_CINT):

108     uicdev = qdev_new(TYPE_PPC_UIC);
109     ppc4xx_dcr_realize(PPC4xx_DCR_DEVICE(uicdev), cpu, &error_fatal);
110     object_unref(OBJECT(uicdev));
111     uicsbd = SYS_BUS_DEVICE(uicdev);
112     sysbus_connect_irq(uicsbd, PPCUIC_OUTPUT_INT,
113                        qdev_get_gpio_in(DEVICE(cpu), PPC40x_INPUT_INT));

240     cpu_irq = qdev_get_gpio_in(DEVICE(cpu), PPC40x_INPUT_INT);
241     dev = qdev_new("xlnx.xps-intc");
242     qdev_prop_set_uint32(dev, "kind-of-intr", 0);
243     sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
244     sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, INTC_BASEADDR);
245     sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, cpu_irq);

How is the hardware wired, is it using an OR gate?

I couldn't figure it out looking here:
  * https://docs.xilinx.com/v/u/en-US/ug347
  * 
https://www.xilinx.com/content/dam/xilinx/support/documents/boards_and_kits/ml50x_schematics.pdf

Thanks,

Phil.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: hw/ppc/virtex_ml507: Problem with CPU IRQ#3 (PPC40x_INPUT_CINT)
  2023-02-21 13:28 hw/ppc/virtex_ml507: Problem with CPU IRQ#3 (PPC40x_INPUT_CINT) Philippe Mathieu-Daudé
@ 2023-02-21 18:36 ` Edgar E. Iglesias
  0 siblings, 0 replies; 2+ messages in thread
From: Edgar E. Iglesias @ 2023-02-21 18:36 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: QEMU Developers, Cédric Le Goater, qemu-ppc

[-- Attachment #1: Type: text/plain, Size: 1720 bytes --]

On Tue, Feb 21, 2023 at 7:28 AM Philippe Mathieu-Daudé <philmd@linaro.org>
wrote:

> Hi Edgar,
>
> The Xilinx Virtex ML507 model uses 2 different interrupt controllers:
> - Universal Interrupt Controller
> - Xilinx OPB Interrupt Controller
> Both are connected to the same CPU IRQ line, IRQ#3 (PPC40x_INPUT_CINT):
>
> 108     uicdev = qdev_new(TYPE_PPC_UIC);
> 109     ppc4xx_dcr_realize(PPC4xx_DCR_DEVICE(uicdev), cpu, &error_fatal);
> 110     object_unref(OBJECT(uicdev));
> 111     uicsbd = SYS_BUS_DEVICE(uicdev);
> 112     sysbus_connect_irq(uicsbd, PPCUIC_OUTPUT_INT,
> 113                        qdev_get_gpio_in(DEVICE(cpu),
> PPC40x_INPUT_INT));
>
> 240     cpu_irq = qdev_get_gpio_in(DEVICE(cpu), PPC40x_INPUT_INT);
> 241     dev = qdev_new("xlnx.xps-intc");
> 242     qdev_prop_set_uint32(dev, "kind-of-intr", 0);
> 243     sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
> 244     sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, INTC_BASEADDR);
> 245     sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, cpu_irq);
>
> How is the hardware wired, is it using an OR gate?
>

Hi Philippe,

I'm not sure if the UIC should be there at all, but I'm not sure.
Either the UIC should go or there should be an OR gate I guess.

The ml507 model was created a little bit empirically trying to get existing
images to run (long time ago).
I don't remember the exact details TBH...

I'll see if I can dig for more details...

Best regards,
Edgar



>
> I couldn't figure it out looking here:
>   * https://docs.xilinx.com/v/u/en-US/ug347
>   *
>
> https://www.xilinx.com/content/dam/xilinx/support/documents/boards_and_kits/ml50x_schematics.pdf
>
> Thanks,
>
> Phil.
>

[-- Attachment #2: Type: text/html, Size: 2649 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-21 18:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-21 13:28 hw/ppc/virtex_ml507: Problem with CPU IRQ#3 (PPC40x_INPUT_CINT) Philippe Mathieu-Daudé
2023-02-21 18:36 ` Edgar E. Iglesias

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).