All of lore.kernel.org
 help / color / mirror / Atom feed
* memory dump on mips
@ 2008-01-08 13:06 Andi
  2008-01-08 14:54 ` Thiemo Seufer
  2008-01-11 12:30 ` Andi
  0 siblings, 2 replies; 4+ messages in thread
From: Andi @ 2008-01-08 13:06 UTC (permalink / raw)
  To: linux-mips

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: memory dump on mips
  2008-01-08 13:06 memory dump on mips Andi
@ 2008-01-08 14:54 ` Thiemo Seufer
  2008-01-11 12:30 ` Andi
  1 sibling, 0 replies; 4+ messages in thread
From: Thiemo Seufer @ 2008-01-08 14:54 UTC (permalink / raw)
  To: Andi; +Cc: linux-mips

Andi wrote:
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: memory dump on mips
@ 2008-01-09 14:49 Andi
  0 siblings, 0 replies; 4+ messages in thread
From: Andi @ 2008-01-09 14:49 UTC (permalink / raw)
  To: linux-mips

Hello,

Thiemo Seufer wrote:
> > 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.

Thank you for pointing on that. I was not sure if this was virtual or
physical since i grabbed this address from a serial-debug output. But if
one thinks about that the device has around 128mb it should be clear
that this can't be a physical address if ram starts at 0x00000000.

We'll check this ..


Regards,

Andi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: memory dump on mips
  2008-01-08 13:06 memory dump on mips Andi
  2008-01-08 14:54 ` Thiemo Seufer
@ 2008-01-11 12:30 ` Andi
  1 sibling, 0 replies; 4+ messages in thread
From: Andi @ 2008-01-11 12:30 UTC (permalink / raw)
  To: linux-mips

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-01-11 12:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-08 13:06 memory dump on mips Andi
2008-01-08 14:54 ` Thiemo Seufer
2008-01-11 12:30 ` Andi
  -- strict thread matches above, loose matches on Subject: below --
2008-01-09 14:49 Andi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.