Reserve an extra 16 bytes in case we have to grow the trapframe into

a vm86trapframe for switching to vm86 [unlikely] while exiting.
I lost this when doing the pcb move that went in with the KSE commit.

Reviewed by: jake
This commit is contained in:
Peter Wemm 2001-09-19 05:44:12 +00:00
parent 2f01a0c097
commit e5a860ebb4
2 changed files with 4 additions and 2 deletions

View File

@ -169,8 +169,9 @@ cpu_fork(td1, p2, flags)
* Create a new fresh stack for the new process.
* Copy the trap frame for the return to user mode as if from a
* syscall. This copies most of the user mode register values.
* The -16 is so we can expand the trapframe if we go to vm86.
*/
td2->td_frame = (struct trapframe *)td2->td_pcb - 1;
td2->td_frame = (struct trapframe *)((caddr_t)td2->td_pcb - 16) - 1;
bcopy(td1->td_frame, td2->td_frame, sizeof(struct trapframe));
td2->td_frame->tf_eax = 0; /* Child returns zero */

View File

@ -169,8 +169,9 @@ cpu_fork(td1, p2, flags)
* Create a new fresh stack for the new process.
* Copy the trap frame for the return to user mode as if from a
* syscall. This copies most of the user mode register values.
* The -16 is so we can expand the trapframe if we go to vm86.
*/
td2->td_frame = (struct trapframe *)td2->td_pcb - 1;
td2->td_frame = (struct trapframe *)((caddr_t)td2->td_pcb - 16) - 1;
bcopy(td1->td_frame, td2->td_frame, sizeof(struct trapframe));
td2->td_frame->tf_eax = 0; /* Child returns zero */