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>
This commit is contained in:
Philippe Mathieu-Daudé 2020-05-26 11:40:52 +02:00 committed by Thomas Huth
parent ccff1ae4df
commit b809667808
4 changed files with 30 additions and 15 deletions

View file

@ -8,6 +8,7 @@
#include "qemu/osdep.h"
#include "qemu/module.h"
#include "qemu/log.h"
#include "cpu.h"
#include "hw/hw.h"
#include "hw/irq.h"
@ -80,7 +81,9 @@ static uint64_t mcf_intc_read(void *opaque, hwaddr addr,
case 0xe1: case 0xe2: case 0xe3: case 0xe4:
case 0xe5: case 0xe6: case 0xe7:
/* LnIACK */
hw_error("mcf_intc_read: LnIACK not implemented\n");
qemu_log_mask(LOG_UNIMP, "%s: LnIACK not implemented (offset 0x%02x)\n",
__func__, offset);
/* fallthru */
default:
return 0;
}
@ -127,8 +130,9 @@ static void mcf_intc_write(void *opaque, hwaddr addr,
}
break;
default:
hw_error("mcf_intc_write: Bad write offset %d\n", offset);
break;
qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%02x\n",
__func__, offset);
return;
}
mcf_intc_update(s);
}