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>
This commit is contained in:
Max Filippov 2016-12-13 18:52:08 -08:00
parent 17ab14acd4
commit bd527a8323
3 changed files with 17 additions and 2 deletions

View file

@ -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);
}
}