diff options
author | Summer Qin <summer.qin@arm.com> | 2020-04-22 14:55:00 +0800 |
---|---|---|
committer | Ken Liu <ken.liu@arm.com> | 2021-01-21 10:49:11 +0000 |
commit | 2cd2ab7ef1f781a317d8003ae1d13d0eac5d9faf (patch) | |
tree | 069abad389e22afe55c04a60146dfee376143abe /platform/ext/common | |
parent | 2c13c03f12b66f027b4d2a88a5ea7d06ca394b74 (diff) | |
download | trusted-firmware-m-2cd2ab7ef1f781a317d8003ae1d13d0eac5d9faf.tar.gz |
SPRTL: Partition Metadata Pointer [Optional Feature]
Partition Metadata Pointer is used to point to the metadata inside one
partition. This pointer is updated by SPM while scheduling and read by
SPRTL.
This feature is one configurable feature and can be enabled if SPRTL
needs to support partition metadata-based APIs, such as partition
private heap management.
This pointer is put at a writeable area, with the name 'TFM_SP_META_PTR'.
Configure 'TFM_SP_META_PTR' with the last MPU region to minimize the
influence to PERIPHERAL regions.
Change-Id: Iaae5ee8f25f0587c6812cc8f977cfa38f46ecd8c
Signed-off-by: Summer Qin <summer.qin@arm.com>
Diffstat (limited to 'platform/ext/common')
-rw-r--r-- | platform/ext/common/armclang/tfm_common_s.sct | 6 | ||||
-rw-r--r-- | platform/ext/common/gcc/tfm_common_s.ld | 14 | ||||
-rw-r--r-- | platform/ext/common/iar/tfm_common_s.icf | 10 |
3 files changed, 30 insertions, 0 deletions
diff --git a/platform/ext/common/armclang/tfm_common_s.sct b/platform/ext/common/armclang/tfm_common_s.sct index 93d60d1839..4186d09cbd 100644 --- a/platform/ext/common/armclang/tfm_common_s.sct +++ b/platform/ext/common/armclang/tfm_common_s.sct @@ -134,6 +134,12 @@ LR_CODE S_CODE_START S_CODE_SIZE { } #endif /* !defined(TFM_PSA_API) */ +#if defined(TFM_SP_META_PTR_ENABLE) + TFM_SP_META_PTR +0 ALIGN 32 { + *(SP_META_PTR_SPRTL_INST) + } +#endif + /**** APP RoT DATA start here */ /* * This empty, zero long execution region is here to mark the start address diff --git a/platform/ext/common/gcc/tfm_common_s.ld b/platform/ext/common/gcc/tfm_common_s.ld index 61b5b87a7c..3939b6471f 100644 --- a/platform/ext/common/gcc/tfm_common_s.ld +++ b/platform/ext/common/gcc/tfm_common_s.ld @@ -111,6 +111,11 @@ SECTIONS LONG (PSA_PROXY_SHARED_MEMORY_BASE) LONG (PSA_PROXY_SHARED_MEMORY_SIZE) #endif +#if defined(TFM_SP_META_PTR_ENABLE) + LONG (LOADADDR(.TFM_SP_META_PTR)) + LONG (ADDR(.TFM_SP_META_PTR)) + LONG (SIZEOF(.TFM_SP_META_PTR)) +#endif __zero_table_end__ = .; } > FLASH @@ -320,6 +325,15 @@ SECTIONS } > RAM #endif /* TFM_LVL == 1 */ +#if defined(TFM_SP_META_PTR_ENABLE) + .TFM_SP_META_PTR : ALIGN(32) + { + *(SP_META_PTR_SPRTL_INST) + } > RAM + Image$$TFM_SP_META_PTR$$RW$$Base = ADDR(.TFM_SP_META_PTR); + Image$$TFM_SP_META_PTR$$RW$$Limit = ADDR(.TFM_SP_META_PTR) + SIZEOF(.TFM_SP_META_PTR); +#endif + /**** APPLICATION RoT DATA start here */ Image$$TFM_APP_RW_STACK_START$$Base = .; diff --git a/platform/ext/common/iar/tfm_common_s.icf b/platform/ext/common/iar/tfm_common_s.icf index 32bba2c1f9..5d2687cc6d 100644 --- a/platform/ext/common/iar/tfm_common_s.icf +++ b/platform/ext/common/iar/tfm_common_s.icf @@ -97,6 +97,12 @@ define block TFM_SECURE_STACK with size = 0x2000, alignment = 128 {}; keep {block TFM_SECURE_STACK}; #endif /* !defined(TFM_PSA_API) */ +#if defined(TFM_SP_META_PTR_ENABLE) +define block TFM_SP_META_PTR_ENABLE with alignment = 32 { + section SP_META_PTR_SPRTL_INST + }; +#endif + define block TFM_APP_RW_STACK_START with alignment = 32, size = 0 { }; define block TFM_APP_ROT_LINKER_DATA with alignment = 32 { @@ -241,6 +247,10 @@ define block DATA with fixed order { block TFM_SECURE_STACK, #endif /* !defined(TFM_PSA_API) */ +#if defined(TFM_SP_META_PTR_ENABLE) + block TFM_SP_META_PTR, +#endif + /**** APP RoT DATA start here */ /* * This empty, zero long execution region is here to mark the start address |