aboutsummaryrefslogtreecommitdiff
path: root/target/xtensa/helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/xtensa/helper.c')
-rw-r--r--target/xtensa/helper.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/target/xtensa/helper.c b/target/xtensa/helper.c
index 768b32c417..c67d715c4b 100644
--- a/target/xtensa/helper.c
+++ b/target/xtensa/helper.c
@@ -728,3 +728,16 @@ void dump_mmu(FILE *f, fprintf_function cpu_fprintf, CPUXtensaState *env)
cpu_fprintf(f, "No TLB for this CPU core\n");
}
}
+
+void xtensa_runstall(CPUXtensaState *env, bool runstall)
+{
+ CPUState *cpu = CPU(xtensa_env_get_cpu(env));
+
+ env->runstall = runstall;
+ cpu->halted = runstall;
+ if (runstall) {
+ cpu_interrupt(cpu, CPU_INTERRUPT_HALT);
+ } else {
+ cpu_reset_interrupt(cpu, CPU_INTERRUPT_HALT);
+ }
+}