summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/imx8m
diff options
context:
space:
mode:
authorJi Luo <ji.luo@nxp.com>2019-02-27 15:37:05 +0800
committerJi Luo <ji.luo@nxp.com>2019-03-05 15:30:44 +0800
commit584ba4507b6829f1396461d7344e08fa018e588a (patch)
tree1702e369dad2fb0da3f59090eb156aebf2c317e1 /arch/arm/mach-imx/imx8m
parent31928168d048638dd66fded18cfaf8326f7dff10 (diff)
MA-14147-1 Trusty: change the dram attribute to inner shareable
Trusty OS will check and require the memory passed from non-secure world is inner shareable. Change the memory attribute as PTE_BLOCK_INNER_SHARE in u-boot to meet the requirement. Test: build and boot on imx8qm/imx8qxp. Change-Id: I1aac9b430ecc0fa94f9a1f6dd519b34ce6fef7bd Signed-off-by: Ji Luo <ji.luo@nxp.com>
Diffstat (limited to 'arch/arm/mach-imx/imx8m')
-rw-r--r--arch/arm/mach-imx/imx8m/soc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
index c8d2af8f801..6d8c22c27f1 100644
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -128,7 +128,11 @@ static struct mm_region imx8m_mem_map[] = {
.phys = 0x40000000UL,
.size = PHYS_SDRAM_SIZE,
.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
+#ifdef CONFIG_IMX_TRUSTY_OS
+ PTE_BLOCK_INNER_SHARE
+#else
PTE_BLOCK_OUTER_SHARE
+#endif
#if CONFIG_NR_DRAM_BANKS > 1
}, {
/* DRAM2 */
@@ -136,8 +140,12 @@ static struct mm_region imx8m_mem_map[] = {
.phys = 0x100000000UL,
.size = PHYS_SDRAM_2_SIZE,
.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
+#ifdef CONFIG_IMX_TRUSTY_OS
+ PTE_BLOCK_INNER_SHARE
+#else
PTE_BLOCK_OUTER_SHARE
#endif
+#endif
}, {
/* List terminator */
0,