summaryrefslogtreecommitdiffstats
path: root/sys/ia64
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2004-08-11 05:29:13 +0000
committermarcel <marcel@FreeBSD.org>2004-08-11 05:29:13 +0000
commita1d07a8a1f4d899c70ba48fbb961e540b2cb2935 (patch)
treec6d25c41b2c69b8fb1f70c77dd8bf270c34e59a1 /sys/ia64
parente75d1032160e660ede4dede6a3a5141049fdfd48 (diff)
downloadFreeBSD-src-a1d07a8a1f4d899c70ba48fbb961e540b2cb2935.zip
FreeBSD-src-a1d07a8a1f4d899c70ba48fbb961e540b2cb2935.tar.gz
In set_regs(), flush the dirty registers onto the backingstore before
we update the registers. That way we don't have any dirty registers to worry about and also know that bsp=bspstore, which makes updating the RSE related registers predictable. This is not the end of it. We need more validity checks, but for now this allows us to complete the gdb testsuite without crashing the kernel.
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/ia64/machdep.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c
index 45cd022..2925385 100644
--- a/sys/ia64/ia64/machdep.c
+++ b/sys/ia64/ia64/machdep.c
@@ -1305,7 +1305,10 @@ set_regs(struct thread *td, struct reg *regs)
struct trapframe *tf;
tf = td->td_frame;
+ ia64_flush_dirty(td, &tf->tf_special);
tf->tf_special = regs->r_special;
+ tf->tf_special.bspstore += tf->tf_special.ndirty;
+ tf->tf_special.ndirty = 0;
tf->tf_scratch = regs->r_scratch;
restore_callee_saved(&regs->r_preserved);
return (0);
OpenPOWER on IntegriCloud