svn commit: r247608 - head/sys/arm/arm

Andrew Turner andrew at FreeBSD.org
Sat Mar 2 02:19:05 UTC 2013


Author: andrew
Date: Sat Mar  2 02:19:04 2013
New Revision: 247608
URL: http://svnweb.freebsd.org/changeset/base/247608

Log:
  Ensure the stack is correctly aligned before calling the first C function.

Modified:
  head/sys/arm/arm/locore.S

Modified: head/sys/arm/arm/locore.S
==============================================================================
--- head/sys/arm/arm/locore.S	Sat Mar  2 01:04:02 2013	(r247607)
+++ head/sys/arm/arm/locore.S	Sat Mar  2 02:19:04 2013	(r247608)
@@ -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 */


More information about the svn-src-all mailing list