aboutsummaryrefslogtreecommitdiff
path: root/hw/riscv/sifive_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/riscv/sifive_test.c')
-rw-r--r--hw/riscv/sifive_test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/riscv/sifive_test.c b/hw/riscv/sifive_test.c
index afbb3aaf34..3557e16701 100644
--- a/hw/riscv/sifive_test.c
+++ b/hw/riscv/sifive_test.c
@@ -22,6 +22,7 @@
#include "hw/hw.h"
#include "hw/sysbus.h"
#include "qemu/module.h"
+#include "sysemu/runstate.h"
#include "target/riscv/cpu.h"
#include "hw/hw.h"
#include "hw/riscv/sifive_test.h"
@@ -42,6 +43,9 @@ static void sifive_test_write(void *opaque, hwaddr addr,
exit(code);
case FINISHER_PASS:
exit(0);
+ case FINISHER_RESET:
+ qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
+ return;
default:
break;
}