Please find below a patch that "works". It is probably wrong as I wrote it
by copying code from other architectures and trying until it works. Well
I am however convinced of two things:
- "return EXCP_HALTED;" causes the crash. By removing this line qemu
doesn't crash anymore, but the patch does not work as expected
(freeze of the target).
- The interrupt should be cleared, if not the target freeze.
Now the host CPU is not used at 100% when the Sparc target is idle. I am
using it for about one our with a Debian unstable, and I am writing this
mail from this emulated system.