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 Deal with an `unimplemented flush' trap...



details:   https://anonhg.NetBSD.org/src/rev/768baba7791c
branches:  trunk
changeset: 540507:768baba7791c
user:      pk <pk%NetBSD.org@localhost>
date:      Tue Dec 17 10:04:19 2002 +0000

description:
Deal with an `unimplemented flush' trap from kernel mode.

diffstat:

 sys/arch/sparc/sparc/trap.c |  18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diffs (32 lines):

diff -r 3d2f72b94651 -r 768baba7791c sys/arch/sparc/sparc/trap.c
--- a/sys/arch/sparc/sparc/trap.c       Tue Dec 17 08:32:12 2002 +0000
+++ b/sys/arch/sparc/sparc/trap.c       Tue Dec 17 10:04:19 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.114 2002/12/14 14:52:24 christos Exp $ */
+/*     $NetBSD: trap.c,v 1.115 2002/12/17 10:04:19 pk Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -304,6 +304,22 @@
                        return;
                }
 #endif
+               if (type == T_UNIMPLFLUSH) {
+                       /*
+                        * This should happen only on hypersparc.
+                        * It also is a rare event to get this trap
+                        * from kernel space. For now, just flush the
+                        * entire I-cache.
+                        */
+                       (*cpuinfo.pure_vcache_flush)();
+#if defined(MULTIPROCESSOR)
+                       /* Broadcast to other CPUs */
+                       /* e.g. xcall(cpuinfo.pure_vcache_flush, 0, 0, 0, 0);*/
+#endif
+                       ADVANCE;
+                       return;
+               }
+
                /*
                 * Storing %fsr in cpu_attach will cause this trap
                 * even though the fpu has been enabled, if and only



Home | Main Index | Thread Index | Old Index