[U-Boot] [PATCH alternate version V2] at91rm9200: fix lowlevel_init() SMRDATA size

Jens Scharsig js_at_ng at scharsoft.de
Sun Dec 12 20:12:42 CET 2010


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


More information about the U-Boot mailing list