qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: BALATON Zoltan <balaton@eik.bme.hu>
To: John Snow <jsnow@redhat.com>
Cc: qemu-devel@nongnu.org
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)	[thread overview]
Message-ID: <alpine.BSF.2.22.395.2002252251001.87116@zero.eik.bme.hu> (raw)
In-Reply-To: <alpine.BSF.2.22.395.2002252041380.50551@zero.eik.bme.hu>

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	other threads:[~2020-02-25 22:01 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05  6:31 Emulating Solaris 10 on SPARC64 sun4u jasper.lowell
2020-02-05 17:33 ` Dr. David Alan Gilbert
2020-02-07  5:43   ` jasper.lowell
2020-02-08  0:03     ` BALATON Zoltan
2020-02-10 15:38       ` BALATON Zoltan
2020-02-10 19:04         ` John Snow
2020-02-10 22:32           ` Missing IRQ with bmdma on ppc/mips/sparc? (was: Re: Emulating Solaris 10 on SPARC64 sun4u) BALATON Zoltan
2020-02-25 20:55           ` IDE IRQ problem after UDMA enabled " BALATON Zoltan
2020-02-25 22:00             ` BALATON Zoltan [this message]
2020-02-25 22:12         ` Emulating Solaris 10 on SPARC64 sun4u BALATON Zoltan
2020-02-09 11:26 ` Mark Cave-Ayland
2020-02-19  3:42   ` jasper.lowell
2020-02-19 18:54     ` BALATON Zoltan
2020-02-19 20:10       ` BALATON Zoltan
2020-02-21 19:53         ` Dr. David Alan Gilbert
2020-02-28 22:05         ` BALATON Zoltan
2020-03-01  0:15           ` BALATON Zoltan
2020-05-07 14:29   ` jasper.lowell
2020-05-07 15:02     ` Artyom Tarasenko
2020-05-08  2:33       ` jasper.lowell
2020-05-08  8:51         ` Peter Tribble
2020-05-08 13:45           ` Artyom Tarasenko
2020-05-10  2:46             ` jasper.lowell
2020-05-10  9:22               ` Mark Cave-Ayland
2020-05-17  7:57                 ` jasper.lowell
2020-05-17 12:37                   ` Artyom Tarasenko
2020-05-18  2:56                     ` jasper.lowell
2020-05-20 17:44                       ` Mike Russo
2020-05-07 18:54     ` BALATON Zoltan
2020-05-08  2:55       ` jasper.lowell

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=alpine.BSF.2.22.395.2002252251001.87116@zero.eik.bme.hu \
    --to=balaton@eik.bme.hu \
    --cc=jsnow@redhat.com \
    --cc=qemu-devel@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).