summaryrefslogtreecommitdiffstats
path: root/bsps/aarch64/shared/start/start.S
diff options
context:
space:
mode:
authorKinsey Moore <kinsey.moore@oarcorp.com>2021-02-15 09:05:10 -0600
committerJoel Sherrill <joel@rtems.org>2021-03-05 08:43:15 -0600
commit9951cee08f3a511a460eadfc2e5490d890cfd3b8 (patch)
tree504d1afabf2b01544f9b7b937e64154d03cb1f94 /bsps/aarch64/shared/start/start.S
parentspec: Move hypervisor start for use by AArch64 (diff)
downloadrtems-9951cee08f3a511a460eadfc2e5490d890cfd3b8.tar.bz2
bsps/aarch64: RTEMS_DEBUG stack alignment faults
Run with stack alignment faults enabled under RTEMS_DEBUG to catch any stack misalignments early. This makes it easier to track them down should they ever occur.
Diffstat (limited to 'bsps/aarch64/shared/start/start.S')
-rw-r--r--bsps/aarch64/shared/start/start.S8
1 files changed, 8 insertions, 0 deletions
diff --git a/bsps/aarch64/shared/start/start.S b/bsps/aarch64/shared/start/start.S
index f4c62b2b6c..e4dd3c2cee 100644
--- a/bsps/aarch64/shared/start/start.S
+++ b/bsps/aarch64/shared/start/start.S
@@ -90,6 +90,14 @@ _start:
#endif
#endif
+ /* Initialize SCTLR_EL1 */
+ mov x0, XZR
+#if defined(RTEMS_DEBUG)
+ /* Enable Stack alignment checking */
+ orr x0, x0, #(1<<3)
+#endif
+ msr SCTLR_EL1, x0
+
#ifdef RTEMS_SMP
/* Read MPIDR and get current processor index */
mrs x7, mpidr_el1