qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Artyom Tarasenko <atar4qemu@gmail.com>
To: jasper.lowell@bt.com
Cc: tony.nguyen@bt.com, Peter Tribble <peter.tribble@gmail.com>,
	Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: Emulating Solaris 10 on SPARC64 sun4u
Date: Sun, 17 May 2020 14:37:26 +0200	[thread overview]
Message-ID: <CACXAS8DqO8CSkkSbD5aivGxL8xVB-FS5Bm0TL3ad+OLsvzcuxg@mail.gmail.com> (raw)
In-Reply-To: <feaccbcfcd5a36d1024e91e40bef6eb6f359a628.camel@bt.com>

On Sun, May 17, 2020 at 9:57 AM <jasper.lowell@bt.com> wrote:
>
> I've written up a basic implementation of the SAB 82532 ESCC2 device
> and have written a patch for OpenBIOS to add it to the device tree. I
> still have the 16550A UART acting as ttya to avoid having to write an
> OpenBIOS device driver.

Great progress! Are you planning to contribute your escc2 to the upstream?

> OpenBSD and Solaris both identify the device correctly and attach it.
>
> Interestingly, it looks like Solaris entered an interrupt handler to
> deal with an event for the SAB 82532 and it probed a few status
> registers. Given that I couldn't encourage Solaris to do anything
> outside of attach the device for the 16550A, I was thinking this might
> be a good sign.
>
> There really shouldn't be an interrupt though as the reset state of the
> SAB 82532 is to have all interrupts masked. Solaris probes these
> interrupt status registers while "configuring" the sunhme device.
>
> Attempting to configure interface hme0...
> 140070@1589698603.268942:escc2_mem_read channel a addr 0x38 value 0x4
> 140070@1589698603.269011:escc2_irq_update value 0x0
> 140070@1589698603.269015:escc2_mem_read channel a addr 0x3a value 0x80
> 140070@1589698603.269017:escc2_irq_update value 0x0
> 140070@1589698603.269018:escc2_mem_read channel a addr 0x3b value 0x0
> 140070@1589698603.269076:escc2_mem_read channel a addr 0x38 value 0x0
> WARNING: Power off requested from power button or SC, powering down the
> system!
> 140070@1589698611.270845:escc2_mem_read channel a addr 0x38 value 0x0
> 140070@1589698619.271758:escc2_mem_read channel a addr 0x38 value 0x0
>
> I've noticed that removing the sunhme code for sun4u.c in QEMU prevents
> the spurious interrupt from happening for the serial device along with
> prevent the unexpected power off request (the power off request was not
> introduced by my code). I haven't investigated why the presence of
> sunhme causes these events.
>
> I modified OpenBIOS to use ttyb for stdin/stdout and assigned that to
> the 16550A so that ttya could be aliased to the SAB 82532. Outside of
> the spurious interrupt handler being called, I'm getting the same
> behaviour where Solaris identifies, attaches, and then ignores the
> device. Doesn't look like my guess was on the mark.
>
> I'll be looking at getting an OpenSolaris-like kernel built with prom
> debugging output for console/tty related files like
> usr/src/uts/common/io/consconfig_dacf.c. The illumos kernel is probably
> suitable for this because it's still maintained and appears to be
> suffering from the same console problems. I don't have a SPARC64
> machine immediately available and I'm unfamiliar with the build system
> behind these distributions, so it might be a while before this happens.
>
> I'm out of ideas.

We can use the strategy I used 10 years back for sun4m: boot the
proprietary firmware first to reduce the number of possible emulation
bugs. The proprietary firmware is known to boot Solaris.

Regards,
Artyom


  reply	other threads:[~2020-05-17 12:38 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
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 [this message]
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=CACXAS8DqO8CSkkSbD5aivGxL8xVB-FS5Bm0TL3ad+OLsvzcuxg@mail.gmail.com \
    --to=atar4qemu@gmail.com \
    --cc=dgilbert@redhat.com \
    --cc=jasper.lowell@bt.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=peter.tribble@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=tony.nguyen@bt.com \
    /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).