From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.231]) by ozlabs.org (Postfix) with ESMTP id CD6EE67B93 for ; Sun, 19 Nov 2006 08:53:04 +1100 (EST) Received: by wx-out-0506.google.com with SMTP id i31so1298267wxd for ; Sat, 18 Nov 2006 13:53:02 -0800 (PST) Message-ID: Date: Sat, 18 Nov 2006 16:53:02 -0500 From: "Lei Sun" To: "Dave Liu" Subject: Re: memory corruption after MMU turned on In-Reply-To: <1163844232.3659.15.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed References: <1163753324.3655.18.camel@localhost.localdomain> <1163844232.3659.15.camel@localhost.localdomain> Cc: linuxppc-embedded@ozlabs.org List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , I tried enable i-cache, but it looks fine, however if i enable d-cache, u-boot corrupted right away, debugger showed some garbage memory instead of valid instruction. Thanks lei On 11/18/06, Dave Liu wrote: > Did you enable the i-cache or d-cache in u-boot? if you enable i-cache, > I think the core are burst reading from memory. > > On Fri, 2006-11-17 at 11:47 -0500, Lei Sun wrote: > > No, i didn't do the burst memory test, how do i do it then ? > > > > On 11/17/06, Dave Liu wrote: > > > On Thu, 2006-11-16 at 10:44 -0500, Lei Sun wrote: > > > > Hi all: > > > > I am trying to bring up customized board based on MPC8270, the > > > > kernel version is 2.4.30, it works fine on one of the Eval board > > > > (PQ2FADS-VR, which use MPC8275). > > > > The kernel hangs after uncompressing is done, further debug shows > > > > that it hangs right after "rfi " instruction of the turn_on_mmu: > > > > function in head.S > > > > > > > > turn_on_mmu: > > > > 240 mfmsr r0 > > > > 241 ori r0,r0,MSR_DR|MSR_IR > > > > 242 mtspr SRR1,r0 > > > > 243 lis r0,start_here@h > > > > 244 ori r0,r0,start_here@l > > > > 245 mtspr SRR0,r0 > > > > 246 SYNC > > > > 247 RFI /* enables MMU */ > > > > > > > > After i step over the RFI instruction, the PC points to C000XXX , but > > > > all memory content is 0 by then. > > > > my BATU0 is 0xC000FFE0 BATL0 is 0x00000002, I have 128MB RAM. The > > > > u-boot works fine, without MMU turned on. We do have some hardware > > > > problem, such that i have to lower the bus frequency to make the SDRAM > > > > stable. What physical parameter could cause the board not working with > > > > MMU on? > > > > > > When MMU turn on, the kernel memory should be cacheable, so the > > > processor will burst read instructions from memory to i-cache. Did you > > > do the burst read/write memory test in u-boot? As you said, you did not > > > do the test. > > > > > > -Dave > > > > > > > > > > >