aboutsummaryrefslogtreecommitdiff
path: root/hw/m68k/mcf5208.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2020-05-26 11:40:52 +0200
committerThomas Huth <huth@tuxfamily.org>2020-05-30 09:17:46 +0200
commitb809667808b1f742a85d6cce0d77800be20bcaa0 (patch)
tree413343806e170ade5ab27871de2a2c8c371fe36d /hw/m68k/mcf5208.c
parentccff1ae4df08ad79d055ad255fd578786f17a313 (diff)
hw/m68k/mcf52xx: Replace hw_error() by qemu_log_mask()
hw_error() calls exit(). This a bit overkill when we can log the accesses as unimplemented or guest error. When fuzzing the devices, we don't want the whole process to exit. Replace some hw_error() calls by qemu_log_mask(). Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20200526094052.1723-3-f4bug@amsat.org> Reviewed-by: Thomas Huth <huth@tuxfamily.org> Signed-off-by: Thomas Huth <huth@tuxfamily.org>
Diffstat (limited to 'hw/m68k/mcf5208.c')
-rw-r--r--hw/m68k/mcf5208.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/hw/m68k/mcf5208.c b/hw/m68k/mcf5208.c
index b84c152ce3..2ab9701ad6 100644
--- a/hw/m68k/mcf5208.c
+++ b/hw/m68k/mcf5208.c
@@ -9,10 +9,10 @@
#include "qemu/osdep.h"
#include "qemu/units.h"
#include "qemu/error-report.h"
+#include "qemu/log.h"
#include "qapi/error.h"
#include "qemu-common.h"
#include "cpu.h"
-#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/m68k/mcf.h"
#include "hw/m68k/mcf_fec.h"
@@ -111,8 +111,9 @@ static void m5208_timer_write(void *opaque, hwaddr offset,
case 4:
break;
default:
- hw_error("m5208_timer_write: Bad offset 0x%x\n", (int)offset);
- break;
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\n",
+ __func__, offset);
+ return;
}
m5208_timer_update(s);
}
@@ -136,7 +137,8 @@ static uint64_t m5208_timer_read(void *opaque, hwaddr addr,
case 4:
return ptimer_get_count(s->timer);
default:
- hw_error("m5208_timer_read: Bad offset 0x%x\n", (int)addr);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\n",
+ __func__, addr);
return 0;
}
}
@@ -164,7 +166,8 @@ static uint64_t m5208_sys_read(void *opaque, hwaddr addr,
return 0;
default:
- hw_error("m5208_sys_read: Bad offset 0x%x\n", (int)addr);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\n",
+ __func__, addr);
return 0;
}
}
@@ -172,7 +175,8 @@ static uint64_t m5208_sys_read(void *opaque, hwaddr addr,
static void m5208_sys_write(void *opaque, hwaddr addr,
uint64_t value, unsigned size)
{
- hw_error("m5208_sys_write: Bad offset 0x%x\n", (int)addr);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\n",
+ __func__, addr);
}
static const MemoryRegionOps m5208_sys_ops = {