Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch Fix wrong NBSEG values for all hp300 pmap derived m...



details:   https://anonhg.NetBSD.org/src/rev/3842689d287c
branches:  trunk
changeset: 749808:3842689d287c
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Wed Dec 09 12:21:58 2009 +0000

description:
Fix wrong NBSEG values for all hp300 pmap derived m68k ports.
They were incorrect since 1997 on amiga and atari, and since 2002
on other ports, but fortunately they don't look so fatal.

Anyway, these values will be moved into <m68k/pmap_motorola.h> soon
since they are quite pmap implementation dependent.

diffstat:

 sys/arch/amiga/include/param.h   |  10 +++++-----
 sys/arch/atari/include/param.h   |   8 ++++----
 sys/arch/cesfic/include/param.h  |   6 +++---
 sys/arch/hp300/include/param.h   |   6 +++---
 sys/arch/luna68k/include/param.h |   6 +++---
 sys/arch/mac68k/include/param.h  |   6 +++---
 sys/arch/mvme68k/include/param.h |   6 +++---
 sys/arch/news68k/include/param.h |   7 ++++---
 sys/arch/next68k/include/param.h |   6 +++---
 sys/arch/x68k/include/param.h    |   6 +++---
 10 files changed, 34 insertions(+), 33 deletions(-)

diffs (227 lines):

diff -r 9f810fce88e2 -r 3842689d287c sys/arch/amiga/include/param.h
--- a/sys/arch/amiga/include/param.h    Wed Dec 09 06:20:13 2009 +0000
+++ b/sys/arch/amiga/include/param.h    Wed Dec 09 12:21:58 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.45 2008/01/06 18:50:32 mhitch Exp $        */
+/*     $NetBSD: param.h,v 1.46 2009/12/09 12:21:58 tsutsui Exp $       */
 
 /*
  * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -89,10 +89,10 @@
 #define        KERNBASE        0x00000000      /* start of kernel virtual */
 
 #define        SEGSHIFT        24              /* LOG2(NBSEG) [68030 value] */
-/* bytes/segment */
-/* (256 * (1 << PGSHIFT)) == (1 << SEGSHIFT) */
-#define NBSEG          ((mmutype == MMU_68040) \
-                           ? (32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT)))
+
+#define NBSEG          ((mmutype == MMU_68040) ? \
+                           (1 << 18 /* SG4_SHIFT2 */) : (1 << SEGSHIFT))
+                                       /* bytes/segment */
 #define        SEGOFSET        (NBSEG-1)       /* byte offset into segment */
 
 #define        UPAGES          2               /* pages of u-area */
diff -r 9f810fce88e2 -r 3842689d287c sys/arch/atari/include/param.h
--- a/sys/arch/atari/include/param.h    Wed Dec 09 06:20:13 2009 +0000
+++ b/sys/arch/atari/include/param.h    Wed Dec 09 12:21:58 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.31 2008/01/03 01:02:04 joerg Exp $ */
+/*     $NetBSD: param.h,v 1.32 2009/12/09 12:21:58 tsutsui Exp $       */
 
 /*
  * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -89,10 +89,10 @@
 #define        KERNBASE        0x00000000      /* start of kernel virtual */
 
 #define        SEGSHIFT        24              /* LOG2(NBSEG) [68030 value] */
-/* bytes/segment */
-/* (256 * (1 << PGSHIFT)) == (1 << SEGSHIFT) */
+
 #define        NBSEG           ((mmutype == MMU_68040) \
-                           ? (32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT)))
+                           ? (1 << 18 /* SG4_SHIFT2 */) : (1 << SEGSHIFT))
+                                       /* bytes/segment */
 #define        SEGOFSET        (NBSEG-1)       /* byte offset into segment */
 
 #define        UPAGES          2               /* pages of u-area */
diff -r 9f810fce88e2 -r 3842689d287c sys/arch/cesfic/include/param.h
--- a/sys/arch/cesfic/include/param.h   Wed Dec 09 06:20:13 2009 +0000
+++ b/sys/arch/cesfic/include/param.h   Wed Dec 09 12:21:58 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.8 2009/03/14 14:45:58 dsl Exp $    */
+/*     $NetBSD: param.h,v 1.9 2009/12/09 12:21:58 tsutsui Exp $        */
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -101,10 +101,10 @@
 #if defined(M68030) && !defined(M68040) && !defined(M68060)
 #define NBSEG          (1 << SEGSHIFT) /* bytes/segment */
 #elif (defined(M68040) || defined(M68060)) && !defined(M68030)
