diff options
author | Max Filippov | 2019-01-28 02:10:27 +0100 |
---|---|---|
committer | Max Filippov | 2019-01-28 20:55:20 +0100 |
commit | 17a86b0e9f64c00f3e438d903d3fa475255630cf (patch) | |
tree | 9a06816bad33baea195d3f55833bb29e2a6e3598 /hw | |
parent | target/xtensa: rearrange access to external interrupts (diff) | |
download | qemu-17a86b0e9f64c00f3e438d903d3fa475255630cf.tar.gz qemu-17a86b0e9f64c00f3e438d903d3fa475255630cf.tar.xz qemu-17a86b0e9f64c00f3e438d903d3fa475255630cf.zip |
target/xtensa: expose core runstall as an IRQ line
Runstall signal looks very much like a level-triggered IRQ line. Provide
xtensa_get_runstall function that returns runstall IRQ.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xtensa/pic_cpu.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/xtensa/pic_cpu.c b/hw/xtensa/pic_cpu.c index 077f4ad53d..a8939f5e58 100644 --- a/hw/xtensa/pic_cpu.c +++ b/hw/xtensa/pic_cpu.c @@ -86,6 +86,12 @@ static void xtensa_ccompare_cb(void *opaque) qemu_set_irq(env->irq_inputs[env->config->timerint[i]], 1); } +static void xtensa_set_runstall(void *opaque, int irq, int active) +{ + CPUXtensaState *env = opaque; + xtensa_runstall(env, active); +} + void xtensa_irq_init(CPUXtensaState *env) { unsigned i; @@ -106,9 +112,15 @@ void xtensa_irq_init(CPUXtensaState *env) env->ext_irq_inputs[i] = env->irq_inputs[irq]; } + env->runstall_irq = qemu_allocate_irq(xtensa_set_runstall, env, 0); } qemu_irq *xtensa_get_extints(CPUXtensaState *env) { return env->ext_irq_inputs; } + +qemu_irq xtensa_get_runstall(CPUXtensaState *env) +{ + return env->runstall_irq; +} |