]> xenbits.xensource.com Git - people/liuw/freebsd.git/commitdiff
Fix cp15 PAR definition and function. While here, add cp15 ATS1CPW
authorskra <skra@FreeBSD.org>
Tue, 10 Nov 2015 13:20:21 +0000 (13:20 +0000)
committerskra <skra@FreeBSD.org>
Tue, 10 Nov 2015 13:20:21 +0000 (13:20 +0000)
function which checks an address for privileged (PL1) write access.
The function is inlined so it does not bring any cost, but makes
function set for checking privileged access complete.

Approved by: kib (mentor)

sys/arm/include/cpu-v6.h
sys/arm/include/sysreg.h

index 6bc9752df7e12e06ab87f523e30722550717cb24..e7bf62de023241b8257d615fddbfae77153dcf60 100644 (file)
@@ -156,8 +156,9 @@ _RF0(cp15_l2ctlr_get, CP15_L2CTLR(%0))
 _RF0(cp15_actlr_get, CP15_ACTLR(%0))
 _WF1(cp15_actlr_set, CP15_ACTLR(%0))
 #if __ARM_ARCH >= 6
-_WF1(cp15_ats1cpr_set, CP15_ATS1CPR(%0));
-_RF0(cp15_par_get, CP15_PAR);
+_WF1(cp15_ats1cpr_set, CP15_ATS1CPR(%0))
+_WF1(cp15_ats1cpw_set, CP15_ATS1CPW(%0))
+_RF0(cp15_par_get, CP15_PAR(%0))
 _RF0(cp15_sctlr_get, CP15_SCTLR(%0))
 #endif
 
index 31097e9a1650901e006c7f8b5c7bf5d994cc09b8..dc9386943d662502959e4c84ce89725ae9ff0dbd 100644 (file)
 #define        CP15_BPIALLIS           p15, 0, r0, c7, c1,  6 /* Branch predictor invalidate all IS */
 #endif
 
-#define        CP15_PAR                p15, 0, r0, c7, c4,  0 /* Physical Address Register */
+#define        CP15_PAR(rr)            p15, 0, rr, c7, c4,  0 /* Physical Address Register */
 
 #define        CP15_ICIALLU            p15, 0, r0, c7, c5,  0 /* Instruction cache invalidate all PoU */
 #define        CP15_ICIMVAU(rr)        p15, 0, rr, c7, c5,  1 /* Instruction cache invalidate */