diff options
author | Mark Horvath <mark.horvath@arm.com> | 2020-09-08 20:42:05 +0200 |
---|---|---|
committer | Soby Mathew <soby.mathew@arm.com> | 2020-12-10 10:54:43 +0000 |
commit | 652b900e885759d3c2d835e8882187ef450138e5 (patch) | |
tree | ebf869cd6cda0994a91dc1bdea8b24217ccfb4e2 /platform/ext/common | |
parent | f05651489e2f6b2569d02b63ab7b8b30bd3b8f56 (diff) | |
download | trusted-firmware-m-652b900e885759d3c2d835e8882187ef450138e5.tar.gz |
PSA_proxy: Create first version of PSA proxy partition
This implementation has some limitations, please check
docs/reference/services/tfm_psa_proxy_integration_guide.rst for details.
Change-Id: Ic1ce7aecfd8bb60b8fb87d5e64ffd186991b560b
Signed-off-by: Mark Horvath <mark.horvath@arm.com>
Diffstat (limited to 'platform/ext/common')
-rw-r--r-- | platform/ext/common/armclang/tfm_common_s.sct.template | 6 | ||||
-rw-r--r-- | platform/ext/common/gcc/tfm_common_s.ld.template | 20 |
2 files changed, 26 insertions, 0 deletions
diff --git a/platform/ext/common/armclang/tfm_common_s.sct.template b/platform/ext/common/armclang/tfm_common_s.sct.template index 1e5036322c..627ca06866 100644 --- a/platform/ext/common/armclang/tfm_common_s.sct.template +++ b/platform/ext/common/armclang/tfm_common_s.sct.template @@ -312,6 +312,12 @@ LR_CODE S_CODE_START S_CODE_SIZE { } #endif +#if defined(PSA_PROXY_SHARED_MEMORY_BASE) + PSA_PROXY_SHARED_MEMORY PSA_PROXY_SHARED_MEMORY_BASE PSA_PROXY_SHARED_MEMORY_SIZE { + *(PSA_PROXY_SHARED_MEMORY_SECTION) + } +#endif + #if defined (S_RAM_CODE_START) /* Executable code allocated in RAM */ TFM_RAM_CODE S_RAM_CODE_START { diff --git a/platform/ext/common/gcc/tfm_common_s.ld.template b/platform/ext/common/gcc/tfm_common_s.ld.template index a2bf516f45..d596cea8b7 100644 --- a/platform/ext/common/gcc/tfm_common_s.ld.template +++ b/platform/ext/common/gcc/tfm_common_s.ld.template @@ -34,6 +34,11 @@ MEMORY #ifndef TFM_MULTI_CORE_TOPOLOGY VENEERS (rx) : ORIGIN = CMSE_VENEER_REGION_START, LENGTH = CMSE_VENEER_REGION_SIZE #endif + +#if defined(PSA_PROXY_SHARED_MEMORY_BASE) + PSA_PROXY_SHARED_MEMORY_RAM (rw) : ORIGIN = PSA_PROXY_SHARED_MEMORY_BASE, LENGTH = PSA_PROXY_SHARED_MEMORY_SIZE +#endif + } __heap_size__ = S_HEAP_SIZE; @@ -122,6 +127,10 @@ SECTIONS #endif /* {{manifest.attr.conditional}} */ {% endif %} {% endfor %} +#if defined(PSA_PROXY_SHARED_MEMORY_BASE) + LONG (PSA_PROXY_SHARED_MEMORY_BASE) + LONG (PSA_PROXY_SHARED_MEMORY_SIZE) +#endif __zero_table_end__ = .; } > FLASH @@ -651,6 +660,17 @@ SECTIONS Image$$ER_TFM_DATA$$Base = ADDR(.TFM_DATA); Image$$ER_TFM_DATA$$Limit = ADDR(.TFM_DATA) + SIZEOF(.TFM_DATA) + SIZEOF(.TFM_BSS); +#if defined(PSA_PROXY_SHARED_MEMORY_BASE) + /* If a variable defined with __attribute__((section())) keyword the + * variable is treated like an initialized variable. To not waste memory + * NOLOAD attribute used here. The whole section is zero initialized by + * adding section information to .zero.table */ + .PSA_PROXY_SHARED_MEMORY (NOLOAD) : + { + KEEP(*(PSA_PROXY_SHARED_MEMORY_SECTION)) + } > PSA_PROXY_SHARED_MEMORY_RAM +#endif + #if defined (S_RAM_CODE_START) /* Code executed from RAM */ .TFM_RAM_CODE S_RAM_CODE_START : |