diff options
author | Haojian Zhuang <haojian.zhuang@linaro.org> | 2018-01-29 12:36:03 +0800 |
---|---|---|
committer | Haojian Zhuang <haojian.zhuang@linaro.org> | 2018-03-05 13:05:18 +0800 |
commit | 8495c03af48ea5fd5becd4d1efbdfe15575b45b5 (patch) | |
tree | 44ca68a321521c78827e78ee9a525f34415a6e2e /plat/hisilicon | |
parent | 17cf8ab1d0ddd6bb28cae09a37a17c82b8561a97 (diff) |
hikey960: fix memory overlapped in memory map
MAP_TSP_MEM could be either in SRAM or DRAM. When MAP_TSP_MEM is in
DRAM, it's overlapped with MAP_DDR.
Since TSP_MEM is always configured in DRAM case, it means
MAP_OPTEE_PAGEABLE is always disabled. Just remove it.
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Diffstat (limited to 'plat/hisilicon')
-rw-r--r-- | plat/hisilicon/hikey960/aarch64/hikey960_common.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/plat/hisilicon/hikey960/aarch64/hikey960_common.c b/plat/hisilicon/hikey960/aarch64/hikey960_common.c index b1020a68..67571ff8 100644 --- a/plat/hisilicon/hikey960/aarch64/hikey960_common.c +++ b/plat/hisilicon/hikey960/aarch64/hikey960_common.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -18,7 +18,7 @@ #include "../hikey960_private.h" #define MAP_DDR MAP_REGION_FLAT(DDR_BASE, \ - DDR_SIZE, \ + DDR_SIZE - DDR_SEC_SIZE, \ MT_MEMORY | MT_RW | MT_NS) #define MAP_DEVICE MAP_REGION_FLAT(DEVICE_BASE, \ @@ -41,15 +41,6 @@ TSP_SEC_MEM_SIZE, \ MT_MEMORY | MT_RW | MT_SECURE) -#if LOAD_IMAGE_V2 -#ifdef SPD_opteed -#define MAP_OPTEE_PAGEABLE MAP_REGION_FLAT( \ - HIKEY960_OPTEE_PAGEABLE_LOAD_BASE, \ - HIKEY960_OPTEE_PAGEABLE_LOAD_SIZE, \ - MT_MEMORY | MT_RW | MT_SECURE) -#endif -#endif - /* * Table of regions for different BL stages to map using the MMU. * This doesn't include Trusted RAM as the 'mem_layout' argument passed to @@ -70,11 +61,6 @@ static const mmap_region_t hikey960_mmap[] = { MAP_DDR, MAP_DEVICE, MAP_TSP_MEM, -#if LOAD_IMAGE_V2 -#ifdef SPD_opteed - MAP_OPTEE_PAGEABLE, -#endif -#endif {0} }; #endif |