aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorMark Horvath <mark.horvath@arm.com>2021-03-24 11:09:23 +0100
committerAnton Komlev <Anton.Komlev@arm.com>2021-03-29 08:56:38 +0200
commit0c6591922923c35136953d3c411d4430217a8bac (patch)
treec03cabfea54a70b1ce8a06aaf7c515e1454522a7 /platform
parentb1637d53d4548fb4e3271504078f30b1b8e61911 (diff)
downloadtrusted-firmware-m-0c6591922923c35136953d3c411d4430217a8bac.tar.gz
Platform: Fix Musca-B1 Secure Enclave
- PSP stack register initalized before scatter loading started. On armv6-m architecture this seems to be the responsibility of platform's startup code. - Lowering area reserved for unprivileged data to make debug build possible. Signed-off-by: Mark Horvath <mark.horvath@arm.com> Change-Id: I1df3912f27293ec81bd634ecef5c99ccc6dc4518
Diffstat (limited to 'platform')
-rw-r--r--platform/ext/target/musca_b1/secure_enclave/Device/Source/armclang/startup_musca_b1_secure_enclave_s.s6
-rw-r--r--platform/ext/target/musca_b1/secure_enclave/partition/region_defs.h4
2 files changed, 7 insertions, 3 deletions
diff --git a/platform/ext/target/musca_b1/secure_enclave/Device/Source/armclang/startup_musca_b1_secure_enclave_s.s b/platform/ext/target/musca_b1/secure_enclave/Device/Source/armclang/startup_musca_b1_secure_enclave_s.s
index 95c505db7..27f1b1778 100644
--- a/platform/ext/target/musca_b1/secure_enclave/Device/Source/armclang/startup_musca_b1_secure_enclave_s.s
+++ b/platform/ext/target/musca_b1/secure_enclave/Device/Source/armclang/startup_musca_b1_secure_enclave_s.s
@@ -1,5 +1,5 @@
;/*
-; * Copyright (c) 2009-2020 Arm Limited
+; * Copyright (c) 2009-2021 Arm Limited
; *
; * Licensed under the Apache License, Version 2.0 (the "License");
; * you may not use this file except in compliance with the License.
@@ -27,6 +27,7 @@
; </h>
IMPORT |Image$$ARM_LIB_STACK_MSP$$ZI$$Limit|
+ IMPORT |Image$$ARM_LIB_STACK$$ZI$$Limit|
; Vector Table Mapped to Address 0 at Reset
@@ -107,6 +108,9 @@ Reset_Handler PROC
ORRS R0, R0, R1 ; Select switch to PSP
MSR control, R0
+ LDR R0, =|Image$$ARM_LIB_STACK$$ZI$$Limit|
+ MSR PSP, R0
+
LDR R0, =__main
BX R0
ENDP
diff --git a/platform/ext/target/musca_b1/secure_enclave/partition/region_defs.h b/platform/ext/target/musca_b1/secure_enclave/partition/region_defs.h
index a85cba312..3f8a18e02 100644
--- a/platform/ext/target/musca_b1/secure_enclave/partition/region_defs.h
+++ b/platform/ext/target/musca_b1/secure_enclave/partition/region_defs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2020 Arm Limited. All rights reserved.
+ * Copyright (c) 2017-2021 Arm Limited. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -78,7 +78,7 @@
#define S_DATA_START (SRAM_BASE)
#define S_DATA_SIZE (SRAM_SIZE)
-#define S_UNPRIV_DATA_SIZE (0x3000)
+#define S_UNPRIV_DATA_SIZE (0x2800)
#define S_DATA_LIMIT (S_DATA_START + S_DATA_SIZE - 1)
#define S_DATA_PRIV_START (S_DATA_START + S_UNPRIV_DATA_SIZE)