From 1efe2578c00e18cfc409f2ecfd95118f95a0d69c Mon Sep 17 00:00:00 2001 From: Tristan Shieh Date: Thu, 9 Aug 2018 15:14:15 +0800 Subject: mediatek: Map SRAM as secure and cached memory This patch changes the mapping of SRAM from non-secure to secure. Without this patch, mmu_config_range() can not work when MMU is enabled. The new config is still in non-secure cache since TTB section is allocated in SRAM which is mapped as non-secure. BUG=b:80501386 TEST=Boots correctly on Kukui and Elm Change-Id: Ia5b8716cfcca64d1d716a177225ea2f7ac2920a6 Signed-off-by: Tristan Shieh Reviewed-on: https://review.coreboot.org/27974 Tested-by: build bot (Jenkins) Reviewed-by: Hung-Te Lin Reviewed-by: Julius Werner --- src/soc/mediatek/common/include/soc/mmu_operations.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/soc/mediatek/common/include') diff --git a/src/soc/mediatek/common/include/soc/mmu_operations.h b/src/soc/mediatek/common/include/soc/mmu_operations.h index b081690451..79c3ea022b 100644 --- a/src/soc/mediatek/common/include/soc/mmu_operations.h +++ b/src/soc/mediatek/common/include/soc/mmu_operations.h @@ -19,10 +19,11 @@ #include enum { - DEV_MEM = MA_DEV | MA_S | MA_RW, - CACHED_MEM = MA_MEM | MA_NS | MA_RW, - SECURE_MEM = MA_MEM | MA_S | MA_RW, - UNCACHED_MEM = MA_MEM | MA_NS | MA_RW | MA_MEM_NC, + DEV_MEM = MA_DEV | MA_S | MA_RW, + SECURE_CACHED_MEM = MA_MEM | MA_S | MA_RW, + SECURE_UNCACHED_MEM = MA_MEM | MA_S | MA_RW | MA_MEM_NC, + NONSECURE_CACHED_MEM = MA_MEM | MA_NS | MA_RW, + NONSECURE_UNCACHED_MEM = MA_MEM | MA_NS | MA_RW | MA_MEM_NC, }; extern unsigned char _sram_l2c[]; -- cgit v1.2.3