diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2003-01-27 19:37:31 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2003-01-27 19:37:31 +0000 |
commit | ef2d87c55d801373b544cc713af5f0fa49cefef8 (patch) | |
tree | d90dda73cbd46145775e038073f2a2e60e3ab819 /sys/arch/mac68k | |
parent | b3580fc5182cb80597c244da47304d4df66549ba (diff) |
Convert m68k pmap from physseg to VM_PAGE_MD.
This allows us to remove some ambiguities on how some functions are called,
remove some diagnostic checks for conditions that can never happen and
remove the ugly hack with "pmap_initialized".
Then, rework internal function interfaces and some logic so as to stop
fetching vm_page from a pa and the reverse every now and then - this makes
some pmap operations run much faster.
per art@'s idea.
Diffstat (limited to 'sys/arch/mac68k')
-rw-r--r-- | sys/arch/mac68k/include/vmparam.h | 98 |
1 files changed, 3 insertions, 95 deletions
diff --git a/sys/arch/mac68k/include/vmparam.h b/sys/arch/mac68k/include/vmparam.h index f54720df5a5..015b505a71e 100644 --- a/sys/arch/mac68k/include/vmparam.h +++ b/sys/arch/mac68k/include/vmparam.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmparam.h,v 1.13 2002/02/17 22:59:52 maja Exp $ */ +/* $OpenBSD: vmparam.h,v 1.14 2003/01/27 19:37:30 miod Exp $ */ /* $NetBSD: vmparam.h,v 1.8 1996/11/15 14:21:00 briggs Exp $ */ /* @@ -77,90 +77,14 @@ * @(#)vmparam.h 7.3 (Berkeley) 5/7/91 */ -/* - * Machine dependent constants for mac68k -- mostly derived from hp300. - */ #ifndef _MAC68K_VMPARAM_H_ #define _MAC68K_VMPARAM_H_ /* - * USRTEXT is the start of the user text/data space, while USRSTACK - * is the top (end) of the user stack. LOWPAGES and HIGHPAGES are - * the number of pages from the beginning of the P0 region to the - * beginning of the text and from the beginning of the P1 region to the - * beginning of the stack respectively. - * - * NOTE: HP300 uses HIGHPAGES == (0x100000/NBPG) for HP/UX compatibility. - * Do we care? Obviously not at the moment. - */ -#define USRTEXT 8192 -#define USRSTACK (-HIGHPAGES*NBPG) /* Start of user stack */ -#define LOWPAGES 0 -#define HIGHPAGES 3 /* UPAGES */ - -/* - * Virtual memory related constants, all in bytes - */ -#ifndef MAXTSIZ -#define MAXTSIZ (8*1024*1024) /* max text size */ -#endif -#ifndef DFLDSIZ -#define DFLDSIZ (32*1024*1024) /* initial data size limit */ -#endif -#ifndef MAXDSIZ -#define MAXDSIZ (64*1024*1024) /* max data size */ -#endif -#ifndef DFLSSIZ -#define DFLSSIZ (2*1024*1024) /* initial stack size limit */ -#endif -#ifndef MAXSSIZ -#define MAXSSIZ MAXDSIZ /* max stack size */ -#endif - -/* - * Sizes of the system and user portions of the system page table. - */ -#define USRPTSIZE (1 * NPTEPG) /* 4mb */ - -/* - * PTEs for mapping user space into the kernel for phyio operations. - * One page is enough to handle 4Mb of simultaneous raw IO operations. + * Machine dependent constants for mac68k -- mostly derived from hp300. */ -#ifndef USRIOSIZE -#define USRIOSIZE (1 * NPTEPG) /* 4mb */ -#endif -/* - * PTEs for system V style shared memory. - * This is basically slop for kmempt which we actually allocate (malloc) from. - */ -#ifndef SHMMAXPGS -#define SHMMAXPGS 1024 /* 4mb */ -#endif - -/* - * The time for a process to be blocked before being very swappable. - * This is a number of seconds which the system takes as being a non-trivial - * amount of real time. You probably shouldn't change this; - * it is used in subtle ways (fractions and multiples of it are, that is, like - * half of a ``long time'', almost a long time, etc.) - * It is related to human patience and other factors which don't really - * change over time. - */ -#define MAXSLP 20 - -/* user/kernel map constants */ -#define VM_MIN_ADDRESS ((vaddr_t)0) -#define VM_MAXUSER_ADDRESS ((vaddr_t)(USRSTACK)) -#define VM_MAX_ADDRESS ((vaddr_t)(0-(UPAGES*NBPG))) -#define VM_MIN_KERNEL_ADDRESS ((vaddr_t)0) -#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)(0-NBPG)) - -/* virtual sizes (bytes) for various kernel submaps */ -#define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE) - -/* # of kernel PT pages (initial only, can grow dynamically) */ -#define VM_KERNEL_PT_PAGES ((vsize_t)2) +#include <m68k/vmparam.h> /* * Constants which control the way the VM system deals with memory segments. @@ -176,21 +100,5 @@ */ #define VM_PHYSSEG_MAX 2 #define VM_PHYSSEG_STRAT VM_PSTRAT_BIGFIRST -#define VM_PHYSSEG_NOADD - -#define VM_NFREELIST 1 -#define VM_FREELIST_DEFAULT 0 - -/* - * pmap-specific data stored in the vm_physmem[] array. - */ -#define __HAVE_PMAP_PHYSSEG -struct pmap_physseg { - struct pv_entry *pvent; /* pv table for this seg */ - char *attrs; /* page attributes for this seg */ -}; - -/* pcb base */ -#define pcbb(p) ((u_int)(p)->p_addr) #endif /* _MAC68K_VMPARAM_H_ */ |