From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Scharsig Date: Sun, 12 Dec 2010 20:12:42 +0100 Subject: [U-Boot] [PATCH alternate version V2] at91rm9200: fix lowlevel_init() SMRDATA size In-Reply-To: References: <1291361167-9880-1-git-send-email-biessmann@corscience.de> <4CFA1DB1.3010100@scharsoft.de> <4CFB4980.50505@scharsoft.de> <4CFB6669.8010105@emk-elektronik.de> <4CFD1F32.8030803@scharsoft.de> Message-ID: <4D051EAA.9020004@scharsoft.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Andreas Bie?mann > ---8<--- >> @@ -65,7 +65,8 @@ LoopOsc: >> ldr r0, =SMRDATA >> ldr r1, _MTEXT_BASE >> sub r0, r0, r1 >> - add r2, r0, #80 >> + ldr r2, =SMRDATAE >> + add r2, r2, r1 > --->8--- Ok,this is wrong, But it is code from version 1. The V2 use the correct sub instruction. > > Then we subtract TEXT_BASE from absolute address of SMRDATA. This lead to some value about 0x500 in r0 which is completely wrong which in turn leads to data abort. ... It would make sense to me to do some construct like this for relocated code, but here we are before relocation and therefore it would be sufficient to At boot time flash memory is mapded to 0x0. So the address 0x500 and 0x10000500 points the same location in flash. > regards Jens Scharsig