From linux-arm-kernel Fri May 21 13:25:28 2004 From: Matthias Welwarsky Date: Fri, 21 May 2004 13:25:28 +0000 To: linux-arm-kernel Subject: Re: ARM926EJ-S : MMU problem ???? Message-Id: <200405211525.28369.mwelwarsky () web ! de> X-MARC-Message: https://marc.info/?l=linux-arm-kernel&m=108514492132518 On Friday 21 May 2004 14:27, micael nogueira wrote: > Hi everybody, > > I have a linux booting on a Versatile Platform (ARM926EJ-S). Linux switches > on the MMU during the boot in order to work with virtual addresses. > > At a moment of my boot I want to switch off the MMU in order to run an > other code that was implemented with no knowledge of MMU. > > I wrote the following code : > > ... linux booting ... > > mrc p15, 0, r0, c1, c0 -> pc = 0xc0123828 > bic r0, r0, #1 -> pc = 0xc012382c > mcr p15, 0, r0, c1, c0 -> pc = 0xc013830 > > then i want that my pc = 0x123834, but it seems that when i switch off the > MMU, the processor follows executing the instruction at address 0xc0123834, > that is an undefined instruction because the MMU was switched off and the > processor don't recognize Virtual addresses. For the processor, all addresses are the same. If you switch off the MMU it is just that the translation is not done anymore. I suggest you run your code before the MMU is switched on and the processor has jumped to kernel address space. You should read the startup code more carefully, it's all in there... regards, matthias ------------------------------------------------------------------- Subscription options: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel FAQ: http://www.arm.linux.org.uk/armlinux/mlfaq.php Etiquette: http://www.arm.linux.org.uk/armlinux/mletiquette.php