note what each of the argument registers in setregs() will be used
for by crt0. Actually clear a1 and a2, because unless a shared loader (i.e. _not_ the kernel) set them when invoking crt0, they should be zero, and the kernel DEBUG code wouldn't necessarily have them be. Pass a pointer to the proc's ps_strings structure in a3.
This commit is contained in:
parent
fa1d4fc6d7
commit
0e3d6291e3
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: machdep.c,v 1.61 1996/12/07 01:54:49 cgd Exp $ */
|
/* $NetBSD: machdep.c,v 1.62 1996/12/07 19:45:14 cgd Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
|
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
|
||||||
|
@ -1388,8 +1388,10 @@ setregs(p, pack, stack, retval)
|
||||||
tfp->tf_regs[FRAME_PS] = ALPHA_PSL_USERSET;
|
tfp->tf_regs[FRAME_PS] = ALPHA_PSL_USERSET;
|
||||||
tfp->tf_regs[FRAME_PC] = pack->ep_entry & ~3;
|
tfp->tf_regs[FRAME_PC] = pack->ep_entry & ~3;
|
||||||
|
|
||||||
tfp->tf_regs[FRAME_A0] = stack;
|
tfp->tf_regs[FRAME_A0] = stack; /* a0 = sp */
|
||||||
/* a1 and a2 already zeroed */
|
tfp->tf_regs[FRAME_A1] = 0; /* a1 = rtld cleanup */
|
||||||
|
tfp->tf_regs[FRAME_A2] = 0; /* a2 = rtld object */
|
||||||
|
tfp->tf_regs[FRAME_A3] = PS_STRINGS; /* a3 = ps_strings */
|
||||||
tfp->tf_regs[FRAME_T12] = tfp->tf_regs[FRAME_PC]; /* a.k.a. PV */
|
tfp->tf_regs[FRAME_T12] = tfp->tf_regs[FRAME_PC]; /* a.k.a. PV */
|
||||||
|
|
||||||
p->p_md.md_flags &= ~MDP_FPUSED;
|
p->p_md.md_flags &= ~MDP_FPUSED;
|
||||||
|
|
Loading…
Reference in New Issue