Add netbsd32_vm_default_addr() and MAXDSIZ32/MAXSSIZ32. (Spotted

by Havard Eidnes).
This commit is contained in:
scw 2005-04-13 09:35:46 +00:00
parent 1cc2a2688d
commit 6f90190b50
2 changed files with 21 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: vmparam.h,v 1.9 2004/03/17 20:23:28 scw Exp $ */
/* $NetBSD: vmparam.h,v 1.10 2005/04/13 09:35:46 scw Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@ -123,9 +123,15 @@
#ifndef MAXDSIZ
#define MAXDSIZ (512 * 1024 * 1024) /* max data size */
#endif
#ifndef MAXDSIZ32
#define MAXDSIZ32 MAXDSIZ
#endif
#ifndef MAXSSIZ
#define MAXSSIZ (32 * 1024 * 1024) /* max stack size */
#endif
#ifndef MAXSSIZ32
#define MAXSSIZ32 MAXSSIZ
#endif
/* initial data size limit */
#ifndef DFLDSIZ

View File

@ -1,4 +1,4 @@
/* $NetBSD: netbsd32_machdep.c,v 1.5 2004/03/17 20:23:28 scw Exp $ */
/* $NetBSD: netbsd32_machdep.c,v 1.6 2005/04/13 09:35:46 scw Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.5 2004/03/17 20:23:28 scw Exp $");
__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.6 2005/04/13 09:35:46 scw Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@ -54,6 +54,8 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.5 2004/03/17 20:23:28 scw Exp
#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <uvm/uvm_param.h>
#include <net/if.h>
#include <net/route.h>
@ -69,6 +71,9 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.5 2004/03/17 20:23:28 scw Exp
#include <machine/cpu.h>
#include <machine/reg.h>
#include <machine/vmparam.h>
#include <machine/netbsd32_machdep.h>
#include <sh5/fpu.h>
@ -176,3 +181,10 @@ netbsd32_setregs(struct lwp *l, struct exec_package *pack, u_long stack)
sh5_fprestore(SH5_CONREG_USR_FPRS_MASK << SH5_CONREG_USR_FPRS_SHIFT,
&l->l_addr->u_pcb);
}
vaddr_t
netbsd32_vm_default_addr(struct proc *p, vaddr_t base, vsize_t size)
{
return round_page((vaddr_t)(base) + (vsize_t)MAXDSIZ32);
}