diff --git a/sys/arch/mips/mips/locore_mips1.S b/sys/arch/mips/mips/locore_mips1.S index 4dfa2221c84b..237f535654a5 100644 --- a/sys/arch/mips/mips/locore_mips1.S +++ b/sys/arch/mips/mips/locore_mips1.S @@ -1,4 +1,4 @@ -/* $NetBSD: locore_mips1.S,v 1.54 2002/03/05 16:03:22 simonb Exp $ */ +/* $NetBSD: locore_mips1.S,v 1.55 2002/11/12 14:00:41 nisimura Exp $ */ /* * Copyright (c) 1992, 1993 @@ -1003,6 +1003,7 @@ END(mips1_wbflush) * calls another. */ LEAF(mips1_proc_trampoline) + addu sp, sp, -CALLFRAME_SIZ jal ra, s0 move a0, s1 .set noat diff --git a/sys/arch/mips/mips/mipsX_subr.S b/sys/arch/mips/mips/mipsX_subr.S index 77987938c270..e8c36d0ae2d2 100644 --- a/sys/arch/mips/mips/mipsX_subr.S +++ b/sys/arch/mips/mips/mipsX_subr.S @@ -1,4 +1,4 @@ -/* $NetBSD: mipsX_subr.S,v 1.9 2002/11/08 04:13:13 simonb Exp $ */ +/* $NetBSD: mipsX_subr.S,v 1.10 2002/11/12 14:00:41 nisimura Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -1880,6 +1880,7 @@ END(MIPSX(VCEI)) * and s1 respectively. There is no need register save operation. */ LEAF(MIPSX(proc_trampoline)) + addu sp, sp, -CALLFRAME_SIZ jal ra, s0 move a0, s1 .set noat diff --git a/sys/arch/mips/mips/vm_machdep.c b/sys/arch/mips/mips/vm_machdep.c index 2463f5ca7e05..343dca675e43 100644 --- a/sys/arch/mips/mips/vm_machdep.c +++ b/sys/arch/mips/mips/vm_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.91 2002/11/10 05:29:18 nisimura Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.92 2002/11/12 14:00:42 nisimura Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -45,7 +45,7 @@ #include "opt_ddb.h" #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.91 2002/11/10 05:29:18 nisimura Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.92 2002/11/12 14:00:42 nisimura Exp $"); #include #include @@ -129,7 +129,6 @@ cpu_fork(p1, p2, stack, stacksize, func, arg) memcpy(&p2->p_addr->u_pcb, &p1->p_addr->u_pcb, sizeof(struct pcb)); f = (struct frame *)((caddr_t)p2->p_addr + USPACE) - 1; memcpy(f, p1->p_md.md_regs, sizeof(struct frame)); - memset((caddr_t)f - 24, 0, 24); /* ? required ? */ /* * If specified, give the child a different stack. @@ -146,7 +145,7 @@ cpu_fork(p1, p2, stack, stacksize, func, arg) pcb = &p2->p_addr->u_pcb; pcb->pcb_context[10] = (int)proc_trampoline; /* RA */ - pcb->pcb_context[8] = (int)f - 24; /* SP */ + pcb->pcb_context[8] = (int)f; /* SP */ pcb->pcb_context[0] = (int)func; /* S0 */ pcb->pcb_context[1] = (int)arg; /* S1 */ pcb->pcb_context[11] |= PSL_LOWIPL; /* SR */