@@ -56,8 +56,20 @@ static const struct dt_device_match dev_map_attrs[] __initconst =
.data = (void *) (uintptr_t) p2m_mmio_direct_dev,
},
{
+ /*
+ * Although on chip memories are relatively fast compared to
+ * off-chip memories, large on chip memories are still
+ * significantly slower than L1 caches. Depending on the
+ * memory, either cached or uncached may make most sense.
+ *
+ * Also, hardware domains may like to use the memory in a
+ * cache-coherent way to avoid SW managed coherency.
+ *
+ * By mapping it cached at S2, we let hardware domains select
+ * cacheability via S1 mappings.
+ */
__DT_MATCH_COMPATIBLE("mmio-sram"),
- .data = (void *) (uintptr_t) p2m_mmio_direct_nc,
+ .data = (void *) (uintptr_t) p2m_mmio_direct_c,
},
{ /* sentinel */ },
};