diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-04-11 15:13:02 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-04-11 15:13:02 +0000 |
commit | bef26dee917b1ca6458da1eef9420d30abd219f1 (patch) | |
tree | 8d809b8f93a379b9027bcc7fd32993b9667f341d /sys/arch/sparc | |
parent | bbea701b11944be027a03b0ff429be946b532ef1 (diff) |
use MD #define to choose stackgap size per-architecture. on sparc, special
case sun4c/sun4 -- because address space is more constrained
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r-- | sys/arch/sparc/include/vmparam.h | 5 | ||||
-rw-r--r-- | sys/arch/sparc/sparc/machdep.c | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/sys/arch/sparc/include/vmparam.h b/sys/arch/sparc/include/vmparam.h index a8ab4d3540d..dc35ede11e3 100644 --- a/sys/arch/sparc/include/vmparam.h +++ b/sys/arch/sparc/include/vmparam.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmparam.h,v 1.29 2004/11/28 01:36:39 mickey Exp $ */ +/* $OpenBSD: vmparam.h,v 1.30 2005/04/11 15:13:01 deraadt Exp $ */ /* $NetBSD: vmparam.h,v 1.13 1997/07/12 16:20:03 perry Exp $ */ /* @@ -74,6 +74,9 @@ #define MAXSSIZ MAXDSIZ /* max stack size */ #endif +#define STACKGAP_RANDOM 64*1024 +#define STACKGAP_RANDOM_SUN4M 256*1024 + /* * Size of shared memory map */ diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c index 693e6725b00..ec45d7fad67 100644 --- a/sys/arch/sparc/sparc/machdep.c +++ b/sys/arch/sparc/sparc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.104 2005/03/23 17:14:46 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.105 2005/04/11 15:13:01 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */ /* @@ -73,6 +73,7 @@ #include <machine/frame.h> #include <machine/cpu.h> #include <machine/pmap.h> +#include <machine/vmparam.h> #include <machine/oldmon.h> #include <machine/bsd_openprom.h> @@ -169,6 +170,12 @@ cpu_startup() pmapdebug = 0; #endif + if (CPU_ISSUN4M) { + extern int stackgap_random; + + stackgap_random = STACKGAP_RANDOM_SUN4M; + } + /* * fix message buffer mapping, note phys addr of msgbuf is 0 */ |