From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Thu, 26 Jan 2017 07:40:21 +0100 Subject: [U-Boot] FAT12 regression after 8d48c92b45aea91e2a2be90f2ed93677e85526f1 In-Reply-To: <20170125232546.GA93084@bluezbox.com> References: <20170125232546.GA93084@bluezbox.com> Message-ID: <588999D5.4000704@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Oleksandr, added Stefan and Tom to cc... Am 26.01.2017 um 00:25 schrieb Oleksandr Tymoshenko: > Hello, > > U-Boot 2017.01 and master branch is broken on BeagleBone Black > with boot partition formatted as FAT12, it hang after printing "Loading > u-boot.img" message. I bisected regression to this patch: > > http://lists.denx.de/pipermail/u-boot/2016-December/276305.html Yep, I detected this issue for another am335x based board, too, see thread here:' http://lists.denx.de/pipermail/u-boot/2017-January/279078.html But I did not found time to look into it... > This code simplification is not going to work on architectures > with strict alignment requirements: > > + ret = FAT2CPU16(*(__u16 *)(mydata->fatbuf + off16)); > > fatbuf is a pointer to __u8 and off16 can take any values so > mydata->fatbuf + off16 is not guaranteed to be 16-bits aligned > and 16-bit access to non-aligned address will cause exception. Good explanation! Thanks! bye, Heiko -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany