Specifications

Conclusion:
You cannot debug Linux exception entry and exit code. Because of speed, DataStoreTLBMiss does
not even make use of EXCEPTION_PROLOG, and SRR0/SRR1 are never saved. Therefore you
cannot debug DataStoreTLBMiss unless you change it's code (save SRR0/SRR1, set MSR[RI].
14.6.3. How to single step through "RFI"
instruction
Question:
I am trying to debug Linux on an IBM 405GP processor. Linux boots fine and I can step through the
code until the "rfi" instruction in head_4xx.S; then I get the following:
- TARGET: target has entered debug mode
Target state : debug mode
Debug entry cause : JTAG stop request
Current PC : 0x00000700
Current CR : 0x28004088
Current MSR : 0x00000000
Current LR : 0x000007a8
# Step timeout detected
Answer:
Your single step problem most likely comes from the fact that GDB accesses some non-existent
memory (at least some versions do/did in the past). This exception is stored in some way within the
405 and when you step "rfi" it triggers. This is because some instructions like "rfi" are always
stepped using a hardware breakpoint and not with the JTAG single step feature.
Probably you can step over the "rfi" instruction when using the BDI2000's telnet command
interface instead of GDB.
Similar problems have also been reported when stepping through "mtmsr" or "mfmsr" during
initial boot code. The problem comes also from the fact that GDB accesses non-existent memory
(maybe it tries to read a non-existent stack frame).
To debug the Linux kernel, I recommend that you run to a point where the MMU is on before you
connect with GDB.
To debug boot code where the MMU is off I recommend to use the MMAP feature of the BDI to
prevent illegal memory accesses from GDB.
14.6.4. Setting a breakpoint doesn't work
Question:
I am trying to set a breakpoint using the BDI2000 telnet interface. However, the code does not
stop at the breakpoint.
Answer:
Make sure that the CPU has been stopped before setting the breakpoint. You can verify this by issuing
the "info" command before setting the breakpoint. If the target state is "running" you must use
the "halt" command to stop the CPU before you can successfully set the breakpoint.
14.6.4. Setting a breakpoint doesn't work 202