diff options
author | Haojian Zhuang <haojian.zhuang@linaro.org> | 2018-01-28 23:00:15 +0800 |
---|---|---|
committer | Haojian Zhuang <haojian.zhuang@linaro.org> | 2018-01-30 09:06:23 +0800 |
commit | cde9f4f41fd0fbdc740dbec91ed6848f0f6aa1b7 (patch) | |
tree | 1a072539ccb079759aed5c328ce7a74bce345bed /plat/hisilicon | |
parent | e47541ac6ef58b213fd915253e16e6fa1ae3b4a9 (diff) |
hikey: 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 MAP_OPTEE_PAGEABLE isn't used in SRAM case, just remove it.
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Diffstat (limited to 'plat/hisilicon')
-rw-r--r-- | plat/hisilicon/hikey/aarch64/hikey_common.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/plat/hisilicon/hikey/aarch64/hikey_common.c b/plat/hisilicon/hikey/aarch64/hikey_common.c index d5b63cc6..448857c2 100644 --- a/plat/hisilicon/hikey/aarch64/hikey_common.c +++ b/plat/hisilicon/hikey/aarch64/hikey_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 */ @@ -17,7 +17,7 @@ #include "../hikey_def.h" #define MAP_DDR MAP_REGION_FLAT(DDR_BASE, \ - DDR_SIZE, \ + DDR_SIZE - DDR_SEC_SIZE, \ MT_DEVICE | MT_RW | MT_NS) #define MAP_DEVICE MAP_REGION_FLAT(DEVICE_BASE, \ @@ -28,15 +28,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( \ - HIKEY_OPTEE_PAGEABLE_LOAD_BASE, \ - HIKEY_OPTEE_PAGEABLE_LOAD_SIZE, \ - MT_MEMORY | MT_RW | MT_SECURE) -#endif -#endif - #define MAP_ROM_PARAM MAP_REGION_FLAT(XG2RAM0_BASE, \ BL1_XG2RAM0_OFFSET, \ MT_DEVICE | MT_RO | MT_SECURE) @@ -73,11 +64,6 @@ static const mmap_region_t hikey_mmap[] = { MAP_DDR, MAP_DEVICE, MAP_TSP_MEM, -#if LOAD_IMAGE_V2 -#ifdef SPD_opteed - MAP_OPTEE_PAGEABLE, -#endif -#endif {0} }; #endif |