Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Use of r31 on the powerpc/booke:mpc85xx architecture

On Sep 6, 2012, at 5:11 PM, Scislowicz, Adam wrote:

> In sys/arch/powerpc/booke/booke_pmap.c:pmap_copy_page() The r31 register is 
> used. When compiling for DDB support with "-fno-omit-frame-pointer" the 
> compiler complains about the use of register 31. I am new to this 
> architecture but it seems that register is used as the frame pointer.

Actually, r1 is the stack pointer and frame pointer.  There is no
reason to use -fno-omit-frame-pointer on powerpc.

> If you modify the inline assembly to use r23-r30 instead of r24-r31 it seems 
> to solve the problem, but I wanted to ask if this is the right way to change 
> this particular code as I am new to this architecture and don't want to 
> introduce any unpredictable side effects when making the change locally.

It doesn't solve the problem since ldm/stwm will always write/read r31 anyway
so you are just corrupting memory.

> It also seems that DDB support may not be functioning yet on the 
> powerpc/booke architecture. Is this the known state of things with this port? 
> I am using a P2020RDB-like system and using the P2020RDB config file which 
> references the board code in mpc85xx. While the system otherwise works to 
> some extent: I can boot and use user-space tools when not using DDB. However 
> when I compile with DDB support I get a trap fairly early in the kernel 
> initialization process and then my watchdog reboots the system from out of 
> under me.

DDB works fine.  Always has.  Couldn't have developed it without DDB.
What is it the trap?

Home | Main Index | Thread Index | Old Index