qemu-devel
[Top][All Lists]
Advanced

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

Re: IDE IRQ problem after UDMA enabled (was: Re: Emulating Solaris 10 on


From: BALATON Zoltan
Subject: Re: IDE IRQ problem after UDMA enabled (was: Re: Emulating Solaris 10 on SPARC64 sun4u)
Date: Tue, 25 Feb 2020 23:00:01 +0100 (CET)
User-agent: Alpine 2.22 (BSF 395 2020-01-19)

On Tue, 25 Feb 2020, BALATON Zoltan wrote:
On Mon, 10 Feb 2020, John Snow wrote:
It sounds like the real problem is either in the bmdma controller (or
its unique interaction with hw/ide/core.c -- which is possible) or in
the interrupt routing somewhere else.

If you have any IDE traces from a hang, feel free to throw them up on a
pastebin for me to take a peek at; it might help for me to see the exact
sequence that causes a hang in QEMU's IDE terms to see if I can't
"reverse engineer" what the guest is hoping to have happen. Maybe I can
trace this to a bad register value.

I've got some traces from Linux and MorphOS (both on my work in progress pegasos2 emulation using via-ide where I can most easily reproduce this) but I'm not sure what to look for in these. MorphOS starts booting, so firmware can read ide-cd connected to via-ide as well as MorphOS can before enabling UDMA 5 mode but stops after that and cannot read the drive any more. Linux works even after enabling DMA. I've gathered some logs in https://osdn.net/projects/qmiga/ticket/38949 previously but now I try to list here the part in more detail where drive is detected, enabling DMA and first command after that in case you can spot something in these that could explain why it fails with MorphOS driver.

Never mind, I've found a clue in NetBSD's driver:

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/pci/viaide.c?rev=1.89&content-type=text/x-cvsweb-markup&only_with_tag=MAIN

which has a comment that says:

/*
 * At least under certain (mis)configurations (e.g. on the "Pegasos" board)
 * the VT8231-IDE's native mode only works with irq 14/15, and cannot be
 * programmed to use a single native PCI irq alone. So we install an interrupt
 * handler for each channel, as in compatibility mode.
 */

If I change via-ide to use ISA IRQ14 and 15 and ignore what's programmed in the PCI config reg then MorphOS works with UDMA so it expects that. This change however breaks Linux which still boots after getting some errors but maybe it downgrades to PIO mode then. I'll need to find out more about how is this broken on real hardware and how can we emulate it.

So you don't need to look at the logs unless you want to check why it sees a non working ATA device after resetting the bus but logs in the ticket above may be more useful for that as I did not include that part in this email.

Thank you,
BALATON Zoltan



reply via email to

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