Commit 47d1773f authored by Konstantin Porotchkin's avatar Konstantin Porotchkin Committed by Marcin Wojtas
Browse files

plat: marvell: armada: a8k: add OP-TEE OS MMU tables



Adjust the latest OP-TEE memory definitions to the
newest TF-A baseline.

Change-Id: Ib9c82b85f868adaf3c7285eb340486bda9c59c36
Signed-off-by: default avatarKonstantin Porotchkin <kostap@marvell.com>
parent 5a40d70f
......@@ -77,20 +77,42 @@
#define MARVELL_IRQ_SEC_SGI_6 14
#define MARVELL_IRQ_SEC_SGI_7 15
#if LLC_SRAM
/* The entire LLC SRAM should be marked as secure in MMU tables,
* otherwise any access to it will produce exception
#ifdef SPD_opteed
/*
* BL2 needs to map 4MB at the end of TZC_DRAM1 in order to
* load/authenticate the trusted os extra image. The first 512KB of
* TZC_DRAM1 are reserved for trusted os (OPTEE). The extra image loading
* for OPTEE is paged image which only include the paging part using
* virtual memory but without "init" data. OPTEE will copy the "init" data
* (from pager image) to the first 512KB of TZC_DRAM, and then copy the
* extra image behind the "init" data.
*/
#define MARVELL_MAP_SECURE_RAM MAP_REGION_FLAT( \
PLAT_MARVELL_LLC_SRAM_BASE,\
PLAT_MARVELL_LLC_SRAM_SIZE,\
#define MARVELL_OPTEE_PAGEABLE_LOAD_BASE \
(PLAT_MARVELL_TRUSTED_RAM_BASE + \
PLAT_MARVELL_TRUSTED_RAM_SIZE - \
MARVELL_OPTEE_PAGEABLE_LOAD_SIZE)
#define MARVELL_OPTEE_PAGEABLE_LOAD_SIZE 0x400000
#define MARVELL_OPTEE_PAGEABLE_LOAD_MEM \
MAP_REGION_FLAT( \
MARVELL_OPTEE_PAGEABLE_LOAD_BASE, \
MARVELL_OPTEE_PAGEABLE_LOAD_SIZE, \
MT_MEMORY | MT_RW | MT_SECURE)
#else
/*
* Map the memory for the OP-TEE core (also known as OP-TEE pager when paging
* support is enabled).
*/
#define MARVELL_MAP_OPTEE_CORE_MEM MAP_REGION_FLAT( \
BL32_BASE, \
BL32_LIMIT - BL32_BASE, \
MT_MEMORY | MT_RW | MT_SECURE)
#endif /* SPD_opteed */
#define MARVELL_MAP_SECURE_RAM MAP_REGION_FLAT( \
MARVELL_SHARED_RAM_BASE, \
MARVELL_SHARED_RAM_SIZE, \
MT_MEMORY | MT_RW | MT_SECURE)
#endif
#define MARVELL_MAP_DRAM MAP_REGION_FLAT( \
MARVELL_DRAM_BASE, \
MARVELL_DRAM_SIZE, \
......
......@@ -28,6 +28,10 @@ const mmap_region_t plat_marvell_mmap[] = {
MARVELL_MAP_SECURE_RAM,
MAP_DEVICE0,
MARVELL_MAP_DRAM,
#ifdef SPD_opteed
MARVELL_MAP_OPTEE_CORE_MEM,
MARVELL_OPTEE_PAGEABLE_LOAD_MEM,
#endif
{0}
};
#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