diff options
author | ian <ian@FreeBSD.org> | 2014-09-09 18:17:43 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2014-09-09 18:17:43 +0000 |
commit | d8cb26ab278eddf76bb8636d47a82de9f18da67d (patch) | |
tree | d4854c2d7c248d7441a467d455b7b828b2f8a1e8 | |
parent | c32d713587c9fe35966f0218ddbc7b31f43f31ce (diff) | |
download | FreeBSD-src-d8cb26ab278eddf76bb8636d47a82de9f18da67d.zip FreeBSD-src-d8cb26ab278eddf76bb8636d47a82de9f18da67d.tar.gz |
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)
-rw-r--r-- | sys/arm/arm/locore.S | 5 | ||||
-rw-r--r-- | sys/arm/include/cpuconf.h | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/arm/arm/locore.S b/sys/arm/arm/locore.S index 54b17ed..c689916 100644 --- a/sys/arm/arm/locore.S +++ b/sys/arm/arm/locore.S @@ -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 diff --git a/sys/arm/include/cpuconf.h b/sys/arm/include/cpuconf.h index b7cad0d..1f0edba 100644 --- a/sys/arm/include/cpuconf.h +++ b/sys/arm/include/cpuconf.h @@ -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 |