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 Temporary work-around in pmap_enter on ...



details:   https://anonhg.NetBSD.org/src/rev/47a8444b02ca
branches:  trunk
changeset: 473007:47a8444b02ca
user:      pk <pk%NetBSD.org@localhost>
date:      Sun May 16 16:48:59 1999 +0000

description:
Temporary work-around in pmap_enter on 4/400 machines: pre-allocate
MMU region cookies. This keeps the machine from crashing when running
in user mode.
TODO: fix the bugs then kill or alter this work-around.

diffstat:

 sys/arch/sparc/sparc/pmap.c |  21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diffs (35 lines):

diff -r 04a4da7d2d75 -r 47a8444b02ca sys/arch/sparc/sparc/pmap.c
--- a/sys/arch/sparc/sparc/pmap.c       Sun May 16 16:37:45 1999 +0000
+++ b/sys/arch/sparc/sparc/pmap.c       Sun May 16 16:48:59 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.143 1999/05/16 16:37:45 pk Exp $ */
+/*     $NetBSD: pmap.c,v 1.144 1999/05/16 16:48:59 pk Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -5473,6 +5473,25 @@
                rp->rg_nsegmap = 0;
                for (i = NSEGRG; --i >= 0;)
                        sp++->sg_pmeg = seginval;
+#if defined(SUN4_MMU3L)
+/*
+ * XXX - preallocate the region MMU cookies.
+ * XXX - Doing this keeps the machine running for a while
+ * XXX - Remove or alter this after dealing with the bugs...
+ */
+               if (HASSUN4_MMU3L) {
+                       vaddr_t tva;
+                       rp->rg_smeg = region_alloc(&region_lru, pm, vr)->me_cookie;
+                       setregmap(va, rp->rg_smeg);
+
+                       tva = VA_ROUNDDOWNTOREG(va);
+                       for (i = 0; i < NSEGRG; i++) {
+                               setsegmap(tva, seginval);
+                               tva += NBPSG;
+                       };
+               }
+/* XXX  - end of work-around */
+#endif
        }
 
        sp = &rp->rg_segmap[vs];



Home | Main Index | Thread Index | Old Index