Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/mips Make sure the pcb and initial frame area ...
details: https://anonhg.NetBSD.org/src/rev/dd534de38b74
branches: trunk
changeset: 750082:dd534de38b74
user: matt <matt%NetBSD.org@localhost>
date: Tue Dec 15 18:24:47 2009 +0000
description:
Make sure the pcb and initial frame area of lwp0 are zeroed since these will
be the basis for all future lwps.
diffstat:
sys/arch/mips/mips/mips_machdep.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (30 lines):
diff -r 9ebb5c0eb0c5 -r dd534de38b74 sys/arch/mips/mips/mips_machdep.c
--- a/sys/arch/mips/mips/mips_machdep.c Tue Dec 15 16:31:54 2009 +0000
+++ b/sys/arch/mips/mips/mips_machdep.c Tue Dec 15 18:24:47 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mips_machdep.c,v 1.223 2009/12/14 00:46:06 matt Exp $ */
+/* $NetBSD: mips_machdep.c,v 1.224 2009/12/15 18:24:47 matt Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@@ -112,7 +112,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.223 2009/12/14 00:46:06 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.224 2009/12/15 18:24:47 matt Exp $");
#include "opt_cputype.h"
#include "opt_compat_netbsd32.h"
@@ -1649,6 +1649,11 @@
struct pcb * const pcb0 = lwp_getpcb(&lwp0);
lwp0.l_md.md_regs = (struct frame *)(v + USPACE) - 1;
+ /*
+ * Now zero out the only two areas of the uarea that we care about.
+ */
+ memset(lwp0.l_md.md_regs, 0, sizeof(*lwp0.l_md.md_regs));
+ memset(pcb0, 0, sizeof(*pcb0));
#ifdef _LP64
lwp0.l_md.md_regs->f_regs[_R_SR] = MIPS_SR_KX;
#endif
Home |
Main Index |
Thread Index |
Old Index