Skip to contentSkip to conversation

abatron and kernel modules.

DISCUSSION David Updegraff 4 participants 5 messages Jul 25, 2002

lore
Share & tools
lore
#0 lore raw

Hi.

We've been very happily using BDI2000 for kernel debugging on our 405GP on a 2.4.2 kernel with builtin abatron MMU support (via PTBASE at 0xf0).

But I have not figured out how to get it deal with the address space of a loaded kernel module: it claims that the region is missing from the page tables. Kernel addresses are in 0xC00xxxxx ranges, and when we load the module, 'module_list' now points to 0xC340xxxx ranges. BDI can dump the physical addresses of my module, but cant talk to the virual kernel address space of the loaded module.

Is there some page table magic that goes on with module loading that is confusing both me and the BDI?

Thanx.

--
Dave Updegraff, Cray Inc. / [email protected]

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

#1 lore raw
Quoted 2 lines · David Updegraff

We've been very happily using BDI2000 for kernel debugging on our 405GP on a 2.4.2 kernel with builtin abatron MMU support (via PTBASE at 0xf0).

Hmmmm.....there was a time when we screwed up the kernel PTE by moving around some bits and not telling the folks at Abatron we did that..... I unfortunately don't remember the kernel versions nor the BDI2000 firmware versions that match. All I know is the latest versions of both work together :-)

There was also a version of the 2.4.2 kernel, perhaps even a MontaVista snapshot, where I screwed up loading the address of the pte pointer label during initialization. This caused the BDI2000 to go looking into the weeds for random bits that it tried to interpret as page tables.

I know that what you are trying to do will work when all of the bits are lined up correctly.

If you could upgrade to a newer kernel, it would really help.

Thanks.

	-- Dan

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

#2 lore raw
Quoted 3 lines · Dan Malek

There was also a version of the 2.4.2 kernel, perhaps even a MontaVista snapshot, where I screwed up loading the address of the pte pointer

I recall having to add the BDI support to the linux-2.4.2_hhl20 kernel source here. If the original poster doesn't want to use a later kernel for whatever reason (e.g. no support contract), he should get some late 2.4 source, find the BDI references (there aren't that many), and port them back to his 2.4.2-derived base.

Good luck!

John

--
John W. Linville
LVL7 Systems, Inc.

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

#3 lore raw
Quoted 2 lines · John W. Linville

I recall having to add the BDI support to the linux-2.4.2_hhl20 kernel source here.

There are a couple of different versions of that kernel :-) The first one was all PPC except 4xx. There was one for 4xx, where I managed to break some of the other PPCs (sorry). There may be later ones that include other processor architectures. There are minor version numbers contained in the packages, take a look at them as they are important. Of course, the processor specific CD packages were all correct, just be careful when mixing from one to another (which isn't recommend).

	-- Dan

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

#4 lore raw
In reply to David Updegraff

Dear David,

Quoted 3 lines · in message <[email protected]> you wrote:

We've been very happily using BDI2000 for kernel debugging on our 405GP on a 2.4.2 kernel with builtin abatron MMU support (via PTBASE at 0xf0).

There have been some changes in the way how the Linux kernel and the BDI2000 exchange information about the MMU state; I'd recommend to use a more recent kernel (linuxppc_2_4_devel) with the latest version of the Abatron firmware (afaik 1.08 for 4xx)

Quoted 6 lines

But I have not figured out how to get it deal with the address space of a loaded kernel module: it claims that the region is missing from the page tables. Kernel addresses are in 0xC00xxxxx ranges, and when we load the module, 'module_list' now points to 0xC340xxxx ranges. BDI can dump the physical addresses of my module, but cant talk to the virual kernel address space of the loaded module.

We have a bit of documentation about this at
http://www.denx.de/doc/TQM8xxL/debugging.html#DEBUGGING-LINUX-KERNEL

Hope it helps,

Wolfgang Denk

--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] A person who is more than casually interested in computers should be well schooled in machine language, since it is a fundamental part of
a computer. -- Donald Knuth

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