From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Mon, 24 Aug 2020 16:39:44 -0400 Subject: [PATCH] Fix data abort caused by mis-aligning fit data in In-Reply-To: References: <54acaa00c3d44dc3b175dc55b44f1373@4rf.com> <20200824142644.GA13719@bill-the-cat> Message-ID: <20200824203944.GK20605@bill-the-cat> 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, Aug 24, 2020 at 08:05:24PM +0000, Reuben Dowle wrote: > Should I submit a new patch with the alignment set to 8 bytes? I would think a hard coded 8 bytes would not be the best solution, since not all architectures will need that much alignment. I suspect some would work with any alignment, and most 32-bit archs would be fine with 4-byte alignment. > > Our released software is actually using a patch to align to 4096 bytes, but I knew that was unnecessarily large. I was not really sure what would be an appropriate value here, and took a guess at ARCH_DMA_MINALIGN when I cleaned it up for submitting upstream. Is there a better define to use? > > I am also interested to know where the 8 byte alignment requirement is documented. So we're talking about the device tree file, and only that, in this part of the code, right? In the Linux kernel documentation, both arm and arm64 document that the device tree must be on an 8-byte aligned address. That is the bare minimum. If we aren't further relocating it (as fdt_high is set to 0xffffffff for example, which in general is wrong and bad), that's still the best we can do. It would be good to allow for further relocation down the line as we aren't making sure it wouldn't be overwritten by the kernel BSS, etc. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: