ARMv7: Map all init frames shareable (coherent)
authorDaniel Schwyn <daniel.schwyn@inf.ethz.ch>
Fri, 26 Apr 2019 09:33:00 +0000 (11:33 +0200)
committerDaniel Schwyn <daniel.schwyn@inf.ethz.ch>
Fri, 26 Apr 2019 09:33:00 +0000 (11:33 +0200)
Signed-off-by: Daniel Schwyn <daniel.schwyn@inf.ethz.ch>

include/target/arm/barrelfish_kpi/paging_arm_v7.h
kernel/include/arch/armv7/startup_arch.h

index 17c49f4..231e45b 100644 (file)
 #define ARM_L2_TABLE_OFFSET(a)          ((a) & ARM_L2_TABLE_MASK)
 #define ARM_L2_TABLE_PPN(a)             ((a) >> ARM_L2_TABLE_BITS)
 
-#define ARM_L2_SMALL_CACHEABLE          0x008
-#define ARM_L2_SMALL_BUFFERABLE         0x004
+#define ARM_L2_SMALL_SHAREABLE          (1 << 10)
+#define ARM_L2_SMALL_CACHEABLE          (1 << 3)
+#define ARM_L2_SMALL_BUFFERABLE         (1 << 2)
 #define ARM_L2_SMALL_USR_RO             0x20
 #define ARM_L2_SMALL_USR_RW             0x30
-#define ARM_L2_SMALL_USR_NONE            0x10
+#define ARM_L2_SMALL_USR_NONE           0x10
 
 /* Page type independent page options */
 #define KPI_PAGING_FLAGS_READ    0x01
index 154c438..931a8ba 100644 (file)
 #define INIT_L2_PAGES           ((INIT_SPACE_LIMIT - INIT_VBASE) / BASE_PAGE_SIZE)
 #define INIT_L2_BYTES           INIT_L2_PAGES * ARM_L2_BYTES_PER_ENTRY
 
-#define INIT_PERM_RO            (ARM_L2_SMALL_CACHEABLE  | \
+#define INIT_PERM_RO            (ARM_L2_SMALL_SHAREABLE  | \
+                                 ARM_L2_SMALL_CACHEABLE  | \
                                  ARM_L2_SMALL_BUFFERABLE | \
                                  ARM_L2_SMALL_USR_RO)
 
-#define INIT_PERM_RW            (ARM_L2_SMALL_CACHEABLE  | \
+#define INIT_PERM_RW            (ARM_L2_SMALL_SHAREABLE  | \
+                                 ARM_L2_SMALL_CACHEABLE  | \
                                  ARM_L2_SMALL_BUFFERABLE | \
                                  ARM_L2_SMALL_USR_RW)