-#define        NBSEG           (32 * (1 << PGSHIFT))
+#define        NBSEG           (1 << 18 /* SG4_SHIFT2 */)
 #else
 #define        NBSEG           ((mmutype == MMU_68040) ? \
-                               (32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT)))
+                           (1 << 18 /* SG4_SHIFT2 */) : (1 << SEGSHIFT))
 #endif
 #define        SEGOFSET        (NBSEG-1)       /* byte offset into segment */
 
diff -r 9f810fce88e2 -r 3842689d287c sys/arch/hp300/include/param.h
--- a/sys/arch/hp300/include/param.h    Wed Dec 09 06:20:13 2009 +0000
+++ b/sys/arch/hp300/include/param.h    Wed Dec 09 12:21:58 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.49 2007/12/31 13:38:50 ad Exp $    */
+/*     $NetBSD: param.h,v 1.50 2009/12/09 12:21:58 tsutsui Exp $       */
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -92,10 +92,10 @@
 #if defined(M68030) && !defined(M68040) && !defined(M68060)
 #define NBSEG          (1 << SEGSHIFT) /* bytes/segment */
 #elif (defined(M68040) || defined(M68060)) && !defined(M68030)
-#define        NBSEG           (32 * (1 << PGSHIFT))
+#define        NBSEG           (1 << 18 /* SG4_SHIFT2 */)
 #else
 #define        NBSEG           ((mmutype == MMU_68040) ? \
-                               (32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT)))
+                           (1 << 18 /* SG4_SHIFT2 */) : (1 << SEGSHIFT))
 #endif
 #define        SEGOFSET        (NBSEG-1)       /* byte offset into segment */
 
diff -r 9f810fce88e2 -r 3842689d287c sys/arch/luna68k/include/param.h
--- a/sys/arch/luna68k/include/param.h  Wed Dec 09 06:20:13 2009 +0000
+++ b/sys/arch/luna68k/include/param.h  Wed Dec 09 12:21:58 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.8 2009/03/14 14:46:01 dsl Exp $ */
+/* $NetBSD: param.h,v 1.9 2009/12/09 12:21:58 tsutsui Exp $ */
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -89,10 +89,10 @@
 #if defined(M68030) && !defined(M68040) && !defined(M68060)
 #define NBSEG          (1 << SEGSHIFT) /* bytes/segment */
 #elif (defined(M68040) || defined(M68060)) && !defined(M68030)
-#define        NBSEG           (32 * (1 << PGSHIFT))
+#define        NBSEG           (1 << 18 /* SG4_SHIFT2 */)
 #else
 #define        NBSEG           ((mmutype == MMU_68040) ? \
-                               (32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT)))
+                           (1 << 18 /* SG4_SHIFT2 */) : (1 << SEGSHIFT))
 #endif
 #define SEGOFSET       (NBSEG-1)       /* byte offset into segment */
 
diff -r 9f810fce88e2 -r 3842689d287c sys/arch/mac68k/include/param.h
--- a/sys/arch/mac68k/include/param.h   Wed Dec 09 06:20:13 2009 +0000
+++ b/sys/arch/mac68k/include/param.h   Wed Dec 09 12:21:58 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.41 2005/12/11 12:18:03 christos Exp $      */
+/*     $NetBSD: param.h,v 1.42 2009/12/09 12:21:58 tsutsui Exp $       */
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -127,10 +127,10 @@
 #if defined(M68030) && !defined(M68040) && !defined(M68060)
 #define NBSEG          (1 << SEGSHIFT) /* bytes/segment */
 #elif (defined(M68040) || defined(M68060)) && !defined(M68030)
-#define        NBSEG           (32 * (1 << PGSHIFT))
+#define        NBSEG           (1 << 18 /* SG4_SHIFT2 */)
 #else
 #define        NBSEG           ((mmutype == MMU_68040) ? \
-                               (32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT)))
+                           (1 << 18 /* SG4_SHIFT2 */) : (1 << SEGSHIFT))
 #endif
 #define        SEGOFSET        (NBSEG-1)       /* byte offset into segment */
 
