Subject: pmap for 68K/ColdFire
To: None <port-m68k@netbsd.org, tech-kern@netbsd.org>
From: KIYOHARA Takashi <kiyohara@kk.iij4u.or.jp>
List: port-m68k
Date: 05/21/2007 02:50:04
Hi! all,


I have a M5475EVB board with MCF5475 (68K/ColdFire CFV4e).  This has
32-entries [ID]TLBs on MMU.  However the MMU of MC680x0 hasn't TLB.
Moreover, the flag of PTE is different.

I am coordinating m68k/m68k/pmap_motorola.c now.  However, should need
pte.c for us for ColdFire?  (For instance, m68k/coldfire/pmap.c)


@@ -1112,7 +1186,18 @@
 #endif
                                pmap_pte_set_prot(pte, isro);
                                if (needtflush)
+#if defined(CFV4E)
+#if defined(M68020) || defined(M68030) || defined(M68040) || defined(M68060)
+                                       if (mmutype == MMU_CFV4E)
+                                               tlb_enter(sva, pte);
+                                       else
+                                               TBIS(sva);
+#else
+                                       tlb_enter(sva, pte);
+#endif
+#else
                                        TBIS(sva);
+#endif
                                firstpage = FALSE;
                        }
                        pte++;


By the way, the substrate of 68K/ColdFire for Amiga was sold.  I think
that it should judge mmutype to support MC680x0 and 68K/ColdFire by a
one kernel.  To the way of m68k/{m68k/cacheops.c,include/cacheops*.h.

Please your nice idea.  ;-)

Thanks,
--
kiyohara