Skip to contentSkip to conversation

memory dump on mips

DISCUSSION Andi 2 participants 3 messages Jan 8, 2008 – Jan 11, 2008 MIPS

lore
Share & tools
lore

Andi

author
#0 lore raw

Hi list,

we are working on an embedded Linux device with a Sigma SMP8634 (MIPS 4KEc 300MHz CPU) mounted on it. Unfortunately we don't have access to the kernel running on the system.

We figured out, that the bootloader loads the kernel image to 0x90020000 (physical address). So it should be possible to read the image from that address later on in Linux. We are not sure if our approach does not work because of the memory protection that the SMP8634 offers, or if we do something wrong.

This approach for a kernel module works on ARM9 (with MMU):
<code>
memory = ioremap_nocache(0x90020000, 20);
char byte = readb(memory);
</code>

Well, on mips this just throws 0x00.
Is this supposed to work on mips as well? Or do I have to deal with "remap_pfn_range" or even VMA and "vm_ops->nopage"?

Thank you very much in advance

Regards,

andi

#1 lore raw
Quoted 8 lines · Andi

Hi list,

we are working on an embedded Linux device with a Sigma SMP8634 (MIPS 4KEc 300MHz CPU) mounted on it. Unfortunately we don't have access to the kernel running on the system.

We figured out, that the bootloader loads the kernel image to 0x90020000 (physical address).

This sounds like you are confusing physical and virtual addresses. Typically the kernel is loaded to the direct-mapped KSEG0 segment, which starts at physical 0x00000000 / virtual 0x80000000.

So the physical address you are looking for would be 0x10020000.

Thiemo

author
#2 lore raw
In reply to Andi

Hello,

we now figured out how to dump the memory at a certain address. As I already said we want to create dump the kernel running on the system. Unfortunately we don't know the "magic code" to look for in the dump in order to find the starting position of the image.
I couldn't find a ".ELF" in the dump, so far.

Can you please point me to where I can find the right information how such a kernel-image might look like?

Thank you very much in advance

Regards,

Andi