CL* discarding.
This commit is contained in:
parent
d5e85e61cf
commit
0513268399
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_ade.c,v 1.3 1999/05/18 23:52:51 thorpej Exp $ */
|
||||
/* $NetBSD: if_ade.c,v 1.4 1999/12/04 21:19:52 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* NOTE: this version of if_de was modified for bounce buffers prior
|
||||
@ -4188,7 +4188,7 @@ tulip_ifstart(
|
||||
do {
|
||||
int len = m0->m_len;
|
||||
caddr_t addr = mtod(m0, caddr_t);
|
||||
unsigned clsize = CLBYTES - (((u_long) addr) & (CLBYTES-1));
|
||||
unsigned clsize = NBPG - (((u_long) addr) & PGOFSET);
|
||||
|
||||
next_m0 = m0->m_next;
|
||||
while (len > 0) {
|
||||
@ -4256,7 +4256,7 @@ tulip_ifstart(
|
||||
if (partial)
|
||||
continue;
|
||||
#endif
|
||||
clsize = CLBYTES;
|
||||
clsize = NBPG;
|
||||
}
|
||||
} while ((m0 = next_m0) != NULL);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.187 1999/12/03 22:48:22 thorpej Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.188 1999/12/04 21:19:54 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
|
||||
@ -79,7 +79,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.187 1999/12/03 22:48:22 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.188 1999/12/04 21:19:54 ragge Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -935,7 +935,7 @@ cpu_startup()
|
||||
* "base" pages for the rest.
|
||||
*/
|
||||
curbuf = (vaddr_t) buffers + (i * MAXBSIZE);
|
||||
curbufsize = CLBYTES * ((i < residual) ? (base+1) : base);
|
||||
curbufsize = NBPG * ((i < residual) ? (base+1) : base);
|
||||
|
||||
while (curbufsize) {
|
||||
pg = uvm_pagealloc(NULL, 0, NULL, 0);
|
||||
@ -988,7 +988,7 @@ cpu_startup()
|
||||
printf("stolen memory for VM structures = %s\n", pbuf);
|
||||
}
|
||||
#endif
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * CLBYTES);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * NBPG);
|
||||
printf("using %ld buffers containing %s of memory\n", (long)nbuf, pbuf);
|
||||
|
||||
/*
|
||||
@ -1254,7 +1254,7 @@ cpu_dump()
|
||||
|
||||
/*
|
||||
* This is called by main to set dumplo and dumpsize.
|
||||
* Dumps always skip the first CLBYTES of disk space
|
||||
* Dumps always skip the first NBPG of disk space
|
||||
* in case there might be a disk label stored there.
|
||||
* If there is extra space, put dump at the end to
|
||||
* reduce the chance that swapping trashes it.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mem.c,v 1.24 1999/03/24 05:50:51 mrg Exp $ */
|
||||
/* $NetBSD: mem.c,v 1.25 1999/12/04 21:19:56 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.24 1999/03/24 05:50:51 mrg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.25 1999/12/04 21:19:56 ragge Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/buf.h>
|
||||
@ -177,10 +177,10 @@ kmemphys:
|
||||
*/
|
||||
if (zeropage == NULL) {
|
||||
zeropage = (caddr_t)
|
||||
malloc(CLBYTES, M_TEMP, M_WAITOK);
|
||||
bzero(zeropage, CLBYTES);
|
||||
malloc(NBPG, M_TEMP, M_WAITOK);
|
||||
bzero(zeropage, NBPG);
|
||||
}
|
||||
c = min(iov->iov_len, CLBYTES);
|
||||
c = min(iov->iov_len, NBPG);
|
||||
error = uiomove(zeropage, c, uio);
|
||||
break;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: trap.c,v 1.49 1999/05/10 01:27:28 cgd Exp $ */
|
||||
/* $NetBSD: trap.c,v 1.50 1999/12/04 21:19:57 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.49 1999/05/10 01:27:28 cgd Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.50 1999/12/04 21:19:57 ragge Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -474,8 +474,8 @@ trap(a0, a1, a2, entry, framep)
|
||||
if (rv == KERN_SUCCESS) {
|
||||
unsigned nss;
|
||||
|
||||
nss = clrnd(btoc(USRSTACK -
|
||||
(unsigned long)va));
|
||||
nss = btoc(USRSTACK -
|
||||
(unsigned long)va);
|
||||
if (nss > vm->vm_ssize)
|
||||
vm->vm_ssize = nss;
|
||||
} else if (rv == KERN_PROTECTION_FAILURE)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.51 1999/11/13 00:27:21 thorpej Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.52 1999/12/04 21:19:59 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.51 1999/11/13 00:27:21 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.52 1999/12/04 21:19:59 ragge Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -320,7 +320,7 @@ pagemove(from, to, size)
|
||||
long fidx, tidx;
|
||||
ssize_t todo;
|
||||
|
||||
if (size % CLBYTES)
|
||||
if (size % NBPG)
|
||||
panic("pagemove");
|
||||
|
||||
todo = size; /* if testing > 0, need sign... */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.25 1998/11/19 01:42:37 ross Exp $ */
|
||||
/* $NetBSD: param.h,v 1.26 1999/12/04 21:20:00 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -82,10 +82,6 @@
|
||||
#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
|
||||
#endif
|
||||
|
||||
#define CLSIZE 1
|
||||
#define CLSIZELOG2 0
|
||||
|
||||
/* NOTE: SSIZE, SINCR and UPAGES must be multiples of CLSIZE */
|
||||
#define SSIZE 1 /* initial stack size/NBPG */
|
||||
#define SINCR 1 /* increment of stack/NBPG */
|
||||
|
||||
@ -98,7 +94,7 @@
|
||||
|
||||
/*
|
||||
* Constants related to network buffer management.
|
||||
* MCLBYTES must be no larger than CLBYTES (the software page size), and,
|
||||
* MCLBYTES must be no larger than NBPG (the software page size), and,
|
||||
* on machines that exchange pages of input or output buffers with mbuf
|
||||
* clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
|
||||
* of the hardware page size.
|
||||
@ -124,10 +120,10 @@
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Size of kernel malloc arena in CLBYTES-sized logical pages
|
||||
* Size of kernel malloc arena in NBPG-sized logical pages
|
||||
*/
|
||||
#ifndef NKMEMCLUSTERS
|
||||
#define NKMEMCLUSTERS (6 * 1024 * 1024 / CLBYTES)
|
||||
#define NKMEMCLUSTERS (6 * 1024 * 1024 / NBPG)
|
||||
#endif
|
||||
|
||||
/* pages ("clicks") to disk blocks */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.14 1999/03/26 00:15:05 thorpej Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.15 1999/12/04 21:20:00 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -60,7 +60,7 @@
|
||||
* consider doing that at some point, but it might require changes
|
||||
* to the exec code.
|
||||
*/
|
||||
#define USRTEXT CLBYTES
|
||||
#define USRTEXT NBPG
|
||||
#define USRSTACK ((vaddr_t)0x0000000200000000) /* 8G */
|
||||
|
||||
/*
|
||||
@ -126,7 +126,7 @@
|
||||
* by the page replacement algorithm. Basically this says that if you are
|
||||
* swapped in you deserve some resources. We protect the last SAFERSS
|
||||
* pages against paging and will just swap you out rather than paging you.
|
||||
* Note that each process has at least UPAGES+CLSIZE pages which are not
|
||||
* Note that each process has at least UPAGES pages which are not
|
||||
* paged anyways, in addition to SAFERSS.
|
||||
*/
|
||||
#define SAFERSS 10 /* nominal ``small'' resident set size
|
||||
@ -144,8 +144,8 @@
|
||||
#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)ALPHA_K1SEG_END)
|
||||
|
||||
/* virtual sizes (bytes) for various kernel submaps */
|
||||
#define _VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES)
|
||||
#define _VM_PHYS_SIZE (USRIOSIZE*CLBYTES)
|
||||
#define _VM_KMEM_SIZE (NKMEMCLUSTERS*NBPG)
|
||||
#define _VM_PHYS_SIZE (USRIOSIZE*NBPG)
|
||||
|
||||
#ifndef _KERNEL
|
||||
#define VM_KMEM_SIZE _VM_KMEM_SIZE
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.142 1999/11/13 00:30:26 thorpej Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.143 1999/12/04 21:20:01 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -74,7 +74,7 @@
|
||||
#include <sys/core.h>
|
||||
#include <sys/kcore.h>
|
||||
#include <net/netisr.h>
|
||||
#define MAXMEM 64*1024*CLSIZE /* XXX - from cmap.h */
|
||||
#define MAXMEM 64*1024 /* XXX - from cmap.h */
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_param.h>
|
||||
#include <vm/pmap.h>
|
||||
@ -314,7 +314,7 @@ cpu_startup()
|
||||
* "base" pages for the rest.
|
||||
*/
|
||||
curbuf = (vm_offset_t) buffers + (i * MAXBSIZE);
|
||||
curbufsize = CLBYTES * ((i < residual) ? (base+1) : base);
|
||||
curbufsize = NBPG * ((i < residual) ? (base+1) : base);
|
||||
|
||||
while (curbufsize) {
|
||||
pg = uvm_pagealloc(NULL, 0, NULL, 0);
|
||||
@ -360,7 +360,7 @@ cpu_startup()
|
||||
#endif
|
||||
format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
|
||||
printf("avail memory = %s\n", pbuf);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * CLBYTES);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * NBPG);
|
||||
printf("using %d buffers containing %s of memory\n", nbuf, pbuf);
|
||||
|
||||
/*
|
||||
@ -685,11 +685,11 @@ cpu_dumpconf()
|
||||
}
|
||||
--dumplo; /* XXX assume header fits in one block */
|
||||
/*
|
||||
* Don't dump on the first CLBYTES (why CLBYTES?)
|
||||
* Don't dump on the first NBPG (why NBPG?)
|
||||
* in case the dump device includes a disk label.
|
||||
*/
|
||||
if (dumplo < btodb(CLBYTES))
|
||||
dumplo = btodb(CLBYTES);
|
||||
if (dumplo < btodb(NBPG))
|
||||
dumplo = btodb(NBPG);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mem.c,v 1.25 1999/11/13 00:30:26 thorpej Exp $ */
|
||||
/* $NetBSD: mem.c,v 1.26 1999/12/04 21:20:02 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -163,9 +163,9 @@ mmrw(dev, uio, flags)
|
||||
if (uio->uio_rw == UIO_READ) {
|
||||
if (devzeropage == NULL) {
|
||||
devzeropage = (caddr_t)
|
||||
malloc(CLBYTES, M_TEMP,
|
||||
malloc(NBPG, M_TEMP,
|
||||
M_WAITOK);
|
||||
bzero(devzeropage, CLBYTES);
|
||||
bzero(devzeropage, NBPG);
|
||||
}
|
||||
c = min(c, NBPG - (int)v);
|
||||
v = (vm_offset_t) devzeropage;
|
||||
@ -193,10 +193,10 @@ mmrw(dev, uio, flags)
|
||||
}
|
||||
if (devzeropage == NULL) {
|
||||
devzeropage = (caddr_t)
|
||||
malloc(CLBYTES, M_TEMP, M_WAITOK);
|
||||
bzero(devzeropage, CLBYTES);
|
||||
malloc(NBPG, M_TEMP, M_WAITOK);
|
||||
bzero(devzeropage, NBPG);
|
||||
}
|
||||
c = min(iov->iov_len, CLBYTES);
|
||||
c = min(iov->iov_len, NBPG);
|
||||
error = uiomove(devzeropage, c, uio);
|
||||
continue;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.51 1999/11/13 00:30:26 thorpej Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.52 1999/12/04 21:20:03 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -161,7 +161,6 @@ cpu_exit(p)
|
||||
/*
|
||||
* Move pages from one kernel virtual address to another.
|
||||
* Both addresses are assumed to reside in the Sysmap,
|
||||
* and size must be a multiple of CLSIZE.
|
||||
*/
|
||||
void
|
||||
pagemove(from, to, size)
|
||||
@ -172,7 +171,7 @@ pagemove(from, to, size)
|
||||
boolean_t rv;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (size & CLOFSET)
|
||||
if (size & PGOFSET)
|
||||
panic("pagemove");
|
||||
#endif
|
||||
while (size > 0) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fd.c,v 1.40 1998/01/12 10:39:26 thorpej Exp $ */
|
||||
/* $NetBSD: fd.c,v 1.41 1999/12/04 21:20:04 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christian E. Hopps
|
||||
@ -889,10 +889,10 @@ fdsetdisklabel(sc, lp)
|
||||
* make sure selected partition is within bounds
|
||||
* XXX on the second check, its to handle a bug in
|
||||
* XXX the cluster routines as they require mutliples
|
||||
* XXX of CLBYTES currently
|
||||
* XXX of NBPG currently
|
||||
*/
|
||||
if ((pp->p_offset + pp->p_size >= lp->d_secperunit) ||
|
||||
(pp->p_frag * pp->p_fsize % CLBYTES))
|
||||
(pp->p_frag * pp->p_fsize % NBPG))
|
||||
return(EINVAL);
|
||||
done:
|
||||
bcopy(lp, clp, sizeof(struct disklabel));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.37 1997/09/20 12:06:37 leo Exp $ */
|
||||
/* $NetBSD: param.h,v 1.38 1999/12/04 21:20:05 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -68,10 +68,10 @@
|
||||
#define NPTEPG (NBPG/(sizeof (pt_entry_t)))
|
||||
|
||||
/*
|
||||
* Size of kernel malloc arena in CLBYTES-sized logical pages
|
||||
* Size of kernel malloc arena in NBPG-sized logical pages
|
||||
*/
|
||||
#ifndef NKMEMCLUSTERS
|
||||
# define NKMEMCLUSTERS (3072 * 1024 / CLBYTES)
|
||||
# define NKMEMCLUSTERS (3072 * 1024 / NBPG)
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.22 1999/09/25 21:47:02 is Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.23 1999/12/04 21:20:06 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -125,7 +125,7 @@
|
||||
* by the page replacement algorithm. Basically this says that if you are
|
||||
* swapped in you deserve some resources. We protect the last SAFERSS
|
||||
* pages against paging and will just swap you out rather than paging you.
|
||||
* Note that each process has at least UPAGES+CLSIZE pages which are not
|
||||
* Note that each process has at least UPAGES pages which are not
|
||||
* paged anyways (this is currently 8+2=10 pages or 5k bytes), so this
|
||||
* number just means a swapped in process is given around 25k bytes.
|
||||
* Just for fun: current memory prices are 4600$ a megabyte on VAX (4/22/81),
|
||||
@ -152,8 +152,8 @@
|
||||
/*
|
||||
* virtual sizes (bytes) for various kernel submaps
|
||||
*/
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*CLBYTES)
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*NBPG)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*NBPG)
|
||||
|
||||
/*
|
||||
* Our bootloader currently passes up to 16 segments (but this is variable)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.72 1999/11/13 00:30:28 thorpej Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.73 1999/12/04 21:20:07 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994-1998 Mark Brinicombe.
|
||||
@ -418,7 +418,7 @@ cpu_startup()
|
||||
struct vm_page *pg;
|
||||
|
||||
curbuf = (vm_offset_t) buffers + (loop * MAXBSIZE);
|
||||
curbufsize = CLBYTES * ((loop < residual) ? (base+1) : base);
|
||||
curbufsize = NBPG * ((loop < residual) ? (base+1) : base);
|
||||
|
||||
while (curbufsize) {
|
||||
pg = uvm_pagealloc(NULL, 0, NULL, 0);
|
||||
@ -462,7 +462,7 @@ cpu_startup()
|
||||
|
||||
format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
|
||||
printf("avail memory = %s\n", pbuf);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * CLBYTES);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * NBPG);
|
||||
printf("using %d buffers containing %s of memory\n", nbuf, pbuf);
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mem.c,v 1.12 1999/11/13 00:30:28 thorpej Exp $ */
|
||||
/* $NetBSD: mem.c,v 1.13 1999/12/04 21:20:07 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -157,10 +157,10 @@ mmrw(dev, uio, flags)
|
||||
}
|
||||
if (zeropage == NULL) {
|
||||
zeropage = (caddr_t)
|
||||
malloc(CLBYTES, M_TEMP, M_WAITOK);
|
||||
bzero(zeropage, CLBYTES);
|
||||
malloc(NBPG, M_TEMP, M_WAITOK);
|
||||
bzero(zeropage, NBPG);
|
||||
}
|
||||
c = min(iov->iov_len, CLBYTES);
|
||||
c = min(iov->iov_len, NBPG);
|
||||
error = uiomove(zeropage, c, uio);
|
||||
continue;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.46 1999/11/13 00:30:28 thorpej Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.47 1999/12/04 21:20:09 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994-1998 Mark Brinicombe.
|
||||
@ -281,7 +281,7 @@ pagemove(from, to, size)
|
||||
{
|
||||
register pt_entry_t *fpte, *tpte;
|
||||
|
||||
if (size % CLBYTES)
|
||||
if (size % NBPG)
|
||||
panic("pagemove: size=%08x", size);
|
||||
|
||||
#ifdef PMAP_DEBUG
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.15 1999/03/12 23:05:42 perry Exp $ */
|
||||
/* $NetBSD: param.h,v 1.16 1999/12/04 21:20:11 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994,1995 Mark Brinicombe.
|
||||
@ -75,10 +75,6 @@
|
||||
#define BLKDEV_IOSIZE 2048
|
||||
#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
|
||||
|
||||
#define CLSIZELOG2 0
|
||||
#define CLSIZE (1 << CLSIZELOG2)
|
||||
|
||||
/* NOTE: SSIZE, SINCR and UPAGES must be multiples of CLSIZE */
|
||||
#define SSIZE 1 /* initial stack size/NBPG */
|
||||
#define SINCR 1 /* increment of stack/NBPG */
|
||||
#define UPAGES 2 /* pages of u-area */
|
||||
@ -90,7 +86,7 @@
|
||||
|
||||
/*
|
||||
* Constants related to network buffer management.
|
||||
* MCLBYTES must be no larger than CLBYTES (the software page size), and,
|
||||
* MCLBYTES must be no larger than NBPG (the software page size), and,
|
||||
* on machines that exchange pages of input or output buffers with mbuf
|
||||
* clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
|
||||
* of the hardware page size.
|
||||
@ -114,10 +110,10 @@
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Size of kernel malloc arena in CLBYTES-sized logical pages
|
||||
* Size of kernel malloc arena in NBPG-sized logical pages
|
||||
*/
|
||||
#ifndef NKMEMCLUSTERS
|
||||
#define NKMEMCLUSTERS (6 * 1024 * 1024 / CLBYTES)
|
||||
#define NKMEMCLUSTERS (6 * 1024 * 1024 / NBPG)
|
||||
#endif
|
||||
|
||||
/* pages ("clicks") (4096 bytes) to disk blocks */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.15 1999/04/26 22:46:45 thorpej Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.16 1999/12/04 21:20:12 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 The Regents of the University of California.
|
||||
@ -128,8 +128,8 @@
|
||||
|
||||
/* virtual sizes (bytes) for various kernel submaps */
|
||||
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*CLBYTES)
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*NBPG)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*NBPG)
|
||||
|
||||
/*
|
||||
* max number of non-contig chunks of physical RAM you can have
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.88 1999/11/13 00:30:29 thorpej Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.89 1999/12/04 21:20:13 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -72,7 +72,7 @@
|
||||
#include <sys/mount.h>
|
||||
#include <sys/syscallargs.h>
|
||||
#include <net/netisr.h>
|
||||
#define MAXMEM 64*1024*CLSIZE /* XXX - from cmap.h */
|
||||
#define MAXMEM 64*1024 /* XXX - from cmap.h */
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_kern.h>
|
||||
|
||||
@ -234,7 +234,7 @@ cpu_startup()
|
||||
* "base" pages for the rest.
|
||||
*/
|
||||
curbuf = (vaddr_t) buffers + (i * MAXBSIZE);
|
||||
curbufsize = CLBYTES * ((i < residual) ? (base+1) : base);
|
||||
curbufsize = NBPG * ((i < residual) ? (base+1) : base);
|
||||
|
||||
while (curbufsize) {
|
||||
pg = uvm_pagealloc(NULL, 0, NULL, 0);
|
||||
@ -301,7 +301,7 @@ cpu_startup()
|
||||
#endif
|
||||
format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
|
||||
printf("avail memory = %s\n", pbuf);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * CLBYTES);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * NBPG);
|
||||
printf("using %d buffers containing %s of memory\n", nbuf, pbuf);
|
||||
|
||||
/*
|
||||
@ -538,11 +538,11 @@ cpu_dumpconf()
|
||||
dumplo -= cpu_dumpsize();
|
||||
|
||||
/*
|
||||
* Don't dump on the first CLBYTES (why CLBYTES?)
|
||||
* Don't dump on the first NBPG (why NBPG?)
|
||||
* in case the dump device includes a disk label.
|
||||
*/
|
||||
if (dumplo < btodb(CLBYTES))
|
||||
dumplo = btodb(CLBYTES);
|
||||
if (dumplo < btodb(NBPG))
|
||||
dumplo = btodb(NBPG);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mem.c,v 1.16 1999/11/13 00:30:29 thorpej Exp $ */
|
||||
/* $NetBSD: mem.c,v 1.17 1999/12/04 21:20:14 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -183,10 +183,10 @@ mmrw(dev, uio, flags)
|
||||
}
|
||||
if (devzeropage == NULL) {
|
||||
devzeropage = (caddr_t)
|
||||
malloc(CLBYTES, M_TEMP, M_WAITOK);
|
||||
bzero(devzeropage, CLBYTES);
|
||||
malloc(NBPG, M_TEMP, M_WAITOK);
|
||||
bzero(devzeropage, NBPG);
|
||||
}
|
||||
c = min(iov->iov_len, CLBYTES);
|
||||
c = min(iov->iov_len, NBPG);
|
||||
error = uiomove(devzeropage, c, uio);
|
||||
break;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.29 1999/11/13 00:30:30 thorpej Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.30 1999/12/04 21:20:15 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -172,7 +172,7 @@ pagemove(from, to, size)
|
||||
boolean_t rv;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (size & CLOFSET)
|
||||
if (size & PGOFSET)
|
||||
panic("pagemove");
|
||||
#endif
|
||||
while (size > 0) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.25 1997/09/20 12:06:52 leo Exp $ */
|
||||
/* $NetBSD: param.h,v 1.26 1999/12/04 21:20:16 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -68,10 +68,10 @@
|
||||
#define NPTEPG (NBPG/(sizeof (pt_entry_t)))
|
||||
|
||||
/*
|
||||
* Size of kernel malloc arena in CLBYTES-sized logical pages
|
||||
* Size of kernel malloc arena in NBPG-sized logical pages
|
||||
*/
|
||||
#ifndef NKMEMCLUSTERS
|
||||
# define NKMEMCLUSTERS (3072 * 1024 / CLBYTES)
|
||||
# define NKMEMCLUSTERS (3072 * 1024 / NBPG)
|
||||
#endif
|
||||
|
||||
#include <machine/intr.h>
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.10 1999/04/26 22:46:45 thorpej Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.11 1999/12/04 21:20:16 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -124,7 +124,7 @@
|
||||
* by the page replacement algorithm. Basically this says that if you are
|
||||
* swapped in you deserve some resources. We protect the last SAFERSS
|
||||
* pages against paging and will just swap you out rather than paging you.
|
||||
* Note that each process has at least UPAGES+CLSIZE pages which are not
|
||||
* Note that each process has at least UPAGES pages which are not
|
||||
* paged anyways (this is currently 8+2=10 pages or 5k bytes), so this
|
||||
* number just means a swapped in process is given around 25k bytes.
|
||||
* Just for fun: current memory prices are 4600$ a megabyte on VAX (4/22/81),
|
||||
@ -151,8 +151,8 @@
|
||||
/*
|
||||
* virtual sizes (bytes) for various kernel submaps
|
||||
*/
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*CLBYTES)
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*NBPG)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*NBPG)
|
||||
|
||||
/*
|
||||
* Our bootloader currently passes up to 2 segments (ST and TT ram).
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.44 1999/12/03 22:48:23 thorpej Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.45 1999/12/04 21:20:17 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -510,7 +510,7 @@ cpu_startup()
|
||||
* "base" pages for the rest.
|
||||
*/
|
||||
curbuf = (vaddr_t) buffers + (i * MAXBSIZE);
|
||||
curbufsize = CLBYTES * ((i < residual) ? (base+1) : base);
|
||||
curbufsize = NBPG * ((i < residual) ? (base+1) : base);
|
||||
|
||||
while (curbufsize) {
|
||||
pg = uvm_pagealloc(NULL, 0, NULL, 0);
|
||||
@ -553,7 +553,7 @@ cpu_startup()
|
||||
|
||||
format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
|
||||
printf("avail memory = %s\n", pbuf);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * CLBYTES);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * NBPG);
|
||||
printf("using %d buffers containing %s of memory\n", nbuf, pbuf);
|
||||
|
||||
/*
|
||||
@ -754,7 +754,7 @@ long dumplo = -1; /* blocks */
|
||||
|
||||
/*
|
||||
* This is called by main to set dumplo and dumpsize.
|
||||
* Dumps always skip the first CLBYTES of disk space
|
||||
* Dumps always skip the first NBPG of disk space
|
||||
* in case there might be a disk label stored there.
|
||||
* If there is extra space, put dump at the end to
|
||||
* reduce the chance that swapping trashes it.
|
||||
@ -778,7 +778,7 @@ cpu_dumpconf()
|
||||
|
||||
dumpsize = physmem;
|
||||
|
||||
/* Always skip the first CLBYTES, in case there is a label there. */
|
||||
/* Always skip the first NBPG, in case there is a label there. */
|
||||
if (dumplo < ctod(1))
|
||||
dumplo = ctod(1);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.4 1998/09/01 05:55:14 sakamoto Exp $ */
|
||||
/* $NetBSD: param.h,v 1.5 1999/12/04 21:20:18 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -57,9 +57,6 @@
|
||||
#define BLKDEV_IOSIZE NBPG
|
||||
#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
|
||||
|
||||
#define CLSIZELOG2 0
|
||||
#define CLSIZE (1 << CLSIZELOG2)
|
||||
|
||||
#define UPAGES 4
|
||||
#define USPACE (UPAGES * NBPG)
|
||||
|
||||
@ -73,7 +70,7 @@
|
||||
|
||||
/*
|
||||
* Constants related to network buffer management.
|
||||
* MCLBYTES must be no larger than CLBYTES (the software page size), and,
|
||||
* MCLBYTES must be no larger than NBPG (the software page size), and,
|
||||
* on machines that exchange pages of input or output buffers with mbuf
|
||||
* clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
|
||||
* of the hardware page size.
|
||||
@ -99,7 +96,7 @@
|
||||
* Size of kernel malloc arena in CLBYTES-sized logical pages.
|
||||
*/
|
||||
#ifndef NKMEMCLUSTERS
|
||||
#define NKMEMCLUSTERS (128 * 1024 * 1024 / CLBYTES)
|
||||
#define NKMEMCLUSTERS (128 * 1024 * 1024 / NBPG)
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.8 1999/04/16 21:47:11 thorpej Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.9 1999/12/04 21:20:19 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -34,7 +34,7 @@
|
||||
#ifndef _MACHINE_VMPARAM_H_
|
||||
#define _MACHINE_VMPARAM_H_
|
||||
|
||||
#define USRTEXT CLBYTES
|
||||
#define USRTEXT NBPG
|
||||
#define USRSTACK VM_MAXUSER_ADDRESS
|
||||
|
||||
#ifndef MAXTSIZ
|
||||
@ -89,8 +89,8 @@
|
||||
#define VM_MIN_KERNEL_ADDRESS ((vaddr_t)(KERNEL_SR << ADDR_SR_SHFT))
|
||||
#define VM_MAX_KERNEL_ADDRESS (VM_MIN_KERNEL_ADDRESS + SEGMENT_LENGTH - 1)
|
||||
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS * CLBYTES)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE * CLBYTES)
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS * NBPG)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE * NBPG)
|
||||
|
||||
struct pmap_physseg {
|
||||
struct pv_entry *pvent;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.1 1999/09/13 10:30:35 itojun Exp $ */
|
||||
/* $NetBSD: param.h,v 1.2 1999/12/04 21:20:20 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -99,10 +99,6 @@
|
||||
#define BLKDEV_IOSIZE 2048
|
||||
#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
|
||||
|
||||
#define CLSIZELOG2 0
|
||||
#define CLSIZE (1 << CLSIZELOG2)
|
||||
|
||||
/* NOTE: SSIZE, SINCR and UPAGES must be multiples of CLSIZE */
|
||||
#define SSIZE 1 /* initial stack size/NBPG */
|
||||
#define SINCR 1 /* increment of stack/NBPG */
|
||||
#if 0
|
||||
@ -144,7 +140,7 @@
|
||||
* Size of kernel malloc arena in CLBYTES-sized logical pages
|
||||
*/
|
||||
#ifndef NKMEMCLUSTERS
|
||||
#define NKMEMCLUSTERS (6 * 1024 * 1024 / CLBYTES)
|
||||
#define NKMEMCLUSTERS (6 * 1024 * 1024 / NBPG)
|
||||
#endif
|
||||
|
||||
/* pages ("clicks") to disk blocks */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.133 1999/11/13 00:30:31 thorpej Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.134 1999/12/04 21:20:22 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -88,7 +88,7 @@
|
||||
|
||||
#include <dev/cons.h>
|
||||
|
||||
#define MAXMEM 64*1024*CLSIZE /* XXX - from cmap.h */
|
||||
#define MAXMEM 64*1024 /* XXX - from cmap.h */
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_kern.h>
|
||||
|
||||
@ -316,7 +316,7 @@ cpu_startup()
|
||||
* "base" pages for the rest.
|
||||
*/
|
||||
curbuf = (vaddr_t) buffers + (i * MAXBSIZE);
|
||||
curbufsize = CLBYTES * ((i < residual) ? (base+1) : base);
|
||||
curbufsize = NBPG * ((i < residual) ? (base+1) : base);
|
||||
|
||||
while (curbufsize) {
|
||||
pg = uvm_pagealloc(NULL, 0, NULL, 0);
|
||||
@ -363,7 +363,7 @@ cpu_startup()
|
||||
#endif
|
||||
format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
|
||||
printf("avail memory = %s\n", pbuf);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * CLBYTES);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * NBPG);
|
||||
printf("using %d buffers containing %s of memory\n", nbuf, pbuf);
|
||||
|
||||
/*
|
||||
@ -840,7 +840,7 @@ long dumplo = 0; /* blocks */
|
||||
|
||||
/*
|
||||
* This is called by main to set dumplo and dumpsize.
|
||||
* Dumps always skip the first CLBYTES of disk space
|
||||
* Dumps always skip the first NBPG of disk space
|
||||
* in case there might be a disk label stored there.
|
||||
* If there is extra space, put dump at the end to
|
||||
* reduce the chance that swapping trashes it.
|
||||
@ -866,7 +866,7 @@ cpu_dumpconf()
|
||||
|
||||
/*
|
||||
* Check do see if we will fit. Note we always skip the
|
||||
* first CLBYTES in case there is a disk label there.
|
||||
* first NBPG in case there is a disk label there.
|
||||
*/
|
||||
if (nblks < (ctod(dumpsize) + chdrsize + ctod(1))) {
|
||||
dumpsize = 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mem.c,v 1.26 1999/11/13 00:30:32 thorpej Exp $ */
|
||||
/* $NetBSD: mem.c,v 1.27 1999/12/04 21:20:23 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -185,10 +185,10 @@ mmrw(dev, uio, flags)
|
||||
*/
|
||||
if (devzeropage == NULL) {
|
||||
devzeropage = (caddr_t)
|
||||
malloc(CLBYTES, M_TEMP, M_WAITOK);
|
||||
bzero(devzeropage, CLBYTES);
|
||||
malloc(NBPG, M_TEMP, M_WAITOK);
|
||||
bzero(devzeropage, NBPG);
|
||||
}
|
||||
c = min(iov->iov_len, CLBYTES);
|
||||
c = min(iov->iov_len, NBPG);
|
||||
error = uiomove(devzeropage, c, uio);
|
||||
continue;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.52 1999/11/13 00:30:33 thorpej Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.53 1999/12/04 21:20:24 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -224,7 +224,7 @@ pagemove(from, to, size)
|
||||
boolean_t rv;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (size & CLOFSET)
|
||||
if (size & PGOFSET)
|
||||
panic("pagemove");
|
||||
#endif
|
||||
while (size > 0) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.38 1998/06/25 23:57:37 thorpej Exp $ */
|
||||
/* $NetBSD: param.h,v 1.39 1999/12/04 21:20:26 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -70,10 +70,10 @@
|
||||
#define NPTEPG (NBPG/(sizeof (pt_entry_t)))
|
||||
|
||||
/*
|
||||
* Size of kernel malloc arena in CLBYTES-sized logical pages
|
||||
* Size of kernel malloc arena in NBPG-sized logical pages
|
||||
*/
|
||||
#ifndef NKMEMCLUSTERS
|
||||
# define NKMEMCLUSTERS (2048 * 1024 / CLBYTES)
|
||||
# define NKMEMCLUSTERS (2048 * 1024 / NBPG)
|
||||
#endif
|
||||
|
||||
#if defined(_KERNEL) && !defined(_LOCORE)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.18 1999/04/26 22:46:45 thorpej Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.19 1999/12/04 21:20:26 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -148,7 +148,7 @@
|
||||
* by the page replacement algorithm. Basically this says that if you are
|
||||
* swapped in you deserve some resources. We protect the last SAFERSS
|
||||
* pages against paging and will just swap you out rather than paging you.
|
||||
* Note that each process has at least UPAGES+CLSIZE pages which are not
|
||||
* Note that each process has at least UPAGES pages which are not
|
||||
* paged anyways (this is currently 8+2=10 pages or 5k bytes), so this
|
||||
* number just means a swapped in process is given around 25k bytes.
|
||||
* Just for fun: current memory prices are 4600$ a megabyte on VAX (4/22/81),
|
||||
@ -236,8 +236,8 @@
|
||||
#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0xFFFFF000)
|
||||
|
||||
/* virtual sizes (bytes) for various kernel submaps */
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*CLBYTES)
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*NBPG)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*NBPG)
|
||||
|
||||
/* # of kernel PT pages (initial only, can grow dynamically) */
|
||||
#define VM_KERNEL_PT_PAGES ((vsize_t)2) /* XXX: SYSPTSIZE */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.11 1999/12/04 10:55:17 takemura Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.12 1999/12/04 21:20:28 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -43,7 +43,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.11 1999/12/04 10:55:17 takemura Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.12 1999/12/04 21:20:28 ragge Exp $");
|
||||
|
||||
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
|
||||
#include "opt_vr41x1.h"
|
||||
@ -471,7 +471,7 @@ cpu_startup()
|
||||
* "base" pages for the rest.
|
||||
*/
|
||||
curbuf = (vaddr_t)buffers + (i * MAXBSIZE);
|
||||
curbufsize = CLBYTES * ((i < residual) ? (base+1) : base);
|
||||
curbufsize = NBPG * ((i < residual) ? (base+1) : base);
|
||||
|
||||
while (curbufsize) {
|
||||
pg = uvm_pagealloc(NULL, 0, NULL, 0);
|
||||
@ -516,7 +516,7 @@ cpu_startup()
|
||||
#endif
|
||||
format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
|
||||
printf("avail memory = %s\n", pbuf);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * CLBYTES);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * NBPG);
|
||||
printf("using %d buffers containing %s of memory\n", nbuf, pbuf);
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.1.1.1 1999/09/16 12:23:23 takemura Exp $ */
|
||||
/* $NetBSD: param.h,v 1.2 1999/12/04 21:20:28 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -69,12 +69,9 @@
|
||||
#define BLKDEV_IOSIZE 2048
|
||||
#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
|
||||
|
||||
#define CLSIZE 1
|
||||
#define CLSIZELOG2 0
|
||||
|
||||
/*
|
||||
* Constants related to network buffer management.
|
||||
* MCLBYTES must be no larger than CLBYTES (the software page size), and,
|
||||
* MCLBYTES must be no larger than NBPG (the software page size), and,
|
||||
* on machines that exchange pages of input or output buffers with mbuf
|
||||
* clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
|
||||
* of the hardware page size.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.369 1999/12/03 22:48:23 thorpej Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.370 1999/12/04 21:20:29 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||
@ -462,7 +462,7 @@ cpu_startup()
|
||||
*/
|
||||
format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free - bufpages));
|
||||
printf("avail memory = %s\n", pbuf);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * CLBYTES);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * NBPG);
|
||||
printf("using %d buffers containing %s of memory\n", nbuf, pbuf);
|
||||
|
||||
#if NBIOSCALL > 0
|
||||
@ -539,7 +539,7 @@ i386_bufinit()
|
||||
* "base" pages for the rest.
|
||||
*/
|
||||
curbuf = (vaddr_t) buffers + (i * MAXBSIZE);
|
||||
curbufsize = CLBYTES * ((i < residual) ? (base+1) : base);
|
||||
curbufsize = NBPG * ((i < residual) ? (base+1) : base);
|
||||
|
||||
while (curbufsize) {
|
||||
/*
|
||||
@ -1334,7 +1334,7 @@ cpu_dump()
|
||||
|
||||
/*
|
||||
* This is called by main to set dumplo and dumpsize.
|
||||
* Dumps always skip the first CLBYTES of disk space
|
||||
* Dumps always skip the first NBPG of disk space
|
||||
* in case there might be a disk label stored there.
|
||||
* If there is extra space, put dump at the end to
|
||||
* reduce the chance that swapping trashes it.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mem.c,v 1.43 1999/11/13 00:30:34 thorpej Exp $ */
|
||||
/* $NetBSD: mem.c,v 1.44 1999/12/04 21:20:31 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -175,10 +175,10 @@ mmrw(dev, uio, flags)
|
||||
}
|
||||
if (zeropage == NULL) {
|
||||
zeropage = (caddr_t)
|
||||
malloc(CLBYTES, M_TEMP, M_WAITOK);
|
||||
memset(zeropage, 0, CLBYTES);
|
||||
malloc(NBPG, M_TEMP, M_WAITOK);
|
||||
memset(zeropage, 0, NBPG);
|
||||
}
|
||||
c = min(iov->iov_len, CLBYTES);
|
||||
c = min(iov->iov_len, NBPG);
|
||||
error = uiomove(zeropage, c, uio);
|
||||
break;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: trap.c,v 1.133 1999/10/04 17:36:37 fvdl Exp $ */
|
||||
/* $NetBSD: trap.c,v 1.134 1999/12/04 21:20:32 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -470,7 +470,7 @@ trap(frame)
|
||||
if ((caddr_t)va >= vm->vm_maxsaddr
|
||||
&& (caddr_t)va < (caddr_t)VM_MAXUSER_ADDRESS
|
||||
&& map != kernel_map) {
|
||||
nss = clrnd(btoc(USRSTACK-(unsigned)va));
|
||||
nss = btoc(USRSTACK-(unsigned)va);
|
||||
if (nss > btoc(p->p_rlimit[RLIMIT_STACK].rlim_cur)) {
|
||||
/*
|
||||
* We used to fail here. However, it may
|
||||
@ -581,7 +581,7 @@ trapwrite(addr)
|
||||
p = curproc;
|
||||
vm = p->p_vmspace;
|
||||
if ((caddr_t)va >= vm->vm_maxsaddr) {
|
||||
nss = clrnd(btoc(USRSTACK-(unsigned)va));
|
||||
nss = btoc(USRSTACK-(unsigned)va);
|
||||
if (nss > btoc(p->p_rlimit[RLIMIT_STACK].rlim_cur))
|
||||
nss = 0;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.84 1999/11/13 00:30:36 thorpej Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.85 1999/12/04 21:20:33 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995 Charles M. Hannum. All rights reserved.
|
||||
@ -304,8 +304,7 @@ setredzone(pte, vaddr)
|
||||
|
||||
/*
|
||||
* Move pages from one kernel virtual address to another.
|
||||
* Both addresses are assumed to reside in the Sysmap,
|
||||
* and size must be a multiple of CLSIZE.
|
||||
* Both addresses are assumed to reside in the Sysmap.
|
||||
*/
|
||||
void
|
||||
pagemove(from, to, size)
|
||||
@ -314,7 +313,7 @@ pagemove(from, to, size)
|
||||
{
|
||||
register pt_entry_t *fpte, *tpte, ofpte, otpte;
|
||||
|
||||
if (size % CLBYTES)
|
||||
if (size % NBPG)
|
||||
panic("pagemove");
|
||||
fpte = kvtopte(from);
|
||||
tpte = kvtopte(to);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.37 1999/03/10 18:02:22 sommerfe Exp $ */
|
||||
/* $NetBSD: param.h,v 1.38 1999/12/04 21:20:34 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -87,10 +87,6 @@
|
||||
#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
|
||||
#endif
|
||||
|
||||
#define CLSIZELOG2 0
|
||||
#define CLSIZE (1 << CLSIZELOG2)
|
||||
|
||||
/* NOTE: SSIZE, SINCR and UPAGES must be multiples of CLSIZE */
|
||||
#define SSIZE 1 /* initial stack size/NBPG */
|
||||
#define SINCR 1 /* increment of stack/NBPG */
|
||||
#define UPAGES 2 /* pages of u-area */
|
||||
@ -102,7 +98,7 @@
|
||||
|
||||
/*
|
||||
* Constants related to network buffer management.
|
||||
* MCLBYTES must be no larger than CLBYTES (the software page size), and,
|
||||
* MCLBYTES must be no larger than NBPG (the software page size), and,
|
||||
* on machines that exchange pages of input or output buffers with mbuf
|
||||
* clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
|
||||
* of the hardware page size.
|
||||
@ -130,10 +126,10 @@
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Size of kernel malloc arena in CLBYTES-sized logical pages
|
||||
* Size of kernel malloc arena in NBPG-sized logical pages
|
||||
*/
|
||||
#ifndef NKMEMCLUSTERS
|
||||
#define NKMEMCLUSTERS (6 * 1024 * 1024 / CLBYTES)
|
||||
#define NKMEMCLUSTERS (6 * 1024 * 1024 / NBPG)
|
||||
#endif
|
||||
|
||||
/* pages ("clicks") to disk blocks */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.32 1999/06/17 00:12:12 thorpej Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.33 1999/12/04 21:20:34 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -56,7 +56,7 @@
|
||||
* Immediately after the user structure is the page table map, and then
|
||||
* kernal address space.
|
||||
*/
|
||||
#define USRTEXT CLBYTES
|
||||
#define USRTEXT NBPG
|
||||
#define USRSTACK VM_MAXUSER_ADDRESS
|
||||
|
||||
/*
|
||||
@ -143,8 +143,8 @@
|
||||
#endif
|
||||
|
||||
/* virtual sizes (bytes) for various kernel submaps */
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*CLBYTES)
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*NBPG)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*NBPG)
|
||||
|
||||
#define VM_PHYSSEG_MAX 3 /* 1 "hole" + 2 free lists */
|
||||
#define VM_PHYSSEG_STRAT VM_PSTRAT_BIGFIRST
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.5 1998/04/29 23:11:00 thorpej Exp $ */
|
||||
/* $NetBSD: param.h,v 1.6 1999/12/04 21:20:35 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -76,10 +76,6 @@
|
||||
#define BLKDEV_IOSIZE 2048
|
||||
#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
|
||||
|
||||
#define CLSIZELOG2 0
|
||||
#define CLSIZE (1 << CLSIZELOG2)
|
||||
|
||||
/* NOTE: SSIZE, SINCR and UPAGES must be multiples of CLSIZE */
|
||||
#define SSIZE 1 /* initial stack size/NBPG */
|
||||
#define SINCR 1 /* increment of stack/NBPG */
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.34 1997/09/20 12:07:52 leo Exp $ */
|
||||
/* $NetBSD: param.h,v 1.35 1999/12/04 21:20:37 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -104,10 +104,10 @@
|
||||
#define NPTEPG (NBPG/(sizeof (pt_entry_t)))
|
||||
|
||||
/*
|
||||
* Size of kernel malloc arena in CLBYTES-sized logical pages
|
||||
* Size of kernel malloc arena in NBPG-sized logical pages
|
||||
*/
|
||||
#ifndef NKMEMCLUSTERS
|
||||
# define NKMEMCLUSTERS (2048 * 1024 / CLBYTES)
|
||||
# define NKMEMCLUSTERS (2048 * 1024 / NBPG)
|
||||
#endif
|
||||
|
||||
#include <machine/psl.h>
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.22 1999/04/26 22:46:46 thorpej Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.23 1999/12/04 21:20:40 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -163,7 +163,7 @@
|
||||
* by the page replacement algorithm. Basically this says that if you are
|
||||
* swapped in you deserve some resources. We protect the last SAFERSS
|
||||
* pages against paging and will just swap you out rather than paging you.
|
||||
* Note that each process has at least UPAGES+CLSIZE pages which are not
|
||||
* Note that each process has at least UPAGES pages which are not
|
||||
* paged anyways (this is currently 8+2=10 pages or 5k bytes), so this
|
||||
* number just means a swapped in process is given around 25k bytes.
|
||||
* Just for fun: current memory prices are 4600$ a megabyte on VAX (4/22/81),
|
||||
@ -252,8 +252,8 @@
|
||||
#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)(0-NBPG))
|
||||
|
||||
/* virtual sizes (bytes) for various kernel submaps */
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*CLBYTES)
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*NBPG)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*NBPG)
|
||||
|
||||
/* # of kernel PT pages (initial only, can grow dynamically) */
|
||||
#define VM_KERNEL_PT_PAGES ((vsize_t)2) /* XXX: SYSPTSIZE */
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: genassym.cf,v 1.16 1999/10/31 08:19:00 scottr Exp $
|
||||
# $NetBSD: genassym.cf,v 1.17 1999/12/04 21:20:41 ragge Exp $
|
||||
|
||||
#
|
||||
# Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -83,7 +83,6 @@ define FPU_68040 FPU_68040
|
||||
define UPAGES UPAGES
|
||||
define USPACE USPACE
|
||||
define P1PAGES P1PAGES
|
||||
define CLSIZE CLSIZE
|
||||
define NBPG NBPG
|
||||
define NPTEPG NPTEPG
|
||||
define PGSHIFT PGSHIFT
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.239 1999/11/13 00:30:37 thorpej Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.240 1999/12/04 21:20:42 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -119,7 +119,7 @@
|
||||
#include <machine/kcore.h> /* XXX should be pulled in by sys/kcore.h */
|
||||
#include <net/netisr.h>
|
||||
|
||||
#define MAXMEM 64*1024*CLSIZE /* XXX - from cmap.h */
|
||||
#define MAXMEM 64*1024 /* XXX - from cmap.h */
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_kern.h>
|
||||
|
||||
@ -414,7 +414,7 @@ cpu_startup(void)
|
||||
* "base" pages for the rest.
|
||||
*/
|
||||
curbuf = (vaddr_t) buffers + (i * MAXBSIZE);
|
||||
curbufsize = CLBYTES * ((i < residual) ? (base+1) : base);
|
||||
curbufsize = NBPG * ((i < residual) ? (base+1) : base);
|
||||
|
||||
while (curbufsize) {
|
||||
pg = uvm_pagealloc(NULL, 0, NULL, 0);
|
||||
@ -456,7 +456,7 @@ cpu_startup(void)
|
||||
|
||||
format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
|
||||
printf("avail memory = %s\n", pbuf);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * CLBYTES);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * NBPG);
|
||||
printf("using %d buffers containing %s of memory\n", nbuf, pbuf);
|
||||
|
||||
/*
|
||||
@ -745,7 +745,7 @@ long dumplo = 0; /* blocks */
|
||||
|
||||
/*
|
||||
* This is called by main to set dumplo and dumpsize.
|
||||
* Dumps always skip the first CLBYTES of disk space in
|
||||
* Dumps always skip the first NBPG of disk space in
|
||||
* case there might be a disk label stored there. If there
|
||||
* is extra space, put dump at the end to reduce the chance
|
||||
* that swapping trashes it.
|
||||
@ -777,7 +777,7 @@ cpu_dumpconf()
|
||||
|
||||
/*
|
||||
* Check to see if we will fit. Note we always skip the
|
||||
* first CLBYTES in case there is a disk label there.
|
||||
* first NBPG in case there is a disk label there.
|
||||
*/
|
||||
if (nblks < (ctod(dumpsize) + chdrsize + ctod(1))) {
|
||||
dumpsize = 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mem.c,v 1.23 1999/11/13 00:30:37 thorpej Exp $ */
|
||||
/* $NetBSD: mem.c,v 1.24 1999/12/04 21:20:44 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -174,10 +174,10 @@ mmrw(dev, uio, flags)
|
||||
*/
|
||||
if (devzeropage == NULL) {
|
||||
devzeropage = (caddr_t)
|
||||
malloc(CLBYTES, M_TEMP, M_WAITOK);
|
||||
bzero(devzeropage, CLBYTES);
|
||||
malloc(NBPG, M_TEMP, M_WAITOK);
|
||||
bzero(devzeropage, NBPG);
|
||||
}
|
||||
c = min(iov->iov_len, CLBYTES);
|
||||
c = min(iov->iov_len, NBPG);
|
||||
error = uiomove(devzeropage, c, uio);
|
||||
continue;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.43 1999/11/13 00:30:38 thorpej Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.44 1999/12/04 21:20:45 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -222,7 +222,7 @@ pagemove(from, to, size)
|
||||
boolean_t rv;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (size & CLOFSET)
|
||||
if (size & PGOFSET)
|
||||
panic("pagemove");
|
||||
#endif
|
||||
while (size > 0) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.6 1999/10/13 04:01:06 tsubai Exp $ */
|
||||
/* $NetBSD: param.h,v 1.7 1999/12/04 21:20:45 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -57,9 +57,6 @@
|
||||
#define BLKDEV_IOSIZE NBPG
|
||||
#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
|
||||
|
||||
#define CLSIZELOG2 0
|
||||
#define CLSIZE (1 << CLSIZELOG2)
|
||||
|
||||
#define UPAGES 4
|
||||
#define USPACE (UPAGES * NBPG)
|
||||
|
||||
@ -71,7 +68,7 @@
|
||||
|
||||
/*
|
||||
* Constants related to network buffer management.
|
||||
* MCLBYTES must be no larger than CLBYTES (the software page size), and,
|
||||
* MCLBYTES must be no larger than NBPG (the software page size), and,
|
||||
* on machines that exchange pages of input or output buffers with mbuf
|
||||
* clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
|
||||
* of the hardware page size.
|
||||
@ -94,10 +91,10 @@
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Size of kernel malloc arena in CLBYTES-sized logical pages.
|
||||
* Size of kernel malloc arena in NBPG-sized logical pages.
|
||||
*/
|
||||
#ifndef NKMEMCLUSTERS
|
||||
#define NKMEMCLUSTERS (8 * 1024 * 1024 / CLBYTES)
|
||||
#define NKMEMCLUSTERS (8 * 1024 * 1024 / NBPG)
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.9 1999/07/18 17:54:19 tsubai Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.10 1999/12/04 21:20:46 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -34,7 +34,7 @@
|
||||
#ifndef _MACHINE_VMPARAM_H_
|
||||
#define _MACHINE_VMPARAM_H_
|
||||
|
||||
#define USRTEXT CLBYTES
|
||||
#define USRTEXT NBPG
|
||||
#define USRSTACK VM_MAXUSER_ADDRESS
|
||||
|
||||
#ifndef MAXTSIZ
|
||||
@ -94,8 +94,8 @@
|
||||
#define VM_MAX_KERNEL_BUF (SEGMENT_LENGTH * 7 / 10)
|
||||
#endif
|
||||
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS * CLBYTES)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE * CLBYTES)
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS * NBPG)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE * NBPG)
|
||||
|
||||
struct pmap_physseg {
|
||||
struct pv_entry *pvent;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.61 1999/11/22 13:31:44 tsubai Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.62 1999/12/04 21:20:47 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -521,7 +521,7 @@ cpu_startup()
|
||||
struct vm_page *pg;
|
||||
|
||||
curbuf = (vaddr_t)buffers + i * MAXBSIZE;
|
||||
curbufsize = CLBYTES * (i < residual ? base + 1 : base);
|
||||
curbufsize = NBPG * (i < residual ? base + 1 : base);
|
||||
|
||||
while (curbufsize) {
|
||||
pg = uvm_pagealloc(NULL, 0, NULL, 0);
|
||||
@ -564,7 +564,7 @@ cpu_startup()
|
||||
|
||||
format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
|
||||
printf("avail memory = %s\n", pbuf);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * CLBYTES);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * NBPG);
|
||||
printf("using %d buffers containing %s of memory\n", nbuf, pbuf);
|
||||
|
||||
/*
|
||||
|
@ -1,7 +1,6 @@
|
||||
/* $NetBSD: mips_param.h,v 1.14 1999/09/25 00:00:37 shin Exp $ */
|
||||
/* $NetBSD: mips_param.h,v 1.15 1999/12/04 21:20:48 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* NOTE: SSIZE, SINCR and UPAGES must be multiples of CLSIZE.
|
||||
* On mips, UPAGES is fixed by sys/arch/mips/mips/locore code
|
||||
* to be the number of per-process-wired kernel-stack pages/PTES.
|
||||
*/
|
||||
@ -47,10 +46,10 @@
|
||||
#define SEGSHIFT 22 /* LOG2(NBSEG) */
|
||||
|
||||
/*
|
||||
* Size of kernel malloc arena in CLBYTES-sized logical pages
|
||||
* Size of kernel malloc arena in NBPG-sized logical pages
|
||||
*/
|
||||
#ifndef NKMEMCLUSTERS
|
||||
#define NKMEMCLUSTERS (6 * 1024 * 1024 / CLBYTES)
|
||||
#define NKMEMCLUSTERS (6 * 1024 * 1024 / NBPG)
|
||||
#endif
|
||||
|
||||
/* pages ("clicks") (4096 bytes) to disk blocks */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.16 1999/11/29 11:12:12 uch Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.17 1999/12/04 21:20:49 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -107,7 +107,7 @@
|
||||
* by the page replacement algorithm. Basically this says that if you are
|
||||
* swapped in you deserve some resources. We protect the last SAFERSS
|
||||
* pages against paging and will just swap you out rather than paging you.
|
||||
* Note that each process has at least UPAGES+CLSIZE pages which are not
|
||||
* Note that each process has at least UPAGES pages which are not
|
||||
* paged anyways (this is currently 8+2=10 pages or 5k bytes), so this
|
||||
* number just means a swapped in process is given around 25k bytes.
|
||||
* Just for fun: current memory prices are 4600$ a megabyte on VAX (4/22/81),
|
||||
@ -141,8 +141,8 @@
|
||||
#endif
|
||||
|
||||
/* virtual sizes (bytes) for various kernel submaps */
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*CLBYTES)
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*NBPG)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*NBPG)
|
||||
|
||||
/* VM_PHYSSEG_MAX defined by platform-dependent code. */
|
||||
#define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mem.c,v 1.18 1999/03/24 05:51:05 mrg Exp $ */
|
||||
/* $NetBSD: mem.c,v 1.19 1999/12/04 21:20:50 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -148,10 +148,10 @@ mmrw(dev, uio, flags)
|
||||
break;
|
||||
}
|
||||
if (zeropage == NULL) {
|
||||
zeropage = malloc(CLBYTES, M_TEMP, M_WAITOK);
|
||||
memset(zeropage, 0, CLBYTES);
|
||||
zeropage = malloc(NBPG, M_TEMP, M_WAITOK);
|
||||
memset(zeropage, 0, NBPG);
|
||||
}
|
||||
c = min(iov->iov_len, CLBYTES);
|
||||
c = min(iov->iov_len, NBPG);
|
||||
error = uiomove(zeropage, c, uio);
|
||||
continue;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.44 1999/11/18 06:47:49 jun Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.45 1999/12/04 21:20:51 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -43,7 +43,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.44 1999/11/18 06:47:49 jun Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.45 1999/12/04 21:20:51 ragge Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -264,7 +264,7 @@ cpu_coredump(p, vp, cred, chdr)
|
||||
/*
|
||||
* Move pages from one kernel virtual address to another.
|
||||
* Both addresses are assumed to reside in the Sysmap,
|
||||
* and size must be a multiple of CLSIZE.
|
||||
* and size must be a multiple of NBPG.
|
||||
*/
|
||||
void
|
||||
pagemove(from, to, size)
|
||||
@ -273,7 +273,7 @@ pagemove(from, to, size)
|
||||
{
|
||||
pt_entry_t *fpte, *tpte;
|
||||
|
||||
if (size % CLBYTES)
|
||||
if (size % NBPG)
|
||||
panic("pagemove");
|
||||
fpte = kvtopte(from);
|
||||
tpte = kvtopte(to);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.1 1999/09/13 10:30:57 itojun Exp $ */
|
||||
/* $NetBSD: param.h,v 1.2 1999/12/04 21:20:52 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -90,10 +90,6 @@
|
||||
#define BLKDEV_IOSIZE 2048
|
||||
#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
|
||||
|
||||
#define CLSIZELOG2 0
|
||||
#define CLSIZE (1 << CLSIZELOG2)
|
||||
|
||||
/* NOTE: SSIZE, SINCR and UPAGES must be multiples of CLSIZE */
|
||||
#define SSIZE 1 /* initial stack size/NBPG */
|
||||
#define SINCR 1 /* increment of stack/NBPG */
|
||||
#if 0
|
||||
@ -132,10 +128,10 @@
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Size of kernel malloc arena in CLBYTES-sized logical pages
|
||||
* Size of kernel malloc arena in NBPG-sized logical pages
|
||||
*/
|
||||
#ifndef NKMEMCLUSTERS
|
||||
#define NKMEMCLUSTERS (6 * 1024 * 1024 / CLBYTES)
|
||||
#define NKMEMCLUSTERS (6 * 1024 * 1024 / NBPG)
|
||||
#endif
|
||||
|
||||
/* pages ("clicks") to disk blocks */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.17 1999/09/21 18:49:19 scw Exp $ */
|
||||
/* $NetBSD: param.h,v 1.18 1999/12/04 21:20:52 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -65,10 +65,10 @@
|
||||
#define NPTEPG (NBPG/(sizeof (pt_entry_t)))
|
||||
|
||||
/*
|
||||
* Size of kernel malloc arena in CLBYTES-sized logical pages
|
||||
* Size of kernel malloc arena in NBPG-sized logical pages
|
||||
*/
|
||||
#ifndef NKMEMCLUSTERS
|
||||
# define NKMEMCLUSTERS (4096 * 1024 / CLBYTES)
|
||||
# define NKMEMCLUSTERS (4096 * 1024 / NBPG)
|
||||
#endif
|
||||
|
||||
#include <machine/psl.h>
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.11 1999/04/26 22:46:46 thorpej Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.12 1999/12/04 21:20:53 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -226,8 +226,8 @@
|
||||
#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0xFFFFF000)
|
||||
|
||||
/* virtual sizes (bytes) for various kernel submaps */
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*CLBYTES)
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*NBPG)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*NBPG)
|
||||
|
||||
/* # of kernel PT pages (initial only, can grow dynamically) */
|
||||
#define VM_KERNEL_PT_PAGES ((vsize_t)2) /* XXX: SYSPTSIZE */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.60 1999/11/13 00:30:39 thorpej Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.61 1999/12/04 21:20:53 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -90,7 +90,7 @@
|
||||
|
||||
#include <mvme68k/mvme68k/seglist.h>
|
||||
|
||||
#define MAXMEM 64*1024*CLSIZE /* XXX - from cmap.h */
|
||||
#define MAXMEM 64*1024 /* XXX - from cmap.h */
|
||||
|
||||
/* the following is used externally (sysctl_hw) */
|
||||
char machine[] = MACHINE; /* from <machine/param.h> */
|
||||
@ -420,7 +420,7 @@ cpu_startup()
|
||||
* "base" pages for the rest.
|
||||
*/
|
||||
curbuf = (vaddr_t) buffers + (i * MAXBSIZE);
|
||||
curbufsize = CLBYTES * ((i < residual) ? (base+1) : base);
|
||||
curbufsize = NBPG * ((i < residual) ? (base+1) : base);
|
||||
|
||||
while (curbufsize) {
|
||||
pg = uvm_pagealloc(NULL, 0, NULL, 0);
|
||||
@ -466,7 +466,7 @@ cpu_startup()
|
||||
#endif
|
||||
format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
|
||||
printf("avail memory = %s\n", pbuf);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * CLBYTES);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * NBPG);
|
||||
printf("using %d buffers containing %s of memory\n", nbuf, pbuf);
|
||||
|
||||
/*
|
||||
@ -886,7 +886,7 @@ long dumplo = 0; /* blocks */
|
||||
|
||||
/*
|
||||
* This is called by main to set dumplo and dumpsize.
|
||||
* Dumps always skip the first CLBYTES of disk space
|
||||
* Dumps always skip the first NBPG of disk space
|
||||
* in case there might be a disk label stored there.
|
||||
* If there is extra space, put dump at the end to
|
||||
* reduce the chance that swapping trashes it.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mem.c,v 1.11 1999/11/13 00:30:39 thorpej Exp $ */
|
||||
/* $NetBSD: mem.c,v 1.12 1999/12/04 21:20:55 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -168,16 +168,10 @@ mmrw(dev, uio, flags)
|
||||
* is a global zeroed page, the null segment table.
|
||||
*/
|
||||
if (devzeropage == NULL) {
|
||||
#if CLBYTES == NBPG
|
||||
extern caddr_t Segtabzero;
|
||||
devzeropage = Segtabzero;
|
||||
#else
|
||||
devzeropage = (caddr_t)
|
||||
malloc(CLBYTES, M_TEMP, M_WAITOK);
|
||||
bzero(devzeropage, CLBYTES);
|
||||
#endif
|
||||
}
|
||||
c = min(iov->iov_len, CLBYTES);
|
||||
c = min(iov->iov_len, NBPG);
|
||||
error = uiomove(devzeropage, c, uio);
|
||||
continue;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.26 1999/11/13 00:30:40 thorpej Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.27 1999/12/04 21:20:56 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -221,7 +221,7 @@ cpu_coredump(p, vp, cred, chdr)
|
||||
/*
|
||||
* Move pages from one kernel virtual address to another.
|
||||
* Both addresses are assumed to reside in the Sysmap,
|
||||
* and size must be a multiple of CLSIZE.
|
||||
* and size must be a multiple of NBPG.
|
||||
*/
|
||||
void
|
||||
pagemove(from, to, size)
|
||||
@ -232,7 +232,7 @@ pagemove(from, to, size)
|
||||
boolean_t rv;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (size & CLOFSET)
|
||||
if (size & PGOFSET)
|
||||
panic("pagemove");
|
||||
#endif
|
||||
while (size > 0) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fb_start.c,v 1.3 1999/02/15 04:36:34 hubertf Exp $ */
|
||||
/* $NetBSD: fb_start.c,v 1.4 1999/12/04 21:20:57 ragge Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
@ -397,7 +397,7 @@ iopmemfbmap(addr, len, map)
|
||||
register int i;
|
||||
|
||||
map->fm_vaddr = addr;
|
||||
map->fm_offset = (unsigned)addr & CLOFSET;
|
||||
map->fm_offset = (unsigned)addr & PGOFSET;
|
||||
map->fm_count = len;
|
||||
len += map->fm_offset;
|
||||
p = map->fm_addr;
|
||||
@ -405,8 +405,8 @@ iopmemfbmap(addr, len, map)
|
||||
|
||||
for (i = 0; i < NFBMAP && len > 0; i++) {
|
||||
*p++ = addr;
|
||||
addr += CLBYTES;
|
||||
len -= CLBYTES;
|
||||
addr += NBPG;
|
||||
len -= NBPG;
|
||||
}
|
||||
}
|
||||
#endif /* IPC_MRX */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fbdefs.h,v 1.2 1999/02/15 04:36:34 hubertf Exp $ */
|
||||
/* $NetBSD: fbdefs.h,v 1.3 1999/12/04 21:20:58 ragge Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
@ -178,7 +178,7 @@ extern mergeRopRec mergeRopBits[];
|
||||
#define TypeAt(m, p) ((m)->fm_vaddr + (p) - (m)->fm_offset)
|
||||
|
||||
#ifdef CPU_DOUBLE
|
||||
# define _TypeAt(m, p) ((m)->fm_addr[(p)>>CLSHIFT] + (CLOFSET&(p)))
|
||||
# define _TypeAt(m, p) ((m)->fm_addr[(p)>>PGSHIFT] + (PGOFSET&(p)))
|
||||
#else /* CPU_DOUBLE */
|
||||
# define _TypeAt(m, p) ((m)->fm_vaddr + (p) - (m)->fm_offset)
|
||||
#endif /* CPU_DOUBLE */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* from $NetBSD: param.h,v 1.5 1999/02/09 17:15:51 tv Exp $ */
|
||||
/* from $NetBSD: param.h,v 1.6 1999/12/04 21:20:59 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -67,9 +67,6 @@
|
||||
#define BLKDEV_IOSIZE 2048
|
||||
#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
|
||||
|
||||
#define CLSIZE 1
|
||||
#define CLSIZELOG2 0
|
||||
|
||||
/*
|
||||
* Constants related to network buffer management.
|
||||
* MCLBYTES must be no larger than CLBYTES (the software page size), and,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.30 1999/09/17 20:04:43 thorpej Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.31 1999/12/04 21:21:00 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -43,7 +43,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.30 1999/09/17 20:04:43 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.31 1999/12/04 21:21:00 ragge Exp $");
|
||||
|
||||
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
|
||||
|
||||
@ -377,7 +377,7 @@ cpu_startup()
|
||||
* "base" pages for the rest.
|
||||
*/
|
||||
curbuf = (vaddr_t) buffers + (i * MAXBSIZE);
|
||||
curbufsize = CLBYTES * ((i < residual) ? (base+1) : base);
|
||||
curbufsize = NBPG * ((i < residual) ? (base+1) : base);
|
||||
|
||||
while (curbufsize) {
|
||||
pg = uvm_pagealloc(NULL, 0, NULL, 0);
|
||||
@ -421,7 +421,7 @@ cpu_startup()
|
||||
#endif
|
||||
format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
|
||||
printf("avail memory = %s\n", pbuf);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * CLBYTES);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * NBPG);
|
||||
printf("using %d buffers containing %s of memory\n", nbuf, pbuf);
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.1.1.1 1998/06/09 07:53:05 dbj Exp $ */
|
||||
/* $NetBSD: param.h,v 1.2 1999/12/04 21:21:02 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -70,10 +70,10 @@
|
||||
#define NPTEPG (NBPG/(sizeof (pt_entry_t)))
|
||||
|
||||
/*
|
||||
* Size of kernel malloc arena in CLBYTES-sized logical pages
|
||||
* Size of kernel malloc arena in NBPG-sized logical pages
|
||||
*/
|
||||
#ifndef NKMEMCLUSTERS
|
||||
# define NKMEMCLUSTERS (2048 * 1024 / CLBYTES)
|
||||
# define NKMEMCLUSTERS (2048 * 1024 / NBPG)
|
||||
#endif
|
||||
|
||||
#if defined(_KERNEL) && !defined(_LOCORE)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.5 1999/04/26 22:46:47 thorpej Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.6 1999/12/04 21:21:02 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* This file was taken from from mvme68k/include/vmparam.h and
|
||||
@ -233,8 +233,8 @@
|
||||
#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0xFFFFF000)
|
||||
|
||||
/* virtual sizes (bytes) for various kernel submaps */
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*CLBYTES)
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*NBPG)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*NBPG)
|
||||
|
||||
/* # of kernel PT pages (initial only, can grow dynamically) */
|
||||
#define VM_KERNEL_PT_PAGES ((vsize_t)2) /* XXX: SYSPTSIZE */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mem.c,v 1.9 1999/11/13 00:30:41 thorpej Exp $ */
|
||||
/* $NetBSD: mem.c,v 1.10 1999/12/04 21:21:03 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* This file was taken from mvme68k/mvme68k/mem.c
|
||||
@ -175,16 +175,10 @@ mmrw(dev, uio, flags)
|
||||
* is a global zeroed page, the null segment table.
|
||||
*/
|
||||
if (devzeropage == NULL) {
|
||||
#if CLBYTES == NBPG
|
||||
extern caddr_t Segtabzero;
|
||||
devzeropage = Segtabzero;
|
||||
#else
|
||||
devzeropage = (caddr_t)
|
||||
malloc(CLBYTES, M_TEMP, M_WAITOK);
|
||||
bzero(devzeropage, CLBYTES);
|
||||
#endif
|
||||
}
|
||||
c = min(iov->iov_len, CLBYTES);
|
||||
c = min(iov->iov_len, NBPG);
|
||||
error = uiomove(devzeropage, c, uio);
|
||||
continue;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.14 1999/11/13 00:30:41 thorpej Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.15 1999/12/04 21:21:04 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* This file was taken from mvme68k/mvme68k/vm_machdep.c
|
||||
@ -232,7 +232,7 @@ cpu_coredump(p, vp, cred, chdr)
|
||||
/*
|
||||
* Move pages from one kernel virtual address to another.
|
||||
* Both addresses are assumed to reside in the Sysmap,
|
||||
* and size must be a multiple of CLSIZE.
|
||||
* and size must be a multiple of NBPG.
|
||||
*/
|
||||
void
|
||||
pagemove(from, to, size)
|
||||
@ -243,7 +243,7 @@ pagemove(from, to, size)
|
||||
boolean_t rv;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (size & CLOFSET)
|
||||
if (size & PGOFSET)
|
||||
panic("pagemove");
|
||||
#endif
|
||||
while (size > 0) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.5 1998/09/01 05:55:14 sakamoto Exp $ */
|
||||
/* $NetBSD: param.h,v 1.6 1999/12/04 21:21:06 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -57,9 +57,6 @@
|
||||
#define BLKDEV_IOSIZE NBPG
|
||||
#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
|
||||
|
||||
#define CLSIZELOG2 0
|
||||
#define CLSIZE (1 << CLSIZELOG2)
|
||||
|
||||
#define UPAGES 4
|
||||
#define USPACE (UPAGES * NBPG)
|
||||
|
||||
@ -71,7 +68,7 @@
|
||||
|
||||
/*
|
||||
* Constants related to network buffer management.
|
||||
* MCLBYTES must be no larger than CLBYTES (the software page size), and,
|
||||
* MCLBYTES must be no larger than NBPG (the software page size), and,
|
||||
* on machines that exchange pages of input or output buffers with mbuf
|
||||
* clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
|
||||
* of the hardware page size.
|
||||
@ -94,10 +91,10 @@
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Size of kernel malloc arena in CLBYTES-sized logical pages.
|
||||
* Size of kernel malloc arena in NBPG-sized logical pages.
|
||||
*/
|
||||
#ifndef NKMEMCLUSTERS
|
||||
#define NKMEMCLUSTERS (128 * 1024 * 1024 / CLBYTES)
|
||||
#define NKMEMCLUSTERS (128 * 1024 * 1024 / NBPG)
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.9 1999/04/16 21:47:12 thorpej Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.10 1999/12/04 21:21:07 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -34,7 +34,7 @@
|
||||
#ifndef _MACHINE_VMPARAM_H_
|
||||
#define _MACHINE_VMPARAM_H_
|
||||
|
||||
#define USRTEXT CLBYTES
|
||||
#define USRTEXT NBPG
|
||||
#define USRSTACK VM_MAXUSER_ADDRESS
|
||||
|
||||
#ifndef MAXTSIZ
|
||||
@ -89,8 +89,8 @@
|
||||
#define VM_MIN_KERNEL_ADDRESS ((vaddr_t)(KERNEL_SR << ADDR_SR_SHFT))
|
||||
#define VM_MAX_KERNEL_ADDRESS (VM_MIN_KERNEL_ADDRESS + SEGMENT_LENGTH - 1)
|
||||
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS * CLBYTES)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE * CLBYTES)
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS * NBPG)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE * NBPG)
|
||||
|
||||
struct pmap_physseg {
|
||||
struct pv_entry *pvent;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.47 1999/11/17 14:56:10 kleink Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.48 1999/12/04 21:21:09 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -432,7 +432,7 @@ cpu_startup()
|
||||
* "base" pages for the rest.
|
||||
*/
|
||||
curbuf = (vaddr_t) buffers + (i * MAXBSIZE);
|
||||
curbufsize = CLBYTES * ((i < residual) ? (base+1) : base);
|
||||
curbufsize = NBPG * ((i < residual) ? (base+1) : base);
|
||||
|
||||
while (curbufsize) {
|
||||
pg = uvm_pagealloc(NULL, 0, NULL, 0);
|
||||
@ -475,7 +475,7 @@ cpu_startup()
|
||||
|
||||
format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
|
||||
printf("avail memory = %s\n", pbuf);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * CLBYTES);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * NBPG);
|
||||
printf("using %d buffers containing %s of memory\n", nbuf, pbuf);
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.21 1998/04/29 23:11:01 thorpej Exp $ */
|
||||
/* $NetBSD: param.h,v 1.22 1999/12/04 21:21:11 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -86,10 +86,6 @@
|
||||
#define BLKDEV_IOSIZE 4096 /* Was 2048 (pan) */
|
||||
#define MAXPHYS (128 * 1024) /* max raw I/O transfer size */
|
||||
|
||||
#define CLSIZELOG2 0
|
||||
#define CLSIZE (1 << CLSIZELOG2)
|
||||
|
||||
/* NOTE: SSIZE, SINCR and UPAGES must be multiples of CLSIZE */
|
||||
#define SSIZE 1 /* initial stack size/NBPG */
|
||||
#define SINCR 1 /* increment of stack/NBPG */
|
||||
#define UPAGES 2 /* pages of u-area */
|
||||
@ -130,10 +126,10 @@
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Size of kernel malloc arena in CLBYTES-sized logical pages
|
||||
* Size of kernel malloc arena in NBPG-sized logical pages
|
||||
*/
|
||||
#ifndef NKMEMCLUSTERS
|
||||
#define NKMEMCLUSTERS (2 * 1024 * 1024/CLBYTES)
|
||||
#define NKMEMCLUSTERS (2 * 1024 * 1024/NBPG)
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.18 1999/06/17 00:22:42 thorpej Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.19 1999/12/04 21:21:11 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -56,7 +56,7 @@
|
||||
* Immediately after the user structure is the page table map, and then
|
||||
* kernal address space.
|
||||
*/
|
||||
#define USRTEXT CLBYTES /* For NetBSD... */
|
||||
#define USRTEXT NBPG /* For NetBSD... */
|
||||
#define USRSTACK VM_MAXUSER_ADDRESS
|
||||
|
||||
/*
|
||||
@ -151,8 +151,8 @@
|
||||
#endif
|
||||
|
||||
/* virtual sizes (bytes) for various kernel submaps */
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*CLBYTES)
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*NBPG)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*NBPG)
|
||||
|
||||
#define VM_PHYSSEG_MAX 1 /* we have contiguous memory */
|
||||
#define VM_PHYSSEG_STRAT VM_PSTRAT_RANDOM
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.106 1999/09/17 20:04:47 thorpej Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.107 1999/12/04 21:21:12 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 Matthias Pfaller.
|
||||
@ -257,7 +257,7 @@ cpu_startup()
|
||||
* "base" pages for the rest.
|
||||
*/
|
||||
curbuf = (vaddr_t) buffers + (i * MAXBSIZE);
|
||||
curbufsize = CLBYTES * ((i < residual) ? (base+1) : base);
|
||||
curbufsize = NBPG * ((i < residual) ? (base+1) : base);
|
||||
|
||||
while (curbufsize) {
|
||||
pg = uvm_pagealloc(NULL, 0, NULL, 0);
|
||||
@ -308,7 +308,7 @@ cpu_startup()
|
||||
|
||||
format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
|
||||
printf("avail memory = %s\n", pbuf);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * CLBYTES);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * NBPG);
|
||||
printf("using %d buffers containing %s of memory\n", nbuf, pbuf);
|
||||
|
||||
/*
|
||||
@ -663,7 +663,7 @@ cpu_dump()
|
||||
|
||||
/*
|
||||
* This is called by main to set dumplo and dumpsize.
|
||||
* Dumps always skip the first CLBYTES of disk space
|
||||
* Dumps always skip the first NBPG of disk space
|
||||
* in case there might be a disk label stored there.
|
||||
* If there is extra space, put dump at the end to
|
||||
* reduce the chance that swapping trashes it.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mem.c,v 1.24 1999/11/13 00:30:42 thorpej Exp $ */
|
||||
/* $NetBSD: mem.c,v 1.25 1999/12/04 21:21:14 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -156,10 +156,10 @@ mmrw(dev, uio, flags)
|
||||
}
|
||||
if (zeropage == NULL) {
|
||||
zeropage = (caddr_t)
|
||||
malloc(CLBYTES, M_TEMP, M_WAITOK);
|
||||
memset(zeropage, 0, CLBYTES);
|
||||
malloc(NBPG, M_TEMP, M_WAITOK);
|
||||
memset(zeropage, 0, NBPG);
|
||||
}
|
||||
c = min(iov->iov_len, CLBYTES);
|
||||
c = min(iov->iov_len, NBPG);
|
||||
error = uiomove(zeropage, c, uio);
|
||||
break;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.38 1999/11/13 00:30:42 thorpej Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.39 1999/12/04 21:21:14 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 Matthias Pfaller.
|
||||
@ -290,7 +290,7 @@ pagemove(from, to, size)
|
||||
{
|
||||
register pt_entry_t *fpte, *tpte, ofpte, otpte;
|
||||
|
||||
if (size % CLBYTES)
|
||||
if (size % NBPG)
|
||||
panic("pagemove");
|
||||
fpte = kvtopte(from);
|
||||
tpte = kvtopte(to);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.8 1998/04/29 23:11:01 thorpej Exp $ */
|
||||
/* $NetBSD: param.h,v 1.9 1999/12/04 21:21:16 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -89,10 +89,6 @@
|
||||
#define BLKDEV_IOSIZE 2048
|
||||
#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
|
||||
|
||||
#define CLSIZE 1
|
||||
#define CLSIZELOG2 0
|
||||
|
||||
/* NOTE: SSIZE, SINCR and UPAGES must be multiples of CLSIZE */
|
||||
#define SSIZE 1 /* initial stack size/NBPG */
|
||||
#define SINCR 1 /* increment of stack/NBPG */
|
||||
|
||||
@ -127,10 +123,10 @@
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Size of kernel malloc arena in CLBYTES-sized logical pages
|
||||
* Size of kernel malloc arena in NBPG-sized logical pages
|
||||
*/
|
||||
#ifndef NKMEMCLUSTERS
|
||||
#define NKMEMCLUSTERS (512*1024/CLBYTES)
|
||||
#define NKMEMCLUSTERS (512*1024/NBPG)
|
||||
#endif
|
||||
|
||||
/* pages ("clicks") (4096 bytes) to disk blocks */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.23 1999/05/20 08:21:46 lukem Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.24 1999/12/04 21:21:16 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -521,7 +521,7 @@ cpu_startup()
|
||||
* but has no physical memory allocated for it.
|
||||
*/
|
||||
curbuf = (vm_offset_t)buffers + i * MAXBSIZE;
|
||||
curbufsize = CLBYTES * (i < residual ? base+1 : base);
|
||||
curbufsize = NBPG * (i < residual ? base+1 : base);
|
||||
vm_map_pageable(buffer_map, curbuf, curbuf+curbufsize, FALSE);
|
||||
vm_map_simplify(buffer_map, curbuf);
|
||||
}
|
||||
@ -555,7 +555,7 @@ cpu_startup()
|
||||
#endif
|
||||
format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
|
||||
printf("avail memory = %s\n", pbuf);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * CLBYTES);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * NBPG);
|
||||
printf("using %d buffers containing %s of memory\n", nbuf, pbuf);
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.7 1999/05/26 22:19:37 thorpej Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.8 1999/12/04 21:21:17 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -211,7 +211,7 @@ pagemove(from, to, size)
|
||||
{
|
||||
register pt_entry_t *fpte, *tpte;
|
||||
|
||||
if (size % CLBYTES)
|
||||
if (size % NBPG)
|
||||
panic("pagemove");
|
||||
fpte = kvtopte(from);
|
||||
tpte = kvtopte(to);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.27 1999/02/09 17:15:52 tv Exp $ */
|
||||
/* $NetBSD: param.h,v 1.28 1999/12/04 21:21:18 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -67,12 +67,9 @@
|
||||
#define BLKDEV_IOSIZE 2048
|
||||
#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
|
||||
|
||||
#define CLSIZE 1
|
||||
#define CLSIZELOG2 0
|
||||
|
||||
/*
|
||||
* Constants related to network buffer management.
|
||||
* MCLBYTES must be no larger than CLBYTES (the software page size), and,
|
||||
* MCLBYTES must be no larger than NBPG (the software page size), and,
|
||||
* on machines that exchange pages of input or output buffers with mbuf
|
||||
* clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
|
||||
* of the hardware page size.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.153 1999/11/25 01:40:22 simonb Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.154 1999/12/04 21:21:19 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -43,7 +43,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.153 1999/11/25 01:40:22 simonb Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.154 1999/12/04 21:21:19 ragge Exp $");
|
||||
|
||||
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
|
||||
|
||||
@ -480,7 +480,7 @@ cpu_startup()
|
||||
* "base" pages for the rest.
|
||||
*/
|
||||
curbuf = (vaddr_t)buffers + (i * MAXBSIZE);
|
||||
curbufsize = CLBYTES * ((i < residual) ? (base+1) : base);
|
||||
curbufsize = NBPG * ((i < residual) ? (base+1) : base);
|
||||
|
||||
while (curbufsize) {
|
||||
pg = uvm_pagealloc(NULL, 0, NULL, 0);
|
||||
@ -525,7 +525,7 @@ cpu_startup()
|
||||
#endif
|
||||
format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
|
||||
printf("avail memory = %s\n", pbuf);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * CLBYTES);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * NBPG);
|
||||
printf("using %d buffers containing %s of memory\n", nbuf, pbuf);
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.5 1998/08/16 02:15:50 wrstuden Exp $ */
|
||||
/* $NetBSD: param.h,v 1.6 1999/12/04 21:21:21 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -57,9 +57,6 @@
|
||||
#define BLKDEV_IOSIZE NBPG
|
||||
#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
|
||||
|
||||
#define CLSIZELOG2 0
|
||||
#define CLSIZE (1 << CLSIZELOG2)
|
||||
|
||||
#define UPAGES 4
|
||||
#define USPACE (UPAGES * NBPG)
|
||||
|
||||
@ -71,7 +68,7 @@
|
||||
|
||||
/*
|
||||
* Constants related to network buffer management.
|
||||
* MCLBYTES must be no larger than CLBYTES (the software page size), and,
|
||||
* MCLBYTES must be no larger than NBPG (the software page size), and,
|
||||
* on machines that exchange pages of input or output buffers with mbuf
|
||||
* clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
|
||||
* of the hardware page size.
|
||||
@ -94,10 +91,10 @@
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Size of kernel malloc arena in CLBYTES-sized logical pages.
|
||||
* Size of kernel malloc arena in NBPG-sized logical pages.
|
||||
*/
|
||||
#ifndef NKMEMCLUSTERS
|
||||
#define NKMEMCLUSTERS (128 * 1024 * 1024 / CLBYTES)
|
||||
#define NKMEMCLUSTERS (128 * 1024 * 1024 / NBPG)
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.10 1999/05/02 18:12:32 kleink Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.11 1999/12/04 21:21:21 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -34,7 +34,7 @@
|
||||
#ifndef _MACHINE_VMPARAM_H_
|
||||
#define _MACHINE_VMPARAM_H_
|
||||
|
||||
#define USRTEXT CLBYTES
|
||||
#define USRTEXT NBPG
|
||||
#define USRSTACK VM_MAXUSER_ADDRESS
|
||||
|
||||
#ifndef MAXTSIZ
|
||||
@ -90,8 +90,8 @@
|
||||
#define VM_MAX_KERNEL_ADDRESS \
|
||||
((vaddr_t)(KERNEL_SR << ADDR_SR_SHFT + SEGMENT_LENGTH - 1))
|
||||
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS * CLBYTES)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE * CLBYTES)
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS * NBPG)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE * NBPG)
|
||||
|
||||
struct pmap_physseg {
|
||||
struct pv_entry *pvent;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mem.c,v 1.5 1999/02/10 17:03:27 kleink Exp $ */
|
||||
/* $NetBSD: mem.c,v 1.6 1999/12/04 21:21:22 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -125,10 +125,10 @@ mmrw(dev, uio, flags)
|
||||
break;
|
||||
}
|
||||
if (zeropage == NULL) {
|
||||
zeropage = (caddr_t)malloc(CLBYTES, M_TEMP, M_WAITOK);
|
||||
bzero(zeropage, CLBYTES);
|
||||
zeropage = (caddr_t)malloc(NBPG, M_TEMP, M_WAITOK);
|
||||
bzero(zeropage, NBPG);
|
||||
}
|
||||
c = min(iov->iov_len, CLBYTES);
|
||||
c = min(iov->iov_len, NBPG);
|
||||
error = uiomove(zeropage, c, uio);
|
||||
continue;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.1 1999/09/13 10:31:19 itojun Exp $ */
|
||||
/* $NetBSD: param.h,v 1.2 1999/12/04 21:21:23 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -90,10 +90,6 @@
|
||||
#define BLKDEV_IOSIZE 2048
|
||||
#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
|
||||
|
||||
#define CLSIZELOG2 0
|
||||
#define CLSIZE (1 << CLSIZELOG2)
|
||||
|
||||
/* NOTE: SSIZE, SINCR and UPAGES must be multiples of CLSIZE */
|
||||
#define SSIZE 1 /* initial stack size/NBPG */
|
||||
#define SINCR 1 /* increment of stack/NBPG */
|
||||
#if 0
|
||||
@ -109,7 +105,7 @@
|
||||
|
||||
/*
|
||||
* Constants related to network buffer management.
|
||||
* MCLBYTES must be no larger than CLBYTES (the software page size), and,
|
||||
* MCLBYTES must be no larger than NBPG (the software page size), and,
|
||||
* on machines that exchange pages of input or output buffers with mbuf
|
||||
* clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
|
||||
* of the hardware page size.
|
||||
@ -132,10 +128,10 @@
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Size of kernel malloc arena in CLBYTES-sized logical pages
|
||||
* Size of kernel malloc arena in NBPG-sized logical pages
|
||||
*/
|
||||
#ifndef NKMEMCLUSTERS
|
||||
#define NKMEMCLUSTERS (6 * 1024 * 1024 / CLBYTES)
|
||||
#define NKMEMCLUSTERS (6 * 1024 * 1024 / NBPG)
|
||||
#endif
|
||||
|
||||
/* pages ("clicks") to disk blocks */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.2 1999/09/14 10:22:36 tsubai Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.3 1999/12/04 21:21:24 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -56,7 +56,7 @@
|
||||
* Immediately after the user structure is the page table map, and then
|
||||
* kernal address space.
|
||||
*/
|
||||
#define USRTEXT CLBYTES
|
||||
#define USRTEXT NBPG
|
||||
#define USRSTACK VM_MAXUSER_ADDRESS
|
||||
|
||||
/*
|
||||
@ -144,8 +144,8 @@
|
||||
|
||||
/* virtual sizes (bytes) for various kernel submaps */
|
||||
#define VM_MBUF_SIZE (NMBCLUSTERS*MCLBYTES)
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*CLBYTES)
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*NBPG)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*NBPG)
|
||||
|
||||
#define VM_PHYSSEG_MAX 1
|
||||
#define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mem.c,v 1.2 1999/11/13 00:30:44 thorpej Exp $ */
|
||||
/* $NetBSD: mem.c,v 1.3 1999/12/04 21:21:25 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -168,10 +168,10 @@ mmrw(dev, uio, flags)
|
||||
}
|
||||
if (zeropage == NULL) {
|
||||
zeropage = (caddr_t)
|
||||
malloc(CLBYTES, M_TEMP, M_WAITOK);
|
||||
memset(zeropage, 0, CLBYTES);
|
||||
malloc(NBPG, M_TEMP, M_WAITOK);
|
||||
memset(zeropage, 0, NBPG);
|
||||
}
|
||||
c = min(iov->iov_len, CLBYTES);
|
||||
c = min(iov->iov_len, NBPG);
|
||||
error = uiomove(zeropage, c, uio);
|
||||
break;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sh3_machdep.c,v 1.1 1999/09/21 13:16:16 tsubai Exp $ */
|
||||
/* $NetBSD: sh3_machdep.c,v 1.2 1999/12/04 21:21:25 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||
@ -170,7 +170,7 @@ sh3_startup()
|
||||
* "base" pages for the rest.
|
||||
*/
|
||||
curbuf = (vaddr_t) buffers + (i * MAXBSIZE);
|
||||
curbufsize = CLBYTES * ((i < residual) ? (base+1) : base);
|
||||
curbufsize = NBPG * ((i < residual) ? (base+1) : base);
|
||||
|
||||
while (curbufsize) {
|
||||
pg = uvm_pagealloc(NULL, 0, NULL, 0);
|
||||
@ -212,7 +212,7 @@ sh3_startup()
|
||||
|
||||
format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
|
||||
printf("avail memory = %s\n", pbuf);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * CLBYTES);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * NBPG);
|
||||
printf("using %d buffers containing %s of memory\n", nbuf, pbuf);
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.3 1999/11/13 00:30:44 thorpej Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.4 1999/12/04 21:21:27 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995 Charles M. Hannum. All rights reserved.
|
||||
@ -252,7 +252,7 @@ pagemove(from, to, size)
|
||||
{
|
||||
register pt_entry_t *fpte, *tpte;
|
||||
|
||||
if (size % CLBYTES)
|
||||
if (size % NBPG)
|
||||
panic("pagemove");
|
||||
fpte = kvtopte(from);
|
||||
tpte = kvtopte(to);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.40 1999/11/27 12:14:26 mrg Exp $ */
|
||||
/* $NetBSD: param.h,v 1.41 1999/12/04 21:21:28 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -97,16 +97,12 @@ extern int nbpg, pgofset, pgshift;
|
||||
#define BLKDEV_IOSIZE 2048
|
||||
#define MAXPHYS (64 * 1024)
|
||||
|
||||
#define CLSIZE 1
|
||||
#define CLSIZELOG2 0
|
||||
|
||||
/* NOTE: SSIZE must be multiple of CLSIZE */
|
||||
#define SSIZE 1 /* initial stack size in pages */
|
||||
#define USPACE 8192
|
||||
|
||||
/*
|
||||
* Constants related to network buffer management.
|
||||
* MCLBYTES must be no larger than CLBYTES (the software page size), and,
|
||||
* MCLBYTES must be no larger than NBPG (the software page size), and,
|
||||
* on machines that exchange pages of input or output buffers with mbuf
|
||||
* clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
|
||||
* of the hardware page size.
|
||||
@ -131,10 +127,10 @@ extern int nbpg, pgofset, pgshift;
|
||||
#define MSGBUFSIZE 4096
|
||||
|
||||
/*
|
||||
* Size of kernel malloc arena in CLBYTES-sized logical pages.
|
||||
* Size of kernel malloc arena in NBPG-sized logical pages.
|
||||
*/
|
||||
#ifndef NKMEMCLUSTERS
|
||||
#define NKMEMCLUSTERS (6 * 1024 * 1024 / CLBYTES)
|
||||
#define NKMEMCLUSTERS (6 * 1024 * 1024 / NBPG)
|
||||
#endif
|
||||
|
||||
/* pages ("clicks") to disk blocks */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.21 1999/11/27 10:22:19 mrg Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.22 1999/12/04 21:21:29 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -97,7 +97,7 @@
|
||||
* by the page replacement algorithm. Basically this says that if you are
|
||||
* swapped in you deserve some resources. We protect the last SAFERSS
|
||||
* pages against paging and will just swap you out rather than paging you.
|
||||
* Note that each process has at least UPAGES+CLSIZE pages which are not
|
||||
* Note that each process has at least UPAGES pages which are not
|
||||
* paged anyways (this is currently 8+2=10 pages or 5k bytes), so this
|
||||
* number just means a swapped in process is given around 25k bytes.
|
||||
* Just for fun: current memory prices are 4600$ a megabyte on VAX (4/22/81),
|
||||
@ -128,7 +128,7 @@
|
||||
#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0xfe000000)
|
||||
|
||||
/* virtual sizes (bytes) for various kernel submaps */
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES)
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*NBPG)
|
||||
|
||||
#define VM_PHYSSEG_MAX 32 /* up to 32 segments */
|
||||
#define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.157 1999/11/15 00:06:58 thorpej Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.158 1999/12/04 21:21:29 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||
@ -251,7 +251,7 @@ cpu_startup()
|
||||
* "base" pages for the rest.
|
||||
*/
|
||||
curbuf = (vaddr_t) buffers + (i * MAXBSIZE);
|
||||
curbufsize = CLBYTES * ((i < residual) ? (base+1) : base);
|
||||
curbufsize = NBPG * ((i < residual) ? (base+1) : base);
|
||||
|
||||
while (curbufsize) {
|
||||
pg = uvm_pagealloc(NULL, 0, NULL, 0);
|
||||
@ -304,7 +304,7 @@ cpu_startup()
|
||||
#endif
|
||||
format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
|
||||
printf("avail memory = %s\n", pbuf);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * CLBYTES);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * NBPG);
|
||||
printf("using %d buffers containing %s of memory\n", nbuf, pbuf);
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mem.c,v 1.22 1999/11/13 00:32:15 thorpej Exp $ */
|
||||
/* $NetBSD: mem.c,v 1.23 1999/12/04 21:21:31 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -191,10 +191,10 @@ mmrw(dev, uio, flags)
|
||||
}
|
||||
if (zeropage == NULL) {
|
||||
zeropage = (caddr_t)
|
||||
malloc(CLBYTES, M_TEMP, M_WAITOK);
|
||||
bzero(zeropage, CLBYTES);
|
||||
malloc(NBPG, M_TEMP, M_WAITOK);
|
||||
bzero(zeropage, NBPG);
|
||||
}
|
||||
c = min(iov->iov_len, CLBYTES);
|
||||
c = min(iov->iov_len, NBPG);
|
||||
error = uiomove(zeropage, c, uio);
|
||||
break;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.49 1999/11/13 00:32:16 thorpej Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.50 1999/12/04 21:21:32 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996
|
||||
@ -78,7 +78,7 @@ pagemove(from, to, size)
|
||||
{
|
||||
paddr_t pa;
|
||||
|
||||
if (size & CLOFSET || (int)from & CLOFSET || (int)to & CLOFSET)
|
||||
if (size & PGOFSET || (int)from & PGOFSET || (int)to & PGOFSET)
|
||||
panic("pagemove 1");
|
||||
while (size > 0) {
|
||||
if (pmap_extract(pmap_kernel(), (vaddr_t)from, &pa) == FALSE)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.14 1999/11/27 12:14:26 mrg Exp $ */
|
||||
/* $NetBSD: param.h,v 1.15 1999/12/04 21:21:34 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -129,10 +129,6 @@ extern int nbpg, pgofset, pgshift;
|
||||
#define BLKDEV_IOSIZE 2048
|
||||
#define MAXPHYS (64 * 1024)
|
||||
|
||||
#define CLSIZE 1
|
||||
#define CLSIZELOG2 0
|
||||
|
||||
/* NOTE: SSIZE must be multiple of CLSIZE */
|
||||
#ifdef __arch64__
|
||||
/* We get stack overflows w/8K stacks in 64-bit mode */
|
||||
#define SSIZE 2 /* initial stack size in pages */
|
||||
@ -143,7 +139,7 @@ extern int nbpg, pgofset, pgshift;
|
||||
|
||||
/*
|
||||
* Constants related to network buffer management.
|
||||
* MCLBYTES must be no larger than CLBYTES (the software page size), and,
|
||||
* MCLBYTES must be no larger than NBPG (the software page size), and,
|
||||
* on machines that exchange pages of input or output buffers with mbuf
|
||||
* clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
|
||||
* of the hardware page size.
|
||||
@ -168,10 +164,10 @@ extern int nbpg, pgofset, pgshift;
|
||||
#define MSGBUFSIZE NBPG
|
||||
|
||||
/*
|
||||
* Size of kernel malloc arena in CLBYTES-sized logical pages.
|
||||
* Size of kernel malloc arena in NBPG-sized logical pages.
|
||||
*/
|
||||
#ifndef NKMEMCLUSTERS
|
||||
#define NKMEMCLUSTERS (6 * 1024 * 1024 / CLBYTES)
|
||||
#define NKMEMCLUSTERS (6 * 1024 * 1024 / NBPG)
|
||||
#endif
|
||||
|
||||
/* pages ("clicks") to disk blocks */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.7 1999/11/20 18:10:44 eeh Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.8 1999/12/04 21:21:34 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -97,7 +97,7 @@
|
||||
* by the page replacement algorithm. Basically this says that if you are
|
||||
* swapped in you deserve some resources. We protect the last SAFERSS
|
||||
* pages against paging and will just swap you out rather than paging you.
|
||||
* Note that each process has at least UPAGES+CLSIZE pages which are not
|
||||
* Note that each process has at least UPAGES pages which are not
|
||||
* paged anyways (this is currently 8+2=10 pages or 5k bytes), so this
|
||||
* number just means a swapped in process is given around 25k bytes.
|
||||
* Just for fun: current memory prices are 4600$ a megabyte on VAX (4/22/81),
|
||||
@ -128,7 +128,7 @@
|
||||
#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)KERNEND)
|
||||
|
||||
/* virtual sizes (bytes) for various kernel submaps */
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES)
|
||||
#define VM_KMEM_SIZE (NKMEMCLUSTERS*NBPG)
|
||||
|
||||
#define VM_PHYSSEG_MAX 32 /* up to 32 segments */
|
||||
#define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.54 1999/11/13 00:32:17 thorpej Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.55 1999/12/04 21:21:35 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||
@ -253,7 +253,7 @@ printf("cpu_startup: allocsys %ld, rounded %ld\n", sz, round_page(sz));
|
||||
* "base" pages for the rest.
|
||||
*/
|
||||
curbuf = (vaddr_t) buffers + (i * MAXBSIZE);
|
||||
curbufsize = CLBYTES * ((i < residual) ? (base+1) : base);
|
||||
curbufsize = NBPG * ((i < residual) ? (base+1) : base);
|
||||
|
||||
while (curbufsize) {
|
||||
pg = uvm_pagealloc(NULL, 0, NULL, 0);
|
||||
@ -293,7 +293,7 @@ printf("cpu_startup: allocsys %ld, rounded %ld\n", sz, round_page(sz));
|
||||
#endif
|
||||
format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
|
||||
printf("avail memory = %s\n", pbuf);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * CLBYTES);
|
||||
format_bytes(pbuf, sizeof(pbuf), bufpages * NBPG);
|
||||
printf("using %d buffers containing %s of memory\n", nbuf, pbuf);
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mem.c,v 1.9 1999/11/13 00:32:17 thorpej Exp $ */
|
||||
/* $NetBSD: mem.c,v 1.10 1999/12/04 21:21:36 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -258,10 +258,10 @@ mmrw(dev, uio, flags)
|
||||
}
|
||||
if (zeropage == NULL) {
|
||||
zeropage = (caddr_t)
|
||||
malloc(CLBYTES, M_TEMP, M_WAITOK);
|
||||
bzero(zeropage, CLBYTES);
|
||||
malloc(NBPG, M_TEMP, M_WAITOK);
|
||||
bzero(zeropage, NBPG);
|
||||
}
|
||||
c = min(iov->iov_len, CLBYTES);
|
||||
c = min(iov->iov_len, NBPG);
|
||||
error = uiomove(zeropage, c, uio);
|
||||
break;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.22 1999/11/13 00:32:17 thorpej Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.23 1999/12/04 21:21:37 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996
|
||||
@ -86,7 +86,7 @@ pagemove(from, to, size)
|
||||
{
|
||||
paddr_t pa;
|
||||
|
||||
if (size & CLOFSET || (long)from & CLOFSET || (long)to & CLOFSET)
|
||||
if (size & PGOFSET || (long)from & PGOFSET || (long)to & PGOFSET)
|
||||
panic("pagemove 1");
|
||||
#if 1
|
||||
cache_flush((caddr_t)from, size);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.49 1999/04/05 14:34:18 gwr Exp $ */
|
||||
/* $NetBSD: param.h,v 1.50 1999/12/04 21:21:40 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -74,10 +74,10 @@
|
||||
#include <m68k/param.h>
|
||||
|
||||
/*
|
||||
* Size of kernel malloc arena in CLBYTES-sized logical pages
|
||||
* Size of kernel malloc arena in NBPG-sized logical pages
|
||||
*/
|
||||
#ifndef NKMEMCLUSTERS
|
||||
# define NKMEMCLUSTERS (2048 * 1024 / CLBYTES)
|
||||
# define NKMEMCLUSTERS (2048 * 1024 / NBPG)
|
||||
#endif
|
||||
|
||||
#if defined(_KERNEL) && !defined(_LOCORE)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user