summaryrefslogtreecommitdiffstats
path: root/sys/arm/include
diff options
context:
space:
mode:
authorraj <raj@FreeBSD.org>2013-08-19 15:12:36 +0000
committerraj <raj@FreeBSD.org>2013-08-19 15:12:36 +0000
commitf8dbb3733064c4c7263aa0400a160e7dbf884b13 (patch)
tree618d2609e80cc2f3621e002514cd5ff5ed30f33c /sys/arm/include
parent38347b87b7dc2ee6361eaeb08ca120ccf21fa5ce (diff)
downloadFreeBSD-src-f8dbb3733064c4c7263aa0400a160e7dbf884b13.zip
FreeBSD-src-f8dbb3733064c4c7263aa0400a160e7dbf884b13.tar.gz
Clear all L2 PTE protection bits before their configuration.
Revise L2_S_PROT_MASK to include all of the protection bits. Notice that clearing these bits does not always take away the corresponding permissions (for example, permission is granted when the bit is cleared). The bits are cleared but are to be set or left cleared accordingly in pmap_set_prot(), pmap_enter_locked(), etc. Clear L2_XN along with L2_S_PROT_MASK in pmap_set_prot() so that all permissions related bits are cleared before actual configuration. Submitted by: Zbigniew Bodek <zbb@semihalf.com> Reviewed by: gber Sponsored by: The FreeBSD Foundation, Semihalf
Diffstat (limited to 'sys/arm/include')
-rw-r--r--sys/arm/include/pmap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/arm/include/pmap.h b/sys/arm/include/pmap.h
index ec40682..b416169 100644
--- a/sys/arm/include/pmap.h
+++ b/sys/arm/include/pmap.h
@@ -390,7 +390,7 @@ extern int pmap_needs_pte_sync;
#define L2_S_PROT_U (L2_AP0(2)) /* user read */
#define L2_S_REF (L2_AP0(1)) /* reference flag */
-#define L2_S_PROT_MASK (L2_S_PROT_U|L2_S_PROT_R)
+#define L2_S_PROT_MASK (L2_S_PROT_U|L2_S_PROT_R|L2_APX)
#define L2_S_EXECUTABLE(pte) (!(pte & L2_XN))
#define L2_S_WRITABLE(pte) (!(pte & L2_APX))
#define L2_S_REFERENCED(pte) (!!(pte & L2_S_REF))
OpenPOWER on IntegriCloud