* MMU issue on mpc8270
@ 2006-11-24 4:13 Lei Sun
2006-11-24 15:11 ` Dan Malek
0 siblings, 1 reply; 4+ messages in thread
From: Lei Sun @ 2006-11-24 4:13 UTC (permalink / raw)
To: linuxppc-embedded
Hi all:
While trying to bring up the kernel-2.4.30, my debugger failed to
show memory content after MMU is turned on. So I added some debug
serial_putc() function copied from u-boot. (since u-boot has
intialized the UART). The code did printed out the debug message
untill it reached "mapin_ram()" function. To be precise, in
map_page() funcion, after pte_alloc() , serial_putc() doesn't work
anymore.
My questions are :
1. in mapin_ram() function, since it uses "bat_mapin_ram()" , why does
it still map in page?
2. why would pte_alloc() affect my serial debug output ?
Rigth now, my kernel does seems to be running, but i just couldn't see
anything on the serial console, I have examined the serial console
portion of the code for many times, couldn't seems any thing wrong.
The worst is that i can't set break point with MMU turned on.
Any suggestion?
Thanks
lei
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: MMU issue on mpc8270
2006-11-24 4:13 MMU issue on mpc8270 Lei Sun
@ 2006-11-24 15:11 ` Dan Malek
2006-11-24 18:28 ` Lei Sun
0 siblings, 1 reply; 4+ messages in thread
From: Dan Malek @ 2006-11-24 15:11 UTC (permalink / raw)
To: Lei Sun; +Cc: linuxppc-embedded
On Nov 23, 2006, at 11:13 PM, Lei Sun wrote:
> Hi all:
> While trying to bring up the kernel-2.4.30, my debugger failed to
> show memory content after MMU is turned on.
Sounds like a debugger configuration problem.
> ... So I added some debug
> serial_putc() function copied from u-boot. (since u-boot has
> intialized the UART).
You don't need to do this. There is sufficient and working
early serial debug in the kernel that is started as early
as possible.
> .... The code did printed out the debug message
> untill it reached "mapin_ram()" function. To be precise, in
> map_page() funcion, after pte_alloc() , serial_putc() doesn't work
> anymore.
There are times during the kernel initialization
when all of the MMU mapping is being configured,
that you have to be cognisant of the mapping
changes. Early mappings disappear in favor of
more "operational" ones, so the serial port mapping
is going to change as well. The call to pte_alloc()
is irrelevant, except that it affects the MMU configuration
and likely removes the old mappings.
The 82xx boot up initialization works fine, and
is completely generic to any board at this point.
> Rigth now, my kernel does seems to be running, but i just couldn't see
> anything on the serial console,
Fix your debugger configuration so it works in
this environment, or use xmon or early serial
debug options that are built into the kernel.
> .... I have examined the serial console
> portion of the code for many times, couldn't seems any thing wrong.
Have you selected the proper kernel configuration
or passed the proper console= parameter to the
kernel?
Thanks.
-- Dan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: MMU issue on mpc8270
2006-11-24 15:11 ` Dan Malek
@ 2006-11-24 18:28 ` Lei Sun
2006-11-24 20:52 ` Dan Malek
0 siblings, 1 reply; 4+ messages in thread
From: Lei Sun @ 2006-11-24 18:28 UTC (permalink / raw)
To: Dan Malek; +Cc: linuxppc-embedded
Thanks for the reply.
I sure did put console=ttyS0,57600 as the command line. I am afraid I
am not able to fix the debugger problem in short time because I am
using codewarrior + USB TAP, which i think it's not working well after
MMU turned on.
Would you care to explain why the kernel use BAT and Paging mode at
the same time in mapin_ram() function? which one take precedence ?
I wonder if xmon would work on 82xx, it appears to be for 8xx only.
got some error message when trying to compile it with the option set.
Thanks
lei
On 11/24/06, Dan Malek <dan@embeddedalley.com> wrote:
>
> On Nov 23, 2006, at 11:13 PM, Lei Sun wrote:
>
> > Hi all:
> > While trying to bring up the kernel-2.4.30, my debugger failed to
> > show memory content after MMU is turned on.
>
> Sounds like a debugger configuration problem.
>
> > ... So I added some debug
> > serial_putc() function copied from u-boot. (since u-boot has
> > intialized the UART).
>
> You don't need to do this. There is sufficient and working
> early serial debug in the kernel that is started as early
> as possible.
>
> > .... The code did printed out the debug message
> > untill it reached "mapin_ram()" function. To be precise, in
> > map_page() funcion, after pte_alloc() , serial_putc() doesn't work
> > anymore.
>
> There are times during the kernel initialization
> when all of the MMU mapping is being configured,
> that you have to be cognisant of the mapping
> changes. Early mappings disappear in favor of
> more "operational" ones, so the serial port mapping
> is going to change as well. The call to pte_alloc()
> is irrelevant, except that it affects the MMU configuration
> and likely removes the old mappings.
>
> The 82xx boot up initialization works fine, and
> is completely generic to any board at this point.
>
> > Rigth now, my kernel does seems to be running, but i just couldn't see
> > anything on the serial console,
>
> Fix your debugger configuration so it works in
> this environment, or use xmon or early serial
> debug options that are built into the kernel.
>
> > .... I have examined the serial console
> > portion of the code for many times, couldn't seems any thing wrong.
>
> Have you selected the proper kernel configuration
> or passed the proper console= parameter to the
> kernel?
>
> Thanks.
>
> -- Dan
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: MMU issue on mpc8270
2006-11-24 18:28 ` Lei Sun
@ 2006-11-24 20:52 ` Dan Malek
0 siblings, 0 replies; 4+ messages in thread
From: Dan Malek @ 2006-11-24 20:52 UTC (permalink / raw)
To: Lei Sun; +Cc: linuxppc-embedded
On Nov 24, 2006, at 1:28 PM, Lei Sun wrote:
> I sure did put console=ttyS0,57600 as the command line.
console=ttyCPM0,57600
> I am afraid I
> am not able to fix the debugger problem in short time because I am
> using codewarrior + USB TAP, which i think it's not working well after
> MMU turned on.
Oh well :-)
Good Luck.
-- Dan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-11-24 20:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-24 4:13 MMU issue on mpc8270 Lei Sun
2006-11-24 15:11 ` Dan Malek
2006-11-24 18:28 ` Lei Sun
2006-11-24 20:52 ` Dan Malek
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).