summaryrefslogtreecommitdiff
path: root/target-sparc/cpu.h
diff options
context:
space:
mode:
authorIgor V. Kovalenko <igor.v.kovalenko@gmail.com>2010-01-07 23:28:31 +0300
committerBlue Swirl <blauwirbel@gmail.com>2010-01-08 17:25:13 +0000
commitcd682d2eedfbd5409fabe57fb6940f3a2f1ac45c (patch)
tree75eef4cbe9034f96b98c176db0e8eeb03923f652 /target-sparc/cpu.h
parent18d43b4836a89113cf3dd1f4a68a271a7e3547ea (diff)
downloadqemu-cd682d2eedfbd5409fabe57fb6940f3a2f1ac45c.tar.gz
qemu-cd682d2eedfbd5409fabe57fb6940f3a2f1ac45c.tar.bz2
qemu-cd682d2eedfbd5409fabe57fb6940f3a2f1ac45c.zip
sparc64: interrupt trap handling
cpu_check_irqs - handle SOFTINT register TICK and STICK timer bits - only check interrupt levels greater than PIL value - handle preemption by higher level traps cpu_exec - handle CPU_INTERRUPT_HARD only if interrupts are enabled - PIL 15 is not special level on sparcv9 Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'target-sparc/cpu.h')
-rw-r--r--target-sparc/cpu.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h
index e5b282d391..50859c7f1f 100644
--- a/target-sparc/cpu.h
+++ b/target-sparc/cpu.h
@@ -577,6 +577,16 @@ static inline int cpu_interrupts_enabled(CPUState *env1)
return 0;
}
+static inline int cpu_pil_allowed(CPUState *env1, int pil)
+{
+#if !defined(TARGET_SPARC64)
+ /* level 15 is non-maskable on sparc v8 */
+ return pil == 15 || pil > env1->psrpil;
+#else
+ return pil > env1->psrpil;
+#endif
+}
+
static inline int cpu_fpu_enabled(CPUState *env1)
{
#if defined(CONFIG_USER_ONLY)