diff options
author | andrew <andrew@FreeBSD.org> | 2013-03-02 02:19:04 +0000 |
---|---|---|
committer | andrew <andrew@FreeBSD.org> | 2013-03-02 02:19:04 +0000 |
commit | 6bc019724d33ad4fee02e8b19c6e12745460e4ec (patch) | |
tree | 3d794efa250f6e383ef850628d8ce4772b9a4724 | |
parent | 746bd17f58d6db84d2ba3c0853c58ccee8dfe68c (diff) | |
download | FreeBSD-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.S | 1 |
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 */ |