Enable USE_TOPDOWN_VM. This also makes it possible to use large address

spaces, so bump MAXDSIZ to 1GB.
This commit is contained in:
ragge 2003-02-26 21:54:35 +00:00
parent d67d6bee01
commit 21d5b938d7
4 changed files with 36 additions and 7 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC,v 1.109 2002/11/22 12:21:06 wiz Exp $
# $NetBSD: GENERIC,v 1.110 2003/02/26 21:54:38 ragge Exp $
#
# GENERIC machine description file
#
@ -22,7 +22,7 @@ include "arch/vax/conf/std.vax"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "GENERIC-$Revision: 1.109 $"
#ident "GENERIC-$Revision: 1.110 $"
# Here are all different supported CPU types listed.
#options VAX8800 # VAX 8500, 8530, 8550, 8700, 8800
@ -54,6 +54,7 @@ options KTRACE
options SYSTRACE # system call vetting via systrace(1)
#options DIAGNOSTIC
#options DEBUG,KMEMSTATS,PMAPDEBUG,TRAPDEBUG,LOCKDEBUG
options USE_TOPDOWN_VM # gives larger address space
options SCSIVERBOSE # Verbose SCSI errors

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.h,v 1.56 2002/09/22 07:53:51 chs Exp $ */
/* $NetBSD: pmap.h,v 1.57 2003/02/26 21:54:38 ragge Exp $ */
/*
* Copyright (c) 1987 Carnegie-Mellon University
@ -55,7 +55,11 @@
*/
#define LTOHPS (PGSHIFT - VAX_PGSHIFT)
#define LTOHPN (1 << LTOHPS)
#if USE_TOPDOWN_VM==0
#define PROCPTSIZE ((MAXTSIZ + MAXDSIZ + MAXSSIZ) / VAX_NBPG)
#else
#define PROCPTSIZE ((MAXTSIZ + MAXDSIZ + MAXSSIZ + MMAPSPACE) / VAX_NBPG)
#endif
#define NPTEPGS (PROCPTSIZE / (NBPG / (sizeof(struct pte) * LTOHPN)))
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: vmparam.h,v 1.39 2002/12/10 05:14:36 thorpej Exp $ */
/* $NetBSD: vmparam.h,v 1.40 2003/02/26 21:54:37 ragge Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -68,12 +68,21 @@
#ifndef MAXTSIZ
#define MAXTSIZ (8*1024*1024) /* max text size */
#endif
#if USE_TOPDOWN_VM==1
#ifndef DFLDSIZ
#define DFLDSIZ (128*1024*1024) /* initial data size limit */
#endif
#ifndef MAXDSIZ
#define MAXDSIZ (1024*1024*1024) /* max data size */
#endif
#else
#ifndef DFLDSIZ
#define DFLDSIZ (32*1024*1024) /* initial data size limit */
#endif
#ifndef MAXDSIZ
#define MAXDSIZ (64*1024*1024) /* max data size */
#endif
#endif
#ifndef DFLSSIZ
#define DFLSSIZ (512*1024) /* initial stack size limit */
#endif
@ -81,6 +90,7 @@
#define MAXSSIZ (8*1024*1024) /* max stack size */
#endif
#ifndef USE_TOPDOWN_VM
/*
* All mmap()'ed data will be mapped above MAXDSIZ. This means that
* pte space must be allocated for (possible) mmap()'ed data.
@ -88,6 +98,7 @@
* table will be expanded. (at the cost of speed).
*/
#define MMAPSPACE (8*1024*1024)
#endif
/*
* Size of shared memory map
@ -119,6 +130,15 @@
#define VM_MIN_KERNEL_ADDRESS ((vaddr_t)KERNBASE)
#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)(0xC0000000))
/*
* The address to which unspecified mapping requests default
*/
#define __HAVE_TOPDOWN_VM
#ifdef USE_TOPDOWN_VM
#define VM_DEFAULT_ADDRESS(da, sz) \
trunc_page(VM_MAXUSER_ADDRESS - MAXSSIZ - (sz))
#endif
#define USRIOSIZE (8 * VAX_NPTEPG) /* 512MB */
#define VM_PHYS_SIZE (USRIOSIZE*VAX_NBPG)

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.122 2003/02/02 01:50:04 erh Exp $ */
/* $NetBSD: pmap.c,v 1.123 2003/02/26 21:54:35 ragge Exp $ */
/*
* Copyright (c) 1994, 1998, 1999 Ludd, University of Lule}, Sweden.
* All rights reserved.
@ -235,7 +235,11 @@ pmap_bootstrap()
physmem = btoc(avail_end);
#if USE_TOPDOWN_VM==1
usrptsize = (1024*1024*1024)/VAX_NBPG; /* 1GB total VM */
#else
usrptsize = PROCPTSIZE * maxproc;
#endif
if (vax_btop(usrptsize)* PPTESZ > avail_end/20)
usrptsize = (avail_end/(20 * PPTESZ)) * VAX_NBPG;
@ -1610,7 +1614,7 @@ pmap_activate(struct lwp *l)
pmap_t pmap;
struct pcb *pcb;
PMDEBUG(("pmap_activate: p %p\n", p));
PMDEBUG(("pmap_activate: l %p\n", l));
pmap = l->l_proc->p_vmspace->vm_map.pmap;
pcb = &l->l_addr->u_pcb;
@ -1642,7 +1646,7 @@ pmap_deactivate(struct lwp *l)
pmap_t pmap;
struct pcb *pcb;
PMDEBUG(("pmap_deactivate: p %p\n", p));
PMDEBUG(("pmap_deactivate: l %p\n", l));
pmap = p->p_vmspace->vm_map.pmap;
pcb = &l->l_addr->u_pcb;