From 68e2a64181df8c6bfe1c474ea968f1e82e61ccfc Mon Sep 17 00:00:00 2001 From: Varun Wadekar Date: Wed, 8 Jul 2015 12:57:50 +0530 Subject: [PATCH] Tegra: Exclude coherent memory region from memory map This patch sets the 'USE_COHERENT_MEM' flag to '0', so that the coherent memory region will not be included in the memory map. Signed-off-by: Varun Wadekar --- plat/nvidia/tegra/common/tegra_bl31_setup.c | 10 +++++----- plat/nvidia/tegra/common/tegra_common.mk | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/plat/nvidia/tegra/common/tegra_bl31_setup.c b/plat/nvidia/tegra/common/tegra_bl31_setup.c index dea8457bd..87e4ae145 100644 --- a/plat/nvidia/tegra/common/tegra_bl31_setup.c +++ b/plat/nvidia/tegra/common/tegra_bl31_setup.c @@ -196,13 +196,9 @@ void bl31_plat_arch_setup(void) unsigned long total_size = TZDRAM_END - BL31_RO_BASE; unsigned long ro_start = bl31_base_pa; unsigned long ro_size = BL31_RO_LIMIT - BL31_RO_BASE; - unsigned long coh_start = 0; - unsigned long coh_size = 0; const mmap_region_t *plat_mmio_map = NULL; - #if USE_COHERENT_MEM - coh_start = total_base + (BL31_COHERENT_RAM_BASE - BL31_RO_BASE); - coh_size = BL31_COHERENT_RAM_LIMIT - BL31_COHERENT_RAM_BASE; + unsigned long coh_start, coh_size; #endif /* add memory regions */ @@ -212,7 +208,11 @@ void bl31_plat_arch_setup(void) mmap_add_region(ro_start, ro_start, ro_size, MT_MEMORY | MT_RO | MT_SECURE); + #if USE_COHERENT_MEM + coh_start = total_base + (BL31_COHERENT_RAM_BASE - BL31_RO_BASE); + coh_size = BL31_COHERENT_RAM_LIMIT - BL31_COHERENT_RAM_BASE; + mmap_add_region(coh_start, coh_start, coh_size, MT_DEVICE | MT_RW | MT_SECURE); diff --git a/plat/nvidia/tegra/common/tegra_common.mk b/plat/nvidia/tegra/common/tegra_common.mk index 73e128111..5ec52fb2f 100644 --- a/plat/nvidia/tegra/common/tegra_common.mk +++ b/plat/nvidia/tegra/common/tegra_common.mk @@ -34,6 +34,8 @@ $(eval $(call add_define,CRASH_REPORTING)) ASM_ASSERTION := 1 $(eval $(call add_define,ASM_ASSERTION)) +USE_COHERENT_MEM := 0 + PLAT_INCLUDES := -Iplat/nvidia/tegra/include/drivers \ -Iplat/nvidia/tegra/include \ -Iplat/nvidia/tegra/include/${TARGET_SOC}