Hi,
have some doubts on how mmu works for this cpu.
Testing now the linux kernel, in head.S mmu is enabled and then there is a jmp.
#ifdef CONFIG_MMU
/*
* Identity mapping for the kernel region.
*/
movel #(MMUBASE+1),%d0 /* enable MMUBAR registers */
movec %d0,%MMUBAR
movel #MMUOR_CA,%d0 /* clear TLB entries */
movel %d0,MMUOR
movel #0,%d0 /* set ASID to 0 */
movec %d0,%asid
movel #MMUCR_EN,%d0 /* Enable the identity map */
movel %d0,MMUCR
nop /* sync i-pipeline */
movel #_vstart,%a0 /* jump to "virtual" space */
jmp %a0@
_vstart:
#endif /* CONFIG_MMU */
What is not clear is: i have a kernel loaded in 0x40001000 (so DDR2), and mmu get enabled here in the above code.
Ho can the same code already loaded in memory work (and seems it works, at leas on first kernel init parts) if it was build with load and entry at 0x40001000 ? I was expecting that after that mmu enabling, the addresses of code jumps are no more valid. Also, in init/main.c accessing to .data vars seems still working, and for .data also i was expecting addresses was converted from virtual to physical so .data init values was no more valid, unless they are not re-initialized later.
From the datahseet, what i understand is that addresses, if they don't match some important physical register address, are always translated to as virtual to physical.
Every light on this is welcome.
Thanks
angelo
Hi,
well i was involved in recent job of debugging and enabling mmu on linux. Finally, mmu on mcf5441x family is up and running. You can check in case linux-m68k mailing list.
Regards,
Angelo
Hi,
For your issue, I am not sure if is possible try to enable the MMU without Linux. Here has a quite useful post on the MMU with MCF5441x for your reference. Hope it is helpfful.