aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorMark Horvath <mark.horvath@arm.com>2021-07-29 11:29:15 +0200
committerMark Horvath <mark.horvath@arm.com>2021-07-29 15:28:34 +0200
commit07c2e6868cb7027325a0b84dd4c14bf619f5dc34 (patch)
treebab92db6958c919bbb4db2e312deaf2f99fc069c /platform
parent5f077007c905ab916c6df3ac9cb5de8c1e03580e (diff)
downloadtrusted-firmware-m-master.tar.gz
AN547: Fix secure startup fileHEADmaster
Reset MSP stack initial value in secure startup function to clear MSP stack before calling c library entry point. Change-Id: Idf333df1421e228d53a9d56a670367c995b1eac3 Signed-off-by: Mark Horvath <mark.horvath@arm.com>
Diffstat (limited to 'platform')
-rw-r--r--platform/ext/target/arm/mps3/an547/device/source/startup_an547_s.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/platform/ext/target/arm/mps3/an547/device/source/startup_an547_s.c b/platform/ext/target/arm/mps3/an547/device/source/startup_an547_s.c
index 66d6ce144..afb5df25f 100644
--- a/platform/ext/target/arm/mps3/an547/device/source/startup_an547_s.c
+++ b/platform/ext/target/arm/mps3/an547/device/source/startup_an547_s.c
@@ -346,6 +346,7 @@ extern const pFunc __VECTOR_TABLE[496];
void Reset_Handler(void)
{
__set_MSPLIM((uint32_t)(&__MSP_STACK_LIMIT));
+ __set_MSP((uint32_t)(&__MSP_INITIAL_SP));
SystemInit(); /* CMSIS System Initialization */
__ASM volatile("MRS R0, control\n" /* Get control value */