Commit cde9f4f4 authored by Haojian Zhuang's avatar Haojian Zhuang
Browse files

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: default avatarHaojian Zhuang <haojian.zhuang@linaro.org>
parent e47541ac
/* /*
* 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 * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include "../hikey_def.h" #include "../hikey_def.h"
#define MAP_DDR MAP_REGION_FLAT(DDR_BASE, \ #define MAP_DDR MAP_REGION_FLAT(DDR_BASE, \
DDR_SIZE, \ DDR_SIZE - DDR_SEC_SIZE, \
MT_DEVICE | MT_RW | MT_NS) MT_DEVICE | MT_RW | MT_NS)
#define MAP_DEVICE MAP_REGION_FLAT(DEVICE_BASE, \ #define MAP_DEVICE MAP_REGION_FLAT(DEVICE_BASE, \
...@@ -28,15 +28,6 @@ ...@@ -28,15 +28,6 @@
TSP_SEC_MEM_SIZE, \ TSP_SEC_MEM_SIZE, \
MT_MEMORY | MT_RW | MT_SECURE) 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, \ #define MAP_ROM_PARAM MAP_REGION_FLAT(XG2RAM0_BASE, \
BL1_XG2RAM0_OFFSET, \ BL1_XG2RAM0_OFFSET, \
MT_DEVICE | MT_RO | MT_SECURE) MT_DEVICE | MT_RO | MT_SECURE)
...@@ -73,11 +64,6 @@ static const mmap_region_t hikey_mmap[] = { ...@@ -73,11 +64,6 @@ static const mmap_region_t hikey_mmap[] = {
MAP_DDR, MAP_DDR,
MAP_DEVICE, MAP_DEVICE,
MAP_TSP_MEM, MAP_TSP_MEM,
#if LOAD_IMAGE_V2
#ifdef SPD_opteed
MAP_OPTEE_PAGEABLE,
#endif
#endif
{0} {0}
}; };
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment