Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Sep 2014 18:17:44 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r271327 - in stable/10/sys/arm: arm include
Message-ID:  <201409091817.s89IHiBd007876@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian
Date: Tue Sep  9 18:17:43 2014
New Revision: 271327
URL: http://svnweb.freebsd.org/changeset/base/271327

Log:
  MFC r270862, r270878: MMU fixes for kernel startup.
  
    Fix the handling of MMU type in the AP entry code.  The ARM_MMU_V6/V7
    symbols are always #defined to 0 or 1, so use #if SYM not #if defined(SYM).
    Also, it helps if you include the header file that defines the symbols.
  
    The Marvell PJ4B cpu family is armv7, not armv6.
  
  Approved by:	re(gjb)

Modified:
  stable/10/sys/arm/arm/locore.S
  stable/10/sys/arm/include/cpuconf.h

Modified: stable/10/sys/arm/arm/locore.S
==============================================================================
--- stable/10/sys/arm/arm/locore.S	Tue Sep  9 17:52:27 2014	(r271326)
+++ stable/10/sys/arm/arm/locore.S	Tue Sep  9 18:17:43 2014	(r271327)
@@ -37,6 +37,7 @@
 #include <sys/syscall.h>
 #include <machine/asm.h>
 #include <machine/armreg.h>
+#include <machine/cpuconf.h>
 #include <machine/pte.h>
 
 __FBSDID("$FreeBSD$");
@@ -365,9 +366,9 @@ ASENTRY_NP(mpentry)
 	nop
 	CPWAIT(r0)
 
-#if defined(ARM_MMU_V6)
+#if ARM_MMU_V6
 	bl	armv6_idcache_inv_all	/* Modifies r0 only */
-#elif defined(ARM_MMU_V7)
+#elif ARM_MMU_V7
 	bl	armv7_idcache_inv_all	/* Modifies r0-r3, ip */
 #endif
 

Modified: stable/10/sys/arm/include/cpuconf.h
==============================================================================
--- stable/10/sys/arm/include/cpuconf.h	Tue Sep  9 17:52:27 2014	(r271326)
+++ stable/10/sys/arm/include/cpuconf.h	Tue Sep  9 18:17:43 2014	(r271327)
@@ -135,13 +135,13 @@
 #define	ARM_MMU_GENERIC		0
 #endif
 
-#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_MV_PJ4B)
+#if defined(CPU_ARM1136) || defined(CPU_ARM1176)
 #define ARM_MMU_V6		1
 #else
 #define ARM_MMU_V6		0
 #endif
 
-#if defined(CPU_CORTEXA) || defined(CPU_KRAIT)
+#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) || defined(CPU_MV_PJ4B)
 #define ARM_MMU_V7		1
 #else
 #define ARM_MMU_V7		0



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409091817.s89IHiBd007876>