summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2005-05-22 23:28:17 +0000
committerpeter <peter@FreeBSD.org>2005-05-22 23:28:17 +0000
commit3e0ae7843e94d6770f33550127007e00fe461069 (patch)
tree17710068084ac3cc4a92e7ddd2e060158a775735 /sys
parent0b89469bda3bdf3b47599e8e3be3ce8b08c574e1 (diff)
downloadFreeBSD-src-3e0ae7843e94d6770f33550127007e00fe461069.zip
FreeBSD-src-3e0ae7843e94d6770f33550127007e00fe461069.tar.gz
Fix some of the problems Bruce observed with this code.
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/exception.S5
-rw-r--r--sys/amd64/amd64/trap.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/sys/amd64/amd64/exception.S b/sys/amd64/amd64/exception.S
index 3a0008e..da639de 100644
--- a/sys/amd64/amd64/exception.S
+++ b/sys/amd64/amd64/exception.S
@@ -402,9 +402,9 @@ doreti_iret:
iretq
/*
- * doreti_iret_fault and friends. Alternative return code for
+ * doreti_iret_fault. Alternative return code for
* the case where we get a fault in the doreti_exit code
- * above. trap() (i386/i386/trap.c) catches this specific
+ * above. trap() (amd64/amd64/trap.c) catches this specific
* case, sends the process a signal and continues in the
* corresponding place in the code below.
*/
@@ -435,5 +435,6 @@ doreti_iret_fault:
movq %r15,TF_R15(%rsp)
movq $T_PROTFLT,TF_TRAPNO(%rsp)
movq $0,TF_ERR(%rsp) /* XXX should be the error code */
+ movq $0,TF_ADDR(%rsp)
FAKE_MCOUNT(TF_RIP(%rsp))
jmp calltrap
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index 9820f87..56ab882 100644
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -363,7 +363,7 @@ trap(frame)
/*
* Invalid segment selectors and out of bounds
- * %eip's and %esp's can be set up in user mode.
+ * %rip's and %rsp's can be set up in user mode.
* This causes a fault in kernel mode when the
* kernel tries to return to user mode. We want
* to get this fault so that we can fix the
OpenPOWER on IntegriCloud