diff options
Diffstat (limited to 'hw/xtensa_pic.c')
-rw-r--r-- | hw/xtensa_pic.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/xtensa_pic.c b/hw/xtensa_pic.c index e5085ea9e7..93e28fd04b 100644 --- a/hw/xtensa_pic.c +++ b/hw/xtensa_pic.c @@ -157,3 +157,15 @@ void xtensa_irq_init(CPUState *env) qemu_new_timer_ns(vm_clock, &xtensa_ccompare_cb, env); } } + +void *xtensa_get_extint(CPUState *env, unsigned extint) +{ + if (extint < env->config->nextint) { + unsigned irq = env->config->extint[extint]; + return env->irq_inputs[irq]; + } else { + qemu_log("%s: trying to acquire invalid external interrupt %d\n", + __func__, extint); + return NULL; + } +} |