From mboxrd@z Thu Jan 1 00:00:00 1970 From: dibacco at libero.it Date: Sat, 24 Jan 2009 17:18:48 +0100 (CET) Subject: [U-Boot] Strange arm9 behaviour reading long(s) not aligned to 4 bytes boundary Message-ID: <26134646.40551232813928358.JavaMail.defaultUser@defaultHost> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, I have something like this on a 32 bit little endian arm9 board (SAM9 L9260): char buffer[] = { 0, 1, 2, 3, 4, 5, 6, 7 }; long A = * ( (long*) buffer ); long B = * ( (long*) (buffer + 2) ); printf("A: %08x B: %08x", A, B); I would expect that A = 0x03020100 and B = 0x05040302 instead I get the right value for A but B is 0x01000302 or something like this but anyway not what I expect. Is there something wrong on the board? It seems that only 4 bytes aligned long are read correctly. Thank you in advance, Antonio.