qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 3/5] hw/ppc/pegasos2: Fix PCI interrupt routing


From: BALATON Zoltan
Subject: Re: [PATCH 3/5] hw/ppc/pegasos2: Fix PCI interrupt routing
Date: Sat, 25 Feb 2023 21:19:24 +0100 (CET)

On Sat, 25 Feb 2023, Philippe Mathieu-Daudé wrote:
On 21/2/23 19:44, BALATON Zoltan wrote:
According to the PegasosII schematics the PCI interrupt lines are
connected to both the gpp pins of the Mv64361 north bridge and the
PINT pins of the VT8231 south bridge so guests can get interrupts from
either of these. So far we only had the MV64361 connections which
worked for on board devices but for additional PCI devices (such as
network or sound card added with -device) guest OSes expect interrupt
from the ISA IRQ 9 where the firmware routes these PCI interrupts in
VT8231 ISA bridge. After the previous patches we can now model this
and also remove the board specific connection from mv64361. Also
configure routing of these lines when using Virtual Open Firmware to
match board firmware for guests that expect this.

This fixes PCI interrupts on pegasos2 under Linux, MorphOS and AmigaOS.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
  hw/pci-host/mv64361.c |  4 ----
  hw/ppc/pegasos2.c     | 26 +++++++++++++++++++++++++-
  2 files changed, 25 insertions(+), 5 deletions(-)


+static void pegasos2_pci_irq(void *opaque, int n, int level)
+{
+    Pegasos2MachineState *pm = opaque;
+
+    /* PCI interrupt lines are connected to both MV64361 and VT8231 */
+    qemu_set_irq(pm->mv_pirq[n], level);
+    qemu_set_irq(pm->via_pirq[n], level);
+}

See TYPE_SPLIT_IRQ.

I remembered there was something like that somewhere but could not find it. Thanks, I'll check if that's simpler here.

Regards,
BALATON Zoltan

reply via email to

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