summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/aim/vm_machdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/powerpc/aim/vm_machdep.c')
-rw-r--r--sys/powerpc/aim/vm_machdep.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/powerpc/aim/vm_machdep.c b/sys/powerpc/aim/vm_machdep.c
index 1ca7350..12aeaf2 100644
--- a/sys/powerpc/aim/vm_machdep.c
+++ b/sys/powerpc/aim/vm_machdep.c
@@ -85,6 +85,7 @@
#include <machine/clock.h>
#include <machine/cpu.h>
#include <machine/fpu.h>
+#include <machine/frame.h>
#include <machine/md_var.h>
#include <dev/ofw/openfirm.h>
@@ -151,7 +152,10 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags)
tf = (struct trapframe *)pcb - 1;
bcopy(td1->td_frame, tf, sizeof(*tf));
- /* XXX: Set up trap frame? */
+ /* Set up trap frame. */
+ tf->fixreg[FIRSTARG] = 0;
+ tf->fixreg[FIRSTARG + 1] = 0;
+ tf->cr &= ~0x10000000;
td2->td_frame = tf;
OpenPOWER on IntegriCloud