Re: Strange memory addresses

From: Kevin O'Connor <kevin_at_koconnor.net>
Date: Fri, 18 Apr 2008 00:22:46 -0000

On Thu, Apr 17, 2008 at 11:23:53PM +0100, Oliver Ford wrote:
> I'm writing this is a separate thread to the patches as it's more just me
> being confused. Also, I think I sent the patches e-mail off the back of a
> reply by mistake, so it's gone under some other thread. Sorry about that.
> Shall I resend it?

I see it. Thanks - I'll review them.

> I've now disassembled the code in question, and can trace it using INSN and
> INSN2 set to 0x0bb0xxxx. The SSP registers are read/written to by str/ldr s
> to 0x00490000, (again, not mapped in the haret mmu dump. It's not at c249
> either). Am I reading something wrong?

Sounds like the code is mapping in the region at the beginning of the
operation and then unmapping it. If this is the case, haret wont see
the mapping when you run "dump mmu" before or after the operation.

> The problem is that it also read/writes to 00460000 and 004a0000, which I
> think are important and I can't find out what these point to.

There are a couple of things you can try:

1 - trap VirtualCopy. Run "loadfunc coredll VirtualCopy", get the
address of the function and run "set insn <addr>". This should trap
all calls to VirtualCopy - a function used to map in memory areas.
Unfortunately, a core library may be able to map in areas without
using this function - I don't know.

2 - try to watch changes to the mmu table. If the memory map is being
changed, you can try to report those chagnes. Take the MVA address
(eg, 0x0b460000) and find its L1 entry (eg, "CP(15,0,2,0,0) + 0xb4 *
4"), find its l2 entry (eg, "l2addr + 0x60000 / 4096"), and then watch
that address. (The above description is just from memory, so you'll
need to play with it.) I don't think you can use "mmutrace" for
watching the mmu table, as getting an mmu fault while ce is updating
the mmu tables has been known to cause lockups. Using TRACES is
probably safest, though pxa trace may work.

3 - You could port memVirtToPhys() to irq context and then modify the
"set insn" code to call it. Though, this is likely a bit tricky.

Hope this helps.
-Kevin
Received on Thu Apr 17 2008 - 20:22:46 EDT

This archive was generated by hypermail 2.2.0 : Thu May 22 2008 - 02:56:06 EDT