use ubc_winshift instead of ubc_winsize in pmaps to set up kernel

virtual space.  the latter isn't initialized yet when the value is needed.
fixes PR 12440.
This commit is contained in:
chs 2001-03-21 03:16:05 +00:00
parent af58b235e0
commit 11fe9ca446
3 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.157 2001/03/15 06:10:33 chs Exp $ */
/* $NetBSD: pmap.c,v 1.158 2001/03/21 03:16:05 chs Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@ -154,7 +154,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.157 2001/03/15 06:10:33 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.158 2001/03/21 03:16:05 chs Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -811,7 +811,7 @@ pmap_bootstrap(paddr_t ptaddr, u_int maxasn, u_long ncpuids)
* Figure out how many PTE's are necessary to map the kernel.
* We also reserve space for kmem_alloc_pageable() for vm_fork().
*/
lev3mapsize = (VM_PHYS_SIZE + ubc_nwins * ubc_winsize +
lev3mapsize = (VM_PHYS_SIZE + (ubc_nwins << ubc_winshift) +
nbuf * MAXBSIZE + 16 * NCARGS + PAGER_MAP_SIZE) / NBPG +
(maxproc * UPAGES) + nkmempages;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.118 2001/03/15 06:10:43 chs Exp $ */
/* $NetBSD: pmap.c,v 1.119 2001/03/21 03:16:06 chs Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -78,7 +78,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.118 2001/03/15 06:10:43 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.119 2001/03/21 03:16:06 chs Exp $");
/*
* Manages physical address maps.
@ -267,7 +267,7 @@ pmap_bootstrap()
* Figure out how many PTE's are necessary to map the kernel.
* We also reserve space for kmem_alloc_pageable() for vm_fork().
*/
Sysmapsize = (VM_PHYS_SIZE + ubc_nwins * ubc_winsize +
Sysmapsize = (VM_PHYS_SIZE + (ubc_nwins << ubc_winshift) +
nbuf * MAXBSIZE + 16 * NCARGS + PAGER_MAP_SIZE) / NBPG +
(maxproc * UPAGES) + nkmempages;

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_param.h,v 1.6 2001/03/15 06:10:58 chs Exp $ */
/* $NetBSD: uvm_param.h,v 1.7 2001/03/21 03:16:06 chs Exp $ */
/*
* Copyright (c) 1991, 1993
@ -145,7 +145,7 @@ typedef int boolean_t;
extern psize_t mem_size; /* size of physical memory (bytes) */
extern int ubc_nwins; /* number of UBC mapping windows */
extern int ubc_winsize; /* size of a UBC mapping window */
extern int ubc_winshift; /* shift for a UBC mapping window */
#else
/* out-of-kernel versions of round_page and trunc_page */