diff --git a/sys/arch/mvme68k/include/param.h b/sys/arch/mvme68k/include/param.h index 0b60474c92bf..b452ec2ae880 100644 --- a/sys/arch/mvme68k/include/param.h +++ b/sys/arch/mvme68k/include/param.h @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.20 2000/03/18 22:33:05 scw Exp $ */ +/* $NetBSD: param.h,v 1.21 2000/05/27 22:37:47 scw Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -60,7 +60,12 @@ #define KERNBASE 0x00000000 /* start of kernel virtual */ #define SEGSHIFT 22 /* LOG2(NBSEG) */ +#if defined(M68030) && !defined(M68040) && !defined(M68060) #define NBSEG (1 << SEGSHIFT) /* bytes/segment */ +#else +#define NBSEG ((mmutype == MMU_68040) ? \ + (32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT))) +#endif #define SEGOFSET (NBSEG-1) /* byte offset into segment */ #define UPAGES 3 /* pages of u-area */ diff --git a/sys/arch/mvme68k/include/pmap.h b/sys/arch/mvme68k/include/pmap.h index 96e64a09ef30..4f0b9a180c06 100644 --- a/sys/arch/mvme68k/include/pmap.h +++ b/sys/arch/mvme68k/include/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.15 2000/03/18 22:33:05 scw Exp $ */ +/* $NetBSD: pmap.h,v 1.16 2000/05/27 22:37:47 scw Exp $ */ /* * Copyright (c) 1987 Carnegie-Mellon University @@ -45,12 +45,6 @@ #include -#if defined(M68040) -#define HP_SEG_SIZE (mmutype == MMU_68040 ? 0x40000 : NBSEG) -#else -#define HP_SEG_SIZE NBSEG -#endif - /* * Pmap stuff */ diff --git a/sys/arch/mvme68k/mvme68k/pmap.c b/sys/arch/mvme68k/mvme68k/pmap.c index 64e42dcf37d4..cf593574e853 100644 --- a/sys/arch/mvme68k/mvme68k/pmap.c +++ b/sys/arch/mvme68k/mvme68k/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.41 2000/03/26 20:42:32 kleink Exp $ */ +/* $NetBSD: pmap.c,v 1.42 2000/05/27 22:37:48 scw Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -889,7 +889,7 @@ pmap_remove(pmap, sva, eva) flags = active_pmap(pmap) ? PRM_TFLUSH : 0; while (sva < eva) { - nssva = m68k_trunc_seg(sva) + HP_SEG_SIZE; + nssva = m68k_trunc_seg(sva) + NBSEG; if (nssva == 0 || nssva > eva) nssva = eva; /* @@ -1016,7 +1016,7 @@ pmap_protect(pmap, sva, eva, prot) needtflush = active_pmap(pmap); firstpage = TRUE; while (sva < eva) { - nssva = m68k_trunc_seg(sva) + HP_SEG_SIZE; + nssva = m68k_trunc_seg(sva) + NBSEG; if (nssva == 0 || nssva > eva) nssva = eva; /*