aboutsummaryrefslogtreecommitdiffstats
path: root/os/common/startup
diff options
context:
space:
mode:
authorisiora <none@example.com>2018-01-18 09:37:12 +0000
committerisiora <none@example.com>2018-01-18 09:37:12 +0000
commitcc1316f252e93c961381c76f1efb43e629331b41 (patch)
treebb0c2f3afcdb6dfb784b1a38ac56c7754a22deeb /os/common/startup
parentb84e6eeff14a3730e9db6e5bdce8475f0903a084 (diff)
downloadChibiOS-cc1316f252e93c961381c76f1efb43e629331b41.tar.gz
ChibiOS-cc1316f252e93c961381c76f1efb43e629331b41.tar.bz2
ChibiOS-cc1316f252e93c961381c76f1efb43e629331b41.zip
Minor changes.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11317 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/common/startup')
-rw-r--r--os/common/startup/ARM/devices/SAMA5D2/boot.S12
1 files changed, 12 insertions, 0 deletions
diff --git a/os/common/startup/ARM/devices/SAMA5D2/boot.S b/os/common/startup/ARM/devices/SAMA5D2/boot.S
index 2de5be0f2..41f7d7b2d 100644
--- a/os/common/startup/ARM/devices/SAMA5D2/boot.S
+++ b/os/common/startup/ARM/devices/SAMA5D2/boot.S
@@ -21,6 +21,13 @@
* @addtogroup SAMA5D2_BOOT
* @{
*/
+#define FALSE 0
+#define TRUE 1
+#define _FROM_ASM_
+#include "chlicense.h"
+#include "chconf.h"
+#include "armparams.h"
+
#if !defined(__DOXYGEN__)
.set AIC_REDIR_KEY, 0x5B6C0E26 << 1
@@ -42,6 +49,8 @@ Boot_Handler:
*/
ldr r0, =_start
mcr p15, 0, r0, c12, c0, 0
+
+#if (CH_CFG_SEC_WORLD == TRUE)
/*
* Do not redirect secure interrupts to AIC
*/
@@ -52,6 +61,7 @@ Boot_Handler:
bic r0, r0, #0x1
ldr r1, =SFR_AICREDIR
str r0, [r1]
+#endif
/*
* Reset SCTLR Settings
*/
@@ -63,6 +73,7 @@ Boot_Handler:
bic r0, r0, #(0x1 << 13) // Clear V bit 13 to disable hivecs
mcr p15, 0, r0, c1, c0, 0 // Write value back to CP15 System Control register
isb
+#if (CH_CFG_SEC_WORLD == TRUE)
/*
* Turn off L2Cache
*/
@@ -75,6 +86,7 @@ Boot_Handler:
bic r0, r0, #0x1
ldr r1, =SFR_L2CC_HRAMC
str r0, [r1]
+#endif
b Reset_Handler
#endif /* !defined(__DOXYGEN__) */