Calculating virtual address from physical address

Sylvain Munaut tnt at 246tNt.com
Sat May 6 05:27:50 EST 2006


Chris Dumoulin wrote:
> I'm using a Virtex II Pro-based board with a PPC405. The board is 
> hanging somewhere very early in the kernel boot process. I believe it 
> may be dying at the point where the MMU is enabled. In order to 
> determine the exact point at which my board hangs, I'm blinking two LEDs 
> in the assembly code found in arch/ppc/kernel/head_4xx.S, . Currently I 
> am only able to successfully access the LEDs before the MMU is turned 
> on, but I can't be sure that I'm calculating the virtual address 
> properly when I try to access the LED after the MMU is turned on.

Typical when trying to bring up board ...

Once the MMU is turned on, you leds register are most likely ... nowhere
... i.e.
if you don't create a mapping your self there is just no virtual address
that will
access your leds physical address.

What I did on some ppc work was tu use a quick BAT mapping to map some leds.
It's pretty easy to setup. Be aware though that this mapping will get
wiped out when
the kernel sets up the BAT for itself.


    Sylvain



More information about the Linuxppc-embedded mailing list