summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2004-05-07 05:29:12 +0000
committermarcel <marcel@FreeBSD.org>2004-05-07 05:29:12 +0000
commit254a0ce34ef95d879069eb07b8cb558f6650d477 (patch)
treef6094005b6beff37ee616e3b60c54a5b2fb67aa4
parent055815ed7e46944882d8d61591fbbd5d1e390a84 (diff)
downloadFreeBSD-src-254a0ce34ef95d879069eb07b8cb558f6650d477.zip
FreeBSD-src-254a0ce34ef95d879069eb07b8cb558f6650d477.tar.gz
Make sure to sanitize the FP status register. Specifically this
masks all FP traps, which should not happen in the kernel.
-rw-r--r--sys/ia64/ia64/interrupt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/ia64/ia64/interrupt.c b/sys/ia64/ia64/interrupt.c
index c6b0cdb..1b63841 100644
--- a/sys/ia64/ia64/interrupt.c
+++ b/sys/ia64/ia64/interrupt.c
@@ -52,6 +52,7 @@
#include <machine/clock.h>
#include <machine/cpu.h>
+#include <machine/fpu.h>
#include <machine/frame.h>
#include <machine/intr.h>
#include <machine/md_var.h>
@@ -132,6 +133,8 @@ interrupt(u_int64_t vector, struct trapframe *tf)
int64_t delta;
int count;
+ ia64_set_fpsr(IA64_FPSR_DEFAULT);
+
td = curthread;
atomic_add_int(&td->td_intr_nesting_level, 1);
OpenPOWER on IntegriCloud