diff -r 9f810fce88e2 -r 3842689d287c sys/arch/mvme68k/include/param.h
--- a/sys/arch/mvme68k/include/param.h  Wed Dec 09 06:20:13 2009 +0000
+++ b/sys/arch/mvme68k/include/param.h  Wed Dec 09 12:21:58 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.29 2008/01/12 09:54:28 tsutsui Exp $       */
+/*     $NetBSD: param.h,v 1.30 2009/12/09 12:21:58 tsutsui Exp $       */
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -99,10 +99,10 @@
 #if defined(M68030) && !defined(M68040) && !defined(M68060)
 #define NBSEG          (1 << SEGSHIFT) /* bytes/segment */
 #elif (defined(M68040) || defined(M68060)) && !defined(M68030)
-#define        NBSEG           (32 * (1 << PGSHIFT))
+#define        NBSEG           (1 << 18 /* SG4_SHIFT2 */)
 #else
 #define        NBSEG           ((mmutype == MMU_68040) ? \
-                               (32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT)))
+                           (1 << 18 /* SG4_SHIFT2 */) : (1 << SEGSHIFT))
 #endif
 #define        SEGOFSET        (NBSEG-1)       /* byte offset into segment */
 
diff -r 9f810fce88e2 -r 3842689d287c sys/arch/news68k/include/param.h
--- a/sys/arch/news68k/include/param.h  Wed Dec 09 06:20:13 2009 +0000
+++ b/sys/arch/news68k/include/param.h  Wed Dec 09 12:21:58 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.12 2007/12/31 13:38:52 ad Exp $    */
+/*     $NetBSD: param.h,v 1.13 2009/12/09 12:21:58 tsutsui Exp $       */
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -90,13 +90,14 @@
 #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 */
 #elif (defined(M68040) || defined(M68060)) && !defined(M68030)
-#define        NBSEG           (32 * (1 << PGSHIFT))
+#define        NBSEG           (1 << 18 /* SG4_SHIFT2 */)
 #else
 #define        NBSEG           ((mmutype == MMU_68040) ? \
-                               (32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT)))
+                           (1 << 18 /* SG4_SHIFT2 */) : (1 << SEGSHIFT))
 #endif
 #define        SEGOFSET        (NBSEG-1)       /* byte offset into segment */
 
diff -r 9f810fce88e2 -r 3842689d287c sys/arch/next68k/include/param.h
--- a/sys/arch/next68k/include/param.h  Wed Dec 09 06:20:13 2009 +0000
+++ b/sys/arch/next68k/include/param.h  Wed Dec 09 12:21:58 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.8 2005/12/11 12:18:25 christos Exp $       */
+/*     $NetBSD: param.h,v 1.9 2009/12/09 12:21:59 tsutsui Exp $        */
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -92,10 +92,10 @@
 #if defined(M68030) && !defined(M68040) && !defined(M68060)
 #define NBSEG          (1 << SEGSHIFT) /* bytes/segment */
 #elif (defined(M68040) || defined(M68060)) && !defined(M68030)
-#define        NBSEG           (32 * (1 << PGSHIFT))
+#define        NBSEG           (1 << 18 /* SG4_SHIFT2 */)
 #else
 #define        NBSEG           ((mmutype == MMU_68040) ? \
-                               (32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT)))
+                           (1 << 18 /* SG4_SHIFT2 */) : (1 << SEGSHIFT))
 #endif
 #define        SEGOFSET        (NBSEG-1)       /* byte offset into segment */
 
diff -r 9f810fce88e2 -r 3842689d287c sys/arch/x68k/include/param.h
--- a/sys/arch/x68k/include/param.h     Wed Dec 09 06:20:13 2009 +0000
+++ b/sys/arch/x68k/include/param.h     Wed Dec 09 12:21:58 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.24 2007/12/31 13:38:53 ad Exp $    */
+/*     $NetBSD: param.h,v 1.25 2009/12/09 12:21:59 tsutsui Exp $       */
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -92,10 +92,10 @@
 #if defined(M68030) && !defined(M68040) && !defined(M68060)
 #define NBSEG          (1 << SEGSHIFT) /* bytes/segment */
 #elif (defined(M68040) || defined(M68060)) && !defined(M68030)
-#define        NBSEG           (32 * (1 << PGSHIFT))
+#define        NBSEG           (1 << 18 /* SG4_SHIFT2 */)
 #else
 #define        NBSEG           ((mmutype == MMU_68040) ? \
-                               (32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT)))
+                           (1 << 18 /* SG4_SHIFT2 */) : (1 << SEGSHIFT))
 #endif
 #define        SEGOFSET        (NBSEG-1)       /* byte offset into segment */
 



Home | Main Index | Thread Index | Old Index