[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 5/8] hw/hppa/lasi: Don't abort on invalid IMR value
From: |
Helge Deller |
Subject: |
[PATCH v3 5/8] hw/hppa/lasi: Don't abort on invalid IMR value |
Date: |
Tue, 4 Aug 2020 16:00:53 +0200 |
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 | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/hw/hppa/lasi.c b/hw/hppa/lasi.c
index ffcbb988b8..7b4a168468 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,10 @@ 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", val);
break;
case LASI_IPR:
/* Any write to IPR clears the register. */
--
2.21.3
- [PATCH v3 0/8] target-hppa fixes v3, Helge Deller, 2020/08/04
- [PATCH v3 5/8] hw/hppa/lasi: Don't abort on invalid IMR value,
Helge Deller <=
- [PATCH v3 1/8] hw/hppa: Sync hppa_hardware.h file with SeaBIOS sources, Helge Deller, 2020/08/04
- [PATCH v3 2/8] seabios-hppa: Update to SeaBIOS hppa version 1, Helge Deller, 2020/08/04
- [PATCH v3 3/8] hw/hppa: Implement proper SeaBIOS version check, Helge Deller, 2020/08/04
- [PATCH v3 7/8] hw/display/artist: Refactor artist_rop8() to avoid buffer over-run, Helge Deller, 2020/08/04
- Re: [PATCH v3 7/8] hw/display/artist: Refactor artist_rop8() to avoid buffer over-run, Alexander Bulekov, 2020/08/04
- Re: [PATCH v3 7/8] hw/display/artist: Refactor artist_rop8() to avoid buffer over-run, Helge Deller, 2020/08/04
- Re: [PATCH v3 7/8] hw/display/artist: Refactor artist_rop8() to avoid buffer over-run, Alexander Bulekov, 2020/08/04
- Re: [PATCH v3 7/8] hw/display/artist: Refactor artist_rop8() to avoid buffer over-run, Alexander Bulekov, 2020/08/05
- Re: [PATCH v3 7/8] hw/display/artist: Refactor artist_rop8() to avoid buffer over-run, Helge Deller, 2020/08/05
- Re: [PATCH v3 7/8] hw/display/artist: Refactor artist_rop8() to avoid buffer over-run, Alexander Bulekov, 2020/08/06