From: Simon Kagstrom Date: Tue, 6 Oct 2009 09:07:20 +0200 Subject: [U-Boot] [PATCH v2] arm926ejs: 16-byte align stack to avoid LDRD/STRD problems In-Reply-To: <4ACA3CF0.8040500@windriver.com> References: <73173D32E9439E4ABB5151606C3E19E202EF7E99DC@SC-VEXCH1.marvell.com> <20091005152318.30bc6678@marrow.netinsight.se> <200910051635.05113.sr@denx.de> <20091005165324.510fdadc@marrow.netinsight.se> <4ACA3CF0.8040500@windriver.com> Message-ID: <20091006090720.1910c56e@marrow.netinsight.se> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, 05 Oct 2009 13:37:36 -0500 Tom wrote: > Simon Kagstrom wrote: > > U-boot for Marvell Kirkwood boards no longer work after the EABI changes > > introduced in commit f772acf8a584067033eff1e231fcd1fb3a00d3d9. This > > turns out to be caused by a stack alignment issue. The armv5te > > instructions ldrd/strd instructions require 8-byte alignment to work > > properly (otherwise undefined behavior), and start.S gave the stack a > > 12-byte alignment. > > > > Tested on an OpenRD base board, where both printouts and ubifs stuff now > > works. > > Has this patch been tested on any other boards ? > This patch looks ok, I am just concerned about regressions. It would probably be good to have it tested on non-Kirkwood boards as well. I can't see that it should do any harm to other boards though - it's just aligning the stack to 8 bytes (disregard the Subject for now and see v3 of the patch :-)). The strange thing is really why it worked before on other boards. Perhaps the stack by change was already 8-byte aligned there, or perhaps ldrd/strd with non-8-byte alignment is handled. The architecture manual says that the behavior of ldrd/strd is undefined unless the address is 8-byte aligned, but I suppose that allows for it to actually work. // Simon