aboutsummaryrefslogtreecommitdiffstats
path: root/os/common/startup
diff options
context:
space:
mode:
authorisiora <none@example.com>2017-09-22 10:21:52 +0000
committerisiora <none@example.com>2017-09-22 10:21:52 +0000
commit1d94e371e6f172f90956f1c906cd61beaebc5b8d (patch)
tree80cbf5eae3028e60f1eca417284d729116dbcab8 /os/common/startup
parent72549fa9c56a405903e7c9cc1e6afc0005b1a208 (diff)
downloadChibiOS-1d94e371e6f172f90956f1c906cd61beaebc5b8d.tar.gz
ChibiOS-1d94e371e6f172f90956f1c906cd61beaebc5b8d.tar.bz2
ChibiOS-1d94e371e6f172f90956f1c906cd61beaebc5b8d.zip
Init boot file
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10674 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/common/startup')
-rw-r--r--os/common/startup/ARM/devices/SAMA5D2/boot.S56
1 files changed, 56 insertions, 0 deletions
diff --git a/os/common/startup/ARM/devices/SAMA5D2/boot.S b/os/common/startup/ARM/devices/SAMA5D2/boot.S
new file mode 100644
index 000000000..d507ea8b4
--- /dev/null
+++ b/os/common/startup/ARM/devices/SAMA5D2/boot.S
@@ -0,0 +1,56 @@
+/*
+ ChibiOS - Copyright (C) 2006..2017 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @file SAMA5D2/boot.S
+ * @brief SAMA5D2 boot-related code.
+ *
+ * @addtogroup SAMA5D2_BOOT
+ * @{
+ */
+#if !defined(__DOXYGEN__)
+
+ .set AIC_REDIR_KEY, 0x5B6C0E26 << 1
+ .set SFR_SN1, 0xF8030050
+ .set SFR_AICREDIR, 0xF8030054
+
+ .section .boot
+ .code 32
+ .balign 4
+/*
+ * Boot initialization code
+ */
+ .global Boot_Handler
+Boot_Handler:
+ /*
+ * Set VBAR to system vectors table
+ */
+ ldr r0, =_start
+ mcr p15, 0, r0, c12, c0, 0
+ /*
+ * Do not redirect secure interrupts to AIC
+ */
+ ldr r0, =AIC_REDIR_KEY
+ ldr r1, =SFR_SN1
+ ldr r1, [r1]
+ eor r0, r0, r1
+ bic r0, r0, #0x1
+ ldr r1, =SFR_AICREDIR
+ str r0, [r1]
+ b Reset_Handler
+#endif /* !defined(__DOXYGEN__) */
+
+/** @} */