From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Thu, 21 Oct 2010 14:53:55 +0200 Subject: [U-Boot] ELF_RELOC causes strange I-cache issues In-Reply-To: <20101021120022.4288E136320@gemini.denx.de> References: <20101020184930.E89F7136320@gemini.denx.de> <4CBF4D17.6020403@free.fr> <20101020205401.39B4D1359B3@gemini.denx.de> <1287652681-4085-1-git-send-email-albert.aribaud@free.fr> <4CC00D3D.2090700@denx.de> <4CC01C6B.9090904@free.fr> <20101021120022.4288E136320@gemini.denx.de> Message-ID: <4CC037E3.1000504@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 21/10/2010 14:00, Wolfgang Denk a ?crit : > Dear Albert ARIBAUD, > > In message<4CC01C6B.9090904@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.