svn commit: r304706 - projects/powernv/powerpc/aim

Nathan Whitehorn nwhitehorn at FreeBSD.org
Tue Aug 23 21:40:33 UTC 2016


Author: nwhitehorn
Date: Tue Aug 23 21:40:32 2016
New Revision: 304706
URL: https://svnweb.freebsd.org/changeset/base/304706

Log:
  Use the correct value of the IS selector in tlbiel when flushing the TLB.
  The way-based mechanism (IS=11) on newer CPUs can in principle cause problems
  on older ones, so use a CPU-dependent selection.

Modified:
  projects/powernv/powerpc/aim/moea64_native.c

Modified: projects/powernv/powerpc/aim/moea64_native.c
==============================================================================
--- projects/powernv/powerpc/aim/moea64_native.c	Tue Aug 23 21:34:36 2016	(r304705)
+++ projects/powernv/powerpc/aim/moea64_native.c	Tue Aug 23 21:40:32 2016	(r304706)
@@ -465,9 +465,23 @@ tlbia(void)
 	register_t msr, scratch;
 	#endif
 
+	i = 0xc00; /* IS = 11 */
+	switch (mfpvr() >> 16) {
+	case IBM970:
+	case IBM970FX:
+	case IBM970MP:
+	case IBM970GX:
+	case IBMPOWER4:
+	case IBMPOWER4PLUS:
+	case IBMPOWER5:
+	case IBMPOWER5PLUS:
+		i = 0; /* IS not supported */
+		break;
+	}
+
 	TLBSYNC();
 
-	for (i = 0x800 /* IS=10 */; i < 0xFF000; i += 0x00001000) {
+	for (; i < 0x200000; i += 0x00001000) {
 		#ifdef __powerpc64__
 		__asm __volatile("tlbiel %0" :: "r"(i));
 		#else


More information about the svn-src-projects mailing list