@@ -26,6 +26,7 @@
#include "sysemu/sysemu.h"
#include "qemu/timer.h"
#include "hw/ptimer.h"
+#include "sysemu/watchdog.h"
#define D(x)
@@ -207,7 +208,7 @@ static void watchdog_hit(void *opaque)
qemu_irq_raise(t->nmi);
}
else
- qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
+ watchdog_perform_action();
t->wd_hits++;
}
@@ -30,6 +30,7 @@
#include "hw/sysbus.h"
#include "exec/address-spaces.h"
#include "qemu/bcd.h"
+#include "sysemu/watchdog.h"
#include "m48t59-internal.h"
@@ -158,7 +159,7 @@ static void watchdog_cb (void *opaque)
NVRAM->buffer[0x1FF7] = 0x00;
NVRAM->buffer[0x1FFC] &= ~0x40;
/* May it be a hw CPU Reset instead ? */
- qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
+ watchdog_perform_action();
} else {
qemu_set_irq(NVRAM->IRQ, 1);
qemu_set_irq(NVRAM->IRQ, 0);
@@ -14,6 +14,7 @@
#include "hw/arm/pxa.h"
#include "hw/sysbus.h"
#include "qemu/log.h"
+#include "sysemu/watchdog.h"
#define OSMR0 0x00
#define OSMR1 0x04
@@ -414,7 +415,7 @@ static void pxa2xx_timer_tick(void *opaque)
if (t->num == 3)
if (i->reset3 & 1) {
i->reset3 = 0;
- qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
+ watchdog_perform_action();
}
}