Problems with MMU: address translation for 0xXXXXXXXX failed

2 messages, 2 authors, 2003-05-13 · open the first message on its own page

Problems with MMU: address translation for 0xXXXXXXXX failed

From: Jeremy Bowen <hidden>
Date: 2003-05-13 04:19:26

I'm trying to get a BDI2000 (firmware v1.09) working in order to debug a
kernel module.
I'm using an Embedded Planet RPXlite MPC850 board running kernel v2.4.20
from kernel.org with CONFIG_BDI_SWITCH=y and CONFIG_COMPILE_OPTIONS="-g
-ggdb"
in my .config

I have compiled gdb v5.3 with --host=i686-pc-linux-gnu
--target=powerpc-linux.

The relevant bit of my BDI config file is here:
=====================================================================
WSPR    796             0x00000000      ;;M_TWB: invalibdate TWB
WM32    0x000000f0      0x00000000      ;;invalidate page table base
(PTBASE)

[TARGET]
CPUTYPE     MPC800
CPUCLOCK    50000000		;the CPU clock rate after processing the
init list
WORKSPACE   0x00000000		;workspace in target RAM for fast download
BDIMODE     AGENT       	;the BDI working mode (LOADONLY | AGENT)
BREAKMODE   SOFT	      	;SOFT or HARD, HARD uses PPC hardware
breakpoints
MMU XLAT                      ; Enable address translation
======================================================================

I have scanned the archives of this mailing list and have seen a number of
messages relating to getting the BDI working with the MMU but I don't seem
to be able to get this working on my system.

My kernel is stored in flash and booted by u-boot v0.3.0

I start the system by telneting into the BDI and issuing:
BDI>bi 0xc0000000 0xc00fffff
BDI>go

U-boot starts, loads the kernel and it is decompressed. At this point the
system stops. I then do the following:

BDI>ci
BDI>mm 0xf0 0xc014f000

(gdb) target remote 192.168.240.242:2001
Remote debugging using 192.168.240.242:2001
0xc00020f0 in start_here()
(gdb) c
Continuing.

Everything is OK until after I get a login prompt. After I log in, I don't
seem to be able to debug successfully. I'm wanting to break on a call from a
user-space program to a kernel function. On executing the program that
triggers the kernel breakpoint I get the following error in the telnet
session to the BDI

*** MMU: address translation for 0xC400E69C failed
...
*** MMU: address translation for 0xC0A05EF0 failed
etc..

and in dgb:

(gdb)
Cannot remove breakpoints because program is no longer writeable.
It might be running in another process.
Further execution is probably impossible.

Breakpoint 3, m8xx_cpm_dpalloc (size=16) at commproc.c:216
(gdb) bt
Cannot access memory at address 0xc0a05ef0

Am I missing something obvious ? Is this the right way to go about debugging
a loadable module ? Any help would be gratefully appreciated.

Cheers

Jeremy


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: Problems with MMU: address translation for 0xXXXXXXXX failed

From: Dan Malek <hidden>
Date: 2003-05-13 05:07:38

Jeremy Bowen wrote:

BDI>mm 0xf0 0xc014f000
Don't do this.  Use 'PTBASE 0xf0' in your BDI configuration file.
Chances are the 0xc014f000 is not the right number, so just let the
software determine this on its own.

If that doesn't work, just out of curiosity use hard breakpoints (set
BREAKMODE HARD).  Just test it setting one breakpoint.  If this works,
I suspect the BDI is honoring the write protection (via the MMU) on the
kernel text pages and we can't set a soft breakpoint.  In this case, we'll
have to add a kernel configuration to allow a debugger write.  The
CONFIG_KGDB and CONFIG_XMON enable the text writing, but they also add
too much baggage and could interfere with the BDI.  It's another thing
to try that would provide some information, though.  I didn't remember
the BDI having trouble with this before, but I could have been using
different software or configurations.

Thanks.


	-- Dan


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help