Fix some of the problems Bruce observed with this code.

This commit is contained in:
Peter Wemm 2005-05-22 23:28:17 +00:00
parent c95cbf7ec7
commit ea5d76835f
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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