Move the "XXX re-zero proc0 user area" to the end of configure(), before
interrupts are enabled.
This commit is contained in:
parent
9849eb57f8
commit
0729240c88
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: autoconf.c,v 1.101 1998/09/26 20:15:59 pk Exp $ */
|
/* $NetBSD: autoconf.c,v 1.102 1998/10/06 18:58:09 thorpej Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1996
|
* Copyright (c) 1996
|
||||||
|
@ -63,6 +63,7 @@
|
||||||
#include <sys/malloc.h>
|
#include <sys/malloc.h>
|
||||||
#include <sys/queue.h>
|
#include <sys/queue.h>
|
||||||
#include <sys/msgbuf.h>
|
#include <sys/msgbuf.h>
|
||||||
|
#include <sys/user.h>
|
||||||
|
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
|
|
||||||
|
@ -763,6 +764,7 @@ st_crazymap(n)
|
||||||
void
|
void
|
||||||
configure()
|
configure()
|
||||||
{
|
{
|
||||||
|
extern struct user *proc0paddr; /* XXX see below */
|
||||||
|
|
||||||
/* build the bootpath */
|
/* build the bootpath */
|
||||||
bootpath_build();
|
bootpath_build();
|
||||||
|
@ -808,6 +810,13 @@ configure()
|
||||||
ienab_bis(IE_ALLIE);
|
ienab_bis(IE_ALLIE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* XXX Re-zero proc0's user area, to nullify the effect of the
|
||||||
|
* XXX stack running into it during auto-configuration.
|
||||||
|
* XXX - should fix stack usage.
|
||||||
|
*/
|
||||||
|
bzero(proc0paddr, sizeof(struct user));
|
||||||
|
|
||||||
(void)spl0();
|
(void)spl0();
|
||||||
cold = 0;
|
cold = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: machdep.c,v 1.131 1998/09/30 18:38:57 pk Exp $ */
|
/* $NetBSD: machdep.c,v 1.132 1998/10/06 18:58:09 thorpej Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||||
|
@ -214,7 +214,6 @@ cpu_startup()
|
||||||
#endif
|
#endif
|
||||||
vaddr_t minaddr, maxaddr;
|
vaddr_t minaddr, maxaddr;
|
||||||
vsize_t size;
|
vsize_t size;
|
||||||
extern struct user *proc0paddr;
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
pmapdebug = 0;
|
pmapdebug = 0;
|
||||||
|
@ -397,14 +396,6 @@ cpu_startup()
|
||||||
*/
|
*/
|
||||||
configure();
|
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();
|
pmap_redzone();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: autoconf.c,v 1.8 1998/09/05 23:57:26 eeh Exp $ */
|
/* $NetBSD: autoconf.c,v 1.9 1998/10/06 18:58:09 thorpej Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1996
|
* Copyright (c) 1996
|
||||||
|
@ -64,6 +64,9 @@
|
||||||
#include <sys/malloc.h>
|
#include <sys/malloc.h>
|
||||||
#include <sys/queue.h>
|
#include <sys/queue.h>
|
||||||
#include <sys/msgbuf.h>
|
#include <sys/msgbuf.h>
|
||||||
|
#if 0
|
||||||
|
#include <sys/user.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
|
|
||||||
|
@ -443,6 +446,10 @@ st_crazymap(n)
|
||||||
void
|
void
|
||||||
configure()
|
configure()
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
|
extern struct user *proc0paddr; /* XXX see below */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* build the bootpath */
|
/* build the bootpath */
|
||||||
bootpath_build();
|
bootpath_build();
|
||||||
|
|
||||||
|
@ -462,6 +469,15 @@ configure()
|
||||||
/* Enable device interrupts */
|
/* Enable device interrupts */
|
||||||
setpstate(getpstate()|PSTATE_IE);
|
setpstate(getpstate()|PSTATE_IE);
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
/*
|
||||||
|
* XXX Re-zero proc0's user area, to nullify the effect of the
|
||||||
|
* XXX stack running into it during auto-configuration.
|
||||||
|
* XXX - should fix stack usage.
|
||||||
|
*/
|
||||||
|
bzero(proc0paddr, sizeof(struct user));
|
||||||
|
#endif
|
||||||
|
|
||||||
(void)spl0();
|
(void)spl0();
|
||||||
cold = 0;
|
cold = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: machdep.c,v 1.18 1998/09/22 02:48:44 eeh Exp $ */
|
/* $NetBSD: machdep.c,v 1.19 1998/10/06 18:58:09 thorpej Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||||
|
@ -385,14 +385,6 @@ cpu_startup()
|
||||||
configure();
|
configure();
|
||||||
|
|
||||||
#if 0
|
#if 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.
|
|
||||||
* XXX - there's a race here, as interrupts are enabled
|
|
||||||
*/
|
|
||||||
bzero(proc0paddr, sizeof(struct user));
|
|
||||||
|
|
||||||
pmap_redzone();
|
pmap_redzone();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue