[U-Boot] ELF_RELOC causes strange I-cache issues

Albert ARIBAUD albert.aribaud at free.fr
Thu Oct 21 14:53:55 CEST 2010


Le 21/10/2010 14:00, Wolfgang Denk a écrit :
> Dear Albert ARIBAUD,
>
> In message<4CC01C6B.9090904 at free.fr>  you wrote:
>>
>> Wolfgang/other testers, can you do the following three tests?
>
> My test looks like this:
>
> usb_test=usb start;run usb_test20 usb_test30 usb_test40
> usb_test2=usb read 80800000 0 100;date
> usb_test20=run usb_test2 usb_test2 usb_test2 usb_test2 usb_test2
> usb_test3=usb read 80800000 0 1000;date
> usb_test30=run usb_test3 usb_test3 usb_test3 usb_test3 usb_test3
> usb_test4=usb read 80800000 0 10000;date
> usb_test40=run usb_test4 usb_test4 usb_test4 usb_test4 usb_test4
>
> I.e. I will repeat 5 reads with 256, 4096 resp. 65536 blocks, starting
> with the small counts, going up.
>
>> 1. Replace the three mcr instructions I added in my patch with this single
>
> Hangs at 2nd read of 4096 blocks.
>
>> 2. Replace the three mcr instructions I added in my patch with this single
>
> Hangs at 2nd read of 4096 blocks.
>
>> 3. Replace the three mcr instructions I added in my patch with these two
>
> Hangs at 1st read of 4096 blocks.
>
> Best regards,
>
> Wolfgang Denk

Hmm... The USB code runs well for 256 blocks? This makes me question a 
code fixup issue, because the code executed is certainly the same 
regardless to the count of USB blocks (some parts get executed in a 
loop, but then they've been put in the cache in the first iteration, and 
that does not depend on the number of iterations), so IMO an i-cache 
issue would also be the same regardless to block count.

OTOH, block count directly affects how much memory gets written into, 
and in that respect there can be a difference between fixed relocation 
and ELF based relocation, because u-boot does not land at the same 
location in both cases.

On this board, where does u-boot run without ELF relocation? Where does 
it run with ELF relocation? What size is a single USB block?

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list