T154: mask out vregion flag for arm
authorSimon Gerber <simon.gerber@inf.ethz.ch>
Fri, 14 Aug 2015 15:00:47 +0000 (17:00 +0200)
committerSimon Gerber <simon.gerber@inf.ethz.ch>
Fri, 14 Aug 2015 15:25:02 +0000 (17:25 +0200)
Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

lib/barrelfish/arch/arm/pmap_arch.c

index f4f3359..293c6ad 100644 (file)
@@ -87,7 +87,7 @@
 static inline uintptr_t
 vregion_flags_to_kpi_paging_flags(vregion_flags_t flags)
 {
-    STATIC_ASSERT(0xff == VREGION_FLAGS_MASK, "");
+    STATIC_ASSERT(0x1ff == VREGION_FLAGS_MASK, "");
     STATIC_ASSERT(0x0f == KPI_PAGING_FLAGS_MASK, "");
     STATIC_ASSERT(VREGION_FLAGS_READ    == KPI_PAGING_FLAGS_READ,    "");
     STATIC_ASSERT(VREGION_FLAGS_WRITE   == KPI_PAGING_FLAGS_WRITE,   "");
@@ -97,6 +97,10 @@ vregion_flags_to_kpi_paging_flags(vregion_flags_t flags)
         // XXX: ignore MPB flag on ARM, otherwise the assert below fires -AB
         flags &= ~VREGION_FLAGS_MPB;
     }
+    if ((flags & VREGION_FLAGS_WRITE_COMBINING) != 0) {
+        // XXX mask out write-combining flag on ARM
+        flags &= ~VREGION_FLAGS_WRITE_COMBINING;
+    }
     if ((flags & VREGION_FLAGS_GUARD) != 0) {
         flags = 0;
     }