summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2003-06-02 21:57:08 +0000
committerPeter Wemm <peter@FreeBSD.org>2003-06-02 21:57:08 +0000
commit1c1061df7ccbaa05c5cac5db94a456f27a687470 (patch)
tree351a6adfcf18649535fc30461e5000ca04a8682e
parent24a1e290905bf0be04b0a2a54479e44eddd475bb (diff)
Notes
-rw-r--r--sys/amd64/amd64/trap.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index 72ba59037804..c4e7f16e991b 100644
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -751,10 +751,14 @@ syscall(frame)
case ERESTART:
/*
- * Reconstruct pc, assuming lcall $X,y is 7 bytes,
- * int 0x80 is 2 bytes. We saved this in tf_err.
+ * Reconstruct pc, we know that 'syscall' is 2 bytes.
+ * We have to do a full context restore so that %r10
+ * (which was holding the value of %rcx) is restored for
+ * the next iteration.
*/
frame.tf_rip -= frame.tf_err;
+ frame.tf_r10 = frame.tf_rcx;
+ td->td_pcb->pcb_flags |= PCB_FULLCTX;
break;
case EJUSTRETURN: