* memory corruption after MMU turned on
@ 2006-11-16 15:44 Lei Sun
[not found] ` <1628E43D99629C46988BE46087A3FBB97AFFDC@ep-01.EmbeddedPlanet.local>
2006-11-17 8:48 ` Dave Liu
0 siblings, 2 replies; 9+ messages in thread
From: Lei Sun @ 2006-11-16 15:44 UTC (permalink / raw)
To: linuxppc-embedded
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?
Any suggestion?
Thanks
lei
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: memory corruption after MMU turned on
@ 2006-11-16 16:11 Claus Gindhart
0 siblings, 0 replies; 9+ messages in thread
From: Claus Gindhart @ 2006-11-16 16:11 UTC (permalink / raw)
To: Lei Sun, linuxppc-embedded
Lei,
if you are trying to step over RFI using the BDI2000-probe (propably =
also with other probes), this problem could be caused by the probe.
I had similar problems in an early phase of an 8270 project. It is not =
possible to step over RFI; and it is always dangerous to debug through =
MMU initialization code with the probe.
You could work around this by setting a Breakpoint instruction after =
MMU-initialization, hoping, that the code will reach this point.
If also this doesnt help, i could only recommend to set some HW-signals, =
in the best case a register with LED's behind to see, whether your =
system reaches particular code areas.
--=20
Mit freundlichen Gruessen / Best regards
Claus Gindhart
SW R&D
Kontron Modular Computers
phone :++49 (0)8341-803-374
mailto:claus.gindhart@kontron-modular.com
http://www.kontron.com
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GU d- s++:>++:+ a+ C++$ !U !P L++>$ E-- W+(-) N- o?
K? w !O !M V !PS PE- Y+ PGP+ t 5? X R* tv- b+ DI+++
D-- G e++> h--- !r x+++
------END GEEK CODE BLOCK------
=20
-----Original Message-----
From: linuxppc-embedded-bounces+claus.gindhart=3Dkontron.com@ozlabs.org
[mailto:linuxppc-embedded-bounces+claus.gindhart=3Dkontron.com@ozlabs.org=
]
On Behalf Of Lei Sun
Sent: Donnerstag, 16. November 2006 16:45
To: linuxppc-embedded@ozlabs.org
Subject: memory corruption after MMU turned on
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?
Any suggestion?
Thanks
lei
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: memory corruption after MMU turned on
[not found] ` <1628E43D99629C46988BE46087A3FBB97AFFDC@ep-01.EmbeddedPlanet.local>
@ 2006-11-16 16:42 ` Lei Sun
0 siblings, 0 replies; 9+ messages in thread
From: Lei Sun @ 2006-11-16 16:42 UTC (permalink / raw)
To: Steven Blakeslee; +Cc: Linuxppc-embedded
I am using codewarrior and USB+TAP for debugging(didn't got BDI yet).
One problem seems like if i set a break point at some place, when the
code reach there, it did stopped, but the instruction on that location
became 0x00000000 !
Any also, the kernel is loaded at physical address 0x0, how do i set
the break point to 0xC000XXX address? I suppose i should set the break
point at the physical address instead.
I don't have the hardware to try right now.
Thank you for your reply!
lei
On 11/16/06, Steven Blakeslee <BlakesleeS@embeddedplanet.com> wrote:
> Generally stepping over the rfi command will cause the problem.
> Instead, set a breakpoint at the address that the rfi command will jump
> to, the C000XXX address. Then step through code from then on.
>
>
>
> > -----Original Message-----
> > From:
> linuxppc-embedded-bounces+blakeslees=embeddedplanet.com@ozlabs.org
> > [mailto:linuxppc-embedded-
> > bounces+blakeslees=embeddedplanet.com@ozlabs.org] On Behalf Of Lei Sun
> > Sent: Thursday, November 16, 2006 10:45 AM
> > To: linuxppc-embedded@ozlabs.org
> > Subject: memory corruption after MMU turned on
> >
> > 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?
> >
> > Any suggestion?
> >
> > Thanks
> > lei
> > _______________________________________________
> > Linuxppc-embedded mailing list
> > Linuxppc-embedded@ozlabs.org
> > https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: memory corruption after MMU turned on
2006-11-16 15:44 memory corruption after MMU turned on Lei Sun
[not found] ` <1628E43D99629C46988BE46087A3FBB97AFFDC@ep-01.EmbeddedPlanet.local>
@ 2006-11-17 8:48 ` Dave Liu
2006-11-17 16:47 ` Lei Sun
1 sibling, 1 reply; 9+ messages in thread
From: Dave Liu @ 2006-11-17 8:48 UTC (permalink / raw)
To: Lei Sun; +Cc: linuxppc-embedded
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: memory corruption after MMU turned on
2006-11-17 8:48 ` Dave Liu
@ 2006-11-17 16:47 ` Lei Sun
2006-11-18 10:03 ` Dave Liu
0 siblings, 1 reply; 9+ messages in thread
From: Lei Sun @ 2006-11-17 16:47 UTC (permalink / raw)
To: Dave Liu; +Cc: linuxppc-embedded
No, i didn't do the burst memory test, how do i do it then ?
On 11/17/06, Dave Liu <r63238@freescale.com> 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
>
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: memory corruption after MMU turned on
2006-11-17 16:47 ` Lei Sun
@ 2006-11-18 10:03 ` Dave Liu
2006-11-18 21:53 ` Lei Sun
0 siblings, 1 reply; 9+ messages in thread
From: Dave Liu @ 2006-11-18 10:03 UTC (permalink / raw)
To: Lei Sun; +Cc: linuxppc-embedded
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 <r63238@freescale.com> 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
> >
> >
> >
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: memory corruption after MMU turned on
2006-11-18 10:03 ` Dave Liu
@ 2006-11-18 21:53 ` Lei Sun
2006-11-19 0:48 ` Wolfgang Denk
2006-11-19 6:01 ` Dave Liu
0 siblings, 2 replies; 9+ messages in thread
From: Lei Sun @ 2006-11-18 21:53 UTC (permalink / raw)
To: Dave Liu; +Cc: linuxppc-embedded
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 <r63238@freescale.com> 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 <r63238@freescale.com> 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
> > >
> > >
> > >
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: memory corruption after MMU turned on
2006-11-18 21:53 ` Lei Sun
@ 2006-11-19 0:48 ` Wolfgang Denk
2006-11-19 6:01 ` Dave Liu
1 sibling, 0 replies; 9+ messages in thread
From: Wolfgang Denk @ 2006-11-19 0:48 UTC (permalink / raw)
To: Lei Sun; +Cc: Dave Liu, linuxppc-embedded
In message <f9a7e7a80611181353p21dce384m21f30bc9d8935a8d@mail.gmail.com> you wrote:
> 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.
Did you read the U-Boot README? It explains why this cannot work.
> > > > > 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
Did you read the FAQ, like
http://www.ultsol.com/faq_p305.htm ?
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
"Everything should be made as simple as possible, but not simpler."
- Albert Einstein
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: memory corruption after MMU turned on
2006-11-18 21:53 ` Lei Sun
2006-11-19 0:48 ` Wolfgang Denk
@ 2006-11-19 6:01 ` Dave Liu
1 sibling, 0 replies; 9+ messages in thread
From: Dave Liu @ 2006-11-19 6:01 UTC (permalink / raw)
To: Lei Sun; +Cc: linuxppc-embedded
On Sat, 2006-11-18 at 16:53 -0500, Lei Sun wrote:
> I tried enable i-cache, but it looks fine, however if i enable
Okay, That means the burst read memory is right. I think you should
check the code at the else, not only focus on RFI. Maybe the problem is
at the else position. When kernel boot stop, can not see any more
printed message, you can attach to the process with CW and USBTAP. see
where the current program pointer is.
> d-cache, u-boot corrupted right away, debugger showed some garbage
> memory instead of valid instruction.
<snip>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2006-11-19 6:01 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-16 15:44 memory corruption after MMU turned on Lei Sun
[not found] ` <1628E43D99629C46988BE46087A3FBB97AFFDC@ep-01.EmbeddedPlanet.local>
2006-11-16 16:42 ` Lei Sun
2006-11-17 8:48 ` Dave Liu
2006-11-17 16:47 ` Lei Sun
2006-11-18 10:03 ` Dave Liu
2006-11-18 21:53 ` Lei Sun
2006-11-19 0:48 ` Wolfgang Denk
2006-11-19 6:01 ` Dave Liu
-- strict thread matches above, loose matches on Subject: below --
2006-11-16 16:11 Claus Gindhart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).