diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-04-30 16:42:27 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-04-30 16:42:27 +0000 |
commit | 5819a8104189544edde016b0c80f3c01670f05af (patch) | |
tree | a3d8356de755a02696cff37c65f78360c59f13f6 /sys | |
parent | 7f7de9b0fe9cf406628e7b3601ba2bcb47533b1b (diff) |
Move the zeroing of proc0 u area from cpu_startup to configure.
XXX - is this still necessary?
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sparc/sparc/autoconf.c | 17 | ||||
-rw-r--r-- | sys/arch/sparc/sparc/machdep.c | 12 |
2 files changed, 17 insertions, 12 deletions
diff --git a/sys/arch/sparc/sparc/autoconf.c b/sys/arch/sparc/sparc/autoconf.c index a0075fef890..013938bff48 100644 --- a/sys/arch/sparc/sparc/autoconf.c +++ b/sys/arch/sparc/sparc/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.37 2001/01/29 03:59:05 jason Exp $ */ +/* $OpenBSD: autoconf.c,v 1.38 2001/04/30 16:42:25 art Exp $ */ /* $NetBSD: autoconf.c,v 1.73 1997/07/29 09:41:53 fair Exp $ */ /* @@ -62,6 +62,7 @@ #include <sys/socket.h> #include <sys/malloc.h> #include <sys/queue.h> +#include <sys/user.h> #include <net/if.h> @@ -791,6 +792,8 @@ configure() struct confargs oca; register int node = 0; register char *cp; + int s; + extern struct user *proc0paddr; /* Initialize the mountroot_hook list. */ LIST_INIT(&mrh_list); @@ -885,6 +888,18 @@ configure() setroot(); swapconf(); cold = 0; + + + /* + * Re-zero proc0's user area, to nullify the effect of the + * stack running into it during auto-configuration. + * XXX - should fix stack usage. + */ + s = splhigh(); + bzero(proc0paddr, sizeof(struct user)); + + pmap_redzone(); + splx(s); } /* diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c index 649ba2a7ab7..66dfc239bbe 100644 --- a/sys/arch/sparc/sparc/machdep.c +++ b/sys/arch/sparc/sparc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.52 2000/11/07 11:25:24 art Exp $ */ +/* $OpenBSD: machdep.c,v 1.53 2001/04/30 16:42:26 art Exp $ */ /* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */ /* @@ -378,16 +378,6 @@ cpu_startup() * Configure the system. The cpu code will turn on the cache. */ configure(); - - /* - * Re-zero proc0's user area, to nullify the effect of the - * stack running into it during auto-configuration. - * XXX - should fix stack usage. - * XXX - there's a race here, as interrupts are enabled - */ - bzero(proc0paddr, sizeof(struct user)); - - pmap_redzone(); } /* |