aboutsummaryrefslogtreecommitdiff
path: root/target/xtensa/cpu.c
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2016-12-13 18:52:08 -0800
committerMax Filippov <jcmvbkbc@gmail.com>2017-01-15 13:01:55 -0800
commitbd527a83232ce8b48dac4b8c86607ad8a7e28d98 (patch)
tree6650120264bc9b01d6034e5ae017de2809d8ee99 /target/xtensa/cpu.c
parent17ab14acd488289d2f85ad6212b212c21f050b3d (diff)
target/xtensa: implement RUNSTALL
RUNSTALL signal stalls core execution while it's applied. It is widely used in multicore configurations to control activity of additional cores. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'target/xtensa/cpu.c')
-rw-r--r--target/xtensa/cpu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c
index 09b53c76d4..1c18892fca 100644
--- a/target/xtensa/cpu.c
+++ b/target/xtensa/cpu.c
@@ -47,7 +47,7 @@ static bool xtensa_cpu_has_work(CPUState *cs)
{
XtensaCPU *cpu = XTENSA_CPU(cs);
- return cpu->env.pending_irq_level;
+ return !cpu->env.runstall && cpu->env.pending_irq_level;
}
/* CPUClass::reset() */
@@ -74,6 +74,7 @@ static void xtensa_cpu_reset(CPUState *s)
env->pending_irq_level = 0;
reset_mmu(env);
+ s->halted = env->runstall;
}
static ObjectClass *xtensa_cpu_class_by_name(const char *cpu_model)