> What device is the interrupt handler for? Sometimes you can get
> this behaviour in QEMU for timer interrupts if the guest code
> programs the timer for a fast interrupt rate that is faster
> than QEMU's emulation speed can handle.
The interrupt handler is for a real time clock device and the interrupt
number is 5. I trim the gptm code for stellaris because the firmware
image only need real time clock for now. I set up a qemu_log_mask
right before the device use qemu_set_irq to raise an interrupt. And
from the log, the qemu_set_irq is triggered only once. I guess fast
interrupt rate would not affect in this case, since it is not
continuously triggering an interrupt.
And from the log in previous email, I assume the interrupt has been
cleared during exit, because the IABR (interrupt active bit register)
is cleared after exit. I am confused about why ISPR (interrupt set
pending register) is set after exception exit. The proper behavior shall
not include this.
> If you're dealing with interrupt numbers larger than 32 you'll
> need the bug fix in master in commit 12fbf1a1639ed91, which
> fixed problems with ISPR for larger interrupt numbers.
The interrupt number is 5, so I guess it is not for this reason.
> Especially if you're stepping in gdb this can happen for timers,
> because the timer will expire while you're stopped in gdb, and
> then fire as soon as you let QEMU run.
As I mentioned above, the qemu_set_irq is trigger once. I donot
understand why the execution flow keep going into 'Taking exception5'
after it 'Taking exception 8 [QEMU v7M exception exit]' for multiple times.
I am using qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL), so the
timer should stop counting when I stop in gdb if I am understanding
correctly.
Thank you! I am looking forward to your reply.
Ruide Zhang