qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: peter.maydell@linaro.org, qemu-devel@nongnu.org
Cc: Helge Deller <deller@gmx.de>, Richard Henderson <rth@twiddle.net>
Subject: [PULL v5 05/12] hw/hppa/lasi: Don't abort on invalid IMR value
Date: Wed, 26 Aug 2020 23:13:38 +0200	[thread overview]
Message-ID: <20200826211345.14295-6-deller@gmx.de> (raw)
In-Reply-To: <20200826211345.14295-1-deller@gmx.de>

NetBSD initializes the LASI IMR value with 0xffffffff to disable all LASI
interrupts. This triggered an assert() and stopped the emulation.  By replacing
the check with a warning in the guest log we now allow NetBSD to boot again.

Signed-off-by: Helge Deller <deller@gmx.de>
---
 hw/hppa/lasi.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/hw/hppa/lasi.c b/hw/hppa/lasi.c
index ffcbb988b8..194aa3e619 100644
--- a/hw/hppa/lasi.c
+++ b/hw/hppa/lasi.c
@@ -11,6 +11,7 @@

 #include "qemu/osdep.h"
 #include "qemu/units.h"
+#include "qemu/log.h"
 #include "qapi/error.h"
 #include "cpu.h"
 #include "trace.h"
@@ -170,8 +171,11 @@ static MemTxResult lasi_chip_write_with_attrs(void *opaque, hwaddr addr,
         /* read-only.  */
         break;
     case LASI_IMR:
-        s->imr = val;  /* 0x20 ?? */
-        assert((val & LASI_IRQ_BITS) == val);
+        s->imr = val;
+        if (((val & LASI_IRQ_BITS) != val) && (val != 0xffffffff))
+            qemu_log_mask(LOG_GUEST_ERROR,
+                "LASI: tried to set invalid %lx IMR value.\n",
+                (unsigned long) val);
         break;
     case LASI_IPR:
         /* Any write to IPR clears the register. */
--
2.21.3



  parent reply	other threads:[~2020-08-26 21:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-26 21:13 [PULL v5 00/12] The following changes since commit 3461487523b897d324e8d91f3fd20ed55f849544: Helge Deller
2020-08-26 21:13 ` [PULL v5 01/12] hw/hppa: Sync hppa_hardware.h file with SeaBIOS sources Helge Deller
2020-08-26 21:13 ` [PULL v5 02/12] seabios-hppa: Update to SeaBIOS hppa version 1 Helge Deller
2020-08-26 21:13 ` [PULL v5 03/12] hw/hppa: Implement proper SeaBIOS version check Helge Deller
2020-08-26 21:13 ` [PULL v5 04/12] hw/display/artist.c: fix out of bounds check Helge Deller
2020-08-26 21:13 ` Helge Deller [this message]
2020-08-26 21:13 ` [PULL v5 06/12] hw/display/artist: Check offset in draw_line to avoid buffer over-run Helge Deller
2020-08-26 21:13 ` [PULL v5 07/12] hw/display/artist: Refactor artist_rop8() " Helge Deller
2020-08-26 21:13 ` [PULL v5 08/12] Revert "hw/display/artist: Avoid drawing line when nothing to display" Helge Deller
2020-08-26 21:13 ` [PULL v5 09/12] hw/display/artist: Prevent out of VRAM buffer accesses Helge Deller
2020-08-26 21:13 ` [PULL v5 10/12] hw/display/artist: Unbreak size mismatch memory accesses Helge Deller
2020-08-26 21:13 ` [PULL v5 11/12] hw/display/artist: Fix invalidation of lines in artist_draw_line() Helge Deller
2020-08-26 21:13 ` [PULL v5 12/12] hw/display/artist: Fix invalidation of lines near screen border Helge Deller
2020-08-27 10:20 ` [PULL v5 00/12] The following changes since commit 3461487523b897d324e8d91f3fd20ed55f849544: Peter Maydell

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=20200826211345.14295-6-deller@gmx.de \
    --to=deller@gmx.de \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).