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

Wolfgang Denk wd at denx.de
Fri Oct 22 14:26:15 CEST 2010


Hello all,

In message <20101020184930.E89F7136320 at gemini.denx.de> I wrote:
> 
> after nailing down a few USB and FAT related bugs we had USB running
> stable on i.MX31, but suddenly the current mainline code behaves
> strangely again:
> 
> Repeating simple calls like "usb read 80800000 0 1000" will reliably
> hard hang the system after 3...5 calls.
> 
> The problem can be avoided by switching off the instruction cache
> (using the "icache off" command).
> 
> 
> Trying to track down this problem it turns out that somehow the
> ELF_RELOC patches seem to be responsible for it.  I have a source tree
> that works perfectly fine, with I-caches on, and after cherry-picking
> the following commits from the elf_reloc branch the problem appears:
> 
> 92d5ecb   2010-10-13 10:10:21   arm: implement ELF relocations
> bafe743   2010-10-13 10:12:52   arm1136, qong: add support for ELF relocations

Thanks to everybody who spent time and efforts looking into this.

I think we halve solved (wel, actually worked around) the problem; the
solution is (like so often) adding / increasing a delay in the USB
code.

I think the ELF relocations only triggered the problem because they
resulted in smaller code which (most probably) also executes a bit
faster - and the difference was enough to trigger the problem.

After increasing a delay in the USB code, I see no indications
whatever that the ELF relocation cod emight be to blame for the issues
we observed.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
That was the thing about deserts. They had their  own  gravity.  They
sucked you into the centre.           - Terry Pratchett, _Small Gods_


More information about the U-Boot mailing list