diff options
author | Etienne Carriere <etienne.carriere@linaro.org> | 2017-03-17 12:46:42 +0100 |
---|---|---|
committer | Etienne Carriere <etienne.carriere@linaro.org> | 2017-03-17 14:36:25 +0100 |
commit | 7734f8f01a851f90112b4c90c4aaa8d6be4b0f07 (patch) | |
tree | e76e23de08d0b17a9cd09f708402138f4591cb3f /core/arch/arm/include/mm/core_mmu.h | |
parent | d5c7fcbdaf414dbf9d5937a315119d5030e99659 (diff) |
core: platform registers SDP memories
Secure data path support is conditioned to CFG_SECURE_DATA_PATH.
Core statically defines the SDP shared memory objects through macro
register_sdp_shm().
Configuration directives CFG_TEE_SDP_SHM_BASE/_SIZE allow to register
a "default" SDP memory area from generic implementation.
SDP memories are not default map in OP-TEE core hence locations
are not tested against OP-TEE memory layout. This change verifies
the SDP memories layout against OP-TEE memory mapping memory. This
is mandatory to prevent false identification of memory references
if referring only to the list of the registered SDP memories when
identifying a memory reference (later changes for SDP support).
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Diffstat (limited to 'core/arch/arm/include/mm/core_mmu.h')
-rw-r--r-- | core/arch/arm/include/mm/core_mmu.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/arch/arm/include/mm/core_mmu.h b/core/arch/arm/include/mm/core_mmu.h index d9f96d4e..4515350c 100644 --- a/core/arch/arm/include/mm/core_mmu.h +++ b/core/arch/arm/include/mm/core_mmu.h @@ -100,6 +100,7 @@ enum teecore_memtypes { MEM_AREA_IO_SEC, MEM_AREA_RES_VASPACE, MEM_AREA_TA_VASPACE, + MEM_AREA_SDP_MEM, MEM_AREA_MAXTYPE }; @@ -115,6 +116,13 @@ struct core_mmu_phys_mem { __used __section("phys_mem_map_section") = \ { #addr, (type), (addr), (size) } +#define __register_sdp_mem2(pa, sz, id) \ + static const struct core_mmu_phys_mem __phys_sdp_mem_ ## id \ + __used __section("phys_sdp_mem_section") = \ + { .type = MEM_AREA_SDP_MEM, .addr = (pa), .size = (sz), } + +#define __register_sdp_mem1(pa, sz, id) __register_sdp_mem2(pa, sz, id) +#define register_sdp_mem(pa, sz) __register_sdp_mem1(pa, sz, __COUNTER__) /* Default NSec shared memory allocated from NSec world */ extern unsigned long default_nsec_shm_paddr; |