Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc/sparc Disable `unimplemented flush' traps dur...



details:   https://anonhg.NetBSD.org/src/rev/4f3d7528caaf
branches:  trunk
changeset: 540468:4f3d7528caaf
user:      pk <pk%NetBSD.org@localhost>
date:      Sun Dec 15 15:01:08 2002 +0000

description:
Disable `unimplemented flush' traps during boot. Keep it disabled on
non-MULTIPROCESSOR kernels.

diffstat:

 sys/arch/sparc/sparc/cache.c |   6 +++++-
 sys/arch/sparc/sparc/cpu.c   |  11 +++++++++--
 2 files changed, 14 insertions(+), 3 deletions(-)

diffs (47 lines):

diff -r f71d04c6bffb -r 4f3d7528caaf sys/arch/sparc/sparc/cache.c
--- a/sys/arch/sparc/sparc/cache.c      Sun Dec 15 09:24:24 2002 +0000
+++ b/sys/arch/sparc/sparc/cache.c      Sun Dec 15 15:01:08 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cache.c,v 1.63 2002/07/29 06:39:41 grant Exp $ */
+/*     $NetBSD: cache.c,v 1.64 2002/12/15 15:01:08 pk Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -230,7 +230,11 @@
         * Enable instruction cache and, on single-processor machines,
         * disable `Unimplemented Flush Traps'.
         */
+#if defined(MULTIPROCESSOR)
        v = HYPERSPARC_ICCR_ICE | (ncpu == 1 ? HYPERSPARC_ICCR_FTD : 0);
+#else
+       v = HYPERSPARC_ICCR_ICE | HYPERSPARC_ICCR_FTD);
+#endif
        wrasr(v, HYPERSPARC_ASRNUM_ICCR);
 }
 
diff -r f71d04c6bffb -r 4f3d7528caaf sys/arch/sparc/sparc/cpu.c
--- a/sys/arch/sparc/sparc/cpu.c        Sun Dec 15 09:24:24 2002 +0000
+++ b/sys/arch/sparc/sparc/cpu.c        Sun Dec 15 15:01:08 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.137 2002/11/29 08:29:57 pk Exp $ */
+/*     $NetBSD: cpu.c,v 1.138 2002/12/15 15:01:08 pk Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -1348,8 +1348,15 @@
        int     node;
 {
        sc->cpu_type = CPUTYP_HS_MBUS;/*XXX*/
-       if (node == 0)
+
+       if (node == 0) {
+               /* Flush I-cache */
                sta(0, ASI_HICACHECLR, 0);
+
+               /* Disable `unimplemented flush' traps during boot-up */
+               wrasr(rdasr(HYPERSPARC_ASRNUM_ICCR) | HYPERSPARC_ICCR_FTD,
+                       HYPERSPARC_ASRNUM_ICCR);
+       }
 }
 
 void



Home | Main Index | Thread Index | Old Index