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 inhead_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 not 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 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'stelnetcommand interface instead of GDB. Similar problems have also been reported when stepping through"mtmsr"or"mfmsr"during initial boot code. The problems comes also from the fact that GDB access not existent memory (maybe it tries to read a not existent stack frame). To debug the Linux kernel, I recommend that you run to a point where MMU is on before you connect with GDB. To debug boot code where MMU is off I recommend to use the MMAP feature of the BDI to prevent illegal memory accesses from GDB.
| 14.6.2. How to Debug Linux Exceptions | 1. Abstract | 14.6.4. Setting a breakpoint doesn't work | |||
| Prev | Home | Next | |||
