diff options
| author | John Polstra <jdp@FreeBSD.org> | 1999-04-03 22:20:03 +0000 |
|---|---|---|
| committer | John Polstra <jdp@FreeBSD.org> | 1999-04-03 22:20:03 +0000 |
| commit | 4fe88fe6374ee0fd17b670ac28b16cf1c9790832 (patch) | |
| tree | 5b4ed45beb8ec42a9c55acd2090f5d8e83899f8a /sys/amd64 | |
| parent | 90aba8be4e9804f1028e3e1c8a93dfd872e35219 (diff) | |
Notes
Diffstat (limited to 'sys/amd64')
| -rw-r--r-- | sys/amd64/amd64/machdep.c | 8 | ||||
| -rw-r--r-- | sys/amd64/include/reg.h | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 41584f514cf7e..6ed318243bee5 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.326 1999/02/13 17:45:15 bde Exp $ + * $Id: machdep.c,v 1.327 1999/03/06 04:46:18 wollman Exp $ */ #include "apm.h" @@ -806,10 +806,11 @@ cpu_halt(void) * Clear registers on exec */ void -setregs(p, entry, stack) +setregs(p, entry, stack, ps_strings) struct proc *p; u_long entry; u_long stack; + u_long ps_strings; { struct trapframe *regs = p->p_md.md_regs; struct pcb *pcb = &p->p_addr->u_pcb; @@ -836,6 +837,9 @@ setregs(p, entry, stack) regs->tf_es = _udatasel; regs->tf_cs = _ucodesel; + /* PS_STRINGS value for BSD/OS binaries. It is 0 for non-BSD/OS. */ + regs->tf_ebx = ps_strings; + /* reset %fs and %gs as well */ pcb->pcb_fs = _udatasel; pcb->pcb_gs = _udatasel; diff --git a/sys/amd64/include/reg.h b/sys/amd64/include/reg.h index 3e97fc1aa6fc0..28466a838bc8a 100644 --- a/sys/amd64/include/reg.h +++ b/sys/amd64/include/reg.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)reg.h 5.5 (Berkeley) 1/18/91 - * $Id: reg.h,v 1.15 1997/06/07 04:36:06 bde Exp $ + * $Id: reg.h,v 1.16 1998/09/14 22:43:40 jdp Exp $ */ #ifndef _MACHINE_REG_H_ @@ -124,7 +124,7 @@ struct fpreg { */ int set_fpregs __P((struct proc *, struct fpreg *)); int set_regs __P((struct proc *p, struct reg *regs)); -void setregs __P((struct proc *, u_long, u_long)); +void setregs __P((struct proc *, u_long, u_long, u_long)); #endif #endif /* !_MACHINE_REG_H_ */ |
