Subject: Re: Breakpoint is not hitting for Kernel Debugging

From: Detlev Zundel <[email-masked]>
Date: Wed, 05 Sep 2007 15:27:22 +0200

Hi,

> Try adding this line to your BDI config to clear/invalidate the page
> table base address so that the MMU translation works before the MMU
> has been initialised.
>
>   ;; Following is to clear the page table base address
>   WM32    0x000000f0      0x00000000

Did you really need this under any circumstance?  To only hit a
breakpoint?

I am asking because recent experiences with BDI debugging showed that
there are some pitfalls that one can fall into (and these are only the
ones that I got aware of):

a) - PTBASE is 0x00 (!) for head_fsl_booke, head_44x,
   - PTBASE is 0xf0 for head_4xx

   Don't ask me if this makes any sense, but that's how it is right
   now.

   So for the original poster I would say a PTBASE 0x0 would be in
   order.

b) Moreover even with a _wrong_ PTBASE on a 440EPx the BDI translated
   start_kernel just fine by only subtracting 0xc0000000 (using a
   "default" translation) - it was only later (debugging dynamic
   modules) that the wrong PTBASE hit me hard.

What proved very useful for me is the bdi command "phys <addr>" to
check the translation the BDI uses [you can use the command (as all
BDI commands) through gdb with "mon phys <addr>" btw.] - a wrong
PTBASE led to subsequent "JTAG instruction overruns" so I was pretty
sure that this was my real problem.

Best wishes
  Detlev

-- 
The limits of my language stand for the limits of my world.
                                        -- Ludwig Wittgenstein
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: [email-masked]