From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Fri, 22 Oct 2010 15:19:08 +0200 Subject: [U-Boot] ELF_RELOC causes strange I-cache issues In-Reply-To: <20101022122615.7003D1359B3@gemini.denx.de> References: <20101020184930.E89F7136320@gemini.denx.de> <20101022122615.7003D1359B3@gemini.denx.de> Message-ID: <4CC18F4C.4090900@free.fr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Le 22/10/2010 14:26, Wolfgang Denk a ?crit : > 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. Good! Out of curiosity, is this timing inevitable or is there a way to turn it into a wait loop (plus a timeout for security)? > 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. I concur for the execution speed, but not due to ELF relocations per se, rather due to the i-cache being turned on and working correctly, i.e. increasing code speed, to the point that a bad timing condition occurs. As for size, ELF relocations actually do not change executable code size with respect to "fixed" relocation. GOT relocation, OTOH, would increase the code size and slow it slightly down. We'll probably see more of these with the increased use of i-cache and d-cache on ARM. > Best regards, > > Wolfgang Denk Amicalement, -- Albert.