Re: MMU issue on mpc8270
From: Dan Malek <hidden>
Date: 2006-11-24 15:11:54
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