summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2013-03-02 02:19:04 +0000
committerandrew <andrew@FreeBSD.org>2013-03-02 02:19:04 +0000
commit6bc019724d33ad4fee02e8b19c6e12745460e4ec (patch)
tree3d794efa250f6e383ef850628d8ce4772b9a4724
parent746bd17f58d6db84d2ba3c0853c58ccee8dfe68c (diff)
downloadFreeBSD-src-6bc019724d33ad4fee02e8b19c6e12745460e4ec.zip
FreeBSD-src-6bc019724d33ad4fee02e8b19c6e12745460e4ec.tar.gz
Ensure the stack is correctly aligned before calling the first C function.
-rw-r--r--sys/arm/arm/locore.S1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/arm/arm/locore.S b/sys/arm/arm/locore.S
index 00a61e7..37e88fe 100644
--- a/sys/arm/arm/locore.S
+++ b/sys/arm/arm/locore.S
@@ -204,6 +204,7 @@ mmu_done:
virt_done:
mov r1, #20 /* loader info size is 20 bytes also second arg */
subs sp, sp, r1 /* allocate arm_boot_params struct on stack */
+ bic sp, sp, #7 /* align stack to 8 bytes */
mov r0, sp /* loader info pointer is first arg */
str r1, [r0] /* Store length of loader info */
str r9, [r0, #4] /* Store r0 from boot loader */
OpenPOWER on IntegriCloud